/* ============================================================================
   CAIRNSTYLE — cairn26.com landing page
   Hand-written stylesheet. "What if Apple made n8n — built on LangSmith's
   design language." Refined, premium, restrained. Hairlines, never shadows.
   ONE teal accent. Geist / Geist Mono / Fraunces / Newsreader.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   THEME TOKENS — 4-block pattern (CAIRNSTYLE "READ FIRST", non-negotiable)
   (1) light defaults · (2) @media dark · (3) [data-theme=dark] · (4) [data-theme=light]
   Block (4) defeats block (2) when OS=dark but the app toggle is LIGHT.
--------------------------------------------------------------------------- */

/* Block (1) — Light defaults */
:root {
  /* Chrome (the air) */
  --bg:            #F8F4EC;                 /* PAPER */
  --surface-1:     #F1F1EC;                 /* CREAM */
  --surface-2:     #ECE8DA;                 /* NEBULA */
  --ink:           #0A1224;                 /* GRAPHITE — never pure black */
  --ink-mid:       rgba(10, 18, 36, 0.74);
  --ink-muted:     rgba(10, 18, 36, 0.70);  /* SLATE */
  --ink-ghost:     rgba(10, 18, 36, 0.35);  /* placeholder / tertiary */

  /* Hairlines */
  --border-subtle: rgba(10, 18, 36, 0.06);
  --border:        rgba(10, 18, 36, 0.10);
  --border-strong: rgba(10, 18, 36, 0.16);

  /* Surface fills (opacity-stacked, never shadowed) */
  --fill-0:        rgba(10, 18, 36, 0.02);
  --fill-1:        rgba(10, 18, 36, 0.035);
  --fill-2:        rgba(10, 18, 36, 0.05);

  /* Brand */
  --teal:          #3BA6C9;
  --teal-hover:    #4FB3D9;
  --teal-bright:   #6fc6e4;                 /* brighter cyan — the intentional finale-showcase accent (SCRUM-11850) */
  --teal-ink:      #ffffff;                 /* text on a teal fill */
  --teal-border:   rgba(59, 166, 201, 0.30);
  --teal-wash:     rgba(59, 166, 201, 0.10);
  --teal-wash-hi:  rgba(59, 166, 201, 0.18);
  --green:         #B8D94A;                 /* APPLE GREEN — live/success only */

  /* Etching (faint mountain) */
  --ridge-1:       rgba(10, 18, 36, 0.06);
  --ridge-2:       rgba(10, 18, 36, 0.04);

  /* Motion */
  --ease:          cubic-bezier(0.16, 1, 0.3, 1);   /* ease-out-expo */

  /* Layout */
  --nav-h:         3.5rem;
  --maxw:          1120px;
  --shadow-modal:  0 1px 2px rgba(0, 0, 0, 0.04);

  color-scheme: light;
}

/* Dark theme — the only theme path (pages hardcode data-theme="dark"). The old
   OS-preference-dark media fallback was a redundant copy with identical values that
   data-theme="dark" already wins, so it was dropped (SCRUM-9000). */
[data-theme="dark"] {
  --bg:            #050508;
  --surface-1:     #0C0C18;
  --surface-2:     #141424;
  --ink:           rgba(255, 255, 255, 0.95);
  --ink-mid:       rgba(255, 255, 255, 0.74);
  --ink-muted:     rgba(255, 255, 255, 0.70);
  --ink-ghost:     rgba(255, 255, 255, 0.30);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border:        rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);

  --fill-0:        rgba(255, 255, 255, 0.02);
  --fill-1:        rgba(255, 255, 255, 0.04);
  --fill-2:        rgba(255, 255, 255, 0.06);

  --teal-ink:      #04141b;
  --teal-wash:     rgba(59, 166, 201, 0.14);
  --teal-wash-hi:  rgba(59, 166, 201, 0.24);

  --ridge-1:       rgba(255, 255, 255, 0.07);
  --ridge-2:       rgba(255, 255, 255, 0.045);

  --shadow-modal:  0 1px 2px rgba(0, 0, 0, 0.4);

  color-scheme: dark;
}

/* Block (4) — EXPLICIT LIGHT OVERRIDE (THE KILLER CELL: OS=dark + toggle=light) */
[data-theme="light"] {
  --bg:            #F8F4EC;
  --surface-1:     #F1F1EC;
  --surface-2:     #ECE8DA;
  --ink:           #0A1224;
  --ink-mid:       rgba(10, 18, 36, 0.74);
  --ink-muted:     rgba(10, 18, 36, 0.70);
  --ink-ghost:     rgba(10, 18, 36, 0.35);

  --border-subtle: rgba(10, 18, 36, 0.06);
  --border:        rgba(10, 18, 36, 0.10);
  --border-strong: rgba(10, 18, 36, 0.16);

  --fill-0:        rgba(10, 18, 36, 0.02);
  --fill-1:        rgba(10, 18, 36, 0.035);
  --fill-2:        rgba(10, 18, 36, 0.05);

  --teal-ink:      #ffffff;
  --teal-wash:     rgba(59, 166, 201, 0.10);
  --teal-wash-hi:  rgba(59, 166, 201, 0.18);

  --ridge-1:       rgba(10, 18, 36, 0.06);
  --ridge-2:       rgba(10, 18, 36, 0.04);

  --shadow-modal:  0 1px 2px rgba(0, 0, 0, 0.04);

  color-scheme: light;
}

/* ---------------------------------------------------------------------------
   SCALE TOKENS — one rhythm for the whole surface (design-polish pass).
   Spacing: 4px base rhythm. Type: one ladder (9→60), leading + caps-tracking
   tuned per step. Every component derives from these — no one-off values.
--------------------------------------------------------------------------- */
:root {
  /* Spacing — 4px rhythm (named by 4px multiples) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-7:  28px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-14: 56px;
  --sp-16: 64px;
  --sp-section: 88px;               /* section-block rhythm (4 × 22) */

  /* Type ladder — 9 · 10 · 11 · 12 · 13 · 14 · 15 · 16 · 17 · 18 · 19 · 20 · 22 · 26 (+ display clamps) */
  --fs-nano:    9px;                /* mock internals, tiny mono stats */
  --fs-micro:   10px;               /* microlabels, chips, mono caps */
  --fs-label:   11px;               /* nav links, step numbers */
  --fs-mono:    12px;               /* mono meta, inline links */
  --fs-caption: 13px;               /* captions, small prose */
  --fs-body-sm: 14px;               /* card body copy */
  --fs-body:    15px;               /* base body */
  --fs-body-lg: 16px;               /* ledes, emphasized prose, small titles */
  --fs-body-xl: 17px;               /* quotes, summaries */
  --fs-title:   18px;               /* sans card titles, serif accents */
  --fs-lede:    19px;               /* serif lede (brand signature) */
  --fs-head-sm: 20px;               /* Fraunces small card heading */
  --fs-head:    22px;               /* Fraunces card heading */
  --fs-head-lg: 26px;               /* Fraunces panel heading / stat figures */

  /* Leading — per size-band */
  --lh-display: 1.05;               /* display headlines */
  --lh-heading: 1.12;               /* h2 / panel headings */
  --lh-title:   1.25;               /* card titles */
  --lh-snug:    1.3;                /* multi-line labels */
  --lh-compact: 1.5;                /* dense card copy */
  --lh-body:    1.55;               /* default body */
  --lh-prose:   1.65;               /* long-form reading prose */

  /* Caps tracking — wider as type gets smaller */
  --ls-caps-wide: 0.2em;            /* 10px microlabel signature */
  --ls-caps:      0.16em;           /* 9-11px mono caps */
  --ls-caps-mid:  0.12em;           /* 11-12px nav / badges */
  --ls-caps-tight: 0.08em;          /* 12px+ caps, banner labels */
}

/* ---------------------------------------------------------------------------
   RESET
--------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", -apple-system, sans-serif;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  letter-spacing: -0.005em;
  font-feature-settings: "cv11" "ss01" "ss03";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 240ms var(--ease), color 240ms var(--ease);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip-to-content link (WCAG 2.4.1) — off-screen until keyboard-focused */
