/* ═══════════════════════════════════════════════════════════════════
   SPELLA — site design system
   Bass Witch of Denver. Near-black violet stage, neon-pink primary,
   royal purple / violet accents, candlelight gold highlights.
   Headings: Cinzel (engraved tarot caps) · Body: Inter ·
   Italic leads: Cormorant Garamond. Fonts are loaded by base.html.
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0a0710;            /* near-black with violet cast */
  --bg-2: #0f0a17;          /* footer, alternate bands, inputs */
  --panel: #150e1f;         /* card fill */
  --panel-2: #1b1228;       /* lighter card fill, tooltips, toasts */
  --line: rgba(230, 230, 230, 0.08);
  --line-strong: rgba(230, 230, 230, 0.15);
  --text: #e6e6e6;          /* bone white — exact tone of the logo art */
  --muted: #a396b5;         /* lavender-gray */
  --faint: #877a99;
  --green: #7ddc3f;         /* poison green — primary accent */
  --green-hi: #9ef060;
  --purple: #9b5cf6;        /* witch purple — ambient */
  --violet: #6d28d9;        /* deep violet */
  --orange: #ff7a2e;        /* pumpkin ember — warm secondary */
  --orange-hi: #ffa04d;
  --ember: #c2571f;         /* deep ember */
  --gold: #d9a441;          /* candlelight — notices, warm highlights */
  --red: #ef4444;           /* errors */
  --grad: linear-gradient(100deg, var(--green-hi), var(--purple) 50%, var(--orange-hi));
  --radius: 14px;
  --radius-lg: 22px;
  --nav-h: 72px;
  --font-display: 'Cinzel', Georgia, serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-accent: 'Cormorant Garamond', Georgia, serif;
}

/* ── Base ────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
/* No global `scroll-behavior: smooth`: it makes every programmatic scroll
   animate, which fights ScrollTrigger's measurements and shows up as the
   page stuttering or jumping mid-scroll. Smooth behaviour is scoped to
   in-page anchor jumps instead, where it's actually wanted. */
html { background: var(--bg); }
html:focus-within { scroll-behavior: auto; }
@media (prefers-reduced-motion: no-preference) {
  html:has(:target) { scroll-behavior: smooth; }
}
html, body { margin: 0; padding: 0; overflow-x: clip; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: rgba(155, 92, 246, 0.45); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  margin: 0 0 0.5em;
  color: var(--text);
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: 0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); font-weight: 600; letter-spacing: 0.01em; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--green-hi); text-decoration: none; transition: color 0.2s; }
a:hover { color: #fff; }
img, svg, canvas { max-width: 100%; display: block; }
iframe { max-width: 100%; }
code, .mono { font-family: 'Cascadia Code', Consolas, 'SF Mono', monospace; }

blockquote {
  margin: 0 0 1em;
  padding-left: 18px;
  border-left: 2px solid rgba(217, 164, 65, 0.5);
  font-family: var(--font-accent);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--muted);
}

/* ── Layout atoms ────────────────────────────────────────────────── */
.wrap { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 96px 0; position: relative; }
.section.tight { padding: 56px 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-size: 0.8rem; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ''; width: 26px; height: 2px; flex: none;
  background: var(--grad); border-radius: 2px;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.lead {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--muted);
  max-width: 62ch;
}

.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.two-col { display: grid; grid-template-columns: 1fr 340px; gap: 44px; align-items: start; }

/* Full-bleed alternate band (upcoming-ritual strip on home) */
.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ── Chips ───────────────────────────────────────────────────────── */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  font-size: 0.85rem; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--panel);
}
.chip.on {
  border-color: rgba(125, 220, 63, 0.5); color: var(--green-hi);
  background: rgba(125, 220, 63, 0.07);
}

/* ── Steps (numbered ritual list, gradient circle numbers) ───────── */
.steps {
  counter-reset: step; list-style: none;
  display: flex; flex-direction: column; gap: 0;
  margin: 0; padding: 0;
}
.step { counter-increment: step; position: relative; padding: 0 0 30px 64px; }
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(140deg, rgba(125, 220, 63, 0.92), rgba(155, 92, 246, 0.92));
  box-shadow: 0 6px 20px rgba(155, 92, 246, 0.25);
}
.step::after {
  content: ''; position: absolute; left: 22px; top: 50px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--line-strong), transparent);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::after { display: none; }
.step h3 { margin-bottom: 4px; font-size: 1.05rem; }
.step p { color: var(--muted); font-size: 0.95rem; margin-bottom: 0; }

/* ── Notice (gold left-border note) ──────────────────────────────── */
.notice {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: var(--panel); border-radius: 12px; padding: 15px 19px;
  color: var(--muted); font-size: 0.95rem; margin-bottom: 14px;
}
.notice a { color: var(--gold); }
.notice a:hover { color: #fff; }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 0.92rem;
  letter-spacing: 0.08em;
  padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap; line-height: 1;
  transition: box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
  /* transform intentionally NOT transitioned — GSAP owns it (magnetic effect) */
}

