/* ================================================================
   DYSTØNIA — Controlled Distortion · Shared Design System v2
   Single source of truth for tokens, components, and layout.
   ================================================================ */

/* ── Tokens ────────────────────────────────────────────────────── */
:root {
  /* Colors — dark ocean blue base + thin, controlled orange accent */
  --void:       #04111c;   /* deep ocean night */
  --navy:       #0a1c2b;
  --ink:        #11293b;
  --line:       #1f3e57;
  --silver:     #c9d3dd;
  --silver-dim: #8a98a8;   /* WCAG AA safe on small text over --void */
  --muted-blue: #5a96c4;
  --ocean:      #2f9fd0;   /* bright ocean accent (was purple) */
  --purple:     #2f9fd0;   /* legacy alias → ocean, keeps older rules in palette */
  --cyan:       #39d6e0;
  --orange:     #e8893f;   /* warm accent — used thin */
  --orange-dim: #c9732f;
  --magenta:    #e8893f;   /* legacy alias → orange (aberration warm side) */
  --green:      #1DB954;
  --green-dark: #169c46;
  --ax: 0px; --ay: 0px;  /* live chromatic-aberration offsets */

  /* Spacing scale */
  --s1:  8px;
  --s2:  12px;
  --s3:  16px;
  --s4:  24px;
  --s5:  32px;
  --s6:  48px;
  --s7:  64px;
  --s8:  96px;

  /* Radius scale */
  --r1:    8px;
  --r2:    11px;
  --r3:    13px;
  --r4:    14px;
  --r-pill: 999px;

  /* Nav height (referenced by hero offset calc) */
  --nav-h: 56px;
}

/* ── Reset + base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--void);
  color: var(--silver);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Ambient FX layers ─────────────────────────────────────────── */
/* Fixed, behind content (z-index: -1) — visible through dark backgrounds */
.grain,
.hero-grain {
  pointer-events: none;
  opacity: .055;
  mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 2.4s steps(3) infinite;
}
.grain { position: fixed; inset: 0; z-index: -1; }
.hero-grain { position: absolute; inset: 0; z-index: 2; }

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

.atmos {
  position: fixed; inset: -25%; z-index: -2; pointer-events: none;
  background:
    radial-gradient(42% 40% at 20% 24%, rgba(47,159,208,.30), transparent 70%),
    radial-gradient(46% 44% at 82% 20%, rgba(57,214,224,.16), transparent 72%),
    radial-gradient(34% 32% at 80% 84%, rgba(232,137,63,.11), transparent 70%),  /* thin orange warmth */
    radial-gradient(60% 60% at 50% 96%, rgba(10,28,43,.55), transparent 72%),
    var(--void);
  filter: blur(34px);
  animation: drift 28s ease-in-out infinite alternate;
}
@keyframes drift {
  0%   { transform: translate3d(-3%, -2%, 0) scale(1.05); }
  100% { transform: translate3d(4%,   3%, 0) scale(1.13); }
}

.vignette {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 30%, transparent 55%, rgba(0,0,0,.55) 100%);
}
.hero-vignette {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: radial-gradient(80% 80% at 50% 40%, transparent 40%, rgba(6,8,15,.75) 100%);
}

/* ── Site nav ──────────────────────────────────────────────────── */
.site-nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--s4);
  background: rgba(7, 9, 16, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(35, 48, 76, .65);
}
.nav-mark {
  position: relative; display: inline-block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 20px; line-height: 1; letter-spacing: .07em;
  color: var(--silver); text-decoration: none;
  flex-shrink: 0;
}
.nav-mark::before, .nav-mark::after {
  content: attr(data-text); position: absolute; inset: 0;
  mix-blend-mode: screen; opacity: .7;
}
.nav-mark::before { color: var(--cyan);    transform: translate(calc(var(--ax) * -.4), calc(var(--ay) * -.4)); }
.nav-mark::after  { color: var(--magenta); transform: translate(calc(var(--ax) *  .4), calc(var(--ay) *  .4)); }