.skip-link {
  position: absolute;
  left: 8px;
  top: -48px;
  z-index: 1000;
  padding: 10px 16px;
  background: var(--teal);
  color: #0A1224;
  font-weight: 600;
  border-radius: 0 0 6px 6px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }

/* ---------------------------------------------------------------------------
   TYPE HELPERS
--------------------------------------------------------------------------- */
.microlabel {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-micro);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: var(--ls-caps-wide);
  color: var(--ink-muted);
}

.display {
  font-family: "Fraunces", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: var(--lh-display);
  color: var(--ink);
  font-variation-settings: "opsz" 144;
}


.mono { font-family: "Geist Mono", monospace; }

/* ---------------------------------------------------------------------------
   LAYOUT
--------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-8); }
@media (max-width: 640px) { .wrap { padding-inline: var(--sp-5); } }

section { padding-block: var(--sp-section); position: relative; scroll-margin-top: calc(var(--nav-h) + 8px); }
@media (max-width: 768px) { section { padding-block: var(--sp-16); } }

/* SCRUM-8130 / SCRUM-9033 — the hero→first-section seam carries the hero's own
   closing padding; trim the double-stack so the page opens without a dead zone.
   9033 trims one further notch (sp-16→sp-10) to close the empty band that reads
   as dead space in dark mode, where the etching is near-invisible. */
.hero + section { padding-top: var(--sp-10); }

/* SCRUM-12164 ask F ("please mind the gap"): the #offering(process)→#outcomes seam
   carried the full 2×88px section rhythm (~189px measured), an oversized dead band above
   OUTCOMES. Trim BOTH sides of this specific seam (the two are thematically linked and now
   adjacent). Other inter-section rhythm is unchanged. */
#offering { padding-bottom: var(--sp-12); }
#outcomes { padding-top: var(--sp-12); }

/* SCRUM-8130 — alternating section bands (the .integrate precedent): the long
   scroll gets structural rhythm; hairline cards pop against the band. */
#results, #why { background: var(--surface-1); border-block: 1px solid var(--border-subtle); }

::selection { background: var(--teal-wash-hi); }

/* SCRUM-9037 — section heads/ledes span the container content width (was 720/620px ≈ half of --maxw, leaving the right half empty); gutters preserved by .wrap. */
.section-head { max-width: none; margin-bottom: var(--sp-12); }
.section-head .microlabel { display: block; margin-bottom: var(--sp-4); }
.section-head h2 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}
.section-head p { margin-top: var(--sp-4); color: var(--ink-muted); font-size: var(--fs-body-lg); max-width: none; }


/* ---------------------------------------------------------------------------
   NAV
--------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__inner {
  height: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--sp-8);
  display: flex; align-items: center; gap: var(--sp-6);
}
@media (max-width: 640px) { .nav__inner { padding-inline: var(--sp-5); } }

.brand { display: inline-flex; align-items: center; gap: var(--sp-2); }
.brand__pill {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--fill-0);
  transition: border-color 150ms var(--ease);
}
.brand:hover .brand__pill { border-color: var(--teal-border); }
.brand__pill { padding: 3px; }
.brand__pill img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
[data-theme="dark"] .brand__pill img,
:root:not([data-theme="light"]) .brand__pill img { mix-blend-mode: normal; }
.brand__word {
  font-weight: 700;
  font-size: var(--fs-body);
  letter-spacing: -0.02em;
  color: var(--ink);
}

.nav__links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav__actions { display: flex; align-items: center; gap: var(--sp-2); margin-left: auto; }
.nav__links + .nav__actions { margin-left: 0; }
.nav__cta { padding: 8px 16px; }
.nav__link {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-label);
  letter-spacing: var(--ls-caps-mid);
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 8px 12px;
  border-radius: 8px;
  transition: color 150ms var(--ease), background 150ms var(--ease);
}
.nav__link:hover { color: var(--ink); background: var(--fill-1); }

.icon-btn {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: transparent;
  color: var(--ink-muted);
  transition: color 150ms var(--ease), border-color 150ms var(--ease), background 150ms var(--ease);
}
.icon-btn:hover { color: var(--teal); border-color: var(--teal-border); }
.icon-btn svg { width: 18px; height: 18px; }

/* Mobile menu */
.nav__burger { display: none; }
.nav__mobile { display: none; }
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__burger { display: grid; }
  .nav__mobile {
    display: block;
    position: fixed; inset: var(--nav-h) 0 auto 0; z-index: 49;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity 200ms var(--ease), transform 200ms var(--ease);
  }
  .nav__mobile.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav__mobile a {
    display: block;
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    font-family: "Geist Mono", monospace;
    font-size: var(--fs-mono);
    letter-spacing: var(--ls-caps-mid);
    text-transform: uppercase;
    color: var(--ink-muted);
  }
  .nav__mobile a:hover { color: var(--ink); }
  .nav__mobile a:first-child { border-top: 0; }
}

/* ---------------------------------------------------------------------------
   BUTTONS
--------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: var(--fs-body-sm); font-weight: 600;
  padding: var(--sp-3) var(--sp-5);
  border-radius: 8px;
  border: 1px solid transparent;
  letter-spacing: -0.005em;
  transition: background 150ms var(--ease), border-color 150ms var(--ease),
              color 150ms var(--ease), transform 150ms var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--teal); color: var(--teal-ink); }
.btn--primary:hover { background: var(--teal-hover); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--border-strong); background: var(--fill-1); }

.btn--secondary {
  background: var(--teal-wash);
  color: var(--teal);
  border-color: var(--teal-border);
}
.btn--secondary:hover { background: var(--teal-wash-hi); }

.btn svg { width: 16px; height: 16px; }

/* ---------------------------------------------------------------------------
   HERO
--------------------------------------------------------------------------- */
.hero { padding-top: var(--sp-16); padding-bottom: var(--sp-8); overflow: hidden; } /* pb sp-12→sp-8 SCRUM-9033: tighten hero→outcomes seam */
.hero__inner { max-width: 880px; }

.hero__eyebrow { display: block; margin-bottom: var(--sp-6); }

.hero h1 {
  font-family: "Fraunces", serif;
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 60px);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
  color: var(--ink);
  max-width: none;
  white-space: nowrap;
  font-variation-settings: "opsz" 144;
}

.hero__sub {
  margin-top: var(--sp-6);
  font-family: "Newsreader", serif;
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: var(--lh-body);
  color: var(--ink-mid);
  max-width: 62ch;
  letter-spacing: -0.005em;
}

/* SCRUM-11811 — the hero sub is overlay-authored (Cairn editor) as a single block
   with its paragraphs separated by single <br>, which renders too tight and gave
   James "no subtle options" in the editor. Add restrained vertical rhythm between
   the <br>-separated runs, and a little extra around the bold serif pull-line
   (.ws-l) so it reads as a break rather than another line of body copy. Scale
   values only — no change to size, weight, colour or copy. */
.hero__sub br { display: block; margin-top: var(--sp-4); }
.hero__sub .ws-l { display: inline-block; margin-top: var(--sp-2); }

.hero__cta { margin-top: var(--sp-8); display: flex; gap: var(--sp-3); flex-wrap: wrap; }

/* SCRUM-12164 ask F: the hero trust strip (.hero__trust/.trust-row) was deleted; its CSS is removed here to keep the dead-CSS ratchet green. */

/* hero: large brand mark beside the copy (CAIRNSTYLE §2.6 cinematic watercolour) */
.hero > .wrap { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(24px, 4vw, 72px); row-gap: 0; }
.hero__art { display: flex; justify-content: flex-end; align-items: center; }
.hero__art img { width: clamp(240px, 32vw, 460px); height: auto; mix-blend-mode: multiply; }
[data-theme="dark"] .hero__art img,
:root:not([data-theme="light"]) .hero__art img { mix-blend-mode: normal; }
@media (max-width: 900px) {
  .hero > .wrap { grid-template-columns: 1fr; }
  .hero__art { display: none; }
}
@media (max-width: 760px) {
  .hero h1 { white-space: normal; font-size: clamp(32px, 9vw, 48px); }
}