/* The resting AND hover gradients each live on their own pseudo-element.
   Painted directly on the button, GSAP's magnetic transform promotes the
   element to a GPU layer (inside a backdrop-filter ancestor) and Chromium
   mis-rasterizes the gradient at the pill's caps — thin bars of the wrong
   end's colour. On a pseudo the gradient is painted and clipped in its own
   box, which sidesteps it. inset:-1px covers the .btn transparent border
   area a border-box background would have filled. Hover = opacity
   crossfade to the purple→violet gradient, never a background animation. */
.btn-primary {
  background: none; color: #fff;
  position: relative; z-index: 0;
  box-shadow: 0 8px 30px rgba(125, 220, 63, 0.35);
}
.btn-primary::after {
  content: ''; position: absolute; inset: -1px; z-index: -2;
  border-radius: inherit;
  background: var(--grad);
}
.btn-primary::before {
  content: ''; position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit;
  background: linear-gradient(100deg, var(--purple), var(--violet) 60%, var(--purple));
  opacity: 0; transition: opacity 0.25s;
}
.btn-primary:hover { color: #fff; box-shadow: 0 10px 38px rgba(155, 92, 246, 0.45); }
.btn-primary:hover::before { opacity: 1; }

.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover {
  border-color: var(--green-hi); color: #fff;
  background: rgba(125, 220, 63, 0.07);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-dark { background: var(--panel-2); color: var(--text); border-color: var(--line); }
.btn-dark:hover { border-color: var(--line-strong); color: #fff; }

.btn-sm { padding: 9px 18px; font-size: 0.8rem; }
.btn-lg { padding: 16px 34px; font-size: 1.02rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ── Liquid glass ────────────────────────────────────────────────── */
.glass {
  background: rgba(21, 14, 31, 0.42);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  border: 1px solid rgba(230, 230, 230, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(230, 230, 230, 0.12),
    0 24px 70px rgba(0, 0, 0, 0.45);
  border-radius: 28px;
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.site-nav {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background 0.35s, border-color 0.35s, backdrop-filter 0.35s;
}
.site-nav.scrolled {
  background: rgba(12, 8, 18, 0.55);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border-bottom-color: var(--line);
}
.nav-inner {
  display: flex; align-items: center; gap: 28px;
  width: min(1280px, calc(100% - 48px)); margin: 0 auto;
}
.nav-logo { display: flex; align-items: center; flex: none; padding: 10px 6px; margin: -10px -6px; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; gap: 26px; margin-inline: auto; }
.nav-links a {
  color: var(--muted); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 2px; position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--grad); transition: right 0.25s ease; border-radius: 2px;
}

/* Nav letters catch fire under the cursor. main.js sets --heat per glyph
   (0 cool → 1 blazing); every property below is driven off that single
   number, so with no JS the letters just render as ordinary text. */
.nav-char {
  display: inline-block;
  --heat: 0;
  /* Cool → white-hot: the glyph itself goes pale gold, while the shadows
     stack a candle core, an orange body, and a red outer lick above it. */
  color: color-mix(in srgb, #fff6d5 calc(var(--heat) * 100%), currentColor);
  transform: translateY(calc(var(--heat) * -4px))
             scale(calc(1 + var(--heat) * 0.18));
  text-shadow:
    0 0 calc(var(--heat) * 10px) rgba(255, 226, 150, var(--heat)),
    0 calc(var(--heat) * -5px)  calc(var(--heat) * 14px) rgba(255, 160, 77, calc(var(--heat) * 0.95)),
    0 calc(var(--heat) * -11px) calc(var(--heat) * 24px) rgba(255, 122, 46, calc(var(--heat) * 0.7)),
    0 calc(var(--heat) * -18px) calc(var(--heat) * 34px) rgba(255, 59, 48, calc(var(--heat) * 0.45));
}
@media (prefers-reduced-motion: reduce) {
  .nav-char { transform: none; }
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after, .nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 14px; flex: none; }

/* Burger — hidden on desktop. Works with either a glyph or three <span>
   bars inside the button. */
.burger {
  display: none; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none; padding: 0;
  background: rgba(21, 14, 31, 0.6); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 12px;
  font-size: 1.1rem; cursor: pointer; line-height: 0.9;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.burger:hover {
  border-color: var(--green-hi); color: var(--green-hi);
  background: rgba(21, 14, 31, 0.8);
}
.burger:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155, 92, 246, 0.18);
}
.burger span {
  display: inline-block; width: auto; height: auto;
  background: none; color: currentColor; padding: 0; margin: 0;
}
.burger span + span { margin-top: 5px; }

/* Mobile menu — dropdown panel under the bar; JS toggles .open and
   animates links in with autoAlpha + y. */
#mobile-menu {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 59;
  background: rgba(12, 8, 18, 0.92);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  border-bottom: 1px solid var(--line);
  padding: 10px 24px 24px;
}
#mobile-menu.open { display: block; }
#mobile-menu a {
  display: block; padding: 14px 2px;
  color: var(--text); font-family: var(--font-display);
  font-size: 0.95rem; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid var(--line);
}
#mobile-menu a:hover { color: var(--green-hi); }
#mobile-menu a:last-of-type { border-bottom: 0; }
#mobile-menu .btn { display: inline-flex; width: 100%; margin-top: 14px; border-bottom: 0; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
  .burger { display: inline-flex; }
}

/* ── Hero (home) ─────────────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 28px) 0 56px;
}
#hero3d {
  position: absolute; inset: 0; z-index: 0;
  /* Brand gradient behind / instead of the particle summoning
     (loading + no-WebGL fallback) */
  background:
    radial-gradient(70% 80% at 30% 30%, rgba(155, 92, 246, 0.25), transparent 60%),
    radial-gradient(70% 80% at 75% 60%, rgba(125, 220, 63, 0.25), transparent 60%),
    var(--bg);
}
#hero3d canvas { width: 100%; height: 100%; display: block; }
.hero-vignette {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 45%, transparent 0%, rgba(10, 7, 16, 0.25) 62%, var(--bg) 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 22%);
}
.hero .wrap {
  position: relative; z-index: 2;
  display: flex; justify-content: center;
}
.hero-glass {
  width: 100%; max-width: 820px;
  padding: clamp(28px, 4vw, 52px);
  text-align: center;
}
.hero-glass h1 { text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45); margin-inline: auto; }
.hero-glass .lead { margin: 14px auto 30px; max-width: 52ch; }
.hero-glass .btn { margin: 6px 7px 0; }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.85rem; letter-spacing: 0.02em; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 7px 16px; margin-bottom: 26px;
  background: rgba(15, 10, 23, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.kicker-dot {
  width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: kicker-pulse 2.4s ease-in-out infinite;
}
@keyframes kicker-pulse {
  0%, 100% { box-shadow: 0 0 6px var(--gold), 0 0 0 0 rgba(217, 164, 65, 0.45); }
  50%      { box-shadow: 0 0 12px var(--gold), 0 0 0 7px rgba(217, 164, 65, 0); }
}

.hero-wordmark {
  width: 100%; max-width: min(520px, 80%);
  height: auto; margin: 6px auto 24px;
  filter: drop-shadow(0 0 24px rgba(155, 92, 246, 0.35));
}

/* ── Page hero (subpages) ────────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 64px) 0 24px;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -220px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 480px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(155, 92, 246, 0.15), transparent);
  pointer-events: none;
}
.page-hero .wrap { position: relative; }
.page-hero h1 { max-width: 20ch; }
.page-hero .lead { margin-top: 4px; }
.page-hero + .wrap .section:first-child { padding-top: 48px; }

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; position: relative; overflow: hidden;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.card:hover {
  border-color: rgba(125, 220, 63, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.95rem; }

/* Cursor-tracking glow — a <span class="card-glow"> placed FIRST inside
   the card; JS feeds --mx / --my. */
.card-glow {
  position: absolute; inset: -1px; border-radius: inherit;
  opacity: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
              rgba(155, 92, 246, 0.16), transparent 55%);
  transition: opacity 0.3s;
}
.card:hover .card-glow,
.mix-card:hover .card-glow,
.mix-link-card:hover .card-glow { opacity: 1; }

