/* ==========================================================================
   RevuFlex — /assets/home.css
   Self-contained stylesheet for the homepage (index.html).

   WHY SEPARATE FROM site.css: the four legal pages + the proposal/invoice
   status pages share /assets/site.css, whose body text is legal-reviewed and
   whose layout must not shift. The homepage owns its own stylesheet so it can
   evolve freely with zero risk to those pages. Tokens are duplicated here on
   purpose — one stylesheet per page beats one shared file both pages only
   half-use.

   MOTION CONTRACT (this file is the enforcement point):
   - Nothing that carries content starts hidden unless BOTH
     `@supports (animation-timeline: view())` AND
     `@media (prefers-reduced-motion: no-preference)` hold. A browser without
     scroll-driven animation, or a visitor who asked for less motion, gets a
     complete, fully-painted page — never a blank one.
   - The H1 and the hero artifact are painted at first paint. The LCP element
     is never faded in.
   - Only transform / opacity / clip-path / filter are animated. Never width,
     height, top, margin or padding.
   - No wheel interception, no scroll-snap, no smooth-scroll library, no intro
     gate. "Continuous" is achieved with a fixed background field and sticky
     pinning, at the visitor's own scroll speed.
   - Reveals complete within 400ms including stagger.
   ========================================================================== */

/* ---------- 0. FONTS ----------
   Subset to the character set this page actually uses (ASCII + the
   typographic marks in the copy), variable weight axis retained. Declared
   here rather than via /assets/fonts/fonts.css so the homepage costs ONE
   stylesheet request; the legal pages keep using the full faces unchanged. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('/assets/fonts/space-grotesk-latin.sub.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin.sub.woff2') format('woff2');
}

/* ---------- 1. TOKENS ---------- */
:root {
  color-scheme: dark;

  --bg-0: #06070C;
  --bg-1: #0B0D16;
  --bg-2: #10131F;
  --bg-glass: rgba(129,140,248,0.05);
  --bg-glass-strong: rgba(129,140,248,0.09);
  --bg-nav: rgba(6,7,12,0.72);

  --text-1: #EEF0FA;
  --text-2: #B4B9D2;
  --text-3: #858CAB;
  --text-on-accent: #FFFFFF;

  --indigo-600: #4F46E5;
  --indigo-500: #6366F1;
  --indigo-400: #818CF8;
  --indigo-300: #A5B4FC;
  --glow-soft: 0 0 0 1px rgba(99,102,241,0.22), 0 8px 32px -8px rgba(79,70,229,0.35);
  --glow-strong: 0 0 0 1px rgba(99,102,241,0.40), 0 12px 48px -8px rgba(79,70,229,0.55);

  --prompt-green: #6A9955;
  --amber: #F0B429;

  --hairline: rgba(148,155,190,0.14);
  --hairline-strong: rgba(148,155,190,0.24);
  --radius-s: 6px; --radius-m: 10px; --radius-l: 16px; --radius-xl: 22px;

  --sp-1: .5rem; --sp-2: 1rem; --sp-3: 1.5rem; --sp-4: 2rem;
  --sp-6: 3rem;  --sp-8: 4rem;  --sp-12: 6rem;
  --section-pad: clamp(3.5rem, 7vw, 5.75rem);
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --content-max: 1180px;
  --prose-max: 68ch;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 320ms;
}

/* ---------- 2. BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-padding-top: 5.5rem;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  background: var(--bg-0);
  color: var(--text-2);
  font-family: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--indigo-300); text-decoration: none; }
a:hover { color: var(--indigo-400); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--indigo-600); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--radius-m) 0;
}
.skip:focus { left: 0; }

/* ---------- 3. THE CONTINUOUS FIELD ----------
   The "endless" quality without touching the scroll wheel: one fixed field
   behind every section, so sections dissolve into one another instead of
   stacking as discrete slabs. Fixed attachment means it costs nothing to
   scroll — no parallax maths, no scroll listener.                            */
.field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 78% -8%,  rgba(79,70,229,0.20), transparent 62%),
    radial-gradient(90%  60% at 8%  32%,  rgba(99,102,241,0.10), transparent 60%),
    radial-gradient(80%  55% at 92% 78%,  rgba(129,140,248,0.08), transparent 62%),
    var(--bg-0);
}
/* Fine engineering grid, faded out so it never competes with text. */
.field::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(148,155,190,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148,155,190,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 15%, transparent 72%);
}