/* faint mountain etching — ambient brand watermark (CAIRNSTYLE §9.7) */
.etching {
  position: absolute; bottom: 0; left: 0; right: 0;
  width: 100%; height: 200px;
  pointer-events: none; z-index: 0;
  mask-image: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
}
.etching svg { width: 100%; height: 100%; }
.etching .ridge { fill: none; stroke-width: 1; stroke-linejoin: round; stroke-linecap: round; }
.etching .ridge-1 { stroke: var(--ridge-1); }
.etching .ridge-2 { stroke: var(--ridge-2); }

/* live pulse (APPLE GREEN — live/success semantic) */
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 999px;
  background: var(--green); animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.82); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }


/* ---------------------------------------------------------------------------
   FINAL CTA
--------------------------------------------------------------------------- */
.final { text-align: center; overflow: hidden; }
.final .wrap { max-width: 720px; }
.final h2 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: clamp(30px, 4.6vw, 48px); line-height: var(--lh-display); letter-spacing: -0.02em;
  max-width: 18ch; margin: 16px auto 0;
}
.final p { margin: 18px auto 32px; color: var(--ink-muted); font-size: var(--fs-body-xl); max-width: 52ch; }

/* ---------------------------------------------------------------------------
   FOOTER
--------------------------------------------------------------------------- */
.footer { border-top: 1px solid var(--border-subtle); padding-block: var(--sp-14); }
.footer__grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--sp-10);
}
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); } }
@media (max-width: 460px) { .footer__grid { grid-template-columns: 1fr; } }

.footer__brand .brand { margin-bottom: var(--sp-4); }
.footer__tag { font-size: var(--fs-body-sm); color: var(--ink-muted); max-width: 38ch; line-height: var(--lh-body); }
.footer__col h3 {
  font-family: "Geist Mono", monospace; font-size: var(--fs-micro); font-weight: 700;
  text-transform: uppercase; letter-spacing: var(--ls-caps-wide); color: var(--ink-ghost);
  margin-bottom: var(--sp-4);
  padding-top: var(--sp-3);          /* optically aligns with the 32px brand pill row */
}
.footer__col a {
  display: block; font-size: var(--fs-body-sm); color: var(--ink-muted);
  padding: var(--sp-1) 0; transition: color 150ms var(--ease);
}
.footer__col a:hover { color: var(--teal); }
.footer__bottom {
  margin-top: var(--sp-10); padding-top: var(--sp-6); border-top: 1px solid var(--border-subtle);
  display: flex; justify-content: space-between; align-items: center; gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--fs-caption); color: var(--ink-ghost);
}

/* ===========================================================================
   FEATURE SHOWCASE — alternating image / text rows (id="features")
   Image side is a CSS/HTML product mock in CAIRNSTYLE (no screenshots).
   =========================================================================== */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.feature-row + .feature-row { margin-top: clamp(48px, 7vw, 88px); }
.feature-row.reverse .feature-row__mock { order: 2; }
@media (max-width: 860px) {
  .feature-row { grid-template-columns: 1fr; gap: 32px; }
  .feature-row.reverse .feature-row__mock { order: 0; }
}

.feature-row__copy .microlabel { display: block; margin-bottom: 16px; }
.feature-row__copy h3 {
  font-family: "Fraunces", serif; font-weight: 600;
  font-size: clamp(24px, 3vw, 32px); line-height: var(--lh-heading); letter-spacing: -0.02em;
  color: var(--ink);
}
.feature-row__copy p {
  margin-top: 16px; font-family: "Newsreader", serif; font-size: var(--fs-title);
  line-height: var(--lh-body); color: var(--ink-mid); max-width: 52ch;
}
.feature-row__copy .feature-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }

/* shared mock chrome — a hairline product surface */

/* --- Mock A: four-primitive canvas (SOURCE → ACTION → DECIDE → OUTPUT) --- */
/* dotted connector between nodes (design-time wire, §7.10) */

/* --- Mock B: Fleet one-pane-of-glass --- */

/* --- Mock C: eval / feedback loop --- */

/* ===========================================================================
   PROCESS — numbered steps strip (id="process")
   =========================================================================== */
.steps {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border-subtle);
  border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden;
}
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: var(--bg); padding: var(--sp-7) var(--sp-6);
  position: relative; transition: background 200ms var(--ease);
}
.step:hover { background: var(--fill-0); }
.step__num {
  font-family: "Geist Mono", monospace; font-size: var(--fs-label); font-weight: 700;
  letter-spacing: var(--ls-caps); color: var(--teal); margin-bottom: var(--sp-4);
}
.step h3 { font-size: var(--fs-body-lg); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.step p { font-size: var(--fs-caption); line-height: var(--lh-body); color: var(--ink-muted); }


/* ---------------------------------------------------------------------------
   LOAD ANIMATION — one orchestrated reveal, staggered
--------------------------------------------------------------------------- */
/* Progressive enhancement: content is visible by default. Only when JS adds
   `.js-anim` to <html> do reveals start hidden and animate in. This keeps the
   page fully visible without JS, for crawlers, and in static screenshots. */
.js-anim .reveal { opacity: 0; transform: translateY(12px) scale(0.985); }
.js-anim .reveal.in {
  opacity: 1; transform: none;
  transition: opacity 620ms var(--ease), transform 620ms var(--ease);
}
/* hero stagger via inline transition-delay set in markup classes */
.d1 { transition-delay: 40ms; }
.d2 { transition-delay: 100ms; }
.d3 { transition-delay: 160ms; }
.d4 { transition-delay: 220ms; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
}

/* ===========================================================================
   CAIRN:FORGE — flagship showcase (SCRUM-4869)
   "Forge a specialist. Command a crew." Augmentation, never replacement.
   Same token language: hairlines never shadows, ONE teal accent, apple-green
   for live/success only, theme-aware via CSS vars. Alive: loadout snaps in,
   stat bars draw, numbers count up on scroll (JS progressive enhancement).
   =========================================================================== */
#forge { background: var(--surface-1); border-block: 1px solid var(--border-subtle); }


/* --- the character sheet (a CAIRNSTYLE product mock) --- */

/* identity: procedural crest + name + role + purpose */

/* shared block divider inside the sheet */

/* loadout slots — capabilities snap into these */

/* mind selector — Fast / Balanced / Frontier segmented control */

/* character-sheet stats — cairnstyle mini bars */

/* --- the three felt steps (right column) --- */

/* augmentation closing line */

/* ===========================================================================
   SCRUM-7633 — Consultancy site restructure (Hero / Offering / Results /
   How-we-deliver / Why / Challenge). New components reuse the existing
   design tokens + the signature hairline-grid aesthetic. No new colours.
   =========================================================================== */

/* hero kicker + section lede */
.hero__kicker {
  margin-top: var(--sp-4); font-family: "Newsreader", serif; font-style: italic;
  font-size: clamp(18px, 2.4vw, 22px); color: var(--teal-strong);
}
.section-lede {
  margin-top: var(--sp-4); max-width: none; font-size: var(--fs-body-lg); line-height: var(--lh-body);
  color: var(--ink-muted);
}
.section-lede em { font-style: italic; color: var(--ink-mid); }

/* 3-up hairline card grid (Offering + Results) */
.cards3 {
  margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--border-subtle);
  border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden;
}
@media (max-width: 880px) { .cards3 { grid-template-columns: 1fr; max-width: 480px; margin-inline: auto; } }

/* Offering cards */
.offer { background: var(--bg); padding: 30px 26px 32px; transition: background 200ms var(--ease); }
.offer:hover { background: var(--fill-0); }
.offer__ask {
  display: block; font-family: "Geist Mono", monospace; font-size: var(--fs-mono);
  letter-spacing: 0.02em; color: var(--teal-strong); margin-bottom: 14px;
}
.offer h3 { font-family: "Fraunces", serif; font-size: var(--fs-head-lg); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.offer__what { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-mid); margin-bottom: 12px; }


