/* darkstaremperors.com: the band logo's chrome and synthwave neon, the Intro's golden portal,
   and the Neon Arcana tarot app's scroll reveals (tarot/app/js/reveal.js). Each .reveal is a tall
   section with a pinned .stage; site.js writes --p (0..1, its scroll progress) on it and --mx/--my
   (pointer, -1..1) on :root, and everything below moves off those. */

:root {
  --ink: #07040f;
  --night: #120725;
  --violet: #3a1470;
  --pink: #ff2fb4;
  --hot: #ff5ad1;
  --cyan: #2fe6ff;
  --gold: #ffc35a;
  --bone: #efe6ff;
  --mute: #b9a8d9;
  --mx: 0;
  --my: 0;
  --head: "Orbitron", "Segoe UI", sans-serif;
  --body: "Exo 2", "Segoe UI", sans-serif;
  --script: "Mr Dafoe", cursive;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  background: radial-gradient(120% 80% at 50% 0%, #1a0838 0%, var(--ink) 60%) fixed, var(--ink);
  color: var(--bone);
  font: 300 18px/1.65 var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: var(--cyan); }
img { display: block; }

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
main, .foot, .top { position: relative; z-index: 1; }

/* ---------- chrome lettering, after the logo ---------- */

.chrome {
  font: 900 clamp(48px, 12vw, 190px)/0.92 var(--head);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d9ecff 22%, #7fa8d8 46%, #1b2e57 50%, #ff9de2 52%, #ff5ad1 70%, #ffe1f5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.35);
  filter: drop-shadow(0 0 18px rgba(255, 47, 180, 0.55)) drop-shadow(0 6px 0 rgba(47, 230, 255, 0.35));
}
.chrome.small { font-size: clamp(40px, 7vw, 96px); }
.script {
  font: 400 clamp(36px, 6vw, 84px)/1 var(--script);
  color: var(--hot);
  text-shadow: 0 0 6px #ff74d8, 0 0 22px var(--pink), 0 0 48px rgba(255, 47, 180, 0.7);
}

/* ---------- header ---------- */

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 30;
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(7, 4, 15, 0.85), rgba(7, 4, 15, 0));
}
.brand { font: 800 15px var(--head); letter-spacing: 0.3em; color: var(--bone); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .dot { width: 16px; height: 16px; border-radius: 50%; background: #000; box-shadow: 0 0 0 2px var(--gold), 0 0 14px 2px var(--gold); }
.menu { font: 600 13px var(--head); letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone); background: none; border: 1px solid rgba(255, 255, 255, 0.25); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.menu:hover, .menu[aria-expanded="true"] { border-color: var(--cyan); color: var(--cyan); }
.toc { position: absolute; right: clamp(16px, 4vw, 40px); top: 58px; list-style: none; margin: 0; padding: 10px; min-width: 260px;
  background: rgba(14, 6, 30, 0.96); border: 1px solid rgba(255, 47, 180, 0.4); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 0.2s, transform 0.2s; }
.toc.open { opacity: 1; transform: none; pointer-events: auto; }
.toc a { display: flex; gap: 14px; padding: 9px 12px; border-radius: 8px; color: var(--bone); text-decoration: none; font-weight: 400; }
.toc a span { font: 800 13px var(--head); color: var(--pink); width: 22px; }
.toc a:hover { background: rgba(255, 47, 180, 0.14); }

/* ---------- the opening: the portal igniting ---------- */

.intro { position: relative; height: 100svh; display: grid; place-items: center; overflow: hidden; }
.intro-title { position: relative; z-index: 4; display: grid; justify-items: center; text-align: center; gap: 4px; padding: 0 16px;
  transform: translate(calc(var(--mx) * -8px), calc(var(--my) * -6px)); }
.intro-title .script { margin-bottom: -0.25em; transform: rotate(-4deg); }
.intro-title .sub { font: 500 clamp(12px, 1.6vw, 16px) var(--head); letter-spacing: 0.5em; text-transform: uppercase; color: var(--cyan); margin-top: 18px; text-shadow: 0 0 12px rgba(47, 230, 255, 0.6); }
.intro .intro-title > * { opacity: 0; animation: rise 1.6s 1.9s cubic-bezier(.2, .8, .2, 1) forwards; }
.intro .intro-title .chrome { animation-delay: 2.3s; }
.intro .intro-title .sub { animation-delay: 2.9s; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
.intro .intro-title .script { animation-name: rise-tilt; }
@keyframes rise-tilt { from { opacity: 0; transform: rotate(-4deg) translateY(24px); filter: blur(8px); } to { opacity: 1; transform: rotate(-4deg); filter: none; } }

/* the synthwave floor */
.grid-floor { position: absolute; left: -50%; right: -50%; bottom: -10%; height: 55%;
  background:
    linear-gradient(transparent 0 96%, rgba(255, 47, 180, 0.7) 96%) 0 0 / 100% 48px,
    linear-gradient(90deg, transparent 0 97%, rgba(47, 230, 255, 0.55) 97%) 0 0 / 64px 100%;
  transform: perspective(380px) rotateX(62deg); transform-origin: 50% 0;
  mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 45%);
  animation: floor 3.2s linear infinite; opacity: 0.55; }
@keyframes floor { to { background-position: 0 48px, 0 0; } }

.hint { position: absolute; z-index: 5; left: 50%; bottom: 26px; transform: translateX(-50%); display: grid; justify-items: center; gap: 8px;
  font: 600 11px var(--head); letter-spacing: 0.45em; text-transform: uppercase; color: var(--mute); z-index: 5; }
.hint .line { width: 1px; height: 46px; background: linear-gradient(var(--pink), transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); opacity: 1; } 70% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- a reveal: the portal window grows to the screen ---------- */

/* the stage pins while the .spacer scrolls by (that stretch is --p 0..1: the portal opens, the figure
   steps forward), then the sheet, in the normal flow after it, slides up over the pinned scene. */
.reveal { position: relative; }
.reveal .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; place-items: center; z-index: 1; }
.reveal .spacer { height: 150vh; }

/* the window: a circle inside the ring that opens to cover the screen (--open 0..1) */
.reveal { --open: clamp(0, calc(var(--p, 0) * 2.2), 1); --depth: clamp(0, calc((var(--p, 0) - 0.3) * 1.6), 1); --sheet: clamp(0, calc((var(--p, 0) - 0.75) * 4), 1); }
.window { position: absolute; inset: 0;
  clip-path: circle(calc(17vmin + var(--open) * 75vmax) at 50% 50%); }
.window .plate, .window .fg { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: cover; object-position: calc(var(--fx) * 100%) calc(var(--fy) * 100%); }
.window .plate { transform: translate(calc(var(--mx) * -14px), calc(var(--my) * -10px)) scale(calc(1.18 - var(--open) * 0.12)); filter: saturate(1.1) brightness(calc(0.85 - var(--depth) * 0.3)); }
.window .ph { background: radial-gradient(circle at 50% 40%, #3a1470, #07040f 70%); }
.window .fg { transform-origin: calc(var(--fx) * 100%) calc(var(--fy) * 100%);
  transform: translate(calc(var(--mx) * 22px), calc(var(--my) * 14px)) scale(calc(1.06 - var(--open) * 0.06 + var(--depth) * 0.14));
  filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.2)); }
.window .dim { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(7, 4, 15, 0.1), rgba(7, 4, 15, 0.75));
  opacity: calc(0.25 + var(--sheet) * 0.7); }

