/*
Theme Name: Sideband
Description: Independent community radio station.
Version: 1.0
*/

/* ============================================================
   Sideband's structural principle: this is the project's first
   theme built around a real Web Audio API engine (generative
   ambient tones + a live AnalyserNode), and every GPU/visual piece
   on the page is a genuine consumer of that one shared audio graph
   rather than a decorative effect running on its own clock — the
   background shader, the 3D oscilloscope, and the 3D frequency wall
   all react to the same live (or idle-synthesized) signal. Palette:
   near-black "signal" ground + oscilloscope-phosphor green + warm
   tube-radio amber — a hue pairing not used before in this project.
   Long, traditional multi-scene homepage (13 sections), matching the
   explicit brief for a content-rich, image-rich, long page.
   ============================================================ */
:root {
	--signal: #0A0D10;
	--panel: #10151A;
	--panel-2: #141B21;
	--panel-3: #19222A;
	--line: rgba(120, 255, 195, 0.14);
	--line-strong: rgba(120, 255, 195, 0.30);
	--ink: #EAF3EF;
	--ink-dim: #9AB0AA;
	--ink-mute: #5A6E69;
	--phosphor: #4CFFB2;
	--phosphor-bright: #8CFFCE;
	--amber: #FFA23C;
	--amber-bright: #FFC178;
	--font-display: 'Unbounded', sans-serif;
	--font-body: 'IBM Plex Sans', sans-serif;
	--font-mono: 'Chivo Mono', monospace;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	background: var(--signal);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--phosphor); color: var(--signal); }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0 0 0.45em; color: var(--ink); }
h1 { font-size: clamp(38px, 6vw, 84px); }
h2 { font-size: clamp(26px, 3.2vw, 44px); }
h3 { font-size: clamp(16px, 1.7vw, 20px); font-weight: 500; }
p { margin: 0 0 1.1em; color: var(--ink-dim); }
.mono { font-family: var(--font-mono); }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 40px; }

.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--phosphor); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--phosphor); }
.eyebrow.amber { color: var(--amber); }
.eyebrow.amber::before { background: var(--amber); }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 32px; border: 1px solid var(--phosphor); border-radius: 3px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--phosphor); background: transparent; transition: background 0.3s, color 0.3s; cursor: pointer; }
.btn:hover { background: var(--phosphor); color: var(--signal); }
.btn.solid { background: var(--amber); color: var(--signal); border-color: var(--amber); }
.btn.solid:hover { background: var(--amber-bright); border-color: var(--amber-bright); }
.btn.ghost { border-color: var(--line-strong); color: var(--ink-dim); }
.btn.ghost:hover { border-color: var(--ink-dim); color: var(--ink); background: transparent; }

.grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.04; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); }

/* ============================================================
   Header
   ============================================================ */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 24px 0; transition: background 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.site-head.scrolled { background: rgba(10, 13, 16, 0.86); backdrop-filter: blur(12px); border-color: var(--line); }
.head-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 3vw; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--ink); }
.logo-mark { width: 9px; height: 9px; border-radius: 50%; background: var(--phosphor); box-shadow: 0 0 10px var(--phosphor); }
.main-nav ul { list-style: none; display: flex; gap: 32px; margin: 0; padding: 0; }
.main-nav a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-dim); }
.main-nav a:hover { color: var(--phosphor); }
.nav-toggle { display: none; background: none; border: 1px solid var(--phosphor); color: var(--phosphor); font-size: 11px; letter-spacing: 0.08em; padding: 7px 15px; cursor: pointer; font-family: var(--font-mono); }
.mobile-nav { position: fixed; inset: 0; z-index: 200; background: var(--signal); transform: translateY(-100%); transition: transform 0.4s cubic-bezier(.7,0,.3,1); display: flex; flex-direction: column; }
.mobile-nav.open { transform: translateY(0); }
.mobile-nav ul { list-style: none; margin: auto 0; padding: 0 40px; }
.mobile-nav li { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 18px 0; font-family: var(--font-display); font-size: 30px; color: var(--ink); }
.mn-close { position: absolute; top: 24px; right: 34px; background: none; border: 1px solid var(--phosphor); color: var(--phosphor); font-size: 20px; padding: 4px 13px; cursor: pointer; }
@media (max-width: 960px) { .main-nav { display: none; } .nav-toggle { display: block; } }

/* ============================================================
   Structural devices: ON-AIR stamp + waveform signature
   ============================================================ */
.onair-stamp { display: inline-flex; flex-wrap: wrap; gap: 18px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); }
.onair-stamp b { color: var(--phosphor); font-weight: 500; }
.waveform-sig { display: flex; align-items: flex-end; gap: 2px; height: 28px; }
.waveform-sig span { flex: 1; background: var(--phosphor); opacity: 0.55; border-radius: 1px; min-width: 2px; }

/* ============================================================
   1. Hero — audio-reactive background shader + play control
   ============================================================ */