/* SCRUM-11812 — the "How Cairn26 is different" comparison table was replaced by two
   body paragraphs (James's ruling), so its .compare* rules are removed here rather
   than left as dead CSS. */

/* Challenge — chips + 3-step + CTA */
#challenge .steps { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { #challenge .steps { grid-template-columns: 1fr; } }
.challenge__loop {
  max-width: 60ch; margin: 0 auto var(--sp-6); font-family: "Newsreader", serif; font-style: italic;
  font-size: clamp(19px, 2.6vw, 24px); line-height: var(--lh-compact); color: var(--ink-mid);
}
/* SCRUM-8463 — James: footnote under the Challenge CTA ("the small print") */
/* SCRUM-8496 — James: widened so the small print wraps to 2 lines, not 3. */
.challenge__footnote { max-width: 88ch; margin: var(--sp-6) auto 0; text-align: center; font-size: var(--fs-caption); line-height: var(--lh-body); color: var(--ink-ghost); }
.challenge-showcase .challenge__footnote { color: rgba(255, 255, 255, 0.5); }

/* SCRUM-7633 — readable teal-coloured INK for accent TEXT on the light paper
   surface. NB the existing --teal-ink is #fff ("text on a teal fill") — using it
   as text colour on paper renders white-on-cream (the James light-mode contrast
   bug). --teal-strong is a deep teal readable on paper; light teal on dark. */