.nav-links {
  display: flex; align-items: center; gap: var(--s3);
}
.nav-link {
  font-family: "Space Mono", monospace;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--silver-dim); text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.nav-link:hover { color: var(--silver); }
.nav-link[aria-current="page"] { color: var(--silver); border-bottom-color: var(--muted-blue); }
.nav-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; border-radius: 2px; }

/* Mobile nav */
@media (max-width: 480px) {
  .site-nav { padding: 0 var(--s3); }
  .nav-links { gap: 10px; }
  .nav-link  { font-size: 9px; letter-spacing: .12em; }
  /* Hide "Listen" on mobile — the logo links home too */
  .nav-link[href="/"] { display: none; }
}

/* ── Wordmark / .mark ──────────────────────────────────────────── */
.mark {
  position: relative; display: inline-block;
  font-family: "Bebas Neue", sans-serif; font-weight: 400;
  font-size: clamp(56px, 16vw, 108px);
  line-height: .9; letter-spacing: .05em;
  color: var(--silver); user-select: none;
}
.mark::before, .mark::after {
  content: attr(data-text); position: absolute; inset: 0;
  mix-blend-mode: screen; opacity: .85;
}
.mark::before { color: var(--cyan);    transform: translate(calc(var(--ax) * -1), calc(var(--ay) * -1)); }
.mark::after  { color: var(--magenta); transform: translate(var(--ax), var(--ay)); }

/* ── Eyebrow label ─────────────────────────────────────────────── */
.eyebrow {
  font-family: "Space Mono", monospace;
  font-size: 11px; letter-spacing: .34em; text-transform: uppercase;
  color: var(--muted-blue);
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px 20px; border-radius: var(--r3);
  text-decoration: none; font-weight: 600; font-size: 15px; letter-spacing: .01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn svg { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(180deg, var(--green), var(--green-dark));
  color: #04140a; border-color: transparent;
  box-shadow: 0 4px 20px -6px rgba(29,185,84,.30);
}
.btn-primary:hover { box-shadow: 0 8px 28px -6px rgba(29,185,84,.45); }

.btn-ghost {
  background: var(--ink); color: var(--silver); border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--muted-blue); }

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(180deg, var(--ink), var(--navy));
  border: 1px solid var(--line); border-radius: var(--r3);
  padding: 15px 16px;
  box-shadow: inset 0 1px 0 rgba(201,207,219,.06), 0 4px 24px -8px rgba(0,0,0,.55);
  transition: border-color .2s, box-shadow .2s;
}
.card:hover {
  border-color: rgba(47,159,208,.4);
  box-shadow: inset 0 1px 0 rgba(201,207,219,.06), 0 8px 40px -12px rgba(0,0,0,.65), 0 0 24px -8px rgba(47,159,208,.20);
}

/* Track / link cards */
.track {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: var(--r2);
  text-decoration: none; color: var(--silver);
  background: linear-gradient(180deg, var(--ink), var(--navy));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(201,207,219,.06), 0 4px 16px -6px rgba(0,0,0,.5);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.track:hover {
  transform: translateY(-2px);
  border-color: var(--ocean);
  box-shadow: inset 0 1px 0 rgba(201,207,219,.06), 0 8px 28px -8px rgba(0,0,0,.6), 0 0 20px -8px rgba(47,159,208,.22);
}
.track:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ── Dot ───────────────────────────────────────────────────────── */
.dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--purple); box-shadow: 0 0 10px var(--purple);
  flex: none;
}

/* ── Chip ──────────────────────────────────────────────────────── */
.chip {
  font-size: 13px; padding: 7px 13px;
  border-radius: var(--r-pill); border: 1px solid var(--line);
  color: var(--silver);
}

/* ── Section head ──────────────────────────────────────────────── */
.sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--line); padding-bottom: 9px; margin-bottom: var(--s3);
}
.sec-head h2 {
  font-family: "Bebas Neue", sans-serif; font-weight: 400;
  font-size: 26px; letter-spacing: .08em; color: var(--silver);
}
.sec-head .idx {
  font-family: "Space Mono", monospace; font-size: 11px;
  color: var(--silver-dim); letter-spacing: .2em;
}

