/* ==========================================================================
   D2 "Material" master — Northbeam Practice (fictional)
   Implements DESIGN-SYSTEM.md exactly. Shadow is a verb, not a noun.
   ========================================================================== */

/* ---- §1 Fonts (self-hosted, no CDN) ------------------------------------ */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2-variations");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

/* ---- §3 §5 §6 §7 Tokens -------------------------------------------------- */
:root {
  /* color (§5) — one tinted-neutral ramp + ONE cobalt */
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --ink: #101319;
  --ink-2: #525C6B;
  --line: rgba(16, 19, 25, .08);
  --line-hover: rgba(16, 19, 25, .16);
  --accent: #2143C8;
  --accent-ink: #FFFFFF;
  --footer-muted: #8A93A1; /* 5.99:1 on --ink (§8 footer) */

  /* spacing (§3) */
  --s1: .25rem;
  --s2: .5rem;
  --s3: 1rem;
  --s4: 1.5rem;
  --s5: 2rem;
  --s6: 3rem;
  --s7: 5rem;
  --s8: 8rem;
  --s9: 12rem;

  /* radius (§7) — five tokens only */
  --r-outer: 16px;
  --r-inner: 8px;
  --r-control: 10px;
  --r-frame: 12px;
  --r-pill: 999px;

  /* elevation (§6) — rationed */
  --e1-shadow: 0 1px 2px rgba(16, 19, 25, .04), 0 8px 24px rgba(16, 19, 25, .05);
  --e2-shadow: 0 2px 4px rgba(16, 19, 25, .06), 0 12px 24px rgba(16, 19, 25, .08), 0 32px 64px rgba(16, 19, 25, .10);

  /* type faces (§1) */
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;        /* §2 body */
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

/* ---- §2 Type scale — 6 tokens sitewide ---------------------------------- */
.t-display {
  font-size: clamp(3rem, 6.5vw, 4.75rem);
  line-height: 1.04;
  letter-spacing: -.03em;
  font-weight: 500; /* never bold — Ramp: confidence via size */
}
.t-title {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 500;
}
.t-lede {
  font-size: 1.3125rem;
  line-height: 1.5;
  letter-spacing: -.005em;
  font-weight: 400;
  color: var(--ink-2);
  max-width: 32em;
}
.t-small {
  font-size: .875rem;
  line-height: 1.5;
}
.mono-label {
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.4;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
}
.mono-label.is-accent { color: var(--accent); } /* §5: section eyebrows only */
.mono-label.is-muted { color: var(--ink-2); }   /* tile/card labels stay neutral to hold the ≤4 accent cap */

p { max-width: 38em; } /* §2 body measure */

/* Phrase-unit line breaks (§2): keep a sentence-phrase together so display
   headlines never rag mid-phrase. Released on narrow viewports where a long
   phrase would overflow — there the natural wrap is acceptable. */
.nb { white-space: nowrap; }
@media (max-width: 30rem) { .nb { white-space: normal; } }

h1, h2, h3 { font-weight: 500; }

/* links — Watershed rule: one blue, everywhere interactive (§5) */
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

/* ---- §11 Focus — one deliberate ring ------------------------------------ */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.site-footer :focus-visible,
.mobile-menu :focus-visible { outline-color: #FFFFFF; }
/* on the accent fill the ring flips to white and sits INSIDE the fill —
   a +3px white ring on a light page would be invisible */
.btn-primary:focus-visible { outline-color: #FFFFFF; outline-offset: -4px; }

/* ---- §11 Skip link ------------------------------------------------------- */
.skip-link {
  position: fixed;
  top: var(--s3);
  left: var(--s3);
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  padding: var(--s2) var(--s3);
  border-radius: var(--r-control);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-300%);
  transition: transform 150ms ease-out;
}
.skip-link:focus { transform: translateY(0); }
.skip-link:focus-visible { outline-color: #FFFFFF; }

/* ---- Layout: 12-col, 80rem, gutter 1.5rem (§4) --------------------------- */
.container {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 2rem;
}
.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* section rhythm (§3): s8 desktop / s7 tablet / s6 mobile */
.section { padding-block: var(--s8); }
.section-after-head { padding-top: var(--s6); } /* first section after a page-head */

@media (max-width: 60rem) {
  .section { padding-block: var(--s7); }
}
@media (max-width: 40rem) {
  .container { padding-inline: 1rem; }
  .section { padding-block: var(--s6); }
}

/* ---- Whisper dot-grid (§4) — hero + footer bands only, ≤3% contrast ------ */
.dot-grid {
  background-image: radial-gradient(rgba(16, 19, 25, .045) 1px, transparent 1px);
  background-size: 24px 24px;
}
.site-footer.dot-grid {
  background-image: radial-gradient(rgba(244, 245, 247, .05) 1px, transparent 1px);
}

/* ==========================================================================
   §8 Components
   ========================================================================== */

/* ---- Buttons: exactly two (§8) ------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  min-height: 44px;                 /* §11 WCAG 2.5.5 */
  padding: var(--s2) var(--s4);
  border-radius: var(--r-control);
  font-family: var(--sans);
  font-size: .875rem;               /* small */
  font-weight: 600;                 /* semibold: button labels only (§1) */
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn-primary:hover { background: #1B38A8; border-color: #1B38A8; }
.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-secondary:hover { border-color: var(--line-hover); }
.btn-lg {
  min-height: 52px;                 /* §11 fold CTA */
  padding: var(--s4) var(--s5);
  font-size: 1rem;
}
.fold-cta-row { margin-top: var(--s5); }

/* ---- Nav (§8): surface, hairline, wordmark + 5 links + 1 primary --------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.site-nav.is-scrolled {
  box-shadow: 0 2px 4px rgba(16, 19, 25, .06); /* e2's first layer only, after scroll */
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 4.25rem;
}
.wordmark {
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s5);
  list-style: none;
  padding: 0;
}
.nav-links a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
}
.nav-links a:not(.btn):hover { color: var(--accent); }
/* current-page marker stays ink (underline, not color) — protects §5's ≤4 accent cap per viewport */
.nav-links a[aria-current="page"]:not(.btn) {
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--ink);
}