/* ---------- 4. TYPOGRAPHY ---------- */
h1, h2, h3, h4 {
  color: var(--text-1);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: balance;
}
h1 { font-size: clamp(2.3rem, 1.45rem + 2.6vw, 3.72rem); letter-spacing: -0.033em; line-height: 1.07; }
h2 { font-size: clamp(1.9rem, 1.35rem + 2.4vw, 3.1rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem); letter-spacing: -0.015em; }

p { max-width: var(--prose-max); }
strong { color: var(--text-1); font-weight: 600; }

.eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--indigo-300);
  margin-bottom: var(--sp-3);
}
.eyebrow .n { color: var(--text-3); }

.lead {
  font-size: clamp(1.075rem, 1rem + 0.42vw, 1.32rem);
  color: var(--text-2);
  line-height: 1.6;
}

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

/* ---------- 5. LAYOUT ---------- */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
section { position: relative; padding-block: var(--section-pad); }
.section-head { margin-bottom: var(--sp-6); max-width: 62ch; }
.section-head h2 { margin-bottom: var(--sp-3); }
.section-head p { color: var(--text-2); }

/* ---------- 6. NAV ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg-nav);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out);
}
.site-nav.stuck { border-bottom-color: var(--hairline); }
.nav-inner {
  max-width: var(--content-max); margin-inline: auto;
  padding: 0.95rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
}
.brand {
  display: inline-flex; align-items: center; gap: .55rem;
  color: var(--text-1); font-weight: 600; font-size: 1.06rem; letter-spacing: -0.01em;
}
.brand .prompt { color: var(--prompt-green); font-family: 'JetBrains Mono', monospace; }
.nav-right { display: flex; align-items: center; gap: var(--sp-3); }
.nav-links { display: flex; gap: var(--sp-3); }
.nav-links a {
  color: var(--text-2); font-size: 0.93rem;
  padding: .35rem 0; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--indigo-400);
  transition: right var(--dur) var(--ease-out);
}
.nav-links a:hover { color: var(--text-1); }
.nav-links a:hover::after { right: 0; }

.nav-menu { display: none; position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; color: var(--text-2);
  font-size: 0.9rem; padding: .4rem .7rem;
  border: 1px solid var(--hairline); border-radius: var(--radius-s);
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu nav {
  position: absolute; right: 0; top: calc(100% + .5rem);
  background: var(--bg-1); border: 1px solid var(--hairline);
  border-radius: var(--radius-m); padding: .5rem; min-width: 190px;
  display: flex; flex-direction: column; box-shadow: 0 18px 50px -12px rgba(0,0,0,.7);
}
.nav-menu nav a { padding: .55rem .7rem; border-radius: var(--radius-s); color: var(--text-2); }
.nav-menu nav a:hover { background: var(--bg-glass); color: var(--text-1); }

/* ---------- 7. BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .78rem 1.4rem;
  border-radius: var(--radius-m);
  font-size: 0.95rem; font-weight: 600; font-family: inherit;
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              box-shadow var(--dur) var(--ease-out);
}
.btn-primary {
  background: var(--indigo-600); color: var(--text-on-accent);
  box-shadow: 0 8px 26px -10px rgba(79,70,229,.85);
}
.btn-primary:hover { background: var(--indigo-500); color: #fff; transform: translateY(-1px); }
.btn-ghost { border-color: var(--hairline-strong); color: var(--text-1); background: transparent; }
.btn-ghost:hover { border-color: var(--indigo-400); color: var(--text-1); background: var(--bg-glass); transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) {
  .btn:hover { transform: none; }
}

/* ---------- 8. HERO ----------
   One claim + one real artifact. The H1 and the artifact are the LCP
   candidates and are painted immediately — never faded in.                   */
.hero { padding-block: clamp(2.5rem, 5vw, 4.25rem) clamp(3.5rem, 7vw, 6rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  gap: clamp(2rem, 4.5vw, 3.75rem);
  align-items: center;
}
.hero h1 { margin-bottom: var(--sp-3); }
/* Keeps "depend on." together so the headline never orphans "on." */
.hero h1 em { font-style: normal; color: var(--indigo-400); white-space: nowrap; }
.hero .lead { margin-bottom: var(--sp-4); max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-4); }

