/* ==========================================================================
   NEONOVA — THE DUSKLINE  ·  Kickstarter pre-launch
   Design system. No frameworks, no CDN, no external fonts.

   Ported from the earlier VHS/glitch profile theme and retuned to the
   Neonova palette: gold light side, cyan dark side, ember for the Divide.
   ========================================================================== */

/* ---------- Self-hosted type (SIL OFL — see assets/fonts/OFL.txt) ----------
   Cinzel Decorative carries the NEONOVA wordmark; Cinzel carries "The Duskline"
   and the section headings. Served from our own origin, so no Google Fonts
   request and nothing to break if that CDN is blocked.                       */
@font-face {
  font-family: "Cinzel Decorative";
  src: url("../fonts/CinzelDecorative-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/Cinzel-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cinzel";
  src: url("../fonts/Cinzel-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens: dark is the default (this is a space opera) ---------- */
:root {
  --bg:            #05070f;
  --bg-deep:       #020308;
  --panel:         #0c1120;
  --panel-2:       #111830;
  --border:        #23304f;
  --border-soft:   #1a2440;

  --fg:            #f2ede0;
  --fg-dim:        #a5aec5;
  --fg-faint:      #6f7a95;

  --gold:          #e8b84b;
  --gold-bright:   #ffd98a;
  --gold-deep:     #c39f3c;
  --cyan:          #35e0e8;
  --cyan-deep:     #00b8c4;
  --ember:         #ff6a1f;
  --ember-hot:     #ff3d00;

  --gold-glow:     rgba(232, 184, 75, 0.35);
  --cyan-glow:     rgba(53, 224, 232, 0.30);
  --ember-glow:    rgba(255, 106, 31, 0.45);

  --on-accent:     #120d02;

  --grain-opacity: 0.055;
  --scan-opacity:  0.05;
  --vignette:      inset 0 0 14vw rgba(0, 0, 0, 0.75);

  --shell:         1180px;
  --gutter:        clamp(1.15rem, 4vw, 2.75rem);

  /* The NEONOVA wordmark only */
  --font-wordmark: "Cinzel Decorative", "Iowan Old Style", Georgia, serif;
  /* "The Duskline" and the section headings */
  --font-display:  "Cinzel", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  /* Card titles, pull quotes — Cinzel is inscriptional and gets hard to read
     at small sizes, so anything under ~1.4rem stays on the book serif. */
  --font-serif:    "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --font-body:     ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono:     ui-monospace, "SFMono-Regular", "Cascadia Mono", Consolas, "Courier New", monospace;

  --radius:        10px;
  --radius-lg:     16px;
}

/* ---------- Light theme: the parchment / archive-plate side ---------- */
html.light {
  --bg:            #f4f1ea;
  --bg-deep:       #ece7da;
  --panel:         #ffffff;
  --panel-2:       #f8f5ec;
  --border:        #d5cbb2;
  --border-soft:   #e2dac6;

  --fg:            #1a1710;
  --fg-dim:        #4e4835;
  --fg-faint:      #7d745c;

  --gold:          #8a6a15;
  --gold-bright:   #6d5210;
  --gold-deep:     #a8811d;
  --cyan:          #0a6b78;
  --cyan-deep:     #085761;
  --ember:         #c23a05;
  --ember-hot:     #a52f02;

  --gold-glow:     rgba(138, 106, 21, 0.22);
  --cyan-glow:     rgba(10, 107, 120, 0.20);
  --ember-glow:    rgba(194, 58, 5, 0.28);

  --on-accent:     #fffdf6;

  --grain-opacity: 0.05;
  --scan-opacity:  0.03;
  --vignette:      inset 0 0 12vw rgba(70, 55, 20, 0.22);
}

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

/* A class like `.countdown-grid { display: grid }` outranks the UA rule for
   [hidden], so the attribute silently stops working. Put it back. */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  /* `clip` (unlike `hidden`) doesn't create a scroll container, so it can't
     break position:sticky on the header. Last line of defence against any one
     element pushing the page sideways on a phone. */
  overflow-x: clip;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Deep-space wash behind everything. This is also the starfield's fallback:
   if the worker or OffscreenCanvas isn't available the page still reads as
   deep space, just without the motion. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 50% at 12% 0%,   var(--gold-glow), transparent 60%),
    radial-gradient(ellipse 60% 45% at 92% 12%,  var(--cyan-glow), transparent 62%),
    radial-gradient(ellipse 90% 60% at 50% 110%, var(--ember-glow), transparent 65%);
  opacity: 0.5;
  transition: opacity 0.6s ease;
}
/* Once the real starfield is drawing, drop the wash right back so the
   worker's own nebula clouds aren't fighting a second gradient on top. */
body.starfield-live::before { opacity: 0.14; }

/* ---------- Starfield (OffscreenCanvas, driven by starfield.worker.js) ---------- */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.1s ease;
}
body.starfield-live #starfield { opacity: 1; }