/* mobile menu — true overlay: e2 (§6) */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--ink);
  color: var(--bg);
  padding: var(--s5);
}
.mobile-menu.is-open { display: flex; flex-direction: column; }
.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mobile-menu .wordmark { color: var(--bg); }
.menu-close {
  background: transparent;
  border: 1px solid rgba(244, 245, 247, .3);
  border-radius: var(--r-control);
  color: var(--bg);
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  font-size: 1rem;
}
.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin-top: var(--s6);
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}
.mobile-menu ul a {
  color: var(--bg);
  text-decoration: none;
  font-size: clamp(1.75rem, 3vw, 2.25rem); /* title token */
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 500;
}
.mobile-menu .btn-primary { margin-top: var(--s5); align-self: flex-start; }

@media (max-width: 56rem) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ---- Hero (Home): Ramp left-rail (§4) ------------------------------------ */
.hero { padding-block: var(--s8) var(--s7); }
.hero-rail { max-width: 44rem; } /* everything keyed to one left margin; right half whitespace */
.hero-rail > * + * { margin-top: var(--s6); } /* ~s6 steps */
.hero-rail .t-lede { margin-top: var(--s4); }

@media (max-width: 40rem) {
  .hero { padding-block: var(--s6); }
}

/* Hero CTA row — email + button fused in one pill-card (§8).
   e0 at rest: the product-frame below is the fold's single e1 (§6/§10.4 —
   never two e1 in one viewport). The cobalt Get-the-price-sheet button is
   the fold's conversion element; the frame carries the elevation. */
.hero-cta-card {
  display: flex;
  align-items: center;
  gap: var(--s2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: var(--s2);
  max-width: 30rem;
}
.hero-cta-card input[type="email"] {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: var(--s2) var(--s3);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  min-height: 44px;
}
.hero-cta-card input::placeholder { font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); }
.hero-cta-card .btn-primary { border-radius: var(--r-pill); flex-shrink: 0; }
@media (max-width: 30rem) {
  .hero-cta-card { flex-direction: column; align-items: stretch; border-radius: var(--r-outer); }
}

/* ---- Product-frame (§8): browser-chrome card, e1, cropped by fold -------- */
.product-frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-frame);
  box-shadow: var(--e1-shadow);
  overflow: hidden;
}
.frame-chrome {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line);
}
.frame-dot {
  width: 10px; height: 10px;
  border-radius: var(--r-pill);
  background: var(--line);
}
.frame-url {
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--ink-2);
  margin-left: var(--s2);
}
.hero-frame-crop {
  margin-top: var(--s7);
}
.hero-frame-crop .product-frame {
  max-height: 22rem; /* cropped by the fold — invites scroll */
}

