/* StepForge website
   Palette comes from the app icon (deep navy, sky blue) and the app's
   red click marker, which doubles as the site's signature motif. */

:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #edf2f7;
  --border: #d9e2ec;
  --text: #0f1b27;
  --muted: #56687a;
  --accent: #0a6fd8;
  --accent-strong: #0657b0;
  --accent-soft: #e3f0fd;
  --sky: #41b6e6;
  --marker: #e5484d;
  --good: #0f8a5f;
  --good-soft: #e1f5ec;
  --ink: #0f1b27;
  --ink-2: #172a3c;
  --ink-border: #24394e;
  --ink-text: #e9f0f7;
  --ink-muted: #9fb2c5;
  --shadow-sm: 0 1px 2px rgb(15 27 39 / 0.06), 0 2px 6px rgb(15 27 39 / 0.05);
  --shadow-lg: 0 24px 60px -18px rgb(15 27 39 / 0.35), 0 8px 20px -10px rgb(15 27 39 / 0.2);
  --radius: 14px;
  --radius-lg: 22px;
  --font-display: "Bricolage Grotesque", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --container: 1180px;
  --scene-base: #eef3f9;
  --glow-a: rgb(65 182 230 / 0.34);
  --glow-b: rgb(10 111 216 / 0.20);
  --glow-c: rgb(139 92 246 / 0.16);
  --glow-d: rgb(229 72 77 / 0.10);
  --grid-line: rgb(15 27 39 / 0.055);
  --noise-opacity: 0.04;
  --vignette: transparent;
  --glass: color-mix(in srgb, var(--surface) 78%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 90%, transparent);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a131c;
    --surface: #101c28;
    --surface-2: #14222f;
    --border: #213447;
    --text: #e8eef5;
    --muted: #97a9bb;
    --accent: #4ea5ff;
    --accent-strong: #7bbcff;
    --accent-soft: #10263d;
    --good: #3ccf95;
    --good-soft: #0f2a21;
    --ink: #060d14;
    --ink-2: #0e1b28;
    --ink-border: #1d3044;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 24px 60px -18px rgb(0 0 0 / 0.7);
    --scene-base: #060c13;
    --glow-a: rgb(65 182 230 / 0.26);
    --glow-b: rgb(27 110 240 / 0.36);
    --glow-c: rgb(124 77 255 / 0.28);
    --glow-d: rgb(229 72 77 / 0.13);
    --grid-line: rgb(255 255 255 / 0.04);
    --noise-opacity: 0.07;
    --vignette: rgb(0 0 0 / 0.45);
    --glass: color-mix(in srgb, var(--surface) 66%, transparent);
    --glass-strong: color-mix(in srgb, var(--surface) 84%, transparent);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a131c;
  --surface: #101c28;
  --surface-2: #14222f;
  --border: #213447;
  --text: #e8eef5;
  --muted: #97a9bb;
  --accent: #4ea5ff;
  --accent-strong: #7bbcff;
  --accent-soft: #10263d;
  --good: #3ccf95;
  --good-soft: #0f2a21;
  --ink: #060d14;
  --ink-2: #0e1b28;
  --ink-border: #1d3044;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 24px 60px -18px rgb(0 0 0 / 0.7);
  --scene-base: #060c13;
  --glow-a: rgb(65 182 230 / 0.26);
  --glow-b: rgb(27 110 240 / 0.36);
  --glow-c: rgb(124 77 255 / 0.28);
  --glow-d: rgb(229 72 77 / 0.13);
  --grid-line: rgb(255 255 255 / 0.04);
  --noise-opacity: 0.07;
  --vignette: rgb(0 0 0 / 0.45);
  --glass: color-mix(in srgb, var(--surface) 66%, transparent);
  --glass-strong: color-mix(in srgb, var(--surface) 84%, transparent);
  color-scheme: dark;
}

/* ───────── Base ───────── */

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--scene-base);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.08em 0.4em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sky); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .container { padding: 0 16px; } }

.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.center { text-align: center; }
.icon { flex: none; }