.audio-hero { position: relative; min-height: 100vh; display: flex; align-items: flex-end; overflow: hidden; }
.audio-hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.audio-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,13,16,0) 40%, rgba(10,13,16,0.6) 88%, var(--signal) 100%); pointer-events: none; }
.hero-inner { position: relative; z-index: 2; width: 100%; padding: 0 3vw 90px; }
.hero-lede { max-width: 540px; font-size: 18px; margin-top: 18px; }
.hero-cta { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; align-items: center; }
.audio-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border: 1px solid var(--amber); border-radius: 3px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--amber); background: rgba(255, 162, 60, 0.08); cursor: pointer; }
.audio-toggle .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-mute); }
.audio-toggle.playing .dot { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: rec-pulse 1.4s ease-in-out infinite; }
@keyframes rec-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
.hero-hud { position: absolute; top: 130px; right: 3vw; z-index: 2; text-align: right; font-family: var(--font-mono); font-size: 11px; color: var(--phosphor); }
.hero-hud span { display: block; color: var(--ink-mute); font-size: 10px; margin-top: 4px; }

/* ============================================================
   2. Trust ticker
   ============================================================ */
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; overflow: hidden; background: var(--panel); }
.trust-track { display: flex; gap: 70px; white-space: nowrap; animation: trust-scroll 30s linear infinite; width: max-content; }
.trust-track span { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
@keyframes trust-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   3. On-air band
   ============================================================ */
.onair-band { padding: 90px 0; }
.onair-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; margin-bottom: 40px; }
.onair-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.onair-tile { border: 1px solid var(--line); border-radius: 6px; padding: 22px; background: var(--panel); }
.onair-tile .ot-day { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 14px; display: block; }
.onair-tile h3 { margin-bottom: 6px; }
.onair-tile .ot-time { font-family: var(--font-mono); font-size: 12px; color: var(--phosphor); }
@media (max-width: 900px) { .onair-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   4. Featured shows grid
   ============================================================ */
.shows-section { padding: 40px 0 100px; }
.show-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.show-card { border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; display: flex; flex-direction: column; transition: border-color 0.3s, transform 0.3s; }
.show-card:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.show-card .sc-media { aspect-ratio: 4/3; overflow: hidden; }
.show-card .sc-media img { width: 100%; height: 100%; object-fit: cover; }
.show-card .sc-body { padding: 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.show-card .sc-genre { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); }
@media (max-width: 980px) { .show-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .show-grid { grid-template-columns: 1fr; } }

/* ============================================================
   5. Explore by genre
   ============================================================ */
.genre-section { padding: 40px 0 100px; }
.genre-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 40px; }
.genre-tile { position: relative; aspect-ratio: 3/4; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.genre-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.genre-tile:hover img { transform: scale(1.06); }
.genre-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(10,13,16,0.9) 100%); }
.genre-tile span { position: absolute; bottom: 14px; left: 14px; z-index: 2; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink); }
@media (max-width: 980px) { .genre-nav { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .genre-nav { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   6. Oscilloscope — 3D Lissajous scene
   ============================================================ */
.scope-section { padding: 40px 0 110px; }
.scope-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.scope-viewer { position: relative; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; }
.scope-viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scope-copy .stat-row { display: flex; gap: 40px; margin-top: 36px; flex-wrap: wrap; }
.scope-copy .stat-row .stat b { display: block; font-family: var(--font-display); font-size: 30px; color: var(--phosphor); }
.scope-copy .stat-row .stat span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }
@media (max-width: 900px) { .scope-grid { grid-template-columns: 1fr; } }

/* ============================================================
   7. Spectrum wall — 3D instanced frequency bars
   ============================================================ */
.spectrum-section { padding: 40px 0 110px; }
.spectrum-viewer { position: relative; aspect-ratio: 21/9; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); overflow: hidden; margin-top: 40px; }
.spectrum-viewer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.spectrum-viewer .sv-label { position: absolute; top: 16px; left: 18px; z-index: 2; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-dim); display: flex; align-items: center; gap: 8px; }
.spectrum-viewer .sv-label .rec { width: 6px; height: 6px; border-radius: 50%; background: var(--phosphor); animation: rec-pulse 1.8s ease-in-out infinite; }

/* ============================================================
   8. Broadcast coverage
   ============================================================ */
.coverage-section { padding: 40px 0 110px; }
.coverage-wrap { position: relative; margin-top: 40px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 50px; overflow: hidden; }
.coverage-wrap svg { display: block; margin: 0 auto; max-width: 100%; }
.coverage-wrap .pulse-ring { fill: none; stroke: var(--phosphor); stroke-width: 1; opacity: 0; transform-origin: center; animation: coverage-pulse 3.5s ease-out infinite; }
.coverage-wrap .pulse-ring.r2 { animation-delay: 1.16s; }
.coverage-wrap .pulse-ring.r3 { animation-delay: 2.32s; }
@keyframes coverage-pulse { 0% { opacity: 0.65; transform: scale(0.35); } 100% { opacity: 0; transform: scale(1.4); } }

/* ============================================================
   9. History timeline
   ============================================================ */
