/* AFTERWAVE.FM — shared system. Each page sets its own palette via body[data-theme]. */
:root {
  --font-display: 'Clash Display', 'Arial Narrow', sans-serif;
  --font-body: 'Switzer', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 0.9375rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.375rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 3vw, 3.75rem);
  --text-hero: clamp(3rem, 0.5rem + 9vw, 9rem);
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem; --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem; --space-24: 6rem;
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --maxw: 1320px;
  /* default (home) palette */
  --bg: #0a0718; --bg-2: #130d2a; --surface: #1a1236; --line: rgba(255,255,255,.1);
  --text: #f3eefe; --muted: #a79cc7; --accent: #ff3ea5; --accent-2: #2de2e6; --accent-ink: #12021a;
}
body[data-theme="charts"]  { --bg:#120a04; --bg-2:#1d1108; --surface:#28180b; --line:rgba(255,190,90,.14); --text:#fff3e2; --muted:#c7a983; --accent:#ffb000; --accent-2:#ff5a1f; --accent-ink:#1a0d00; }
body[data-theme="top100"]  { --bg:#060d08; --bg-2:#0b160e; --surface:#112015; --line:rgba(198,255,61,.13); --text:#ecf7e8; --muted:#93ad8f; --accent:#c6ff3d; --accent-2:#3dffb0; --accent-ink:#0b1400; }
body[data-theme="timeline"]{ --bg:#14082a; --bg-2:#1d0f3a; --surface:#27154b; --line:rgba(255,140,120,.15); --text:#fbefff; --muted:#b9a2d6; --accent:#ff6b5b; --accent-2:#ffd166; --accent-ink:#2a0600; }
body[data-theme="videos"]  { --bg:#0d090b; --bg-2:#170f12; --surface:#211519; --line:rgba(255,60,90,.15); --text:#fdeef1; --muted:#b8939b; --accent:#ff2e4d; --accent-2:#ffd4dc; --accent-ink:#1d0207; }
body[data-theme="artists"] { --bg:#03101a; --bg-2:#061a29; --surface:#0b2436; --line:rgba(94,242,255,.14); --text:#e8fbff; --muted:#86aebd; --accent:#5ef2ff; --accent-2:#b48cff; --accent-ink:#001318; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
h1, h2, h3 { margin: 0; line-height: 1.05; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.wrap { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }
.mono { font-family: var(--font-mono); letter-spacing: .02em; }
.kicker { font-family: var(--font-mono); font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .18em; color: var(--accent); }

/* grain overlay */
body::after { content:""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* ---------- header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--bg) 82%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.onair-bar { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--muted); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.onair-bar .wrap { display: flex; gap: var(--space-6); align-items: center; height: 32px; }
.onair-dot { display:inline-flex; align-items:center; gap:.5em; color: var(--text); flex-shrink: 0; }
.onair-dot::before { content:""; width:8px; height:8px; border-radius:50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 0%{ box-shadow:0 0 0 0 color-mix(in oklab, var(--accent) 70%, transparent);} 100%{ box-shadow:0 0 0 10px transparent; } }
.ticker { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker span { display: inline-block; padding-left: 100%; animation: tick 60s linear infinite; }
@keyframes tick { to { transform: translateX(-100%); } }
.clock { flex-shrink: 0; color: var(--text); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: var(--space-4); }
.brand { display: inline-block; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.01em; white-space: nowrap; }
.brand b { color: var(--accent); font-weight: 700; }
.brand small { margin-left: .4em; font-family: var(--font-mono); font-size: .7rem; color: var(--muted); font-weight: 400; letter-spacing: .1em; }
.nav-links { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: .5rem .8rem; border-radius: 999px; text-decoration: none; font-size: var(--text-sm); font-weight: 500; color: var(--muted); transition: color .2s, background .2s; }
.nav-links a:hover { color: var(--text); background: var(--line); }
.nav-links a[aria-current="page"] { color: var(--accent-ink); background: var(--accent); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; }
.nav-toggle span { display:block; width:18px; height:2px; background: var(--text); margin: 4px auto; transition: transform .3s var(--ease); }
@media (max-width: 960px) {
  .nav-toggle { display: block; }
  .nav-links { position: fixed; inset: 97px 0 auto 0; flex-direction: column; background: var(--bg-2); padding: var(--space-4); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .4s var(--ease); z-index: -1; }
  .nav-links.open { transform: none; }
  .nav-links a { padding: .9rem 1rem; font-size: var(--text-base); }
  .clock { display: none; }
}

/* ---------- page hero (interior) ---------- */
.page-hero { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(2rem, 5vw, 4rem); overflow: hidden; border-bottom: 1px solid var(--line); }
.page-hero h1 { font-family: var(--font-display); font-weight: 700; font-size: var(--text-2xl); letter-spacing: -.02em; margin-top: var(--space-3); max-width: 18ch; }
.page-hero p.lede { margin-top: var(--space-4); max-width: 60ch; color: var(--muted); font-size: var(--text-lg); line-height: 1.5; }
.freq-tag { position: absolute; right: -0.05em; bottom: -0.22em; font-family: var(--font-display); font-weight: 700; font-size: clamp(6rem, 22vw, 20rem); line-height: 1; color: transparent; -webkit-text-stroke: 1px var(--line); pointer-events: none; user-select: none; }

/* ---------- common UI ---------- */
.btn { display: inline-flex; align-items: center; gap: .5em; padding: .75rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; font-size: var(--text-sm); font-weight: 600; transition: transform .2s var(--ease), background .2s, border-color .2s; }
.btn:hover { transform: translateY(-2px); border-color: var(--accent); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip { padding: .45rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: var(--text-sm); color: var(--muted); transition: all .2s; white-space: nowrap; }
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.input { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .7rem 1.1rem; color: var(--text); font: inherit; font-size: var(--text-sm); min-width: 0; }
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; padding: var(--space-6) 0; }
.art { aspect-ratio: 1; object-fit: cover; background: var(--surface); width: 100%; }
.eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.eq i { width: 3px; background: var(--accent); animation: eq 1s ease-in-out infinite; }
.eq i:nth-child(2){ animation-delay: -.3s } .eq i:nth-child(3){ animation-delay: -.6s } .eq i:nth-child(4){ animation-delay: -.15s }
@keyframes eq { 0%,100%{ height: 20% } 50%{ height: 100% } }
.empty { padding: var(--space-16) 0; text-align: center; color: var(--muted); }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.site-footer { margin-top: var(--space-24); border-top: 1px solid var(--line); padding: var(--space-12) 0 var(--space-8); color: var(--muted); font-size: var(--text-sm); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-8); }
.footer-grid h4 { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: .15em; text-transform: uppercase; color: var(--text); margin: 0 0 var(--space-3); font-weight: 500; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.footer-grid a { text-decoration: none; } .footer-grid a:hover { color: var(--accent); }
.footer-note { margin-top: var(--space-8); font-size: var(--text-xs); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* modal */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--space-4); background: rgba(0,0,0,.72); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s; }
.modal.open { opacity: 1; pointer-events: auto; }
.modal-card { position: relative; width: min(860px, 100%); max-height: 90vh; overflow: auto; background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; display: grid; grid-template-columns: 1fr 1fr; transform: scale(.96); transition: transform .4s var(--ease); }
.modal.open .modal-card { transform: none; }
.modal-card .art { border-radius: 20px 0 0 20px; height: 100%; }
.modal-body { padding: var(--space-8); display: flex; flex-direction: column; gap: var(--space-3); }
.modal-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); font-size: 1.2rem; z-index: 2; }
@media (max-width: 680px) { .modal-card { grid-template-columns: 1fr; } .modal-card .art { border-radius: 20px 20px 0 0; height: auto; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .reveal { opacity: 1; transform: none; } }
