/* =============================================================================
   styles.css - forest dark theme.
   Design tokens, layout, components and motion for the whole page.

   Ground is a deep forest stack (forest / pine / moss panels) with bone type,
   ONE accent (amber) and ONE signal colour (terracotta) reserved for stale /
   updates / DENIED states. Measured WCAG ratios are noted beside each token.
   Every body-text pair clears 4.5:1 and every border or diagram stroke that
   carries meaning clears the 3:1 UI floor against the deepest ground.

   The page is theme-locked: dark everywhere, no section inverts.
   ========================================================================== */

/* ------------------------------------------------------------------ Fonts -- */
/* Self-hosted so the page has no third-party font request. Geist and Geist
   Mono are variable fonts; one file covers the whole weight axis. */
@font-face {
  font-family: "Geist";
  src: url("fonts/geist-var.woff2") format("woff2-variations"),
       url("fonts/geist-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-var.woff2") format("woff2-variations"),
       url("fonts/geist-mono-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* --- Forest grounds --------------------------------------------------- */
  --bg: #0f1a16;         /* page ground - deep forest */
  --bg-2: #131f1a;       /* alternating section band - pine */
  --surface: #17241f;    /* cards - moss panel */
  --surface-2: #1d2c26;  /* inset panels, rows */
  --surface-3: #24352d;  /* deepest inset - code, tracks */

  /* --- Type ------------------------------------------------------------- */
  --text: #ede9df;       /* 14.68:1 on --bg, 10.68:1 on --surface-3 */
  --text-2: #c8d0c7;     /* 11.28:1 on --bg,  8.20:1 on --surface-3 */
  --muted: #93a29a;      /*  6.68:1 on --bg,  4.85:1 on --surface-3 */

  /* --- Rules ------------------------------------------------------------ */
  --border: #24352d;         /* decorative hairline (1.38:1) - never load-bearing */
  --border-strong: #6e8479;  /* interactive + meaningful borders, 4.44:1 on --bg,
                                3.23:1 on --surface-3 - clears the 3:1 UI floor */

  /* --- Accent: amber ---------------------------------------------------- */
  --accent: #d9a441;       /* 7.91:1 on --bg, 5.76:1 on --surface-3 */
  --accent-deep: #e8bc63;  /* 10.01:1 on --bg - hover / raised state */
  --accent-wash: #241f14;  /* tinted fill; --accent on it = 7.29:1 */

  /* --- Signal: terracotta. Stale / updates / DENIED only ---------------- */
  --warn: #e8795a;         /* 6.20:1 on --bg, 4.51:1 on --surface-3 */
  --warn-deep: #f0917a;    /* raised state on dark */
  --warn-wash: #2a1a15;    /* --warn on it = 5.82:1 */

  /* --- Diagram strokes -------------------------------------------------- */
  --stroke: #c8d0c7;       /* primary strokes, 11.28:1 on --bg */
  --stroke-soft: #6e8479;  /* dashed / secondary strokes, 4.44:1 on --bg */

  /* --- Contrast ink: text that sits ON the accent ----------------------- */
  --on-accent: #0f1a16;    /* 7.91:1 on --accent - primary button label */

  /* Type stack */
  --font-display: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Consolas, monospace;

  /* Layout */
  --container: 1120px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-lift: 0 18px 44px -22px rgba(0, 0, 0, 0.75);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* The page commits to one theme. Tell the UA so form controls, scrollbars and
   the address bar follow rather than fighting it. */
:root { color-scheme: dark; }

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-wrap: break-word; /* guard against long unbroken strings overflowing cards */
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--font-mono); font-size: 0.92em; }

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

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

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--text);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 600;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ----------------------------------------------------------------- Nav --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--border); }

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--container);
  margin-inline: auto;
  padding: 14px clamp(20px, 5vw, 40px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; }