/* The parchment/archive theme is a lit room, not deep space — pull the stars
   almost all the way out rather than leaving them glowing on cream. */
html.light #starfield { opacity: 0; }
html.light body.starfield-live::before { opacity: 0.5; }

/* Theme cross-fade */
body, .panel, .card, header, footer, .btn, .badge, input, summary {
  transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

img { max-width: 100%; height: auto; display: block; }

/* UA default is `figure { margin: 1em 40px }` — that 40px eats grid columns
   alive. Zero it globally rather than per-component. */
figure { margin: 0; }
blockquote { margin: 0; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ember);
  color: #fff;
  padding: 0.8rem 1.3rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Atmosphere layers — decorative, pointer-events:none, aria-hidden
   ========================================================================== */
.grain,
.scanlines,
.vignette,
.sweep,
.flash {
  position: fixed;
  pointer-events: none;
}

.grain {
  inset: 0;
  z-index: 2;
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-image: repeating-conic-gradient(#fff 0% 25%, #000 0% 50%);
  background-size: 3px 3px;
}

.scanlines {
  inset: 0;
  z-index: 3;
  opacity: var(--scan-opacity);
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0px,
    rgba(0, 0, 0, 0.4) 1px,
    transparent 1px,
    transparent 3px
  );
}

.vignette {
  inset: 0;
  z-index: 3;
  box-shadow: var(--vignette);
}

.flash {
  inset: 0;
  z-index: 60;
  opacity: 0;
  mix-blend-mode: screen;
  background:
    linear-gradient(transparent 37%, rgba(255, 106, 31, 0.40) 37%, rgba(255, 106, 31, 0.40) 40%, transparent 40%),
    linear-gradient(transparent 60%, rgba(53, 224, 232, 0.34) 60%, rgba(53, 224, 232, 0.34) 63%, transparent 63%),
    linear-gradient(transparent 79%, rgba(232, 184, 75, 0.26) 79%, rgba(232, 184, 75, 0.26) 81%, transparent 81%);
}

@media (prefers-reduced-motion: no-preference) {
  .sweep {
    left: 0; right: 0;
    height: 44px;
    z-index: 4;
    background: linear-gradient(to bottom, transparent, rgba(255, 217, 138, 0.07), transparent);
    animation: sweep 11s linear infinite;
  }
  @keyframes sweep {
    from { top: -10%; }
    to   { top: 110%; }
  }

  /* Only the non-interactive overlay animates — never <body> — so nothing
     shifts or becomes unclickable. One smooth pulse, well under 3 flashes/sec. */
  body.is-flickering .flash { animation: tear 0.42s ease-out 1; }
  @keyframes tear {
    0%   { opacity: 0;    transform: translateX(0);    filter: none; }
    35%  { opacity: 0.7;  transform: translateX(-6px); filter: hue-rotate(12deg) saturate(1.6); }
    100% { opacity: 0;    transform: translateX(4px);  filter: none; }
  }

  body.is-flickering-hard .flash { animation: tear-hard 1s ease-in-out 1; }
  @keyframes tear-hard {
    0%   { opacity: 0;    transform: translate(0, 0);     filter: none; }
    25%  { opacity: 0.9;  transform: translate(-11px, 3px); filter: hue-rotate(20deg) saturate(2); }
    55%  { opacity: 0.25; transform: translate(9px, -3px);  filter: hue-rotate(-12deg); }
    80%  { opacity: 0.7;  transform: translate(-5px, 2px);  filter: none; }
    100% { opacity: 0;    transform: translate(0, 0);       filter: none; }
  }
}

/* ---------- First-load "signal acquired" intro ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
.intro.is-on { opacity: 1; }
.intro canvas { width: 100%; height: 100%; display: block; }

@media (prefers-reduced-motion: no-preference) {
  .intro.is-snapping { animation: intro-snap 0.28s steps(2, end) 1 forwards; }
  @keyframes intro-snap {
    0%   { transform: translate(0, 0);      filter: none;                      opacity: 1; }
    20%  { transform: translate(-10px, 4px); filter: hue-rotate(18deg) saturate(2); opacity: 1; }
    45%  { transform: translate(8px, -6px);  filter: hue-rotate(-10deg) saturate(1.8); opacity: 0.9; }
    70%  { transform: translate(-4px, 2px);  filter: none;                      opacity: 0.45; }
    100% { transform: translate(0, 0);       filter: none;                      opacity: 0; }
  }
}

/* ---------- Cursor ember trail ---------- */
.trail {
  position: fixed;
  left: 0; top: 0;
  width: 15px; height: 9px;
  z-index: 55;
  pointer-events: none;
  border-radius: 2px;
  mix-blend-mode: screen;
  background: linear-gradient(90deg, var(--ember-glow), transparent 45%, var(--cyan-glow) 60%, transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .trail { animation: trail-out 0.45s ease-out forwards; }
  @keyframes trail-out {
    0%   { opacity: 0.8; transform: translate(-50%, -50%) scaleX(1.8) scaleY(0.6) skewX(-8deg); }
    100% { opacity: 0;   transform: translate(-50%, -50%) scaleX(0.5) scaleY(0.2) skewX(0deg); }
  }
}

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.shell {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

main { position: relative; z-index: 10; }

section { position: relative; }

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--border-soft);
}

.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 0.75rem;
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.12;
  margin: 0;
}