/* Whole-card anchor tiles (relics) */
.tile-link { display: block; color: inherit; cursor: pointer; }
.tile-link:hover { color: inherit; }
.tile-link h3 { transition: color 0.25s; }
.tile-link:hover h3 { color: var(--green-hi); }

/* The stats band is lifted into the hero's lower third: the full-height
   hero left a dead strip under the copy panel, and stacked section padding
   doubled it. Overlapping turns that gap into a deliberate layer, with the
   glass band floating over the summoning rings. */
.stats-section {
  margin-top: clamp(-120px, -9vh, -60px);
  padding-top: 0; padding-bottom: 20px;
  position: relative; z-index: 2;
}
.stats-section + .section { padding-top: 44px; }
@media (max-width: 640px) {
  .stats-section { margin-top: -40px; }
}

/* Release artwork. Link-out cards (Spotify and friends) carry no embed, so
   the cover does the work the player's artwork does on SoundCloud cards. */
.mix-art {
  width: 100%; height: auto !important;
  aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel-2); margin-bottom: 16px;
  transition: transform 0.35s ease, border-color 0.35s;
}
.tile-link:hover .mix-art {
  transform: scale(1.02);
  border-color: rgba(125, 220, 63, 0.35);
}
/* Compact archive rows: a small square thumb beside the title. */
.mix-art-thumb {
  width: 54px; height: 54px !important; flex: none;
  object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); background: var(--panel-2);
  float: left; margin: 0 14px 8px 0;
}

