/* Octophase landing — Baunfire-derived design system (octo-design-system.md §1.3/§2.1).
   Tokens are the canonical project-wide set; do not fork. */

@font-face {
  font-family: "InterVariable";
  src: url("../fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bf-red: #9f2812;
  --bf-black: #1f1e1d; /* Baunfire dark gray — user directive 2026-10-29: never pure black */
  --bf-footer: #141312; /* footer band — a clearly darker step than the #1f1e1d body */
  --bf-white: #ffffff;
  --bf-gray: #f9f9f9;
  --ease-brand: cubic-bezier(0.475, 0.425, 0, 0.995);
  --font-sans: "InterVariable", "Inter", system-ui, sans-serif;
  --max-w: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-weight: 400;
  background: var(--bf-black);
  color: var(--bf-white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 40px; }

/* ---------- Section color system (design doc §1.3.4) ---------- */
.section { position: relative; padding: 120px 0; }
.on-black { background: var(--bf-black); color: var(--bf-white); }
.on-white { background: var(--bf-white); color: var(--bf-black); }
.on-gray  { background: var(--bf-gray);  color: var(--bf-black); }
.on-red   { background: var(--bf-red);   color: var(--bf-white); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 40px;
  background: transparent;
}
.site-header .brand { display: flex; align-items: center; gap: 12px; }
.site-header .brand img { height: 30px; width: auto; }
.site-header .brand img + img { display: none; }
.site-header.on-white-img .brand img:first-child { display: none; }
.site-header.on-white-img .brand img + img { display: block; }
.site-header nav { display: flex; gap: 28px; align-items: center; }
.site-header nav a {
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0.85; transition: opacity 0.3s var(--ease-brand);
}
.site-header nav a:hover { opacity: 1; }
.site-header nav a.cta {
  background: var(--bf-red); color: var(--bf-white);
  padding: 10px 18px; border-radius: 3px; opacity: 1;
  transition: transform 0.3s var(--ease-brand);
}
.site-header nav a.cta:hover { transform: translateY(-2px); }

/* ---------- Type utilities ---------- */
.overline {
  font-size: 12px; font-weight: 800; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--bf-red);
}
.display {
  font-weight: 300; letter-spacing: -0.02em; line-height: 1.02;
}
h1.display, .display.xl { font-size: clamp(56px, 10vw, 150px); }
.display.lg { font-size: clamp(36px, 5vw, 64px); }
.display.md { font-size: clamp(26px, 3.4vw, 40px); }

/* ---------- Split headings (SSR chars, aria-hidden; design doc §1.3.1) ---------- */
.split-heading .char { display: inline-block; will-change: transform; white-space: pre; }

/* ---------- Section indicator (design doc §1.3.3) ---------- */
.section-indicator {
  position: fixed; top: 50%; right: 50px; z-index: 7;
  text-transform: uppercase; font-size: 11px; font-weight: 800;
  letter-spacing: 0.3em; white-space: nowrap;
  transform: rotate(90deg) translate3d(50%, 0, 0);
  transform-origin: top right;
  transition: color 0.85s var(--ease-brand);
}
.section-indicator.on-black, .section-indicator.on-red { color: var(--bf-white); }
.section-indicator.on-white, .section-indicator.on-gray { color: var(--bf-black); }

/* ---------- Hero ---------- */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 120px; }
.hero .eyebrow { display: block; margin-bottom: 24px; }
.hero h1 { text-transform: uppercase; }
.hero .sub {
  margin-top: 28px; max-width: 640px; font-size: 18px; color: rgba(255,255,255,0.72);
}
.hero .sub-cta { margin-top: 16px; font-size: 16px; color: rgba(255,255,255,0.85); }
.cta-row { display: flex; gap: 16px; margin-top: 40px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 16px 28px; border-radius: 3px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  transition: transform 0.3s var(--ease-brand), background 0.3s var(--ease-brand);
}
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--bf-red); color: var(--bf-white); }
.btn-ghost { border: 1px solid rgba(255,255,255,0.35); color: var(--bf-white); }
.btn-ghost:hover { border-color: var(--bf-white); }
.btn-dark { background: var(--bf-black); color: var(--bf-white); }

