/* ============================================================
   The CV Method — base + component styles
   SPEC v2 §2.1 (import order) · §4 (component mapping) · §8 (a11y)

   Reproduces the shipped React library (components/*.jsx) in vanilla CSS.
   Every value comes from the token files — nothing is invented here except
   the AA-safe corrections listed under "Contrast corrections" below.

   NOTE: this file previously shipped as a stub that @imported a `tokens/`
   directory which does not exist in this handoff. The token files live at
   css/*.css and are imported by index.html in the §2.1 order, so the broken
   imports are gone.
   ============================================================ */

:root{
  /* ---- Contrast corrections (SPEC §2.2 "AA on every pair" is law) ----
     navy→green-ink, dark enough that white text clears AA on every stop
     AND each stop clears AA as text on white:
       #FFFFFF on #15265C = 14.35:1   #FFFFFF on #0B7A50 = 5.37:1
       #15265C on #FFFFFF = 14.35:1   #0B7A50 on #FFFFFF = 5.37:1
     Used for gradient numerals/headings on light (.outcome__to), and for the
     primary button fill (white label needs >=4.5:1 against every stop). */
  --grad-signal-ink:linear-gradient(120deg,#15265C 0%,#0B7A50 100%);
  --grad-cta:var(--grad-signal-ink);

  --nav-h:72px;
}

/* motion.css zeroes --dur-fast/--dur/--dur-slow under reduced motion but not
   --stagger, so a staggered entrance would still hold elements at their `from`
   state for the delay. Completing the token set here keeps every §6 animation
   honouring reduced motion purely through tokens. (Worth pushing upstream into
   the design system's motion.css.) */
@media (prefers-reduced-motion:reduce){
  :root{--stagger:0s}
}

/* ============================================================
   1. Reset + base
   ============================================================ */
*,*::before,*::after{box-sizing:border-box}
html,body,h1,h2,h3,h4,p,ul,ol,li,figure,blockquote,dl,dd{margin:0;padding:0}
ul[class],ol[class]{list-style:none}
img,svg,video{max-width:100%;height:auto;display:block}

html{-webkit-text-size-adjust:100%}

body{
  font-family:var(--font-body);
  font-size:var(--fs-body);
  font-weight:var(--fw-regular);
  line-height:var(--lh-body);
  color:var(--text-strong);
  /* Dark rebuild (2026-08-23): the whole scroll is now a continuous
     deep-navy world (Hero → the six in-scope sections → Reframe/Final
     CTA/Footer already dark) — this is the fallback ground so nothing
     ever shows white, even at a seam a section's own background misses. */
  background:var(--ink-900);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

h1,h2,h3{
  font-family:var(--font-display);
  font-weight:var(--fw-bold);
  line-height:var(--lh-tight);
  letter-spacing:var(--ls-display);
  text-wrap:balance;
}
h1{font-size:var(--fs-h1)}
h2{font-size:var(--fs-h2)}
h3{font-size:var(--fs-h3)}

p{text-wrap:pretty}
strong,b{font-weight:var(--fw-semibold)}
em{font-style:italic}

/* ============================================================
   2. Layout
   ============================================================ */
.container{
  width:100%;
  max-width:var(--container);
  margin-inline:auto;
  padding-inline:var(--space-6);
}
.container--narrow{max-width:800px}
@media (max-width:479px){
  .container{padding-inline:var(--space-4)}
}

.section{
  padding-block:var(--space-24);
  /* fixed nav must not cover anchor targets */
  scroll-margin-top:calc(var(--nav-h) + var(--space-2));
}
/* Dark rebuild (2026-08-23): every current .section--soft consumer
   (#start-here, #how, #fit) is now one of the six in-scope dark sections —
   there are no light consumers of this class left on the page. Left
   transparent so the section's own dark ground (page.css, ID-scoped) or
   the now-dark body shows through; the class stays in the markup/CSS in
   case a future light section reuses it, at which point it should regain
   an explicit light background instead of relying on this default. */
.section--soft{background:transparent}
.section--dark{background:var(--ink-900);color:var(--text-on-ink)}

.section-head{max-width:60ch;margin-bottom:var(--space-10)}
.section-head > * + *{margin-top:var(--space-2)}
.section-head p{color:var(--text-muted)}
.section--dark .section-head p{color:var(--text-on-ink-muted)}

/* ============================================================
   3. Accessibility primitives (SPEC §8)
   ============================================================ */
.skip-link{
  position:absolute;
  left:-9999px;
  top:0;
  z-index:200;
  padding:12px 18px;
  background:var(--ink-900);
  color:#fff;
  font-weight:var(--fw-semibold);
  text-decoration:none;
  border-radius:0 0 var(--r-sm) 0;
}
.skip-link:focus{left:0}

:focus-visible{
  outline:3px solid var(--focus-ring);
  outline-offset:2px;
  border-radius:6px;
}

.visually-hidden{
  position:absolute;
  width:1px;height:1px;
  margin:-1px;padding:0;border:0;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}

/* ============================================================
   3b. A4 — section reveals (SPEC §6)
   rise + fade as each group enters view, staggered by --stagger to read as
   "a system of parts" assembling rather than one slab appearing.

   The hidden resting state is gated behind `@media (scripting: enabled)`.
   With JS disabled the rule never applies, so every section renders at full
   opacity and the page stays completely readable (SPEC §14) — no inline
   class-setting script, and therefore no CSP hash to maintain. Browsers
   without the `scripting` media feature also fall through to visible.

   Only transform and opacity animate, and both durations come from
   motion.css, so reduced motion drops straight to the final state.
   ============================================================ */
@media (scripting: enabled){
  .reveal{
    opacity:0;
    transform:translateY(16px);
    transition:
      opacity var(--dur) var(--ease-out),
      transform var(--dur) var(--ease-out);
    transition-delay:calc(var(--stagger) * var(--reveal-i, 0));
    will-change:opacity,transform;
  }
  .reveal.is-revealed{
    opacity:1;
    transform:none;
    will-change:auto;
  }
}

/* ============================================================
   4. core/Logo
   Mirrors components/core/Logo.jsx: inline SVG mark + live-text wordmark,
   so the lockup renders in real Space Grotesk. (The flat
   assets/logo/lockup-*.svg files bake the wordmark as an SVG text node and
   lose the typeface when referenced as an external image; they stay the
   source of truth for OG, favicons and anywhere a raster is required
   — SPEC §3.)
   ============================================================ */
.logo{
  display:inline-flex;
  align-items:center;
  min-height:var(--hit-min);   /* it is a link — SPEC §2.4 */
  gap:.5em;
  font-family:var(--font-display);
  letter-spacing:var(--ls-display);
  line-height:1;
  text-decoration:none;
  white-space:nowrap;
}
.logo__mark{flex:none;width:1.75em;height:1.75em}
.logo__word{font-size:1.05rem}
.logo__word .t-the{font-weight:var(--fw-medium)}
.logo__word .t-cv{font-weight:var(--fw-bold)}
.logo__word .t-method{font-weight:var(--fw-medium)}
/* tone: white — nav + footer over ink (SPEC §3) */
.logo--white{color:#fff}
.logo--white .t-the{color:#8FA3B4}  /* 7.6:1 on the ink nav */

/* ============================================================
   5. core/Button  (variants: primary · ghost · outline · quiet)
   ============================================================ */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  min-height:var(--hit-min);
  padding:14px 26px;
  border:none;
  border-radius:var(--r-pill);
  font-family:var(--font-body);
  font-size:1rem;
  font-weight:var(--fw-semibold);
  line-height:1.2;
  text-decoration:none;
  cursor:pointer;
}
/* every size clears --hit-min: SPEC §2.4 requires 44px on all tap targets,
   which overrides the 36px `sm` in components/core/Button.jsx */
.btn--sm{min-height:var(--hit-min);padding:10px 20px;font-size:.95rem}
.btn--lg{padding:18px 34px;font-size:1.05rem}

/* A7 — buttons: gradient shift + glow on hover/focus.
   `background-position` and `box-shadow` are paint properties, so instead of
   transitioning them the shifted gradient and the glow live on a second layer
   that is cross-faded with opacity alone (§6 master rule). `isolation:isolate`
   makes the button a stacking context, so the z-index:-1 layers paint above
   its own background but below the label — no markup wrapper needed. */
.btn--primary{
  position:relative;
  isolation:isolate;
  color:#fff;
  /* solid AA-safe fallback if the layers below never paint */
  background-color:var(--green-ink);
  box-shadow:var(--shadow-md);
}
.btn--primary::before,
.btn--primary::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  border-radius:inherit;
  background-image:var(--grad-cta);
  background-size:180% 180%;
}
.btn--primary::before{background-position:0 50%}
.btn--primary::after{
  background-position:100% 50%;
  box-shadow:var(--shadow-lg);
  opacity:0;
  transition:opacity var(--dur) var(--ease-out);
}
.btn--primary:hover::after,
.btn--primary:focus-visible::after{opacity:1}
.btn--primary{transition:transform var(--dur-fast) var(--ease-out)}
.btn--primary:hover{transform:translateY(-2px)}

/* ghost/outline have no gradient to shift — the border and label brighten,
   which the reduced-motion path keeps as a plain colour change (§6 A7) */
.btn--ghost,.btn--outline,.btn--quiet{transition:transform var(--dur-fast) var(--ease-out)}
.btn--ghost:hover,.btn--outline:hover,.btn--quiet:hover{transform:translateY(-2px)}
/* ghost — dark backgrounds only; border raised to .38 alpha for the 3:1
   non-text contrast minimum (WCAG 1.4.11); .28 measured 2.39:1 on ink. */
.btn--ghost{
  background:transparent;
  border:1px solid rgba(255,255,255,.38);
  color:var(--text-on-ink);
}
.btn--outline{
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-strong);
}
.btn--quiet{background:var(--canvas-soft);color:var(--text-strong)}

.btn[aria-disabled="true"]{opacity:.45;pointer-events:none}

/* ============================================================
   6. navigation/NavBar + mobile overlay
   NavBar.prompt.md: "The CTA is persistent and never scrolls away" — so the
   Book-a-call button stays in the bar at every width, outside the overlay.

   A1 (§6): transparent over the hero, frosted ink once past 40px. The frost
   rides on a pseudo-element cross-faded by opacity, so nothing repaints on
   scroll. `@media (scripting: enabled)` is what makes the transparent resting
   state safe: with JS off there is no scroll listener, so the bar stays
   frosted and never turns invisible over the white credibility strip.
   ============================================================ */
.nav{
  position:fixed;
  inset:0 0 auto 0;
  z-index:100;
  isolation:isolate;
  min-height:var(--nav-h);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:var(--space-4);
  padding:var(--space-4) var(--space-6);
}
.nav::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  background:rgba(5,10,18,.82);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border-dark);
}
@media (scripting: enabled){
  .nav::before{
    opacity:0;
    transition:opacity var(--dur) var(--ease-out);
  }
  .nav.is-scrolled::before{opacity:1}
  /* the overlay owns the screen, so the bar must read as part of it */
  .nav.is-menu-open::before{opacity:1}
}
.nav__actions{display:flex;align-items:center;gap:var(--space-4)}
.nav__links{
  display:flex;
  align-items:center;
  gap:var(--space-6);
}
.nav__link{
  display:inline-flex;
  align-items:center;
  min-height:var(--hit-min);
  padding-inline:4px;
  color:rgba(242,247,249,.86);
  font-size:.95rem;
  text-decoration:none;
}
.nav__link:hover,.nav__link:focus-visible{color:#fff}

/* hamburger — only exists below the overlay breakpoint */
.nav__toggle{
  display:none;
  align-items:center;
  justify-content:center;
  width:var(--hit-min);
  height:var(--hit-min);
  padding:0;
  border:1px solid var(--border-dark);
  border-radius:var(--r-sm);
  background:transparent;
  color:var(--text-on-ink);
  cursor:pointer;
}
.nav__toggle svg{width:22px;height:22px}
.nav__toggle .icon-close,
.nav__toggle[aria-expanded="true"] .icon-open{display:none}
.nav__toggle[aria-expanded="true"] .icon-close{display:block}

/* ---- overlay menu ----
   Instant show/hide: P1 ships no motion, and Accordion/NavBar are decision
   zones. Hidden with `hidden` so it is out of the a11y tree when closed. */
.nav-menu{
  position:fixed;
  inset:0;
  z-index:99;
  display:flex;
  flex-direction:column;
  padding:calc(var(--nav-h) + var(--space-6)) var(--space-6) var(--space-10);
  overflow-y:auto;
  overscroll-behavior:contain;
  background:var(--ink-900);
  color:var(--text-on-ink);
}
.nav-menu[hidden]{display:none}
.nav-menu__link{
  display:flex;
  align-items:center;
  min-height:56px;
  padding:var(--space-2) 0;
  border-bottom:1px solid var(--border-dark);
  color:var(--text-on-ink);
  font-family:var(--font-display);
  font-weight:var(--fw-medium);
  font-size:1.5rem;
  letter-spacing:var(--ls-display);
  text-decoration:none;
}
.nav-menu__meta{margin-top:auto;padding-top:var(--space-10);color:var(--slate-300)}
.nav-menu__meta a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}

