/* Романс — shared stylesheet. Flat cream base, wine accents, 1180px grid.
   No gradient backgrounds on body (anti-tell #2), display font is Onest only. */

@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 {
  --ink: #2A1520;
  --wine: #6E1B3F;
  --wine-deep: #4A0F2A;
  --rose: #C14467;
  --rose-soft: #F3DCE3;
  --cream: #FAF4EE;
  --gold: #C9A227;
  --night: #16101A;
  --ink-soft: #6E5560;
  --line: rgba(42, 21, 32, 0.12);
  --shadow: 0 12px 28px -18px rgba(42, 21, 32, 0.4);
  --container: 1180px;
}

* { 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(--cream);
  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;
}

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

a { color: var(--wine); text-decoration-color: rgba(110, 27, 63, 0.35); }
a:hover { color: var(--rose); }

h1, h2, h3 { line-height: 1.15; color: var(--wine-deep); margin: 0 0 0.5em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.1rem); font-weight: 700; }
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(--gold); 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;
}

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

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(250, 244, 238, 0.94);
  backdrop-filter: blur(8px);
  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(--wine-deep); }
.wordmark .mk { width: 30px; height: 30px; color: var(--wine); flex: none; }
.wordmark .wm-text { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.01em; }
.wordmark .wm-text i { font-style: normal; color: var(--rose); }

.main-nav { display: flex; gap: 22px; margin-left: auto; }
.main-nav a { text-decoration: none; color: var(--ink); font-weight: 500; font-size: 0.95rem; }
.main-nav a:hover { color: var(--wine); }
.main-nav a[aria-current="page"] { color: var(--wine); 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(--ink-soft);
  white-space: nowrap; max-width: 300px; overflow: hidden; text-overflow: ellipsis;
}
.onair-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--rose); 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: 320px 1fr; gap: 48px; align-items: center; }

/* Per-channel tinted cover with a subtle crosshatch: the resting state even
   before (or without) raster art, so an unloaded image reads as a deliberate
   flat cover, not a failure. font-size:0 keeps broken-image alt text from
   rendering as visible text. */
.art-frame {
  position: relative; aspect-ratio: 1 / 1; border-radius: 14px;
  overflow: hidden; border: 1px solid var(--line); background: var(--rose-soft);
}
.art-frame.wide { aspect-ratio: 2 / 1; }
/* The tinted cover is the default visual state; the raster layer paints only
   after a successful load event. A missing image is therefore visually
   identical to a deliberate flat cover — no broken-image glyph, no alt text. */
.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:
    repeating-linear-gradient(45deg, rgba(110, 27, 63, 0.05) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(110, 27, 63, 0.04) 0 2px, transparent 2px 11px),
    var(--rose-soft);
}
.art-frame.ch-noir::before, .art-frame.ch-polnoch::before {
  background:
    repeating-linear-gradient(45deg, rgba(201, 162, 39, 0.06) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(-45deg, rgba(201, 162, 39, 0.05) 0 2px, transparent 2px 11px),
    var(--night);
}
.art-frame.ch-noir::after {
  content: ""; position: absolute; left: 18%; top: 22%; width: 42%; aspect-ratio: 1;
  border-radius: 50%; border: 2px solid rgba(201, 162, 39, 0.7);
}
.art-frame.ch-polnoch::after {
  content: ""; position: absolute; inset: auto 10% 16% 10%; height: 1px;
  background: rgba(201, 162, 39, 0.55);
}

/* Live-data blocks appear only when real data backs them; the markup ships
   hidden and JS reveals. Grid collapses to a single column when the history
   block stays hidden. */
[data-history-block][hidden] { display: none; }
.cols-7-5.solo { grid-template-columns: 1fr; }

.hero-copy h1 { margin-bottom: 0.4em; }
.hero-copy .lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; }

.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(--gold); white-space: nowrap;
}
.now-line .np-track { font-size: 1.2rem; font-weight: 600; color: var(--wine-deep); }
.now-line .np-track.is-empty { font-weight: 400; color: var(--ink-soft); font-size: 1rem; }

.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(135deg, var(--wine) 0%, var(--wine-deep) 100%);
  color: #fff; font-family: inherit; font-size: 1.05rem; font-weight: 600;
  padding: 14px 28px; box-shadow: var(--shadow);
  transition: transform 0.15s ease;
}
.play-big:hover { transform: scale(1.03); }
.play-big:active { transform: scale(0.98); }
.play-big .ico { width: 22px; height: 22px; }

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

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

.section { padding: 44px 0; }
.stack-lg { margin-top: 36px; }
.lede-block { font-size: 1.1rem; color: var(--ink-soft); max-width: 60ch; }
.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: #fff; 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;
}
.ch-card:hover { border-color: rgba(110, 27, 63, 0.35); box-shadow: var(--shadow); }
.ch-card[aria-pressed="true"] { border-color: var(--rose); box-shadow: var(--shadow); }
.ch-card .thumb { width: 88px; height: 88px; border-radius: 10px; flex: none; }
.ch-card h3 { margin: 0; display: flex; align-items: center; gap: 10px; }
.ch-card .genre { color: var(--ink-soft); 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(--ink-soft);
}
.badge {
  display: inline-block; border: 1px solid var(--line); border-radius: 999px;
  padding: 2px 10px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--gold);
}