/* Breadth strip. Load-bearing: with one artifact on screen and no list of
   domains, a visitor reads the artifact as the whole business. */
.domains {
  max-width: none;
  margin-bottom: var(--sp-3);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.735rem;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  color: var(--text-2);
  line-height: 2;
}
.domains span { color: var(--indigo-400); padding-inline: .18em; }

/* Marks the hero artifact as ONE example of the work, not the speciality. */
.shot-tag {
  display: flex; align-items: center; gap: .55rem; flex-wrap: wrap;
  max-width: none;
  margin: 0; padding: .6rem .95rem;
  border-bottom: 1px solid var(--hairline);
  background: rgba(6,7,12,.6);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-1);
}
.shot-tag span {
  color: var(--indigo-300);
  border: 1px solid rgba(99,102,241,.32);
  border-radius: 999px;
  padding: .18em .6em;
  letter-spacing: .08em;
}

/* Verifiable facts, not adjectives. Every figure here is measured. */
.hero-facts {
  display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--hairline);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.735rem; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--text-3);
}
.hero-facts b { color: var(--indigo-300); font-weight: 500; }

/* The artifact frame — a real screenshot of real software, framed as an app
   window so it reads as product, not decoration. */
.shot {
  position: relative;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9), 0 0 0 1px rgba(99,102,241,.10);
}
.shot img { width: 100%; }
.shot figcaption {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  padding: .7rem .95rem;
  border-top: 1px solid var(--hairline);
  background: rgba(6,7,12,.72);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem; letter-spacing: .04em; color: var(--text-3);
}
.shot figcaption .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--prompt-green);
  flex: none;
}
.hero .shot { transform: perspective(1600px) rotateY(-1.4deg); }
@media (prefers-reduced-motion: reduce) { .hero .shot { transform: none; } }

/* ---------- 9. PINNED PROOF ----------
   The centrepiece. The artifact pins; the evidence scrolls past it. This is
   progressive disclosure via position:sticky — it never intercepts the wheel,
   never reverses direction, and every caption is reachable by keyboard.       */
.proof-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.86fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.proof-sticky {
  position: sticky;
  top: clamp(5.5rem, 12vh, 8rem);
}
.proof-stack { position: relative; }
/* Frames stack; only the active one is opaque. Without JS the first frame is
   shown and the rest are simply beneath it — no blank state is possible. */
.proof-stack .shot { grid-area: 1 / 1; }
.proof-stack {
  display: grid;
  grid-template-areas: 'a';
}
.proof-stack .shot + .shot { opacity: 0; }
.js .proof-stack .shot {
  transition: opacity 190ms linear;
}
.js .proof-stack .shot[data-active='true'] { opacity: 1; }
.js .proof-stack .shot[data-active='false'] { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .js .proof-stack .shot { transition: none; }
}

.proof-steps { display: flex; flex-direction: column; gap: clamp(3rem, 9vh, 6rem); list-style: none; }
.proof-step {
  padding-left: var(--sp-4);
  border-left: 2px solid var(--hairline);
  transition: border-color 420ms var(--ease-out), opacity 420ms var(--ease-out);
}
.proof-step .n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem; letter-spacing: .16em; color: var(--text-3);
  display: block; margin-bottom: .6rem;
}
.proof-step h3 { margin-bottom: .6rem; }
.proof-step p { color: var(--text-2); }
.js .proof-step[data-active='true'] { border-left-color: var(--indigo-500); }
.js .proof-step[data-active='false'] { opacity: .72; }

.proof-close {
  margin-top: clamp(3rem, 7vh, 5rem);
  padding: var(--sp-4);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  background: var(--bg-glass);
}
.proof-close p { max-width: 70ch; color: var(--text-2); }
.proof-close p + p { margin-top: var(--sp-2); }

