/* FAV.FM — shared stylesheet. Flat graphite base, neon per-wave accents,
   1180px grid. No radial gradients (anti-tell #2); the only gradient is the
   subtle accent→darker on the primary play control. Display font is Onest. */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900; /* variable */
  font-display: swap;
  src: url('/fonts/onest-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/onest-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #0E0F13;
  --surface: #16181F;
  --surface-2: #1E2129;
  --ink: #E7E9EE;
  --muted: #9AA0AD;
  --line: rgba(231, 233, 238, 0.10);
  --line-strong: rgba(231, 233, 238, 0.20);
  --accent: #5EEAD4;         /* global / Focus (mint) */
  --accent-indie: #FB7185;   /* coral */
  --accent-night: #A78BFA;   /* violet */
  --accent-ink: #0A1512;     /* text on a filled accent surface */
  --shadow: 0 6px 20px -12px rgba(0, 0, 0, 0.65);
  --container: 1180px;
}

/* Per-wave accent themes swap --accent (cards + wave pages). */
.ch-focus { --accent: #5EEAD4; --accent-ink: #06201C; }
.ch-indie { --accent: #FB7185; --accent-ink: #2A0910; }
.ch-night { --accent: #A78BFA; --accent-ink: #140A2A; }

* { box-sizing: border-box; }

/* The hidden attribute must win over any display:flex/grid on the element. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Onest', -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 92px; /* sticky player bar clearance */
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

a { color: var(--accent); text-decoration-color: rgba(94, 234, 212, 0.35); text-underline-offset: 2px; }
a:hover { color: #fff; }

h1, h2, h3 { line-height: 1.15; color: var(--ink); margin: 0 0 0.5em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.4rem, 4.8vw, 3.25rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }

.eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 0.6rem;
}

.ico { width: 20px; height: 20px; fill: none; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap;
}

time, .t-time, .nx-time, .badge, .meta-row, .pb-listeners { font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(22, 24, 31, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 28px; height: 64px; }

.wordmark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark .mk { width: 28px; height: 28px; color: var(--accent); flex: none; }
.wordmark .wm-text { font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em; }
.wm-dot { color: var(--accent); }

.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover { color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

.onair-pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 14px; font-size: 0.8rem; color: var(--muted);
  white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis;
  background: var(--surface-2);
}
.onair-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex: none; }
.onair-pill .dot.on { animation: pulse 1.6s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }

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

.hero { padding: 56px 0 40px; }
.hero .container { display: grid; grid-template-columns: 340px 1fr; gap: 48px; align-items: center; }

/* Per-wave tinted cover: the resting state even before (or without) the SVG
   art paints, so an unloaded image reads as a deliberate flat cover, never a
   broken glyph. font-size:0 hides broken-image alt text. */
.art-frame {
  position: relative; aspect-ratio: 1 / 1; border-radius: 16px;
  overflow: hidden; border: 1px solid var(--line); background: var(--surface);
}
.art-frame.wide { aspect-ratio: 2 / 1; }
.art-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block; font-size: 0;
  position: relative; z-index: 1; opacity: 0; transition: opacity 0.25s ease;
}
.art-frame img.is-loaded { opacity: 1; }
.art-frame::before {
  content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0.06;
}

/* Live-data blocks appear only when real data backs them. */
[data-history-block][hidden] { display: none; }
.cols-7-5.solo { grid-template-columns: 1fr; }

.hero-copy h1 { margin-bottom: 0.35em; }
.hero-copy .lede { font-size: 1.15rem; color: var(--muted); max-width: 48ch; }

.now-line { display: flex; align-items: baseline; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.now-line .np-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); white-space: nowrap;
}
.now-line .np-track { font-size: 1.2rem; font-weight: 600; color: var(--ink); }

.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 26px; flex-wrap: wrap; }

