/* ==========================================================================
   Design tokens — swap these when brand guidelines land. Everything reads
   from here, so a rebrand is edits to this block only.
   ========================================================================== */
:root {
  /* Light Swiss / Accessible & Ethical.
     Every value below is contrast-verified against its real backdrop at the
     7:1 ENHANCED target, not the 4.5:1 baseline. Don't swap a colour here
     without re-running the check — teal-600 (#0D9488) looks right and fails. */
  --bg: #ffffff;
  --surface: #f8fafc;       /* alt section bands */
  --surface-2: #f1f5f9;
  --line: #e2e8f0;          /* decorative dividers + card edges */
  --line-strong: #cbd5e1;   /* stronger hairline where structure matters */
  --line-input: #64748b;    /* interactive boundaries — 4.76:1, WCAG 1.4.11 */
  --fg: #0f172a;            /* 17.85:1 on white */
  --muted: #475569;         /* 7.58:1 on white — enhanced, not just AA */
  --accent: #0f766e;        /* fills/buttons — white on it = 5.47:1 */
  --accent-ink: #115e59;    /* accent as TEXT on white = 7.58:1 */
  --accent-wash: #f0fdfa;   /* tinted backgrounds */
  --accent-soft: #99f6e4;   /* soft borders */
  --on-accent: #ffffff;
  --radius: 1rem;
  --radius-sm: 0.625rem;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --maxw: 1240px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing scale — density 2/10 (spacious). Marketing page, not a dashboard. */
  --sp-1: 0.5rem;  --sp-2: 1rem;   --sp-3: 1.5rem;  --sp-4: 2.5rem;
  --sp-5: 4rem;    --sp-6: 6rem;   --sp-7: 8rem;    --sp-8: 12rem;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }

.skip {
  position: absolute; left: 0.75rem; top: -4rem; z-index: 100;
  padding: 0.75rem 1.25rem; background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius-sm); font-weight: 700; transition: top 0.2s var(--ease);
}
.skip:focus { top: 0.75rem; }

:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.5rem; }

/* ==========================================================================
   Motion. One duration for everything is the named anti-pattern — small
   things settle fast, large blocks take longer, and elements enter from the
   direction they belong to (spatial continuity). --i is a stagger index set
   by observeReveals().
   ========================================================================== */
:root {
  --dur-s: 0.34s;   /* chips, list rows, logos */
  --dur-m: 0.52s;   /* cards, columns */
  --dur-l: 0.72s;   /* section heads, full-width blocks */
  --out: cubic-bezier(0.16, 1, 0.3, 1);    /* decelerate on arrival */
}

.reveal {
  opacity: 0;
  transform: translate3d(var(--rx, 0), var(--ry, 22px), 0);
  transition: opacity var(--d, var(--dur-m)) var(--out),
              transform var(--d, var(--dur-m)) var(--out);
  transition-delay: calc(var(--i, 0) * 55ms);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; will-change: auto; }

.reveal[data-dir="left"]  { --rx: -26px; --ry: 0; }
.reveal[data-dir="right"] { --rx: 26px;  --ry: 0; }
.reveal[data-dir="scale"] { --ry: 0; transform: scale(0.97); }
.reveal[data-dir="scale"].in { transform: none; }

.section-head.reveal, .section-head.split.reveal { --d: var(--dur-l); }
.layer.reveal, .card.reveal { --d: var(--dur-m); }
.srv.reveal, .stack-group.reveal { --d: var(--dur-s); }

/* Hero headline: lines rise in sequence rather than the block fading in. */
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: block;
  animation: riseIn 0.9s var(--out) backwards;
  animation-delay: calc(var(--i) * 90ms);
}
@keyframes riseIn { from { transform: translateY(100%); opacity: 0; } }

/* Header condenses once you leave the hero — signals "you have scrolled". */
.site-header { transition: height 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease); }
.scrolled .site-header { box-shadow: 0 1px 0 var(--line), 0 8px 24px rgb(15 23 42 / 0.06); }
.scrolled .nav { height: 3.75rem; }
.nav { transition: height 0.3s var(--ease); }

