/* =========================================================================
   TheNorthCop — design system
   ------------------------------------------------------------------------- */

:root {
  /* ---- Brand palette (constant across themes) ---- */
  --brand-1: #ff2d55;   /* primary red */
  --brand-2: #ff7a7a;   /* coral highlight */
  --brand-3: #ffb347;   /* amber accent */
  --danger: #ff6b6b;
  --grad-brand: linear-gradient(135deg, var(--brand-1), var(--brand-2));

  /* ---- Dark theme tokens (default) ----
     Override these under [data-theme="light"] further down to flip the
     surface palette without touching every component CSS rule. */
  --bg: #07070a;
  --bg-soft: #0e0e13;
  --bg-raised: #14141c;
  --surface:    rgba(255, 255, 255, 0.04);
  --surface-hi: rgba(255, 255, 255, 0.08);
  --border:     rgba(255, 255, 255, 0.08);
  --border-hi:  rgba(255, 255, 255, 0.16);

  --text:       #f5f5f7;
  --text-muted: #a0a0ab;
  --text-dim:   #6b6b78;

  --grad-brand-soft: linear-gradient(135deg, rgba(255,45,85,.18), rgba(255,122,122,.15));
  --grad-text: linear-gradient(90deg, #ffffff 0%, #ff7a7a 50%, #ff2d55 100%);

  /* Aurora background blob colors (theme-aware) */
  --aurora-a: #ff1f3a;
  --aurora-b: #b30022;
  --aurora-c: #ff6b3d;
  --aurora-blob-opacity: .35;
  --aurora-blob-c-opacity: .22;
  --aurora-blob-blend: screen;
  --aurora-grid-color: rgba(255, 255, 255, .03);
  --aurora-noise-opacity: .035;

  /* Tundra mountain horizon colors (theme-aware).
     Tuned to "if-you-notice-it" levels — the ranges should register as
     subliminal atmosphere, not a visible graphic. Bump these alphas up
     if you ever want the mountains to feel more present. */
  --tundra-back:  rgba(205, 225, 245, .004);
  --tundra-mid:   rgba(195, 220, 245, .008);
  --tundra-front: rgba(185, 215, 245, .014);
  --tundra-snow:  #ffffff;
  --tundra-snow-glow: rgba(255, 255, 255, .45);

  /* Nav / blur surface backgrounds */
  --nav-scrolled-bg: rgba(7, 7, 10, .6);

  color-scheme: dark;

  /* Typography */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Space Grotesk", "Inter", system-ui, sans-serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.78rem + 0.25vw, 0.95rem);
  --step-0:  clamp(1rem, 0.94rem + 0.3vw, 1.1rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.35rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 1.85rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 2.8rem);
  --step-4:  clamp(2.8rem, 2rem + 4vw, 4.4rem);
  --step-5:  clamp(3.5rem, 2.5rem + 6vw, 6rem);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(1rem, 3vw, 2rem);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;

  /* Motion */
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-fast: 180ms;
  --dur: 380ms;
  --dur-slow: 700ms;
}

/* ============================================================
   Light theme overrides — toggled by setting `data-theme="light"`
   on the <html> element. Brand palette stays the same; only the
   surface, text and atmospheric background tokens flip. The custom
   cursor's `mix-blend-mode: difference` adapts to either theme
   automatically, no extra rules needed.
   ============================================================ */
:root[data-theme="light"] {
  --bg: #f7f6f2;
  --bg-soft: #ffffff;
  --bg-raised: #ffffff;
  --surface:    rgba(15, 15, 20, 0.04);
  --surface-hi: rgba(15, 15, 20, 0.07);
  --border:     rgba(15, 15, 20, 0.10);
  --border-hi:  rgba(15, 15, 20, 0.18);

  --text:       #14141a;
  --text-muted: #555562;
  --text-dim:   #8a8a96;

  /* Soft brand fade for hero/h2 gradients on light bg */
  --grad-brand-soft: linear-gradient(135deg, rgba(255,45,85,.10), rgba(255,122,122,.08));
  --grad-text: linear-gradient(90deg, #14141a 0%, #ff5f6f 50%, #ff2d55 100%);

  /* Aurora is dialed back so it doesn't wash out the page on light bg.
     `multiply` blend keeps red blobs visible without flooding white. */
  --aurora-a: #ff5060;
  --aurora-b: #ff2d55;
  --aurora-c: #ffb347;
  --aurora-blob-opacity: .14;
  --aurora-blob-c-opacity: .10;
  --aurora-blob-blend: multiply;
  --aurora-grid-color: rgba(15, 15, 20, .04);
  --aurora-noise-opacity: .025;

  /* Mountains read as cool slate silhouettes on light bg */
  --tundra-back:  rgba(70, 100, 145, .003);
  --tundra-mid:   rgba(60, 90, 135, .006);
  --tundra-front: rgba(50, 80, 125, .012);
  --tundra-snow:  rgba(60, 90, 135, .45);
  --tundra-snow-glow: rgba(60, 90, 135, .15);

  --nav-scrolled-bg: rgba(247, 246, 242, .82);

  color-scheme: light;
}

* { box-sizing: border-box; }
*::selection { background: var(--brand-1); color: #ffffff; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Prevent horizontal scroll on refresh.
   Floating emojis, the logo marquee, the hscroll panels and the word
   flipper all legitimately paint outside the viewport; without this clamp
   the browser remembers a non-zero scrollX between refreshes and renders
   the page shifted off-centre. `clip` is preferred over `hidden` here
   because it doesn't turn <html> into a scroll container — keeping every
   `position: sticky` chapter in the cinematic flow working. */
html { overflow-x: clip; }
body { overflow-x: clip; }

html { scroll-behavior: smooth; }

/* Anchor jumps from the nav (e.g. /#scale, /#markets) need to clear the
   fixed nav bar so the chapter heading isn't hidden underneath it. */
html { scroll-padding-top: 90px; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

/* ========================================================================
   Typography
   ------------------------------------------------------------------------ */

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }

.h-display {
  font-size: var(--step-4);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
}

.h-xl {
  font-size: var(--step-5);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

.h-2 { font-size: var(--step-3); }
.h-3 { font-size: var(--step-2); }

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

.muted { color: var(--text-muted); }
.dim   { color: var(--text-dim); }
.small { font-size: var(--step--1); }

p { margin: 0 0 1em; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .4em .9em;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: var(--step--1);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--brand-1);
  box-shadow: 0 0 10px var(--brand-1);
  animation: pulseRing 1.8s ease-out infinite;
}

/* ========================================================================
   Layout
   ------------------------------------------------------------------------ */

.container {
  width: min(var(--container), 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.section {
  padding-block: clamp(4rem, 8vw, 8rem);
  position: relative;
}

.section--tight { padding-block: clamp(2rem, 5vw, 5rem); }

.grid { display: grid; gap: 1.5rem; }

/* ========================================================================
   Aurora background
   ------------------------------------------------------------------------ */

.aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.aurora__blob {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--aurora-blob-opacity, .35);
  mix-blend-mode: var(--aurora-blob-blend, screen);
  will-change: transform;
  animation: float 22s ease-in-out infinite;
}
.aurora__blob--a { background: var(--aurora-a); top: -20vmax; left: -15vmax; animation-delay: -2s; }
.aurora__blob--b { background: var(--aurora-b); bottom: -25vmax; right: -10vmax; animation-delay: -8s; }
.aurora__blob--c { background: var(--aurora-c); top: 30vmax; left: 40vmax; opacity: var(--aurora-blob-c-opacity, .22); animation-delay: -14s; }
.aurora__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--aurora-grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--aurora-grid-color) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
          -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 70%);
}
.aurora__noise {
  position: absolute; inset: 0;
  opacity: var(--aurora-noise-opacity, .035);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence baseFrequency='0.9' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ========================================================================
   Tundra: faint Canadian backdrop (mountain horizon + drifting snow)
   Sits above the aurora but behind all content. Kept extremely subtle
   so it reads as atmosphere, not decoration.
   ------------------------------------------------------------------------ */

.tundra {
  position: fixed;
  /* Anchor to the bottom of the viewport so the mountain SVG only paints
     where it belongs (the horizon), and the empty top half can never trap
     pointer events even if a future change drops `pointer-events: none`. */
  left: 0;
  right: 0;
  bottom: 0;
  /* Slim horizon band — just a hint of mountains, not a panorama. */
  height: 18vh;
  min-height: 140px;
  /* Lifted into the foreground (just below the snow at z-index: 70 and
     well below the loader/transition curtain) so the mountains actually
     render over section backgrounds instead of being hidden behind them.
     Alpha values on the ranges keep this strictly atmospheric. */
  z-index: 65;
  overflow: hidden;
  pointer-events: none;
  /* Soft fade into the page so the top edge of the horizon never looks
     like a hard cutoff. */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%, #000 100%);
          mask-image: linear-gradient(to bottom, transparent 0%, #000 55%, #000 100%);
}

.tundra__mountains {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  /* Inherits the parent .tundra height (now ~18vh / 140px min) so the
     mountains stay a thin, atmospheric horizon line. */
  height: 100%;
  display: block;
  /* Slow horizontal drift so the horizon never feels frozen */
  animation: tundraDrift 90s ease-in-out infinite alternate;
  will-change: transform;
}
.tundra__range { fill: currentColor; }
/* Pale blue-white for snowy peaks. Alpha is graduated so the back range
   reads as a faint atmospheric line, the mid as a clear silhouette, and
   the front as a defined horizon — still subtle but actually perceptible. */
.tundra__range--back  { color: var(--tundra-back,  rgba(205, 225, 245, .14)); }
.tundra__range--mid   { color: var(--tundra-mid,   rgba(195, 220, 245, .22)); }
.tundra__range--front { color: var(--tundra-front, rgba(185, 215, 245, .32)); }

/* Snow is lifted out of the .tundra back-layer onto its own foreground
   overlay so flakes drift over every section background, not just where the
   page bg peeks through. Pointer-events stay disabled so it never blocks
   clicks. The mountain ranges remain at z-index: -1 as a true horizon. */
.tundra__snow {
  position: fixed;
  inset: 0;
  /* Above all in-flow content + nav (z-index: 40) so flakes drift over every
     section, but below the loader (100) and transition curtain (80) so those
     full-screen overlays still cleanly mask the page during entrance/exit. */
  z-index: 70;
  pointer-events: none;
  overflow: hidden;
  /* Global dimmer that multiplies into every flake's per-span inline
     opacity. Tweak this single value to tune snow presence — lower for
     more atmospheric, higher (max 1) for more pronounced. */
  opacity: .45;
}
.tundra__snow span {
  position: absolute;
  top: -6vh;
  width: calc(3px * var(--r, 1));
  height: calc(3px * var(--r, 1));
  border-radius: 50%;
  background: var(--tundra-snow, #ffffff);
  box-shadow: 0 0 5px var(--tundra-snow-glow, rgba(255, 255, 255, .55));
  animation-name: tundraSnow;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  will-change: transform, opacity;
}

@keyframes tundraSnow {
  0%   { transform: translate3d(0, -6vh, 0);                opacity: 0; }
  8%   { opacity: 1; }
  50%  { transform: translate3d(18px, 55vh, 0); }
  92%  { opacity: 1; }
  100% { transform: translate3d(-12px, 116vh, 0);           opacity: 0; }
}

@keyframes tundraDrift {
  0%   { transform: translate3d(-1.5%, 0, 0); }
  100% { transform: translate3d(1.5%, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .tundra__snow { display: none; }
  .tundra__mountains { animation: none; }
}

/* On phones the drifting snow is just visual noise on top of small text and
   it eats meaningful battery on mobile GPUs. Strip it on narrow viewports. */
@media (max-width: 600px) {
  .tundra__snow { display: none; }
}

/* ========================================================================
   Navigation
   ------------------------------------------------------------------------ */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 40;
  padding-block: 1rem;
  transition: background-color var(--dur) var(--ease-out), backdrop-filter var(--dur);
}
.nav.is-scrolled {
  background: var(--nav-scrolled-bg, rgba(7,7,10,.6));
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav__brand {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-display);
  /* The flex parent (.nav__inner) lets every child shrink by default. With
     the new Success link the middle .nav__links pill is wide enough to
     squeeze .nav__brand to nothing — collapsing the logo into a tiny dot.
     Lock the brand block down so the logo + text always render at full size. */
  flex-shrink: 0;
  font-weight: 700;
  letter-spacing: -.02em;
  font-size: 1.15rem;
}
.nav__logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.nav__logo img {
  width: 32px;
  height: 32px;
  min-width: 32px;
  display: block;
  object-fit: contain;
  /* Subtle red glow so the logomark feels alive on the dark backdrop */
  filter: drop-shadow(0 4px 14px rgba(255, 45, 85, .35));
}
.nav__links {
  display: flex;
  gap: .4rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .35rem;
}
.nav__link {
  position: relative;
  padding: .55rem 1rem;
  font-size: .92rem;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__link:hover { color: var(--text); }
.nav__link.is-active {
  color: var(--text);
  background: rgba(255,255,255,.08);
}
.nav__cta {
  display: flex;
  align-items: center;
  gap: .6rem;
  /* Keep the nav buttons at their natural width — never let them shrink
     or wrap their labels just because a sibling joined the flex row. */
  flex-wrap: nowrap;
}
.nav__cta > * { flex-shrink: 0; }

/* ---- Theme toggle button ----------------------------------------------- */
.theme-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  transition:
    color var(--dur) var(--ease-out),
    background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-spring);
}
.theme-toggle:hover {
  color: var(--text);
  background: var(--surface-hi);
  border-color: var(--border-hi);
  transform: translateY(-1px);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--brand-1);
  outline-offset: 2px;
}
.theme-toggle__icon {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  transition:
    opacity .35s var(--ease-out),
    transform .55s var(--ease-spring);
}
/* Default (dark theme): show the sun (you'd toggle to light = bright)
   Light theme: show the moon (you'd toggle to dark = night) */
.theme-toggle__icon--sun  { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle__icon--moon { opacity: 0; transform: rotate(-90deg) scale(.6); }
:root[data-theme="light"] .theme-toggle__icon--sun  { opacity: 0; transform: rotate(90deg) scale(.6); }
:root[data-theme="light"] .theme-toggle__icon--moon { opacity: 1; transform: rotate(0deg) scale(1); }

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-direction: column;
  gap: 5px;
  align-items: center; justify-content: center;
}
.nav__toggle span {
  width: 18px; height: 2px;
  background: var(--text);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  position: fixed;
  inset: 72px 0 auto 0;
  margin-inline: var(--gutter);
  background: var(--bg-raised);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: none;
  flex-direction: column;
  gap: .35rem;
  transform-origin: top center;
  transform: scaleY(.96) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--dur) var(--ease-spring), opacity var(--dur);
  z-index: 30;
}
.nav__mobile.is-open { opacity: 1; transform: none; pointer-events: auto; }
.nav__mobile-link {
  padding: .85rem 1rem;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--text);
}
.nav__mobile-link:hover { background: var(--surface-hi); }
.nav__mobile-cta { display: flex; gap: .6rem; margin-top: .75rem; }
.nav__mobile-cta .btn { flex: 1; justify-content: center; }

@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav__mobile { display: flex; }
}