h1, h2 {
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}
h3 {
  font-family: var(--font-serif);
  letter-spacing: 0.01em;
}

h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); }

.lede {
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  color: var(--fg-dim);
  max-width: 62ch;
}

.divider-rule {
  height: 2px;
  border: 0;
  margin: 0;
  background: linear-gradient(
    to right,
    transparent,
    var(--gold) 18%,
    var(--ember) 50%,
    var(--cyan) 82%,
    transparent
  );
  opacity: 0.85;
}

/* ==========================================================================
   Glitch wordmark
   ========================================================================== */
.glitch {
  position: relative;
  display: inline-block;
  color: var(--fg);
}
/* Headings must stay block-level — as inline-block an <h1> will sit on the
   same line as a preceding inline badge instead of starting its own. */
h1.glitch, h2.glitch { display: block; }
.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .glitch::before, .glitch::after { display: none; }
}
@media (prefers-reduced-motion: no-preference) {
  /* At rest these layers are invisible, so the gold foil underneath reads
     cleanly. They only punch in for a few frames of each cycle — the wordmark
     is gold that occasionally tears, not a permanently tri-coloured mess. */
  .glitch::before {
    color: var(--ember);
    opacity: 0;
    animation: glitch-a 5.5s infinite steps(1);
  }
  .glitch::after {
    color: var(--cyan);
    opacity: 0;
    animation: glitch-b 4.3s infinite steps(1);
  }
  @keyframes glitch-a {
    0%, 92%, 100% { opacity: 0; }
    93% { opacity: 0.9; clip-path: inset(10% 0 40% 0); transform: translate(3px, 0); }
    95% { opacity: 0.9; clip-path: inset(70% 0 5% 0);  transform: translate(-3px, 1px); }
    97% { opacity: 0.9; clip-path: inset(30% 0 50% 0); transform: translate(2px, -2px); }
  }
  @keyframes glitch-b {
    0%, 90%, 100% { opacity: 0; }
    92% { opacity: 0.9; clip-path: inset(20% 0 60% 0); transform: translate(-3px, 0); }
    94% { opacity: 0.9; clip-path: inset(5% 0 80% 0);  transform: translate(3px, -1px); }
    98% { opacity: 0.9; clip-path: inset(45% 0 20% 0); transform: translate(-2px, 2px); }
  }
}

