/* =========================================================================
   Metrik ai — website v1 prototype
   Territory: "Instrument" (section 06 of the brief, recommended option)
   Structure-first prototype. Layout, hierarchy and content placement.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. TOKENS
   ------------------------------------------------------------------------- */
:root {
  /* Instrument palette — brief §06 */
  --graphite:        #202226;
  --chalk:           #F3F2EE;
  --verdigris:       #2F7F78;  /* rules, fills, marks — NOT body text on chalk */
  --gauge:           #C98A22;  /* one highlighted figure per screen, on graphite only */

  /* Accessible derivatives (WCAG AA 4.5:1 — brief §06 / §10) */
  --verdigris-ink:   #2A7168;  /* 5.1:1 on chalk — links & accent text */
  --verdigris-light: #5FB3A9;  /* 6.5:1 on graphite — accent text on dark */
  --ink:             #202226;  /* 14.2:1 on chalk */
  --ink-muted:       #5A5C60;  /* 5.9:1 on chalk */
  --chalk-muted:     #A8AAAE;  /* 7.0:1 on graphite */

  /* Grounds */
  --ground:          #F3F2EE;
  --ground-raised:   #FFFFFF;
  --ground-sunken:   #EAE8E2;
  --ground-dark:     #202226;
  --ground-dark-2:   #2A2D32;

  /* Hairlines — the "scale" motif, brief §07 */
  --rule:            #D9D7D0;
  --rule-strong:     #BEBBB2;
  --rule-dark:       #3A3D43;

  /* Type */
  --font-display: "Schibsted Grotesk", "Instrument Sans", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans", "Source Sans 3", system-ui, sans-serif;
  --font-mono:    "IBM Plex Mono", "JetBrains Mono", ui-monospace, monospace;

  /* Rhythm */
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --maxw: 1180px;
  --maxw-prose: 68ch;
  --section-y: clamp(3.5rem, 7vw, 6rem);

  --focus: 0 0 0 3px #F3F2EE, 0 0 0 5px var(--verdigris-ink);
}

/* -------------------------------------------------------------------------
   2. RESET / BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;      /* 17px — brief minimum is 16px */
  line-height: 1.6;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.15rem, 4.8vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.375rem); letter-spacing: -0.01em; }
h4 { font-size: 1rem; letter-spacing: 0; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--verdigris-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 1px; }

