/* ============================================================
   DUBLIVE DESIGN SYSTEM · v0.1 · dark
   ============================================================
   Paste the :root block + utility classes into your stylesheet.
   Everything below the tokens is implementation; everything
   above is interface.
   ============================================================ */

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url('./dm-sans-latin-wght-normal.Xz1IZZA0.woff2') format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

:root,
:root[data-theme="dark"] {
  /* —— Color · ink (surfaces & ground) ———————————— */
  --ink-0: #0A0A0C;     /* page ground */
  --ink-1: #15151A;     /* surface (soft) */
  --ink-2: #1C1C20;     /* elevated surface */
  --ink-3: rgba(243, 239, 227, 0.10); /* hairline (rule) */
  --ink-4: rgba(243, 239, 227, 0.18); /* hairline strong */

  /* —— Color · paper (foreground) ————————————————— */
  --paper-0: #F3EFE3;                 /* strong text (ink) */
  --paper-1: rgba(243, 239, 227, 0.78); /* body text */
  --paper-2: rgba(243, 239, 227, 0.55); /* muted · metadata */
  --paper-3: rgba(243, 239, 227, 0.32); /* faint · disabled */

  /* —— Color · noise (the accent · pink) ——————————— */
  --noise:      #FF2D87;
  --noise-hover:#FF4F9C;
  --noise-soft: #2A0817;
  --noise-fg:   #FFFFFF;

  /* —— Color · live (signal indicator · green) ————— */
  --live: #4ADE80;

  /* —— Type ————————————————————————————————————— */
  --font: 'DM Sans', system-ui, sans-serif;
  --feat-tnum: "tnum" 1, "ss01" 1; /* tabular figures + alt characters */

  /* —— Space (8px base) ————————————————————————— */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  24px;
  --s-6:  32px;
  --s-7:  48px;
  --s-8:  64px;
  --s-9:  96px;
  --s-10: 128px;

  /* —— Radius —————————————————————————————————— */
  --r-s: 4px;
  --r-m: 8px;
  --r-l: 14px;
  --r-pill: 999px;

  /* —— Motion —————————————————————————————————— */
  --ease:     cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-base: 220ms;
  --dur-slow: 480ms;
}

/* —— Font theme switches ——————————————————————— */
:root[data-font="dm-sans"]  { --font: 'DM Sans', system-ui, sans-serif; }

/* —— Light theme tokens —————————————————————————
   Light flips ink (surfaces) and paper (foreground): the page
   becomes warm paper, the text becomes deep ink. The accent
   shifts slightly cooler so it doesn't vibrate on cream. */
:root[data-theme="light"] {
  --ink-0: #F3EFE3;   /* page ground (paper) */
  --ink-1: #ECE8DF;   /* surface */
  --ink-2: #E0DBD0;   /* elevated surface */
  --ink-3: rgba(10, 10, 12, 0.10);   /* hairline */
  --ink-4: rgba(10, 10, 12, 0.18);   /* hairline strong */

  --paper-0: #0A0A0C; /* strong text (deep ink) */
  --paper-1: rgba(10, 10, 12, 0.78); /* body text */
  --paper-2: rgba(10, 10, 12, 0.55); /* muted · metadata */
  --paper-3: rgba(10, 10, 12, 0.32); /* faint · disabled */

  --noise:       #E61F73;
  --noise-hover: #C71861;
  --noise-soft:  #FBDDEA;
  --noise-fg:    #FFFFFF;

  --live: #16A34A;
}

/* ============================================================
   RESET + BASE
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--ink-0);
  color: var(--paper-0);
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: var(--feat-tnum);
}
::selection { background: var(--noise); color: var(--noise-fg); }

/* ============================================================
   TYPE RAMP
   ============================================================ */