/* ---------- 10. CAPABILITY GRID ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.cap {
  background: var(--bg-0);
  padding: clamp(1.5rem, 3vw, 2.1rem);
  transition: background-color var(--dur) var(--ease-out);
}
.cap:hover { background: var(--bg-1); }
.cap .glyph { width: 22px; height: 22px; color: var(--indigo-400); margin-bottom: var(--sp-3); }
.cap h3 { margin-bottom: .6rem; }
.cap p { font-size: 0.95rem; color: var(--text-2); }
.cap .proof {
  display: block; margin-top: var(--sp-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.7rem; letter-spacing: .04em; color: var(--text-3);
}
.cap .proof b { color: var(--indigo-300); font-weight: 500; }

/* ---------- 11. SYSTEM PANELS (Mizan / RevuMeet) ---------- */
.system {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-xl);
  background: linear-gradient(160deg, var(--bg-glass), transparent 60%);
}
.system + .system { margin-top: var(--sp-6); }
.system h3 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); margin-bottom: var(--sp-2); }
.system .tag {
  display: inline-block; margin-bottom: var(--sp-2);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.68rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--indigo-300);
  border: 1px solid rgba(99,102,241,.32);
  border-radius: 999px; padding: .3rem .75rem;
}
.system p { color: var(--text-2); font-size: 0.98rem; }
.system p + p { margin-top: var(--sp-2); }
.spec-rows {
  margin-top: var(--sp-3);
  border-top: 1px solid var(--hairline);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.74rem;
}
.spec-rows div {
  display: flex; gap: var(--sp-2); justify-content: space-between;
  padding: .55rem 0; border-bottom: 1px solid var(--hairline);
}
.spec-rows dt { color: var(--text-3); }
.spec-rows dd { color: var(--text-1); text-align: right; }

.diagram { width: 100%; height: auto; }
.diagram .lbl {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px; letter-spacing: .06em; fill: var(--text-3);
}
.diagram .lbl-strong { fill: var(--text-1); font-size: 10.5px; }
.diagram .box { fill: rgba(129,140,248,.06); stroke: var(--hairline-strong); }
.diagram .box-accent { fill: rgba(79,70,229,.14); stroke: rgba(99,102,241,.5); }
.diagram .wire { stroke: var(--hairline-strong); fill: none; }
.diagram .wire-accent { stroke: var(--indigo-400); fill: none; }

/* ---------- 12. PROCESS ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: var(--sp-4);
  counter-reset: step;
}
.pstep { padding-top: var(--sp-3); border-top: 2px solid var(--hairline); }
.pstep .n {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem; letter-spacing: .16em; color: var(--indigo-300);
  display: block; margin-bottom: .7rem;
}
.pstep h3 { margin-bottom: .5rem; }
.pstep p { font-size: 0.93rem; }
.process-note {
  margin-top: var(--sp-6); padding-top: var(--sp-4);
  border-top: 1px solid var(--hairline); color: var(--text-2);
  max-width: 72ch;
}

/* ---------- 13. COMPANY / TRUST ---------- */
.company-grid {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4rem); align-items: start;
}
.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-l);
  background: var(--bg-glass);
  padding: clamp(1.4rem, 3vw, 2rem);
}
.fact-rows div {
  display: flex; gap: var(--sp-3); justify-content: space-between;
  padding: .7rem 0; border-bottom: 1px solid var(--hairline);
}
.fact-rows div:last-child { border-bottom: 0; }
.fact-rows dt { color: var(--text-3); font-size: .88rem; flex: none; }
.fact-rows dd { color: var(--text-1); font-size: .88rem; text-align: right; }

/* ---------- 14. CONTACT ---------- */
.contact-panel {
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  background:
    radial-gradient(90% 130% at 12% 0%, rgba(79,70,229,.16), transparent 60%),
    var(--bg-1);
}
.contact-panel h2 { margin-bottom: var(--sp-2); }
.contact-panel .lead { margin-bottom: var(--sp-4); }
.contact-ctas { display: flex; flex-wrap: wrap; gap: var(--sp-2); align-items: center; }
.contact-sub { margin-top: var(--sp-4); font-size: .85rem; color: var(--text-3); }