img { max-width: 100%; display: block; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* -------------------------------------------------------------------------
   3. BILINGUAL TOGGLE — brief §07 "Bilingual by design"
   Both languages live in the markup, side by side, so copy can be
   reviewed in context. Production (Astro) ships them as /fr/ and /en/ routes.
   ------------------------------------------------------------------------- */
html.lang-fr [data-l="en"],
html.lang-en [data-l="fr"] { display: none !important; }

/* -------------------------------------------------------------------------
   4. LAYOUT PRIMITIVES
   ------------------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: var(--maxw-prose); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(1.75rem, 3vw, 2.5rem); }
.section--dark { background: var(--ground-dark); color: var(--chalk); }
.section--sunken { background: var(--ground-sunken); }
.section + .section { border-top: 1px solid var(--rule); }
.section--dark + .section, .section + .section--dark { border-top: 0; }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.5rem); }
.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)); }
.grid-sidebar { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); align-items: start; }
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4, .grid-sidebar { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: 1rem; }
.stack-lg > * + * { margin-top: 2rem; }

/* -------------------------------------------------------------------------
   5. THE SCALE — signature element, brief §07
   Tick marks, hairline rules and calibration lines used for STRUCTURE,
   never decoration. A rule always separates something.
   ------------------------------------------------------------------------- */
.ticks {
  height: 10px;
  background-image: repeating-linear-gradient(
    to right,
    var(--rule-strong) 0 1px,
    transparent 1px 12px
  );
  background-position: bottom left;
  background-repeat: repeat-x;
  border-bottom: 1px solid var(--rule-strong);
}
.ticks--major {
  height: 16px;
  background-image:
    repeating-linear-gradient(to right, var(--rule-strong) 0 1px, transparent 1px 60px),
    repeating-linear-gradient(to right, var(--rule) 0 1px, transparent 1px 12px);
  background-size: 100% 16px, 100% 8px;
}
.ticks--dark { border-bottom-color: var(--rule-dark);
  background-image: repeating-linear-gradient(to right, var(--rule-dark) 0 1px, transparent 1px 12px); }
.ticks--accent { border-bottom-color: var(--verdigris); }

/* Section header: number + rule + title (no emoji markers — brief §06) */
.sec-head { margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.sec-num {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .18em;
  color: var(--verdigris-ink);
  margin: 0 0 .75rem;
  display: flex; align-items: center; gap: .9rem;
}
.sec-num::after { content: ""; flex: 1; height: 1px; background: var(--rule); }
.section--dark .sec-num { color: var(--verdigris-light); }
.section--dark .sec-num::after { background: var(--rule-dark); }
.sec-head p { color: var(--ink-muted); max-width: var(--maxw-prose); }
.section--dark .sec-head p { color: var(--chalk-muted); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .16em;
  color: var(--verdigris-ink);
  margin: 0 0 1rem;
}
.section--dark .eyebrow { color: var(--verdigris-light); }

/* -------------------------------------------------------------------------
   6. BUTTONS
   Flexible widths — French runs ~20% longer (brief §07).
   ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: .8rem 1.35rem;
  border: 1px solid var(--graphite);
  background: var(--graphite); color: var(--chalk);
  text-decoration: none; cursor: pointer; border-radius: 2px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--verdigris-ink); border-color: var(--verdigris-ink); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--graphite); color: var(--chalk); border-color: var(--graphite); }
.btn--on-dark { background: var(--chalk); color: var(--graphite); border-color: var(--chalk); }
.btn--on-dark:hover { background: var(--verdigris-light); border-color: var(--verdigris-light); color: var(--graphite); }
.btn--ghost-dark { background: transparent; color: var(--chalk); border-color: var(--rule-dark); }
.btn--ghost-dark:hover { background: var(--chalk); color: var(--graphite); border-color: var(--chalk); }
.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; }

.link-arrow {
  font-family: var(--font-body); font-weight: 600;
  display: inline-flex; align-items: center; gap: .45rem;
  text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow::after { content: "\2192"; transition: transform .15s ease; }
.link-arrow:hover::after { transform: translateX(3px); }

/* -------------------------------------------------------------------------
   7. HEADER / NAV
   ------------------------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--graphite); color: var(--chalk); padding: .75rem 1rem;
}
.skip:focus { left: 0; }

.partner-strip {
  background: var(--graphite); color: var(--chalk-muted);
  font-family: var(--font-mono); font-size: .7rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .5rem 0; border-bottom: 1px solid var(--rule-dark);
}
.partner-strip .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }
.partner-strip strong { color: var(--chalk); font-weight: 500; }

.site-header { background: var(--chalk); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 50; }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 72px; }

/* Wordmark — brief §05: Metrik carries the weight, ai is quiet and subordinate,
   same baseline, lighter weight, slightly smaller, with the space kept. */
/* The supplied wordmark (deliverable #1), extracted to transparent PNG from the
   JPEG artboard. Two versions: verdigris for chalk grounds, chalk for graphite.
   The type-set spans below remain for the specimen on systeme.html and as the
   fallback if an image fails to load. */
.wordmark img { display: block; height: 27px; width: auto; }
.wordmark--lg img { height: clamp(44px, 7vw, 68px); }
@media (max-width: 480px) { .wordmark img { height: 23px; } }

.wordmark { display: inline-flex; align-items: baseline; gap: .18em; text-decoration: none; color: var(--ink); font-family: var(--font-display); }
.wordmark__name { font-weight: 700; font-size: 1.5rem; letter-spacing: -0.025em; }
.wordmark__ai   { font-weight: 400; font-size: 1.15rem; letter-spacing: -0.01em; color: var(--ink-muted); }
.wordmark:hover .wordmark__ai { color: var(--verdigris-ink); }
.wordmark--dark .wordmark__name { color: var(--chalk); }
.wordmark--dark .wordmark__ai { color: var(--chalk-muted); }
.wordmark--lg .wordmark__name { font-size: clamp(2.5rem, 6vw, 4rem); }
.wordmark--lg .wordmark__ai   { font-size: clamp(1.85rem, 4.5vw, 3rem); }

.nav { margin-left: auto; display: flex; align-items: center; gap: clamp(.75rem, 2vw, 1.75rem); }
.nav a.nav__link {
  font-size: .95rem; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: .35rem 0; border-bottom: 2px solid transparent;
}
.nav a.nav__link:hover { border-bottom-color: var(--rule-strong); }
.nav a.nav__link[aria-current="page"] { border-bottom-color: var(--verdigris); color: var(--ink); font-weight: 600; }

.lang-toggle { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 2px; overflow: hidden; }
.lang-toggle button {
  font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em;
  padding: .35rem .55rem; background: transparent; border: 0; cursor: pointer; color: var(--ink-muted);
}
.lang-toggle button[aria-pressed="true"] { background: var(--graphite); color: var(--chalk); }

.nav-toggle { display: none; }
@media (max-width: 940px) {
  .nav-toggle {
    display: inline-flex; margin-left: auto; align-items: center; gap: .5rem;
    font-family: var(--font-mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
    background: transparent; border: 1px solid var(--rule-strong); border-radius: 2px;
    padding: .5rem .75rem; cursor: pointer; color: var(--ink);
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--chalk); border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0; padding: .5rem var(--gutter) 1.25rem;
  }
  .nav.is-open { display: flex; }
  .nav a.nav__link { padding: .8rem 0; border-bottom: 1px solid var(--rule); }
  .nav .btn, .nav .lang-toggle { margin-top: 1rem; align-self: flex-start; }
}

/* -------------------------------------------------------------------------
   8. HERO
   ------------------------------------------------------------------------- */
/* Tightened so the proof rail (§02's four facts) breaks the fold on a laptop —
   the ten-second test asks the reader to NAME the proof, not just find it. */
.hero { padding-block: clamp(2.25rem, 4vw, 4rem) clamp(1.75rem, 3vw, 2.75rem); }
.hero__tagline {
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--verdigris-ink); margin: 0 0 1.25rem;
}
.hero h1 { margin-bottom: .5em; }
.hero__lede { font-size: clamp(1.1rem, 1.7vw, 1.3rem); color: var(--ink-muted); max-width: 60ch; }

/* "For whom", on one line. Sits between the lede and the CTAs so the first
   screen answers what · for whom · proof without scrolling (§11). */
.hero__who {
  margin: 1rem 0 0;
  font-family: var(--font-mono);
  font-size: .82rem;
  letter-spacing: .03em;
  line-height: 1.6;
  color: var(--ink-muted);
  max-width: 66ch;
  font-variant-numeric: tabular-nums;
  padding-top: .8rem;
  border-top: 1px solid var(--rule);
}
.hero__who strong { color: var(--ink); font-weight: 500; }

/* The proof rail when it lives inside the hero. */
.hero__rail { margin-top: clamp(1.4rem, 2.4vw, 1.75rem); }
.hero + .section { border-top: 1px solid var(--rule); }

.page-hero { background: var(--graphite); color: var(--chalk); padding-block: clamp(3rem, 6vw, 5rem); }
.page-hero h1 { color: var(--chalk); }
.page-hero .hero__lede { color: var(--chalk-muted); }
.page-hero .eyebrow { color: var(--verdigris-light); }

/* -------------------------------------------------------------------------
   9. PROOF RAIL — brief §02 "What nobody else can say"
   Four facts on one calibrated rule. Not a badge wall.
   ------------------------------------------------------------------------- */
.proof-rail { border-top: 1px solid var(--rule-strong); display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); }
.proof-rail__item { padding: 1.2rem 1.5rem 1.2rem 0; border-right: 1px solid var(--rule); position: relative; }
.proof-rail__item:last-child { border-right: 0; }
.proof-rail__item:not(:first-child) { padding-left: 1.5rem; }
.proof-rail__item::before { content: ""; position: absolute; top: -1px; left: 0; width: 28px; height: 3px; background: var(--verdigris); }
.proof-rail__k { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 .4rem; }
.proof-rail__v { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; line-height: 1.25; margin: 0; font-variant-numeric: tabular-nums; }
/* A figure in the rail never travels without its source (§07). */
.proof-rail__src { font-family: var(--font-mono); font-size: .7rem; line-height: 1.5; letter-spacing: .02em; color: var(--ink-muted); margin: .45rem 0 0; }
@media (max-width: 900px) { .proof-rail { grid-template-columns: repeat(2, minmax(0,1fr)); } .proof-rail__item:nth-child(2) { border-right: 0; } }
@media (max-width: 520px) { .proof-rail { grid-template-columns: 1fr; } .proof-rail__item { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; } }

