/* =============================================================
   Ten-X — Design System (dual-theme, single-page)
   Premium, minimal, responsive one-page landing.
   Sections:
     1.  Design Tokens (dark default + light override)
     2.  Reset & Base
     3.  Typography
     4.  Layout Helpers
     5.  Buttons + Theme Toggle
     6.  Hero + Logo
     7.  Section scaffolding
     8.  About — stats, checklist, engines, methodology, certs
     9.  Privacy — Principles Timeline
     10. Terms — Numbered Clauses
     11. Footer
     12. Utilities & Animations
     13. Responsive
   ============================================================= */

/* -------------------------------------------------------------
   1. Design Tokens — dark is the default theme
   ------------------------------------------------------------- */
:root {
  /* Brand — blue identity (#020617 · #0F172A · #1E3A8A · #3B82F6) */
  --primary: #1E3A8A;                /* deep brand blue — accents & interactive */
  --primary-2: #3B82F6;              /* bright blue — highlights, glow, CTA */
  --primary-ink: #93C5FD;            /* light blue for text-on-dark */
  --gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 50%, #1E3A8A 100%);
  --gradient-soft: linear-gradient(135deg, rgba(59,130,246,0.16), rgba(30,58,138,0.05));

  /* Surfaces */
  --stage: #020617;                  /* hero backdrop — stays dark in both themes */
  --bg: #020617;                     /* primary page background */
  --bg-soft: #0F172A;                /* secondary / tinted sections */
  --bg-elevated: #111D38;            /* elevated chips & controls */
  --text: #FFFFFF;
  --text-soft: #C4CEDE;              /* cool light body */
  --text-muted: #7C8AA1;             /* cool muted */
  --border: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.16);
  --card-bg: rgba(255, 255, 255, 0.04);
  --card-border: rgba(255, 255, 255, 0.09);

  --shadow-sm: 0 2px 8px rgba(2, 6, 23, 0.45);
  --shadow-md: 0 14px 36px rgba(2, 6, 23, 0.55);
  --shadow-lg: 0 30px 70px rgba(2, 6, 23, 0.65);

  --icon-bg: linear-gradient(135deg, rgba(59,130,246,0.22), rgba(30,58,138,0.14));
  --icon-border: rgba(59, 130, 246, 0.32);

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  /* Motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.45s;

  /* Layout */
  --maxw: 1120px;

  /* Type */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------
   1b. Light theme — a refined, premium daylight palette.
   The hero keeps --stage (dark) as a cinematic backdrop; the
   content below adopts these tokens.
   ------------------------------------------------------------- */
:root[data-theme="light"] {
  /* Brand — deepen the blue so it reads on light without shouting */
  --primary: #1D4ED8;                /* blue-700 */
  --primary-2: #3B82F6;
  --primary-ink: #1D4ED8;            /* accent text on light */
  --gradient: linear-gradient(135deg, #3B82F6 0%, #2563EB 55%, #1E3A8A 100%);
  --gradient-soft: linear-gradient(135deg, rgba(59,130,246,0.10), rgba(30,58,138,0.04));

  /* Surfaces — cool, faintly-blue daylight (never harsh white) */
  --bg: #EEF3FB;
  --bg-soft: #E1E9F6;                /* tinted sections recede a touch */
  --bg-elevated: #FFFFFF;
  --text: #0A1428;                   /* navy near-black */
  --text-soft: #46536B;
  --text-muted: #6A7691;
  --border: rgba(15, 23, 42, 0.10);
  --border-strong: rgba(15, 23, 42, 0.16);
  --card-bg: #FFFFFF;
  --card-border: rgba(15, 23, 42, 0.08);

  /* Soft, blue-tinted premium shadows */
  --shadow-sm: 0 2px 10px rgba(30, 58, 138, 0.08);
  --shadow-md: 0 16px 40px rgba(30, 58, 138, 0.13);
  --shadow-lg: 0 30px 70px rgba(30, 58, 138, 0.17);

  --icon-bg: linear-gradient(135deg, rgba(59,130,246,0.13), rgba(30,58,138,0.06));
  --icon-border: rgba(37, 99, 235, 0.24);
}

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

html {
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.65;
  height: 100%;
  overflow: hidden;                 /* single-viewport experience — no page scroll */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

/* Ambient gradient glow anchored to the page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55vw 55vw at 82% -12%, rgba(30, 58, 138, 0.32), transparent 60%),
    radial-gradient(45vw 45vw at -5% 108%, rgba(59, 130, 246, 0.15), transparent 60%);
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
}
/* softer, cooler ambient wash in daylight */
:root[data-theme="light"] body::before {
  background:
    radial-gradient(55vw 55vw at 82% -12%, rgba(59, 130, 246, 0.10), transparent 60%),
    radial-gradient(48vw 48vw at -6% 108%, rgba(37, 99, 235, 0.07), transparent 62%);
}

/* Give surfaces/cards/borders a smooth cross-fade when the theme flips */
.section--tint,
.doc__note, .theme-toggle {
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease),
              box-shadow 0.5s var(--ease), color 0.5s var(--ease);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

::selection { background: rgba(59, 130, 246, 0.32); color: #fff; }

/* -------------------------------------------------------------
   3. Typography
   ------------------------------------------------------------- */
h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.4rem); }

p { color: var(--text-soft); }

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary-ink);
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--icon-border);
  border-radius: var(--radius-pill);
  background: var(--gradient-soft);
}

