/* CrossTenant marketing site — shared styles.
   Framework-free static pages (Cloudflare Pages).

   Design system: aligned to the CrossTenant console's redesign tokens
   (client/src/styles/redesign-tokens.css) — Hanken Grotesk + JetBrains Mono,
   azure accent, iris reserved for AI surfaces only (never gradient-mixed
   with azure), console light/dark ramps. Light is the :root default (the
   no-JS / unknowable-preference fallback); JS stamps html[data-theme] from
   the stored choice or the OS preference. */

/* ── Fonts — self-hosted variable woff2 (latin), OFL-licensed; see
      fonts/OFL-NOTICE.txt. No third-party font requests. ─────────────── */
@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/fonts/hanken-grotesk-latin.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("/fonts/jetbrains-mono-latin.woff2") format("woff2");
}

/* ── Tokens ─────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  /* Surfaces */
  --bg: #f6f7f9;
  --bg-raise: #ffffff;
  --bg-card: #ffffff;
  --bg-inset: #eceef2;
  --bg-well: #f1f3f6;

  /* Text */
  --text: #0e1116;
  --text-secondary: #424a56;
  --text-muted: #69707d;

  /* Borders */
  --border: #0a0c1018;
  --border-strong: #0a0c1029;

  /* Brand / action — azure (console law: the single interactive hue).
     Light values sit a step deeper than the console's azure-600 so small
     azure text clears WCAG AA on the #f6f7f9 page background, and hover
     darkens (white label stays AA) rather than lightening. */
  --accent: #2a66d0;
  --accent-hover: #275fc4;
  --accent-fg: #ffffff;
  --accent-soft: #3d8bff14;
  --accent-border: #3d8bff66;
  --grad: linear-gradient(120deg, #3d8bff, #2e6fe0);
  --header-bg: rgba(255, 255, 255, 0.85);
  --flag-border: rgba(212, 49, 60, 0.45);

  /* AI lane — iris ONLY (never mixed into azure gradients) */
  --ai: #6f5fe6;
  --ai-strong: #8b7cff;
  --ai-soft: #8b7cff14;
  --ai-border: #8b7cff5c;
  --grad-ai: linear-gradient(120deg, #8b7cff, #6f5fe6);

  /* Semantic */
  --green: #1a9d4d;
  --green-soft: #1a9d4d14;
  --amber: #a86a06;
  --amber-soft: #d4920f1a;
  --red: #d4313c;
  --red-soft: #fb5e6614;

  /* Canvas constellation (r,g,b triplets read by app.js) */
  --net-blue: 46, 111, 224;
  --net-blue-2: 61, 139, 255;
  --net-ok: 26, 157, 77;
  --net-warn: 190, 130, 20;
  --net-crit: 212, 49, 60;
  --net-packet: 46, 111, 224;

  /* Ambient glows */
  --glow-a: rgba(61, 139, 255, 0.10);
  --glow-b: rgba(61, 139, 255, 0.06);
  --glow-ai-a: rgba(139, 124, 255, 0.10);
  --glow-ai-b: rgba(139, 124, 255, 0.05);

  /* Elevation */
  --elev-1: 0 1px 2px #0a0c1014, 0 1px 1px #0a0c1010;
  --elev-2: 0 8px 24px -8px #0a0c1024, 0 2px 6px #0a0c1014;
  --elev-3: 0 24px 56px -12px #0a0c1033, 0 8px 24px #0a0c1029;

  --era-mid: #eceef2;

  --radius: 12px;
  --radius-lg: 18px;
  --max-width: 1120px;
  --font-display: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-body: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0e1013;
  --bg-raise: #15181d;
  --bg-card: #15181d;
  --bg-inset: #0b0c0f;
  --bg-well: #1b1f26;

  --text: #f2f4f7;
  --text-secondary: #a7aeba;
  --text-muted: #8b929d;

  --border: #ffffff1a;
  --border-strong: #ffffff2b;

  --accent: #3d8bff;
  --accent-hover: #6fa8ff;
  --accent-fg: #06122b;
  --accent-soft: #3d8bff1f;
  --accent-border: #3d8bff66;
  --grad: linear-gradient(120deg, #6fa8ff, #3d8bff);
  --header-bg: rgba(21, 24, 29, 0.85);
  --flag-border: rgba(251, 94, 102, 0.45);

  --ai: #8b7cff;
  --ai-strong: #a99cff;
  --ai-soft: #8b7cff1f;
  --ai-border: #8b7cff5c;
  --grad-ai: linear-gradient(120deg, #a99cff, #8b7cff);

  --green: #3fcf6b;
  --green-soft: #3fcf6b1c;
  --amber: #f2b134;
  --amber-soft: #f2b1341f;
  --red: #fb5e66;
  --red-soft: #fb5e661f;

  --net-blue: 61, 139, 255;
  --net-blue-2: 111, 168, 255;
  --net-ok: 63, 207, 107;
  --net-warn: 242, 177, 52;
  --net-crit: 251, 94, 102;
  --net-packet: 168, 205, 255;

  --glow-a: rgba(61, 139, 255, 0.14);
  --glow-b: rgba(61, 139, 255, 0.08);
  --glow-ai-a: rgba(139, 124, 255, 0.12);
  --glow-ai-b: rgba(139, 124, 255, 0.06);

  --elev-1: 0 1px 2px #00000066;
  --elev-2: 0 8px 24px -8px #00000080, 0 2px 6px #00000059;
  --elev-3: 0 30px 80px rgba(0, 0, 0, 0.55);

  --era-mid: #0a0e19;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background .25s ease, color .25s ease;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .brand { font-family: var(--font-display); }

/* Gradient text helper — headline accent words (azure ramp only). */
.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.grad-text-ai {
  background: var(--grad-ai);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ── Header ─────────────────────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 13px 0;
  position: sticky;
  top: 0;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 18px; letter-spacing: -0.01em; color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark { width: 30px; height: 30px; display: inline-flex; flex-shrink: 0; }
nav { display: flex; gap: 22px; align-items: center; font-size: 14px; }
nav a { color: var(--text-secondary); font-weight: 500; }
nav a:hover { color: var(--text); text-decoration: none; }
nav .nav-cta {
  color: var(--accent-fg); background: var(--accent);
  border-radius: 999px; padding: 8px 18px; font-weight: 600;
  transition: background .18s ease, transform .18s ease;
}
nav .nav-cta:hover { background: var(--accent-hover); transform: translateY(-1px); }
/* Two-step collapse: Security drops first; Features/Pricing survive to
   560px so mid-size screens keep primary navigation (footer covers the
   rest below that). */
@media (max-width: 780px) { nav a.nav-sec { display: none; } }
@media (max-width: 560px) { nav a:not(.nav-cta) { display: none; } }

/* Screen-reader-only utility. */
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Theme toggle — three-state (light / dark / system). */
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: transparent;
  color: var(--text-secondary); cursor: pointer; flex-shrink: 0;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.theme-toggle:hover { color: var(--text); border-color: var(--accent-border); background: var(--accent-soft); }
.theme-toggle svg { width: 16px; height: 16px; display: none; }
[data-theme-mode="light"] .theme-toggle .tt-light { display: block; }
[data-theme-mode="dark"] .theme-toggle .tt-dark { display: block; }
[data-theme-mode="system"] .theme-toggle .tt-system { display: block; }
html:not([data-theme-mode]) .theme-toggle .tt-system { display: block; }

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  padding: 84px 0 48px;
  text-align: center;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute; inset: -180px -40vw auto -40vw; height: 560px;
  background:
    radial-gradient(600px 320px at 50% 30%, var(--glow-a), transparent 70%),
    radial-gradient(480px 280px at 62% 20%, var(--glow-b), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero-net {
  position: absolute;
  left: 50%; top: 0;
  transform: translateX(-50%);
  width: 100vw; height: 100%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 70px);
  mask-image: linear-gradient(180deg, transparent 0, #000 70px);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border: 1px solid var(--accent-border);
  border-radius: 999px; padding: 6px 15px; margin-bottom: 26px;
}
.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.06; font-weight: 700; letter-spacing: -0.03em;
  max-width: 880px; margin: 0 auto 20px;
}
.hero h1 .grad-text {
  background-size: 220% 100%;
  animation: gradDrift 9s ease-in-out infinite alternate;
}
@keyframes gradDrift {
  from { background-position: 0% 50%; }
  to   { background-position: 100% 50%; }
}
.hero p.sub {
  font-size: 18px; color: var(--text-secondary);
  max-width: 640px; margin: 0 auto 30px;
}
.hero p.sub strong { color: var(--text); font-weight: 600; }
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.works-with {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 22px; font-size: 14px; color: var(--text-secondary);
}
.works-with svg { flex-shrink: 0; }
.works-with strong { color: var(--text); font-weight: 600; }

.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.btn-primary {
  background: var(--accent); color: var(--accent-fg);
  box-shadow: 0 8px 24px -6px var(--accent-border);
}
.btn-primary:hover {
  text-decoration: none; transform: translateY(-1px);
  background: var(--accent-hover);
}
.btn-ghost { border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-muted); text-decoration: none; transform: translateY(-1px); }

/* ── Hero visual: mock console window (mirrors the real console) ────── */
.hero-visual {
  margin: 58px auto 0;
  max-width: 880px;
  position: relative;
  padding: 0 24px;
  perspective: 1100px;
}
.hero-visual::after {
  content: "";
  position: absolute; inset: auto 10% -40px 10%; height: 120px;
  background: radial-gradient(50% 100% at 50% 0%, var(--glow-a), transparent 75%);
  filter: blur(24px);
  pointer-events: none;
}
.mock-window {
  position: relative; z-index: 1;
  background: var(--bg-raise);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--elev-3);
  text-align: left;
  will-change: transform;
  transform-style: preserve-3d;
  animation: mockRise .9s cubic-bezier(.2,.8,.2,1) backwards;
  animation-delay: .15s;
}
@keyframes mockRise {
  from { opacity: 0; transform: translateY(26px); }
}
.mock-glare {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  opacity: 0; transition: opacity .5s ease;
  background: radial-gradient(340px 240px at var(--gx, 50%) var(--gy, 30%),
    rgba(120, 160, 255, 0.10), transparent 70%);
}
.mock-scan {
  position: absolute; left: 0; right: 0; top: -80px; height: 72px;
  z-index: 2; pointer-events: none;
  background: linear-gradient(180deg,
    transparent, rgba(61, 139, 255, 0.05) 50%, transparent);
  animation: scanSweep 7.5s ease-in-out infinite;
}
@keyframes scanSweep {
  0%, 12%  { top: -80px; opacity: 0; }
  18%      { opacity: 1; }
  46%      { top: 100%; opacity: 1; }
  52%, 100% { top: 100%; opacity: 0; }
}
.mock-titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.mock-titlebar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.mock-titlebar .mock-url {
  margin-left: 12px; font-size: 11.5px; color: var(--text-muted);
  font-family: var(--font-mono);
  background: var(--bg-well); border: 1px solid var(--border);
  border-radius: 7px; padding: 3px 12px;
}
.mock-body { display: grid; grid-template-columns: 168px 1fr; min-height: 320px; background: var(--bg); }
@media (max-width: 640px) { .mock-body { grid-template-columns: 1fr; } .mock-side { display: none; } }
.mock-side {
  border-right: 1px solid var(--border);
  background: var(--bg-raise);
  padding: 14px 12px; display: flex; flex-direction: column; gap: 9px;
}
.mock-navline {
  height: 9px; border-radius: 5px; background: var(--bg-inset);
  width: 72%;
}
[data-theme="dark"] .mock-navline { background: var(--bg-well); }
.mock-navline.on { background: var(--accent); opacity: .85; width: 86%; }
.mock-navline.short { width: 55%; }
.mock-main { padding: 16px 18px; }
.mock-scope {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--text);
  background: var(--bg-raise);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 5px 13px; margin-bottom: 14px;
}
.mock-scope .pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.mock-rows { display: flex; flex-direction: column; gap: 8px; }
.mock-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 14px;
  box-shadow: var(--elev-1);
  animation: rowIn .55s ease backwards;
}
.mock-row:nth-child(1) { animation-delay: .55s; }
.mock-row:nth-child(2) { animation-delay: .70s; }
.mock-row:nth-child(3) { animation-delay: .85s; }
.mock-row:nth-child(4) { animation-delay: 1.00s; }
@keyframes rowIn {
  from { opacity: 0; transform: translateY(10px); }
}
.mock-row.flag { border-color: var(--flag-border); }
.mock-avatar {
  width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff; font-family: var(--font-display);
}
.mock-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.mock-domain { font-size: 11.5px; color: var(--text-muted); line-height: 1.3; font-family: var(--font-mono); }
.mock-note { margin-left: auto; font-size: 11.5px; color: var(--text-muted); }
@media (max-width: 520px) { .mock-note { display: none; } }
.mock-chip {
  flex-shrink: 0; font-size: 11.5px; font-weight: 700; border-radius: 999px;
  padding: 3px 10px; letter-spacing: 0.01em;
}
.mock-chip.good { color: var(--green); background: var(--green-soft); }
.mock-chip.warn { color: var(--amber); background: var(--amber-soft); }
.mock-chip.bad { color: var(--red); background: var(--red-soft); }

/* ── Google-surface marks strip ─────────────────────────────────────── */
.marks-strip { padding: 46px 0 8px; text-align: center; }
.marks-strip .kicker { margin-bottom: 24px; }
.marks-row {
  display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(18px, 4.5vw, 56px); flex-wrap: wrap;
}
.mark-item {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  min-width: 86px;
}
.mark-item svg { width: 30px; height: 30px; }
.mark-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 500; line-height: 1.3; }