/* -------------------------------------------------------------------------
   10. CARDS — square, hairline, no coloured rails, no shadows (brief §06)
   ------------------------------------------------------------------------- */
.card { background: var(--ground-raised); border: 1px solid var(--rule); padding: clamp(1.25rem, 2.4vw, 1.75rem); border-radius: 2px; }
.card--flat { background: transparent; border: 0; border-top: 1px solid var(--rule-strong); padding: 1.25rem 0 0; }
.card__k { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--verdigris-ink); margin: 0 0 .6rem; }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-muted); font-size: .98rem; }
.card p strong { color: var(--ink); }
.section--dark .card { background: var(--ground-dark-2); border-color: var(--rule-dark); }
.section--dark .card p { color: var(--chalk-muted); }
.section--dark .card h3 { color: var(--chalk); }
.section--dark .card__k { color: var(--verdigris-light); }

/* -------------------------------------------------------------------------
   11. THE FIGURE PANEL
   Brief §07: one highlighted number per screen, never five, always attributed.
   Amber only reaches 4.5:1 on graphite, so highlighted figures sit on dark.
   ------------------------------------------------------------------------- */
.figure-panel { background: var(--ground-dark); color: var(--chalk); padding: clamp(1.75rem, 3vw, 2.5rem); border-radius: 2px; }
.figure-panel .ticks { margin-bottom: 1.5rem; }
.figure-panel__num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.75rem, 7vw, 4.5rem); line-height: 1; letter-spacing: -0.03em;
  color: var(--gauge); font-variant-numeric: tabular-nums; margin: 0 0 .35rem;
}
.figure-panel__label { font-family: var(--font-body); font-size: 1.05rem; color: var(--chalk); margin: 0 0 .75rem; max-width: 34ch; }
.figure-panel__src { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; color: var(--chalk-muted); margin: 0; }

