/* ════════════════════════════════════════════════════════════════════════
   Cara Analytics — stylesheet
   Theme: "working ledger". Light paper, hairline rules, navy structure,
   teal only where you should click. Numbers are set in mono and line up.
   Written to be read top to bottom: tokens → base → primitives → sections.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Fonts (self-hosted, latin subset) ─────────────────────────────────── */
@font-face {
  font-family: 'Public Sans';
  src: url('/fonts/public-sans-var-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ── Tokens ────────────────────────────────────────────────────────────── */
:root {
  /* Color. Neutrals are tinted toward the brand navy, never toward warm. */
  --paper:        oklch(98.6% 0.003 250);
  --surface:      oklch(100% 0 0);
  --surface-sunk: oklch(96.6% 0.006 250);
  --rule:         oklch(90% 0.012 250);
  --rule-strong:  oklch(80% 0.02 250);

  --ink:   oklch(24% 0.045 262);   /* body + headings — ~13:1 on paper      */
  --ink-2: oklch(44% 0.03 262);    /* secondary prose — ~7:1 on paper       */
  --ink-3: oklch(52% 0.025 262);   /* labels/placeholders — 5.5:1 on paper,
                                      still ≥4.5:1 on the sunk surface, which
                                      the lighter value it replaced was not  */

  --navy:      oklch(32% 0.09 264); /* #1f3864 */
  --navy-deep: oklch(24% 0.075 264);
  --navy-line: oklch(42% 0.06 264);

  --teal:      oklch(72% 0.12 182); /* #2dd4bf — fills, never text on paper */
  --teal-lift: oklch(78% 0.11 182);
  --teal-ink:  oklch(48% 0.09 182); /* teal as text on light: passes AA     */
  --amber:     oklch(70% 0.14 70);

  /* On dark bands */
  --on-navy:      oklch(97% 0.005 250);
  --on-navy-2:    oklch(82% 0.02 250);
  --on-navy-rule: oklch(38% 0.05 264);

  --danger: oklch(52% 0.17 27);

  /* Type */
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', monospace;

  /* Space — 8px base, used with deliberate variation */
  --s1: 0.25rem;  --s2: 0.5rem;   --s3: 0.75rem;  --s4: 1rem;
  --s5: 1.5rem;   --s6: 2rem;     --s7: 3rem;     --s8: 4rem;
  --section-y: clamp(4.5rem, 9vw, 7.5rem);

  --wrap: 1120px;
  --radius: 4px;
  --shadow-panel: 0 1px 2px oklch(24% 0.045 262 / 0.04),
                  0 8px 24px -12px oklch(24% 0.045 262 / 0.10);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);   /* ease-out-quint */
  --fast: 120ms;

  --z-sticky: 100;
  --z-dialog: 300;
  --z-toast:  400;
}

/* ── Base ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* The `hidden` attribute must win. Several elements below are display:flex or
   display:block, which would otherwise override the browser default and show
   things that are meant to be hidden (the sign-off block, the booking frame). */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* clears the sticky header on anchor jumps */
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.14;
  letter-spacing: -0.022em;
  text-wrap: balance;
  font-weight: 700;
}
h1 {
  font-size: clamp(2.15rem, 1.5rem + 3vw, 4.25rem);
  letter-spacing: -0.028em;
}
h2 { font-size: clamp(1.6rem, 1.32rem + 1.3vw, 2.5rem); }
h3 { font-size: clamp(1.075rem, 1.02rem + 0.28vw, 1.25rem); letter-spacing: -0.012em; }
h4 { font-size: 0.95rem; letter-spacing: 0; }

p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.muted { color: var(--ink-3); }
.prose { max-width: 68ch; }