/* Relic product photography — square crop, soft frame, gentle lift on hover.
   height:auto !important beats the width/height attributes in every cascade,
   so a stale stylesheet is the only way these can ever distort. */
.relic-img {
  width: 100%; height: auto !important;
  aspect-ratio: 1 / 1; object-fit: cover;
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel-2); margin-bottom: 18px;
  transition: transform 0.35s ease, border-color 0.35s;
}
.tile-link:hover .relic-img {
  transform: scale(1.025);
  border-color: rgba(125, 220, 63, 0.35);
}

/* ── Shows ───────────────────────────────────────────────────────── */
.show-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px;
  padding: 18px 2px; border-bottom: 1px solid var(--line);
}
.show-date {
  font-family: 'Cascadia Code', Consolas, 'SF Mono', monospace;
  font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); flex: none; min-width: 112px;
}
.show-name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text); }
.show-name a { color: inherit; }
.show-name a:hover { color: var(--green-hi); }
.show-venue { color: var(--muted); font-size: 0.92rem; }
.show-line .btn { margin-left: auto; }
.show-line.past .show-date { color: var(--faint); }
.show-line.past .show-name { color: var(--muted); font-weight: 500; }
.show-line.past .show-venue { color: var(--faint); }

.show-badge {
  display: inline-flex; align-items: center; flex: none;
  font-size: 0.66rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  font-family: var(--font-body); line-height: 1;
  color: var(--gold); background: rgba(217, 164, 65, 0.08);
  border: 1px solid rgba(217, 164, 65, 0.45); border-radius: 999px;
  padding: 4px 10px;
  vertical-align: middle; margin-left: 6px; position: relative; top: -1.5px;
}

/* ── Music / mixes ───────────────────────────────────────────────── */
.mix-card {
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.mix-card:hover {
  border-color: rgba(125, 220, 63, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}
.mix-card h3 { margin: 0; }

.mix-embed {
  position: relative; aspect-ratio: 16 / 9;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  overflow: hidden; background: var(--bg-2);
}
.mix-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; display: block;
}

.mix-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  color: var(--muted); font-size: 0.85rem;
}
.mix-meta .chip { font-size: 0.7rem; padding: 4px 10px; letter-spacing: 0.08em; text-transform: uppercase; }

/* Link-out card (no embed): big title + arrow affordance */
.mix-link-card {
  display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px 26px; position: relative; overflow: hidden;
  color: var(--text);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}
.mix-link-card:hover {
  color: var(--text);
  border-color: rgba(125, 220, 63, 0.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
}
.mix-link-card h3 { margin: 0; transition: color 0.25s; }
.mix-link-card:hover h3 { color: var(--green-hi); }
.mix-link-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }

/* ── Tarot cards (coven) ─────────────────────────────────────────── */
.tarot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }

.tarot-card {
  position: relative; aspect-ratio: 3 / 5;
  perspective: 1000px; cursor: pointer;
  -webkit-user-select: none; user-select: none;
}
.tarot-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0.05, 0.2, 1);
  will-change: transform;
}
.tarot-card.flipped .tarot-inner { transform: rotateY(180deg); }
.tarot-card:not(.flipped):hover .tarot-inner,
.tarot-card:not(.flipped):focus-visible .tarot-inner { transform: rotateY(-10deg); }

.tarot-front, .tarot-back {
  position: absolute; inset: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 26px; text-align: center;
}

/* Front — ornate back-of-card: 2px gradient frame (padding-box trick),
   inner hairline frames, repeating star-dot field, emblem watermark
   (the <img> is supplied by the template). */