.display-hero {
  font-weight: 600;
  font-size: clamp(72px, 14vw, 220px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.display-xl {
  font-weight: 600;
  font-size: clamp(64px, 9vw, 128px);
  line-height: 0.94;
  letter-spacing: -0.035em;
}
.display-l {
  font-weight: 600;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.display-m {
  font-weight: 600;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.display-s {
  font-weight: 600;
  font-size: 24px;
  line-height: 1.18;
  letter-spacing: -0.02em;
}
.body-l { font-weight: 400; font-size: 20px; line-height: 1.5; letter-spacing: -0.012em; }
.body   { font-weight: 400; font-size: 16px; line-height: 1.55; letter-spacing: -0.01em; }
.body-s { font-weight: 500; font-size: 14px; line-height: 1.5; letter-spacing: -0.005em; }
.body em { font-style: italic; color: var(--paper-1); }

/* "Mono replacement" — same family, smaller, tracked, case-shifted */
.meta {
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--paper-2);
  font-feature-settings: var(--feat-tnum);
}
.label {
  font-weight: 500;
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-2);
}
.label-accent { color: var(--noise); }

/* ============================================================
   LAYOUT
   ============================================================ */
.frame { max-width: 1280px; margin: 0 auto; padding: 0 var(--s-7); }
@media (max-width: 720px) { .frame { padding: 0 var(--s-5); } }
.hairline { border: 0; border-top: 1px solid var(--ink-3); margin: 0; }

/* ============================================================
   HEADER
   ============================================================ */
header.top {
  border-bottom: 1px solid var(--ink-3);
  padding: var(--s-5) 0;
  position: sticky; top: 0;
  background: color-mix(in srgb, var(--ink-0) 88%, transparent);
  backdrop-filter: blur(12px);
  z-index: 10;
}
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); }
.wordmark {
  font-family: var(--font);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: -0.05em;
  color: var(--paper-0);
  display: inline-flex;
  align-items: center;
  gap: 0.14em;
  line-height: 1;
}
.wordmark-mark {
  width: 22px;
  height: auto;
  color: inherit;
  flex-shrink: 0;
}
.wordmark .dot {
  display: inline-block;
  width: 9px; height: 9px;
  background: var(--noise);
  border-radius: 50%;
  margin-left: 1px;
  vertical-align: 1px;
}
.top-meta {
  display: flex; gap: var(--s-5);
  font-size: 12px;
  color: var(--paper-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  align-items: center;
}
.top-meta span.live::before {
  content: ""; display: inline-block; width: 6px; height: 6px;
  background: var(--live); border-radius: 50%;
  margin-right: 8px; vertical-align: 1px;
}

/* ============================================================
   FONT TOGGLE
   ============================================================ */
.font-toggle {
  display: inline-flex;
  border: 1px solid var(--ink-3);
  border-radius: var(--r-pill);
  padding: 3px;
  gap: 2px;
  background: var(--ink-1);
}
.font-toggle button {
  font-family: var(--font);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--paper-2);
  background: transparent;
  border: 0;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background var(--dur-base) var(--ease), color var(--dur-base) var(--ease);
}
.font-toggle button:hover { color: var(--paper-0); }
.font-toggle button[aria-pressed="true"] {
  background: var(--ink-3);
  color: var(--paper-0);
}

/* ============================================================
   LOGO
   ============================================================ */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-7);
}
@media (max-width: 720px) { .logo-grid { grid-template-columns: 1fr; } }
.logo-tile {
  border: 1px solid var(--ink-3);
  border-radius: var(--r-l);
  padding: var(--s-7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  min-height: 280px;
  background: var(--ink-1);
  color: var(--paper-0);
}
.logo-tile-accent { background: var(--noise-soft); }
.logo-tile-inverse {
  background: var(--paper-0);
  color: var(--ink-0);
  border-color: var(--paper-3);
}
.logo-mark { width: 96px; height: auto; }
.logo-caption {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.logo-lockup {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-7);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-l);
  background: var(--ink-1);
}
.logo-mark-lockup { width: 80px; color: var(--noise); }
.logo-lockup-text {
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 96px);
  letter-spacing: -0.04em;
  color: var(--paper-0);
}
.logo-lockup-text .dot {
  display: inline-block;
  width: 0.18em; height: 0.18em;
  background: var(--noise);
  border-radius: 50%;
  margin-left: 2px;
  vertical-align: 0.12em;
}

/* ============================================================
   SECTIONS
   ============================================================ */