.brand-name { font-family: var(--font-display); letter-spacing: -0.01em; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--bg);           /* 15.81:1 on --text */
  background: var(--text);
}
.brand-mark.small { width: 28px; height: 28px; font-size: 0.76rem; border-radius: 6px; }

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
}
.nav-menu a {
  display: inline-block;
  padding: 8px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.92rem;
  white-space: nowrap;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
}
.nav-menu a:hover { color: var(--text); background: var(--bg-2); }
.nav-menu a.active { color: var(--text); }
.nav-menu a.active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 3px;
  border-radius: 2px;
  background: var(--accent);
}

.nav-cta {
  color: var(--text) !important;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}
.nav-cta:hover { background: var(--bg-2); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  padding: 11px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle-bar {
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------------------------------------------------------- Hero --- */
/* ---------------------------------------------------------------- Hero ---
   Asymmetric split, copy left and a real product screenshot right. Top
   padding is capped so the copy sits high rather than floating mid-viewport. */
.hero {
  padding: clamp(56px, 8vh, 96px) 0 clamp(56px, 8vh, 88px);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy { min-width: 0; }

.hero-eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* Short leading rule instead of a bare floating label. */
.hero-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  flex: none;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.032em;
  margin: 0;
  color: var(--text);
  text-wrap: balance;
}
.hero-rotator {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  transition: opacity 0.25s var(--ease);
  white-space: nowrap;
}
.hero-rotator.swap { opacity: 0; }

.hero-tagline {
  max-width: 54ch;
  margin: 24px 0 0;
  font-size: clamp(1rem, 1.4vw, 1.09rem);
  color: var(--text-2);
}

/* ------------------------------------------------------- Hero console ---
   The live vault console. Same engine as /portal/, running in this column.
   Fixed min-height so the hero does not jump when results change length. */
.hero-console {
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.vc {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  max-height: 68vh;
}

/* search bar */
.vc-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}
.vc-slash {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1;
  color: var(--muted);
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  padding: 4px 7px;
}
.vc-input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 4px 0;
}
.vc-input::placeholder { color: var(--muted); }
.vc-input:focus { outline: none; }
.vc-bar:focus-within { box-shadow: inset 0 0 0 2px var(--accent); }

/* identity + freshness controls */
.vc-controls {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.vc-ids { display: flex; gap: 6px; }
.vc-id {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--muted);
  transition: color 0.18s var(--ease), border-color 0.18s var(--ease),
              background 0.18s var(--ease);
}
.vc-id:hover { color: var(--text-2); border-color: var(--text-2); }
.vc-id[aria-checked="true"] {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-wash);
}
.vc-id-name { font-family: var(--font-mono); font-size: 0.76rem; }
.vc-id-role { font-size: 0.68rem; color: var(--muted); }

.vc-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  background: transparent;
  border: 0;
  padding: 4px;
  color: var(--muted);
  font-size: 0.76rem;
}
.vc-switch.is-on { color: var(--text); }
.vc-track {
  width: 34px;
  height: 19px;
  border-radius: 100px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  position: relative;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.vc-switch.is-on .vc-track { background: var(--accent-wash); border-color: var(--accent); }
.vc-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.vc-switch.is-on .vc-thumb { transform: translateX(15px); background: var(--accent); }

/* preset chips */
.vc-chips {
  flex: none;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
}
.vc-chip {
  flex: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.74rem;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  padding: 5px 11px;
  transition: color 0.16s var(--ease), border-color 0.16s var(--ease);
}
.vc-chip:hover { color: var(--text); border-color: var(--accent); }
.vc-chip:active { transform: scale(0.97); }

/* entitlement readout: the wall, visible */
.vc-wall {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 10px 16px 0;
  font-size: 0.72rem;
}
.vc-wall-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.62rem;
  color: var(--muted);
}
.vc-part {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
}
.vc-part.is-in { color: var(--text-2); background: var(--surface-2); }
.vc-part.is-walled {
  color: var(--warn);
  border-color: var(--warn);
  background: var(--warn-wash);
  text-decoration: line-through;
}

.vc-meta {
  flex: none;
  margin: 0;
  padding: 8px 16px 10px;
  font-size: 0.74rem;
  color: var(--muted);
}