:root { --teal-strong: #15697f; }
[data-theme="dark"]  { --teal-strong: #5fbedd; }
[data-theme="light"] { --teal-strong: #15697f; }

/* ===========================================================================
   SCRUM-7633 — James website pass (changes #2/#3/#6 + comprehensive AA contrast)
   =========================================================================== */

/* #6 — "The Cairn26 Challenge" finale: a distinctive always-dark showcase panel */
.challenge-showcase {
  margin-top: var(--sp-2); padding: var(--sp-14) var(--sp-12); border-radius: 22px;
  /* fixed theme-independent graphite — the showcase is always dark; do NOT swap for
     var(--ink), which flips to near-white in the dark theme the site runs (SCRUM-11850). */
  background: #0A1224; border: 1px solid rgba(59, 166, 201, 0.38);
  box-shadow: 0 24px 70px rgba(10, 18, 36, 0.16); text-align: center; overflow: hidden;
}
@media (max-width: 640px) { .challenge-showcase { padding: var(--sp-12) var(--sp-5); } }
.challenge-showcase__logo { width: 96px; height: 96px; margin: 0 auto var(--sp-6); }
.challenge-showcase__title {
  font-family: "Fraunces", serif; font-weight: 600; letter-spacing: -0.02em; line-height: var(--lh-display);
  font-size: clamp(30px, 5vw, 48px); color: #ffffff;
}
.challenge-showcase__tag {
  margin-top: var(--sp-3); font-family: "Newsreader", serif; font-style: italic;
  font-size: clamp(19px, 2.6vw, 24px); color: var(--teal-bright);
}
.challenge-showcase .steps { margin-top: var(--sp-8); background: transparent; border: none; border-radius: 0; }
.challenge-showcase .step { background: transparent; }
.challenge-showcase .step h3 { color: #ffffff; }
.challenge-showcase .step p { color: rgba(255, 255, 255, 0.74); }
.challenge-showcase .step__num { color: var(--teal-bright); }
.challenge-showcase .challenge__loop { color: rgba(255, 255, 255, 0.88); margin-top: var(--sp-8); }
.challenge-showcase .hero__cta { justify-content: center; margin-top: var(--sp-8); }
.challenge-showcase .btn--ghost { color: #ffffff; border-color: rgba(255, 255, 255, 0.30); }

/* Comprehensive AA contrast (James standing directive — no more whack-a-mole) */
.btn--primary { color: #0A1224; }                 /* graphite on bright teal (~6.8:1) — was #fff/2.8:1 */
.challenge-showcase .btn--primary { color: #0A1224; }
.legal a.btn--primary { color: #0A1224; text-decoration: none; }   /* 404 CTA: .legal a would else force teal-on-teal (1.32:1) */
.footer__col h3 { color: var(--ink-mid); }         /* was --ink-ghost (2.24:1) */
.footer__bottom { color: var(--ink-mid); }
.footer__bottom .mono { color: var(--ink-mid); }

/* ===========================================================================
   SCRUM-7633 — James live-edit round (results 2-col intro + animated stat box,
   proof lede, offer use-case + closing paragraph)
   =========================================================================== */
/* SCRUM-9037: section heads/ledes span full width via the SHARED .section-head rule
   (was patched per-section here — James UAT 2026-07-29 — now handled at the base). */

/* proof lede above the 3 case cards */

/* offer "Use case:" line + section closing paragraph */
.offer__usecase { font-size: var(--fs-caption); line-height: var(--lh-body); color: var(--ink-muted); padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.offer__usecase-lbl { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); font-weight: 700; letter-spacing: var(--ls-caps-tight); text-transform: uppercase; color: var(--teal-strong); }
.offer__closing { margin-top: var(--sp-10); max-width: 78ch; font-size: var(--fs-body-lg); line-height: var(--lh-prose); color: var(--ink-mid); }

/* SCRUM-8130 (Craig) — long intro/closing paragraphs fill the section width as
   balanced two-column text instead of leaving a dead right margin. */
@media (min-width: 880px) {
  #offering-hidden-what-we-do .section-head { max-width: none; }
  #offering-hidden-what-we-do .section-head .section-lede { max-width: none; columns: 2; column-gap: 48px; }
  .offer__closing { max-width: none; }
}

/* SCRUM-9037 — .results__intro / #why section ledes previously widened per-section
   (SCRUM-8496); now covered by the shared .section-head / .section-lede base rule. */

/* SCRUM-7633 James live edits round 2 — challenge body paras + bottom pills, prominent offer questions */
.challenge-showcase__body {
  max-width: 60ch; margin: var(--sp-4) auto 0; font-size: var(--fs-body-lg); line-height: var(--lh-body); color: rgba(255, 255, 255, 0.82);
}
.challenge-showcase__body + .challenge-showcase__body { margin-top: var(--sp-3); }

/* make the 3 "Can you…?" question eyebrows read as confident questions (not tiny mono labels) */
.offer__ask {
  font-family: "Geist", -apple-system, sans-serif; font-size: var(--fs-body-xl); font-weight: 500;
  letter-spacing: -0.005em; text-transform: none; color: var(--teal-strong); margin-bottom: 12px;
}

/* SCRUM-7633 — legal pages (/privacy, /terms), CAIRNSTYLE prose */
.legal { padding-block: var(--sp-16) var(--sp-section); }
.legal .wrap { max-width: 760px; }
.legal h1 { font-family: "Fraunces", serif; font-size: clamp(32px, 5vw, 44px); font-weight: 600; letter-spacing: -0.02em; margin: var(--sp-2) 0 var(--sp-1); }
.legal h2 { font-family: "Geist", -apple-system, sans-serif; font-size: var(--fs-title); font-weight: 600; letter-spacing: -0.01em; margin: var(--sp-8) 0 var(--sp-2); color: var(--ink); }
.legal p { font-size: var(--fs-body-lg); line-height: var(--lh-prose); color: var(--ink-mid); }
.legal p + p { margin-top: var(--sp-3); }
.legal a { color: var(--teal-strong); text-decoration: underline; text-underline-offset: 2px; }
.legal__meta { font-family: "Geist Mono", monospace; font-size: var(--fs-mono); color: var(--ink-muted); margin-bottom: var(--sp-6); }
.footer__legal a { color: var(--ink-muted); }
.footer__legal a:hover { color: var(--ink); text-decoration: underline; }

/* ---------------------------------------------------------------------------
   SCRUM-8088 / 8090 / 8091 — hero accents · outcomes grid · proof rows
--------------------------------------------------------------------------- */
/* Hero: promise subline (the "ai" wordplay accent was retired with the H1 copy
   change to "Embedded Intelligence" — SCRUM-11385) */
.hero__promise {
  margin-top: var(--sp-4); font-family: "Geist", sans-serif; font-weight: 600;
  font-size: clamp(18px, 2.3vw, 24px); letter-spacing: -0.01em; color: var(--ink);
  /* SCRUM-11385: one line while it fits, exactly three lines below the
     breakpoint — never a 2+1 wrap and never a mid-clause break (was
     text-wrap:balance, which balanced the line straight through "Improve
     Margin."). Breakpoint measured, not guessed — see the sweep in the PR. */
  white-space: nowrap;
}
.hero__clause { white-space: nowrap; }
/* 760px = the SAME breakpoint .hero h1 reflows at (measured safe: the one-line
   promise fits with margin at 760, and above), so the whole hero reflows as one
   unit. Below it, each clause is its own line = exactly three, never 2+1. */
@media (max-width: 760px) {
  .hero__promise { white-space: normal; }
  .hero__clause  { display: block; }
}

/* ---------------------------------------------------------------------------
   SCRUM-8345 — edit-mode v2.2 rich-format classes (allowlisted, persisted).
   These render the inline formatting the edit toolbar emits (bold/em are native
   tags). Font-family / colour / highlight are CLASS-based (never inline styles)
   so the server + client sanitiser is a pure class-allowlist. Values are the
   CAIRNSTYLE prescribed fonts (§3.1) + brand colours (§2.2) ONLY — no arbitrary
   colour-calls (Commandment: "never invent new accent colours"). Theme-aware via
   the existing tokens so persisted colour reads on both paper + void.
--------------------------------------------------------------------------- */
/* Font family */
.ff-sans    { font-family: "Geist", -apple-system, sans-serif; }
.ff-mono    { font-family: "Geist Mono", ui-monospace, monospace; }
.ff-serif   { font-family: "Newsreader", serif; }
.ff-display { font-family: "Fraunces", serif; }
/* Text colour — brand allowlist, theme-aware */
.fc-ink   { color: var(--ink); }
.fc-teal  { color: var(--teal-strong, var(--teal)); }
.fc-green { color: var(--green); }
.fc-slate { color: var(--ink-muted); }
/* Highlight — muted brand tint, text stays inherit (CAIRNSTYLE: no saturated blocks) */
mark.hl-teal, mark.hl-green, mark.hl-amber {
  background-color: transparent; color: inherit;
  padding: 0 0.12em; border-radius: 3px;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
mark.hl-teal  { background-color: rgba(59, 166, 201, 0.18); }
mark.hl-green { background-color: rgba(184, 217, 74, 0.24); }
mark.hl-amber { background-color: rgba(251, 191, 36, 0.20); }
/* SCRUM-8447 — per-selection word size. em-relative (not px) so it scales correctly
   whichever box it's used inside (a heading vs a small paragraph): the multiplier is
   against the SURROUNDING text's own size, not an absolute value. */
span.ws-s  { font-size: 0.75em; }
span.ws-l  { font-size: 1.35em; }
span.ws-xl { font-size: 1.75em; }

/* Outcomes — 4-up hairline card grid */
.outcomes {
  margin-top: var(--sp-10); display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border-subtle);
  border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden;
}
@media (max-width: 900px) { .outcomes { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .outcomes { grid-template-columns: 1fr; } }
.outcome { background: var(--bg); padding: var(--sp-8) var(--sp-6); transition: background 200ms var(--ease); }
.outcome:hover { background: var(--fill-0); }
.outcome__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 200px; height: 200px; border-radius: 34px;
  background: var(--teal-wash); border: 1px solid var(--teal-border);
  color: var(--teal-strong); margin-bottom: var(--sp-6);
}
.outcome__icon svg { width: 116px; height: 116px; display: block; }
/* min-height reserves two title lines so titles AND bodies row-align across the 4 cards (SCRUM-8254) */
.outcome h3 { font-family: "Fraunces", serif; font-size: var(--fs-head-sm); font-weight: 600; letter-spacing: -0.01em; line-height: var(--lh-title); min-height: 50px; margin-bottom: var(--sp-2); color: var(--ink); }
.outcome p { font-size: var(--fs-body-sm); line-height: var(--lh-body); color: var(--ink-muted); }

/* Proof — problem/result rows: each card carries its OWN stat banner + an
   icon/link aside in the right column (SCRUM-8341 — the combined banner + the
   right-rail numbers are retired; per-case banners read clearer). */
.proof-rows { display: flex; flex-direction: column; gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; }
.proof-row { background: var(--bg); padding: var(--sp-8); display: grid; grid-template-columns: 1fr 250px; gap: var(--sp-8); align-items: stretch; transition: background 200ms var(--ease); }
.proof-row:hover { background: var(--fill-0); }
/* minmax(0,1fr) not 1fr: 1fr = minmax(auto,1fr), and .proof-row__aside's min-content
   inflated the single-column track past a ≤460px viewport -> the whole card clipped by
   .proof-rows overflow-x:hidden (SCRUM-9585). minmax(0,…) lets the track shrink to fit. */
@media (max-width: 820px) { .proof-row { grid-template-columns: minmax(0, 1fr); gap: 22px; } }
/* SCRUM-8465 — James: "results section needs rebalancing". Rows with a shorter
   problem/result copy (fewer paragraphs) than their siblings left slack pinned to
   the BOTTOM of .proof-row__main only, while .proof-row__aside (bottom-anchored
   link via margin-top:auto) filled the row evenly — reading as lopsided. Centring
   main's own content vertically within its stretched cell splits any slack evenly
   above+below instead of dumping it under the text. */
.proof-row__main { display: flex; flex-direction: column; justify-content: center; }
@media (max-width: 820px) { .proof-row__main { justify-content: flex-start; } }
.proof-row__main h3 { font-family: "Fraunces", serif; font-size: var(--fs-head); font-weight: 600; letter-spacing: -0.01em; color: var(--ink); margin-bottom: var(--sp-3); text-wrap: balance; }
.proof-row__problem { font-size: var(--fs-body-sm); line-height: var(--lh-body); color: var(--ink-muted); margin-bottom: var(--sp-2); }
/* SCRUM-8341 — per-case stat banner inside each card (its value / delivery / investment) */
.proof-row__banner {
  margin-top: var(--sp-6); display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--teal-border); border: 1px solid var(--teal-border);
  border-radius: 12px; overflow: hidden;
}
@media (max-width: 480px) { .proof-row__banner { grid-template-columns: 1fr; } }
.proof-row__banner div { background: var(--teal-wash); padding: var(--sp-4); text-align: center; display: flex; flex-direction: column; gap: var(--sp-1); }
.proof-row__banner dd { font-family: "Fraunces", serif; font-size: clamp(22px, 3vw, 28px); font-weight: 600; line-height: 1; letter-spacing: -0.02em; color: var(--teal-strong); }
.proof-row__banner dt { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); font-weight: 700; letter-spacing: var(--ls-caps-tight); text-transform: uppercase; color: var(--ink-muted); }
/* SCRUM-8341 — the freed right column: outcome icons + case-study link */
/* design-polish: the 250px rail reads as ONE centred axis — title, badges and
   link all align to the same centreline instead of a ragged left edge. */
.proof-row__aside { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4); padding-left: var(--sp-8); border-left: 1px solid var(--border-subtle); }
/* flex-wrap so the nowrap "Read the case study" link drops below the badges instead of
   overflowing the row on a phone (≤~520px); the tablet row (520-820) still fits, no wrap. SCRUM-9585 */
@media (max-width: 820px) { .proof-row__aside { padding-left: 0; padding-top: var(--sp-5); border-left: 0; border-top: 1px solid var(--border-subtle); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; text-align: left; } }
/* SCRUM-8367 — the read link sits at the BOTTOM of the freed column (aside stretches to
   the card's full height; margin-top:auto pushes the link down under the icons). */
.proof-row__link { display: inline-flex; font-family: "Geist Mono", monospace; font-size: var(--fs-mono); font-weight: 700; letter-spacing: 0.02em; color: var(--teal-strong); white-space: nowrap; transition: color 150ms var(--ease); margin-top: auto; }
.proof-row__link:hover { color: var(--teal-hover); }
@media (max-width: 820px) { .proof-row__link { margin-top: 0; } }
/* SCRUM-8254 — outcome icon badges (icons only, no words); SCRUM-8367 — enlarged;
   James UAT 2026-07-30 — stacked vertically, much larger, titled "Delivered Benefits". */
.proof-row__badges-title { font-family: "Geist Mono", monospace; font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--ls-caps-tight); text-transform: uppercase; color: var(--ink-muted); }
.proof-row__badges { display: flex; flex-direction: column; gap: var(--sp-5); }
.proof-row__badge-item { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); }
.proof-row__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 140px; height: 140px; border-radius: 28px;
  background: var(--teal-wash); border: 1px solid var(--teal-border);
  color: var(--teal-strong);
}
.proof-row__badge svg { width: 80px; height: 80px; display: block; }
/* SCRUM-8496 — James: one-word styled label under each outcome badge. */
.proof-row__badge-label { font-family: "Geist Mono", monospace; font-size: var(--fs-mono); font-weight: 700; letter-spacing: var(--ls-caps-tight); text-transform: uppercase; color: var(--teal-strong); }
@media (max-width: 820px) { .proof-row__badges { flex-direction: row; gap: var(--sp-3); } .proof-row__badge { width: 96px; height: 96px; border-radius: 20px; } .proof-row__badge svg { width: 54px; height: 54px; } }

/* ── Business technology solutions (SCRUM-8191 — replaces hidden what-we-do) ── */
/* SCRUM-8366 — single column: the four-stage flow now spans the full section width
   (the product tiles + the 6.3-days stat were removed). */
.tech { display: block; }
.tech__head { margin-bottom: var(--sp-6); }
/* SCRUM-9037 — tech lede width now inherited from the shared .section-lede base rule. */
.tech__closing { font-size: var(--fs-body-lg); line-height: var(--lh-prose); color: var(--ink-mid); }
.tech__head h2 { font-size: clamp(26px, 2.6vw, 32px); }

/* SCRUM-8343 / SCRUM-8366 — the four-stage workflow, now a full-width horizontal
   pipeline (Capture → Orchard → Flow → Workspace) with bigger cards, larger icons and
   roomy multi-line descriptions. Prose stays at a readable measure; the flow goes wide. */
/* SCRUM-8496 — James: intro/closing copy should span the section width, not sit in a
   narrow column with empty space beside it. Heading stays readable; body text goes wide. */
/* SCRUM-8926 — James, on the SAME section 8496 was written for: "the paragraph and title
   are only on half the screen, it should fill the screen naturally." 8496 widened
   .tech__flow-intro and .tech__closing but left .tech__head capped at 760px, so the
   microlabel, the h2 and the lede still stopped mid-page while the four workflow cards
   beneath them ran the full .wrap. The cap goes; .wrap is the measure. */
.tech__head { max-width: none; }
.tech__flow-intro, .tech__closing { max-width: none; }
.tech__flow-intro { font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--ink-mid); margin: 0 0 var(--sp-6); }
.tech__flow {
  list-style: none; padding: 0; margin: 0 0 var(--sp-8);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6);
}
.tech__flow-stage {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-4);
  padding: var(--sp-8) var(--sp-6); background: var(--fill-0);
  border: 1px solid var(--border-subtle); border-radius: 16px;
  transition: transform 200ms var(--ease), border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