/* -------------------------------------------------------------------------
   12. THE FOUR LEVELS — signature element, brief §07
   Reusable across site, diagnostic and proposal.
   ------------------------------------------------------------------------- */
.levels { border-top: 1px solid var(--rule-strong); }
.levels__track { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1px; background: var(--rule); }
.levels__step {
  background: var(--ground-sunken); padding: 1.1rem 1rem; text-align: left;
  border: 0; border-top: 3px solid transparent; cursor: pointer; font: inherit; color: var(--ink-muted);
  display: flex; flex-direction: column; gap: .3rem; min-height: 100%;
}
.levels__step .n { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.levels__step .t { font-family: var(--font-display); font-weight: 600; font-size: .95rem; color: var(--ink); line-height: 1.2; }
.levels__step[aria-selected="true"] { background: var(--ground-raised); border-top-color: var(--verdigris); color: var(--ink); }
.levels__step[data-state="from"] { box-shadow: inset 0 0 0 1px var(--rule-strong); }
.levels__step[data-state="to"]   { background: #E7F0EE; }
.levels__panel { border-top: 1px solid var(--rule); padding-top: 1.25rem; margin-top: 1.25rem; }
.levels__panel p { color: var(--ink-muted); max-width: var(--maxw-prose); }
.levels__legend { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 1rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
/* Direct children only — the nested [data-l] spans must not get a swatch. */
.levels__legend > span::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: .5rem; border: 1px solid var(--rule-strong); vertical-align: -1px; }
.levels__legend > .is-from::before { background: var(--ground-raised); }
.levels__legend > .is-to::before { background: #E7F0EE; border-color: var(--verdigris); }
@media (max-width: 620px) { .levels__track { grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* Compact static version (case study, proposal) */
.levels-bar { display: flex; align-items: stretch; border: 1px solid var(--rule-strong); border-radius: 2px; overflow: hidden; }
.levels-bar__seg { flex: 1; padding: .85rem .9rem; border-right: 1px solid var(--rule); background: var(--ground-sunken); }
.levels-bar__seg:last-child { border-right: 0; }
.levels-bar__seg[data-on="true"] { background: var(--verdigris); color: #fff; }
.levels-bar__seg .n { font-family: var(--font-mono); font-size: .95rem; font-variant-numeric: tabular-nums; display: block; }
.levels-bar__seg .t { font-size: .82rem; font-weight: 600; }

/* -------------------------------------------------------------------------
   13. THE LADDER — brief §02, the conversion device on /approche
   ------------------------------------------------------------------------- */
.ladder { border-top: 1px solid var(--rule-strong); }
.rung { display: grid; grid-template-columns: 88px minmax(0,1fr) minmax(0, 250px); gap: clamp(1rem, 3vw, 2.5rem);
        padding-block: clamp(1.75rem, 3vw, 2.5rem); border-bottom: 1px solid var(--rule); align-items: start; }
.rung__n { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--verdigris-ink); }
.rung__n b { display: block; font-family: var(--font-display); font-size: 2.5rem; font-weight: 700; color: var(--ink); letter-spacing: -0.03em; line-height: 1; margin-top: .35rem; font-variant-numeric: tabular-nums; }
.rung__body h3 { margin-bottom: .5rem; }
.rung__body p { color: var(--ink-muted); }
.rung__list { margin: 1rem 0 0; padding: 0; list-style: none; }
.rung__list li { position: relative; padding-left: 1.1rem; margin-bottom: .4rem; font-size: .97rem; color: var(--ink-muted); }
.rung__list li::before { content: ""; position: absolute; left: 0; top: .65em; width: 6px; height: 1px; background: var(--verdigris); }
.rung__meta { border-left: 1px solid var(--rule); padding-left: clamp(1rem, 2vw, 1.5rem); }
.rung__meta dt { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); margin-top: .9rem; }
.rung__meta dt:first-child { margin-top: 0; }
.rung__meta dd { margin: .2rem 0 0; font-weight: 600; font-size: .95rem; }
@media (max-width: 820px) {
  .rung { grid-template-columns: 60px minmax(0,1fr); }
  .rung__meta { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; padding-top: 1rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem 1.5rem; }
  .rung__meta dt:first-child { margin-top: 0; }
  .rung__n b { font-size: 1.75rem; }
}

/* -------------------------------------------------------------------------
   13b. THE PHASES + THE GOVERNANCE BAND
   Governance and enablement are not a final phase you climb to — they run
   underneath all four, from the assessment onward. The band is drawn as a
   continuous calibration line spanning the full width of the phase row so
   the layout says that before the copy does.
   ------------------------------------------------------------------------- */
.phases { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); border-top: 1px solid var(--rule-strong); }
.phase { padding: 1.4rem 1.4rem 1.6rem 0; border-right: 1px solid var(--rule); }
.phase:last-child { border-right: 0; }
.phase:not(:first-child) { padding-left: 1.4rem; }
.phase__n { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; color: var(--ink-muted); margin: 0 0 .5rem; }
.phase h3 { margin-bottom: .45rem; }
.phase p { font-size: .95rem; color: var(--ink-muted); }
/* On graphite, --ink-muted measures 2.4:1 — well under AA. The dark variant
   uses --chalk-muted (7.0:1) for every muted element in the row. */
.section--dark .phases { border-top-color: var(--rule-dark); }
.section--dark .phase { border-right-color: var(--rule-dark); }
.section--dark .phase p,
.section--dark .phase__n { color: var(--chalk-muted); }

@media (max-width: 900px) {
  .phases { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .phase:nth-child(2) { border-right: 0; }
  .phase:nth-child(-n+2) { border-bottom: 1px solid var(--rule); }
  .section--dark .phase:nth-child(-n+2) { border-bottom-color: var(--rule-dark); }
}
@media (max-width: 560px) {
  .phases { grid-template-columns: 1fr; }
  .phase { border-right: 0; border-bottom: 1px solid var(--rule); padding-left: 0 !important; }
  .phase:last-child { border-bottom: 0; }
}

/* The price line. §02 said prices are not published; the client's own
   preview publishes a starting price, so the site now shows it. */
.price { font-family: var(--font-mono); font-size: .9rem; font-weight: 500; color: var(--verdigris-ink); margin: 0 0 .2rem; font-variant-numeric: tabular-nums; }
.price + .price-note { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-muted); margin: 0 0 .8rem; }
.section--dark .price { color: var(--verdigris-light); }
.section--dark .price + .price-note { color: var(--chalk-muted); }

.band { border-top: 2px solid var(--verdigris); background: #E7F0EE; padding: clamp(1.15rem, 2.4vw, 1.6rem); }
.band__k { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--verdigris-ink); margin: 0 0 .5rem; }
.band h3 { margin-bottom: .4rem; }
.band p { color: var(--ink-muted); font-size: .95rem; max-width: 78ch; }
.band__reach { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; color: var(--verdigris-ink); margin: .75rem 0 0; display: flex; align-items: center; gap: .75rem; }
.band__reach::after { content: ""; flex: 1; height: 6px; border-bottom: 1px solid var(--verdigris);
  background-image: repeating-linear-gradient(to right, var(--verdigris) 0 1px, transparent 1px 12px);
  background-position: bottom left; background-repeat: repeat-x; }
.section--dark .band { background: #24322F; border-top-color: var(--verdigris-light); }
.section--dark .band h3 { color: var(--chalk); }
.section--dark .band p { color: var(--chalk-muted); }
.section--dark .band__k, .section--dark .band__reach { color: var(--verdigris-light); }
.section--dark .band__reach::after { border-bottom-color: var(--verdigris-light);
  background-image: repeating-linear-gradient(to right, var(--verdigris-light) 0 1px, transparent 1px 12px); }

/* Draft banner — unapproved client material, labelled in public (the client's
   own preview does this and it is more honest than a silent placeholder). */
.draft-flag {
  border: 1px solid var(--rule-strong); border-left: 3px solid var(--gauge);
  background: var(--ground-raised); padding: .85rem 1.1rem; border-radius: 2px;
  font-size: .92rem; color: var(--ink-muted); margin: 0;
}
.draft-flag strong { color: var(--ink); }
.page-hero .draft-flag { background: var(--ground-dark-2); border-color: var(--rule-dark); color: var(--chalk-muted); }
.page-hero .draft-flag strong { color: var(--chalk); }

/* -------------------------------------------------------------------------
   14. TABLES — figures use tabular numerals (brief §06)
   ------------------------------------------------------------------------- */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; }
table.data th, table.data td { text-align: left; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.data thead th { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-muted); font-weight: 400; border-bottom-color: var(--rule-strong); }
table.data td.num, table.data th.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
table.data tbody th { font-weight: 600; }

/* -------------------------------------------------------------------------
   15. QUOTES — attributed, always (brief §07 / §10)
   ------------------------------------------------------------------------- */
.quote { border-left: 3px solid var(--verdigris); padding-left: clamp(1rem, 2.5vw, 1.75rem); margin: 0; }
.quote p { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.1vw, 1.6rem); line-height: 1.35; letter-spacing: -0.015em; }
.quote footer { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .08em; color: var(--ink-muted); margin-top: 1rem; }
.section--dark .quote footer { color: var(--chalk-muted); }
.section--dark .quote { border-left-color: var(--verdigris-light); }

/* -------------------------------------------------------------------------
   16. MEDIA PLACEHOLDERS
   Brief §07: real people, real places. If we can't shoot it, we don't fake it.
   Every slot below names the actual shot required.
   ------------------------------------------------------------------------- */
.shot {
  background: var(--ground-sunken);
  border: 1px solid var(--rule-strong);
  aspect-ratio: 4 / 3;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0; border-radius: 2px;
  position: relative; overflow: hidden;
}
/* Placeholder art fills the frame; the caption naming the real shot sits on a
   scrim over it, so the slot still says what has to be photographed. */
.shot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shot figcaption, .shot > .shot__k, .shot > .shot__d { position: relative; z-index: 1; }
/* Solid band so the caption clears AA over both light and dark placeholder art,
   with a short fade above it so it doesn't cut the image with a hard edge. */
.shot figcaption {
  margin-top: auto; padding: .8rem .9rem;
  background: rgba(32, 34, 38, .93);
}
.shot figcaption::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 2.5rem;
  background: linear-gradient(to top, rgba(32, 34, 38, .93), rgba(32, 34, 38, 0));
}
.shot figcaption .shot__k { color: var(--verdigris-light); }
.shot figcaption .shot__d { color: var(--chalk); }
.shot:not(:has(img)) { border-style: dashed; padding: 1rem; }
.shot--portrait { aspect-ratio: 3 / 4; }
.shot--wide { aspect-ratio: 16 / 9; }
.shot__k { font-family: var(--font-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--verdigris-ink); margin: 0 0 .35rem; }
.shot__d { font-family: var(--font-mono); font-size: .8rem; color: var(--ink-muted); margin: 0; line-height: 1.4; }

/* -------------------------------------------------------------------------
   16b. PEOPLE
   The brief assumed two cofounders (§04). The client's own preview shows a
   team of nine across business, technical and advisory. Named people with
   real roles is what §04 was protecting — not the headcount.
   ------------------------------------------------------------------------- */
.people { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); grid-template-columns: repeat(4, minmax(0,1fr)); }
.people--2 { grid-template-columns: repeat(2, minmax(0,1fr)); max-width: 640px; }
.people--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 900px) { .people, .people--3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .people, .people--2, .people--3 { grid-template-columns: 1fr; } }
.person .shot { aspect-ratio: 1 / 1; margin-bottom: .85rem; }
.person h3 { margin-bottom: .15rem; font-size: 1.05rem; }
.person__role { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .06em; color: var(--verdigris-ink); margin: 0 0 .5rem; }
.person p { font-size: .93rem; color: var(--ink-muted); margin: 0; }
.person__todo { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-muted); }
.group-rule { border-top: 1px solid var(--rule-strong); padding-top: 1rem; margin-bottom: 1.75rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .75rem 1.25rem; }
.group-rule h3 { margin: 0; }
.group-rule .count { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }

