/* Portfolio page: same visual language as mgamalhz.com (slate-950, emerald accents, Inter). */
:root {
  --bg: #020617;
  --surface: #0f172a;
  --line: rgba(255, 255, 255, 0.1);
  --text: #f8fafc;
  --muted: #cbd5e1;
  --dim: #94a3b8;
  --accent: #6ee7b7;
  --accent-strong: #6ee7b7;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

img { display: block; max-width: 100%; height: auto; }

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.9rem 1rem;
  background: rgba(2, 6, 23, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.mark {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 0.5rem;
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent);
  font: 700 13px ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn:hover { background: #a7f3d0; }

/* Quiet header link to the main site */
.top-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  color: var(--dim);
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.top-link::after { content: "\2197"; margin-left: 0.3rem; font-size: 0.75rem; }

.top-link:hover { color: var(--text); }

.btn-small { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.875rem; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }

main { max-width: 72rem; margin: 0 auto; padding: 0 1rem; }

/* Intro */
/* The hero fills the first screen under the sticky header, so the projects start below the fold */
.intro {
  position: relative;
  min-height: calc(100svh - 4.05rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0 4.5rem;
}

.scroll-cue {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  color: var(--dim);
  transition: color 0.2s ease;
}

.scroll-cue:hover { color: var(--text); }

.scroll-cue svg { width: 1.4rem; height: 1.4rem; }

.glow {
  position: absolute;
  left: 50%;
  top: 40%;
  width: min(40rem, 110vw);
  height: 18rem;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.1);
  filter: blur(110px);
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  padding: 0.2rem 0.9rem 0.2rem 0.2rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(110, 231, 183, 0.85);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow img { width: 1.6rem; height: 1.6rem; border-radius: 50%; object-fit: cover; object-position: top; }

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

h1 span { font-weight: 400; color: rgba(167, 243, 208, 0.7); }

.lede {
  max-width: 46rem;
  margin: 1.25rem auto 0;
  color: var(--dim);
  font-size: 0.98rem;
  text-wrap: balance;
}

.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.75rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  color: var(--dim);
  font-size: 0.9rem;
}

.stats strong { color: var(--text); font-weight: 700; }

/* Section cards: company logo on top, name, then a count. Experience gets the accent. */
.jump {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  width: 100%;
  max-width: 70rem;
  margin: 2.25rem auto 0;
}

@media (min-width: 40rem) {
  .jump { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 64rem) {
  .jump { grid-template-columns: repeat(7, 1fr); }
}

/* Below desktop the seventh card, Experience, takes its own full row */
@media (max-width: 63.99rem) {
  .jump-xp { grid-column: 1 / -1; }
}

.jump a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 1rem 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.jump a:hover,
.jump a:focus-visible {
  border-color: rgba(110, 231, 183, 0.45);
  background: #131d33;
  transform: translateY(-3px);
  outline: none;
}

.jump-logo {
  height: 2rem;
  width: 100%;
  display: grid;
  place-items: center;
  margin-bottom: 0.35rem;
  color: var(--text);
}

/* Logos in white, like the client row on mgamalhz.com */
.jump-logo img { height: 2rem; width: auto; max-width: 5.5rem; object-fit: contain; filter: grayscale(100%) brightness(0) invert(1); opacity: 0.9; }

.jump-logo svg { width: 1.6rem; height: 1.6rem; color: var(--accent); }

.jump-logo-text { font: 800 1.2rem ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--accent); }

.jump-name { font-size: 0.88rem; font-weight: 600; line-height: 1.25; }

.jump-count { color: var(--dim); font-size: 0.75rem; }

.jump-xp {
  border-color: rgba(110, 231, 183, 0.45) !important;
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.28), rgba(16, 185, 129, 0.06) 70%), var(--surface) !important;
}

.jump-xp .jump-logo-text { color: #a7f3d0; font-size: 1.45rem; }

.jump-xp .jump-count { color: rgba(167, 243, 208, 0.85); }

/* Project groups */
.group {
  padding: 3rem 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 4rem;
}

.group-head {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.group-logo {
  flex: none;
  width: 5.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 0.75rem;
}

.group-logo-light { background: #fff; padding: 0.6rem 0.75rem; }

.group-logo-light img { max-height: 100%; width: auto; object-fit: contain; }

.group-logo-mark svg { width: 1.6rem; height: 1.6rem; }

.group-logo-mark {
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent);
  font: 700 1.1rem ui-monospace, SFMono-Regular, Menlo, monospace;
}

h2 { margin: 0; font-size: 1.6rem; font-weight: 700; letter-spacing: -0.01em; }

.credit { margin: 0.2rem 0 0; color: var(--dim); font-size: 0.92rem; }

.credit a { color: var(--muted); text-underline-offset: 3px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.25rem;
}

@media (min-width: 48rem) {
  /* Fixed two columns so a lone product card stays card-sized */
  .cards-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 64rem) {
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover { transform: translateY(-4px); border-color: rgba(110, 231, 183, 0.35); }

.shot { display: block; overflow: hidden; border-bottom: 1px solid var(--line); background: #1e293b; }

.shot img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: top; transition: transform 0.5s ease; }

.card:hover .shot img { transform: scale(1.03); }

.body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem 1.35rem 1.4rem; }

.kind {
  margin: 0;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Product state on own products: Live, Beta or Building */
.status {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.05rem 0.5rem;
  border: 1px solid rgba(110, 231, 183, 0.4);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  vertical-align: 1px;
}

.status-building { border-color: rgba(251, 191, 36, 0.4); color: #fcd34d; }

h3 { margin: 0.3rem 0 0.5rem; font-size: 1.3rem; font-weight: 700; }

.body > p:not(.kind) { margin: 0; color: var(--muted); font-size: 0.95rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.75rem;
}

.visit {
  align-self: flex-start;
  margin-top: auto;
  padding-top: 1.1rem;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.visit::after { content: " \2197"; }

.visit:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Experience: headline numbers, then a timeline of roles */
.xp-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem;
  margin: 0 0 2.25rem;
  padding: 0;
  list-style: none;
}

.xp-stats li {
  padding: 1.1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: radial-gradient(ellipse at top left, rgba(16, 185, 129, 0.12), transparent 70%), var(--surface);
}

.xp-stats strong { display: block; color: var(--accent); font-size: 2rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }

.xp-stats span { color: var(--muted); font-size: 0.88rem; }

.timeline {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* The line joining the logo tiles */
.timeline::before {
  content: "";
  position: absolute;
  left: 2.25rem;
  top: 1.5rem;
  bottom: 1.5rem;
  width: 1px;
  background: linear-gradient(var(--accent), var(--line) 30%, var(--line));
}

.timeline > li {
  position: relative;
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.1rem;
  padding-bottom: 1rem;
}

.timeline > li:last-child { padding-bottom: 0; }

.xp-logo {
  position: relative;
  width: 4.5rem;
  height: 3rem;
  display: grid;
  place-items: center;
  padding: 0.55rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: var(--surface);
}

/* Same treatment as the client row on mgamalhz.com: every logo in white */
.xp-logo img { max-width: 100%; max-height: 1.9rem; object-fit: contain; filter: grayscale(100%) brightness(0) invert(1); opacity: 0.85; }

.xp-logo-text { color: var(--text); font-weight: 800; font-size: 1rem; }

.xp-body {
  padding: 1rem 1.2rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  transition: border-color 0.3s ease;
}

.timeline > li:hover .xp-body { border-color: rgba(110, 231, 183, 0.35); }

.xp-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 0.15rem 1rem; }

.timeline h3 { margin: 0; font-size: 1.05rem; }

.timeline h3 span { color: var(--dim); font-weight: 500; }

.when { margin: 0; color: var(--accent); font-size: 0.82rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.xp-kind { margin: 0.1rem 0 0.5rem; color: var(--dim); font-size: 0.8rem; }

.xp-body > p:not(.xp-kind) { margin: 0; color: var(--muted); font-size: 0.92rem; }

.xp-body .tags { margin-top: 0.75rem; }

@media (max-width: 40rem) {
  .timeline::before { left: 1.75rem; }
  .timeline > li { grid-template-columns: 3.5rem 1fr; gap: 0.75rem; }
  .xp-logo { width: 3.5rem; height: 2.5rem; padding: 0.45rem; }
  .xp-logo img { max-height: 1.6rem; }
  .xp-logo-text { font-size: 0.9rem; }
}

/* Working relationship next to a group title */
.rel {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--dim);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  vertical-align: 0.3em;
  white-space: nowrap;
}

/* "My role" line on each project card */
.body > p.role {
  margin-top: 0.85rem;
  padding: 0.55rem 0.75rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
  background: rgba(52, 211, 153, 0.07);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
}

.role span {
  margin-right: 0.5rem;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Integrations: one card size for every service, grouped under small labels */
.int-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 40rem) {
  .int-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 64rem) {
  .int-grid { grid-template-columns: repeat(6, 1fr); }
}

.int {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0.6rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--surface);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.int:hover { border-color: rgba(110, 231, 183, 0.35); transform: translateY(-2px); }

/* Real brand logos in their own colours, on a white panel of the same size */
.int-logo {
  height: 3.75rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  padding: 0 0.7rem;
  border-radius: 0.6rem;
  background: #fff;
}

.int-logo img { max-width: 100%; max-height: 1.9rem; object-fit: contain; }

/* Tall or boxed marks need more height to read at the same size as the wordmarks */
.int-logo-tall img { max-height: 3rem; }

/* Heavy wordmarks read larger than icons at the same height */
.int-logo-wordmark img { max-height: 1.3rem; }

.int-kind {
  margin: 0 0.25rem 0.2rem;
  color: var(--dim);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.int-name { margin: 0 0.25rem; font-weight: 600; font-size: 0.92rem; }

.int-what { margin: 0.1rem 0.25rem 0.6rem; color: var(--dim); font-size: 0.78rem; line-height: 1.4; }

.int-where {
  align-self: flex-start;
  margin: auto 0.25rem 0;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 500;
}

/* Projects with a case study: a corner tag on the shot, and a filled main button */
.shot { position: relative; }

.shot-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1.2rem;
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #86efac, var(--accent));
  color: var(--bg);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.case-link svg { width: 1.05rem; height: 1.05rem; flex: none; }

.case-link::after { content: "\2192"; margin-left: 0.15rem; transition: transform 0.2s ease; }

.case-link:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(16, 185, 129, 0.32); }

.case-link:hover::after { transform: translateX(3px); }

.card-actions .visit { align-self: center; margin-top: 0; padding-top: 0; }

/* Case study pages */
.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-decoration: none;
}

.back-link::before { content: "\2190"; margin-right: 0.45rem; }

.back-link:hover { color: var(--text); }

.cs { max-width: 52rem; }

.cs-hero { padding: 3rem 0 2rem; text-align: center; }

.eyebrow-logo { width: auto !important; height: 1rem !important; border-radius: 0 !important; margin-left: 0.5rem; background: #fff; padding: 0.15rem 0.3rem; box-sizing: content-box; }

.cs-hero h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); }

.cs-lede { max-width: 40rem; margin: 1rem auto 0; color: var(--muted); font-size: 1.05rem; text-wrap: balance; }

.cs-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
  margin: 2rem 0 0;
  text-align: left;
}

@media (min-width: 48rem) {
  .cs-meta { grid-template-columns: repeat(4, 1fr); }
}

.cs-meta div { padding: 0.85rem 1rem; border: 1px solid var(--line); border-radius: 0.85rem; background: var(--surface); }

.cs-meta dt { color: var(--accent); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; }

.cs-meta dd { margin: 0.2rem 0 0; font-size: 0.9rem; font-weight: 500; }

.cs-shot { display: block; margin-top: 1.75rem; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; }

.cs-shot img { width: 100%; }

.cs-block {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.25rem;
  padding: 2.5rem 0;
  border-top: 1px solid var(--line);
}

.cs-num { margin: 0.35rem 0 0; color: var(--accent); font: 700 0.95rem ui-monospace, SFMono-Regular, Menlo, monospace; }

.cs-block h2 { margin-bottom: 0.75rem; }

.cs-block p { margin: 0 0 0.85rem; color: var(--muted); }

.cs-kicker { margin: 0 0 0.3rem !important; color: var(--accent) !important; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

.cs-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5rem), 1fr));
  gap: 0.75rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.cs-features li { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: var(--surface); }