section {
  border-top: 1px solid var(--ink-3);
  padding: var(--s-9) 0;
}
section:first-of-type { border-top: 0; }
.section-head {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s-5);
  align-items: baseline;
  margin-bottom: var(--s-8);
}
@media (max-width: 720px) { .section-head { grid-template-columns: 1fr; gap: var(--s-3); } }
.section-num {
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--noise);
  padding-top: var(--s-3);
}
.section-title {
  font-weight: 600;
  font-size: 56px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 0 0 var(--s-4) 0;
}
.section-blurb {
  color: var(--paper-1);
  font-size: 18px;
  line-height: 1.5;
  max-width: 56ch;
  margin: 0;
}

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: var(--s-10) 0 var(--s-9); border-top: 0; }
.hero-grid {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: var(--s-5);
}
@media (max-width: 720px) { .hero-grid { grid-template-columns: 1fr; } }
.hero h1 {
  font-weight: 600;
  font-size: clamp(64px, 9.5vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin: 0 0 var(--s-6) 0;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--paper-1);
  letter-spacing: -0.03em;
}
.hero-meta {
  margin-top: var(--s-7);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
  border-top: 1px solid var(--ink-3);
  padding-top: var(--s-5);
}
@media (max-width: 720px) { .hero-meta { grid-template-columns: 1fr 1fr; } }
.hero-meta .k {
  font-weight: 500; font-size: 11px;
  color: var(--paper-2); text-transform: uppercase;
  letter-spacing: 0.12em; margin-bottom: 6px;
}
.hero-meta .v {
  font-weight: 500; font-size: 17px;
  color: var(--paper-0); letter-spacing: -0.015em;
}

/* ============================================================
   TYPE SPECIMEN
   ============================================================ */
.type-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--s-5);
  align-items: baseline;
  padding: var(--s-5) 0;
  border-top: 1px solid var(--ink-3);
}
.type-row:last-child { border-bottom: 1px solid var(--ink-3); }
@media (max-width: 720px) { .type-row { grid-template-columns: 1fr; gap: var(--s-2); } }
.type-meta { display: flex; flex-direction: column; gap: 4px; }
.type-meta .name {
  font-weight: 500; font-size: 12px; color: var(--paper-1);
  letter-spacing: 0.04em;
}
.type-meta .spec {
  font-weight: 400; font-size: 11px; color: var(--paper-2);
  letter-spacing: 0;
}

/* ============================================================
   COLOR
   ============================================================ */
.color-section { margin-bottom: var(--s-7); }
.color-section h4 {
  font-weight: 500; font-size: 11px;
  color: var(--paper-2); text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 0 0 var(--s-4) 0;
}
.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
}
@media (max-width: 960px) { .color-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .color-grid { grid-template-columns: 1fr; } }
.swatch {
  border: 1px solid var(--ink-3);
  border-radius: var(--r-m);
  padding: var(--s-5);
  height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform var(--dur-base) var(--ease);
}
.swatch:hover { transform: translateY(-2px); }
.swatch .swatch-name {
  font-weight: 500; font-size: 12px; letter-spacing: 0.02em;
}
.swatch .swatch-hex {
  font-weight: 400; font-size: 11px; opacity: 0.7;
  letter-spacing: 0.04em;
  font-feature-settings: var(--feat-tnum);
}
.swatch .swatch-use {
  font-weight: 400; font-size: 13px; line-height: 1.4; opacity: 0.85;
  letter-spacing: -0.005em;
}

/* ============================================================
   SPACE
   ============================================================ */
.space-row {
  display: grid;
  grid-template-columns: 100px 100px 1fr;
  gap: var(--s-5);
  align-items: center;
  padding: var(--s-3) 0;
  border-top: 1px solid var(--ink-3);
}
.space-row:last-child { border-bottom: 1px solid var(--ink-3); }
.space-row .sp-token {
  font-weight: 500; font-size: 12px; color: var(--paper-1);
  letter-spacing: 0.02em;
}
.space-row .sp-px {
  font-weight: 400; font-size: 12px; color: var(--paper-2);
  font-feature-settings: var(--feat-tnum);
}
.space-row .sp-bar {
  height: 8px; background: var(--noise); border-radius: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--r-m);
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    transform var(--dur-fast) var(--ease),
    background var(--dur-base) var(--ease),
    border-color var(--dur-base) var(--ease),
    color var(--dur-base) var(--ease);
  letter-spacing: -0.015em;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--noise); color: var(--noise-fg); }