/* Focus: one visible ring everywhere, including on dark bands. */
:focus-visible {
  outline: 2px solid var(--teal-ink);
  outline-offset: 2px;
  border-radius: 2px;
}
.band :focus-visible,
.site-footer :focus-visible { outline-color: var(--teal); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: var(--s4); top: -4rem;
  z-index: var(--z-toast);
  background: var(--navy); color: var(--on-navy);
  padding: var(--s3) var(--s4); border-radius: var(--radius);
  text-decoration: none; font-weight: 600;
  transition: top var(--fast) var(--ease);
}
.skip-link:focus { top: var(--s4); color: var(--on-navy); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-bd: var(--rule-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  padding: 0.7rem 1.15rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bd);
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--fast) ease, border-color var(--fast) ease,
              color var(--fast) ease;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-accent {
  --btn-bg: var(--teal);
  --btn-fg: oklch(26% 0.05 200);   /* dark ink on teal — ~7.5:1 */
  --btn-bd: var(--teal);
}
.btn-accent:hover:not(:disabled) {
  --btn-bg: var(--teal-lift);
  --btn-bd: var(--teal-lift);
}

.btn-navy { --btn-bg: var(--navy); --btn-fg: var(--on-navy); --btn-bd: var(--navy); }
.btn-navy:hover:not(:disabled) { --btn-bg: var(--navy-deep); }

.btn-ghost { --btn-bg: var(--surface); --btn-fg: var(--ink); --btn-bd: var(--rule-strong); }
.btn-ghost:hover:not(:disabled) { --btn-bd: var(--navy); }

.btn-ghost-light { --btn-bg: transparent; --btn-fg: var(--on-navy); --btn-bd: var(--on-navy-rule); }
.btn-ghost-light:hover:not(:disabled) { --btn-bd: var(--teal); }

.btn-sm  { padding: 0.5rem 0.85rem; font-size: 0.875rem; }
.btn-lg  { padding: 0.9rem 1.5rem; font-size: 1rem; }
.btn-block { display: flex; width: 100%; }
.btn-key { font-size: 0.7rem; opacity: 0.75; }

/* ── Panels ────────────────────────────────────────────────────────────── */
.panel {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-panel);
}

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: oklch(98.6% 0.003 250 / 0.92);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: saturate(1.4) blur(8px);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  min-height: 4rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.brand-mark { width: 30px; height: 30px; display: block; }
.brand-mark.sm { width: 26px; height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 1.6vw, 1.5rem);
}
.nav-links a:not(.btn) {
  color: var(--ink-2);
  font-size: 0.925rem;
  font-weight: 500;
  text-decoration: none;
  padding-block: 0.35rem;
  border-bottom: 1px solid transparent;
  transition: color var(--fast) ease, border-color var(--fast) ease;
}
.nav-links a:not(.btn):hover {
  color: var(--ink);
  border-bottom-color: var(--teal);
}
.nav-toggle { display: none; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 5rem) var(--section-y);
}
/* A faint ledger grid behind the hero. Not decoration for its own sake — it is
   the paper the numbers sit on. It lives on a pseudo-element because a mask on
   .hero itself would fade the text along with the grid. */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(to right, oklch(90% 0.012 250 / 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(90% 0.012 250 / 0.55) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 80%);
          mask-image: linear-gradient(to bottom, black, transparent 80%);
  pointer-events: none;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.hero-copy { max-width: 34rem; }

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: var(--s5);
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 100px;
  color: var(--ink-2);
  font-size: 0.8rem;
  font-weight: 500;
}
.status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px oklch(72% 0.12 182 / 0.22);
}
.lede {
  margin-top: var(--s5);
  max-width: 34rem;
  color: var(--ink-2);
  font-size: clamp(1.05rem, 1rem + 0.25vw, 1.2rem);
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3);
  margin-top: var(--s6);
}
.trust-line {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
  max-width: 32rem;
  color: var(--ink-2);
  font-size: 0.925rem;
}

/* ── The run console (the one-click demo) ──────────────────────────────── */
.console { overflow: hidden; }
.console-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: var(--s4) var(--s5);
  border-bottom: 1px solid var(--rule);
  background: var(--surface-sunk);
}
.console-title {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
}
.console-title .mono { font-size: 0.775rem; font-weight: 400; }
.console-state {
  font-size: 0.75rem;
  color: var(--ink-3);
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--rule);
  border-radius: 100px;
  background: var(--surface);
  white-space: nowrap;
}
.console-state[data-state='running'] { color: var(--teal-ink); border-color: var(--teal); }
.console-state[data-state='waiting'] { color: oklch(45% 0.11 60); border-color: var(--amber); }
.console-state[data-state='done']    { color: var(--teal-ink); border-color: var(--teal); }