.tarot-front {
  border: 2px solid transparent;
  background:
    radial-gradient(120% 85% at 50% 0%, rgba(155, 92, 246, 0.16), transparent 55%) padding-box,
    linear-gradient(165deg, var(--panel-2), var(--panel)) padding-box,
    var(--grad) border-box;
  font-family: var(--font-display); font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.tarot-front::before {
  content: ''; position: absolute; inset: 10px;
  border: 1px solid rgba(230, 230, 230, 0.14);
  border-radius: calc(var(--radius-lg) - 8px);
  background-image: radial-gradient(rgba(230, 230, 230, 0.13) 1px, transparent 1.6px);
  background-size: 26px 26px; background-position: 13px 13px;
  pointer-events: none;
}
.tarot-front::after {
  content: ''; position: absolute; inset: 17px;
  border: 1px solid rgba(155, 92, 246, 0.28);
  border-radius: calc(var(--radius-lg) - 12px);
  pointer-events: none;
}
.tarot-front img {
  width: 54%; max-width: 190px; height: auto;
  opacity: 0.5; margin-bottom: 16px;
  filter: drop-shadow(0 0 18px rgba(155, 92, 246, 0.45));
}
.tarot-front p { margin: 0; }

/* Back — the revealed event */
.tarot-back {
  transform: rotateY(180deg);
  background:
    radial-gradient(90% 55% at 50% 0%, rgba(125, 220, 63, 0.12), transparent 60%),
    linear-gradient(170deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  gap: 6px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}
.tarot-back .eyebrow { margin-bottom: 2px; }
.tarot-back h3 { font-size: 1.3rem; margin: 0 0 2px; }
.tarot-back p { color: var(--muted); font-size: 0.9rem; margin: 0; }
.tarot-back .show-badge { margin-bottom: 6px; }
.tarot-back .btn { margin-top: 14px; }

/* ── CTA band (gradient frame around a dark panel) ───────────────── */
.cta-band { border-radius: var(--radius-lg); padding: 2px; background: var(--grad); }
.cta-band-inner {
  border-radius: calc(var(--radius-lg) - 2px);
  background: var(--bg-2);
  padding: 58px 40px; text-align: center;
}
.cta-band-inner .lead,
.cta-band-inner p { margin-inline: auto; max-width: 52ch; }
.cta-band-inner .btn { margin: 8px 7px 0; }

/* ── Stats band ──────────────────────────────────────────────────── */
.stats-band {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 14px 18px;
}
.stat { text-align: center; padding: 28px 10px; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.stat-label { color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

/* ── Forms ───────────────────────────────────────────────────────── */
.form-card {
  max-width: 560px;
  background: rgba(21, 14, 31, 0.55);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(230, 230, 230, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(230, 230, 230, 0.08), 0 18px 50px rgba(0, 0, 0, 0.4);
  padding: 34px; overflow: hidden;
}
.form-card h2 { margin-bottom: 20px; }
.form-card .btn { margin-top: 6px; }

.form-field { margin-bottom: 18px; min-width: 0; }
.form-field label {
  display: block; font-size: 0.85rem; font-weight: 600;
  letter-spacing: 0.04em; margin-bottom: 7px; color: var(--text);
}
.form-field input, .form-field select, .form-field textarea {
  width: 100%; padding: 12px 15px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-2); color: var(--text);
  font-size: 0.98rem; font-family: var(--font-body);
  color-scheme: dark;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box; max-width: 100%;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155, 92, 246, 0.18);
}
.form-field textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
/* Date inputs keep an intrinsic width from their internal mm/dd/yyyy UI and
   refuse to shrink on narrow screens — flatten that so they behave like
   every other field. The picker icon also gets brightened for the dark bg. */
.form-field input[type="date"] {
  min-width: 0; display: block;
  -webkit-appearance: none; appearance: none;
  /* appearance:none collapses the internal datetime-edit box on mobile —
     pin the height to exactly what the sibling text inputs compute to
     (12px padding ×2 + ~19px 'normal' line box + 2px border = 45px). */
  height: 45px; line-height: normal;
}
.form-field input[type="date"]::-webkit-datetime-edit {
  overflow: hidden; display: inline-flex; align-items: center;
}
.form-field input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(0.85) sepia(0.1);
  cursor: pointer;
}
/* Custom select dropdown (witch-themed with GSAP animations) */
.form-field select { display: none; }
.custom-select-wrapper {
  position: relative; display: inline-block; width: 100%;
}
.custom-select-button {
  width: 100%; padding: 12px 15px;
  border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--bg-2); color: var(--text);
  font-family: inherit; font-size: inherit;
  cursor: pointer; text-align: left;
  display: flex; align-items: center; justify-content: space-between;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.custom-select-button:hover { border-color: var(--purple); }
.custom-select-button:focus { outline: none; border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(155, 92, 246, 0.18); }
.custom-select-button::after {
  content: ''; display: block; width: 12px; height: 8px; flex: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23a396b5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-size: contain;
  transition: transform 0.3s ease;
  margin-left: 12px;
}
.custom-select-button.open::after { transform: scaleY(-1); }
.custom-select-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; margin-top: 6px;
  background: var(--bg-2); border: 1px solid var(--line-strong);
  border-radius: 12px; overflow: hidden; list-style: none; margin: 0; padding: 0;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  z-index: 1000; opacity: 0; visibility: hidden; pointer-events: none;
  transform-origin: top; transform: scaleY(0.95);
}
.custom-select-dropdown.open {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: scaleY(1);
}
.custom-select-option {
  padding: 14px 15px; cursor: pointer; color: var(--text);
  border-bottom: 1px solid var(--line);
  transition: background-color 0.15s, color 0.15s;
}
.custom-select-option:last-child { border-bottom: none; }
.custom-select-option:hover { background: rgba(125, 220, 63, 0.12); color: var(--green-hi); }
.custom-select-option.selected {
  background: rgba(155, 92, 246, 0.2); color: var(--green-hi); font-weight: 600;
}
.form-field ::placeholder { color: var(--faint); opacity: 1; }
.form-field .helptext { display: block; color: var(--faint); font-size: 0.8rem; margin-top: 6px; }

.errorlist {
  list-style: none; margin: 6px 0 0; padding: 0;
  color: var(--red); font-size: 0.85rem;
}
.errorlist li { margin: 2px 0; }

/* ── SoundCloud shuffle orb ──────────────────────────────────────── */
#sc-player {
  position: fixed; bottom: 0; right: 0; width: 2px; height: 2px;
  opacity: 0; pointer-events: none; overflow: hidden;
}
#sc-player iframe { width: 2px; height: 2px; border: 0; }