/* ---- Signature moment: the managed service working (pure HTML/CSS, no raster).
   Two panels — plain-words request (left) → staged change flips LIVE + a booking
   toast lands (right). Cobalt ONLY on the live/interactive elements; everything
   else stays neutral to hold §5's ≤4-accent cap. */
.frame-desk {
  display: grid;
  grid-template-columns: 5fr 7fr;
  min-height: 19rem; /* fits inside the 22rem fold crop so the LIVE flip shows */
}
.frame-ask {
  border-right: 1px solid var(--line);
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.frame-ask .mono-label { color: var(--ink-2); }
.ask-bubble {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  padding: var(--s3) var(--s4);
  font-size: .9375rem;
  line-height: 1.5;
  color: var(--ink);
  max-width: none;
}
.ask-meta { color: var(--ink-2); font-size: .75rem; }
.frame-stage {
  position: relative;
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.frame-stage .mono-label { color: var(--ink-2); }
.stage-card {
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  overflow: hidden;
}
.stage-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  font-size: .875rem;
  border-bottom: 1px solid var(--line);
}
.stage-row .mono-cell { font-family: var(--mono); font-size: .8125rem; color: var(--ink-2); }
.stage-status {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  background: var(--bg);
}
/* the one cobalt element: staged → LIVE */
.stage-badge {
  font-family: var(--mono);
  font-size: .8125rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 2px var(--s2);
  border-radius: var(--r-pill);
}
.stage-badge-note { color: var(--ink-2); font-size: .75rem; }

/* lead notification toast — slides in once, quiet e1 card. Stays neutral so the
   frame contributes exactly ONE accent element (the Live flip) to the fold's
   ≤4-accent cap (§5); the ink left-rule reads as "new" without spending cobalt. */
.lead-toast {
  position: absolute;
  right: var(--s4);
  bottom: var(--s4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 2px solid var(--ink);
  border-radius: var(--r-inner);
  box-shadow: var(--e1-shadow);
  padding: var(--s3) var(--s4);
  max-width: 15rem;
}
.lead-toast .mono-label { color: var(--ink-2); margin-bottom: var(--s1); }
.lead-line { font-size: .875rem; color: var(--ink); max-width: none; }

@media (max-width: 40rem) {
  .frame-desk { grid-template-columns: 1fr; }
  .frame-ask { border-right: 0; border-bottom: 1px solid var(--line); }
}

/* ---- Proof dock (§8): 3-col stat strip, hairline dividers, no cards ------ */
.proof-dock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof-cell { padding: var(--s5) var(--s5) var(--s5) 0; }
.proof-cell + .proof-cell {
  border-left: 1px solid var(--line);
  padding-left: var(--s5);
}
.proof-cell .mono-label { color: var(--ink-2); margin-bottom: var(--s2); }
.proof-value {
  font-family: var(--mono);
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.25rem); /* title token size, mono voice */
  line-height: 1.15;
  letter-spacing: -.02em;
}
@media (max-width: 40rem) {
  .proof-dock { grid-template-columns: 1fr; }
  .proof-cell + .proof-cell { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: var(--s4); }
  .proof-cell { padding-block: var(--s4); }
}

/* ---- Cards: e0 rest, hover earns elevation (§6) --------------------------- */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);   /* e0 — no shadow at rest */
  border-radius: var(--r-outer);
  padding: var(--s5);              /* §3 card min */
}
a.card { display: block; color: inherit; text-decoration: none; }
.card-lift { transition: transform 200ms ease-out, box-shadow 200ms ease-out, border-color 200ms ease-out; }
.card-lift:hover, .card-lift:focus-within {
  transform: translateY(-2px);
  box-shadow: var(--e1-shadow);
  border-color: var(--line-hover);
}

/* stretched card link: title is the link, whole card the target */
.stretch { color: inherit; text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }

/* ---- Bento (§4 §8): NEVER uniform, gap 1rem, spans map to priority ------- */
.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}
.bento > * { grid-column: span 12; }
.bento-tile { padding: var(--s6); } /* §3: hero/feature tiles s6 */
.bento-tile .mono-label { margin-bottom: var(--s3); }
.bento-tile h3 { margin-bottom: var(--s2); }
.bento-tile p { color: var(--ink-2); font-size: 1rem; }
.tile-price {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .875rem;
  margin-top: var(--s3);
}
.tile-link {
  display: inline-block;
  margin-top: var(--s3);
  font-weight: 500;
  font-size: .875rem;
}
@media (min-width: 56rem) {
  .bento .span-8 { grid-column: span 8; }
  .bento .span-6 { grid-column: span 6; }
  .bento .span-4 { grid-column: span 4; }
  .bento .row-2 { grid-row: span 2; }
}

/* hero tile carries proof: an embedded stat block, not decoration */
.tile-proof {
  margin-top: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  padding: var(--s4);
  display: flex;
  gap: var(--s5);
  flex-wrap: wrap;
}
.tile-proof .mono-label { margin-bottom: var(--s1); color: var(--ink-2); }
.tile-proof-value { font-family: var(--mono); font-weight: 500; font-size: 1.3125rem; }

/* ---- Pricing: table-as-card (§8) ----------------------------------------- */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-outer);
  overflow: hidden;
}
.pricing-card table {
  width: 100%;
  border-collapse: collapse;
}
.pricing-card th, .pricing-card td {
  text-align: left;
  padding: var(--s4) var(--s5);
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.pricing-card thead th {
  border-top: 0;
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-2);
}
.pricing-card td.price, .pricing-card th.price {
  text-align: right;
  font-family: var(--mono);
  font-weight: 500;
  white-space: nowrap;
}
.pricing-card td .t-small { color: var(--ink-2); max-width: 32em; }

/* ≤40rem the table reflows (§13 amendment): service + price share the first
   line, description drops below. Prices are never clipped or scrolled away. */
@media (max-width: 40rem) {
  .pricing-card thead {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
  .pricing-card table,
  .pricing-card tbody { display: block; }
  .pricing-card tbody tr {
    display: grid;
    grid-template-columns: 1fr auto;
    column-gap: var(--s3);
    align-items: baseline;
    padding: var(--s4);
    border-top: 1px solid var(--line);
  }
  .pricing-card tbody tr:first-child { border-top: 0; }
  .pricing-card tbody th,
  .pricing-card tbody td { padding: 0; border-top: 0; }
  .pricing-card tbody th { grid-row: 1; grid-column: 1; }
  .pricing-card tbody td.price { grid-row: 1; grid-column: 2; }
  .pricing-card tbody td:not(.price) { grid-row: 2; grid-column: 1 / -1; margin-top: var(--s1); }
}

/* ---- Page head (interior, §4): left col 1–7, right col 8–12 = proof ------ */
.page-head { padding-block: var(--s7) var(--s6); }
.page-head-grid { align-items: end; }
.page-head-main { grid-column: 1 / 8; }
.page-head-main .mono-label { margin-bottom: var(--s3); }
.page-head-main .t-lede { margin-top: var(--s4); }
.page-head-proof {
  grid-column: 8 / 13;
  display: flex;
  flex-direction: column;
  gap: var(--s4);
  border-left: 1px solid var(--line);
  padding-left: var(--s5);
}
.page-head-proof .mono-label { color: var(--ink-2); margin-bottom: var(--s1); }
.stat-value {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 1.3125rem;
  line-height: 1.4;
}
@media (max-width: 56rem) {
  .page-head-main { grid-column: 1 / 13; }
  .page-head-proof {
    grid-column: 1 / 13;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: var(--s4);
    flex-direction: row;
    gap: var(--s6);
    flex-wrap: wrap;
  }
}

/* ---- Tabs (§8): Attio full-width segmented bar ---------------------------- */
.tabs { position: relative; border-bottom: 1px solid var(--line); }
.tablist {
  display: flex;
  gap: 0;
  position: relative;
}
.tab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: var(--s3) var(--s3) calc(var(--s3) - 2px);
  font-family: var(--sans);
  font-size: .875rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  min-height: 44px;
  border-bottom: 2px solid transparent;
}
.tab[aria-selected="true"] { color: var(--accent); }
.tab-indicator {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  transition: transform 200ms ease-out, width 200ms ease-out; /* §9 moment 3 */
  will-change: transform, width;
}
.tabpanel { padding-top: var(--s6); }
.tabpanel[hidden] { display: none; }
@media (max-width: 40rem) {
  .tablist { overflow-x: auto; }
  .tab { flex: 0 0 auto; padding-inline: var(--s3); }
}