/* Reading progress. 2px, accent, top of viewport. */
.progress {
  position: fixed; inset: 0 auto auto 0; height: 2px; width: 100%; z-index: 60;
  background: var(--accent); transform: scaleX(var(--p, 0)); transform-origin: 0 50%;
  transition: transform 0.1s linear; pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero h1 .line > span { animation: none; }
  .progress { display: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ==========================================================================
   Type
   ========================================================================== */
/* Swiss minimalism on light. Plus Jakarta Sans maxes at 800 — asking for 900
   makes the browser synthesise a fake bold. Scale is pulled back from the
   dark-theme values: identical type reads noticeably heavier as black-on-white. */
h1, h2, h3, h4 { line-height: 1.02; letter-spacing: -0.04em; font-weight: 800; text-wrap: balance; }
h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.08; letter-spacing: -0.035em; }
h4 { font-size: 1.05rem; letter-spacing: -0.02em; }

.accent { color: var(--accent-ink); }
.muted { color: var(--muted); }
.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem); font-weight: 400;
  line-height: 1.6; color: var(--muted); max-width: 58ch; text-wrap: pretty;
}

.eyebrow {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent-ink);
  margin-bottom: var(--sp-3);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.9rem 1.75rem; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  transition: var(--ease) 0.25s; transition-property: background, color, border-color, transform, box-shadow;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); box-shadow: 0 8px 20px rgb(15 118 110 / 0.22); }
.btn-ghost { border-color: var(--line); color: var(--fg); }
.btn-ghost:hover { border-color: var(--accent-ink); color: var(--accent-ink); background: var(--accent-wash); }
.btn svg { width: 1.05em; height: 1.05em; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.85); backdrop-filter: blur(14px) saturate(180%);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 4.5rem; }
.brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.04em; }
.brand span { color: var(--accent-ink); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a { font-size: 0.925rem; font-weight: 500; color: var(--muted); transition: color 0.2s; }
.nav-links a:hover { color: var(--accent-ink); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer;
  width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; flex-direction: column; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--fg); margin: 5px 0; transition: 0.3s var(--ease); }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; inset: 4.5rem 0 auto 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 1rem 1.5rem 2rem; transform: translateY(-120%); transition: transform 0.35s var(--ease);
    max-height: calc(100dvh - 4.5rem); overflow-y: auto; overscroll-behavior: contain;
  }
  .nav-open .nav-links { transform: none; }
  .nav-links a { padding: 0.9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav-links .btn { margin-top: 1.25rem; justify-content: center; border-bottom: 0; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: clamp(3.25rem, 6vw, 5.5rem) 0; }
.section-head { max-width: 52rem; margin-bottom: var(--sp-5); }
.section-head h2 { margin-bottom: var(--sp-3); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .lead { margin-inline: auto; }

/* Editorial split: heading holds the left column, lead sits in the right.
   Breaks the centred-head-then-grid loop that made every section identical. */
.section-head.split {
  max-width: none; display: grid; grid-template-columns: 1.05fr 1fr;
  gap: var(--sp-4); align-items: end;
}
.section-head.split h2 { margin-bottom: 0; }
.section-head.split .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
.section-head.split .lead { padding-bottom: 0.35rem; }

/* Aside: head parks in a sticky left rail while the content scrolls past. */
.section-head.aside { max-width: 22rem; margin-bottom: 0; }
@media (min-width: 901px) {
  #process .container { display: grid; grid-template-columns: 22rem 1fr; gap: var(--sp-5); align-items: start; }
  .section-head.aside { position: sticky; top: 7rem; }
}

/* Offset grid: the section head occupies the first cell instead of sitting
   above the grid, so the cards start mid-row. */
@media (min-width: 901px) {
  #why-us .container > .section-head { max-width: none; margin-bottom: var(--sp-4); }
  .offset-grid { grid-template-columns: repeat(3, 1fr); }
  .offset-grid > *:first-child { grid-column: 2; }
}

.row-end { display: flex; justify-content: flex-end; margin-top: var(--sp-4); }

@media (max-width: 900px) {
  .section-head.split { grid-template-columns: 1fr; gap: var(--sp-3); align-items: start; }
  .section-head.aside { max-width: none; margin-bottom: var(--sp-4); }
  .row-end { justify-content: flex-start; }
}
.section-alt { background: var(--surface); }

/* ==========================================================================
   Hero
   ========================================================================== */
/* Type-led hero. No image, no chart, no gradient blob — the headline is the
   design. Everything the style spec calls a "decoration" was removed here. */
.hero { position: relative; padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(3rem, 5vw, 4.5rem); }
.hero h1 { margin-bottom: var(--sp-4); }
.hero h1 .accent { display: inline-block; }

.hero-body {
  display: grid; grid-template-columns: 1.1fr auto; gap: var(--sp-4);
  align-items: end; padding-bottom: var(--sp-4);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }

.hero-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3); padding-top: var(--sp-4); border-top: 1px solid var(--line);
}
.hero-stats .num {
  font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 800;
  color: var(--fg); letter-spacing: -0.05em; line-height: 1;
}
.hero-stats .lbl { font-size: 0.8rem; color: var(--muted); margin-top: 0.5rem; }