#sc-orb {
  position: fixed; bottom: 22px; right: 22px; z-index: 185;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(21, 14, 31, 0.55);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(230, 230, 230, 0.1);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
#sc-orb:hover {
  border-color: rgba(125, 220, 63, 0.55);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.55), 0 0 24px rgba(125, 220, 63, 0.28),
              inset 0 1px 0 rgba(230, 230, 230, 0.12);
  transform: translateY(-2px);
}
#sc-orb .sc-ic { width: 20px; height: 20px; fill: var(--text); }
#sc-orb .sc-ic-play { margin-left: 2px; }
#sc-orb .sc-ic-pause { display: none; }
#sc-orb.is-playing .sc-ic-play { display: none; }
#sc-orb.is-playing .sc-ic-pause { display: block; }
#sc-orb.is-playing {
  border-color: rgba(125, 220, 63, 0.6);
  animation: orb-pulse 2.4s ease-in-out infinite;
}
#sc-orb.is-loading .sc-ic { opacity: 0.4; }
@keyframes orb-pulse {
  0%, 100% { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 18px rgba(125, 220, 63, 0.25); }
  50%      { box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 34px rgba(125, 220, 63, 0.5); }
}
#sc-orb[hidden] { display: none; }

/* Mini "now playing" card — conjured on play, banished on pause. */
#sc-mini {
  position: fixed; bottom: 90px; right: 22px; z-index: 184;
  display: flex; align-items: center; gap: 12px;
  width: min(340px, calc(100vw - 44px));
  padding: 12px 14px; border-radius: 18px; overflow: hidden;
  background: rgba(21, 14, 31, 0.6);
  backdrop-filter: blur(24px) saturate(145%);
  -webkit-backdrop-filter: blur(24px) saturate(145%);
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(230, 230, 230, 0.1);
}
#sc-mini[hidden] { display: none; }
#sc-mini-bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#sc-mini-art {
  position: relative; flex: none; width: 54px; height: 54px;
  border-radius: 12px; border: 1px solid var(--line);
  object-fit: cover; background: var(--panel);
}
#sc-mini-art[src=''] { visibility: hidden; }
.sc-mini-meta { position: relative; min-width: 0; flex: 1; display: grid; gap: 1px; }
.sc-mini-eyebrow {
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--green);
}
#sc-mini-title {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-mini-artist { font-size: 0.78rem; color: var(--muted); }
.sc-mini-eq { position: relative; flex: none; display: flex; align-items: flex-end; gap: 3px; height: 18px; }
.sc-mini-eq i { width: 3px; height: 6px; border-radius: 2px; background: var(--grad); }
#sc-next {
  position: relative; flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(230, 230, 230, 0.06); border: 1px solid var(--line);
  transition: border-color 0.25s, background 0.25s;
}
#sc-next:hover { border-color: rgba(125, 220, 63, 0.55); background: rgba(125, 220, 63, 0.1); }
#sc-next svg { width: 15px; height: 15px; fill: var(--text); }

@media (max-width: 640px) {
  #sc-orb { bottom: 16px; right: 16px; width: 50px; height: 50px; }
  #sc-mini { bottom: 78px; right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  #sc-orb.is-playing { animation: none; }
}

/* ── Themed tooltips (tooltips.js) ───────────────────────────────── */
.spell-tip {
  position: fixed; z-index: 210; max-width: 280px;
  padding: 8px 13px; border-radius: 10px;
  background: rgba(27, 18, 40, 0.94);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line-strong);
  color: var(--text); font-size: 0.78rem; line-height: 1.45;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 18px rgba(125, 220, 63, 0.07),
              inset 0 1px 0 rgba(230, 230, 230, 0.08);
  pointer-events: none;
  opacity: 0; transform: translateY(5px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}