/* the name, huge, between the plate and the figure */
.big { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; pointer-events: none;
  transform: translate(calc(var(--mx) * -6px), calc(var(--my) * -4px + var(--depth) * -6vh)); }
.big span { display: block; text-align: center; padding: 0 2vw; max-width: 100%;
  font: 900 min(230px, var(--tf, 12vw))/0.9 var(--head); letter-spacing: 0.02em; text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 0%, #d9ecff 24%, #7fa8d8 47%, #1b2e57 50%, #ff9de2 53%, #ff5ad1 72%, #ffe1f5 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(255, 47, 180, 0.5));
  opacity: calc(var(--open) * 1.4 - 0.2); }

/* the portal itself is drawn live by js/portal.js (three.js) on a canvas between the stages and the
   sheets; without WebGL a plain gold rim stands in for it */
.no-webgl .window { box-shadow: none; }
.no-webgl .stage::after { content: ""; position: absolute; left: 50%; top: 50%; width: 36vmin; height: 36vmin; margin: -18vmin 0 0 -18vmin;
  border-radius: 50%; box-shadow: 0 0 0 3px #ffd58a, 0 0 30px 8px rgba(255, 150, 40, 0.8), inset 0 0 30px 6px rgba(255, 150, 40, 0.6);
  opacity: calc(1 - var(--open) * 1.15); transform: scale(calc(1 + var(--open) * 3.4)); pointer-events: none; }
.reveal .hint { opacity: calc(1 - var(--open) * 3); }

/* the sheet slides up over the scene */
.sheet-wrap { position: relative; z-index: 3; margin-top: -40vh; display: flex; justify-content: center; padding: 0 16px 16vh; pointer-events: none; }
.sheet { pointer-events: auto; width: min(980px, 100%); padding: clamp(22px, 4vw, 48px);
  background: linear-gradient(180deg, rgba(20, 8, 42, 0.86), rgba(9, 4, 20, 0.94));
  border: 1px solid rgba(255, 47, 180, 0.35); border-radius: 22px;
  box-shadow: 0 0 0 1px rgba(47, 230, 255, 0.12) inset, 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(255, 47, 180, 0.12);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); position: relative; }