/* ---- Blog cards (§8) ------------------------------------------------------ */
.blog-card { padding: var(--s4); }
.blog-card-img {
  border-radius: var(--r-inner);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--bg);
  border: 1px solid var(--line);
}
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-card .mono-label { margin-top: var(--s3); color: var(--ink-2); }
.blog-card h2, .blog-card h3 { margin-top: var(--s2); font-size: 1.3125rem; line-height: 1.3; letter-spacing: -.01em; }
.blog-card p { margin-top: var(--s2); color: var(--ink-2); font-size: .875rem; }
.blog-grid { row-gap: 1.5rem; }
.blog-grid > * { grid-column: span 12; }
@media (min-width: 56rem) {
  .blog-grid .span-6 { grid-column: span 6; }
  .blog-grid .span-4 { grid-column: span 4; }
}

/* ---- Article (blog post) ---------------------------------------------------
   §13 amendment: reading pages sit on a CENTERED measure (editorial pattern),
   not the left rail. Data tables + outro break out to a wider centered band. */
.article-head { padding-block: var(--s7) var(--s5); }
.article-head .mono-label { margin-bottom: var(--s3); }
.article-head .t-lede { margin-top: var(--s4); }
.article-head,
.article-body {
  display: grid;
  grid-template-columns: 1fr min(38rem, 100%) 1fr;
}
.article-head > *,
.article-body > * { grid-column: 2; }
.article-body { padding-bottom: var(--s8); }
.article-body p { margin-top: var(--s4); color: var(--ink); }
.article-body h2 { margin-top: var(--s6); font-size: 1.3125rem; letter-spacing: -.01em; }
.article-body ul { margin-top: var(--s4); padding-left: 1.25em; }
.article-body li { margin-top: var(--s2); }
.article-body > .pricing-card {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 56rem;
  margin: var(--s5) auto 0;
}

/* end-of-article CTA band — e0 card, differentiated label (§13 amendment) */
.article-outro {
  grid-column: 1 / -1;
  width: 100%;
  max-width: 56rem;
  margin: var(--s7) auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-outer);
  padding: var(--s5) var(--s6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s5);
  flex-wrap: wrap;
}
.article-outro .mono-label { color: var(--ink-2); margin-bottom: var(--s2); }
.article-outro .btn { flex-shrink: 0; }
@media (max-width: 40rem) {
  .article-outro { padding: var(--s5); }
}