.console-body { padding: var(--s5); }

/* ── The three acts: folder → command box → outputs ─────────────────────────
   Only one act is in the DOM flow at a time, so the panel does not lurch as
   the story advances. A minimum height keeps the hero from reflowing.
   ───────────────────────────────────────────────────────────────────────── */
.acts-nav {
  display: flex;
  gap: var(--s2);
  margin-bottom: var(--s5);
}
.acts-dot {
  flex: 1;
  padding-top: 0.4rem;
  border-top: 2px solid var(--rule);
  color: var(--ink-3);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 200ms var(--ease), border-color 200ms var(--ease);
}
.acts-dot.is-on {
  border-top-color: var(--teal);
  color: var(--ink);
  font-weight: 500;
}

.act { min-height: 19rem; }
.act[hidden] { display: none; }
.act-cap {
  margin-bottom: var(--s4);
  color: var(--ink-2);
  font-size: 0.85rem;
}
.act-cap .mono { color: var(--ink); font-size: 0.8rem; }

/* Act 1 — the folder tree. */
.tree { display: grid; gap: 1px; }
.tree-dir {
  display: grid;
  grid-template-columns: 1.1rem auto 1fr;
  align-items: center;
  gap: var(--s3);
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.tree-dir:last-child { border-bottom: 0; }
.tree-ico {
  width: 0.95rem; height: 0.8rem;
  border: 1px solid var(--rule-strong);
  border-radius: 1.5px;
  border-top-width: 3px;
  border-top-color: var(--ink-3);
}
.tree-dir.is-open .tree-ico {
  border-color: var(--teal);
  border-top-color: var(--teal-ink);
  background: oklch(72% 0.12 182 / 0.12);
}
.tree-name { font-size: 0.85rem; color: var(--ink); }
.tree-note { color: var(--ink-3); font-size: 0.78rem; }

.tree-sub {
  grid-column: 2 / -1;
  margin-top: var(--s2);
  padding-left: var(--s4);
  border-left: 1px solid var(--rule);
}

/* The file they double-click. It is the whole product, so it gets to look
   like an object you can actually hit. */
.tree-file {
  display: flex;
  align-items: center;
  gap: var(--s3);
  width: 100%;
  padding: var(--s3);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  transition: border-color var(--fast) ease, background var(--fast) ease,
              transform var(--fast) ease;
}
.tree-file:hover, .tree-file:focus-visible {
  border-color: var(--teal);
  background: oklch(72% 0.12 182 / 0.07);
}
.tree-file:active { transform: translateY(1px); }
.tree-file.is-hit {
  border-color: var(--teal);
  background: oklch(72% 0.12 182 / 0.18);
  animation: pulse 700ms ease-out;
}
.file-ico {
  display: grid;
  place-items: center;
  width: 1.6rem; height: 1.6rem;
  flex: none;
  background: var(--navy-deep);
  color: var(--on-navy);
  border-radius: 2px;
  font-size: 0.62rem;
}
.file-name { font-size: 0.82rem; color: var(--ink); font-weight: 500; }
.file-hint {
  margin-left: auto;
  color: var(--ink-3);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.tree-file:hover .file-hint, .tree-file:focus-visible .file-hint { color: var(--teal-ink); }

/* Act 2 — the command box. Deliberately plain: this is what the client sees,
   and its plainness is the point. */
.cmd {
  border: 1px solid var(--navy-line);
  border-radius: var(--radius);
  overflow: hidden;
}
.cmd-bar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0.4rem var(--s3);
  background: var(--navy);
  border-bottom: 1px solid var(--navy-line);
}
.cmd-dot {
  width: 0.5rem; height: 0.5rem;
  flex: none;
  background: var(--teal);
  border-radius: 50%;
}
.cmd-title { color: var(--on-navy-2); font-size: 0.7rem; }
.cmd-out {
  min-height: 9.5rem;
  margin: 0;
  padding: var(--s3);
  background: var(--navy-deep);
  color: var(--on-navy);
  font-size: 0.72rem;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}
.cmd-ok { color: var(--teal); }

/* Act 3 — the eight things sitting in the outputs folder. */
.drops { display: grid; gap: 1px; }
.drop {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding: 0.4rem 0 0.4rem var(--s4);
  border-bottom: 1px solid var(--rule);
  position: relative;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 260ms var(--ease), transform 260ms var(--ease);
}
.drop.is-in { opacity: 1; transform: none; }
.drop:last-child { border-bottom: 0; }
.drop::before {
  content: '';
  position: absolute;
  left: 0; top: 0.75rem;
  width: 0.45rem; height: 0.45rem;
  border-radius: 1px;
  background: var(--rule-strong);
}
.drop[data-kind='ai']::before    { background: var(--teal); }
.drop[data-kind='model']::before { background: var(--navy); }
.drop[data-kind='deck']::before,
.drop[data-kind='page']::before  { background: var(--amber); }
.drop-name { font-size: 0.8rem; color: var(--ink); }
.drop-note { color: var(--ink-3); font-size: 0.75rem; text-align: right; }

.drop-time {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule-strong);
}
.drop-time-was {
  color: var(--ink-3);
  font-size: 0.85rem;
  text-decoration: line-through;
}
.drop-time-arrow {
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--rule-strong), var(--teal));
}
.drop-time-now {
  color: var(--teal-ink);
  font-size: 1.05rem;
  font-weight: 500;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 oklch(72% 0.12 182 / 0.35); }
  50%      { box-shadow: 0 0 0 5px oklch(72% 0.12 182 / 0); }
}
@media (prefers-reduced-motion: reduce) {
  .tree-file.is-hit { animation: none; }
  .drop { opacity: 1; transform: none; transition: none; }
}