@media (max-width: 860px) {
  .hero-body { grid-template-columns: 1fr; align-items: start; gap: var(--sp-4); }
  .hero-stats { grid-template-columns: 1fr; gap: var(--sp-3); }
  .hero-stats > div { display: flex; align-items: baseline; gap: 0.85rem; }
  .hero-stats .lbl { margin-top: 0; }
}

/* ==========================================================================
   Cards + grids
   ========================================================================== */
.grid { display: grid; gap: 1.5rem; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }

.card {
  background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius); padding: var(--sp-4);
  transition: 0.3s var(--ease); transition-property: border-color, background;
}
.card:hover { border-color: var(--accent-soft); background: var(--accent-wash); }
.card h3 { margin-bottom: 0.85rem; }
.card p { color: var(--muted); font-size: 0.95rem; line-height: 1.6; }

/* Icon, not an icon-in-a-box. The filled tile was decoration. */
.card-icon { color: var(--accent-ink); margin-bottom: var(--sp-3); }
.card-icon svg { width: 1.75rem; height: 1.75rem; }

.card-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.5rem; font-size: 0.875rem; font-weight: 700; color: var(--accent-ink); }
.card-link svg { width: 1em; height: 1em; transition: transform 0.25s var(--ease); }
.card:hover .card-link svg { transform: translateX(4px); }

/* ==========================================================================
   Service index — editorial rows. Hairlines, not boxes.
   ========================================================================== */
.srv-list { border-top: 1px solid var(--line); }
.srv {
  display: grid; grid-template-columns: auto auto 1fr auto; align-items: center;
  gap: var(--sp-3); padding: var(--sp-3) 0.5rem;
  border-bottom: 1px solid var(--line); position: relative;
  transition: padding-left 0.35s var(--ease), background 0.35s var(--ease);
}
.srv::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 3px;
  background: var(--accent); transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.35s var(--ease);
}
.srv:hover, .srv:focus-visible { padding-left: 1.5rem; background: var(--accent-wash); }
.srv:hover::before, .srv:focus-visible::before { transform: scaleY(1); transform-origin: top; }

.srv-n {
  font-size: 0.78rem; font-weight: 700; color: var(--muted);
  font-variant-numeric: tabular-nums; letter-spacing: 0.04em; min-width: 1.6rem;
}
.srv-ic { color: var(--accent-ink); display: grid; place-items: center; }
.srv-ic svg { width: 1.5rem; height: 1.5rem; }
.srv-body { display: grid; gap: 0.3rem; }
.srv-t { font-size: clamp(1.15rem, 2vw, 1.55rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
.srv-d { font-size: 0.95rem; color: var(--muted); line-height: 1.5; max-width: 62ch; }
.srv-go { color: var(--muted); transition: color 0.3s var(--ease), transform 0.3s var(--ease); }
.srv-go svg { width: 1.35rem; height: 1.35rem; }
.srv:hover .srv-go, .srv:focus-visible .srv-go { color: var(--accent); transform: translateX(6px); }

@media (max-width: 700px) {
  .srv { grid-template-columns: auto 1fr auto; gap: var(--sp-2); padding: var(--sp-3) 0.25rem; }
  .srv-ic { display: none; }
  .srv:hover, .srv:focus-visible { padding-left: 0.75rem; }
}

/* Feature / benefit ticks */
.ticks li { display: flex; gap: 0.75rem; align-items: flex-start; padding: 0.6rem 0; color: var(--muted); font-size: 0.95rem; }
.ticks svg { width: 1.15rem; height: 1.15rem; flex: none; margin-top: 0.2rem; color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag { padding: 0.3rem 0.75rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: var(--accent); color: var(--on-accent); }
.tag-ghost { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ==========================================================================
   Journey — offline → online
   ========================================================================== */
.journey { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; position: relative; }
.journey::before {
  content: ""; position: absolute; top: 2.25rem; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
}
.journey-step { text-align: center; position: relative; }
.journey-step .dot {
  width: 4.5rem; height: 4.5rem; margin: 0 auto 1.5rem; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--line); color: var(--accent);
  display: grid; place-items: center; font-size: 1.35rem; font-weight: 800; position: relative;
}
.journey-step .dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid transparent; transition: 0.3s; }
.journey-step:hover .dot { border-color: var(--accent); box-shadow: 0 0 28px var(--accent-soft); }
.journey-step h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.journey-step p { font-size: 0.9rem; color: var(--muted); }
@media (max-width: 760px) { .journey { grid-template-columns: 1fr 1fr; } .journey::before { display: none; } }

/* ==========================================================================
   Capability pillars — self-qualification tablist (Porcellia pattern)
   ========================================================================== */
.pillar-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.pillar-tab {
  text-align: left; padding: var(--sp-3); cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: var(--radius);
  transition: 0.25s var(--ease); transition-property: border-color, background, transform;
}
.pillar-tab:hover { border-color: var(--accent-soft); background: var(--accent-wash); }
.pillar-tab .band { display: block; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.5rem; }
.pillar-tab .lbl { display: block; font-weight: 700; font-size: 1.05rem; letter-spacing: -0.02em; }
.pillar-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); }
.pillar-tab[aria-selected="true"] .band { color: rgb(255 255 255 / 0.8); }
.pillar-tab[aria-selected="true"] .lbl { color: var(--on-accent); }