/* ───────── Buttons ───────── */

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.72em 1.25em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700; font-size: 0.98rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.button:active { transform: translateY(1px); }
.button-large { padding: 0.9em 1.55em; font-size: 1.05rem; }
.button-small { padding: 0.5em 0.95em; font-size: 0.9rem; }
.button-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--accent) 70%, transparent); }
.button-primary:hover { background: var(--accent-strong); color: #fff; }
:root[data-theme="dark"] .button-primary, :root[data-theme="dark"] .button-primary:hover { color: #04111f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .button-primary, :root:not([data-theme="light"]) .button-primary:hover { color: #04111f; }
}
.button-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.button-ghost:hover { border-color: var(--accent); color: var(--text); }
.button-ghost-light { background: transparent; color: var(--ink-text); border-color: rgb(255 255 255 / 0.25); }
.button-ghost-light:hover { border-color: #fff; color: #fff; }

.icon-button {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 999px; border: 1px solid transparent;
  background: transparent; color: var(--text); cursor: pointer; text-decoration: none;
}
.icon-button:hover { background: var(--surface-2); color: var(--text); }

.text-link { display: inline-flex; align-items: center; gap: 0.35em; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.link-button { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta-center { justify-content: center; }

/* ───────── Header ───────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(14px);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; letter-spacing: -0.02em; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 9px; }
.site-nav { display: flex; gap: 26px; margin-right: auto; }
.site-nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.site-nav a:hover { color: var(--text); }
.header-actions { display: flex; align-items: center; gap: 6px; }
.header-download { margin-left: 6px; }
.nav-toggle { display: none; }

.theme-icon { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset -6px -3px 0 0 currentColor; transform: rotate(-20deg); }
:root[data-theme="dark"] .theme-icon { box-shadow: none; background: currentColor; transform: scale(0.72); outline: 3px dotted currentColor; outline-offset: 2px; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 68px;
    flex-direction: column; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .header-download { display: none; }
}

/* ───────── Hero ───────── */

.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, rgb(65 182 230 / 0.28), transparent 60%),
              radial-gradient(800px 400px at 0% 110%, rgb(10 111 216 / 0.25), transparent 60%),
              var(--ink);
  color: var(--ink-text);
  padding: 72px 0 96px;
  margin-top: -68px;
  padding-top: calc(72px + 68px);
}
.page-home .site-header:not(.is-scrolled) { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.page-home .site-header:not(.is-scrolled) .brand,
.page-home .site-header:not(.is-scrolled) .icon-button { color: #fff; }
.page-home .site-header:not(.is-scrolled) .site-nav a { color: rgb(233 240 247 / 0.78); }
.page-home .site-header:not(.is-scrolled) .site-nav a:hover { color: #fff; }
.page-home .site-header:not(.is-scrolled) .icon-button:hover { background: rgb(255 255 255 / 0.1); }
@media (max-width: 900px) {
  .page-home .site-header:not(.is-scrolled) .site-nav a { color: var(--muted); }
}

.hero-grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 1.6rem + 4.6vw, 5.1rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.035em; margin: 18px 0 24px; }
.hero-quote { position: relative; color: #fff; white-space: nowrap; }
.hero-quote::after {
  /* the click marker, circling the words */
  content: ""; position: absolute; left: -0.18em; right: -0.2em; top: 0.02em; bottom: -0.1em;
  border: 0.07em solid var(--marker); border-radius: 50%;
  transform: rotate(-3deg);
  box-shadow: 0 0 0 0.12em rgb(229 72 77 / 0.18);
  animation: marker-draw 0.9s 0.35s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes marker-draw { from { clip-path: inset(0 100% 0 0); opacity: 0.4; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
.lede { font-size: 1.16rem; color: var(--muted); max-width: 36em; }
.hero .lede { color: var(--ink-muted); }
.eyebrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; font-size: 0.92rem; color: var(--ink-muted); }
.pill { background: rgb(65 182 230 / 0.16); color: #9fdcf5; border: 1px solid rgb(65 182 230 / 0.35); padding: 3px 11px; border-radius: 999px; font-weight: 700; }
.hero .button-ghost { background: rgb(255 255 255 / 0.06); color: #fff; border-color: rgb(255 255 255 / 0.2); }
.hero .button-ghost:hover { border-color: #fff; }
.hero .button-primary { background: #1b86f0; color: #fff; }
.hero .button-primary:hover { background: #3a98f5; color: #fff; }
.hero-alt { margin-top: 14px; color: var(--ink-muted); font-weight: 600; }
.hero-alt a { color: #fff; text-decoration-color: rgb(255 255 255 / 0.4); text-underline-offset: 3px; }
.hero-alt a:hover { text-decoration-color: #fff; }
.hero-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 26px 0 0; padding: 0; color: var(--ink-muted); font-size: 0.9rem; font-weight: 600; }
.hero-facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero-facts li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sky); }

/* ───────── Interactive demo ───────── */

.demo {
  background: rgb(255 255 255 / 0.04);
  border: 1px solid var(--ink-border);
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 30px 80px -30px rgb(0 0 0 / 0.7);
}
.demo-label { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-height: 36px; font-size: 0.86rem; font-weight: 600; color: var(--ink-muted); padding: 2px 6px 12px; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--marker); box-shadow: 0 0 0 0 rgb(229 72 77 / 0.6); animation: rec 1.8s infinite; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 rgb(229 72 77 / 0.55); } 70% { box-shadow: 0 0 0 9px rgb(229 72 77 / 0); } 100% { box-shadow: 0 0 0 0 rgb(229 72 77 / 0); } }
.demo-stage { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }

.mock-window { position: relative; background: #f7f9fc; color: #1a2633; border-radius: 12px; overflow: hidden; height: 360px; display: flex; flex-direction: column; }
.mock-titlebar { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; background: #e8edf3; font-size: 0.78rem; font-weight: 700; color: #4b5b6b; }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #c9d2dc; }
.mock-body { display: grid; grid-template-columns: 38% 1fr; flex: 1; }
.mock-side { background: #eef2f6; padding: 10px 8px; display: flex; flex-direction: column; gap: 4px; }
.mock-nav { display: block; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; font-size: 0.82rem; font-weight: 600; color: #1a2633; }
.mock-nav.muted { color: #8391a0; }
.mock-content { padding: 14px; }
.mock-h { font-weight: 800; font-size: 0.92rem; margin-bottom: 10px; }
.mock-hint { font-size: 0.78rem; color: #6c7b8a; margin-bottom: 10px; }
.mock-skel { height: 10px; border-radius: 6px; background: #e3e9ef; margin: 12px 0; }
.mock-skel.short { width: 60%; }
.mock-row { display: flex; width: 100%; justify-content: space-between; align-items: center; padding: 9px 10px; margin-bottom: 6px; border-radius: 8px; background: #fff; border: 1px solid #e0e6ed; font-size: 0.8rem; font-weight: 600; color: #1a2633; text-align: left; }
.mock-row.muted { color: #8391a0; }
.bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 12px; }
.bars i { width: 3px; background: currentColor; border-radius: 1px; }
.bars i:nth-child(1) { height: 5px; } .bars i:nth-child(2) { height: 8px; } .bars i:nth-child(3) { height: 12px; }
.mock-field { background: #fff; border: 1px solid #d8e0e8; border-radius: 8px; padding: 8px 10px; font-size: 0.8rem; letter-spacing: 0.1em; color: #4b5b6b; margin-bottom: 12px; }
.mock-button { border: 0; background: #0a6fd8; color: #fff; font-weight: 700; font-size: 0.82rem; padding: 9px 16px; border-radius: 8px; }
.mock-connected { display: flex; align-items: center; gap: 6px; color: #0f8a5f; font-weight: 700; font-size: 0.85rem; }

[data-demo-target] { cursor: pointer; position: relative; }
[data-demo-target].is-next { box-shadow: 0 0 0 2px var(--sky); animation: hint 1.6s ease-in-out infinite; }
@keyframes hint { 50% { box-shadow: 0 0 0 5px rgb(65 182 230 / 0.35); } }
@media (prefers-reduced-motion: reduce) { [data-demo-target].is-next { animation: none; } .rec-dot { animation: none; } .hero-quote::after { animation: none; } }

.click-ring {
  position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border: 3px solid var(--marker); border-radius: 50%;
  pointer-events: none; z-index: 5;
  animation: ring 0.7s ease-out forwards;
}
@keyframes ring { 0% { transform: scale(0.3); opacity: 1; } 60% { transform: scale(1); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
.flash.is-on { animation: flash 0.35s ease-out; }
@keyframes flash { 0% { opacity: 0.75; } 100% { opacity: 0; } }

.demo-guide { background: var(--ink-2); border: 1px solid var(--ink-border); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.demo-guide-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8rem; font-weight: 700; color: var(--ink-text); padding-bottom: 10px; border-bottom: 1px solid var(--ink-border); }
.demo-guide-head .muted { color: var(--ink-muted); font-weight: 600; }

/* Large preview of the selected step: a scaled copy of the window at click time. */
.demo-preview { margin: 0; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.demo-shot { position: relative; flex: 1; min-height: 0; border-radius: 8px; overflow: hidden; background: rgb(255 255 255 / 0.03); border: 1px dashed var(--ink-border); }
.demo-shot.has-shot { border: 0; background: transparent; }
.demo-preview figcaption { font-size: 0.82rem; color: var(--ink-muted); line-height: 1.3; }
.demo-preview figcaption b { color: var(--sky); font-size: 0.72rem; letter-spacing: 0.04em; text-transform: uppercase; margin-right: 6px; }
.demo-preview figcaption strong { color: var(--ink-text); }
.demo-empty[hidden] { display: none; }
.demo-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 16px; text-align: center; font-size: 0.82rem; color: var(--ink-muted); }

.snap { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; animation: snap-in 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.snap .mock-window { height: 100%; min-height: 0; border-radius: 0; }
.snap-marker {
  position: absolute;
  width: calc(26px / var(--s, 1)); height: calc(26px / var(--s, 1));
  margin: calc(-13px / var(--s, 1)) 0 0 calc(-13px / var(--s, 1));
  border: calc(2.5px / var(--s, 1)) solid var(--marker); border-radius: 50%;
  box-shadow: 0 0 0 calc(3px / var(--s, 1)) rgb(229 72 77 / 0.2);
}
.demo-thumb .snap-marker { width: calc(11px / var(--s, 1)); height: calc(11px / var(--s, 1)); margin: calc(-5.5px / var(--s, 1)) 0 0 calc(-5.5px / var(--s, 1)); border-width: calc(1.8px / var(--s, 1)); box-shadow: none; }
.demo-thumb .snap { animation: none; }
@keyframes snap-in { from { opacity: 0; } to { opacity: 1; } }

/* Strip of captured steps, like StepForge's step list. */
.demo-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.demo-strip:empty { display: none; }
.demo-step { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 4px; border-radius: 8px; border: 1px solid var(--ink-border); background: rgb(255 255 255 / 0.04); cursor: pointer; text-align: left; animation: step-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.demo-step:hover { border-color: rgb(65 182 230 / 0.5); }
.demo-step[aria-pressed="true"] { border-color: var(--sky); background: rgb(65 182 230 / 0.12); }
@keyframes step-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.demo-thumb { position: relative; display: block; width: 100%; height: 44px; border-radius: 5px; overflow: hidden; background: #f7f9fc; }
.demo-step-n { font-size: 0.7rem; font-weight: 700; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-step-n b { color: var(--sky); }

/* "Finished" state lives in the status bar so the preview keeps its room. */
.demo-done { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.demo-done[hidden] { display: none; }
.demo-formats { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.demo-formats span { background: rgb(65 182 230 / 0.14); color: #a8e0f6; border: 1px solid rgb(65 182 230 / 0.3); border-radius: 999px; padding: 1px 9px; font-weight: 700; font-size: 0.72rem; }
.demo .link-button { color: #9fdcf5; font-size: 0.82rem; }

@media (max-width: 1020px) {
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
}
@media (max-width: 560px) {
  .hero { padding-bottom: 64px; }
  .demo-stage { grid-template-columns: 1fr; }
  .mock-window { height: auto; min-height: 260px; }
  .demo-shot { flex: none; aspect-ratio: var(--shot-ratio, 4 / 3); }
}

/* ───────── Sections ───────── */

.section { padding: 104px 0; }
@media (max-width: 700px) { .section { padding: 72px 0; } }
.section-tint { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--surface-2) 45%, transparent) 18%, color-mix(in srgb, var(--surface-2) 45%, transparent) 82%, transparent); }
.section-ink { background: var(--ink); color: var(--ink-text); }
.section-ink .section-head p:not(.kicker) { color: var(--ink-muted); }
.section-ink .kicker { color: var(--sky); }
.section-ink a { color: #8fd3f2; }

.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head p:not(.kicker) { margin-top: 18px; font-size: 1.1rem; color: var(--muted); }
.section-head-left { text-align: left; margin: 0; }
.kicker { font-weight: 800; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 14px; }

/* Before / after */
.compare { display: grid; grid-template-columns: 1fr 1.3fr; gap: 28px; align-items: stretch; }
.compare-card { margin: 0; background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 16px; }
.compare-after { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 800; padding: 4px 11px; border-radius: 999px; }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-good { background: var(--good-soft); color: var(--good); }
.doc-mock { font-family: Georgia, "Times New Roman", serif; color: var(--muted); background: var(--surface-2); border-radius: 12px; padding: 22px 24px; flex: 1; }
.doc-title { font-weight: 700; color: var(--text); font-size: 1.1rem; margin-bottom: 10px; }
.doc-mock ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.doc-note { margin-top: 18px; font-family: var(--font-body); font-style: italic; color: var(--marker); font-weight: 600; }
.step-card { background: var(--surface-2); border-radius: 12px; overflow: hidden; }
.step-card-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; }
.step-num { font-family: var(--font-mono); font-size: 0.8rem; background: var(--accent); color: #fff; border-radius: 6px; padding: 2px 7px; }
.step-card img { width: 100%; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.step-card p { padding: 14px 16px 16px; color: var(--muted); }
@media (max-width: 860px) { .compare { grid-template-columns: 1fr; } }

/* How it works */
.how-steps { list-style: none; margin: 0 0 64px; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: how; }
.how-steps li { background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; box-shadow: var(--shadow-sm); }
.how-steps h3 { display: flex; align-items: center; gap: 10px; font-size: 1.4rem; margin: 18px 0 10px; }
.how-steps p { color: var(--muted); }
.how-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); }
.how-steps li:first-child .how-icon { background: rgb(229 72 77 / 0.12); color: var(--marker); }
.how-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--marker); color: var(--marker); font-family: var(--font-body); font-size: 0.85rem; font-weight: 800; flex: none; }
@media (max-width: 860px) { .how-steps { grid-template-columns: 1fr; } }

/* App screenshots */
.app-shot { margin: 0; }
.app-shot-small { margin-top: 72px; }
.app-frame { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: var(--surface); }
.app-shot figcaption { text-align: center; color: var(--muted); font-size: 0.95rem; margin-top: 18px; }

/* Video */
.video-shot { margin: 0 auto; max-width: 1080px; }
.video-frame { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg); background: #0f141b; aspect-ratio: 16 / 9; }
.video-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }

.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: block; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: block; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; transition: border-color 0.2s ease, transform 0.2s ease; }
.feature:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-2px); }
.feature h3 { margin: 16px 0 8px; }
.feature p { color: var(--muted); font-size: 0.97rem; }
.feature-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
@media (max-width: 960px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .feature-grid { grid-template-columns: 1fr; } }

/* Real guide viewer */
.viewer { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; background: var(--ink-2); border: 1px solid var(--ink-border); border-radius: var(--radius-lg); padding: 16px; }
.viewer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 620px; overflow-y: auto; }
.viewer-list button {
  display: flex; gap: 12px; align-items: center; width: 100%;
  text-align: left; border: 1px solid transparent; background: none;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  color: var(--ink-muted); font-weight: 600; font-size: 0.93rem;
}
.viewer-list button:hover { background: rgb(255 255 255 / 0.05); color: var(--ink-text); }
.viewer-list button[aria-selected="true"] { background: rgb(65 182 230 / 0.12); border-color: rgb(65 182 230 / 0.35); color: #fff; }
.viewer-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid currentColor; font-size: 0.75rem; font-weight: 800; flex: none; }
.viewer-list button[aria-selected="true"] .viewer-n { border-color: var(--marker); color: #fff; background: var(--marker); }
.viewer-panel { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.viewer-image { border-radius: 12px; overflow: hidden; background: #000; aspect-ratio: 16 / 10; }
.viewer-image img { width: 100%; height: 100%; object-fit: contain; transition: opacity 0.2s ease; }
.viewer-image img.is-loading { opacity: 0.4; }
.viewer-caption { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding: 0 6px 6px; }
.viewer-kicker { font-size: 0.8rem; font-weight: 700; color: var(--sky); text-transform: uppercase; letter-spacing: 0.08em; }
.viewer-caption h3 { font-size: 1.45rem; margin: 6px 0; color: #fff; }
.viewer-caption p { color: var(--ink-muted); }
.viewer-nav { display: flex; gap: 8px; }
.viewer-nav .icon-button { border-color: var(--ink-border); color: var(--ink-text); }
.viewer-nav .icon-button:hover { background: rgb(255 255 255 / 0.08); }
.viewer-footnote { text-align: center; color: var(--ink-muted); margin-top: 22px; }
.viewer-footnote + .viewer-footnote { margin-top: 8px; }
@media (max-width: 900px) {
  .viewer { grid-template-columns: 1fr; }
  .viewer-list { flex-direction: row; overflow-x: auto; max-height: none; padding-bottom: 4px; order: 2; }
  .viewer-list button { white-space: nowrap; }
}

/* Export formats */
.export-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 56px; align-items: center; }
.format-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.format { display: flex; flex-direction: column; gap: 3px; background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: 12px; padding: 14px 18px; border-left: 4px solid var(--accent); }
.format:nth-child(-n+4) { border-left-color: var(--marker); }
.format-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.format-name small { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); font-weight: 500; margin-left: 4px; }
.format-use { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 900px) { .export-grid { grid-template-columns: 1fr; gap: 36px; } }
@media (max-width: 520px) { .format-grid { grid-template-columns: 1fr; } }

/* Use cases */
.use-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.use { display: flex; gap: 16px; background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.use h3 { margin-bottom: 6px; }
.use p { color: var(--muted); font-size: 0.96rem; }
.use-icon { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--marker); color: var(--marker); flex: none; }
@media (max-width: 960px) { .use-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .use-grid { grid-template-columns: 1fr; } }

/* Privacy */
.privacy-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 64px; align-items: center; }
.privacy-grid .section-head p:not(.kicker) { margin-bottom: 24px; }
.privacy-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.privacy-list li { display: flex; flex-direction: column; gap: 14px; background: var(--ink-2); border: 1px solid var(--ink-border); border-radius: var(--radius); padding: 22px; color: var(--sky); }
.privacy-list h3 { color: #fff; margin-bottom: 6px; }
.privacy-list p { color: var(--ink-muted); font-size: 0.95rem; }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: 1fr; gap: 40px; } }
@media (max-width: 520px) { .privacy-list { grid-template-columns: 1fr; } }

/* Open source */
.oss-card { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; background: var(--glass-strong); -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); border: 1px solid var(--border); border-radius: 28px; padding: 56px; box-shadow: var(--shadow-sm); }
.oss-copy p:not(.kicker) { color: var(--muted); margin-top: 16px; font-size: 1.08rem; }
.repo-card { display: flex; flex-direction: column; gap: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 16px; padding: 24px; text-decoration: none; color: var(--text); transition: border-color 0.2s ease, transform 0.2s ease; }
.repo-card:hover { border-color: var(--accent); color: var(--text); transform: translateY(-2px); }
.repo-top { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; color: var(--accent); }
.repo-desc { color: var(--muted); }
.repo-meta { display: flex; flex-wrap: wrap; gap: 18px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.repo-meta span { display: inline-flex; align-items: center; gap: 6px; }
.lang-dot { width: 11px; height: 11px; border-radius: 50%; background: #f1e05a; }
@media (max-width: 900px) { .oss-card { grid-template-columns: 1fr; padding: 32px 24px; } }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq { display: flex; flex-direction: column; gap: 10px; }
.faq details { background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius); padding: 0 22px; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 32px 20px 0; font-weight: 700; font-size: 1.05rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.5rem; font-weight: 500; color: var(--accent); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 20px; }

/* Final CTA */
.final-cta { background: radial-gradient(900px 400px at 50% 120%, rgb(65 182 230 / 0.3), transparent 70%), var(--ink); color: var(--ink-text); padding: 110px 0; text-align: center; }
.final-inner { display: flex; flex-direction: column; align-items: center; }
.final-inner img { border-radius: 22px; margin-bottom: 28px; box-shadow: 0 20px 50px -12px rgb(0 0 0 / 0.6); }
.final-inner p { color: var(--ink-muted); margin-top: 16px; font-size: 1.1rem; }
.final-cta .button-primary { background: #1b86f0; color: #fff; }
.final-cta .button-primary:hover { background: #3a98f5; }

/* ───────── Footer ───────── */

.site-footer { background: var(--glass-strong); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border-top: 1px solid var(--border); padding: 64px 0 28px; font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; }
.footer-brand p { color: var(--muted); margin-top: 14px; max-width: 26em; }
.footer-heading { font-family: var(--font-body); font-size: 0.8rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--text); text-decoration: none; }
.site-footer ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.88rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }

/* ───────── Download page ───────── */

.download-hero { padding: 72px 0 8px; text-align: center; }
.download-hero h1 { font-size: clamp(2.6rem, 1.8rem + 3vw, 4rem); font-weight: 800; letter-spacing: -0.03em; }
.download-hero .lede { margin: 18px auto 0; }
.download-section { padding-top: 48px; }
.os-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.os-tabs button { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-weight: 700; cursor: pointer; color: var(--muted); }
.os-tabs button:hover { color: var(--text); }
.os-tabs button[aria-selected="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.os-req { text-align: center; color: var(--muted); font-weight: 600; margin-bottom: 24px; }
.install-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; }
.install-card { background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start; min-width: 0; }
.install-recommended { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.install-card h2 { font-size: 1.55rem; }
.install-card > p { color: var(--muted); }
.install-card .small { color: var(--muted); }
.download-file { max-width: 100%; }
.download-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .install-grid { grid-template-columns: 1fr; } }

.code-block { width: 100%; background: #0c1722; border: 1px solid #1f3346; border-radius: 12px; overflow: hidden; color: #d9e6f2; }
.code-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 16px; background: #122131; font-size: 0.78rem; font-weight: 700; color: #8fa6bc; text-transform: uppercase; letter-spacing: 0.08em; }
.copy-button { display: inline-flex; align-items: center; gap: 6px; background: rgb(255 255 255 / 0.06); border: 1px solid #294056; color: #d9e6f2; border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 0.8rem; font-weight: 700; text-transform: none; letter-spacing: 0; }
.copy-button:hover { border-color: var(--sky); }
.copy-button.is-copied { border-color: #3ccf95; color: #3ccf95; }
.code-block pre { margin: 0; padding: 16px; overflow-x: auto; font-family: var(--font-mono); font-size: 0.84rem; line-height: 1.65; }
.code-block code { background: none; border: 0; padding: 0; font-size: inherit; overflow-wrap: normal; }

.other-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.other-options > div { background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.other-options h2 { font-size: 1.15rem; }
.other-options p { color: var(--muted); font-size: 0.95rem; }
.other-options .text-link { overflow-wrap: anywhere; }
@media (max-width: 900px) { .other-options { grid-template-columns: 1fr; } }

.next-steps { list-style: none; margin: 0 0 40px; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.next-steps li { display: flex; flex-direction: column; gap: 14px; background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.next-steps h3 { margin-bottom: 6px; }
.next-steps p { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 960px) { .next-steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .next-steps { grid-template-columns: 1fr; } }

/* ───────── Comparison pages ───────── */

.page-hero { padding: 72px 0 8px; text-align: center; }
.page-hero h1 { font-size: clamp(2.4rem, 1.6rem + 3vw, 3.8rem); font-weight: 800; letter-spacing: -0.03em; max-width: 16em; margin: 0 auto; }
.page-hero .lede { margin: 20px auto 0; }
.page-hero .cta-row { margin-top: 30px; }
.section-compact { padding: 64px 0; }
.compare-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.compare-link { display: flex; flex-direction: column; gap: 10px; background: var(--glass); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; color: inherit; text-decoration: none; transition: border-color 0.2s ease, transform 0.2s ease; }
.compare-link:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); transform: translateY(-2px); }
.compare-link h2 { font-size: 1.3rem; }
.compare-link p { color: var(--muted); flex: 1; }
.compare-link .text-link { color: var(--accent); }
.reason-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; max-width: 960px; margin: 0 auto; }
.reason-grid .feature h3 { margin-top: 0; }
.compare-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--glass-strong); }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.compare-table.is-wide { min-width: 720px; }
.compare-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.compare-table th, .compare-table td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.compare-table tbody tr:last-child > * { border-bottom: 0; }
.compare-table thead th { font-family: var(--font-display); font-size: 1.05rem; }
.compare-table tbody th { font-weight: 700; width: 18%; }
.compare-table td { color: var(--muted); }
.compare-table .is-stepforge { background: var(--accent-soft); color: var(--text); font-weight: 600; }
.compare-source { max-width: 760px; margin: 18px auto 0; text-align: center; color: var(--muted); font-size: 0.86rem; }
.compare-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 28px; margin-top: 22px; }
.compare-also { text-align: center; margin-top: 26px; color: var(--muted); }
.compare-fit { max-width: 760px; }
.compare-fit h2 { font-size: 1.6rem; margin-bottom: 14px; }
.compare-fit ul { padding-left: 1.2em; display: grid; gap: 8px; margin: 0 0 18px; }
.compare-fit p { color: var(--muted); }
@media (max-width: 900px) { .compare-cards { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .reason-grid { grid-template-columns: 1fr; } .compare-table th, .compare-table td { padding: 12px; } }

/* Legal pages */
.legal { padding: 64px 0 104px; }
.legal-grid { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px 64px; max-width: 1080px; }
.legal-head { grid-column: 1 / -1; padding-bottom: 28px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.legal-head h1 { font-size: clamp(2.4rem, 1.8rem + 2.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em; }
.legal-date { color: var(--muted); margin-top: 10px; font-weight: 600; }
.legal-toc { position: sticky; top: 92px; align-self: start; font-size: 0.92rem; }
.legal-toc-title { font-weight: 800; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.legal-toc a { color: var(--muted); text-decoration: none; }
.legal-toc a:hover { color: var(--accent); }
.legal-body { max-width: 720px; min-width: 0; }
.legal-body section { padding-bottom: 36px; }
.legal-body h2 { font-size: 1.6rem; margin-bottom: 14px; }
.legal-body h3 { font-size: 1.1rem; margin: 26px 0 10px; }
.legal-body p, .legal-body li { color: var(--text); }
.legal-body p + p, .legal-body ul + p, .legal-body p + ul { margin-top: 12px; }
.legal-body ul { padding-left: 1.2em; margin: 0; display: grid; gap: 8px; }
.legal-body .callout { background: var(--accent-soft); border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; padding: 16px 18px; }
.legal-body .caps { text-transform: uppercase; font-size: 0.9rem; letter-spacing: 0.01em; color: var(--muted); }
@media (max-width: 860px) {
  .legal-grid { grid-template-columns: 1fr; }
  .legal-toc { position: static; background: var(--surface-2); border-radius: var(--radius); padding: 18px 20px; }
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal a { color: var(--muted); }

/* Error pages */
.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 80px 0; }
.error-page h1 { font-size: clamp(2.4rem, 2rem + 2vw, 3.4rem); font-weight: 800; margin: 12px 0 16px; }
.error-page p { color: var(--muted); }

/* ───────── Atmosphere: one fixed backdrop behind every page ─────────
   Drifting colour glows, a fading grid, and film grain. */

.bg-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-scene::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, transparent 45%, var(--vignette) 100%); }

.bg-aurora { position: absolute; inset: -15%; transform: translate3d(0, calc(var(--scroll-progress, 0) * -18vh), 0); }
.blob { position: absolute; border-radius: 50%; background: radial-gradient(circle at center, var(--c) 0, transparent 64%); will-change: transform; animation: drift 42s ease-in-out infinite alternate; }
.blob-a { --c: var(--glow-a); width: 70vmax; height: 70vmax; top: -22vmax; left: -18vmax; }
.blob-b { --c: var(--glow-b); width: 64vmax; height: 64vmax; top: 18%; right: -26vmax; animation-duration: 50s; animation-delay: -14s; }
.blob-c { --c: var(--glow-c); width: 72vmax; height: 72vmax; bottom: -34vmax; left: 12%; animation-duration: 58s; animation-delay: -26s; }
.blob-d { --c: var(--glow-d); width: 42vmax; height: 42vmax; top: 46%; left: 38%; animation-duration: 34s; animation-delay: -8s; }
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(7vw, 5vh, 0) scale(1.14); }
  100% { transform: translate3d(-5vw, 9vh, 0) scale(0.92); }
}

.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 85% 70% at 50% 35%, #000 25%, transparent 78%);
}

.bg-noise {
  position: absolute; inset: 0; opacity: var(--noise-opacity); mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .bg-aurora { transform: none; }
}

/* Dark mode: the hero and bands dissolve into the backdrop instead of sitting on it. */
:root[data-theme="dark"] .hero, :root[data-theme="dark"] .final-cta { background: transparent; }
:root[data-theme="dark"] .hero-grid-bg { display: none; }
:root[data-theme="dark"] .section-ink { background: linear-gradient(180deg, transparent, rgb(3 7 12 / 0.55) 14%, rgb(3 7 12 / 0.55) 86%, transparent); }
:root[data-theme="dark"] .section-tint { background: linear-gradient(180deg, transparent, rgb(255 255 255 / 0.025) 18%, rgb(255 255 255 / 0.025) 82%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero, :root:not([data-theme="light"]) .final-cta { background: transparent; }
  :root:not([data-theme="light"]) .hero-grid-bg { display: none; }
  :root:not([data-theme="light"]) .section-ink { background: linear-gradient(180deg, transparent, rgb(3 7 12 / 0.55) 14%, rgb(3 7 12 / 0.55) 86%, transparent); }
  :root:not([data-theme="light"]) .section-tint { background: linear-gradient(180deg, transparent, rgb(255 255 255 / 0.025) 18%, rgb(255 255 255 / 0.025) 82%, transparent); }
}