/* results */
.vc-results {
  list-style: none;
  margin: 0;
  padding: 0 10px 12px;
  overflow-y: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
}
.vc-row {
  position: relative;
  overflow: hidden;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  border-left: 2px solid transparent;
}
.vc-row + .vc-row { margin-top: 4px; }
.vc-row.is-stale { border-left-color: var(--warn); background: var(--warn-wash); }
.vc-row.is-injected { border-left-color: var(--accent); background: var(--accent-wash); }
.vc-row.is-reordered { border-left-color: var(--accent); }

.vc-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.vc-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 2px 6px;
  border-radius: 3px;
  border: 1px solid;
}
.vc-badge.is-stale { color: var(--warn); border-color: var(--warn); }
.vc-badge.is-updated,
.vc-badge.is-surfaced,
.vc-badge.is-moved { color: var(--accent); border-color: var(--accent); }

.vc-title {
  margin: 0 0 3px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text);
}
.vc-path {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0 0 6px;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  color: var(--muted);
}
.vc-path code { font: inherit; color: var(--muted); }
.vc-score, .vc-date { color: var(--muted); }
.vc-flag {
  margin: 0 0 6px;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--warn);
}
.vc-row.is-injected .vc-flag { color: var(--accent); }
.vc-excerpt {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-2);
}
.vc-empty { padding: 22px 14px; color: var(--muted); font-size: 0.82rem; }
.vc-empty p { margin: 0; }
.vc-fallback { padding: 26px; margin: 0; color: var(--muted); font-size: 0.85rem; }

/* skeleton, in the shape of the results it precedes */
.vc-skel {
  display: block;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: vc-shimmer 1.4s ease-in-out infinite;
}
.vc-skel-input { height: 20px; width: 60%; }
.vc-skel-row { padding: 12px 14px; display: grid; gap: 7px; }
.vc-skel-title { height: 13px; width: 55%; }
.vc-skel-meta { height: 9px; width: 38%; }
.vc-skel-line { height: 9px; width: 100%; }
.vc-skel-line.short { width: 72%; }
@keyframes vc-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

/* results animate in per row, cheaply, via a custom-property stagger */
@media (prefers-reduced-motion: no-preference) {
  .vc-row {
    animation: vc-in 0.34s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 42ms);
  }
  @keyframes vc-in {
    from { opacity: 0; transform: translateY(7px); }
    to { opacity: 1; transform: none; }
  }
}

/* -------------------------------------------------------- Scroll rail ---
   Two pixels under the header. Uses a scroll-linked animation where the
   browser has one, so the progress never touches the main thread. */
.scroll-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
  background: transparent;
}
.scroll-rail-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}
@supports (animation-timeline: scroll()) {
  .scroll-rail.is-native .scroll-rail-fill {
    animation: rail-grow linear both;
    animation-timeline: scroll(root block);
  }
  @keyframes rail-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---------------------------------------------------- Spotlight cards ---
   A radial highlight positioned from --mx/--my, which motion.js writes on
   pointermove. The glow is a pseudo-element so it never affects layout. */
.pillar-card, .rule-card, .road-card, .side-card, .vc-row { position: relative; }
.pillar-card::before,
.rule-card::before,
.road-card::before,
.side-card::before,
.vc-row::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.28s var(--ease);
  background: radial-gradient(
    240px circle at var(--mx, 50%) var(--my, 50%),
    rgba(217, 164, 65, 0.10),
    transparent 62%
  );
}
.pillar-card.is-lit::before,
.rule-card.is-lit::before,
.road-card.is-lit::before,
.side-card.is-lit::before,
.vc-row.is-lit::before { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .pillar-card::before, .rule-card::before, .road-card::before,
  .side-card::before, .vc-row::before { display: none; }
  .vc-skel { animation: none; }
}