.cs-features strong { display: block; margin-bottom: 0.25rem; font-size: 0.95rem; }

.cs-features span { color: var(--dim); font-size: 0.86rem; }

.cs-points { margin: 1rem 0 0; padding: 0; list-style: none; }

.cs-points li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-size: 0.95rem;
}

.cs-points li:first-child { border-top: 0; }

.cs-points li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 1.2rem;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

.cs-note {
  margin-top: 1rem !important;
  padding: 0.7rem 0.9rem;
  border-left: 2px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
  background: rgba(52, 211, 153, 0.07);
  font-size: 0.88rem;
}

.cs-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0.5rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .cs-stats { grid-template-columns: repeat(4, 1fr); }
}

.cs-stats li { padding: 1rem; border: 1px solid var(--line); border-radius: 0.9rem; background: radial-gradient(ellipse at top left, rgba(16, 185, 129, 0.12), transparent 70%), var(--surface); }

.cs-stats strong { display: block; color: var(--accent); font-size: 1.7rem; font-weight: 800; line-height: 1.1; }

.cs-stats span { color: var(--muted); font-size: 0.82rem; }

/* Flow diagram: numbered steps joined by arrows, stacked on phones */
.flow {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.4rem;
  margin: 1.4rem 0 1rem;
  padding: 0;
  list-style: none;
}