/* -------------------------------------------------------------
   4. Layout Helpers
   ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* -------------------------------------------------------------
   5. Buttons + Theme Toggle
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.btn--primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.42);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(59, 130, 246, 0.55);
}
.btn--ghost {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--primary-2); color: var(--primary-ink); }

/* Theme toggle — a self-contained glass chip that stays legible over
   both the dark hero and the light content (it carries its own surface). */
.theme-toggle {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 60;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-pill);
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  color: var(--primary-ink);
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease), background-color 0.5s var(--ease);
}
.theme-toggle:hover {
  transform: translateY(-2px) scale(1.04);
  border-color: var(--primary-2);
  box-shadow: var(--shadow-lg);
}
.theme-toggle:active { transform: scale(0.96); }
.theme-toggle svg { width: 21px; height: 21px; }
/* Show the icon for the theme you'd switch TO */
.theme-toggle__moon { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__moon { display: block; }

/* -------------------------------------------------------------
   6. Hero + Logo — cinematic, layered composition
   Stacking (low → high): particles · rays · aura · rings · logo · grain
   Every animated layer moves via transform/opacity only (60 fps).
   ------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  color: #fff;                        /* hero content is always light-on-dark */
  padding: 5rem 1.5rem 4rem;
  /* Immersive blue gradient stage — deep #020617 base, a brand-blue
     bloom up top and a subtler one below, so the particles read against
     depth without ever competing with the logo. */
  background-color: var(--stage);
  background-image:
    radial-gradient(120% 85% at 50% -8%, rgba(30, 58, 138, 0.55), transparent 55%),
    radial-gradient(90% 70% at 50% 112%, rgba(37, 99, 235, 0.20), transparent 60%),
    linear-gradient(180deg, #070F26 0%, #030A1C 48%, #010409 100%);
  overflow: hidden;
  isolation: isolate;                 /* own stacking context for blend modes */
  perspective: 1200px;                /* enables 3D logo tilt */
}


/* Every full-bleed decorative layer is centered & non-interactive */
.hero__edge,
.hero__nebula,
.hero__particles,
.hero__rays,
.hero__aura,
.hero__grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* --- Layer 0b · drifting nebula clouds (subtle living galaxy) ---- */
.hero__nebula {
  z-index: 1;
  opacity: 0;                          /* faded in with the intro */
  overflow: hidden;
}
.hero__nebula::before,
.hero__nebula::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  mix-blend-mode: screen;
  will-change: transform;
}
.hero__nebula::before {
  width: 62vw; height: 62vw;
  left: -12%; top: -18%;
  background: radial-gradient(closest-side, rgba(37, 99, 235, 0.16), transparent 70%);
  animation: hero-nebula-a 72s var(--ease-in-out) infinite alternate;
}
.hero__nebula::after {
  width: 56vw; height: 56vw;
  right: -14%; bottom: -20%;
  background: radial-gradient(closest-side, rgba(59, 130, 246, 0.13), transparent 70%);
  animation: hero-nebula-b 88s var(--ease-in-out) infinite alternate;
}