/* scroll lock while the overlay is open */
body.has-menu-open{overflow:hidden}

@media (max-width:860px){
  .nav__links{display:none}
  .nav__toggle{display:inline-flex}
}
.nav .btn--sm{white-space:nowrap}

@media (max-width:399px){
  /* Measured: lockup 155 + CTA/hamburger 179 + gutters = 398px of nav content,
     so below 400 they cannot all fit and squeezing the CTA wraps it onto two
     lines. SPEC §3: below the lockup's minimum, use the symbol alone. Clipped
     rather than display:none so the link keeps its accessible name. The full
     lockup returns at 400 and up. */
  .nav{padding-inline:var(--space-4);gap:var(--space-2)}
  .nav .logo__word{
    position:absolute;
    width:1px;height:1px;
    margin:-1px;
    overflow:hidden;
    clip-path:inset(50%);
    white-space:nowrap;
  }
}
@media (min-width:861px){
  /* never leave the overlay mounted across the breakpoint */
  .nav-menu{display:none}
}

/* ============================================================
   7. display/Eyebrow
   ============================================================ */
.eyebrow{
  font-family:var(--font-mono);
  font-size:.8rem;
  font-weight:500;
  letter-spacing:var(--ls-eyebrow);
  text-transform:uppercase;
  color:var(--green-ink);
}
.section--dark .eyebrow,.eyebrow--dark{color:var(--mint)}