.pillar-panel {
  background: transparent;
  border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 3rem);
}
.pillar-panel[hidden] { display: none; }
.pillar-panel h3 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
.pillar-sub { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 0.75rem; }
.pillar-focus { margin-top: 1.5rem; padding-left: 1.25rem; border-left: 2px solid var(--accent); font-weight: 600; }
.pillar-intro { max-width: 68ch; margin-bottom: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.pillar-intro .muted { margin-top: 1rem; }

/* Named problems — naming the failure is what makes the reader feel diagnosed */
.solves > div { padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
.solves > div:last-child { border-bottom: 0; }
.solves dt { font-weight: 700; font-size: 0.95rem; letter-spacing: -0.01em; }
.solves dd { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.92rem; }

@media (max-width: 760px) { .pillar-tabs { grid-template-columns: 1fr; } }

/* Sectors — experience, deliberately understated. Not a positioning device. */
.sector-wall { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.sector-wall span {
  padding: 0.7rem 1.35rem; border: 1px solid var(--line); border-radius: 999px;
  font-size: 0.9rem; color: var(--muted); transition: 0.25s var(--ease);
}
.sector-wall span:hover { border-color: var(--accent-soft); color: var(--fg); }

/* Honest qualification — good fit vs wrong fit */
.fit-grid .card { padding: 2rem; }
.fit-good { border-color: var(--accent-soft); }
.fit-bad { opacity: 0.82; }
.fit-bad .ticks li { color: var(--muted); }
.fit-bad .x { color: #b91c1c; font-weight: 700; flex: none; width: 1.15rem; text-align: center; margin-top: 0.1rem; }
.fit-grid h3 { margin-bottom: 1rem; }

/* ==========================================================================
   Process — numbered
   ========================================================================== */
.process { counter-reset: step; }
.process .card { position: relative; padding-top: 2.5rem; }
.process .card::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; top: 1.25rem; right: 1.75rem;
  font-size: 2.75rem; font-weight: 800; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1px var(--line);
}

/* ==========================================================================
   Stats band
   ========================================================================== */
.stats-band { border: 1px solid var(--line); border-radius: var(--radius); background: transparent; padding: clamp(2rem, 4vw, 3rem); text-align: center; }
.stats-band h3 { margin-bottom: 2.5rem; }
.stats-band .grid { gap: 2rem 1rem; }
.stats-band .num { font-size: clamp(2rem, 3.8vw, 2.75rem); font-weight: 800; color: var(--fg); letter-spacing: -0.03em; }
.stats-band .lbl { font-size: 0.82rem; color: var(--muted); }

/* ==========================================================================
   Portfolio
   ========================================================================== */
.work { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: transparent; transition: 0.3s var(--ease); transition-property: border-color, background; }
.work:hover { border-color: var(--accent-soft); background: var(--accent-wash); }
.work-thumb { aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative; overflow: hidden;
  background: var(--surface); }
.work-thumb span { font-size: clamp(2.5rem, 6vw, 3.5rem); font-weight: 800; color: var(--accent-ink); letter-spacing: -0.05em; }
.work-body { padding: 1.5rem; }
.work-body .niche { font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 0.5rem; }
.work-body h3 { font-size: 1.15rem; margin-bottom: 1rem; }

/* ==========================================================================
   Testimonials
   ========================================================================== */
.quote { display: flex; flex-direction: column; }
.stars { display: flex; gap: 0.2rem; color: var(--accent-ink); margin-bottom: 1.25rem; }
.stars svg { width: 1.05rem; height: 1.05rem; }
.quote blockquote { font-size: 1rem; color: var(--muted); line-height: 1.7; flex: 1; }
.quote figcaption { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.875rem; }
.quote figcaption b { display: block; color: var(--fg); }
.quote figcaption span { color: var(--muted); }

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; align-items: start; }
.contact-list li { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.contact-list .ic { width: 2.5rem; height: 2.5rem; flex: none; border-radius: var(--radius-sm); background: var(--accent-wash); color: var(--accent-ink); display: grid; place-items: center; }
.contact-list .ic svg { width: 1.15rem; height: 1.15rem; }
.contact-list .k { font-size: 0.78rem; color: var(--muted); }
.contact-list .v { font-weight: 600; font-size: 0.95rem; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 0.45rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.8rem 1rem; background: var(--bg); border: 1px solid var(--line-input);
  border-radius: var(--radius-sm); transition: border-color 0.2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 8rem; }
.form .btn { width: 100%; justify-content: center; margin-top: 0.5rem; }
.form-note { font-size: 0.78rem; color: var(--muted); margin-top: 1rem; text-align: center; }
.form-status { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: var(--radius-sm); font-size: 0.875rem; display: none; }
.form-status.ok { display: block; background: var(--accent-wash); color: var(--accent-ink); border: 1px solid var(--accent-soft); }
.form-status.err { display: block; background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; } }
@media (max-width: 520px) { .form .row { grid-template-columns: 1fr; } }

/* ==========================================================================
   CTA band + footer
   ========================================================================== */
.cta-band {
  text-align: center; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(2rem, 4vw, 3.5rem); position: relative; overflow: hidden;
  background: var(--surface); }
.cta-band > * { position: relative; }
.cta-band h2 { margin-bottom: 1rem; }
.cta-band .lead { margin: 0 auto 2rem; }

.site-footer { border-top: 1px solid var(--line); padding: 4rem 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 3rem; }
.site-footer h4 { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.25rem; font-weight: 700; }
.site-footer li { margin-bottom: 0.65rem; }
.site-footer li a { font-size: 0.9rem; color: var(--muted); transition: color 0.2s; }
.site-footer li a:hover { color: var(--accent); }
.socials { display: flex; gap: 0.65rem; margin-top: 1.5rem; }
.socials a { width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; transition: 0.25s var(--ease); }
.socials a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.socials svg { width: 1.05rem; height: 1.05rem; }
.footer-bottom { border-top: 1px solid var(--line); padding-top: 1.75rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: 0.82rem; color: var(--muted); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   Detail pages (services + case studies)
   ========================================================================== */
.page-hero { padding: clamp(3.5rem, 7vw, 5.5rem) 0 clamp(2.5rem, 5vw, 4rem); position: relative; overflow: hidden; }
.page-hero .container { position: relative; }
.crumb { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); margin-bottom: 1.5rem; transition: color 0.2s; }
.crumb:hover { color: var(--accent); }
.crumb svg { width: 1em; height: 1em; }
.page-meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-top: 1.5rem; font-size: 0.9rem; color: var(--muted); }

.metric { text-align: center; padding: 1.75rem 1rem; }
.metric .num { font-size: clamp(2rem, 3.8vw, 2.5rem); font-weight: 800; color: var(--accent-ink); letter-spacing: -0.03em; }
.metric .lbl { font-weight: 600; font-size: 0.95rem; margin-top: 0.35rem; }
.metric .sub { font-size: 0.8rem; color: var(--muted); margin-top: 0.25rem; }

.prose p { color: var(--muted); font-size: 1.05rem; line-height: 1.75; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 2rem; } }