/* -------------------------------------------------------------------------
   17. FAQ / DISCLOSURE
   ------------------------------------------------------------------------- */
.faq { border-top: 1px solid var(--rule-strong); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2rem 1.15rem 0; position: relative;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; font-family: var(--font-mono); font-size: 1.25rem; color: var(--verdigris-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding-bottom: 1.25rem; color: var(--ink-muted); max-width: var(--maxw-prose); }

/* -------------------------------------------------------------------------
   18. FORMS
   ------------------------------------------------------------------------- */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1.1rem; }
@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }
.field label { display: block; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); margin-bottom: .4rem; }
.field label .req { color: var(--verdigris-ink); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .7rem .8rem;
  background: var(--ground-raised); border: 1px solid var(--rule-strong); border-radius: 2px; color: var(--ink);
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--verdigris-ink); }
.field__hint { font-size: .85rem; color: var(--ink-muted); margin: .35rem 0 0; }
/* Consent is a sentence, not a field label — undo the mono/uppercase label style. */
.field label.check, .check {
  display: flex; gap: .7rem; align-items: flex-start;
  font-family: var(--font-body); font-size: .95rem; line-height: 1.55;
  text-transform: none; letter-spacing: normal; color: var(--ink-muted); margin-bottom: 0;
}
.check input { margin-top: .25rem; width: 1rem; height: 1rem; flex: none; }
.form__note { font-size: .85rem; color: var(--ink-muted); border-left: 2px solid var(--rule-strong); padding-left: .9rem; }
.form-status { padding: 1rem; border: 1px solid var(--verdigris); background: #E7F0EE; font-size: .95rem; border-radius: 2px; }
.form-status[hidden] { display: none; }

/* -------------------------------------------------------------------------
   19. CTA BAND
   ------------------------------------------------------------------------- */
.cta-band { background: var(--ground-dark); color: var(--chalk); padding-block: clamp(3rem, 6vw, 4.5rem); }
.cta-band h2 { color: var(--chalk); }
.cta-band p { color: var(--chalk-muted); max-width: 52ch; }
.cta-band .wrap { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 2.5rem; align-items: center; }
@media (max-width: 820px) { .cta-band .wrap { grid-template-columns: 1fr; } }

/* -------------------------------------------------------------------------
   20. FOOTER
   ------------------------------------------------------------------------- */
.site-footer { background: var(--graphite); color: var(--chalk-muted); padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; font-size: .92rem; }
.site-footer a { color: var(--chalk); text-decoration: none; }
.site-footer a:hover { color: var(--verdigris-light); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-col h4 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--chalk-muted); font-weight: 400; margin-bottom: .9rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: .5rem; }
.footer-legal { border-top: 1px solid var(--rule-dark); margin-top: 2.5rem; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: .75rem 2rem; justify-content: space-between; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .05em; }