/* ---------- Risk band (red) ---------- */
.risk-lead { margin-top: 24px; max-width: 760px; font-size: 17px; color: rgba(255,255,255,0.9); }
.risk-list { margin-top: 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.risk-item { border-top: 1px solid rgba(255,255,255,0.35); padding-top: 18px; }
.risk-item h3 { font-size: 17px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; }
.risk-item p { margin-top: 8px; font-size: 15px; color: rgba(255,255,255,0.85); }
.cve { font-family: ui-monospace, monospace; font-size: 0.92em; }

/* ---------- Migration steps (white) ---------- */
.steps { margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step .num {
  font-size: 13px; font-weight: 800; letter-spacing: 0.2em; color: var(--bf-red);
}
.step h3 { margin-top: 12px; font-size: 24px; font-weight: 300; }
.step p { margin-top: 10px; font-size: 15px; color: rgba(0,0,0,0.65); }
.step { border-top: 2px solid var(--bf-black); padding-top: 20px; }

/* ---------- Pinned horizontal cards (black; JS enhances) ---------- */
/* Default (no-JS / mobile / reduced motion): vertical stack. */
.cap-track { position: relative; }
.cap-viewport { position: relative; }
.cap-row { display: flex; flex-direction: column; gap: 24px; margin-top: 56px; }
.cap-card {
  flex: 0 0 auto; width: min(520px, 90vw);
  border: 1px solid rgba(255,255,255,0.16); border-radius: 6px;
  padding: 36px; background: #0a0a0a;
}
.cap-card .tag { color: var(--bf-red); font-size: 12px; font-weight: 800; letter-spacing: 0.2em; text-transform: uppercase; }
.cap-card h3 { margin-top: 14px; font-size: 26px; font-weight: 300; }
.cap-card p { margin-top: 12px; font-size: 15px; color: rgba(255,255,255,0.65); }

/* Pinned horizontal mode (added by JS on wide screens with motion OK). */
.pin-active .cap-track { height: 300vh; }
.pin-active .cap-viewport { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden; }
.pin-active .cap-row { flex-direction: row; gap: 32px; margin-top: 0; will-change: transform; }
.pin-active .cap-row .lead-in { flex: 0 0 auto; width: 34vw; min-width: 340px; padding-right: 6vw; }
.pin-active .cap-row .lead-in h2 { text-transform: uppercase; }
.pin-active .cap-card { width: min(520px, 42vw); }

/* ---------- Stats (white) ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.stats + .stats { margin-top: 48px; }
.stat .n { font-size: clamp(40px, 5vw, 64px); font-weight: 300; letter-spacing: -0.02em; }
.stat .n-red { color: var(--bf-red); }
.stat .l { margin-top: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(0,0,0,0.55); }

/* ---------- FAQ (native details/summary, zero JS) ---------- */
.faq { max-width: 800px; margin: 40px auto 0; }
.faq details { border-top: 1px solid rgba(0,0,0,0.15); }
.faq details:last-child { border-bottom: 1px solid rgba(0,0,0,0.15); }
.faq summary {
  cursor: pointer; padding: 22px 0; font-size: 17px; font-weight: 700;
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 300; font-size: 26px; color: var(--bf-red); }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 22px; color: rgba(0,0,0,0.65); font-size: 15px; max-width: 640px; }

/* ---------- CTA + lead form (black) ---------- */
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.lead-form label {
  display: block; font-size: 11px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; margin-top: 22px; color: rgba(255,255,255,0.6);
}
.lead-form input, .lead-form textarea {
  width: 100%; margin-top: 8px; padding: 14px 16px;
  background: #0d0d0d; border: 1px solid rgba(255,255,255,0.22); border-radius: 3px;
  color: var(--bf-white); font-family: var(--font-sans); font-size: 15px;
}
.lead-form input:focus, .lead-form textarea:focus { outline: 1px solid var(--bf-red); border-color: var(--bf-red); }
.lead-form .btn { margin-top: 28px; border: 0; cursor: pointer; }
.form-status { margin-top: 20px; display: none; border-radius: 4px; padding: 16px 18px; font-size: 15px; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(30, 160, 90, 0.14); border: 1px solid rgba(30,160,90,0.5); color: #9fe8c0; }
.form-status.err { background: rgba(159, 40, 18, 0.14); border: 1px solid rgba(159,40,18,0.6); color: #ff9d8a; }

/* ---------- Footer (v16: heading-free 3-col nav, solid rule, separated links) ---------- */
.site-footer { background: var(--bf-footer); }
.site-footer .wrap { display: block; }
.footer-rule {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.4);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding: 48px 0 40px;
}
.footer-brand img { height: 28px; }
.footer-tagline { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.5; margin-top: 14px; }
.footer-col a {
  display: block;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  transition: color 0.3s var(--ease-brand), border-color 0.3s var(--ease-brand);
}
.footer-col a:hover { color: var(--bf-red); border-bottom-color: rgba(159, 40, 18, 0.55); }
.footer-legal {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.5;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 18px 0 0;
  margin: 18px 0 0;
  line-height: 1.8;
}
.heart { color: var(--bf-red); }

/* ---------- Legal pages (privacy / terms — CMS-seeded, same system) ---------- */
.legal-page .wrap { max-width: 720px; }
.legal-page h1 { margin-bottom: 8px; }
.legal-page .legal-updated { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.5; margin-bottom: 40px; }
.legal-page h2 { font-size: 20px; margin: 32px 0 12px; }
.legal-page p, .legal-page li { font-size: 15px; line-height: 1.7; opacity: 0.85; }
.legal-page ul { padding-left: 20px; margin: 12px 0; }

/* ---------- Reveal (JS adds .in; default visible when no JS) ---------- */
.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease-brand), transform 0.9s var(--ease-brand); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Mobile <1024px: vertical stack, indicator hidden (design doc §2.5) ---------- */
@media (max-width: 1023px) {
  .wrap { padding: 0 24px; }
  .section { padding: 80px 0; }
  .section-indicator { display: none; }
  .site-header { padding: 14px 24px; }
  .site-header nav a:not(.cta) { display: none; }
  .risk-list, .steps, .stats, .cta-grid { grid-template-columns: 1fr; }
  .cap-card { width: 100%; }
  .hero { padding-top: 100px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ---------- Reduced motion: static layout, no pin/scrub/stagger (design doc §2.5) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .split-heading .char { transition: none !important; }
  .pin-active .cap-track, .pin-active .cap-viewport, .pin-active .cap-row { height: auto; position: static; transform: none !important; }
}