/* ========================================================================
   Buttons
   ------------------------------------------------------------------------ */

.btn {
  --btn-bg: var(--surface);
  --btn-color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .8rem 1.25rem;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 600;
  font-size: .94rem;
  letter-spacing: .01em;
  border: 1px solid var(--border);
  /* Always keep the label on one line — flex containers (e.g. the nav)
     would otherwise wrap "Log In" / "Join Now" into two lines once the
     theme toggle joined the row. */
  white-space: nowrap;
  transition:
    transform var(--dur) var(--ease-spring),
    background var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); border-color: var(--border-hi); }
.btn:active { transform: translateY(0) scale(.98); }

.btn--primary {
  --btn-bg: var(--brand-1);
  --btn-color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 40px -10px rgba(255,45,85,.55);
}
.btn--primary:hover {
  --btn-bg: #ff4868;
  box-shadow: 0 14px 50px -10px rgba(255,45,85,.7);
}

.btn--ghost { background: transparent; border-color: var(--border-hi); }
.btn--ghost:hover { background: var(--surface-hi); }

.btn--lg { padding: 1rem 1.6rem; font-size: 1rem; }

.btn[data-magnetic] { transition: transform 120ms var(--ease-out), background var(--dur), box-shadow var(--dur), border-color var(--dur); }