.play-big {
  display: inline-flex; align-items: center; gap: 12px;
  border: none; cursor: pointer; border-radius: 999px;
  background: linear-gradient(180deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 62%, #000) 100%);
  color: var(--accent-ink); font-family: inherit; font-size: 1.05rem; font-weight: 700;
  padding: 14px 26px; box-shadow: var(--shadow);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.play-big:hover { transform: translateY(-1px); filter: brightness(1.05); }
.play-big:active { transform: translateY(0); }
.play-big .ico { width: 22px; height: 22px; }

.listen-alt { font-size: 0.85rem; color: var(--muted); }
.listen-alt a { white-space: nowrap; }

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

.section { padding: 44px 0; }
.stack-lg { margin-top: 36px; }
.lede-block { font-size: 1.1rem; color: var(--muted); max-width: 62ch; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head a.more { font-size: 0.9rem; white-space: nowrap; }

/* channel cards */
.ch-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.ch-card {
  display: flex; flex-direction: column; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  padding: 18px; gap: 14px; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.ch-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.ch-card[aria-pressed="true"] { border-color: var(--accent); }
.ch-card .thumb { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; }
.ch-card h3, .ch-card .card-h { margin: 0; display: flex; align-items: center; gap: 10px; color: var(--ink); }
.ch-card .genre { color: var(--muted); font-size: 0.88rem; margin: 2px 0 0; }
.ch-card .meta-row {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto;
  font-size: 0.82rem; color: var(--muted);
}
.ch-card .meta-row span:last-child { color: var(--accent); font-weight: 600; }
.badge {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 10px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent);
}

/* two-column blocks */
.cols-7-5 { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; }

.track-list { list-style: none; margin: 0; padding: 0; }
.track-list li {
  padding: 10px 2px; border-bottom: 1px solid var(--line);
  display: flex; gap: 12px; align-items: baseline; font-size: 0.95rem;
}
.track-list li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent); flex: none; transform: translateY(-2px); opacity: 0.8;
}
.track-list li:first-child { border-top: 1px solid var(--line); }
.track-list a { color: var(--ink); text-decoration: none; }
.track-list a:hover { color: var(--accent); }

/* next strip */
.next-strip { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.next-strip li {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 12px;
  border-left: 3px solid var(--surface-2); padding-left: 14px;
}
.next-strip .nx-time {
  font-weight: 700; color: var(--accent);
  grid-row: span 2; align-self: center; font-size: 1.05rem;
}
.next-strip .nx-name { font-weight: 600; color: var(--ink); }
.next-strip .nx-meta { font-size: 0.84rem; color: var(--muted); }

/* news */
.news-list { display: grid; gap: 26px; }
.news-item { border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.news-item time { font-size: 0.82rem; color: var(--accent); font-weight: 600; letter-spacing: 0.06em; }
.news-item h3, .news-item .card-h { margin: 6px 0 6px; }
.news-item p { margin: 0; color: var(--muted); max-width: 72ch; }
.news-item a { text-decoration: none; }
.news-item h3 a, .news-item .card-h a { color: var(--ink); }
.news-item h3 a:hover, .news-item .card-h a:hover { color: var(--accent); }

/* schedule table */
.table-wrap { overflow-x: auto; }
.schedule-table { width: 100%; border-collapse: collapse; min-width: 680px; }
.schedule-table th {
  text-align: left; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); padding: 10px 12px; border-bottom: 1px solid var(--line-strong);
}
.schedule-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; color: var(--ink); }
.schedule-table .t-time { white-space: nowrap; color: var(--muted); }
.schedule-table a { color: var(--ink); text-decoration: none; }
.schedule-table a:hover { color: var(--accent); }
.schedule-table tr.is-now td { background: rgba(94, 234, 212, 0.08); }
.schedule-table tr.is-now td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.now-flag { display: none; font-size: 0.72rem; font-weight: 700; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin-left: 8px; }
tr.is-now .now-flag { display: inline; }

/* curators */
.host-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.host-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.monogram {
  width: 60px; height: 60px; border-radius: 16px; display: flex; align-items: center;
  justify-content: center; font-weight: 700; font-size: 1.2rem; margin-bottom: 14px;
  letter-spacing: 0.02em;
}
.mg-1 { background: #5EEAD4; color: #06201C; }
.mg-2 { background: #FB7185; color: #2A0910; }
.mg-3 { background: #A78BFA; color: #140A2A; }
.mg-4 { background: var(--surface-2); color: #5EEAD4; border: 1px solid var(--line-strong); }
.mg-5 { background: var(--surface-2); color: #FB7185; border: 1px solid var(--line-strong); }
.host-card .card-h { color: var(--ink); }
.host-card .prog { font-size: 0.85rem; color: var(--accent); font-weight: 600; margin: 0 0 8px; }
.host-card p { margin: 0; font-size: 0.92rem; color: var(--muted); }

/* prose page */
.prose { max-width: 72ch; }
.prose p { margin: 0 0 1em; color: var(--ink); }
.prose h2 { margin-top: 1.4em; }
.meta-note { font-size: 0.88rem; color: var(--muted); }

/* contacts */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.contact-card .card-h { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.contact-card .ico { color: var(--accent); }

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

.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--surface); color: var(--ink);
  border-top: 1px solid var(--line);
}
.player-bar .container {
  display: flex; align-items: center; gap: 18px; height: 76px; min-width: 0;
}
.pb-btn {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface-2);
  color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.pb-btn:hover { background: var(--surface); border-color: var(--accent); }
.pb-chip {
  flex: none; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); max-width: 10ch; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.pb-now { min-width: 0; flex: 1; display: grid; gap: 1px; }
.pb-track {
  font-weight: 600; font-size: 0.98rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--ink);
}
.pb-status {
  font-size: 0.78rem; color: var(--muted);
  display: flex; gap: 10px; align-items: baseline;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pb-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); align-self: center; flex: none; }
.pb-status .dot.on { animation: pulse 1.6s infinite; }
.pb-listeners { font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.pb-vol { display: flex; align-items: center; gap: 8px; flex: none; }
.pb-vol .ico { width: 18px; height: 18px; opacity: 0.8; color: var(--muted); }
.pb-vol input[type="range"] { width: 90px; accent-color: var(--accent); }

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

.site-footer { background: var(--surface); color: var(--muted); margin-top: 56px; border-top: 1px solid var(--line); }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 44px 0 32px;
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-brand p { margin: 0 0 10px; font-size: 0.92rem; max-width: 36ch; }
.footer-bottom {
  border-top: 1px solid var(--line); padding: 18px 0 22px;
  font-size: 0.8rem; color: var(--muted);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-mark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 700; margin-bottom: 6px; }
.footer-mark .mk { width: 22px; height: 22px; color: var(--accent); }
.site-footer h2.footer-h {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 14px; font-weight: 600;
}
h2.card-h { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.5em; color: var(--ink); }

/* Long addresses must never stretch the layout. */
.site-footer a, .contact-card a, .listen-alt a { overflow-wrap: anywhere; }

/* ---------- responsive ---------- */

@media (max-width: 980px) {
  .site-header .container { gap: 14px; height: auto; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; row-gap: 8px; }
  .wordmark { margin-right: auto; }
  .main-nav {
    display: flex; order: 3; width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; gap: 18px; margin-left: 0;
    padding-bottom: 2px; min-width: 0;
  }
  .main-nav::-webkit-scrollbar { display: none; }
  .hero .container { grid-template-columns: 1fr; }
  .hero .art-frame { max-width: 360px; }
  .ch-grid, .host-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .cols-7-5 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .ch-grid, .host-grid, .contact-grid, .footer-grid { grid-template-columns: 1fr; }
  .pb-vol { display: none; }
  .onair-pill { max-width: 150px; }
  body { padding-bottom: 84px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