.pullquote { border-left: 3px solid var(--accent); padding: 0.5rem 0 0.5rem 1.75rem; }
.pullquote p { font-size: clamp(1.1rem, 2vw, 1.4rem); line-height: 1.5; letter-spacing: -0.02em; color: var(--fg); font-weight: 500; }
.pullquote cite { display: block; margin-top: 1.25rem; font-style: normal; font-size: 0.875rem; color: var(--muted); }

/* Client logo wall */
.logo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.logo-wall div { background: var(--bg); aspect-ratio: 16 / 9; display: grid; place-items: center; padding: 1rem; text-align: center;
  font-weight: 700; font-size: 0.95rem; color: var(--muted); letter-spacing: -0.02em; transition: 0.25s var(--ease); }
.logo-wall div:hover { background: var(--surface); color: var(--accent); }

/* ==========================================================================
   Platform ecosystem — grouped capability matrix.
   Brand colour carries recognition; the mark itself stays our own icon set so
   the wall reads as one system rather than a jumble of pasted logos.
   ========================================================================== */
.stack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.stack-group { background: var(--bg); padding: var(--sp-4); }
.stack-head { display: flex; align-items: center; gap: 0.65rem; margin-bottom: var(--sp-3); padding-bottom: 0.85rem; border-bottom: 1px solid var(--line); }
.stack-head svg { width: 1.15rem; height: 1.15rem; color: var(--accent-ink); flex: none; }
.stack-head h3 { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800; color: var(--muted); }
.stack-tools { display: flex; flex-direction: column; gap: 0.7rem; }
.stack-tools li { display: flex; align-items: center; gap: 0.8rem; font-size: 0.94rem; font-weight: 500; }
.stack-tools .dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--c, var(--accent)); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--accent)) 15%, transparent); }
/* 18px was too small to read as a brand mark — a logo you can't recognise is
   worse than no logo. 28px sits in a tinted tile so light marks stay visible. */