.btn-secondary {
  background: transparent;
  color: var(--paper-0);
  border-color: var(--ink-4);
}
.btn-secondary:hover { background: var(--ink-1); border-color: var(--paper-3); }
.btn-ghost { background: transparent; color: var(--paper-1); }
.btn-ghost:hover { color: var(--paper-0); }
.btn-redub {
  background: var(--paper-0); color: var(--ink-0);
  padding: 14px 22px;
  font-weight: 700;
}
.btn-redub:hover { background: color-mix(in srgb, var(--paper-0) 88%, var(--noise)); }
.btn-redub::before {
  content: ""; width: 8px; height: 8px;
  background: var(--noise); border-radius: 50%;
}
.btn-large { font-size: 17px; padding: 18px 28px; }
.btn-small { font-size: 13px; padding: 10px 16px; }

/* Glow halo — soft drop only, no hover ripple/lift. */
.btn-glow {
  box-shadow: 0 8px 32px -4px color-mix(in srgb, var(--noise) 45%, transparent);
}
.btn .arrow { display: inline-block; transition: transform var(--dur-base) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-row {
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  padding: var(--s-5) 0;
  align-items: center;
  border-top: 1px solid var(--ink-3);
}
.btn-row:first-child { border-top: 0; }
.btn-row .row-label {
  min-width: 140px;
  font-weight: 500; font-size: 11px; color: var(--paper-2);
  text-transform: uppercase; letter-spacing: 0.12em;
}

/* ============================================================
   COMPONENTS — DUB CARD, EMBED, INPUT
   ============================================================ */
.components-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
}
@media (max-width: 720px) { .components-grid { grid-template-columns: 1fr; } }
.component-frame {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-l);
  padding: var(--s-7);
}
.component-frame .component-label {
  font-weight: 500; font-size: 11px; color: var(--paper-2);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: var(--s-5);
}

.dub-card {
  background: var(--ink-2);
  border-radius: var(--r-m);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--dur-base) var(--ease);
}
.dub-card:hover { transform: translateY(-3px); }
.dub-visual {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 30% 20%, #FF2D87 0%, transparent 40%),
    radial-gradient(circle at 70% 60%, #2BD4B8 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, #5B6BFF 0%, transparent 50%),
    #0A0A0B;
  position: relative;
  overflow: hidden;
}
.dub-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 4px);
}
.dub-meta {
  padding: var(--s-4);
  display: flex; justify-content: space-between; align-items: center;
}
.dub-meta .dub-title {
  font-weight: 600; font-size: 16px; letter-spacing: -0.02em;
}
.dub-meta .dub-stats {
  font-weight: 400; font-size: 12px; color: var(--paper-2);
  font-feature-settings: var(--feat-tnum);
}

.input {
  width: 100%;
  background: var(--ink-0);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-m);
  color: var(--paper-0);
  font-family: var(--font);
  font-size: 15px;
  padding: 14px 16px;
  outline: none;
  transition: border-color var(--dur-base) var(--ease);
  letter-spacing: -0.01em;
}
.input:focus { border-color: var(--noise); }
.input::placeholder { color: var(--paper-2); }
.input-row {
  display: flex; flex-direction: column; gap: var(--s-2);
  margin-bottom: var(--s-4);
}

/* ============================================================
   EMBED MOCK
   ============================================================ */