.timeline-section { padding: 40px 0 110px; }
.timeline { margin-top: 50px; border-left: 1px solid var(--line-strong); padding-left: 36px; display: flex; flex-direction: column; gap: 40px; }
.timeline-item { position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -41px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.timeline-item .ti-year { font-family: var(--font-mono); font-size: 12px; color: var(--amber); display: block; margin-bottom: 8px; }

/* ============================================================
   10. Team / hosts
   ============================================================ */
.team-section { padding: 40px 0 110px; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; margin-top: 40px; }
.team-card img { border-radius: 6px; aspect-ratio: 1; object-fit: cover; filter: grayscale(0.35); }
.team-card h4 { margin: 14px 0 2px; font-size: 16px; font-family: var(--font-body); font-weight: 600; }
.team-card span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }
@media (max-width: 900px) { .team-grid { grid-template-columns: 1fr 1fr; } }

/* ============================================================
   11. Press band
   ============================================================ */
.press-band { padding: 80px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel); }
.press-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.press-quote p { font-family: var(--font-display); font-size: 18px; font-weight: 500; color: var(--ink); }
.press-quote span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.06em; }
@media (max-width: 900px) { .press-grid { grid-template-columns: 1fr; } }

/* ============================================================
   12. Journal grid
   ============================================================ */
.journal-section { padding: 40px 0 110px; }
.journal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; }
.journal-card { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); transition: border-color 0.3s; }
.journal-card:hover { border-color: var(--line-strong); }
.journal-card .jc-media { aspect-ratio: 16/10; overflow: hidden; }
.journal-card .jc-media img { width: 100%; height: 100%; object-fit: cover; }
.journal-card .jc-body { padding: 22px; }
.journal-card .jc-date { font-family: var(--font-mono); font-size: 10px; color: var(--ink-mute); text-transform: uppercase; letter-spacing: 0.08em; }
.journal-card h3 { margin: 10px 0 8px; font-size: 18px; }
@media (max-width: 900px) { .journal-grid { grid-template-columns: 1fr; } }

/* ============================================================
   13. CTA band
   ============================================================ */
.cta-band { padding: 130px 0; text-align: center; }
.cta-band h2 { max-width: 720px; margin: 0 auto 30px; }

/* ============================================================
   Footer
   ============================================================ */
.site-foot { border-top: 1px solid var(--line); padding: 70px 0 30px; background: var(--panel); }
.foot-top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; padding-bottom: 50px; }
.foot-brand .logo { margin-bottom: 14px; }
.foot-brand p { max-width: 300px; font-size: 14px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); margin: 0 0 16px; }
.foot-col .foot-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col .foot-menu a { font-size: 14px; color: var(--ink-dim); }
.foot-col .foot-menu a:hover { color: var(--phosphor); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 12px; }
.foot-bottom span { font-family: var(--font-mono); font-size: 11px; color: var(--ink-mute); }
@media (max-width: 900px) { .foot-top { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .foot-top { grid-template-columns: 1fr; } }

/* ============================================================
   Inner pages
   ============================================================ */
.page-hero { padding: 150px 0 60px; }
.page-hero .lede { max-width: 640px; font-size: 18px; }
.content-wrap { max-width: 760px; margin: 0 auto; padding: 0 40px 120px; }
.content-wrap h2 { margin-top: 1.4em; }
.content-wrap blockquote { border-left: 2px solid var(--phosphor); margin: 2em 0; padding-left: 24px; font-family: var(--font-display); font-size: 19px; font-weight: 500; color: var(--ink); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding: 0 3vw 120px; }
@media (max-width: 900px) { .archive-grid { grid-template-columns: 1fr; } }
.filter-pills { display: flex; gap: 10px; flex-wrap: wrap; padding: 0 3vw 40px; }
.filter-pills a { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; padding: 8px 16px; border: 1px solid var(--line); border-radius: 20px; color: var(--ink-dim); }
.filter-pills a.active, .filter-pills a:hover { border-color: var(--phosphor); color: var(--phosphor); }

.single-show-head { padding: 150px 0 50px; }
.single-show-meta { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 36px; padding-top: 30px; border-top: 1px solid var(--line); }
.single-show-meta .m-item span { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 6px; }
.single-show-meta .m-item b { font-family: var(--font-display); font-size: 16px; font-weight: 500; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; padding: 0 3vw 120px; }
.contact-form label { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); margin-bottom: 8px; }
.contact-form input, .contact-form textarea { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px; color: var(--ink); font-family: var(--font-body); margin-bottom: 20px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--phosphor); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.error-404 { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 0 20px; }
.error-404 .code { font-family: var(--font-mono); font-size: 13px; color: var(--amber); letter-spacing: 0.1em; }

/* ============================================================
   Reveal-on-scroll baseline
   ============================================================ */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.8s cubic-bezier(.2,.7,.3,1), transform 0.8s cubic-bezier(.2,.7,.3,1); }
[data-reveal].shown { opacity: 1; transform: none; }
.scroll-progress { position: fixed; top: 0; left: 0; height: 2px; background: var(--phosphor); z-index: 300; width: 0%; box-shadow: 0 0 8px var(--phosphor); }

@media (prefers-reduced-motion: reduce) {
	[data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
	.trust-track { animation: none; }
	.pulse-ring { animation: none; opacity: 0.3; }
}