/* The control total. The signature object of the brand. */
.totals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--s5);
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule-strong);
}
.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s3);
  padding: 0.35rem 0;
}
.total-k { font-size: 0.72rem; color: var(--ink-3); }
.total-v { font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.total-v.is-zero { color: var(--teal-ink); }

.signoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  margin-top: var(--s5);
  padding: var(--s4);
  background: oklch(70% 0.14 70 / 0.09);
  border: 1px solid oklch(70% 0.14 70 / 0.45);
  border-radius: var(--radius);
}
.signoff-msg { font-size: 0.875rem; color: var(--ink); max-width: 26rem; }
.console-done {
  margin-top: var(--s5);
  padding: var(--s4);
  background: oklch(72% 0.12 182 / 0.10);
  border: 1px solid oklch(72% 0.12 182 / 0.45);
  border-radius: var(--radius);
  font-size: 0.875rem;
}
.console-foot {
  padding: var(--s5);
  border-top: 1px solid var(--rule);
  background: var(--surface-sunk);
}
.console-note {
  margin-top: var(--s3);
  color: var(--ink-3);
  font-size: 0.78rem;
  text-align: center;
}

/* ── Sections (light) ──────────────────────────────────────────────────── */
.section { padding-block: var(--section-y); }
.section-sunk {
  background: var(--surface-sunk);
  border-block: 1px solid var(--rule);
}
.section-head { max-width: 46rem; margin-bottom: clamp(2.25rem, 4vw, 3.25rem); }
.section-lede {
  margin-top: var(--s4);
  max-width: 62ch;
  color: var(--ink-2);
  font-size: 1.05rem;
}
.section-foot {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.95rem;
  max-width: 68ch;
}

/* ── Dark bands ────────────────────────────────────────────────────────── */
.band {
  padding-block: var(--section-y);
  background: var(--navy-deep);
  color: var(--on-navy);
}
.band h2, .band h3 { color: var(--on-navy); }
.band-head { max-width: 52rem; }
.band-head h2 { line-height: 1.22; }
.band-lede {
  margin-top: var(--s5);
  max-width: 58ch;
  color: var(--on-navy-2);
  font-size: 1.05rem;
}
.band a:not(.btn) { color: var(--teal); }

.edge-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--on-navy-rule);
}
.edge-item {
  padding: var(--s6) var(--s5) var(--s5) 0;
  border-bottom: 1px solid var(--on-navy-rule);
}
.edge-item h3 { font-size: 1.05rem; }
.edge-item p {
  margin-top: var(--s3);
  color: var(--on-navy-2);
  font-size: 0.925rem;
  max-width: 36ch;
}