.stack-tools .logo {
  width: 1.75rem; height: 1.75rem; flex: none;
  transition: transform 0.25s var(--ease);
}
.stack-tools li:hover .logo { transform: scale(1.1); }

/* ==========================================================================
   Gated case study — request form replaces the full narrative
   ========================================================================== */
.gate { max-width: 34rem; margin: 0 auto; text-align: left; }
.gate-card { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.75rem, 4vw, 2.5rem); background: var(--surface); }
.gate-card h3 { margin-bottom: 0.75rem; }
.gate-card > p { color: var(--muted); font-size: 0.95rem; margin-bottom: var(--sp-3); }
.gate-list { margin-bottom: var(--sp-3); }
.gate-note { font-size: 0.8rem; color: var(--muted); margin-top: 0.85rem; text-align: center; }
.locked { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0.85rem; border: 1px solid var(--accent-soft); background: var(--accent-wash); color: var(--accent-ink); border-radius: 999px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.locked svg { width: 0.9rem; height: 0.9rem; }

/* ==========================================================================
   Mobile readability. Body copy goes to 16px under 700px; the compact sizes
   above are fine on a desktop viewing distance, not in a hand.
   ========================================================================== */
@media (max-width: 700px) {
  .card p, .srv-d, .stack-tools li, .ticks li, .quote blockquote { font-size: 1rem; }
  .solves dd, .contact-list .v { font-size: 0.95rem; }
  .section-head { margin-bottom: var(--sp-5); }
  .hero h1 { margin-bottom: var(--sp-4); }
  .srv { padding: var(--sp-3) 0.25rem; }
}

/* ==========================================================================
   Layers — the three capability pillars, all visible. Replaces the tablist:
   hiding two-thirds behind tabs worked against showing breadth.
   ========================================================================== */
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.layer { padding: var(--sp-4) var(--sp-3); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.layer:first-child { padding-left: 0; }
.layer:last-child { border-right: 0; padding-right: 0; }
.layer-top { display: flex; align-items: baseline; gap: 0.75rem; margin-bottom: var(--sp-3); }
.layer-n { font-size: 0.8rem; font-weight: 800; color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.layer-kicker { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.layer h3 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin-bottom: 0.75rem; }
.layer-lead { font-weight: 700; font-size: 1.02rem; line-height: 1.35; letter-spacing: -0.02em; margin-bottom: 0.85rem; }
.layer-body { color: var(--muted); font-size: 0.94rem; line-height: 1.6; margin-bottom: var(--sp-3); }
.layer-svc { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: var(--sp-3); }
.layer-svc span { font-size: 0.75rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); }
.layer-sub { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 800; margin-bottom: 0.5rem; }

@media (max-width: 980px) {
  .layers { grid-template-columns: 1fr; }
  .layer { padding: var(--sp-4) 0; border-right: 0; }
  .layer:first-child { padding-top: var(--sp-4); }
  .layer:last-child { border-bottom: 0; }
}

/* ==========================================================================
   Client strip — real names, directly under the hero. The strongest proof
   currently available, so it sits where it is seen first.
   ========================================================================== */
.strip-section { padding: var(--sp-4) 0; border-block: 1px solid var(--line); background: var(--surface); }
.strip-label { font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: var(--sp-2); }
.strip { display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; align-items: center; }
.strip li { font-size: clamp(1rem, 1.6vw, 1.2rem); font-weight: 700; letter-spacing: -0.02em; color: var(--fg); }
@media (max-width: 700px) { .strip { gap: 0.5rem 1.25rem; } .strip li { font-size: 1rem; } }

/* ==========================================================================
   Hover depth — motion that answers the pointer, not decoration.
   ========================================================================== */
.layer { transition: background 0.3s var(--ease); }
.layer:hover { background: var(--accent-wash); }
.layer:hover .layer-n { color: var(--accent); }
.layer-n { transition: color 0.3s var(--ease); }

.stack-group { transition: background 0.3s var(--ease); }
.stack-group:hover { background: var(--accent-wash); }
.stack-tools li { transition: transform 0.25s var(--out); }
.stack-tools li:hover { transform: translateX(3px); }

.strip li { transition: color 0.25s var(--ease); cursor: default; }
.strip li:hover { color: var(--accent-ink); }

/* ==========================================================================
   Mobile scroll depth. Two sections were a third of the page on a phone:
   the layer columns (3 x 4 named problems) and the 29-row ecosystem list.
   ========================================================================== */
.layer-solves summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.4rem; }
.layer-solves summary::-webkit-details-marker { display: none; }
.layer-solves summary .layer-sub { margin-bottom: 0; }
.layer-solves summary::after {
  content: ""; width: 0.5rem; height: 0.5rem; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px);
  transition: transform 0.25s var(--ease); margin-left: auto;
}
.layer-solves[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
@media (min-width: 981px) {
  .layer-solves summary { pointer-events: none; }
  .layer-solves summary::after { display: none; }
}

@media (max-width: 980px) {
  /* Ecosystem: 29 stacked rows -> wrapped chips. Same information, a third
     of the height, and the logos still carry the recognition. */
  .stack-tools { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; }
  .stack-tools li {
    gap: 0.45rem; font-size: 0.85rem;
    padding: 0.35rem 0.7rem 0.35rem 0.4rem;
    border: 1px solid var(--line); border-radius: 999px;
  }
  .stack-tools .logo { width: 1.25rem; height: 1.25rem; }
  .stack-group { padding: var(--sp-3) var(--sp-2); }
  .stack-head { margin-bottom: var(--sp-2); padding-bottom: 0.6rem; }

  /* Layers: tighter body, and the collapsed problems above */
  .layer { padding: var(--sp-3) 0; }
  .layer-body { font-size: 0.92rem; margin-bottom: var(--sp-2); }
  .layer-svc { margin-bottom: var(--sp-2); }
  .solves > div { padding: 0.6rem 0; }

  /* Cards carry desktop padding on a 390px screen otherwise */
  .card { padding: var(--sp-3); }
  .section-head { margin-bottom: var(--sp-4); }
  .section { padding: clamp(2.5rem, 8vw, 3.25rem) 0; }

  /* Why-us: six identical stacked cards was the most repetitive stretch on
     a phone. Drop the box, keep the icon as a leading mark — reads as a list
     rather than six things to scroll past. */
  .offset-grid { gap: 0; }
  .offset-grid .card {
    border: 0; border-bottom: 1px solid var(--line); border-radius: 0;
    padding: var(--sp-3) 0; display: grid; grid-template-columns: 1.75rem 1fr;
    gap: 0 0.9rem; align-items: start;
  }
  .offset-grid .card:last-child { border-bottom: 0; }
  .offset-grid .card:hover { background: transparent; }
  .offset-grid .card-icon { margin-bottom: 0; grid-row: span 2; }
  .offset-grid .card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
  .offset-grid .card p { font-size: 0.94rem; }

  /* Service index: 12 rows, so every 10px of row padding is 120px of scroll */
  .srv { padding: 0.9rem 0.25rem; gap: 0.75rem; }
  .srv-d { font-size: 0.9rem; }
  .srv-t { font-size: 1.05rem; }
}

/* ==========================================================================
   Mobile action bar. Thumb-zone CTA, safe-area aware, 48px targets.
   Hidden entirely on desktop where the header CTA is always visible.
   ========================================================================== */
.actionbar {
  position: fixed; inset: auto 0 0 0; z-index: 55; display: none;
  gap: 0.6rem; padding: 0.6rem 1rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  background: rgb(255 255 255 / 0.94); backdrop-filter: blur(14px) saturate(180%);
  border-top: 1px solid var(--line);
  transform: translateY(110%); transition: transform 0.3s var(--out);
}
.ab-call, .ab-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  min-height: 48px; border-radius: 999px; font-weight: 700; font-size: 0.95rem;
}
.ab-call { flex: 0 0 auto; padding-inline: 1.1rem; border: 1px solid var(--line-input); color: var(--fg); }
.ab-call svg { width: 1.05rem; height: 1.05rem; }
.ab-cta { flex: 1; background: var(--accent); color: var(--on-accent); }
.ab-cta:active { background: var(--accent-ink); }