.sheet::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--pink), var(--cyan), transparent); }
.eyebrow { font: 600 12px var(--head); letter-spacing: 0.32em; text-transform: uppercase; color: var(--cyan); display: flex; align-items: center; gap: 12px; }
.eyebrow .num { font: 900 22px var(--head); color: var(--pink); text-shadow: 0 0 14px rgba(255, 47, 180, 0.8); letter-spacing: 0.05em; }
.name { margin: 10px 0 4px; font: 800 clamp(30px, 5vw, 56px)/1.05 var(--head); letter-spacing: 0.02em; text-transform: uppercase; color: var(--bone); }
.name.script { text-transform: none; font: 400 clamp(38px, 6vw, 70px)/1.05 var(--script); color: var(--hot); }
.lede { margin: 0 0 18px; font-size: 20px; color: var(--gold); font-weight: 400; }
.sheet p { margin: 0 0 12px; color: var(--bone); }
.cols { display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: start; }
.cols:not(:has(.thumb)) { grid-template-columns: 1fr; }
.thumb { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: #000; aspect-ratio: 16 / 9;
  box-shadow: 0 0 0 1px rgba(47, 230, 255, 0.4), 0 10px 30px rgba(0, 0, 0, 0.5); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s, filter 0.5s; }
.thumb:hover img { transform: scale(1.05); filter: brightness(1.15); }
.thumb .tri { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 58px; height: 58px; border-radius: 50%;
  background: rgba(7, 4, 15, 0.6); box-shadow: 0 0 0 2px var(--gold), 0 0 22px var(--gold); }
.thumb .tri::after { content: ""; position: absolute; left: 23px; top: 18px; border-left: 18px solid var(--gold); border-top: 11px solid transparent; border-bottom: 11px solid transparent; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.actions.center { justify-content: center; }
.btn { display: inline-flex; align-items: center; gap: 12px; padding: 13px 22px; border-radius: 999px; cursor: pointer;
  font: 700 13px var(--head); letter-spacing: 0.18em; text-transform: uppercase; text-decoration: none;
  color: #12051f; background: linear-gradient(90deg, var(--hot), var(--pink)); border: 0;
  box-shadow: 0 0 20px rgba(255, 47, 180, 0.5); transition: transform 0.2s, box-shadow 0.2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 32px rgba(255, 47, 180, 0.8); }
.btn .tri { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.btn.ghost { background: none; color: var(--cyan); box-shadow: 0 0 0 1px rgba(47, 230, 255, 0.6) inset; }
.btn.ghost:hover { box-shadow: 0 0 0 1px var(--cyan) inset, 0 0 22px rgba(47, 230, 255, 0.45); }
.btn.soon { background: none; color: var(--gold); box-shadow: 0 0 0 1px rgba(255, 195, 90, 0.6) inset; cursor: default; }

/* ---------- listen, footer ---------- */

.listen { position: relative; padding: 18vh 16px 14vh; text-align: center; }
.listen p { max-width: 640px; margin: 18px auto 0; color: var(--mute); }
.foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 24px clamp(16px, 4vw, 40px) 34px;
  font: 500 11px var(--head); letter-spacing: 0.3em; text-transform: uppercase; color: var(--mute); border-top: 1px solid rgba(255, 47, 180, 0.2); }

/* ---------- the video player ---------- */

.player { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(4, 2, 10, 0.92); backdrop-filter: blur(6px); }
.player[hidden] { display: none; }
.player-in { width: min(1280px, 100%); }
.player-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.player-title { font: 800 16px var(--head); letter-spacing: 0.2em; text-transform: uppercase; color: var(--hot); }
.player-x { font: 300 34px/1 var(--body); color: var(--bone); background: none; border: 0; cursor: pointer; padding: 0 6px; }
.player video { width: 100%; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 47, 180, 0.4), 0 0 60px rgba(255, 47, 180, 0.25); }
.player-next { text-align: center; margin-top: 14px; }

/* ---------- phones ---------- */

@media (max-width: 720px) {
  body { font-size: 17px; }
  .cols { grid-template-columns: 1fr; }
  .reveal .spacer { height: 120vh; }
  .window { clip-path: circle(calc(22vmin + var(--open) * 90vmax) at 50% 50%); }
  .sheet-wrap { margin-top: -30vh; padding-bottom: 10vh; }
}

/* ---------- people who asked for less motion get the end states ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { --open: 1; --depth: 1; --sheet: 1; }
  .reveal .stage { position: relative; height: 80svh; }
  .reveal .spacer { display: none; }
  .sheet-wrap { margin-top: -10vh; padding: 0 16px 8vh; }
  .reveal .hint, .grid-floor, .hint .line { display: none; animation: none; }
  .intro .intro-title > * { animation: none; opacity: 1; }
  .window .fg, .window .plate, .big, .intro-title { transform: none; }
}