/* ── Sections ───────────────────────────────────────────────────────── */
section { padding: 76px 0; }
section.alt { background: var(--bg-raise); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
[data-theme="dark"] section.alt { background: var(--bg-raise); }
.section-title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 700; margin-bottom: 10px; letter-spacing: -0.02em; line-height: 1.15;
}
.section-sub { color: var(--text-secondary); margin-bottom: 36px; max-width: 660px; font-size: 16.5px; }
.kicker {
  font-size: 12px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.kicker-ai { color: var(--ai); }
.section-link { font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.section-link::after { content: " →"; }

/* Scroll reveal — progressive enhancement, guarded for reduced motion. */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── Positioning band (CIPP analogue) ───────────────────────────────── */
.positioning { text-align: center; }
.positioning-line {
  font-size: clamp(28px, 4.4vw, 44px); font-weight: 700; letter-spacing: -0.025em;
  margin-bottom: 18px; line-height: 1.12;
}
.positioning-body {
  font-size: 17px; color: var(--text-secondary);
  max-width: 680px; margin: 0 auto 16px;
}
.positioning-body strong { color: var(--text); }
.positioning-note {
  font-size: 13px; color: var(--text-muted);
  max-width: 640px; margin: 0 auto;
}

/* ── Era band: built in layers vs designed whole ────────────────────── */
.era {
  background: linear-gradient(180deg, var(--bg) 0%, var(--era-mid) 45%, var(--bg) 100%);
  text-align: center;
}
.era .section-sub { margin-left: auto; margin-right: auto; max-width: 700px; }
.era-visual {
  display: grid; grid-template-columns: 1fr 90px 1fr;
  gap: 0; align-items: center; max-width: 900px; margin: 12px auto 40px;
}
@media (max-width: 760px) {
  .era-visual { grid-template-columns: 1fr; gap: 4px; }
  /* .era-visual prefix: must out-rank the base .era-flow rule declared
     later in the file (equal specificity would lose on source order).
     The strip stays 2px tall (its ::before line fills it); the rotated
     90px length overhangs ±44px, so the margins clear that plus breathing
     room. */
  .era-visual .era-flow { transform: rotate(90deg); margin: 56px auto; }
}
.era-stack { position: relative; height: 230px; }
.era-tab {
  position: absolute;
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 14px;
  font-size: 12px; color: var(--text-muted); white-space: nowrap;
  font-family: var(--font-mono);
  box-shadow: var(--elev-2);
  opacity: 0; transform: translateY(18px);
}
.era-tab-dots { display: inline-flex; gap: 4px; }
.era-tab-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--border-strong); }
.era-tab.t1 { top: 8%;  left: 4%;  rotate: -3deg; }
.era-tab.t2 { top: 26%; left: 22%; rotate: 2deg; }
.era-tab.t3 { top: 46%; left: 8%;  rotate: -1.5deg; }
.era-tab.t4 { top: 63%; left: 28%; rotate: 2.5deg; }
.era-tab.t5 { top: 80%; left: 12%; rotate: -2deg; }
.reveal.in .era-tab { animation: tabIn .6s ease both, tabDrift 8s ease-in-out infinite alternate; }
.reveal.in .era-tab.t1 { animation-delay: .10s, .7s; }
.reveal.in .era-tab.t2 { animation-delay: .22s, 1.4s; }
.reveal.in .era-tab.t3 { animation-delay: .34s, 0s; }
.reveal.in .era-tab.t4 { animation-delay: .46s, 2.1s; }
.reveal.in .era-tab.t5 { animation-delay: .58s, 1.0s; }
@keyframes tabIn {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}
@keyframes tabDrift {
  from { translate: 0 0; }
  to   { translate: 0 -5px; }
}
.era-flow { position: relative; height: 2px; width: 90px; margin: 0 auto; }
.era-flow::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}
.era-flow i {
  position: absolute; top: -2px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); opacity: 0;
  box-shadow: 0 0 8px var(--accent-border);
}
.reveal.in .era-flow i { animation: flowDot 2.4s linear infinite; }
.reveal.in .era-flow i:nth-child(2) { animation-delay: .8s; }
.reveal.in .era-flow i:nth-child(3) { animation-delay: 1.6s; }
@keyframes flowDot {
  0%   { left: -4px; opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { left: calc(100% - 2px); opacity: 0; }
}
.era-frame {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-raise), var(--bg-raise)) padding-box,
    linear-gradient(140deg, rgba(61, 139, 255, .55), rgba(46, 111, 224, .35)) border-box;
  border-radius: var(--radius-lg); padding: 18px;
  max-width: 360px; margin: 0 auto;
  box-shadow: var(--elev-2);
  text-align: left;
}
.era-scope {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 600; color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 999px;
  padding: 4px 11px; margin-bottom: 12px;
}
.era-scope .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.era-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; margin-bottom: 7px;
}
.era-row:last-child { margin-bottom: 0; }
.reveal:not(.in) .era-row { opacity: 0; }
.reveal.in .era-row { animation: rowIn .5s ease backwards; }
.reveal.in .era-row.r1 { animation-delay: .55s; }
.reveal.in .era-row.r2 { animation-delay: .70s; }
.reveal.in .era-row.r3 { animation-delay: .85s; }
.reveal.in .era-row.r4 { animation-delay: 1.0s; }
.era-dot { width: 18px; height: 18px; border-radius: 6px; flex-shrink: 0; }
.era-line { height: 8px; border-radius: 4px; background: var(--bg-inset); flex: 1; }
[data-theme="dark"] .era-line { background: var(--bg-well); }
.era-line.w55 { max-width: 55%; }
.era-line.w60 { max-width: 60%; }
.era-line.w70 { max-width: 70%; }
.era-line.w80 { max-width: 80%; }
.era-chip {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px;
}
.era-chip.good { color: var(--green); background: var(--green-soft); }
.era-chip.warn { color: var(--amber); background: var(--amber-soft); }
.era-chip.bad  { color: var(--red);   background: var(--red-soft); }
.era-cap { font-size: 13px; color: var(--text-secondary); margin-top: 16px; }
.era-ledger {
  max-width: 760px; margin: 0 auto; display: grid; gap: 10px;
}
.era-ledger-row {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; align-items: baseline;
  background: var(--bg-raise); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 18px; font-size: 14px;
  box-shadow: var(--elev-1);
}
@media (max-width: 640px) { .era-ledger-row { grid-template-columns: 1fr; gap: 2px; } }
.era-ledger-row dt { color: var(--text-muted); text-align: left; }
.era-ledger-row dd { color: var(--text); text-align: left; font-weight: 500; }
.era-arrow { color: var(--accent); font-weight: 700; margin-right: 8px; }