/* -------------------------------------------------------------------------
   21. PROTOTYPE ANNOTATIONS
   Visible notes tying sections back to the brief and to open decisions (§12).
   Toggle off with the "Notes" switch in the footer.
   ------------------------------------------------------------------------- */
.note {
  font-family: var(--font-mono); font-size: .74rem; line-height: 1.5;
  background: #FBF3E3; border-left: 3px solid var(--gauge); color: #55462A;
  padding: .7rem .9rem; margin: 1rem 0; border-radius: 0 2px 2px 0;
}
.note b { color: #3D3218; }
.note--open { background: #F1EFF9; border-left-color: #6B5FA8; color: #453D66; }
.note--open b { color: #322C4D; }
html.notes-off .note { display: none !important; }
.notes-switch { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }

/* -------------------------------------------------------------------------
   22. UTILITIES
   ------------------------------------------------------------------------- */
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-muted); }
.section--dark .muted { color: var(--chalk-muted); }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.2rem); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; } .mt-3 { margin-top: 3rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-tick { list-style: none; margin: 0; padding: 0; }
.list-tick li { position: relative; padding-left: 1.4rem; margin-bottom: .6rem; }
.list-tick li::before { content: ""; position: absolute; left: 0; top: .6em; width: 9px; height: 1px; background: var(--verdigris); }
.section--dark .list-tick li::before { background: var(--verdigris-light); }
.two-col { columns: 2; column-gap: 2.5rem; }
@media (max-width: 620px) { .two-col { columns: 1; } }