/* --- Layer 0 · plasma energy field (frames the viewport) ---- */
.hero__edge {
  z-index: 1;
  opacity: 0;                         /* faded in by the intro timeline */
  overflow: hidden;
  /* keep the energy at the edges — clear the centre for the logo */
  -webkit-mask: radial-gradient(125% 115% at 50% 50%, transparent 42%, #000 78%);
  mask: radial-gradient(125% 115% at 50% 50%, transparent 42%, #000 78%);
}
.hero__edge::before,
.hero__edge::after {
  content: "";
  position: absolute;
  inset: -25%;
}
/* flowing, rotating plasma */
.hero__edge::before {
  background: conic-gradient(from 0deg,
    rgba(30, 58, 138, 0),
    rgba(59, 130, 246, 0.55) 12%,
    rgba(96, 165, 250, 0.12) 28%,
    rgba(30, 58, 138, 0.55) 46%,
    rgba(37, 99, 235, 0.12) 62%,
    rgba(59, 130, 246, 0.5) 80%,
    rgba(30, 58, 138, 0));
  filter: blur(58px);
  will-change: transform;
  animation: hero-spin 26s linear infinite;
}
/* breathing corner blooms */
.hero__edge::after {
  background:
    radial-gradient(58% 46% at 50% 0%,   rgba(59, 130, 246, 0.34), transparent 70%),
    radial-gradient(58% 46% at 50% 100%, rgba(30, 58, 138, 0.34), transparent 70%),
    radial-gradient(42% 60% at 0% 50%,   rgba(37, 99, 235, 0.26), transparent 70%),
    radial-gradient(42% 60% at 100% 50%, rgba(37, 99, 235, 0.26), transparent 70%);
  filter: blur(46px);
  mix-blend-mode: screen;
  will-change: transform, opacity;
  animation: hero-edge-pulse 8s var(--ease-in-out) infinite;
}

/* --- Layer 1 · stardust / ambient particle canvas ----------- */
.hero__particles { width: 100%; height: 100%; z-index: 2; opacity: 1; }

/* --- Layer 1 · rotating light rays -------------------------- */
.hero__rays {
  z-index: 1;
  width: 160vmax;
  height: 160vmax;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    rgba(96, 165, 250, 0.14) 14deg,
    transparent 40deg,
    transparent 130deg,
    rgba(59, 130, 246, 0.12) 158deg,
    transparent 190deg,
    transparent 300deg,
    rgba(96, 165, 250, 0.10) 328deg,
    transparent 360deg
  );
  filter: blur(38px);
  opacity: 0;
  mix-blend-mode: screen;
  will-change: transform;
  animation: hero-spin 46s linear infinite;
}

/* --- Layer 2 · breathing aura ------------------------------- */
.hero__aura {
  z-index: 1;
  width: min(680px, 96vw);
  height: min(680px, 96vw);
  inset: auto;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  background: radial-gradient(closest-side,
    rgba(59, 130, 246, 0.44),
    rgba(30, 58, 138, 0.20) 55%,
    transparent 72%);
  filter: blur(46px);
  opacity: 0;
  will-change: transform, opacity;
}
/* aura only breathes once the logo has been forged from stardust */
.hero.is-formed .hero__aura {
  animation: hero-breathe 7s var(--ease-in-out) infinite;
}

/* --- Layer 4 · the focal point (logo) ----------------------- */
.hero__inner {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.6rem;
}
.hero-logo__wrap {
  position: relative;
  will-change: transform;
  transform-style: preserve-3d;
}
.hero-logo {
  display: block;
  /* vector logo — slightly smaller than before for better hero balance */
  width: min(424px, 78vw);
  height: auto;
  will-change: transform, filter;
  filter: drop-shadow(0 16px 42px rgba(37, 99, 235, 0.5));
}

/* Pre-hidden while motion users watch it forge from stardust */
.anim-magic .hero-logo { opacity: 0; }

/* Masked shimmer: a light band clipped to the exact logo glyphs.
   JS sweeps its background-position once, as the logo forms. */
.hero-logo__shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg,
    transparent 42%,
    rgba(255, 255, 255, 0.85) 49%,
    rgba(191, 219, 254, 0.55) 53%,
    transparent 62%);
  background-size: 280% 100%;
  background-position: 150% 0;
  mix-blend-mode: screen;
  -webkit-mask: url("../assets/images/logo.svg") center / contain no-repeat;
  mask: url("../assets/images/logo.svg") center / contain no-repeat;
}