/* ── Sites & apps: the featured build ──────────────────────────────────────
   Sits inside a dark band, so it lifts off the navy with a hairline and a
   barely-there wash rather than a second card colour. */
.build-feature {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--on-navy-rule);
  border-radius: var(--radius);
  background: oklch(100% 0 0 / 0.035);
}
.build-feature-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--s3);
}
.build-feature-head h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); }
.build-feature-tag {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--teal);
  border-radius: 100px;
  color: var(--teal);
  font-size: 0.7rem;
  white-space: nowrap;
}
.build-feature p {
  margin-top: var(--s4);
  max-width: 66ch;
  color: var(--on-navy-2);
  font-size: 0.95rem;
}
.build-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin-top: var(--s5);
}
.build-chip {
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--on-navy-rule);
  border-radius: 100px;
  color: var(--on-navy-2);
  font-size: 0.72rem;
}
.build-feature .btn { margin-top: var(--s5); }
.build-ext { margin-left: 0.15rem; font-size: 0.8rem; }
.build-foot {
  margin-top: var(--s6);
  padding-top: var(--s4);
  border-top: 1px solid var(--on-navy-rule);
  max-width: 68ch;
  color: var(--on-navy-2);
  font-size: 0.95rem;
}

/* ── Automation list ───────────────────────────────────────────────────── */
.auto-list { border-top: 1px solid var(--rule-strong); }
.auto-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s5);
  padding: var(--s5) var(--s4) var(--s5) 0;
  border-bottom: 1px solid var(--rule);
  transition: background var(--fast) ease;
}
.auto-row:hover { background: var(--surface); }
.auto-main { max-width: 62ch; }
.auto-main p { margin-top: var(--s2); color: var(--ink-2); font-size: 0.95rem; }
.auto-tag {
  flex: none;
  margin-top: 0.2rem;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 100px;
  background: var(--surface-sunk);
  color: var(--ink-3);
  font-size: 0.72rem;
  white-space: nowrap;
}

/* ── Steps ─────────────────────────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: var(--s6);
}
.step { padding-top: var(--s5); border-top: 2px solid var(--navy); }
.step-n {
  display: block;
  margin-bottom: var(--s4);
  color: var(--ink-3);
  font-size: 0.8rem;
  font-weight: 500;
}
.step p { margin-top: var(--s3); color: var(--ink-2); font-size: 0.95rem; }

/* ── Case study ────────────────────────────────────────────────────────── */
.case { padding: clamp(1.5rem, 3.5vw, 2.75rem); }
.case-head { padding-bottom: var(--s5); border-bottom: 1px solid var(--rule-strong); }
.case-title { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.7rem); max-width: 32ch; }
.case-who { margin-top: var(--s3); color: var(--ink-3); font-size: 0.8rem; }

/* Four cells across on a wide screen, so the case reads as one pipeline:
   problem → what I built → where AI earned its keep → result. */
.case-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
}
.case-cell {
  padding: var(--s5) var(--s5) var(--s5) 0;
  border-bottom: 1px solid var(--rule);
}
.case-cell h4 {
  color: var(--ink-3);
  font-weight: 500;
  font-family: var(--mono);
  font-size: 0.75rem;
}
.case-cell p { margin-top: var(--s3); color: var(--ink-2); font-size: 0.925rem; }
/* The AI cell is the one that matters most — it gets a tint, not a stripe. */
.case-cell-ai { background: oklch(72% 0.12 182 / 0.07); padding-inline: var(--s5); }
.case-cell-ai h4 { color: var(--teal-ink); }
.case-cell-ai p { color: var(--ink); }