/* ── Badge ─────────────────────────────────────────────────────── */
.badge {
  font-family: "Space Mono", monospace;
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  padding: 4px 9px; border-radius: var(--r-pill); border: 1px solid currentColor;
}
.badge.out  { color: var(--green); }
.badge.next { color: var(--cyan); }
.badge.soon { color: var(--silver-dim); }

/* ── Social link row ───────────────────────────────────────────── */
.social { display: flex; gap: 10px; flex-wrap: wrap; margin-top: var(--s3); }
.social a {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 9px;
  padding: 15px; border-radius: var(--r2);
  background: var(--ink); border: 1px solid var(--line);
  color: var(--silver); text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(201,207,219,.05);
  transition: transform .15s ease, border-color .2s ease;
}
.social a:hover { transform: translateY(-2px); border-color: var(--muted-blue); }
.social a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.social svg { width: 18px; height: 18px; flex: none; }

/* ── Connect block — loud pre-save / follow CTAs ───────────────── */
.connect { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--s3); }
.connect a {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 16px 18px; border-radius: var(--r3);
  font-weight: 600; font-size: 15px; letter-spacing: .01em;
  text-decoration: none; color: var(--silver);
  background: linear-gradient(180deg, var(--ink), var(--navy));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(201,207,219,.06);
  transition: transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.connect a:hover { transform: translateY(-2px); border-color: var(--muted-blue); }
.connect a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.connect a svg { width: 22px; height: 22px; flex: none; }
.connect a.wide { grid-column: 1 / -1; }

/* Pre-save — thin, controlled orange so it reads first */
.connect a.presave {
  background: linear-gradient(180deg, rgba(232,137,63,.16), rgba(232,137,63,.04));
  border-color: rgba(232,137,63,.55);
  color: #f6dcc4;
  box-shadow: inset 0 1px 0 rgba(255,205,160,.14), 0 0 28px -10px rgba(232,137,63,.50);
}
.connect a.presave:hover {
  border-color: var(--orange);
  box-shadow: inset 0 1px 0 rgba(255,205,160,.16), 0 6px 32px -8px rgba(232,137,63,.55);
}

@media (max-width: 360px) {
  .connect { grid-template-columns: 1fr; }
}

/* ── Link row (generic) ────────────────────────────────────────── */
.links { display: flex; flex-wrap: wrap; gap: 10px; }
.links a {
  flex: 1; min-width: 120px; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px; border-radius: var(--r2);
  background: var(--ink); border: 1px solid var(--line);
  color: var(--silver); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: transform .15s ease, border-color .2s ease;
}
.links a:hover { transform: translateY(-2px); border-color: var(--muted-blue); }
.links a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ── Site footer ───────────────────────────────────────────────── */
.site-footer {
  text-align: center; color: var(--silver-dim);
  font-family: "Space Mono", monospace;
  font-size: 10px; letter-spacing: .22em; text-transform: uppercase;
  line-height: 1.9; margin-top: var(--s6); padding-bottom: var(--s6);
}
.site-footer a { color: var(--muted-blue); text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.site-footer .label { font-size: 10px; }

/* ── Entrance animation ────────────────────────────────────────── */
.fade {
  opacity: 0; transform: translateY(14px);
  animation: rise .8s cubic-bezier(.2,.7,.2,1) forwards;
}
.fade.d1 { animation-delay: .08s; }
.fade.d2 { animation-delay: .18s; }
.fade.d3 { animation-delay: .30s; }
.fade.d4 { animation-delay: .44s; }
.fade.d5 { animation-delay: .58s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── Focus (global baseline) ───────────────────────────────────── */
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

/* ── Reduced-motion overrides ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .atmos, .grain, .hero-grain { animation: none; }
  .fade { animation: none; opacity: 1; transform: none; }
  .mark::before    { transform: translate(-1.5px, -1px); }
  .mark::after     { transform: translate(1.5px,   1px); }
  .nav-mark::before { transform: translate(-.5px, -.5px); }
  .nav-mark::after  { transform: translate( .5px,  .5px); }
}