/* ------------------------------------------------------------ Counters --- */
.stat-value.is-counting { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------- Copy on click --- */
.is-copyable { cursor: copy; position: relative; }
.is-copyable:hover { color: var(--accent); }
.is-copyable.just-copied::after {
  content: "copied";
  position: absolute;
  top: -6px; right: 0;
  transform: translateY(-100%);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  padding: 2px 6px;
  border-radius: 3px;
  white-space: nowrap;
}

/* --------------------------------------------------------- Magnetic CTA --- */
.btn-primary, .nav-cta, .contact-btn.primary { will-change: transform; }

/* ------------------------------------------------------- Numbers band ---
   Out of the hero on purpose: the hero carries the claim, this carries the
   evidence. Mono figures, hairline separation, no cards. */
.stats-band {
  padding: clamp(26px, 4vh, 40px) 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease), color 0.18s var(--ease);
}

.btn-primary {
  color: var(--on-accent);      /* 7.91:1 on --accent */
  background: var(--accent);
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

.btn-ghost {
  color: var(--text);
  background: transparent;
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface); border-color: var(--text-2); }

.hero-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 40px);
}
.hero-stats li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
  border-left: 1px solid var(--border-strong);
}
.hero-stats .stat-value {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.hero-stats .stat-label {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 26ch;
}

/* -------------------------------------------------------------- Sections - */
.section { padding: clamp(64px, 10vh, 108px) 0; position: relative; }
.section-alt {
  background: var(--bg-2);
  border-block: 1px solid var(--border);
}

.section-head { max-width: 660px; margin-bottom: 48px; }
.section-kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--accent);
}
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 12px 0 0;
  color: var(--text);
}
.section-lead { color: var(--text-2); margin: 16px 0 0; font-size: 1.02rem; }

.subhead {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2.4vw, 1.4rem);
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}
.subhead-lead { color: var(--text-2); margin: 10px 0 24px; max-width: 68ch; font-size: 0.98rem; }

/* --------------------------------------------------- Split copy + card --- */
.split-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}
.split-copy p { margin: 0 0 18px; font-size: 1.04rem; color: var(--text-2); max-width: 72ch; }
.split-copy p:last-child { margin-bottom: 0; }

.side-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 88px;
}
.side-card h3 { font-family: var(--font-display); margin: 0 0 18px; font-size: 1rem; }
.side-facts { margin: 0; display: grid; gap: 16px; }
.side-facts dt { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.side-facts dd { margin: 4px 0 0; font-weight: 500; font-size: 0.94rem; color: var(--text-2); }
.side-card-link { display: inline-block; margin-top: 22px; color: var(--accent); font-weight: 600; }
.side-card-link:hover { color: var(--accent-deep); text-decoration: underline; }

/* ------------------------------------------------------------- Pillars --- */
/* Not three equal columns. 7/5 on the first row, full width on the second,
   where the third layer carries a real screenshot beside its copy. */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 22px);
  align-items: stretch;
}
.pillar-1 { grid-column: span 7; }
.pillar-2 { grid-column: span 5; }
/* Specificity note: the shared .pillar-card rule below sets display:flex, so
   the wide cell has to out-rank it rather than merely follow it. */
.pillar-card.pillar-3 {
  grid-column: span 12;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
}
.pillar-shot {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.pillar-shot img { display: block; width: 100%; height: auto; }

.pillar-card,
.rule-card,
.road-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.2s var(--ease);
}
.pillar-card:hover,
.rule-card:hover,
.road-card:hover { border-color: var(--border-strong); }

.pillar-card { padding: 26px 24px 24px; }
.pillar-body { display: flex; flex-direction: column; min-width: 0; height: 100%; }
.pillar-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.1rem, 2vw, 1.28rem);
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}
.pillar-blurb { color: var(--text-2); margin: 0 0 20px; font-size: 0.95rem; }

.pillar-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  margin-top: 4px;
}
.pillar-points li {
  position: relative;
  padding-left: 20px;
  font-size: 0.89rem;
  color: var(--muted);
}
.pillar-points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 10px;
  width: 9px;
  height: 1px;
  background: var(--border-strong);
}