.case-more { margin-top: var(--s5); }
.case-more > summary,
.faq-item > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  cursor: pointer;
  list-style: none;
  padding: var(--s4) 0;
}
.case-more > summary::-webkit-details-marker,
.faq-item > summary::-webkit-details-marker { display: none; }
.case-more-label { font-weight: 600; font-size: 0.95rem; color: var(--teal-ink); }
.case-more-icon, .faq-icon {
  flex: none;
  width: 0.6rem; height: 0.6rem;
  border-right: 1.5px solid var(--ink-3);
  border-bottom: 1.5px solid var(--ink-3);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 200ms var(--ease);
}
.case-more[open] .case-more-icon,
.faq-item[open] .faq-icon { transform: rotate(-135deg) translate(-2px, -2px); }
@media (prefers-reduced-motion: reduce) {
  .case-more-icon, .faq-icon { transition: none; }
}

.case-long { padding-top: var(--s4); border-top: 1px solid var(--rule); }
.case-long h4 {
  margin-top: var(--s6);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}
.case-long h4:first-child { margin-top: var(--s4); }
.case-long p { margin-top: var(--s3); color: var(--ink-2); }
.case-long ul { margin-top: var(--s4); display: grid; gap: var(--s3); }
.case-long li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.case-long li::before {
  content: '';
  position: absolute;
  left: 0; top: 0.7rem;
  width: 0.5rem; height: 1px;
  background: var(--rule-strong);
}
.case-long strong { color: var(--ink); }

/* ── Cost calculator ───────────────────────────────────────────────────── */
.calc-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.calc-copy { max-width: 34rem; }
.calc-copy p { margin-top: var(--s4); color: var(--ink-2); }
.calc-cta-line { margin-top: var(--s5); }

.calc { padding: clamp(1.25rem, 3vw, 2rem); }
.calc-field + .calc-field { margin-top: var(--s4); }
.calc-field label {
  display: block;
  margin-bottom: var(--s2);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 500;
}
.calc-input {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding: 0 var(--s3);
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.calc-input:focus-within {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px oklch(32% 0.09 264 / 0.12);
}
.calc-input input {
  flex: 1;
  min-width: 0;
  padding: 0.6rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 1rem;
}
.calc-input input:focus { outline: none; }
.calc-unit { color: var(--ink-3); font-size: 0.8rem; }

.calc-out {
  display: block;
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule-strong);
}
.calc-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s4);
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--rule);
}
.calc-k { color: var(--ink-3); font-size: 0.78rem; }
.calc-v { color: var(--ink); font-size: 0.95rem; font-weight: 500; }
.calc-row-total { border-bottom: 0; padding-top: var(--s3); }
.calc-row-total .calc-k { color: var(--ink-2); }
.calc-row-total .calc-v { font-size: clamp(1.35rem, 1.2rem + 0.7vw, 1.75rem); color: var(--navy); }
.calc-note { margin-top: var(--s4); color: var(--ink-3); font-size: 0.75rem; }

/* ── Pricing ───────────────────────────────────────────────────────────── */
.prices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.price {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-right: 1px solid var(--rule);
}
.price:last-child { border-right: 0; }
.price-marked { background: var(--surface-sunk); }
.price-tier {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3);
  font-size: 1rem;
}
.price-flag {
  padding: 0.15rem 0.45rem;
  border: 1px solid var(--teal);
  border-radius: 100px;
  color: var(--teal-ink);
  font-size: 0.68rem;
  font-weight: 500;
}
.price-amt {
  margin-top: var(--s5);
  font-size: 1.6rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.price-amt-2 { margin-top: 0.15rem; font-size: 0.95rem; color: var(--ink-2); min-height: 1.5rem; }
.price-per { color: var(--ink-3); font-size: 0.8rem; font-weight: 400; }
.price-note {
  margin-top: var(--s4);
  padding-top: var(--s4);
  border-top: 1px solid var(--rule);
  color: var(--ink-2);
  font-size: 0.9rem;
}
.price-feats { margin: var(--s4) 0 var(--s6); display: grid; gap: var(--s3); }
.price-feats li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--ink-2);
  font-size: 0.9rem;
}
.price-feats li::before {
  content: '';
  position: absolute;
  left: 0.15rem; top: 0.4rem;
  width: 0.32rem; height: 0.6rem;
  border: solid var(--teal-ink);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.price .btn { margin-top: auto; }

/* ── FAQ ───────────────────────────────────────────────────────────────── */
.faq-wrap { max-width: 52rem; }
.faq { border-top: 1px solid var(--rule-strong); }
.faq-item { border-bottom: 1px solid var(--rule); }
.faq-item > summary { padding: var(--s5) 0; }
.faq-item summary h3 {
  font-size: 1.05rem;
  font-weight: 600;
  transition: color var(--fast) ease;
}
.faq-item summary:hover h3 { color: var(--teal-ink); }
.faq-a { padding-bottom: var(--s5); }
.faq-a p { max-width: 66ch; color: var(--ink-2); font-size: 0.95rem; }

/* ── Audit / intake ────────────────────────────────────────────────────── */
.band-cta { background: var(--navy); }
.audit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.audit-copy { max-width: 34rem; }
.audit-points {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s6);
  padding-top: var(--s5);
  border-top: 1px solid var(--on-navy-rule);
}
.audit-points li {
  position: relative;
  padding-left: 1.5rem;
  color: var(--on-navy-2);
  font-size: 0.95rem;
}
.audit-points li::before {
  content: '';
  position: absolute;
  left: 0.15rem; top: 0.45rem;
  width: 0.35rem; height: 0.65rem;
  border: solid var(--teal);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}

