/* ===== Formatik — живое радио. Warm editorial light theme. ===== */

:root {
  --bg:       #f3efe7;
  --paper:    #fbf9f4;
  --surface:  #ffffff;
  --ink:      #18150f;
  --ink-2:    #4f4a3e;
  --muted:    #8b8473;
  --line:     #e6dfd1;
  --line-2:   #d8d0bf;
  --accent:   #e0402f;   /* ember */
  --accent-d: #b8311f;
  --cobalt:   #1f4ed8;
  --ok:       #1f9d61;
  --ring:     rgba(224,64,47,.18);
  --radius:   16px;
  --radius-sm:11px;
  --shadow:   0 2px 4px rgba(34,28,12,.04), 0 18px 40px rgba(34,28,12,.07);
  --shadow-sm:0 1px 2px rgba(34,28,12,.05), 0 6px 16px rgba(34,28,12,.06);
  --maxw:     1180px;
  --player-h: 98px;
  --font:     ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono:     ui-monospace, 'SF Mono', 'JetBrains Mono', 'Cascadia Code', Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--player-h) + 20px);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
svg { display: block; }
.mono { font-family: var(--mono); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(243,239,231,.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 26px; height: 68px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; letter-spacing: -.03em; font-size: 21px; }
.brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--paper); display: grid; place-items: center; }
.brand .mark svg { width: 19px; height: 19px; }
.brand small { color: var(--muted); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { padding: 8px 14px; border-radius: 99px; color: var(--ink-2); font-size: 14.5px; font-weight: 600; transition: .15s; }
.nav-links a:hover { color: var(--ink); background: rgba(0,0,0,.05); }
.nav-links a.active { color: var(--paper); background: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); padding: 7px 13px; border-radius: 99px; font-size: 13px; color: var(--ink-2); font-weight: 600; box-shadow: var(--shadow-sm); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 var(--ring);} 70%{box-shadow:0 0 0 7px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }
.burger { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }
.burger svg { width: 24px; height: 24px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 20px; border-radius: 99px; font-weight: 700; font-size: 14.5px; cursor: pointer; border: 1px solid transparent; transition: .15s; font-family: inherit; }
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(224,64,47,.28); }
.btn-primary:hover { background: var(--accent-d); transform: translateY(-1px); }
.btn-dark { background: var(--ink); color: var(--paper); }
.btn-dark:hover { transform: translateY(-1px); }
.btn-ghost { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: #fff; box-shadow: var(--shadow-sm); }

/* ---------- Hero ---------- */
.hero { padding: 60px 0 26px; position: relative; }
.eyebrow { font-family: var(--mono); color: var(--accent); font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: .98; letter-spacing: -.045em; margin: 16px 0 16px; max-width: 15ch; font-weight: 800; }
.hero h1 .em { color: var(--accent); }
.hero p.lead { font-size: 19px; color: var(--ink-2); max-width: 54ch; margin: 0 0 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- Stats strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 44px 0; }
.stat { background: var(--paper); padding: 22px 24px; }
.stat b { font-size: 30px; letter-spacing: -.03em; display: block; font-weight: 800; }
.stat span { color: var(--muted); font-size: 13px; font-weight: 500; }

/* ---------- Sections ---------- */
.section { padding: 28px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 16px; }
.section-head h2 { font-size: 28px; letter-spacing: -.03em; margin: 0; font-weight: 800; }
.section-head a { color: var(--accent); font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.section-head a svg { width: 15px; height: 15px; }
.section-sub { color: var(--ink-2); max-width: 62ch; margin: -6px 0 20px; }

/* ---------- Genre chips ---------- */
.chips { display: flex; gap: 9px; flex-wrap: wrap; }
.chip { padding: 9px 16px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; transition: .15s; font-family: inherit; }
.chip:hover { color: var(--ink); box-shadow: var(--shadow-sm); }
.chip.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Station grid ---------- */
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-2 { grid-template-columns: repeat(2,1fr); }

.scard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: .18s; box-shadow: var(--shadow-sm); position: relative; }
.scard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); }
.scard .logo-wrap { aspect-ratio: 1/1; position: relative; background: #f0ece2; display: grid; place-items: center; overflow: hidden; }
.scard .logo-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mono-logo { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .18em; color: #fff; font-size: 40px; }
.mono-logo .ab { font-weight: 800; font-size: 1em; line-height: 1; letter-spacing: .01em; text-shadow: 0 2px 12px rgba(0,0,0,.22); }
.mono-logo .mlw { width: 1.5em; height: .4em; color: rgba(255,255,255,.82); }
.scard .play-fab { position: absolute; right: 11px; bottom: 11px; width: 46px; height: 46px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; box-shadow: 0 6px 16px rgba(0,0,0,.25); border: 0; cursor: pointer; opacity: 0; transform: translateY(8px); transition: .18s; }
.scard:hover .play-fab { opacity: 1; transform: translateY(0); }
.scard .play-fab svg { width: 20px; height: 20px; }
.scard .meta { padding: 13px 14px 15px; }
.scard .meta h3 { font-size: 15.5px; margin: 0 0 4px; line-height: 1.25; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.scard .meta .tags { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scard .meta .row2 { display: flex; align-items: center; gap: 10px; margin-top: 8px; color: var(--ink-2); font-size: 12px; }
.scard .meta .row2 .br { font-family: var(--mono); }
.scard.playing { border-color: var(--accent); }
.scard.playing .logo-wrap::after { content: "LIVE"; position: absolute; top: 9px; left: 9px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 7px; border-radius: 5px; }

/* ---------- List rows ---------- */
.rows { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.row { display: grid; grid-template-columns: 40px 48px 1fr 160px 80px 40px; gap: 14px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); cursor: pointer; transition: .12s; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--paper); }
.row .num { color: var(--muted); font-size: 13px; text-align: center; font-family: var(--mono); }
.row .rlogo { width: 44px; height: 44px; border-radius: 9px; overflow: hidden; background: #f0ece2; }
.row .rlogo img { width: 100%; height: 100%; object-fit: cover; }
.row .rlogo .mono-logo { font-size: 18px; }
.row .t b { font-size: 15px; display: block; font-weight: 700; }
.row .t span { color: var(--muted); font-size: 12.5px; }
.row .reg { color: var(--ink-2); font-size: 13px; }
.row .br { color: var(--muted); font-size: 12.5px; text-align: right; font-family: var(--mono); }
.row .pf { width: 34px; height: 34px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.row .pf svg { width: 16px; height: 16px; }
.row:hover .pf { background: var(--accent); color: #fff; border-color: transparent; }
.row.playing { background: #fdeeec; }
.row.playing .num { color: var(--accent); }

/* ---------- States ---------- */
.empty, .loading { text-align: center; color: var(--muted); padding: 56px 0; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; margin: 0 auto 14px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skel { background: linear-gradient(100deg,#efeadf 30%,#f6f2ea 50%,#efeadf 70%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.scard.skeleton .logo-wrap { background: none; } .scard.skeleton .logo-wrap, .scard.skeleton .meta h3, .scard.skeleton .meta .tags { border-radius: 6px; }
.scard.skeleton .meta h3 { height: 14px; width: 70%; margin-bottom: 8px; } .scard.skeleton .meta .tags { height: 11px; width: 45%; display:block; }

/* ---------- Toolbar / search ---------- */
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.search { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 99px; padding: 12px 18px; box-shadow: var(--shadow-sm); }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.search svg { width: 18px; height: 18px; color: var(--muted); flex: 0 0 auto; }
.search input { background: none; border: 0; color: var(--ink); font-size: 15px; width: 100%; outline: none; font-family: inherit; }
.search input::placeholder { color: var(--muted); }

/* ---------- Feature ---------- */
.feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 28px; align-items: center; background: var(--ink); color: var(--paper); border-radius: 22px; padding: 30px; overflow: hidden; }
.feature .ph { aspect-ratio: 1/1; border-radius: 16px; overflow: hidden; max-width: 280px; background: #2a261c; display:grid; place-items:center; }
.feature .ph .mono-logo { font-size: 64px; }
.feature .tx .cat { font-family: var(--mono); color: #f0a; color: var(--accent); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.feature .tx h3 { font-size: 30px; letter-spacing: -.03em; margin: 10px 0 12px; font-weight: 800; }
.feature .tx p { color: rgba(251,249,244,.72); margin: 0 0 20px; }

/* ---------- Prose ---------- */
.prose { max-width: 70ch; }
.prose h2 { font-size: 26px; letter-spacing: -.02em; margin: 36px 0 12px; font-weight: 800; }
.prose h3 { font-size: 18px; margin: 26px 0 8px; font-weight: 700; }
.prose p { color: var(--ink-2); margin: 0 0 15px; }
.prose blockquote { border-left: 3px solid var(--accent); margin: 22px 0; padding: 4px 0 4px 18px; font-size: 18px; font-style: italic; }
.prose ul { color: var(--ink-2); padding-left: 18px; } .prose li { margin: 5px 0; }
.prose a.link { color: var(--accent); font-weight: 600; border-bottom: 1px solid var(--ring); }

/* ---------- Forms ---------- */
.form { display: grid; gap: 15px; max-width: 520px; }
.field label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 600; }
.field input, .field textarea, .field select { width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-radius: 11px; padding: 13px 15px; color: var(--ink); font-size: 15px; font-family: inherit; outline: none; transition: .15s; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }
.field textarea { resize: vertical; min-height: 120px; }
.form-note { color: var(--ok); font-size: 14px; min-height: 20px; font-weight: 600; }
.subscribe { display: flex; gap: 10px; max-width: 440px; }
.subscribe input { flex: 1; background: var(--surface); border: 1px solid var(--line-2); border-radius: 99px; padding: 13px 18px; color: var(--ink); font-size: 15px; outline: none; font-family: inherit; }
.subscribe input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--ring); }

/* newsletter card */
[hidden] { display: none !important; }
.news-card { display: flex; gap: 22px; align-items: center; background: var(--ink); color: var(--paper); border-radius: 20px; padding: 28px 30px; }
.news-ic { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.08); color: var(--accent-2); }
.news-ic svg { width: 28px; height: 28px; }
.news-body { flex: 1; min-width: 0; }
.news-body h3 { margin: 0 0 4px; font-size: 22px; letter-spacing: -.02em; font-weight: 800; }
.news-body p { margin: 0 0 14px; color: rgba(251,249,244,.72); font-size: 14.5px; }
.news-card .subscribe input { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.16); color: var(--paper); }
.news-card .subscribe input::placeholder { color: rgba(251,249,244,.5); }
.news-card .btn-dark { background: var(--accent); color: #fff; }
.news-card .btn-dark:hover { background: var(--accent-d); }
.news-card .form-note { color: var(--accent-2); margin-top: 10px; }
@media (max-width: 620px) { .news-card { flex-direction: column; align-items: flex-start; gap: 16px; } .subscribe { width: 100%; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 44px 0 28px; background: var(--paper); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 28px; }
.foot-grid h5 { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 13px; font-weight: 700; }
.foot-grid p { color: var(--ink-2); font-size: 14px; margin: 0; max-width: 40ch; }
.foot-grid a { display: block; color: var(--ink-2); font-size: 14px; padding: 4px 0; }
.foot-grid a:hover { color: var(--accent); }
.foot-bottom { border-top: 1px solid var(--line); margin-top: 34px; padding-top: 20px; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Player ---------- */
.player { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: var(--player-h); background: var(--surface); border-top: 1px solid var(--line-2); box-shadow: 0 -8px 30px rgba(34,28,12,.08); display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.pl-track { display: flex; align-items: center; gap: 13px; width: 290px; min-width: 0; }
.pl-art { width: 56px; height: 56px; border-radius: 11px; flex: 0 0 auto; overflow: hidden; background: #f0ece2; }
.pl-art img { width: 100%; height: 100%; object-fit: cover; }
.pl-art .mono-logo { font-size: 22px; }
.pl-info { min-width: 0; }
.pl-info b { display: block; font-size: 14.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-info .sub { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 7px; }
.pl-live { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 700; font-size: 11px; letter-spacing: .06em; }
.pl-live .d { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.player.is-playing .pl-live .d { animation: pulse 1.6s infinite; }
.pl-center { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pl-controls { display: flex; align-items: center; gap: 18px; }
.pl-btn { background: none; border: 0; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; transition: .12s; padding: 0; }
.pl-btn svg { width: 22px; height: 22px; }
.pl-btn:hover { color: var(--ink); }
.pl-btn:disabled { opacity: .35; cursor: default; }
.pl-play { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--paper); }
.pl-play svg { width: 22px; height: 22px; }
.pl-play:hover { color: var(--paper); transform: scale(1.05); }
.pl-status { font-size: 12px; color: var(--muted); font-family: var(--mono); letter-spacing: .02em; min-height: 16px; }
.pl-status.err { color: var(--accent); }
.pl-right { width: 290px; display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.pl-icobtn { background: none; border: 0; color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.pl-icobtn svg { width: 20px; height: 20px; }
.pl-icobtn:hover { color: var(--ink); }
.pl-icobtn.fav-on { color: var(--accent); }
.vol { display: flex; align-items: center; gap: 9px; width: 130px; }
.bar { flex: 1; height: 5px; background: var(--line-2); border-radius: 99px; cursor: pointer; position: relative; }
.bar .fill { position: absolute; inset: 0 auto 0 0; width: 80%; background: var(--ink); border-radius: 99px; }
.bar .knob { position: absolute; top: 50%; left: 80%; width: 13px; height: 13px; border-radius: 50%; background: var(--ink); transform: translate(-50%,-50%); box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.eqbars { display: flex; align-items: flex-end; gap: 2px; height: 18px; width: 18px; }
.eqbars i { width: 3px; background: var(--accent); border-radius: 2px; height: 30%; }
.player.is-playing .eqbars i { animation: eq .9s ease-in-out infinite; }
.player.is-playing .eqbars i:nth-child(2){animation-delay:.15s} .player.is-playing .eqbars i:nth-child(3){animation-delay:.3s}
@keyframes eq { 0%,100%{height:25%} 50%{height:100%} }

/* bitrate switcher */
.pl-rates { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: center; max-width: 360px; max-height: 24px; overflow: hidden; }
.pl-rates:empty { display: none; }
.rate { font-family: var(--mono); font-size: 11px; font-weight: 600; line-height: 1; padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; transition: .12s; }
.rate:hover { border-color: var(--ink); color: var(--ink); }
.rate.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.rate.up::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin-right: 5px; vertical-align: middle; }
.rate.down { color: var(--muted); border-style: dashed; text-decoration: line-through; opacity: .7; }
.rate.down.active { background: var(--accent); color: #fff; border-color: var(--accent); text-decoration: none; }
.vbadge { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--ring); padding: 2px 7px; border-radius: 6px; }

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .grid-4 { grid-template-columns: repeat(3,1fr); }
  .grid-3 { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: repeat(2,1fr); }
  .feature { grid-template-columns: 1fr; } .feature .ph { max-width: 200px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: 10px; gap: 2px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .burger { display: grid; margin-left: auto; }
  .nav-right .live-pill { display: none; }
  .pl-right { width: auto; } .vol { display: none; }
  .pl-track { width: 150px; } .pl-art { display: none; }
}
@media (max-width: 560px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: repeat(2,1fr); }
  .stats { grid-template-columns: 1fr 1fr; }
  .row { grid-template-columns: 30px 40px 1fr 70px; }
  .row .reg, .row .pf { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
  .pl-status { display: none; }
}