/* ---- Forms (§8 §11) --------------------------------------------------------- */
.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-outer);
  padding: var(--s6);
}
.form-card.is-e1 { box-shadow: var(--e1-shadow); } /* the page's single e1 (booking form) */
.form-grid { display: grid; gap: var(--s4); }
.field label {
  display: block;
  font-size: .875rem;
  font-weight: 500;
  margin-bottom: var(--s2);
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  padding: var(--s2) var(--s3);
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  min-height: 44px;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input::placeholder, .field textarea::placeholder {
  font-family: var(--mono);
  font-size: .8125rem;
  color: var(--ink-2);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(33, 67, 200, .15);
}
.field .field-error {
  display: none;
  font-size: .875rem;
  color: #B4231F; /* semantic red: form validation only (§5) */
  margin-top: var(--s1);
}
.field.is-invalid input { border-color: #B4231F; }
.field.is-invalid .field-error { display: block; }
.form-note {
  font-size: .875rem;
  color: var(--ink-2);
  margin-top: var(--s3);
}
.form-note.is-success { color: #1D6B3A; } /* semantic green: validation states only */

/* ---- Footer (§8): ink ground, bg text ------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding-block: var(--s7) var(--s5);
  margin-top: var(--s8);
}
.footer-signoff {
  font-size: clamp(1.75rem, 3vw, 2.25rem); /* title size */
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 500;
  max-width: 22em;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s4);
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid rgba(244, 245, 247, .12);
}
.footer-cols h2 {
  font-family: var(--mono);
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--footer-muted);
  margin-bottom: var(--s3);
}
.footer-cols ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: var(--s2); }
.footer-cols a { color: var(--bg); text-decoration: none; font-size: .875rem; }
.footer-cols a:hover { text-decoration: underline; }
.footer-cols .t-small { color: var(--footer-muted); }
.footer-legal {
  font-family: var(--mono);
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--footer-muted);
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid rgba(244, 245, 247, .12);
  max-width: none;
}
@media (max-width: 56rem) {
  .footer-cols { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 30rem) {
  .footer-cols { grid-template-columns: 1fr; }
}

/* ---- Contact fold: head + booking form ------------------------------------ */
.contact-fold { padding-block: var(--s7); }
.contact-head { grid-column: 1 / 6; }
.contact-head .mono-label { margin-bottom: var(--s3); }
.contact-head .t-lede { margin-top: var(--s4); }
.contact-form-col { grid-column: 6 / 13; }
.contact-meta { margin-top: var(--s6); display: flex; flex-direction: column; gap: var(--s4); }
.contact-meta .mono-label { color: var(--ink-2); margin-bottom: var(--s1); }

/* What-happens-next: extends the info column to balance the form height (§4).
   Hairline-divided steps, no cards, no extra accent — matches the proof-dock voice. */
.next-steps {
  list-style: none;
  padding: 0;
  margin-top: var(--s6);
  border-top: 1px solid var(--line);
}
.next-steps li {
  padding-block: var(--s4);
  border-bottom: 1px solid var(--line);
}
.next-steps .mono-label { color: var(--ink-2); margin-bottom: var(--s2); }
.next-steps li p:last-child { color: var(--ink-2); }
@media (max-width: 56rem) {
  .contact-head, .contact-form-col { grid-column: 1 / 13; }
  .contact-form-col { margin-top: var(--s5); }
}

/* ---- Section headers ------------------------------------------------------- */
.section-head { margin-bottom: var(--s6); }
.section-head .mono-label { margin-bottom: var(--s3); }
.section-head .t-lede { margin-top: var(--s3); }

/* ---- Prose splits (about) ---------------------------------------------------- */
.split { align-items: start; }
.split-a { grid-column: 1 / 6; }
.split-b { grid-column: 7 / 13; }
@media (max-width: 56rem) {
  .split-a, .split-b { grid-column: 1 / 13; }
}
.fact-list { list-style: none; padding: 0; display: flex; flex-direction: column; }
.fact-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  padding-block: var(--s3);
  border-top: 1px solid var(--line);
  font-size: 1rem;
}
.fact-list li:last-child { border-bottom: 1px solid var(--line); }
.fact-list .mono-cell { font-family: var(--mono); font-weight: 500; font-size: .875rem; white-space: nowrap; }

/* ==========================================================================
   §9 Motion — 3 moments, 150–250ms, ease-out, once each
   ========================================================================== */

/* (1) hero block rises 16px + fades on load, 60ms stagger, base state solid */
@keyframes rise-in {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise-in 250ms ease-out backwards; }
.rise-1 { animation-delay: 0ms; }
.rise-2 { animation-delay: 60ms; }
.rise-3 { animation-delay: 120ms; }
.rise-4 { animation-delay: 180ms; }

/* (2) card hover lift — .card-lift above */
/* (3) tab underline slide — .tab-indicator above */
/* (4, Home only) proof-dock count-up — app.js, once, IntersectionObserver */

/* Signature-moment loop (Home product-frame): the staged change goes live and
   the booking toast lands — one calm 200ms ease-out flip + slide, on a slow
   ~9s loop that reads as "the desk running", not a marquee. Base state solid. */
.stage-badge {
  animation: stage-live 9s ease-in-out infinite;
}
@keyframes stage-live {
  0%, 12%   { background: var(--ink-2); }         /* staged (neutral) */
  18%, 88%  { background: var(--accent); }        /* flips to live (cobalt), holds */
  100%      { background: var(--ink-2); }
}
.lead-toast {
  animation: lead-in 9s ease-in-out infinite;
}
@keyframes lead-in {
  0%, 30%   { opacity: 0; transform: translateY(8px); }  /* not yet arrived */
  38%, 90%  { opacity: 1; transform: translateY(0); }    /* slid in, holds */
  100%      { opacity: 0; transform: translateY(8px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .card-lift, .card-lift:hover { transition: none; transform: none; }
  .tab-indicator { transition: none; }
  .skip-link { transition: none; }
  /* signature-moment loop: freeze on the final "live + booked" state */
  .stage-badge { animation: none; background: var(--accent); }
  .lead-toast { animation: none; opacity: 1; transform: none; }
  /* counter: app.js checks the media query and renders the final value */
}

/* ---- Utilities ---------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.arrow { font-family: var(--mono); }