/* ========================================================================
   Hero
   ------------------------------------------------------------------------ */

.hero {
  padding-top: clamp(7rem, 14vw, 11rem);
  padding-bottom: clamp(4rem, 10vw, 8rem);
  position: relative;
  overflow: hidden;
}
.hero__badge { margin-bottom: 1.5rem; }
.hero__title {
  font-size: var(--step-5);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: .95;
  max-width: 18ch;
  margin: 0 0 1.25rem;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title .line > span {
  display: inline-block;
  transform: translateY(120%);
  animation: heroIn .9s var(--ease-spring) forwards;
}
.hero__title .line:nth-child(1) > span { animation-delay: .10s; }
.hero__title .line:nth-child(2) > span { animation-delay: .20s; }
.hero__title .line:nth-child(3) > span { animation-delay: .30s; }

.hero__sub {
  max-width: 58ch;
  font-size: var(--step-1);
  color: var(--text-muted);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp .8s var(--ease-out) .5s forwards;
}
.hero__cta {
  display: flex; flex-wrap: wrap; gap: .8rem;
  opacity: 0; transform: translateY(14px);
  animation: fadeUp .8s var(--ease-out) .65s forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 1rem; left: 50%;
  transform: translateX(-50%);
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex; flex-direction: column; align-items: center; gap: .6rem;
  opacity: 0;
  animation: fadeUp .8s var(--ease-out) 1s forwards;
}
.hero__scroll::after {
  content: ""; width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--text-dim), transparent);
  animation: scrollCue 2.4s ease-in-out infinite;
}