.embed-mock {
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-l);
  overflow: hidden;
  max-width: 720px;
}
.embed-visual {
  aspect-ratio: 16 / 10;
  background:
    radial-gradient(ellipse at 25% 30%, #FF2D87 0%, transparent 50%),
    radial-gradient(ellipse at 75% 70%, #5B6BFF 0%, transparent 55%),
    radial-gradient(ellipse at 50% 50%, #2BD4B8 0%, transparent 35%),
    #0A0A0B;
  position: relative;
}
.embed-visual::after {
  content: "";
  position: absolute; inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 3px);
}
.embed-controls {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--ink-3);
}
.embed-info { display: flex; flex-direction: column; gap: 2px; }
.embed-info .embed-title {
  font-weight: 600; font-size: 16px; letter-spacing: -0.02em;
}
.embed-info .embed-url {
  font-weight: 400; font-size: 12px; color: var(--paper-2);
  font-feature-settings: var(--feat-tnum);
}
.embed-actions { display: flex; gap: var(--s-2); }

/* ============================================================
   NOTE BLOCK
   ============================================================ */
.note-block {
  margin-top: var(--s-7);
  padding: var(--s-7);
  background: var(--ink-1);
  border: 1px solid var(--ink-3);
  border-radius: var(--r-l);
}
.note-block .kicker {
  font-weight: 500; font-size: 11px; color: var(--noise);
  text-transform: uppercase; letter-spacing: 0.12em;
  margin-bottom: var(--s-3); display: block;
}
.note-block h3 {
  font-weight: 600; font-size: 32px; letter-spacing: -0.025em; line-height: 1.12;
  margin: 0 0 var(--s-3) 0;
}
.note-block p {
  color: var(--paper-1); font-size: 15px; line-height: 1.55;
  max-width: 64ch; margin: 0 0 var(--s-3) 0;
}
.note-block p:last-child { margin: 0; }
.note-block strong { color: var(--paper-0); font-weight: 600; }

/* ============================================================
   AMBIENT STAGE — fixed backdrop for hero / landing pages
   Layered: orbs (color), vignette + scanlines (depth), grain (texture).
   All siblings of .ambient-stage become z-index: 2 by virtue of the
   stage and its overlays being z-index 0–1.
   ============================================================ */
.ambient-stage,
.ambient-stage-overlay {
  position: fixed; inset: 0;
  pointer-events: none;
}
.ambient-stage { z-index: 0; overflow: hidden; }
.ambient-stage-overlay { z-index: 1; }

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  will-change: transform, opacity;
  transition: opacity var(--dur-slow) var(--ease);
}
.orb-1 {
  width: 70vmin; height: 70vmin;
  background: var(--noise);
  top: -15%; left: -10%;
  opacity: 0.85;
  animation: drift-1 22s ease-in-out infinite;
}
.orb-2 {
  width: 55vmin; height: 55vmin;
  background: #5B6BFF;
  top: 10%; right: -10%;
  opacity: 0.78;
  animation: drift-2 26s ease-in-out infinite;
}
.orb-3 {
  width: 80vmin; height: 80vmin;
  background: #2BD4B8;
  bottom: -25%; left: 25%;
  opacity: 0.6;
  animation: drift-3 30s ease-in-out infinite;
}
.orb-4 {
  width: 45vmin; height: 45vmin;
  background: #FFD60A;
  top: 45%; left: 55%;
  opacity: 0.5;
  animation: drift-4 24s ease-in-out infinite;
}
@keyframes drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(22vw, 28vh) scale(1.15); }
  66%      { transform: translate(-8vw, 12vh) scale(0.9); }
}
@keyframes drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(-30vw, 35vh) scale(1.25); }
}
@keyframes drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  40%      { transform: translate(15vw, -20vh) scale(0.85); }
  75%      { transform: translate(-12vw, -8vh) scale(1.1); }
}
@keyframes drift-4 {
  0%, 100% { transform: translate(0, 0) scale(0.95); }
  50%      { transform: translate(-25vw, -30vh) scale(1.3); }
}

.scanlines {
  background: repeating-linear-gradient(
    0deg,
    color-mix(in srgb, var(--paper-0) 4%, transparent) 0px,
    color-mix(in srgb, var(--paper-0) 4%, transparent) 1px,
    transparent 1px,
    transparent 4px
  );
  mix-blend-mode: overlay;
}
.vignette {
  background:
    radial-gradient(ellipse at center,
      color-mix(in srgb, var(--ink-0) 15%, transparent) 0%,
      color-mix(in srgb, var(--ink-0) 55%, transparent) 60%,
      color-mix(in srgb, var(--ink-0) 85%, transparent) 100%);
}
.grain {
  opacity: 0.18;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1   0 0 0 0 1   0 0 0 0 1   0 0 0 0.6 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* Hover-to-intensify: when a parent toggles .is-hovering, orbs swell. */
.is-hovering .orb { animation-duration: 12s; }
.is-hovering .orb-1 { opacity: 1; }
.is-hovering .orb-2 { opacity: 0.95; }
.is-hovering .orb-3 { opacity: 0.8; }
.is-hovering .orb-4 { opacity: 0.7; }

/* ============================================================
   PRIMITIVES — live pip, brand dot, rise reveal
   ============================================================ */
.live-pip {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 500;
  font-size: 11px;
  color: var(--paper-1);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-feature-settings: var(--feat-tnum);
}
.live-pip::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px color-mix(in srgb, var(--live) 60%, transparent);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.8); }
}