.mono{
  font-family:var(--font-mono);
  font-size:var(--fs-sm);
  letter-spacing:var(--ls-mono);
}

/* Gradient display fills. On light use the AA-safe navy→green-ink gradient;
   on dark use --grad-signal (mint #8FF0C6 → accent #2EE09A, both bright and
   AA-clear on --ink-900). --grad-method is reserved for display-size text on ink. */
.grad-text{
  background-image:var(--grad-signal-ink);
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
  /* solid fallback for background-clip:text failures (SPEC §2.2) */
  -webkit-text-fill-color:transparent;
}
@supports not ((-webkit-background-clip:text) or (background-clip:text)){
  .grad-text{color:var(--green-ink);-webkit-text-fill-color:var(--green-ink)}
}
/* On ink, --grad-signal is the AA-safe text gradient: both mint (#8FF0C6) and
   accent (#2EE09A) stops read clearly against --ink-900. --grad-method stays a
   non-text fill (buttons, dividers, panels, scrims) rather than gradient text. */
.section--dark .grad-text{background-image:var(--grad-signal)}

/* ============================================================
   9. display/Card + display/Chip
   ============================================================ */
/* SPEC §8 breakpoints: xs <480 · sm 480–767 · md 768–1023 · lg 1024–1439 · xl ≥1440
   Method 2×2→1 · Proof/Outcomes 3→1 · Process 4→1, all collapsing at the
   md/sm boundary (767). Process takes an extra 4→2 step across md, where four
   tracks would leave ~170px cards — the spec fixes the endpoints, not the
   intermediate steps. */