.hero__tagline {
  max-width: 42ch;
  font-size: clamp(1rem, 2.4vw, 1.22rem);
  color: var(--text-soft);
}

/* Scroll cue */
.scroll-cue {
  margin-top: 0.6rem;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s var(--ease);
}
.scroll-cue:hover { color: var(--primary-ink); }
.scroll-cue svg { width: 20px; height: 20px; animation: nudge 1.8s var(--ease-in-out) infinite; }

/* --- Layer 5 · film grain ----------------------------------- */
.hero__grain {
  z-index: 4;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: hero-grain 0.6s steps(3) infinite;
}

/* -------------------------------------------------------------
   7. Section scaffolding
   ------------------------------------------------------------- */
.section {
  padding-block: var(--space-xl);
  scroll-margin-top: 2rem;
}
.section--tint {
  background: var(--bg-soft);
  border-block: 1px solid var(--border);
}

.section-head {
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.section-head p { font-size: 1.05rem; }

/* gradient hairline divider */
.divider {
  height: 1px;
  border: 0;
  max-width: var(--maxw);
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

/* -------------------------------------------------------------
   8. About — stats, checklist, engines, methodology, certs
   ------------------------------------------------------------- */
.about-lead {
  max-width: 62ch;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  line-height: 1.7;
  color: var(--text-soft);
}

/* Split: heading + checklist */
.split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  margin-top: 3.5rem;
}
.split--top { align-items: start; }
.split__intro h2,
.split__intro h3 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0.6rem 0 1rem; }
.split__intro p { max-width: 42ch; }
.split__intro a { color: var(--primary-ink); font-weight: 600; }

.checklist { display: grid; gap: 0.9rem; list-style: none; }
.check-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.3rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
}
.check-item:hover { transform: translateX(4px); border-color: var(--icon-border); }
.check-item__mark {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
  color: var(--primary-ink);
}
.check-item__mark svg { width: 18px; height: 18px; }
.check-item p { margin: 0; }
.check-item strong { color: var(--text); font-weight: 600; }

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
  margin-top: 3.5rem;
}
.stat {
  text-align: center;
  padding: 1.9rem 1.2rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.stat:hover { transform: translateY(-4px); border-color: var(--icon-border); }
.stat__num {
  display: block;
  font-size: clamp(2rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat__label { margin-top: 0.65rem; font-size: 0.9rem; color: var(--text-muted); }

/* Feature cards (engines) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.4rem;
}
.feature-card {
  position: relative;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 2rem 1.9rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              border-color 0.35s var(--ease);
}
.feature-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--icon-border); }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card__icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
  color: var(--primary-ink);
  margin-bottom: 1.1rem;
}
.feature-card__icon svg { width: 26px; height: 26px; }
.feature-card__tag {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--primary-ink);
  margin-bottom: 0.5rem;
}
.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { margin: 0; }

/* Methodology + certifications — strict 4 × 2 grid */
.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
}
.step {
  padding: 1.8rem 1.5rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.step:hover { transform: translateY(-4px); border-color: var(--icon-border); }
.step__num { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; color: var(--primary-ink); }
.step__icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  background: var(--icon-bg);
  border: 1px solid var(--icon-border);
  color: var(--primary-ink);
  margin: 0.8rem 0 1rem;
}
.step__icon svg { width: 22px; height: 22px; }
.step h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.step p { margin: 0; font-size: 0.92rem; }
.step span.step__tag { color: var(--text-muted); font-size: 0.8rem; }

/* -------------------------------------------------------------
   9. Legal document (Privacy & Terms modals)
   A calm, readable document layout — clear hierarchy, comfortable
   measure, generous rhythm. Shared by both legal modals.
   ------------------------------------------------------------- */
.doc {
  max-width: 40rem;               /* comfortable reading measure (~66ch) */
  margin-inline: auto;
  color: var(--text-soft);
}

/* — header — */
.doc__head .eyebrow { margin-bottom: 1.1rem; }
.doc__head h2 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  letter-spacing: -0.02em;
  margin-bottom: 0.85rem;
}
.doc__meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
}
.doc__meta strong {
  color: var(--primary-ink);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.74rem;
  margin-right: 0.35rem;
}
.doc__lead {
  font-size: clamp(1.02rem, 2.4vw, 1.12rem);
  line-height: 1.72;
  color: var(--text-soft);
  margin: 0;
}