.tech__flow-stage:hover {
  transform: translateY(-3px); border-color: var(--teal-border);
  box-shadow: 0 12px 34px rgba(10, 18, 36, 0.09);
}
/* SCRUM-8465 — James: "all need centre aligned". Icon/number/name/desc are now a
   centred column (was left-aligned), matching the reference infographic. The
   connecting arrow re-anchors to the icon's true vertical centre at the new size:
   32px card padding + 54px (half of the 108px icon) = 86px from the card top. */
/* SCRUM-8496 — James: "make the arrows more obvious". Thicker shaft, bigger head,
   full teal-strong colour throughout (was a faint border-colour line + a tiny 7px head). */
/* design-polish: shaft + head re-anchored to the icon's TRUE centre
   (32px card padding + 54px half-icon = 86px): shaft 4px → top 84, head 18px → top 77. */
.tech__flow-stage + .tech__flow-stage::before {
  content: ""; position: absolute; left: calc(-1 * var(--sp-6)); top: 84px; width: var(--sp-6); height: 4px; background: var(--teal-strong);
}
.tech__flow-stage + .tech__flow-stage::after {
  content: ""; position: absolute; left: -4px; top: 77px;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent; border-left: 12px solid var(--teal-strong);
}
.tech__flow-icon {
  position: relative;
  flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  width: 108px; height: 108px; border-radius: 50%;
  background: var(--teal-wash); border: 1px solid var(--teal-border); color: var(--teal-strong);
  box-shadow: 0 6px 16px rgba(59, 166, 201, 0.16);
}
.tech__flow-icon svg { width: 58px; height: 58px; display: block; }
/* SCRUM-8465 — numbered badge overlapping the icon circle, so each stage reads as a
   step (1-4) at a glance, matching the reference infographic quality bar. */
.tech__flow-num {
  position: absolute; top: -10px; left: -10px; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal-strong); color: #fff; border: 3px solid var(--bg);
  font-family: "Geist", -apple-system, sans-serif; font-weight: 700; font-size: var(--fs-body-lg);
}
.tech__flow-body { display: flex; flex-direction: column; gap: var(--sp-2); min-width: 0; }
.tech__flow-name { font-family: "Geist", -apple-system, sans-serif; font-weight: 600; font-size: var(--fs-title); color: var(--ink); letter-spacing: -0.01em; }
.tech__flow-desc { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-muted); }
@media (max-width: 900px) {
  .tech__flow { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5); }
  /* arrows only read left-to-right within a row; hide once the grid wraps */
  .tech__flow-stage + .tech__flow-stage::before,
  .tech__flow-stage + .tech__flow-stage::after { display: none; }
}
@media (max-width: 560px) { .tech__flow { grid-template-columns: 1fr; } }

/* ── Edit mode (SCRUM-8194) — visible only to allowlisted editors ── */
.edit-bar { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; gap: 8px; }
.edit-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 12px;
  font: 600 12.5px/1 "Geist", sans-serif; letter-spacing: 0.02em;
  color: var(--ink-mid); background: var(--bg); border: 1px solid var(--border-subtle);
  border-radius: 999px; cursor: pointer; opacity: 0.55;
  transition: opacity 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.edit-btn:hover, .is-editing .edit-btn { opacity: 1; border-color: var(--teal-strong); color: var(--ink); }