/* ------------------------------------------------------------ Demos ------ */
/* Shared shell for the two interactive blocks (freshness toy, wall toggle). */
.demo {
  margin-top: clamp(48px, 7vw, 76px);
  padding: clamp(22px, 3.5vw, 34px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.demo-head { max-width: 68ch; }
.demo-kicker {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.demo-head .subhead-lead { margin-bottom: 0; }

.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 20px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.demo-query { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.demo-query code {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text);
}
.demo-query-note { font-size: 0.82rem; color: var(--muted); }

/* Switch (role="switch" button) */
.switch-wrap { display: inline-flex; align-items: center; gap: 12px; }
.switch-label { font-size: 0.86rem; font-weight: 600; color: var(--text-2); }
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.switch:hover { border-color: var(--text-2); }
.switch-track {
  display: block;
  position: relative;
  width: 38px;
  height: 20px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.switch-thumb {
  position: absolute;
  top: 2px; left: 2px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-2);
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.switch[aria-checked="true"] { color: var(--accent-deep); }
.switch[aria-checked="true"] .switch-track { background: var(--accent-wash); border-color: var(--accent); }
.switch[aria-checked="true"] .switch-thumb { transform: translateX(18px); background: var(--accent); }

/* Result list ------------------------------------------------------------ */
.result-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  counter-reset: rank;
}
.result {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 12px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: var(--radius);
}
.result::before {
  content: counter(rank);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--muted);
  padding-top: 2px;
}
.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
}
.result-path {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-all;
}
.result-meta { font-size: 0.78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.result-excerpt { margin: 6px 0 0; font-size: 0.88rem; color: var(--text-2); }
.result-fm {
  display: inline-block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border-radius: 4px;
  padding: 1px 7px;
}
.result-flag {
  margin: 8px 0 0;
  padding: 8px 11px;
  border-radius: 4px;
  font-size: 0.84rem;
  background: var(--surface-2);
  color: var(--text-2);
  border-left: 2px solid var(--border-strong);
}
.result-why { margin: 8px 0 0; font-size: 0.84rem; color: var(--muted); }

.result-badge {
  align-self: center;
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
  border: 1px solid;
}
/* Signal colour only for the stale / updates states. */
.result.is-stale, .result.is-info { border-left-color: var(--warn); }
.result.is-stale .result-badge,
.result.is-info .result-badge {
  color: var(--warn-deep); background: var(--warn-wash); border-color: var(--warn);
}
.result.is-stale .result-flag,
.result.is-info .result-flag {
  background: var(--warn-wash); color: var(--warn-deep); border-left-color: var(--warn);
}
.result.is-surfaced, .result.is-moved { border-left-color: var(--accent); }
.result.is-surfaced .result-badge,
.result.is-moved .result-badge,
.result.is-tie .result-badge {
  color: var(--accent-deep); background: var(--accent-wash); border-color: var(--accent);
}
.result.is-surfaced .result-flag { background: var(--accent-wash); color: var(--accent-deep); border-left-color: var(--accent); }
.result.is-tie { border-left-color: var(--border-strong); }

.demo-caption { margin: 18px 0 0; font-size: 0.9rem; color: var(--muted); max-width: 78ch; }

.const-list {
  margin: 26px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}
.const-list dt {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text);
}
.const-list dd { margin: 3px 0 0; font-size: 0.86rem; color: var(--muted); max-width: 78ch; }

/* Wall toggle ------------------------------------------------------------ */
.demo-scenario {
  margin: 22px 0 20px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--text-2);
}

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
}
.segmented-tab {
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.segmented-tab:hover { color: var(--text); }
.segmented-tab[aria-selected="true"] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}

.wall-panel { margin-top: 22px; }
.wall-panel[hidden] { display: none; }
.wall-verdict {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid;
  margin-bottom: 14px;
}
.wall-verdict.is-warn { color: var(--warn-deep); background: var(--warn-wash); border-color: var(--warn); }
.wall-verdict.is-ok { color: var(--accent-deep); background: var(--accent-wash); border-color: var(--accent); }