/* ========================================================================
   Stats
   ------------------------------------------------------------------------ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(8px);
}
.stat {
  padding: 1.25rem 1rem;
  text-align: left;
}
.stat__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--step-4);
  letter-spacing: -.03em;
  line-height: 1;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.stat__label {
  color: var(--text-muted);
  font-size: var(--step--1);
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-top: .5rem;
}

/* ========================================================================
   Category tabs
   ------------------------------------------------------------------------ */

.cats { margin-top: 3rem; }
.cats__tabs {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
  padding: .4rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: max-content;
}
.cats__tab {
  padding: .7rem 1.15rem;
  border-radius: 999px;
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--dur-fast) var(--ease-out);
  position: relative;
}
.cats__tab:hover { color: var(--text); }
.cats__tab.is-active { color: #ffffff; }
.cats__tab-bg {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: var(--brand-1);
  z-index: -1;
  transition: all .5s var(--ease-spring);
  box-shadow: 0 6px 24px -8px rgba(255,45,85,.55);
}

.cats__content {
  margin-top: 2.5rem;
  position: relative;
}

.cat-panel {
  display: none;
}
.cat-panel.is-active { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) {
  .cat-panel.is-active { grid-template-columns: 1fr; }
}

.cat-panel__copy .h-2 { margin-bottom: 1rem; }
.cat-panel__list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: .6rem;
}
.cat-panel__list li {
  display: flex;
  align-items: start;
  gap: .7rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur);
}
.cat-panel__list li:hover { transform: translateX(4px); border-color: var(--border-hi); }
.cat-panel__list li::before {
  content: "";
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, var(--brand-2), var(--brand-1));
  box-shadow: 0 0 12px -2px var(--brand-1);
}