.edit-btn--save { background: var(--teal-strong); color: #fff; border-color: var(--teal-strong); opacity: 1; }
.edit-btn--save:disabled { opacity: 0.6; cursor: wait; }
.is-editing [data-edit] { outline: 1.5px dashed var(--teal-strong); outline-offset: 3px; border-radius: 3px; cursor: text; }
.is-editing [data-edit]:focus { outline-style: solid; background: var(--teal-wash); }
.edit-toast {
  position: fixed; right: 18px; bottom: 66px; z-index: 91; max-width: 340px;
  padding: 11px 14px; border-radius: 10px; font: 500 13px/1.45 "Geist", sans-serif;
  transition: opacity 300ms var(--ease); opacity: 0;
}
.edit-toast--ok { background: var(--teal-wash); color: var(--ink); border: 1px solid var(--teal-border); }
.edit-toast--err { background: #fdecec; color: #7a1f1f; border: 1px solid #e5b5b5; }

/* ── Edit mode v2 (SCRUM-8222): sizing, history, lock, last-published ── */
.edit-size-s { font-size: 0.85em !important; }
.edit-size-m { font-size: 1.15em !important; }
.edit-size-l { font-size: 1.35em !important; }
.edit-size-xl { font-size: 1.6em !important; }
/* SCRUM-11863 — paragraph SPACING stepper: vertical rhythm between the <br>-separated
   runs inside an editable block (generalises the 11811 hero fix). The block's own
   margins are untouched; a block with no <br> is unaffected. Scale values. */
.edit-space-s br { display: block; margin-top: var(--sp-2) !important; }
.edit-space-m br { display: block; margin-top: var(--sp-4) !important; }
.edit-space-l br { display: block; margin-top: var(--sp-6) !important; }

/* SCRUM-11864 — edit-mode STRUCTURAL controls (section reorder + paragraph add/delete).
   The controls exist in the DOM ONLY in edit mode (edit.js injects them), and every
   positioning context is scoped to .is-editing so PUBLIC layout is never affected. */
.is-editing section { position: relative; }
.is-editing [data-region] > [data-edit] { position: relative; }
.cms-reorder { position: absolute; top: 8px; right: 8px; z-index: 96; display: flex; gap: 2px;
  background: var(--bg); border: 1px solid var(--teal-strong); border-radius: 8px; padding: 2px; }
.cms-reorder__btn { border: none; background: none; cursor: pointer; color: var(--teal-strong);
  font-size: 12px; line-height: 1; padding: 3px 6px; border-radius: 5px; }
.cms-reorder__btn:hover { background: var(--teal-wash); }
.cms-para-del { position: absolute; right: -10px; top: -10px; z-index: 96; width: 22px; height: 22px;
  border-radius: 50%; border: 1px solid var(--teal-strong); background: var(--bg); color: var(--teal-strong);
  cursor: pointer; font: 700 15px/1 "Geist", sans-serif; display: grid; place-items: center; }
.cms-para-add { display: inline-block; margin-top: var(--sp-4); padding: 6px 12px; cursor: pointer;
  border: 1px dashed var(--teal-strong); border-radius: 8px; background: var(--teal-wash);
  color: var(--teal-strong); font: 600 var(--fs-body-sm)/1 "Geist", sans-serif; }
.cms-region__p { font-size: var(--fs-body-lg); line-height: var(--lh-prose); color: var(--ink-mid); margin-top: var(--sp-6); }
.footer__published { opacity: 0.65; margin-left: 8px; font-size: var(--fs-mono); }
.edit-sizer {
  position: absolute; z-index: 95; display: flex; align-items: center; gap: 4px;
  background: var(--bg); border: 1px solid var(--teal-strong); border-radius: 8px; padding: 2px 6px;
  font: 600 13px/1 "Geist", sans-serif; color: var(--ink);
}
.edit-sizer button { border: none; background: none; cursor: pointer; font-size: var(--fs-body); padding: 2px 6px; color: var(--teal-strong); }
.edit-history {
  position: fixed; right: 18px; bottom: 66px; z-index: 95; max-width: 340px; max-height: 50vh; overflow-y: auto;
  background: var(--bg); border: 1px solid var(--border-subtle); border-radius: 12px; padding: 8px;
  display: flex; flex-direction: column; gap: 4px; box-shadow: 0 8px 28px rgba(10, 18, 36, 0.14);
}
.edit-history__head { font: 700 11px/1 "Geist Mono", monospace; text-transform: uppercase; letter-spacing: var(--ls-caps-tight); color: var(--ink-muted); padding: 6px 8px 4px; }
.edit-history button {
  text-align: left; border: none; background: none; cursor: pointer; padding: 7px 8px; border-radius: 7px;
  font: 500 13px/1.3 "Geist", sans-serif; color: var(--ink);
}
.edit-history button:hover { background: var(--teal-wash); }
.edit-history__orig { color: #7a1f1f !important; border-top: 1px solid var(--border-subtle) !important; border-radius: 0 !important; }

/* ===================== SCRUM-8342 — case-study sub-pages (dark CAIRNSTYLE) ===================== */
.cs { padding-block: var(--sp-10) 0; }
.cs__head { display: grid; grid-template-columns: 1fr auto; gap: var(--sp-8); align-items: start; padding-bottom: var(--sp-8); border-bottom: 1px solid var(--border-subtle); }
@media (max-width: 820px) { .cs__head { grid-template-columns: 1fr; } }
.cs__eyebrow { color: var(--teal-strong); }
.cs__title { font-family: "Fraunces", serif; font-size: clamp(28px, 4vw, 40px); font-weight: 600; line-height: var(--lh-heading); letter-spacing: -0.02em; color: var(--ink); margin: var(--sp-2) 0 var(--sp-3); text-wrap: balance; }
.cs__summary { font-size: var(--fs-body-xl); line-height: var(--lh-body); color: var(--ink-mid); max-width: 56ch; }
.cs__banner { display: grid; grid-template-columns: repeat(3, auto); gap: 1px; background: var(--teal-border); border: 1px solid var(--teal-border); border-radius: 12px; overflow: hidden; align-self: start; }
@media (max-width: 480px) { .cs__banner { grid-template-columns: 1fr; } }
.cs__banner div { background: var(--teal-wash); padding: var(--sp-4) var(--sp-5); text-align: center; }
.cs__banner dd { font-family: "Fraunces", serif; font-size: var(--fs-head-lg); font-weight: 600; line-height: 1; color: var(--teal-strong); margin: 0; }
.cs__banner dt { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); font-weight: 700; letter-spacing: var(--ls-caps-tight); text-transform: uppercase; color: var(--ink-muted); margin-top: var(--sp-2); }
.cs__body { display: grid; grid-template-columns: 1fr 300px; gap: var(--sp-12); padding: var(--sp-10) 0 var(--sp-14); }
@media (max-width: 900px) { .cs__body { grid-template-columns: 1fr; gap: var(--sp-8); } }
.cs__block { margin-bottom: var(--sp-8); }
.cs__h { font-family: "Geist Mono", monospace; font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--ls-caps); text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--sp-4); }
.cs__block p { font-size: var(--fs-body-lg); line-height: var(--lh-prose); color: var(--ink-mid); }
.cs__chain { list-style: none; padding: 0; margin: 0; }
.cs__step { position: relative; display: flex; gap: var(--sp-4); align-items: flex-start; padding: var(--sp-4); background: var(--fill-0); border: 1px solid var(--border-subtle); border-radius: 12px; }
.cs__step + .cs__step { margin-top: var(--sp-6); }
.cs__step + .cs__step::before { content: ""; position: absolute; left: 31px; top: -20px; width: 2px; height: 16px; background: var(--teal-border); }
.cs__step + .cs__step::after { content: ""; position: absolute; left: 27px; top: -7px; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--teal-strong); }
.cs__step-icon { flex: 0 0 auto; width: 72px; height: 72px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; background: var(--teal-wash); border: 1px solid var(--teal-border); color: var(--teal-strong); }
.cs__step-icon svg { width: 40px; height: 40px; display: block; }
.cs__step > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cs__step-name { font-family: "Geist", -apple-system, sans-serif; font-weight: 600; font-size: var(--fs-body); color: var(--ink); }
.cs__step-desc { font-size: var(--fs-body-sm); line-height: var(--lh-compact); color: var(--ink-muted); }
.cs__result { display: flex; gap: var(--sp-3); align-items: flex-start; background: rgba(184, 217, 74, 0.12); border: 1px solid rgba(184, 217, 74, 0.40); border-radius: 12px; padding: var(--sp-4); color: var(--ink) !important; font-size: var(--fs-body-lg); line-height: var(--lh-body); }
.cs__tick { flex: 0 0 auto; color: var(--green); font-weight: 700; font-size: var(--fs-body-xl); }
.cs__aside { align-self: start; }
.cs__h--aside { margin-bottom: var(--sp-4); }
.cs__values { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.cs__value { background: var(--fill-0); border: 1px solid var(--border-subtle); border-radius: 12px; padding: var(--sp-4); min-height: 80px; display: flex; align-items: center; justify-content: center; text-align: center; }
.cs__value--on { background: var(--teal-wash); border-color: var(--teal-border); }
.cs__value-label { font-family: "Geist", -apple-system, sans-serif; font-weight: 600; font-size: var(--fs-body-sm); color: var(--ink); letter-spacing: -0.01em; }
.cs__cta { border-top: 1px solid var(--border-subtle); padding: var(--sp-12) 0 var(--sp-14); text-align: center; }
.cs__cta-title { font-family: "Fraunces", serif; font-size: clamp(24px, 3vw, 32px); font-weight: 600; color: var(--ink); margin-bottom: var(--sp-3); }
.cs__cta-sub { font-size: var(--fs-body-lg); line-height: var(--lh-body); color: var(--ink-mid); max-width: 60ch; margin: 0 auto var(--sp-6); }

/* ===================================================================
   TRQ ASSESSMENT (SCRUM-11386) — full-width section, 2×2 value/specificity
   matrix. Static-first (interaction is a later enhancement). The numbered
   dots are DECORATIVE and aria-hidden (James ruled: no data model).
   =================================================================== */
.trq { padding: var(--sp-section) 0; border-top: 1px solid var(--border-subtle); }
.trq__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); gap: clamp(32px, 5vw, 72px); align-items: center; }