.booking { margin-top: var(--s7); }
.booking-or {
  display: flex;
  align-items: center;
  gap: var(--s4);
  margin-bottom: var(--s4);
  color: var(--on-navy-2);
  font-size: 0.8rem;
}
.booking-or::before, .booking-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--on-navy-rule);
}
.booking-frame {
  margin-top: var(--s4);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.booking-frame iframe { display: block; width: 100%; height: 620px; border: 0; }

.audit-form { padding: clamp(1.5rem, 3vw, 2rem); }
.field + .field { margin-top: var(--s4); }
.field label {
  display: block;
  margin-bottom: var(--s2);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 600;
}
.field .opt { color: var(--ink-3); font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  transition: border-color var(--fast) ease, box-shadow var(--fast) ease;
}
.field textarea { resize: vertical; min-height: 6rem; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px oklch(32% 0.09 264 / 0.12);
}
.field input[aria-invalid='true'], .field textarea[aria-invalid='true'] { border-color: var(--danger); }
.field-err { margin-top: var(--s2); color: var(--danger); font-size: 0.8rem; font-weight: 500; }
.field-hint { margin-top: var(--s2); color: var(--ink-3); font-size: 0.75rem; text-align: right; }

/* Honeypot: moved off-screen rather than display:none — bots skip fields that
   are display:none, which defeats the point. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}
#turnstile-mount:not(:empty) { margin-top: var(--s4); }
#submit-btn { margin-top: var(--s5); }

.form-msg { margin-top: var(--s4); font-size: 0.9rem; }
.form-msg:empty { margin: 0; }
.form-msg[data-tone='ok'] {
  padding: var(--s4);
  background: oklch(72% 0.12 182 / 0.12);
  border: 1px solid oklch(72% 0.12 182 / 0.5);
  border-radius: var(--radius);
  color: var(--ink);
}
.form-msg[data-tone='err'] {
  padding: var(--s4);
  background: oklch(52% 0.17 27 / 0.07);
  border: 1px solid oklch(52% 0.17 27 / 0.35);
  border-radius: var(--radius);
  color: var(--danger);
}
.form-fine { margin-top: var(--s4); color: var(--ink-3); font-size: 0.75rem; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer {
  padding-block: var(--s7);
  background: var(--navy-deep);
  color: var(--on-navy-2);
  border-top: 1px solid var(--navy-line);
}
.footer-inner { display: grid; gap: var(--s4); }
.site-footer .brand { color: var(--on-navy); }
.footer-line { max-width: 48ch; font-size: 0.9rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s5);
  padding-top: var(--s4);
  border-top: 1px solid var(--on-navy-rule);
}
.footer-links a { color: var(--teal); font-size: 0.9rem; text-decoration: none; }
.footer-links a:hover { color: var(--on-navy); text-decoration: underline; }
.footer-legal { font-size: 0.75rem; color: oklch(72% 0.02 250); }

/* ── Scroll reveal ─────────────────────────────────────────────────────────
   Content is visible by default. JS adds .reveal-ready to <html>, which arms
   the animation. If JS never runs (or the page renders headlessly), every
   section still shows — the reveal can only enhance, never hide.
   ───────────────────────────────────────────────────────────────────────── */
.reveal-ready .reveal { opacity: 0; transform: translateY(12px); }
.reveal-ready .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal-ready .reveal { opacity: 1; transform: none; }
  .reveal-ready .reveal.is-in { transition: none; }
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .hero-grid,
  .calc-wrap,
  .audit-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy, .calc-copy, .audit-copy { max-width: 40rem; }
  .console, .audit-form, .calc { max-width: 34rem; }
  .edge-item { padding-right: var(--s4); }
}