.cat-panel__visual {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255,45,85,.28), transparent 50%),
    radial-gradient(120% 120% at 100% 100%, rgba(255,122,122,.22), transparent 55%),
    linear-gradient(180deg, #1a0f14, #0b0708);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cat-panel__visual::before {
  content: "";
  position: absolute; inset: 1px;
  border-radius: calc(var(--radius-lg) - 1px);
  background:
    repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.02) 14px 15px);
}
.cat-panel__tag {
  position: relative;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 6vw, 4.4rem);
  letter-spacing: -.04em;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-align: center;
  padding: 1rem;
}

/* ========================================================================
   Testimonials
   ------------------------------------------------------------------------ */

.quotes__header {
  display: flex; align-items: end; justify-content: space-between;
  gap: 2rem; flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.quotes__viewport {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.quotes__track {
  display: flex;
  gap: 1.25rem;
  animation: marquee 60s linear infinite;
  width: max-content;
}
.quotes__viewport:hover .quotes__track { animation-play-state: paused; }
.quote-card {
  width: clamp(280px, 38vw, 420px);
  flex-shrink: 0;
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-direction: column; gap: 1rem;
  transition: transform var(--dur) var(--ease-out), border-color var(--dur);
}
.quote-card:hover { border-color: var(--border-hi); transform: translateY(-4px); }
.quote-card__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2.8rem;
  line-height: 0;
  color: var(--brand-1);
  opacity: .7;
  height: 1rem;
}
.quote-card__text { color: var(--text); font-size: .98rem; }
.quote-card__by {
  display: flex; align-items: center; gap: .7rem;
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: auto;
}
.quote-card__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--grad-brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700; font-size: .85rem;
  color: #ffffff;
}