.spell-tip.below { transform: translateY(-5px); }
.spell-tip.show { opacity: 1; transform: none; }
.spell-tip::after {
  content: ''; position: absolute; width: 9px; height: 9px;
  left: var(--tip-arrow-x, 50%); bottom: -5px;
  margin-left: -4.5px; transform: rotate(45deg);
  background: rgba(27, 18, 40, 0.94);
  border-right: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong);
}
.spell-tip.below::after {
  bottom: auto; top: -5px;
  border-right: 0; border-bottom: 0;
  border-left: 1px solid var(--line-strong); border-top: 1px solid var(--line-strong);
}
@media (prefers-reduced-motion: reduce) {
  .spell-tip { transition: none; }
}

/* ── Toasts ──────────────────────────────────────────────────────── */
.toast-stack {
  position: fixed; bottom: 94px; right: 22px; z-index: 190;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  background: rgba(27, 18, 40, 0.72);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--purple);
  border-radius: 999px;
  color: var(--text); font-size: 0.93rem;
  padding: 13px 22px;
  box-shadow: inset 0 1px 0 rgba(230, 230, 230, 0.08), 0 14px 40px rgba(0, 0, 0, 0.5);
  max-width: 380px;
}
.toast.success { border-left-color: var(--gold); }
.toast.error { border-left-color: var(--red); }

/* ── Footer ──────────────────────────────────────────────────────── */
.site-footer {
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  padding: 56px 0 34px;
  position: relative;
}
.moon-divider {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  color: var(--faint); margin-bottom: 44px;
}
.moon-divider::before, .moon-divider::after {
  content: ''; height: 1px; flex: 1; max-width: 220px;
}
.moon-divider::before { background: linear-gradient(to right, transparent, var(--line-strong)); }
.moon-divider::after { background: linear-gradient(to left, transparent, var(--line-strong)); }
.moon-divider svg { width: 18px; height: 18px; flex: none; opacity: 0.9; }

.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.foot-grid img { height: 28px; width: auto; margin-bottom: 14px; opacity: 0.9; }
.site-footer h4 {
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--faint);
  margin: 0 0 10px;
}
.site-footer a { display: block; color: var(--muted); font-size: 0.93rem; padding: 4px 0; }
.site-footer a:hover { color: var(--text); }
.site-footer p { color: var(--faint); font-size: 0.9rem; max-width: 36ch; }

.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; flex-wrap: wrap;
  color: var(--faint); font-size: 0.82rem;
  border-top: 1px solid var(--line);
  margin-top: 44px; padding-top: 22px;
}
.foot-bottom a { display: inline; padding: 0; color: var(--faint); }
.foot-bottom a:hover { color: var(--muted); }

/* ── Scroll progress ─────────────────────────────────────────────── */
#scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120;
  background: var(--grad);
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* ── Custom cursor: the wand (desktop only; JS drives position) ────
   The fast element (#cursor-dot) is drawn as a little wand whose gold
   star tip sits exactly at the pointer; the lagging element
   (#cursor-ring) is a soft magic glow trailing the tip. JS logic is
   untouched — this is a pure reskin of the two tracked elements. */
#cursor-dot, #cursor-ring {
  position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
  will-change: transform;
  opacity: 0;   /* hidden until JS takes over (CDN-failure guard) */
}
html.cursor-ready #cursor-dot, html.cursor-ready #cursor-ring { opacity: 1; }
/* Once the wand is live, banish the system cursor everywhere. Interactive
   affordance comes from the wand glow's hover flare instead. (Iframes keep
   their own cursor; we can't reach inside them.) */
@media (hover: hover) and (pointer: fine) {
  html.cursor-ready body, html.cursor-ready body * { cursor: none !important; }
}
#cursor-dot {
  width: 34px; height: 34px;
  /* star tip drawn at (8,8) of a 34px box; margins shift it onto the
     pointer, which JS centers at (17,17). */
  margin-left: 9px; margin-top: 9px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 34'%3E%3Cpath d='M13.4 13.4 L30.5 30.5' stroke='%23e6e6e6' stroke-width='3.6' stroke-linecap='round'/%3E%3Cpath d='M14.6 14.6 L29.4 29.4' stroke='%23a58bd4' stroke-width='1.1' stroke-linecap='round' opacity='0.6'/%3E%3Cpath d='M8 1.6 L9.7 6.3 L14.4 8 L9.7 9.7 L8 14.4 L6.3 9.7 L1.6 8 L6.3 6.3 Z' fill='%23ffd76a'/%3E%3Ccircle cx='8' cy='8' r='1.4' fill='%23fff3cf'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255, 215, 106, 0.55));
}
#cursor-ring {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle, rgba(125, 220, 63, 0.4), rgba(125, 220, 63, 0.12) 55%, transparent 72%);
  transition: width 0.25s, height 0.25s, background 0.3s;
}
#cursor-ring.is-hover {
  width: 44px; height: 44px;
  background: radial-gradient(circle, rgba(155, 92, 246, 0.5), rgba(155, 92, 246, 0.14) 55%, transparent 72%);
}
@media (pointer: coarse) {
  #cursor-dot, #cursor-ring { display: none !important; }
}