/* Gold-foil treatment for the big NEONOVA lockup */
.foil {
  background: linear-gradient(
    100deg,
    var(--gold-deep) 0%,
    var(--gold-bright) 22%,
    var(--gold) 40%,
    var(--gold-bright) 58%,
    var(--gold-deep) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
/* The glitch pseudo-layers must stay opaque, not inherit the clipped fill */
.foil.glitch::before,
.foil.glitch::after {
  background: none;
  -webkit-text-fill-color: currentColor;
  -webkit-background-clip: border-box;
  background-clip: border-box;
}

/* ==========================================================================
   Header
   ========================================================================== */
.divide-bar {
  height: 4px;
  width: 100%;
  background: linear-gradient(
    to right,
    var(--gold-deep) 0%,
    var(--gold-bright) 30%,
    var(--ember-hot) 50%,
    var(--cyan-deep) 72%,
    var(--bg-deep) 100%
  );
}

.site-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--border-soft);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(9px);
  position: sticky;
  top: 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand { min-width: 0; }
.brand-mark {
  font-family: var(--font-wordmark);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  cursor: pointer;
  user-select: none;
}
.brand-sub {
  margin: 0.15rem 0 0;
  font-family: var(--font-display);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
  white-space: nowrap;
}
/* On narrow phones this wraps to two lines and shoulders the CTA. The
   wordmark alone carries the header there. */
@media (max-width: 460px) {
  .brand-sub { display: none; }
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-shrink: 0;
}

.site-nav {
  display: none;
  gap: 1.35rem;
  font-size: 0.85rem;
}
.site-nav a {
  color: var(--fg-dim);
  text-decoration: none;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}
.site-nav a:hover { color: var(--gold); }
@media (min-width: 860px) { .site-nav { display: flex; } }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--fg);
  cursor: pointer;
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold); }

.icon-swap { position: relative; width: 1.15rem; height: 1.15rem; }
.icon-swap svg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.icon-swap svg.is-on { opacity: 1; transform: rotate(0) scale(1); }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn svg { width: 1rem; height: 1rem; flex-shrink: 0; }

.btn-primary {
  background: linear-gradient(135deg, var(--ember-hot), var(--ember) 55%, var(--gold));
  color: #fff;
  box-shadow: 0 8px 26px -10px var(--ember-glow);
}
.btn-primary:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px var(--ember-glow);
}

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

.btn-sm { padding: 0.55rem 0.95rem; font-size: 0.68rem; }

@media (prefers-reduced-motion: no-preference) {
  .btn { transition: transform 0.2s ease, box-shadow 0.3s ease, border-color 0.3s ease, color 0.3s ease; }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.75rem;
}

.cta-note {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  color: var(--fg-faint);
}