/* The nav collapses earlier than everything else. Measured: brand + seven
   links + the button need ~900px of header, so anything under 1000px runs the
   row off the edge. Its own breakpoint, so pricing and the automation list can
   keep their wider layouts down to 820px. */
@media (max-width: 1000px) {
  /* Nav collapses to a disclosure. No overlay, no scroll lock — it is seven
     links, not an app shell. */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem; height: 2.5rem;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--rule-strong);
    border-radius: var(--radius);
    cursor: pointer;
  }
  .nav-toggle-bars,
  .nav-toggle-bars::before,
  .nav-toggle-bars::after {
    display: block;
    width: 16px; height: 1.5px;
    background: var(--ink);
    transition: transform 200ms var(--ease), opacity 120ms ease;
  }
  .nav-toggle-bars { position: relative; }
  .nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; }
  .nav-toggle-bars::before { top: -5px; }
  .nav-toggle-bars::after  { top: 5px; }
  .nav-toggle[aria-expanded='true'] .nav-toggle-bars { background: transparent; }
  .nav-toggle[aria-expanded='true'] .nav-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
  .nav-toggle[aria-expanded='true'] .nav-toggle-bars::after  { transform: translateY(-5px) rotate(-45deg); }

  .nav-links {
    /* The header's padding box is the containing block here, so 0/0 already
       spans the full header width — offsetting by the wrap padding would push
       the panel off-screen and create a horizontal scrollbar. */
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--s3) clamp(1.25rem, 4vw, 2.5rem) var(--s5);
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-panel);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--rule); }
  .nav-links li:last-child { border-bottom: 0; padding-top: var(--s4); }
  .nav-links li:last-child .btn { width: 100%; padding-block: 0.8rem; }
  .nav-links a:not(.btn) { display: block; padding: var(--s4) 0; font-size: 1rem; }
}

@media (max-width: 820px) {
  .auto-row { flex-direction: column; gap: var(--s3); }
  .auto-tag { margin-top: 0; align-self: flex-start; }
  .price { border-right: 0; border-bottom: 1px solid var(--rule); }
  .price:last-child { border-bottom: 0; }
  .case-cell-ai { padding-inline: var(--s4); }
  .case-cell { padding-right: var(--s3); }
}

@media (max-width: 480px) {
  .totals { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .btn { width: 100%; }
  .signoff { flex-direction: column; align-items: stretch; }
  .signoff .btn { width: 100%; }
  .console-head { flex-wrap: wrap; }

  /* The demo: filenames are long and non-breaking, so give each one its own
     line rather than letting it fight the note for horizontal room. */
  .act { min-height: 0; }
  .acts-dot { font-size: 0.62rem; }
  .tree-dir { grid-template-columns: 1.1rem auto; row-gap: 0.15rem; }
  .tree-note { grid-column: 2; }
  .tree-sub { grid-column: 1 / -1; padding-left: var(--s3); }
  .tree-file { flex-wrap: wrap; }
  .file-hint { margin-left: 0; }
  .drop { flex-direction: column; align-items: flex-start; gap: 0.1rem; }
  .drop-note { text-align: left; }
  .cmd-out { font-size: 0.65rem; }
}

/* Print: the page is a document. Let it read like one. */
@media print {
  .site-header, .console, .booking, .audit-form { display: none; }
  body { background: #fff; color: #000; }
  .band, .band-cta { background: #fff; color: #000; border: 1px solid #ccc; }
  .band h2, .band h3, .band-lede, .audit-points li { color: #000; }
}