/* ========================================================================
   Pricing
   ------------------------------------------------------------------------ */

.price {
  max-width: 440px;
  margin-inline: auto;
  padding: 2.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02));
  border: 1px solid var(--border-hi);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.price::before {
  content: "";
  position: absolute; inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: conic-gradient(from var(--a, 0deg),
    rgba(255,45,85,.85), rgba(255,122,122,.75), rgba(255,179,71,.65), rgba(255,45,85,.85));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  animation: rotateHue 8s linear infinite;
  pointer-events: none;
}
.price__amount {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  margin-block: 1rem;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.price__cadence { color: var(--text-muted); }
.price__list {
  list-style: none; padding: 0; margin: 1.5rem 0;
  display: grid; gap: .5rem;
  text-align: left;
}
.price__list li {
  padding: .6rem .8rem;
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: .95rem;
  display: flex; align-items: center; gap: .6rem;
}
.price__list li::before {
  content: "";
  width: 6px; height: 10px;
  border-right: 2px solid var(--brand-1);
  border-bottom: 2px solid var(--brand-1);
  transform: rotate(45deg) translateY(-2px);
}
.price .btn { width: 100%; justify-content: center; }

.price__terms {
  margin: .85rem 0 0;
  text-align: center;
  font-size: .65rem;
  color: var(--text-muted);
  opacity: .75;
}
.price__terms a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, .25);
  transition: color .15s ease, text-decoration-color .15s ease;
}
.price__terms a:hover,
.price__terms a:focus-visible {
  color: var(--brand-1);
  text-decoration-color: var(--brand-1);
}

/* ========================================================================
   FAQ
   ------------------------------------------------------------------------ */