/* — sections (a hairline + generous space separates each) — */
.doc__section {
  margin-top: 2.1rem;
  padding-top: 2.1rem;
  border-top: 1px solid var(--border);
}
.doc__section h3 {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  font-size: clamp(1.14rem, 2.6vw, 1.3rem);
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 0.9rem;
}
.doc__num {
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--primary-ink);
  font-variant-numeric: tabular-nums;
}
.doc h4 {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 1.4rem 0 0.55rem;
}
.doc p { line-height: 1.75; margin: 0 0 0.9rem; }
.doc p:last-child { margin-bottom: 0; }
.doc strong { color: var(--text); font-weight: 600; }
.doc a {
  color: var(--primary-ink);
  font-weight: 600;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.doc a:hover { border-bottom-color: var(--primary-2); }

/* — lists — */
.doc__list {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
.doc__list li {
  position: relative;
  padding-left: 1.55rem;
  line-height: 1.65;
}
.doc__list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.62em;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary-2);
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

/* — highlighted note / callout — */
.doc__note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem;
  align-items: start;
  margin: 1.3rem 0 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--icon-border);
  border-radius: var(--radius-md);
  background: var(--gradient-soft);
}
.doc__note svg {
  width: 20px; height: 20px;
  color: var(--primary-ink);
  margin-top: 0.15rem;
  flex-shrink: 0;
}
.doc__note p { margin: 0; font-size: 0.94rem; color: var(--text-soft); }

/* -------------------------------------------------------------
   10. Bottom navigation (in-hero, replaces the footer)
   ------------------------------------------------------------- */
.site-nav {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: clamp(1.4rem, 4vh, 2.6rem);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.1rem, 3.5vw, 2.6rem);
  width: max-content;
  max-width: min(92vw, 900px);
  padding: 0 1rem;
  text-align: center;
}
.site-nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);        /* always on the dark stage */
  position: relative;
  transition: color 0.25s var(--ease);
}
.site-nav__link::after {                    /* subtle underline reveal */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 1px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}
.site-nav__link:hover { color: #fff; }
.site-nav__link:hover::after { transform: scaleX(1); }

.site-nav__sep {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.16);
}
.site-nav__socials { display: inline-flex; align-items: center; gap: 0.6rem; }
.social {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  color: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.social svg { width: 17px; height: 17px; }
.social:hover {
  transform: translateY(-2px);
  color: #fff;
  border-color: var(--primary-2);
  background: rgba(59, 130, 246, 0.16);
}

/* -------------------------------------------------------------
   10b. Modal dialogs (Terms & Privacy) — routed, animated, glass
   ------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 2.5rem);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.modal[aria-hidden="false"] {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.35s var(--ease);
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.62);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  backdrop-filter: blur(10px) saturate(120%);
}
:root[data-theme="light"] .modal__backdrop { background: rgba(15, 23, 42, 0.42); }

.modal__dialog {
  position: relative;
  width: min(780px, 100%);
  max-height: min(86vh, 860px);
  display: flex;
  flex-direction: column;
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(59, 130, 246, 0.10);
  /* enter animation */
  transform: translateY(16px) scale(0.975);
  opacity: 0;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
  overflow: hidden;
}
.modal[aria-hidden="false"] .modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
/* a soft brand glow along the dialog's top edge */
.modal__dialog::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-2), transparent);
  opacity: 0.7;
}
.modal__close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  z-index: 2;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: var(--card-bg);
  border: 1px solid var(--border-strong);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease),
              background-color 0.25s var(--ease), color 0.25s var(--ease);
}
.modal__close svg { width: 20px; height: 20px; }
.modal__close:hover {
  transform: rotate(90deg);
  border-color: var(--primary-2);
  color: var(--primary-ink);
}
.modal__scroll {
  overflow-y: auto;
  overflow-x: hidden;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.4rem, 4vw, 3rem);
  overscroll-behavior: contain;
  /* Firefox: thin, brand-blue thumb on an invisible track */
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.45) transparent;
}
/* WebKit/Blink: a slim, rounded, glowing custom scrollbar */
.modal__scroll::-webkit-scrollbar {
  width: 10px;
}
.modal__scroll::-webkit-scrollbar-track {
  background: transparent;          /* understated — blends into the dialog */
  margin: 14px 0;                   /* keep clear of the rounded corners */
}
.modal__scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  /* 3px transparent border + padding-box clip makes the thumb read as thin */
  border: 3px solid transparent;
  background-clip: padding-box;
  background-color: rgba(59, 130, 246, 0.40);   /* subtle when inactive */
  transition: background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.modal__scroll:hover::-webkit-scrollbar-thumb {
  background-color: rgba(59, 130, 246, 0.7);
}
.modal__scroll::-webkit-scrollbar-thumb:hover,
.modal__scroll::-webkit-scrollbar-thumb:active {
  /* brighter gradient + soft glow while scrolling / grabbing */
  background-image: linear-gradient(180deg, #60A5FA, #3B82F6 55%, #1E3A8A);
  background-color: #3B82F6;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6), inset 0 0 4px rgba(147, 197, 253, 0.5);
}
.modal__scroll .doc { padding-block: 0.25rem; }

/* Background is inert while a modal is open */
.hero[inert] { filter: none; }

/* -------------------------------------------------------------
   11. Utilities & Animations
   ------------------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(24px); }
.no-js .reveal,
.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

/* line break that only applies on wider screens */
.br-md { display: none; }
@media (min-width: 720px) { .br-md { display: inline; } }

@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* Hero — decorative keyframes (transform/opacity only) */
@keyframes hero-spin { to { rotate: 360deg; } }

@keyframes hero-breathe {
  0%, 100% { scale: 1;    opacity: 0.55; }
  50%      { scale: 1.14; opacity: 0.82; }
}

@keyframes hero-edge-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50%      { opacity: 0.95; transform: scale(1.05); }
}