.flow li {
  counter-increment: step;
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: var(--surface);
}

.flow li::before {
  content: counter(step);
  width: 1.5rem;
  height: 1.5rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.55rem;
  border-radius: 50%;
  background: rgba(52, 211, 153, 0.15);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}

/* Arrow into the next step */
.flow li:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  right: -1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.95rem;
}

.flow li:last-child { border-color: rgba(110, 231, 183, 0.45); background: linear-gradient(160deg, rgba(16, 185, 129, 0.18), transparent 70%), var(--surface); }

.flow strong { font-size: 0.88rem; line-height: 1.3; }

.flow span { margin-top: 0.2rem; color: var(--dim); font-size: 0.76rem; line-height: 1.4; }

.flow-alt {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.6rem;
  margin: 0 0 1rem !important;
  padding: 0.65rem 0.9rem;
  border: 1px dashed rgba(110, 231, 183, 0.35);
  border-radius: 0.75rem;
  color: var(--text) !important;
  font-size: 0.86rem;
}

.flow-alt span {
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Order states: the main path as joined pills, with side states apart */
.states {
  margin: 1.4rem 0 1rem;
  padding: 1.1rem 1.1rem 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
}

.states-main, .states-side {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.states-main li, .states-side li {
  position: relative;
  padding: 0.3rem 0.7rem;
  border: 1px solid rgba(110, 231, 183, 0.3);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  font-size: 0.78rem;
  font-weight: 500;
}

.states-main li:not(:last-child)::after {
  content: "\2192";
  position: absolute;
  right: -1.05rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 0.8rem;
}

.states-main li:last-child { background: rgba(52, 211, 153, 0.25); border-color: var(--accent); }

.states-side-label { margin: 0.95rem 0 0.5rem !important; color: var(--dim) !important; font-size: 0.75rem; }

.states-side li { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.08); color: #fecaca; }

@media (max-width: 48rem) {
  .flow { grid-template-columns: 1fr; gap: 1.1rem; }
  .flow li { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 0.6rem; }
  .flow li::before { margin-bottom: 0; }
  .flow span { flex-basis: 100%; padding-left: 2.1rem; }
  .flow li:not(:last-child)::after { content: "\2193"; right: auto; left: 1.5rem; top: auto; bottom: -1.1rem; transform: none; }
}

.cs-credit { margin-top: 1.25rem !important; color: var(--dim) !important; font-size: 0.85rem; }

@media (max-width: 40rem) {
  .cs-block { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* Closing call to action */
.cta {
  margin: 1rem 0 3rem;
  padding: 3rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: radial-gradient(ellipse at top, rgba(16, 185, 129, 0.16), transparent 70%), var(--surface);
  text-align: center;
}

.cta p { margin: 0.6rem auto 0; max-width: 32rem; color: var(--muted); }

.cta-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.6rem; }

.foot { padding: 0 1rem 2.5rem; color: #64748b; font-size: 0.8rem; text-align: center; }

@media (max-width: 40rem) {
  .intro { padding-top: 3rem; }
  .group-head { align-items: flex-start; }
  .group-logo { width: 4.5rem; height: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .shot img, .jump a, .int, .case-link, .case-link::after { transition: none; }
  .card:hover, .card:hover .shot img, .jump a:hover, .int:hover { transform: none; }
}