@media (max-width: 900px) {
  .actionbar { display: flex; }
  /* revealed once past the hero, withdrawn over the contact form */
  .ab-on .actionbar { transform: none; }
  .ab-on.ab-off .actionbar { transform: translateY(110%); }
  /* keep the footer clear of the bar */
  .ab-on .site-footer { padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .actionbar { transition: none; } }

/* ==========================================================================
   Field-level validation. A message under the offending input, not a single
   line at the foot of the form.
   ========================================================================== */
.field-err {
  display: flex; align-items: flex-start; gap: 0.35rem;
  margin-top: 0.4rem; font-size: 0.85rem; font-weight: 600; color: #b91c1c;
}
.field-err:empty { display: none; }
.field-err::before { content: "!"; flex: none; width: 1.05rem; height: 1.05rem; border-radius: 50%;
  background: #b91c1c; color: #fff; font-size: 0.7rem; line-height: 1.05rem; text-align: center; font-weight: 800; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: #b91c1c; }
.field.invalid input:focus, .field.invalid textarea:focus { outline-color: #b91c1c; }
button[aria-busy="true"] { opacity: 0.65; cursor: progress; }

/* ==========================================================================
   Mobile: peer sets scroll sideways instead of stacking. All content stays in
   the DOM and reachable by keyboard — this is a scroll container, not a JS
   carousel that hides slides. The peeking next card is the affordance.
   ========================================================================== */
@media (max-width: 980px) {
  .layers {
    display: flex; gap: 0; border-top: 1px solid var(--line);
    overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-padding-inline: 1.5rem; overscroll-behavior-x: contain;
    margin-inline: -1.5rem; padding-inline: 1.5rem;
    scrollbar-width: none;
  }
  .layers::-webkit-scrollbar { display: none; }
  .layer {
    flex: 0 0 86%; scroll-snap-align: start;
    padding: var(--sp-3) var(--sp-3) var(--sp-3) 0;
    border-right: 1px solid var(--line); border-bottom: 0;
  }
  .layer:last-child { border-right: 0; padding-right: 1.5rem; }
  .layer-solves[open] { padding-bottom: 0.25rem; }

  .stack-grid {
    display: flex; gap: 1px; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-padding-inline: 1.5rem; overscroll-behavior-x: contain;
    margin-inline: -1.5rem; padding-inline: 1.5rem; border-radius: 0;
    border-inline: 0; scrollbar-width: none;
  }
  .stack-grid::-webkit-scrollbar { display: none; }
  .stack-group { flex: 0 0 78%; scroll-snap-align: start; }

  /* "swipe" affordance, in case the peek is missed */
  .swipe-hint {
    display: flex; align-items: center; gap: 0.4rem; margin-top: var(--sp-2);
    font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--muted); font-weight: 700;
  }
  .swipe-hint::after { content: "→"; animation: nudge 1.8s var(--ease) infinite; }
  @keyframes nudge { 0%,100% { transform: translateX(0) } 50% { transform: translateX(4px) } }
}
@media (min-width: 981px) { .swipe-hint { display: none; } }
@media (prefers-reduced-motion: reduce) { .swipe-hint::after { animation: none; } }