.wall-cols {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(20px, 3vw, 32px);
  align-items: start;
}
.wall-steps { margin: 0; padding: 0 0 0 1.1em; display: grid; gap: 10px; }
.wall-steps li { font-size: 0.92rem; color: var(--text-2); }
.wall-note { margin: 16px 0 0; font-size: 0.9rem; color: var(--muted); }

.touch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.touch-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  padding: 11px 13px;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.touch-list li::before {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.35;
}
.touch-list li.is-read { color: var(--text-2); }
.touch-list li.is-read::before { content: "●"; color: var(--border-strong); }
.touch-list li.is-never {
  color: var(--accent-deep);
  background: var(--accent-wash);
  border-color: var(--accent);
}
.touch-list li.is-never::before { content: "-"; color: var(--accent); }
.wall-panel.is-warn .touch-list li.is-read:last-child {
  color: var(--warn-deep);
  background: var(--warn-wash);
  border-color: var(--warn);
}
.wall-panel.is-warn .touch-list li.is-read:last-child::before { color: var(--warn); }

.touch-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin: 0 0 10px;
}

.audit-block { margin-top: 22px; }
.audit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.audit-list li {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface-3);
  border-left: 3px solid var(--border-strong);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text-2);
  overflow-x: auto;
}
.audit-list li.is-denied {
  background: var(--warn-wash);
  border-left-color: var(--warn);
  color: var(--warn-deep);
}
.audit-note { margin: 12px 0 0; font-size: 0.84rem; color: var(--muted); }

/* ----------------------------------------------------------- Compliance -- */
.pullquote {
  margin: 0 0 40px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
}
.pullquote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--text);
}
.pullquote figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.86rem;
}

.compliance-intro { margin-bottom: 40px; }

.rule-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2vw, 20px);
}
.rule-card { padding: 22px; }
.rule-title {
  font-family: var(--font-display);
  font-size: 0.98rem;
  margin: 0 0 8px;
  color: var(--text);
}
.rule-body { margin: 0; color: var(--text-2); font-size: 0.93rem; }

.checks-block { margin-top: clamp(48px, 7vw, 76px); }

/* Filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.filter-chip {
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text-2);
  font-weight: 600;
  font-size: 0.88rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color 0.15s var(--ease), background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.filter-chip:hover { color: var(--text); background: var(--bg-2); }
.filter-chip.active {
  color: var(--bg);
  background: var(--text);
  border-color: var(--text);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.15s var(--ease);
}
.check:hover { border-color: var(--border-strong); }
.check.hide { display: none; }
.check-mark {
  flex: none;
  display: grid;
  place-items: center;
  width: 21px; height: 21px;
  margin-top: 3px;
  border-radius: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);   /* 7.14:1 paper on pine */
}
.check-body { display: flex; flex-direction: column; gap: 3px; }
.check-cat {
  font-family: var(--font-display);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
}
.check-text { font-size: 0.93rem; color: var(--text-2); }

/* --------------------------------------------------------- Architecture -- */
.diagram-figure { margin: 0; }

.diagram-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: clamp(14px, 2vw, 22px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  -webkit-overflow-scrolling: touch;
}
.diagram {
  display: block;
  width: 100%;
  min-width: 940px;
  height: auto;
}

/* Thin dark strokes on the light ground. No glow, no gradient. */
.diag-box {
  fill: var(--surface);
  stroke: var(--stroke);
  stroke-width: 1.2;
  transition: fill 0.2s var(--ease), stroke 0.2s var(--ease), stroke-width 0.2s var(--ease);
}
/* The gateway is the one box drawn heavier. Deliberately NOT tinted, so it
   never competes with the stepper's accent highlight. */
.diag-box.is-accent { fill: var(--surface-2); stroke: var(--stroke); stroke-width: 2; }
.diag-label {
  fill: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}