.brand-dot {
  display: inline-block;
  width: 0.18em; height: 0.18em;
  background: var(--noise);
  border-radius: 50%;
  vertical-align: -0.02em;
  margin-left: 0.04em;
  animation: dot-pulse 2.4s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.15); }
}

.rise { animation: rise 1.2s var(--ease) both; }
.rise-1 { animation: rise 1.2s var(--ease) 0.2s both; }
.rise-2 { animation: rise 1.4s var(--ease) 0.4s both; }
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .orb, .live-pip::before, .brand-dot, .rise, .rise-1, .rise-2 {
    animation: none !important;
  }
}

/* ============================================================
   FOOTER (system · uppercase pip row)
   ============================================================ */
footer {
  padding: var(--s-8) 0;
  border-top: 1px solid var(--ink-3);
  color: var(--paper-2);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: flex; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-4);
}

/* ============================================================
   LANDING — top nav, hero, CTA, footer grid
   Composes with the design tokens above. Used by the front page
   (design/new-design.html) and any marketing surface that wants
   the heavy-weight, edge-to-edge treatment.
   ============================================================ */
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px var(--s-6);
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid var(--ink-3);
}
.landing-logo {
  font-size: clamp(28px, 3.6vw, 44px);
  display: flex;
  align-items: center;
  gap: 0.14em;
  line-height: 1;
}
.landing-logo .mark {
  height: 1em;
  aspect-ratio: 117 / 103;
  flex-shrink: 0;
  color: var(--paper-0);
}
.landing-logo .mark svg { width: 100%; height: 100%; display: block; }
.landing-logo .word {
  font-weight: 900;
  letter-spacing: -0.05em;
  color: var(--paper-0);
}
.landing-logo .word .dot { color: var(--noise); }

.landing-status {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-variant-numeric: tabular-nums;
  color: var(--paper-0);
  font-size: 12px;
  letter-spacing: 0.18em;
  font-weight: 600;
  text-transform: uppercase;
}
.landing-status .live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px color-mix(in srgb, var(--live) 50%, transparent);
  animation: pulse 1.6s ease-in-out infinite;
}

.landing-hero {
  flex: 1;
  padding: 88px var(--s-6) 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.landing-hero .eyebrow {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 300;
  font-style: italic;
  color: var(--paper-1);
  letter-spacing: -0.01em;
  margin: 0 0 4px;
}
.landing-hero .headline {
  font-size: clamp(48px, 8vw, 112px);
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.04em;
  margin-bottom: 28px;
  max-width: 16ch;
  text-wrap: balance;
}
.landing-hero .sub {
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  color: var(--paper-0);
  margin-bottom: 28px;
}
.landing-hero .sub .dot { color: var(--noise); }
.landing-hero .micro {
  font-size: clamp(15px, 1.4vw, 18px);
  font-weight: 500;
  color: var(--paper-0);
  margin-bottom: 56px;
  letter-spacing: 0.01em;
}
.landing-hero .micro b { font-weight: 800; }

.cta-underline {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--paper-0);
  text-decoration: none;
  border-bottom: 2px solid var(--paper-0);
  padding-bottom: 4px;
  width: fit-content;
  transition:
    gap var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease);
}
.cta-underline:hover {
  gap: 14px;
  color: var(--noise);
  border-bottom-color: var(--noise);
}

.landing-footer {
  border-top: 1px solid var(--ink-3);
  padding: var(--s-5) var(--s-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
  font-size: 13px;
  color: var(--paper-2);
  line-height: 1.5;
}
.landing-footer h4 {
  color: var(--paper-3);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin: 0 0 var(--s-2) 0;
}
.landing-footer a {
  color: var(--paper-0);
  display: block;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.landing-footer a:hover { color: var(--noise); }
.landing-footer .meta b { color: var(--paper-0); font-weight: 500; }

@media (max-width: 820px) {
  .landing-nav    { padding: 18px var(--s-5); }
  .landing-hero   { padding: 56px var(--s-5) 72px; }
  .landing-hero .headline { letter-spacing: -0.045em; }
  .landing-footer { grid-template-columns: 1fr 1fr; padding: var(--s-5); gap: var(--s-5); }
}
@media (max-width: 480px) {
  .landing-footer { grid-template-columns: 1fr; }
}