/* ==========================================================================
   Badges & pills
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border: 1px solid currentColor;
  border-radius: 999px;
}
.badge-live   { color: var(--ember); }
.badge-gold   { color: var(--gold); }
.badge-cyan   { color: var(--cyan); }
.badge-muted  { color: var(--fg-faint); }

.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .pulse-dot { animation: pulse 2.2s ease-in-out infinite; }
  @keyframes pulse {
    0%, 100% { opacity: 1;   box-shadow: 0 0 0 0 currentColor; }
    50%      { opacity: 0.5; box-shadow: 0 0 0 5px transparent; }
  }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding-block: clamp(2.75rem, 7vw, 5rem);
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 {
  font-family: var(--font-wordmark);
  /* Cinzel Decorative is wide and has heavy swashes — it needs a smaller
     ceiling and tighter tracking than a plain serif would at this size. */
  font-size: clamp(2.1rem, 6.4vw, 4rem);
  letter-spacing: 0.04em;
  line-height: 1.05;
  margin: 1.1rem 0 0;
}
.hero .subtitle {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1rem, 2.6vw, 1.6rem);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0.45rem 0 0;
}
.hero .logline {
  margin-top: 1.6rem;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  color: var(--fg-dim);
  max-width: 54ch;
}
.hero .logline strong { color: var(--fg); font-weight: 600; }

/* ---------- Cover frame ---------- */
.cover-frame {
  position: relative;
  max-width: 340px;
  margin-inline: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.7rem;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.85), 0 0 0 1px var(--gold-glow);
}
.cover-frame img {
  border-radius: 6px;
  width: 100%;
}
.cover-frame::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  pointer-events: none;
  background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.13) 50%, transparent 60%);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .cover-frame::after { animation: foil-sweep 7s ease-in-out infinite; }
  @keyframes foil-sweep {
    0%, 70%, 100% { opacity: 0; transform: translateX(-30%); }
    82%           { opacity: 1; transform: translateX(30%); }
  }
}

.cover-caption {
  margin: 0.9rem 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ==========================================================================
   Countdown
   ========================================================================== */
.countdown {
  margin-top: 2rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 88%, transparent);
  padding: 1.15rem 1.25rem;
  max-width: 30rem;
}
.countdown-label {
  margin: 0 0 0.85rem;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  text-align: center;
}
.countdown-cell {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 0.6rem 0.25rem;
  background: var(--bg-deep);
}
html.light .countdown-cell { background: var(--panel-2); }

.countdown-num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  font-weight: 700;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.countdown-unit {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
/* Shown instead of the grid when no launch date is configured yet */
.countdown-tba {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}

/* ==========================================================================
   Panels & cards
   ========================================================================== */
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 1.25rem;
  overflow: hidden;
  height: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .card { transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease, background-color 0.4s ease; }
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 16px 34px -16px var(--gold-glow);
}
.card h3 { font-size: 1.06rem; }
.card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fg-dim);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.card-spec {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--fg-faint);
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}

/* ==========================================================================
   Delivery strip — the first thing a cautious backer looks for
   ========================================================================== */
.delivery {
  margin-top: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: clamp(1.15rem, 3vw, 1.75rem);
}
.delivery-title {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.delivery-grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 700px) {
  .delivery-grid { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
}
.delivery-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--ember);
}
.delivery-item:last-child { border-left-color: var(--cyan); }
.delivery-when {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--fg);
}
.delivery-what {
  font-size: 0.88rem;
  color: var(--fg-dim);
}

.delivery-worldwide {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--fg-dim);
}
.delivery-worldwide svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--gold);
}
.delivery-worldwide strong { color: var(--gold); font-weight: 700; }

.delivery-note {
  margin: 1rem 0 0;
  font-size: 0.84rem;
  color: var(--fg-faint);
}

/* ==========================================================================
   The Divide — split light/dark world panel
   ========================================================================== */