.faq { max-width: 880px; margin-inline: auto; }
.faq__item {
  border-top: 1px solid var(--border);
  padding-block: 1.25rem;
}
.faq__item:last-child { border-bottom: 1px solid var(--border); }
.faq__q {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: .5rem 0;
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--step-1);
  font-weight: 600;
}
.faq__q-icon {
  position: relative;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform var(--dur) var(--ease-spring), background var(--dur), color var(--dur);
  flex-shrink: 0;
  color: var(--text);
}
.faq__q-icon::before, .faq__q-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-spring);
}
.faq__q-icon::before { transform: translate(-50%, -50%); }
.faq__q-icon::after  { transform: translate(-50%, -50%) rotate(90deg); }
.faq__item.is-open .faq__q-icon { background: var(--brand-1); color: #ffffff; transform: rotate(45deg); }

.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .5s var(--ease-out), opacity .4s var(--ease-out);
  opacity: 0;
  color: var(--text-muted);
}
.faq__item.is-open .faq__a { opacity: 1; }
.faq__a p { padding: .8rem 0 0; max-width: 70ch; }

/* ========================================================================
   Footer
   ------------------------------------------------------------------------ */

.footer {
  padding-block: clamp(4rem, 8vw, 7rem) 2.5rem;
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  background:
    radial-gradient(60% 70% at 50% 0%, rgba(255,45,85,.15), transparent 70%),
    transparent;
}
.footer__cta {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}
.footer__cta .h-display { margin-bottom: 1rem; }
.footer__bottom {
  display: grid;
  grid-template-columns: 1.2fr 1fr auto;
  gap: 2rem;
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  align-items: start;
}
@media (max-width: 720px) {
  .footer__bottom { grid-template-columns: 1fr; }
}
.footer__brand .nav__brand-text { font-size: 1.1rem; font-family: var(--font-display); font-weight: 700; }
.footer__brand-row {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: .35rem;
}
.footer__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 4px 14px rgba(255, 45, 85, .35));
}
.footer__links { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer__links a, .footer__socials a {
  color: var(--text-muted);
  transition: color var(--dur-fast);
}
.footer__links a:hover, .footer__socials a:hover { color: var(--text); }
.footer__socials { display: flex; gap: 1rem; flex-wrap: wrap; }
.footer__meta {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: var(--step--1);
  flex-wrap: wrap;
}

/* ========================================================================
   Custom cursor (desktop)
   ------------------------------------------------------------------------ */

.cursor {
  position: fixed;
  pointer-events: none;
  z-index: 60;
  top: 0; left: 0;
  mix-blend-mode: difference;
}
.cursor__dot {
  position: absolute;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #fff;
  /* No CSS transition on transform — JS rAF drives position directly.
     The previous 80ms transition was restarting on every mousemove and was
     the source of the perceived "lag" over the hero text. */
  transform: translate3d(-50%, -50%, 0);
  will-change: transform;
  transition: opacity 200ms var(--ease-out);
}
.cursor__ring {
  position: absolute;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.5);
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, width, height;
  transition: width 200ms var(--ease-out), height 200ms var(--ease-out), border-color 200ms;
}
.cursor.is-hover .cursor__ring {
  width: 60px; height: 60px;
  border-color: rgba(255,255,255,.9);
  background: rgba(255,255,255,.08);
}
.cursor.is-hover .cursor__dot { opacity: 0; }

@media (hover: none), (pointer: coarse) {
  .cursor { display: none; }
  body { cursor: auto; }
}
@media (hover: hover) and (pointer: fine) {
  body, a, button { cursor: none; }
}

/* ========================================================================
   Page transition curtain
   ------------------------------------------------------------------------ */