/* Left column — the explanation */
.trq__spark { width: 15px; height: 15px; flex: none; }
.trq__title { font-family: "Fraunces", serif; font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: var(--lh-heading); letter-spacing: -0.015em; color: var(--ink); margin: var(--sp-4) 0 var(--sp-5); }
/* SCRUM-12164 ask A: TRQ Assessment section-title furniture */
.trq__section-head { margin-bottom: var(--sp-8); }
.trq__section-title { display: inline-flex; align-items: center; gap: var(--sp-3); }
.trq__section-title .trq__spark { width: 22px; height: 22px; color: var(--teal-strong); }
.trq__body { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--ink-mid); max-width: 52ch; }
.trq__body + .trq__body { margin-top: var(--sp-3); }
.trq__dims-lead { margin-top: var(--sp-6); font-size: var(--fs-body); color: var(--ink); font-weight: 600; }
.trq__dims { list-style: none; margin: var(--sp-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.trq__dims li { position: relative; padding-left: var(--sp-4); font-size: var(--fs-body-sm); line-height: var(--lh-body); color: var(--ink-mid); }
.trq__dims li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.trq__legend { list-style: none; margin: var(--sp-6) 0 0; padding: 0; display: grid; gap: var(--sp-3); }
.trq__legend li { display: flex; align-items: flex-start; gap: var(--sp-3); font-size: var(--fs-body-sm); line-height: var(--lh-body); color: var(--ink-mid); }
.trq__legend li strong { color: var(--ink); letter-spacing: 0.03em; }
.trq__legend-icon { flex: none; width: 20px; height: 20px; margin-top: 1px; color: var(--teal-strong); }
.trq__closer { margin-top: var(--sp-6); font-family: "Fraunces", serif; font-size: clamp(18px, 2vw, 22px); font-weight: 600; color: var(--teal-strong); letter-spacing: -0.01em; }

/* Right column — the matrix */
.trq__matrix-wrap { min-width: 0; }
.trq__matrix {
  position: relative; margin: 0; display: grid;
  grid-template-columns: 24px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 22px;
  grid-template-areas: "yaxis cells" "corner xaxis"; gap: var(--sp-3);
  aspect-ratio: 1 / 0.82; padding: var(--sp-5) var(--sp-5) var(--sp-4);
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 18px;
}
/* SCRUM-11808 — richer quadrant: large faint centred icon (watermark), name +
   sub-caption, UC-labelled tokens, a C26 mark in the BUILD (recommended) zone, and
   more prominent axis labels + Low→High arrows. Keeps the live token set, the
   BUILD-highlighted quadrant, the Business Value / Specificity axes, and the palette. */
.trq__axis { font: 600 var(--fs-caption)/1 "Geist Mono", monospace; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mid); white-space: nowrap; }
.trq__axis--y { grid-area: yaxis; writing-mode: vertical-rl; transform: rotate(180deg); place-self: center; }
.trq__axis--x { grid-area: xaxis; place-self: center; }
.trq__scale { position: absolute; font: 600 var(--fs-nano)/1 "Geist Mono", monospace; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-muted); pointer-events: none; }
.trq__scale--y-hi { top: var(--sp-5); left: 28px; }
.trq__scale--y-lo { bottom: 32px; left: 28px; }
.trq__scale--x-lo { left: 34px; bottom: var(--sp-1); }
.trq__scale--x-hi { right: var(--sp-5); bottom: var(--sp-1); }

.trq__cells { grid-area: cells; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: var(--sp-3); }
.trq__q { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--fill-1); padding: var(--sp-4); min-height: 0; }
/* the quadrant icon is now a large faint watermark centred behind the tokens */
.trq__q-icon { position: absolute; top: 50%; left: 50%; width: 44%; height: auto; max-width: 82px; transform: translate(-50%, -50%); color: var(--ink-muted); opacity: 0.09; stroke-width: 1.2; z-index: 0; pointer-events: none; }
.trq__q-head { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 3px; }
.trq__q-name { font: 600 var(--fs-body-sm)/1 "Geist", sans-serif; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink); }
.trq__q-sub { font: 500 var(--fs-nano)/1.3 "Geist", sans-serif; letter-spacing: 0.01em; color: var(--ink-muted); max-width: 20ch; }
.trq__q--build { border-color: var(--teal); background: var(--teal-wash); box-shadow: inset 0 0 0 1px var(--teal-border), 0 0 64px -8px rgba(59, 166, 201, 0.7); }
.trq__q--build .trq__q-icon { color: var(--teal-strong); opacity: 0.15; }
.trq__q--build .trq__q-name { color: var(--teal-strong); }
.trq__q--build .trq__q-sub { color: var(--teal-strong); opacity: 0.82; }
/* labelled use-case tokens (was scattered bare-number dots) */
.trq__dot { position: absolute; z-index: 2; transform: translate(-50%, -50%); padding: 3px 7px; border-radius: 999px; white-space: nowrap; font: 600 var(--fs-nano)/1 "Geist Mono", monospace; letter-spacing: 0.03em; color: var(--teal-strong); background: var(--teal-wash-hi); border: 1px solid var(--teal-border); }
/* C26 mark — the recommended zone, centred in BUILD (SCRUM-12164 ask C: the C26 logo, not the "C26" text) */
.trq__c26 { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; font: 700 var(--fs-micro)/1 "Geist Mono", monospace; letter-spacing: 0.02em; color: var(--teal-strong); background: radial-gradient(circle at 50% 40%, var(--teal-wash-hi), var(--teal-wash)); border: 1px solid var(--teal); box-shadow: 0 0 26px -4px rgba(59, 166, 201, 0.85); }
.trq__c26 img { width: 30px; height: 30px; object-fit: contain; display: block; }

/* Mobile: stack the columns; the matrix stays a readable 2×2 (James: solve
   the stack deliberately, do not just shrink). */
@media (max-width: 900px) {
  .trq__grid { grid-template-columns: 1fr; gap: var(--sp-10); }
  .trq__matrix-wrap { max-width: 480px; }
}
@media (max-width: 460px) {
  .trq__matrix { aspect-ratio: 1 / 0.98; gap: var(--sp-2); padding: var(--sp-4) var(--sp-4) var(--sp-3); }
  .trq__q { padding: var(--sp-3); }
  .trq__q-name { font-size: var(--fs-caption); }
  .trq__q-sub { display: none; }
  .trq__dot { padding: 2px 5px; }
  .trq__c26 { width: 34px; height: 34px; }
}