.divide {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* No min-height here. Paired with aspect-ratio, a min-height taller than the
     ratio allows makes the box grow its *width* to compensate — which blew the
     panel 90px past the viewport on phones. Change the ratio instead. */
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: col-resize;
  touch-action: pan-y;
}
@media (max-width: 640px) {
  /* Taller crop on phones: at 16:9 across 340px there isn't enough of either
     skyline left to be worth looking at. */
  .divide { aspect-ratio: 4 / 5; }
}
.divide-side {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.divide-light { background-image: url("../img/harjon-altus.jpg"); }
.divide-dark  { background-image: url("../img/dreymar-union.jpg"); }

/* The dark side is revealed to the right of the seam */
.divide-dark {
  clip-path: inset(0 0 0 var(--seam, 50%));
}

.divide-seam {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--seam, 50%);
  width: 3px;
  margin-left: -1.5px;
  z-index: 3;
  background: linear-gradient(to bottom, var(--gold-bright), var(--ember-hot) 45%, var(--ember) 70%, var(--gold-deep));
  box-shadow: 0 0 22px 5px var(--ember-glow);
}
.divide-seam::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34px; height: 34px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid var(--gold-bright);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: 0 0 18px var(--ember-glow);
}
@media (prefers-reduced-motion: no-preference) {
  .divide-seam { animation: seam-flicker 3.4s ease-in-out infinite; }
  @keyframes seam-flicker {
    0%, 100% { box-shadow: 0 0 22px 5px var(--ember-glow); }
    50%      { box-shadow: 0 0 34px 9px var(--ember-glow); }
  }
}

.divide-tag {
  position: absolute;
  bottom: 0.9rem;
  z-index: 4;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.divide-tag-light { left: 0.9rem;  color: var(--gold-bright); }
.divide-tag-dark  { right: 0.9rem; color: var(--cyan); }

/* Side by side they overlap once the panel is narrower than ~560px. Send one
   to the top-left and the other to the bottom-right instead. */
@media (max-width: 640px) {
  .divide-tag { font-size: 0.56rem; padding: 0.32rem 0.6rem; }
  .divide-tag-light { top: 0.8rem; bottom: auto; left: 0.7rem; }
  .divide-tag-dark  { bottom: 0.8rem; right: 0.7rem; }
}

.divide-hint {
  margin: 0.75rem 0 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.world-cols {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.5rem;
}
@media (min-width: 760px) { .world-cols { grid-template-columns: 1fr 1fr; } }

.faction {
  border-left: 3px solid;
  padding-left: 1.1rem;
}
.faction-light { border-color: var(--gold); }
.faction-dark  { border-color: var(--cyan); }
.faction h3 { margin-bottom: 0.35rem; }
.faction p  { margin: 0; color: var(--fg-dim); font-size: 0.94rem; }

/* ==========================================================================
   Figures (map, product shots)
   ========================================================================== */
.figure {
  margin: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--panel);
}
.figure img { width: 100%; }
.figure figcaption {
  padding: 0.85rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--fg-faint);
  border-top: 1px solid var(--border-soft);
}

.split {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
@media (min-width: 880px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-wide-left  { grid-template-columns: 1.25fr 0.75fr; }
  .split-wide-right { grid-template-columns: 0.75fr 1.25fr; }
}

/* ==========================================================================
   Founder's Collection
   ========================================================================== */
.founder {
  border: 1px solid var(--gold);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, color-mix(in srgb, var(--gold) 9%, var(--panel)), var(--panel) 55%);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: 0 24px 60px -34px var(--gold-glow);
}
.founder-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}
/* Deliberately NOT flex: these items mix a <strong> with a bare text node, and
   flex would promote each into its own column instead of letting them wrap as
   one sentence. Block + an absolute bullet keeps the text flowing. */
.founder-list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: var(--fg-dim);
}
.founder-list li::before {
  content: "◆";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  line-height: 1.7;
  font-size: 0.7rem;
}
.founder-list strong { color: var(--fg); font-weight: 600; }