.transition-curtain {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}
.transition-curtain span {
  background: linear-gradient(180deg, var(--bg), var(--bg-raised));
  transform: scaleY(0);
  transform-origin: top center;
}
.transition-curtain.is-leaving span {
  animation: curtainDown .55s var(--ease-out) forwards;
}
.transition-curtain.is-entering span {
  transform-origin: bottom center;
  transform: scaleY(1);
  animation: curtainUp .55s var(--ease-out) forwards;
}
.transition-curtain.is-leaving span:nth-child(1),
.transition-curtain.is-entering span:nth-child(1) { animation-delay: 0s; }
.transition-curtain.is-leaving span:nth-child(2),
.transition-curtain.is-entering span:nth-child(2) { animation-delay: .06s; }
.transition-curtain.is-leaving span:nth-child(3),
.transition-curtain.is-entering span:nth-child(3) { animation-delay: .12s; }
.transition-curtain.is-leaving span:nth-child(4),
.transition-curtain.is-entering span:nth-child(4) { animation-delay: .18s; }
.transition-curtain.is-leaving span:nth-child(5),
.transition-curtain.is-entering span:nth-child(5) { animation-delay: .24s; }

/* ========================================================================
   Page-specific helpers
   ------------------------------------------------------------------------ */

.page-head {
  padding-top: clamp(8rem, 12vw, 11rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
  max-width: 780px;
}
.page-head .eyebrow { margin-bottom: 1.5rem; }
.page-head h1 { margin-bottom: 1rem; }

/* ---------------------------------------------------------------------------
   Legal pages (Terms of Service, etc.)
   Constrained-width prose layout with calm, readable rhythm.
--------------------------------------------------------------------------- */
.legal {
  max-width: 72ch;
  color: var(--text);
  font-size: var(--step-0);
  line-height: 1.7;
}
.legal p {
  margin: 0 0 1.1rem;
  color: var(--text-muted, var(--text));
}
.legal__h2 {
  font-family: var(--font-display, inherit);
  font-size: var(--step-2);
  letter-spacing: -0.01em;
  margin: 2.5rem 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
  color: var(--text);
}
.legal__h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal__list {
  margin: 0 0 1.4rem;
  padding-left: 1.25rem;
}
.legal__list li {
  margin: 0 0 .55rem;
  color: var(--text-muted, var(--text));
}
.legal__list li::marker { color: rgba(255,255,255,.4); }
.legal__list--contact { list-style: none; padding-left: 0; }
.legal__list--contact li { margin-bottom: .35rem; }
.legal strong { color: var(--text); font-weight: 600; }

[data-theme="light"] .legal__h2 { border-top-color: rgba(0,0,0,.08); }
[data-theme="light"] .legal__list li::marker { color: rgba(0,0,0,.4); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  padding: 1.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform var(--dur) var(--ease-out), border-color var(--dur), background var(--dur);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255,45,85,.14), transparent 40%);
  opacity: 0;
  transition: opacity var(--dur);
  pointer-events: none;
}
.feature-card:hover { transform: translateY(-4px); border-color: var(--border-hi); }
.feature-card:hover::after { opacity: 1; }
.feature-card__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--grad-brand-soft);
  border: 1px solid rgba(255,45,85,.25);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--brand-2);
  margin-bottom: 1rem;
}
.feature-card h3 { margin-bottom: .5rem; font-size: var(--step-1); }
.feature-card p { color: var(--text-muted); margin: 0; font-size: .95rem; }

/* Forms */
.form {
  display: grid;
  gap: 1rem;
  max-width: 460px;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.form label {
  display: grid; gap: .4rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.form input, .form textarea {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  color: var(--text);
  padding: .85rem 1rem;
  border-radius: 12px;
  font: inherit;
  transition: border-color var(--dur), background var(--dur);
}
.form input:focus, .form textarea:focus {
  outline: none;
  border-color: var(--brand-1);
  background: rgba(255,255,255,.05);
}
.form__status {
  font-size: .88rem;
  min-height: 1.2em;
}
.form__status.is-ok { color: var(--brand-3); }
.form__status.is-err { color: var(--danger); }

/* ========================================================================
   Utilities
   ------------------------------------------------------------------------ */

.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.stack { display: grid; gap: 1rem; }
.stack--lg { display: grid; gap: 2rem; }

.center-text { text-align: center; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

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

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .aurora__blob, .quotes__track { animation: none !important; }
}