.grid{display:grid;gap:var(--space-6)}
.grid--2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid--3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid--4{grid-template-columns:repeat(4,minmax(0,1fr))}

@media (max-width:1023px){
  .grid--4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:767px){
  .grid--2,.grid--3,.grid--4{grid-template-columns:1fr}
}

.chips{display:flex;flex-wrap:wrap;gap:var(--space-2);margin-top:14px}
/* Dark rebuild (2026-08-23): every .chip on the page lives inside #tools
   (42 uses, all in tool-card chip lists) — there is no light consumer left,
   so the base default is dark rather than relying on the #tools override
   in page.css to mask a light one. --df-chip-bg/--df-line/--df-muted are
   defined in page.css's :root (loaded on the same page, so available here
   regardless of file order — custom properties resolve at compute time). */
.chip{
  padding:6px 10px;
  border:1px solid var(--df-line);
  border-radius:var(--r-pill);
  background:var(--df-chip-bg);
  font-family:var(--font-mono);
  font-size:var(--fs-eyebrow);
  color:var(--df-muted);
}

/* ============================================================
   10. navigation/Accordion — native <details>, "flat and fast"
   ============================================================ */
.accordion details{border-bottom:1px solid var(--border);padding:var(--space-4) 0}
.accordion summary{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  min-height:var(--hit-min);
  cursor:pointer;
  list-style:none;
  font-family:var(--font-display);
  font-weight:var(--fw-medium);
  font-size:1.12rem;
  line-height:1.3;
  color:var(--text-strong);
}
.accordion summary::-webkit-details-marker{display:none}
.accordion summary::after{
  content:"+";
  flex:none;
  font-size:1.4rem;
  line-height:1;
  color:var(--green-ink);
}
.accordion details[open] summary::after{content:"\2013"}
.accordion__answer{margin-top:12px;color:var(--text-muted)}

