/* Dead Air — wasteland radio player. Dark, ember, rust. No frameworks, no webfonts. */

:root {
  --bg: #0b0906;
  --bg2: #141009;
  --ink: #d8cfc0;
  --ink-dim: #8f8474;
  --ember: #ff6b1a;
  --ember-hot: #ffa53d;
  --rust: #b34a12;
  --blood: #e03131;
  --panel: #171208;
  --line: #2c2113;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(1200px 500px at 50% -10%, rgba(255, 107, 26, 0.07), transparent 60%),
    radial-gradient(900px 600px at 50% 110%, rgba(179, 74, 18, 0.05), transparent 60%);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}

/* film grain — pure CSS/SVG, no image files */
.grain {
  position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.07;
  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'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

.scanlines {
  position: fixed; inset: 0; z-index: 51; pointer-events: none; opacity: 0.05;
  background: repeating-linear-gradient(0deg, #000 0 1px, transparent 1px 3px);
}

/* ---------- hero ---------- */

.hero {
  text-align: center;
  padding: 3.5rem 1.25rem 2.5rem;
  position: relative;
  isolation: isolate;
}
/* wasteland backdrop — the dead broadcast tower, kept subtle so text stays readable */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: url("img/hero-tower.webp?v=20261001b") center 32% / cover no-repeat;
  opacity: 0.38;
  -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 98%);
  mask-image: linear-gradient(180deg, #000 50%, transparent 98%);
}

.status-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line);
  padding: 0.35rem 0.9rem; border-radius: 999px;
  font-size: 0.75rem; letter-spacing: 0.25em; font-weight: 700;
  background: rgba(0, 0, 0, 0.45);
  margin-bottom: 1.75rem;
}
.status-badge .dot {
  width: 0.6rem; height: 0.6rem; border-radius: 50%;
  background: var(--blood);
  box-shadow: 0 0 8px var(--blood);
  animation: blink 1.6s infinite;
}
.status-badge.live { color: var(--ember-hot); border-color: var(--rust); }
.status-badge.live .dot { background: var(--ember); box-shadow: 0 0 10px var(--ember); animation: none; }
.status-badge.offline { color: #c96a5a; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

.station-name {
  font-family: "Arial Black", "Helvetica Neue", Impact, Haettenschweiler, sans-serif;
  font-weight: 900;
  font-size: clamp(4.5rem, 20vw, 11rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  color: var(--ember);
  text-shadow:
    0 0 34px rgba(255, 107, 26, 0.45),
    0 4px 0 rgba(120, 40, 5, 0.9),
    0 8px 24px rgba(0, 0, 0, 0.8);
  transform: skew(-2deg);
  user-select: none;
}

.tagline {
  margin-top: 1.25rem;
  color: var(--ink-dim);
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  letter-spacing: 0.04em;
}

/* ---------- player ---------- */

main { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem 3rem; }

.player {
  background: linear-gradient(180deg, var(--panel), #100c06);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 107, 26, 0.08);
}

.play-btn {
  width: 6.5rem; height: 6.5rem; border-radius: 50%;
  border: 2px solid rgba(255, 165, 61, 0.55);
  background: radial-gradient(circle at 35% 30%, #ff8b3d, var(--rust) 70%, #5e2404);
  color: #140b02;
  font-size: 2.4rem; line-height: 1;
  cursor: pointer;
  box-shadow: 0 0 34px rgba(255, 107, 26, 0.4), 0 10px 26px rgba(0, 0, 0, 0.6);
  transition: transform 0.12s ease, box-shadow 0.2s ease;
  display: inline-flex; align-items: center; justify-content: center;
}
.play-btn:hover { transform: scale(1.05); box-shadow: 0 0 46px rgba(255, 107, 26, 0.55), 0 10px 26px rgba(0, 0, 0, 0.6); }
.play-btn:active { transform: scale(0.97); }
.play-btn:focus-visible { outline: 3px solid var(--ember-hot); outline-offset: 4px; }
#playGlyph { transform: translateX(2px); }

.eq {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 4px; height: 3.2rem; margin: 1.6rem 0 0.4rem;
}
.eq span {
  width: 7px; border-radius: 3px;
  background: linear-gradient(180deg, var(--ember-hot), var(--rust));
  transform-origin: bottom;
  transform: scaleY(0.12);
  opacity: 0.85;
}
.player.playing .eq span { animation: eqbounce 0.9s ease-in-out infinite alternate; }
.player.playing .eq span:nth-child(2n)   { animation-duration: 0.7s; }
.player.playing .eq span:nth-child(3n)   { animation-duration: 1.1s; animation-delay: -0.3s; }
.player.playing .eq span:nth-child(4n)   { animation-duration: 0.55s; animation-delay: -0.15s; }
.player.playing .eq span:nth-child(5n)   { animation-duration: 1.3s; animation-delay: -0.6s; }
@keyframes eqbounce {
  from { transform: scaleY(0.1); }
  to   { transform: scaleY(1); }
}

.now-playing { margin-top: 1rem; }
.np-label {
  font-size: 0.7rem; letter-spacing: 0.3em; color: var(--ink-dim); font-weight: 700;
}
.np-track {
  margin-top: 0.3rem; font-size: 1.05rem; color: var(--ink);
  min-height: 1.7em;
}

.volume-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0.75rem; margin-top: 1.2rem;
}
.vol-icon { color: var(--ink-dim); font-size: 1.1rem; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: min(16rem, 60vw); height: 6px; border-radius: 3px;
  background: linear-gradient(90deg, var(--rust), #3a2410);
  outline: none; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--ember-hot);
  border: 2px solid #2a1503;
  box-shadow: 0 0 12px rgba(255, 107, 26, 0.6);
}
input[type="range"]::-moz-range-thumb {
  width: 1.15rem; height: 1.15rem; border-radius: 50%;
  background: var(--ember-hot); border: 2px solid #2a1503;
  box-shadow: 0 0 12px rgba(255, 107, 26, 0.6);
}

.offline-note {
  margin-top: 1.4rem; padding: 0.8rem 1rem;
  border: 1px dashed var(--rust); border-radius: 0.6rem;
  color: var(--ember-hot); font-size: 0.92rem; letter-spacing: 0.03em;
  background: rgba(179, 74, 18, 0.08);
}
.player.live .offline-note { display: none; }

/* ---------- sections ---------- */

.hazard {
  height: 10px; margin: 2.75rem 0;
  background: repeating-linear-gradient(-45deg, var(--rust) 0 14px, #0e0a05 14px 28px);
  border-radius: 2px; opacity: 0.75;
}

.block h2 {
  font-family: "Arial Black", "Helvetica Neue", Impact, sans-serif;
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  letter-spacing: 0.06em; color: var(--ember);
  text-shadow: 0 0 18px rgba(255, 107, 26, 0.3);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}
.lede { color: var(--ink-dim); margin-bottom: 1.1rem; }
.block p + p { margin-top: 0.9rem; }
.fine { color: var(--ink-dim); font-size: 0.88rem; margin-top: 0.9rem; }

.episodes { list-style: none; display: grid; gap: 0.8rem; }
.episode {
  display: flex; align-items: baseline; gap: 0.9rem; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 0.7rem; padding: 0.9rem 1.1rem;
}
.ep-num {
  font-weight: 800; letter-spacing: 0.12em; color: var(--ember-hot);
  font-size: 0.85rem; white-space: nowrap;
}
.ep-title { font-size: 1.05rem; }
.ep-tag {
  margin-left: auto; font-size: 0.78rem; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.7rem;
  white-space: nowrap;
}

.format-list, .clock { list-style: none; display: grid; gap: 0.8rem; }
.format-list li, .clock li {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 0.7rem; padding: 0.9rem 1.1rem;
}
.format-list strong { color: var(--ember-hot); }
.clock .time {
  display: inline-block; min-width: 3rem;
  font-weight: 800; color: var(--ember-hot); letter-spacing: 0.08em;
}

/* ---------- footer ---------- */

footer {
  text-align: center; padding: 2.5rem 1.25rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
}
footer p:first-child { color: var(--ink); letter-spacing: 0.06em; font-weight: 600; }

@media (max-width: 480px) {
  .hero { padding-top: 2.5rem; }
  .play-btn { width: 5.5rem; height: 5.5rem; font-size: 2rem; }
  .ep-tag { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .eq span, .status-badge .dot { animation: none !important; }
  .station-name { transform: none; }
}