/* ---------- 15. FOOTER ---------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--sp-8) var(--sp-6);
  margin-top: var(--sp-8);
}
.footer-cols {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr;
  gap: var(--sp-6); margin-bottom: var(--sp-6);
}
.footer-brand p:last-child { color: var(--text-3); font-size: .92rem; margin-top: .4rem; }
.footer-h {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-3); margin-bottom: var(--sp-2);
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: .45rem; }
.site-footer ul a { color: var(--text-2); font-size: .92rem; }
.site-footer ul a:hover { color: var(--indigo-300); }
.footer-reg {
  font-size: .78rem; color: var(--text-3); max-width: none;
  padding-top: var(--sp-4); border-top: 1px solid var(--hairline);
}
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: var(--sp-2) var(--sp-4);
  justify-content: space-between; align-items: baseline;
  margin-top: var(--sp-3); font-size: .78rem; color: var(--text-3);
}
.footer-bottom p { max-width: none; }
.eof { font-family: 'JetBrains Mono', monospace; }
.eof .g { color: var(--prompt-green); }

/* ---------- 16. RESPONSIVE ---------- */
@media (max-width: 1000px) {
  .hero-grid, .proof-grid, .system, .company-grid { grid-template-columns: minmax(0, 1fr); }
  .proof-sticky { position: static; }
  .proof-steps { gap: var(--sp-6); }
  .js .proof-step[data-active='false'] { opacity: 1; }
  .js .proof-step { border-left-color: var(--hairline); }
  .system .diagram-wrap { order: -1; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-menu { display: block; }
  .footer-cols { grid-template-columns: 1fr; gap: var(--sp-4); }
  .hero .shot { transform: none; }
}

/* Phones. The failure mode here is horizontal overflow, and it comes from
   three unbreakable things: the tracked-out monospace eyebrow, the headline's
   longest word-run, and the nav's three fixed-width items. Each is addressed
   directly rather than papered over with overflow hiding. */
@media (max-width: 560px) {
  h1 { font-size: clamp(1.95rem, 1.1rem + 4.2vw, 2.6rem); }
  h2 { font-size: clamp(1.55rem, 1.1rem + 2.6vw, 2.2rem); }
  .eyebrow { letter-spacing: 0.1em; font-size: 0.68rem; }
  .lead { font-size: 1.02rem; }
  .hero-facts { font-size: 0.66rem; gap: .35rem 1rem; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .nav-inner { padding-inline: 1rem; gap: .6rem; }
  .brand { font-size: .98rem; }
  .site-nav .btn-primary { padding: .6rem .85rem; font-size: .85rem; }
  .shot figcaption { font-size: 0.63rem; padding: .6rem .7rem; }
  .spec-rows, .fact-rows dt, .fact-rows dd { font-size: .8rem; }
  .fact-rows div { gap: var(--sp-2); }
  .system, .panel, .contact-panel { padding: 1.25rem; }
}
/* Safety net: nothing may force the document wider than the viewport. */
html, body { max-width: 100%; }

/* ---------- 17. MOTION — TIER 2 ----------
   Everything below is DOUBLE-GATED. A hidden pre-animation state only ever
   exists where scroll-driven animation is supported AND the visitor has not
   asked for reduced motion. Anywhere else, this whole block is inert and the
   page renders complete and static.                                          */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {

    @keyframes rise {
      from { opacity: 0; transform: translateY(22px); }
      to   { opacity: 1; transform: none; }
    }
    /* Reveals resolve inside 400ms of entering — never a late fade the user
       has already scrolled past. `both` holds the end state after it runs. */
    .rise {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 5% cover 22%;
    }

    /* The hero artifact settles as it enters — the H1 never animates. */
    @keyframes settle {
      from { opacity: .55; transform: perspective(1600px) rotateY(-4deg) translateY(14px) scale(.985); }
      to   { opacity: 1;   transform: perspective(1600px) rotateY(-1.4deg) translateY(0) scale(1); }
    }
    .hero .shot { animation: settle 700ms var(--ease-out) both; }

    /* Section headings drift very slightly against the scroll — the only
       parallax on the page, and it is 12px. */
    @keyframes drift {
      from { transform: translateY(10px); }
      to   { transform: translateY(-10px); }
    }
    .drift {
      animation: drift linear both;
      animation-timeline: view();
      animation-range: cover 0% cover 100%;
    }
  }
}

/* Reduced motion: considered reduction, not a blanket kill. Durations collapse
   so transitionend/animationend still fire and JS state machines keep working. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 18. CROSS-DOCUMENT VIEW TRANSITIONS ----------
   Navigating to the legal/security pages cross-fades instead of flashing.
   Progressive: unsupported browsers simply navigate normally.                 */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}

/* ---------- 19. PRINT ---------- */
@media print {
  .field, .site-nav, .hero-ctas, .contact-ctas { display: none; }
  body { background: #fff; color: #000; }
}