/* ============================================================
   11. display/Divider + footer
   ============================================================ */
.divider{border:none;height:1px;background:var(--border);margin:0}
.divider--accent{height:3px;width:56px;border-radius:2px;background-image:var(--grad-method)}

.site-footer{
  padding-block:var(--space-16);
  background:var(--ink-900);
  color:var(--slate-300);
  font-size:.9rem;
}
.site-footer a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.site-footer a:hover{color:#fff}
/* The brand mark is a lockup, not a text link: no underline, and it keeps its
   own tone. SPEC §3 assigns lockup-horizontal-white to the footer, so the
   generic footer link colour must not win here. */
.site-footer .logo.logo--white{color:#fff;text-decoration:none}

.footer__grid{
  display:grid;
  grid-template-columns:minmax(0,1.4fr) repeat(2,minmax(0,1fr));
  gap:var(--space-10);
  padding-bottom:var(--space-10);
  border-bottom:1px solid var(--border-dark);
}
@media (max-width:767px){
  .footer__grid{grid-template-columns:1fr;gap:var(--space-6)}
}
.footer__tagline{margin-top:var(--space-4);max-width:34ch;color:var(--text-on-ink-muted)}
.footer__heading{
  margin-bottom:var(--space-2);
  font-family:var(--font-mono);
  font-size:var(--fs-eyebrow);
  font-weight:500;
  letter-spacing:var(--ls-eyebrow);
  text-transform:uppercase;
  color:var(--mint);
}
/* every footer link is a tap target, so each clears --hit-min on its own */
.footer__list a{
  display:inline-flex;
  align-items:center;
  min-height:var(--hit-min);
  color:var(--slate-300);
  text-decoration:none;
}
.footer__list a:hover,.footer__list a:focus-visible{color:#fff;text-decoration:underline}
.footer__list--contact a{color:var(--accent)}

.footer__base{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:var(--space-2) var(--space-6);
  padding-top:var(--space-6);
}
.footer__legal{
  /* --slate-500 is 4.17:1 on --ink-900 — below AA for 14.4px text */
  color:var(--text-on-ink-muted);
}