/* ── Feature grid (homepage: visual cards linking to feature pages) ── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.feature-card {
  display: block;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  color: inherit;
  box-shadow: var(--elev-1);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
a.feature-card:hover {
  transform: translateY(-3px); border-color: var(--accent-border);
  box-shadow: var(--elev-2); text-decoration: none;
}
section.alt .feature-card { background: var(--bg); }
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature-card p { font-size: 14px; color: var(--text-secondary); }
.feature-card .card-link { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.feature-card .card-link::after { content: " →"; }
.feature-icon {
  width: 38px; height: 38px; border-radius: 10px; margin-bottom: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-border);
}
.feature-icon svg { width: 19px; height: 19px; }
.feature-icon.brand { background: var(--bg-raise); border-color: var(--border); }
.feature-icon.brand svg { width: 21px; height: 21px; }
.reveal:not(.in) .feature-card, .reveal:not(.in) .step { opacity: 0; }
.reveal.in .feature-card, .reveal.in .step { animation: rowIn .55s ease backwards; }
.reveal.in .feature-card:nth-child(1), .reveal.in .step:nth-child(1) { animation-delay: .05s; }
.reveal.in .feature-card:nth-child(2), .reveal.in .step:nth-child(2) { animation-delay: .12s; }
.reveal.in .feature-card:nth-child(3), .reveal.in .step:nth-child(3) { animation-delay: .19s; }
.reveal.in .feature-card:nth-child(4) { animation-delay: .26s; }
.reveal.in .feature-card:nth-child(5) { animation-delay: .33s; }
.reveal.in .feature-card:nth-child(6) { animation-delay: .40s; }
.reveal.in .feature-card:nth-child(7) { animation-delay: .47s; }
.reveal.in .feature-card:nth-child(8) { animation-delay: .54s; }

/* ── AI band ────────────────────────────────────────────────────────── */
.ai-band {
  position: relative;
  background: var(--bg-raise);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ai-band::before {
  content: ""; position: absolute; inset: -120px -20vw auto -20vw; height: 420px;
  background:
    radial-gradient(520px 280px at 72% 30%, var(--glow-ai-a), transparent 70%),
    radial-gradient(420px 240px at 80% 60%, var(--glow-ai-b), transparent 70%);
  pointer-events: none;
}
.ai-band .container { position: relative; }
.tick-ai { color: var(--ai); }
.ai-demo {
  border: 1px solid transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(140deg, rgba(139, 124, 255, 0.5), rgba(111, 95, 230, 0.3)) border-box;
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: var(--elev-2);
}
.ai-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.ai-spark {
  position: relative; width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--ai-soft); border: 1px solid var(--ai-border);
}
.ai-spark svg { width: 20px; height: 20px; }
.ai-ring {
  position: absolute; inset: -1px; border-radius: 10px;
  border: 1px solid var(--ai-border); opacity: 0;
  animation: aiRing 3.2s ease-out infinite;
}
.ai-ring.r2 { animation-delay: 1.6s; }
@keyframes aiRing {
  0%   { transform: scale(1); opacity: .6; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}
.ai-title { font-size: 15px; font-weight: 600; font-family: var(--font-display); }
.ai-sub { font-size: 12px; color: var(--text-secondary); }
.ai-chip {
  margin-left: auto; flex-shrink: 0;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ai); background: var(--ai-soft);
  border: 1px solid var(--ai-border);
  border-radius: 999px; padding: 4px 11px;
}
.ai-msg {
  background: var(--bg-well); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 16px;
  font-size: 14px; color: var(--text-secondary); line-height: 1.6;
  min-height: 92px; margin-bottom: 14px;
}
.ai-caret {
  display: inline-block; width: 2px; height: 15px; margin-left: 2px;
  background: var(--ai); vertical-align: text-bottom;
  animation: caretBlink 1s steps(1) infinite;
}
.ai-caret.done { display: none; }
@keyframes caretBlink { 50% { opacity: 0; } }
.ai-suggestion {
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 14px 16px;
  opacity: 0; transform: translateY(10px);
  transition: opacity .5s ease, transform .5s ease;
}
.ai-suggestion.show { opacity: 1; transform: none; }
.ai-sg-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ai-sg-title { font-size: 14px; font-weight: 600; color: var(--text); }
.ai-sg-meta { font-size: 12px; color: var(--text-secondary); }
.ai-pipeline { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.ai-step {
  font-size: 11.5px; font-weight: 600; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
  transition: color .4s ease, border-color .4s ease, background .4s ease, box-shadow .4s ease;
}
.ai-step.lit {
  color: var(--ai); border-color: var(--ai-border);
  background: var(--ai-soft);
}
.ai-step.lit.now { box-shadow: 0 0 0 3px var(--ai-soft); }
.ai-step-arrow { color: var(--text-muted); font-size: 12px; }

/* ── Split band (portal / AI) ───────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 36px; } }
.split .section-sub { margin-bottom: 22px; }
.mini-list { list-style: none; display: grid; gap: 12px; }
.mini-list li { display: flex; gap: 11px; align-items: flex-start; font-size: 15px; color: var(--text-secondary); }
.mini-list li strong { color: var(--text); }
.portal-card {
  background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg); padding: 26px;
  box-shadow: var(--elev-2);
}
.portal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.portal-logo {
  width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #2fce8f, #1f9d6e);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #fff;
}
.portal-title { font-size: 15px; font-weight: 600; }
.portal-sub { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.portal-chiprow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.portal-chip {
  font-size: 11.5px; font-weight: 600; color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 11px;
}
.portal-chip.on { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
.portal-line { height: 9px; border-radius: 5px; background: var(--bg-inset); margin-bottom: 9px; }
[data-theme="dark"] .portal-line { background: var(--bg-well); }
.portal-line.w60 { width: 60%; }
.portal-line.w80 { width: 80%; }

/* ── Trust tiles (security band) ────────────────────────────────────── */
.trust-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 26px; }
.trust-tile {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  box-shadow: var(--elev-1);
}
.trust-tile h3 { font-size: 14.5px; font-weight: 600; margin-bottom: 5px; display: flex; align-items: center; gap: 8px; }
.trust-tile p { font-size: 13.5px; color: var(--text-secondary); }
.trust-tile .tick { font-size: 13px; }
.trust-list { list-style: none; display: grid; gap: 16px; max-width: 740px; }
.trust-list li {
  display: flex; gap: 13px; align-items: flex-start;
  font-size: 15px; color: var(--text-secondary);
}
.trust-list li strong { color: var(--text); }
.tick { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ── Pricing ────────────────────────────────────────────────────────── */
.pricing-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px; max-width: 840px; margin: 0 auto;
}
.price-card {
  position: relative;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 30px 28px;
  box-shadow: var(--elev-1);
}
.price-card-featured {
  border-color: transparent;
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    var(--grad) border-box;
  border: 1px solid transparent;
}
.price-flag {
  display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--accent);
  background: var(--accent-soft); border-radius: 999px; padding: 4px 12px; margin-bottom: 12px;
}
.price-card h3 { font-size: 24px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.price-tag { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; }
.price-list { list-style: none; display: grid; gap: 11px; }
.price-list li {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 14px; color: var(--text-secondary);
}
.pricing-foot {
  text-align: center; color: var(--text-secondary); font-size: 14px;
  max-width: 660px; margin: 32px auto 0;
}

/* ── Get-started band ───────────────────────────────────────────────── */
.get-started { text-align: center; }
.get-started .section-sub { margin-left: auto; margin-right: auto; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; max-width: 900px; margin: 0 auto 36px; text-align: left; }
.step {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 22px; position: relative;
  box-shadow: var(--elev-1);
}
.step-num {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  color: var(--accent); letter-spacing: 0.08em; margin-bottom: 12px; display: block;
}
.step h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.step p { font-size: 14px; color: var(--text-secondary); }
.get-started .cta-row { margin-bottom: 18px; }
.get-started-note { font-size: 13.5px; color: var(--text-muted); }

/* ── Feature pages ──────────────────────────────────────────────────── */
.page-hero { padding: 64px 0 40px; position: relative; }
.page-hero::before {
  content: "";
  position: absolute; inset: -120px -30vw auto -30vw; height: 380px;
  background: radial-gradient(560px 280px at 40% 20%, var(--glow-a), transparent 70%);
  pointer-events: none;
}
.page-hero > .container { position: relative; }
.page-hero .crumb { font-size: 13.5px; margin-bottom: 18px; display: inline-block; color: var(--text-muted); }
.page-hero .crumb a { color: var(--text-muted); }
.page-hero .crumb a:hover { color: var(--accent); }
.page-hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  font-weight: 700; letter-spacing: -0.025em; line-height: 1.1;
  max-width: 760px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.page-hero h1 .page-mark { display: inline-flex; width: 40px; height: 40px; }
.page-hero .sub { font-size: 17px; color: var(--text-secondary); max-width: 680px; margin-bottom: 26px; }
.page-hero.ai-hero::before {
  background: radial-gradient(560px 280px at 40% 20%, var(--glow-ai-a), transparent 70%);
}
.feature-rows { display: grid; gap: 14px; max-width: 860px; }
.feature-row {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  box-shadow: var(--elev-1);
}
.feature-row h3 { font-size: 16.5px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.feature-row p { font-size: 14.5px; color: var(--text-secondary); }
.feature-row .rowchips { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.rowchip {
  font-size: 11.5px; font-weight: 600; font-family: var(--font-mono);
  color: var(--text-secondary); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px;
}
.page-cta { text-align: center; background: var(--bg-raise); border-top: 1px solid var(--border); }
.page-cta .section-sub { margin-left: auto; margin-right: auto; }
.page-note {
  font-size: 13px; color: var(--text-muted); max-width: 680px; margin-top: 22px;
}

/* ── Footer ─────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0; font-size: 13px; color: var(--text-muted);
  background: var(--bg-raise);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; }
.footer-brand { display: flex; align-items: center; gap: 9px; color: var(--text-secondary); font-family: var(--font-display); font-weight: 600; }
.footer-brand .brand-mark { width: 22px; height: 22px; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-legal { margin-top: 16px; font-size: 12px; color: var(--text-muted); }
footer a { color: var(--text-secondary); }

/* ── Legal pages (privacy, 404) ─────────────────────────────────────── */
.legal { max-width: 780px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { font-size: 32px; margin-bottom: 6px; letter-spacing: -0.01em; }
.legal .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 20px; margin: 36px 0 12px; }
.legal h3 { font-size: 16px; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-secondary); font-size: 15px; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal li { margin-bottom: 6px; }
.legal .callout {
  background: var(--bg-card); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 16px 18px; margin: 18px 0;
}
.legal .callout p { margin: 0; color: var(--text); }
.legal table { border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14px; }
.legal th, .legal td { border: 1px solid var(--border); padding: 9px 12px; text-align: left; color: var(--text-secondary); }
.legal th { color: var(--text); background: var(--bg-card); font-weight: 600; }

/* ── Reduced motion: final states, no animation ─────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, nav .nav-cta, .theme-toggle { transition: none; }
  .hero h1 .grad-text { animation: none; }
  .mock-window, .mock-row { animation: none; opacity: 1; transform: none; }
  .mock-scan, .mock-glare { display: none; }
  .era-tab, .reveal.in .era-tab { animation: none; opacity: 1; transform: translateY(0); }
  .reveal:not(.in) .era-row { opacity: 1; }
  .reveal.in .era-row { animation: none; }
  .era-flow i, .reveal.in .era-flow i { animation: none; opacity: 0; }
  .ai-ring { animation: none; opacity: 0; }
  .ai-caret { animation: none; }
  .ai-suggestion { transition: none; }
  .ai-step { transition: none; }
  .reveal:not(.in) .feature-card, .reveal:not(.in) .step { opacity: 1; }
  .reveal.in .feature-card, .reveal.in .step { animation: none; }
}