/* 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(--rose-soft); border: 1px solid var(--rose); flex: none;
  transform: translateY(-2px);
}
.track-list li:first-child { border-top: 1px solid var(--line); }

/* next strip: clock time primary, programme name, relative form secondary */
.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(--rose-soft); padding-left: 14px;
}
.next-strip .nx-time {
  font-variant-numeric: tabular-nums; font-weight: 700; color: var(--wine-deep);
  grid-row: span 2; align-self: center; font-size: 1.05rem;
}
.next-strip .nx-name { font-weight: 600; color: var(--wine-deep); }
.next-strip .nx-meta { font-size: 0.84rem; color: var(--ink-soft); }

/* 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(--gold); font-weight: 600; letter-spacing: 0.06em; }
.news-item h3 { margin: 6px 0 6px; }
.news-item p { margin: 0; color: var(--ink-soft); max-width: 70ch; }

/* schedule table */
.table-wrap { overflow-x: auto; }
.schedule-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.schedule-table th {
  text-align: left; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); padding: 10px 12px; border-bottom: 2px solid var(--rose-soft);
}
.schedule-table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.95rem; }
.schedule-table .t-time { white-space: nowrap; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.schedule-table tr.is-now td { background: rgba(243, 220, 227, 0.55); }
.schedule-table tr.is-now td:first-child { box-shadow: inset 3px 0 0 var(--rose); }
.now-flag { display: none; font-size: 0.72rem; font-weight: 700; color: var(--rose); letter-spacing: 0.08em; text-transform: uppercase; margin-left: 8px; }
tr.is-now .now-flag { display: inline; }

/* hosts */
.host-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.host-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; }
.monogram {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 600; font-size: 1.15rem; color: #fff; margin-bottom: 12px;
}
.mg-1 { background: var(--rose); } .mg-2 { background: var(--gold); }
.mg-3 { background: var(--wine); } .mg-4 { background: var(--night); color: var(--gold); }
.mg-5 { background: var(--rose-soft); color: var(--wine-deep); }
.host-card .prog { font-size: 0.85rem; color: var(--gold); font-weight: 600; margin: 0 0 8px; }
.host-card p { margin: 0; font-size: 0.92rem; color: var(--ink-soft); }

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

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

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

.player-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: var(--wine-deep); color: var(--rose-soft);
  border-top: 1px solid rgba(250, 244, 238, 0.08);
}
.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 rgba(250, 244, 238, 0.35); background: transparent;
  color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background 0.15s ease;
}
.pb-btn:hover { background: rgba(250, 244, 238, 0.12); }
.pb-chip {
  flex: none; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--gold); max-width: 9ch; 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;
}
.pb-track.is-empty { font-weight: 400; opacity: 0.7; }
.pb-status {
  font-size: 0.78rem; color: rgba(243, 220, 227, 0.75);
  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(--rose); align-self: center; flex: none; }
.pb-status .dot.on { animation: pulse 1.6s infinite; }
.pb-listeners { font-size: 0.78rem; color: rgba(243, 220, 227, 0.75); white-space: nowrap; }
.pb-vol { display: flex; align-items: center; gap: 8px; flex: none; }
.pb-vol .ico { width: 18px; height: 18px; opacity: 0.8; }
.pb-vol input[type="range"] { width: 90px; accent-color: var(--rose); }

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

.site-footer { background: var(--wine-deep); color: rgba(243, 220, 227, 0.85); margin-top: 56px; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding: 44px 0 32px;
}
.site-footer h4 {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px; font-weight: 600;
}
.site-footer a { color: rgba(243, 220, 227, 0.85); text-decoration: none; }
.site-footer a:hover { color: #fff; 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: 34ch; }
.footer-bottom {
  border-top: 1px solid rgba(250, 244, 238, 0.12); padding: 18px 0 22px;
  font-size: 0.8rem; color: rgba(243, 220, 227, 0.6);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-mark { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 600; }
.footer-mark .mk { width: 22px; height: 22px; color: var(--gold); }

/* Host avatar: photo over the monogram, which stays as the resting and
   failure state — a missing photo reads as a deliberate monogram medallion. */
.avatar-frame {
  position: relative; width: 56px; height: 56px;
  display: block; margin-bottom: 12px;
}
.avatar-frame .monogram { position: absolute; inset: 0; margin: 0; }
.avatar-frame picture, .avatar-frame img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover;
}
.avatar-frame img { opacity: 0; transition: opacity 0.25s ease; font-size: 0; }
.avatar-frame img.is-loaded { opacity: 1; }

/* Footer group headings and content-card headings keep their compact look
   while sitting at their correct outline level. */
.site-footer h2.footer-h {
  font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 14px; font-weight: 600;
}
h2.card-h { font-size: 1.25rem; font-weight: 600; margin: 0 0 0.5em; color: var(--wine-deep); }

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

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

/* Below the desktop breakpoint the primary nav stays visible as a compact,
   horizontally scrollable row — a plausible pattern for a small station and
   no JS required. */
@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: 320px; }
  .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; }
}

/* studio intro video */
.studio-video .container { display: flex; justify-content: center; }
.studio-intro {
  width: 100%;
  max-width: 720px;
  border-radius: 16px;
  display: block;
  aspect-ratio: 854 / 480;
  background: #000;
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
}