.scarcity {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 1.5rem;
  padding: 0.7rem 1.1rem;
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.scarcity b { font-size: 1.2rem; }

/* ==========================================================================
   Characters
   ========================================================================== */
.char-grid {
  display: grid;
  gap: clamp(0.75rem, 2vw, 1.15rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
}

/* Dossier card: a 3:4 portrait plate with a name strip under it. */
.char {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .char { transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; }
}
.char:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 16px 34px -14px var(--gold-glow);
}

.char img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 22%;
  /* The dossiers are shot on a bright studio grey. Knock them back a touch so
     eight of them don't glare out of a black page. */
  filter: saturate(0.92) contrast(1.03) brightness(0.94);
}
html.light .char img { filter: none; }

.char figcaption {
  padding: 0.6rem 0.7rem 0.7rem;
  border-top: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.char figcaption b {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
}
.char figcaption span {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

/* ==========================================================================
   Author letter
   ========================================================================== */
.quote {
  margin: 0;
  border-left: 3px solid var(--ember);
  padding-left: clamp(1rem, 3vw, 1.75rem);
}
.quote p {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  line-height: 1.5;
  color: var(--fg);
  margin: 0 0 0.75rem;
}
.quote footer {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-faint);
}

.letter-excerpt {
  margin-top: 1.75rem;
  color: var(--fg-dim);
  font-size: 0.97rem;
}
.letter-excerpt p { margin: 0 0 1rem; }
.letter-excerpt p:last-child { margin-bottom: 0; }

/* The rest of the letter is a physical, backers-only thing — this note is what
   sells that, so it gets a gold rule rather than being buried in body copy. */
.letter-note {
  margin: 1.5rem 0 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 0.9rem;
  color: var(--fg-dim);
}

/* ==========================================================================
   Soundtrack — Spotify embed
   ========================================================================== */
.spotify-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: clamp(0.75rem, 2vw, 1rem);
  box-shadow: 0 20px 50px -30px var(--gold-glow);
}
.spotify-wrap iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 12px;
  /* Spotify's own embed is always dark; on the parchment theme that reads as a
     deliberate inset panel rather than a mistake, so leave it alone. */
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { display: grid; gap: 0.75rem; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.faq summary {
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  font-size: 0.98rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "–"; }
.faq details p {
  margin: 0;
  padding: 0 1.15rem 1.15rem;
  color: var(--fg-dim);
  font-size: 0.94rem;
}

/* ==========================================================================
   Closing CTA
   ========================================================================== */
.closing {
  text-align: center;
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
}
.closing h2 { font-size: clamp(1.9rem, 5vw, 3rem); }
.closing .lede { margin-inline: auto; margin-top: 1rem; }
.closing .btn-row { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border-soft);
  background: var(--bg-deep);
}
html.light .site-footer { background: var(--bg-deep); }

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 2rem;
  font-size: 0.8rem;
  color: var(--fg-faint);
  text-align: center;
}
@media (min-width: 700px) {
  .footer-inner { flex-direction: row; text-align: left; }
}
.footer-inner p { margin: 0; }
.footer-status {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease var(--reveal-delay, 0s), transform 0.7s ease var(--reveal-delay, 0s);
  }
  .reveal.is-visible { opacity: 1; transform: none; }

  /* Cards need their own hover transition back once revealed, so give the
     combined selector a transition list covering both concerns. */
  .card.reveal,
  .char.reveal {
    transition:
      opacity 0.7s ease var(--reveal-delay, 0s),
      transform 0.35s ease,
      box-shadow 0.32s ease,
      border-color 0.32s ease;
  }
}

/* ==========================================================================
   Print — someone will print the reward list
   ========================================================================== */
@media print {
  .grain, .scanlines, .vignette, .sweep, .flash, .intro, .trail,
  .site-header, .divide, .btn-row { display: none !important; }
  body { background: #fff; color: #000; }
  .reveal { opacity: 1 !important; transform: none !important; }
}