.diag-sub {
  fill: var(--muted);
  font-family: var(--font-body);
  font-size: 11.5px;
  text-anchor: middle;
}
.diag-pill { fill: var(--surface-2); stroke: var(--stroke); stroke-width: 1.1; }
.diag-pill.is-blocked {
  fill: none;
  stroke: var(--stroke-soft);
  stroke-dasharray: 5 4;
}
.diag-pill-label {
  fill: var(--text);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-anchor: middle;
}
.diag-pill-label.is-blocked { fill: var(--muted); }
.diag-pill-note {
  fill: var(--accent);
  font-family: var(--font-body);
  font-size: 10px;
  text-anchor: middle;
}
.diag-pill-note.is-blocked { fill: var(--warn); }
.diag-arrow { stroke: var(--stroke); stroke-width: 1.3; }
.diag-arrowhead { fill: var(--stroke); }
.diag-edge {
  fill: var(--muted);
  font-family: var(--font-body);
  font-size: 10px;
  text-anchor: middle;
}

/* Stepper emphasis: the current stage is highlighted, the others are left at
   full contrast rather than dimmed — dimming is what makes ink on paper fail. */
.diag-stage.is-current .diag-box {
  fill: var(--accent-wash);
  stroke: var(--accent);
  stroke-width: 2.4;
}
.diag-marker { fill: var(--accent); opacity: 0; transition: opacity 0.2s var(--ease); }
.diag-stage.is-current .diag-marker { opacity: 1; }
.diag-conn.is-current .diag-arrow { stroke: var(--accent); stroke-width: 2; }
.diag-conn.is-current .diag-arrowhead { fill: var(--accent); }
.diag-conn.is-current .diag-edge { fill: var(--accent-deep); font-weight: 600; }

.diagram-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 26px;
  margin: 16px 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.diagram-legend li { display: flex; align-items: center; gap: 9px; }
.legend-swatch {
  flex: none;
  width: 26px; height: 14px;
  border-radius: 4px;
  background: var(--surface-2);
  border: 1px solid var(--stroke);
}
.legend-swatch.is-blocked {
  background: transparent;
  border: 1px dashed var(--stroke-soft);
}
.diagram-figure figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.88rem;
  max-width: 78ch;
}