/* ── Film grain ──────────────────────────────────────────────────── */
body::after {
  content: ''; position: fixed; inset: -50%; z-index: 150; pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Hidden native scrollbar ───────────────────────────────────────
   The page still scrolls normally — only the visual bar is gone; the
   gradient #scroll-progress strip carries the position feedback. */
html {
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* legacy Edge/IE */
}
html::-webkit-scrollbar { width: 0; height: 0; display: none; }

/* ── Focus visibility (keyboard users) ───────────────────────────── */
:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
  /* no border-radius override — it would square off pill buttons */
}

/* ── Reveal initial states (JS-gated so no-JS users see everything)
   The [data-revealed] override matters: reveal tweens clearProps on
   completion (so hover transforms get a clean element), and without it
   the base hidden rule would re-apply and blank the element again. ── */
html.js .reveal { opacity: 0; transform: translateY(28px); }
html.js .reveal-l { opacity: 0; transform: translateX(-36px); }
html.js .reveal-r { opacity: 0; transform: translateX(36px); }
html.js .reveal[data-revealed], html.js .reveal-l[data-revealed],
html.js .reveal-r[data-revealed] { opacity: 1; transform: none; }

/* SplitText line-mask helper (main.js wraps split lines in these) */
.split-line-mask { overflow: hidden; display: block; }

/* ── Page background canvas + readability frosting ─────────────────
   Subpages carry a themed <canvas id="page-bg"> behind the content.
   The html element holds the page colour so the fixed canvas can sit
   at z-index -1 beneath a transparent body; a radial mask dims the
   animation behind the reading column; key panels go translucent +
   blurred so the scene glows through their edges. */
html:has(#page-bg) { background: var(--bg); }
body:has(#page-bg) { background: transparent; }

#page-bg {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
  pointer-events: none;
  -webkit-mask-image: radial-gradient(58% 46% at 50% 40%, rgba(0, 0, 0, 0.35), #000 70%);
  mask-image: radial-gradient(58% 46% at 50% 40%, rgba(0, 0, 0, 0.35), #000 70%);
}

body:has(#page-bg) .card,
body:has(#page-bg) .form-card,
body:has(#page-bg) .notice,
body:has(#page-bg) .mix-card,
body:has(#page-bg) .mix-link-card {
  background: rgba(21, 14, 31, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
body:has(#page-bg) .steps {
  background: rgba(21, 14, 31, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-radius: var(--radius);
  padding: 20px;
}

/* ── Overflow safety ─────────────────────────────────────────────── */
/* Grid/flex children may not shrink below content size without this */
.grid > *, .grid-2 > *, .grid-3 > *, .two-col > *, .foot-grid > *,
.stats-band > *, .tarot-grid > *, .nav-inner > *, .show-line > *,
.mix-meta > *, .chips > * { min-width: 0; }

/* Long tokens (URLs, lineups, track titles) must break, not overflow */
p, li, td, th, h1, h2, h3, h4,
.chip, .notice, .lead, .show-name, .show-venue, .stat-label, .toast {
  overflow-wrap: break-word;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .tarot-grid { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section.tight { padding: 44px 0; }
  .wrap { width: calc(100% - 32px); }

  /* Pill buttons: let long labels wrap instead of forcing overflow */
  .btn { white-space: normal; text-align: center; }
  .hero-glass { padding: 24px 18px; border-radius: 20px; }
  .hero-glass .btn { width: 100%; margin: 10px 0 0; }
  .hero-wordmark { max-width: min(420px, 88%); }

  .grid-3, .tarot-grid { grid-template-columns: 1fr; }
  .tarot-card { max-width: 340px; width: 100%; margin-inline: auto; }

  .show-line { gap: 4px 14px; }
  .show-date { width: 100%; min-width: 0; }
  .show-line .btn { margin-left: 0; margin-top: 8px; }

  .cta-band-inner { padding: 44px 22px; }
  .cta-band-inner .btn { margin: 10px 0 0; width: 100%; }

  .form-card { padding: 26px 20px; }

  .nav-cta { gap: 10px; }
  .nav-cta .btn { padding: 9px 16px; font-size: 0.78rem; }
  .burger { width: 40px; height: 40px; }

  .toast-stack { left: 16px; right: 16px; align-items: stretch; }
  .toast { max-width: none; border-radius: 18px; }

  .moon-divider::before, .moon-divider::after { max-width: 60px; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
}

/* ── Reduced motion: kill the fancy stuff ────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal, html.js .reveal-l, html.js .reveal-r { opacity: 1; transform: none; }
  .kicker-dot { animation: none; }
  .tarot-inner { transition: none; }
  .tarot-card:not(.flipped):hover .tarot-inner,
  .tarot-card:not(.flipped):focus-visible .tarot-inner { transform: none; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