/* nebula clouds drift extremely slowly (transform-only → GPU-cheap) */
@keyframes hero-nebula-a {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(7%, 5%, 0) scale(1.15); }
}
@keyframes hero-nebula-b {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-6%, -4%, 0) scale(1); }
}

@keyframes hero-grain {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(-3%, 2%); }
  66%  { transform: translate(2%, -2%); }
  100% { transform: translate(0, 0); }
}

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

  /* Present a calm, fully-composed hero — no motion, nothing hidden */
  .hero__particles { display: none; }
  .hero__rays { opacity: 1 !important; }
  .hero__edge { opacity: 0.5 !important; }
  .hero__nebula { opacity: 0.85 !important; }
  .hero__aura { opacity: 0.6 !important; }
  .anim-magic .hero-logo { opacity: 1 !important; }
}

/* -------------------------------------------------------------
   13. Responsive
   Breakpoints: 1920+ · 1440+ · 1024 · 768 · 640 · 400
   ------------------------------------------------------------- */
@media (min-width: 1920px) {
  :root { --maxw: 1280px; --space-xl: 9rem; }
  .theme-toggle { top: 1.6rem; right: 1.6rem; }
}

@media (min-width: 1440px) {
  :root { --maxw: 1200px; }
}

@media (max-width: 1024px) {
  :root { --space-xl: 6rem; }
}

@media (max-width: 768px) {
  .split { grid-template-columns: 1fr; gap: 2rem; }
  .split__intro { text-align: center; }
  .split--top .split__intro { text-align: left; }
  .split__intro p { max-width: none; margin-inline: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-toggle { width: 42px; height: 42px; top: 0.85rem; right: 0.85rem; }
  .theme-toggle svg { width: 19px; height: 19px; }
}

@media (max-width: 640px) {
  .section-head { margin-bottom: 2.5rem; }
  .doc__section { margin-top: 1.8rem; padding-top: 1.8rem; }
  /* bottom nav: keep email + links on one row, socials wrap below cleanly */
  .site-nav { gap: 1rem 1.4rem; bottom: 1.3rem; }
  .site-nav__link { font-size: 0.84rem; }
  .site-nav__sep { display: none; }
}

@media (max-width: 400px) {
  .hero-logo { width: min(296px, 80vw); }
}

/* Short viewports (landscape phones): shrink the logo so the logo +
   bottom nav always fit within one screen, no scrolling. */
@media (max-height: 620px) {
  .hero-logo { width: min(312px, 58vw); }
  .site-nav { bottom: 1rem; }
}
@media (max-height: 460px) {
  .hero-logo { width: min(240px, 45vw); }
}