/* Stepper ---------------------------------------------------------------- */
.stepper {
  margin-top: clamp(32px, 5vw, 48px);
  padding: clamp(20px, 3vw, 28px);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.stepper-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.stepper-controls { display: inline-flex; align-items: center; gap: 8px; }
.step-btn {
  padding: 8px 15px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: background 0.15s var(--ease), border-color 0.15s var(--ease);
}
.step-btn:hover:not(:disabled) { background: var(--bg-2); border-color: var(--text-2); }
.step-btn:disabled { color: var(--muted); border-color: var(--border); cursor: default; opacity: 0.7; }
.step-count {
  font-family: var(--font-mono);
  font-size: 0.84rem;
  color: var(--muted);
  min-width: 4.2ch;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.step-dots { list-style: none; display: flex; gap: 6px; margin: 18px 0 0; padding: 0; }
.step-dots li { flex: 1 1 0; }
.step-dot {
  display: block;
  width: 100%;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--surface-3);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.step-dot:hover { background: var(--border-strong); }
.step-dot[aria-current="step"] { background: var(--accent); }

.step-panel {
  margin-top: 18px;
  padding: 18px 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  min-height: 150px;
}
.step-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.step-body { margin: 0; color: var(--text-2); font-size: 0.94rem; }
.step-hint { margin: 14px 0 0; font-size: 0.82rem; color: var(--muted); }

/* ------------------------------------------------------------- Roadmap --- */
.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(14px, 2vw, 20px);
}
.road-card { padding: 22px; }
.status-pill {
  align-self: flex-start;
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid;
}
.status-pill.isshipped {
  color: var(--accent-deep);
  background: var(--accent-wash);
  border-color: var(--accent);
}
.status-pill.isplanned {
  color: var(--muted);
  background: var(--surface-2);
  border-color: var(--border-strong);
}
.status-pill.islearned {
  color: var(--warn-deep);
  background: var(--warn-wash);
  border-color: var(--warn);
}
.road-card.isplanned { background: var(--bg); }
.road-card.islearned { border-color: var(--warn); }
.road-title {
  font-family: var(--font-display);
  font-size: 1.04rem;
  letter-spacing: -0.015em;
  margin: 12px 0 8px;
  color: var(--text);
}
.road-body { margin: 0; color: var(--text-2); font-size: 0.93rem; }

/* -------------------------------------------------------------- Contact -- */
.contact-card {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  padding: clamp(32px, 5vw, 56px);
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
}
.contact-card .section-title { margin-top: 8px; }
.contact-lead { color: var(--text-2); margin: 16px auto 28px; max-width: 54ch; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 600;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.contact-btn:hover { background: var(--bg-2); border-color: var(--text-2); }
.contact-btn.primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.contact-btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.contact-btn svg { width: 18px; height: 18px; }

.noscript-note { color: var(--muted); }

/* -------------------------------------------------------------- Footer --- */
.site-footer { border-top: 1px solid var(--border); padding: 30px 0; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.footer-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; }
.footer-note { color: var(--muted); font-size: 0.84rem; margin: 0; }
.footer-top { color: var(--muted); font-weight: 600; }
.footer-top:hover { color: var(--text); }

/* ------------------------------------------------------------- Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------- Responsive ---- */
@media (max-width: 1040px) {
  .nav-menu a { padding: 8px 9px; font-size: 0.88rem; }
  /* Bento collapses to a single column; the third layer's screenshot drops
     below its copy rather than beside it. */
  .pillar-grid { grid-template-columns: 1fr; }
  .pillar-1, .pillar-2, .pillar-card.pillar-3 { grid-column: auto; }
  .pillar-card.pillar-3 { display: flex; flex-direction: column; gap: 22px; }
  .pillar-points { margin-top: 0; }
}

@media (max-width: 880px) {
  /* Hero collapses to a single column: copy first, screenshot under it. */
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .hero-console { order: 2; }
  .vc { min-height: 440px; max-height: none; }
  .hero-tagline { max-width: none; }
  .hero-stats { grid-template-columns: 1fr; }
  .hero-stats .stat-label { max-width: none; }

  .nav-toggle { display: flex; }
  .nav-menu {
    position: fixed;
    inset: 64px 14px auto 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    box-shadow: var(--shadow-lift);
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease);
  }
  .nav-menu.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-menu a { padding: 11px 13px; font-size: 0.98rem; }
  .nav-menu a.active::after { display: none; }
  .nav-cta { text-align: center; }

  .split-grid { grid-template-columns: 1fr; }
  .side-card { position: static; }
  .rule-grid { grid-template-columns: 1fr; }
  .roadmap-grid { grid-template-columns: 1fr; }
  .wall-cols { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hero-eyebrow { letter-spacing: 0.18em; }
  .hero-stats { gap: 20px; }
  .hero-rotator { white-space: normal; }
  .contact-actions { flex-direction: column; }
  .contact-btn { justify-content: center; }
  .footer-inner { justify-content: center; text-align: center; }
  .check { padding: 13px 15px; }
  .demo-bar { flex-direction: column; align-items: stretch; }
  .switch-wrap { justify-content: space-between; }
  .stepper-bar { flex-direction: column; align-items: stretch; }
  .stepper-controls { justify-content: space-between; }
  .segmented { display: flex; }
  .segmented-tab { flex: 1 1 auto; }
  .result { grid-template-columns: 22px 1fr; gap: 9px; padding: 12px 13px; }
  .result-path { font-size: 0.79rem; }
}

@media (max-width: 380px) {
  .contact-card { padding: 22px; }
  .hero-stats { gap: 16px; }
  .pillar-card, .rule-card, .road-card { padding: 18px; }
  .pullquote { padding: 20px; }
  .demo { padding: 18px; }
  .stepper { padding: 16px; }
}
