@import "fonts.css";

/* ==========================================================================
   Поп Волна FM — таблица стилей
   Палитра и шрифты управляются переменными ниже. Тёмная тема — по умолчанию,
   светлая — через [data-theme="light"]. Анимации уважают prefers-reduced-motion.
   ========================================================================== */

:root {
  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Палитра — тёмная тема */
  --bg: #0a0717;
  --bg-2: #130a2b;
  --bg-3: #1c0f3d;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.2);
  --text: #f5f2ff;
  --muted: #ab9fd0;
  --muted-2: #7c7099;

  --primary: #ff3d81;
  --primary-2: #b14dff;
  --accent: #34e3ff;
  --gold: #ffcf5c;

  --grad-brand: linear-gradient(115deg, #ff3d81 0%, #b14dff 55%, #34e3ff 120%);
  --grad-soft: linear-gradient(135deg, rgba(255, 61, 129, 0.18), rgba(52, 227, 255, 0.12));
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --shadow-glow: 0 0 0 1px rgba(255, 61, 129, 0.25), 0 18px 50px -20px rgba(177, 77, 255, 0.55);

  --radius: 20px;
  --radius-sm: 12px;
  --maxw: 1140px;
  --player-h: 84px;
}

[data-theme="light"] {
  --bg: #f6f3ff;
  --bg-2: #efe9ff;
  --bg-3: #e7ddff;
  --surface: rgba(20, 10, 43, 0.04);
  --surface-2: rgba(20, 10, 43, 0.06);
  --border: rgba(20, 10, 43, 0.12);
  --border-strong: rgba(20, 10, 43, 0.22);
  --text: #1a1033;
  --muted: #5b4f7a;
  --muted-2: #847aa0;
  --shadow: 0 24px 60px -32px rgba(60, 20, 110, 0.4);
  --shadow-glow: 0 0 0 1px rgba(177, 77, 255, 0.2), 0 18px 50px -24px rgba(177, 77, 255, 0.4);
}

/* --------------------------------------------------------------------- base */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-bottom: calc(var(--player-h) + 12px);
}

/* живой фон: аврора-пятна */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax;
  z-index: -2;
  background:
    radial-gradient(38vmax 38vmax at 12% 8%, rgba(255, 61, 129, 0.28), transparent 60%),
    radial-gradient(42vmax 42vmax at 88% 18%, rgba(52, 227, 255, 0.2), transparent 62%),
    radial-gradient(46vmax 46vmax at 70% 92%, rgba(177, 77, 255, 0.26), transparent 60%);
  filter: blur(8px);
  animation: aurora 26s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent);
}

@keyframes aurora {
  0%   { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(3%, 2%, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(5%, -3%, 0) rotate(-6deg) scale(1.04); }
}

a { color: inherit; text-decoration: none; }

img, svg { max-width: 100%; display: block; }

::selection { background: var(--primary); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  z-index: 200;
}
.skip-link:focus { left: 12px; }

/* ------------------------------------------------------------------ typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 800;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); font-weight: 600; }

p { margin: 0 0 1.1em; }

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 26px;
  height: 2px;
  background: var(--grad-brand);
  border-radius: 2px;
}

.section { padding: clamp(56px, 9vw, 110px) 0; }
.section-head { max-width: 720px; margin-bottom: 42px; }
.section-head.center { margin-inline: auto; text-align: center; }
.lead { font-size: 1.18rem; color: var(--muted); }

/* ---------------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  margin-right: auto;
}
.brand .logo {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 4px 12px rgba(255, 61, 129, 0.5));
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  50% { transform: scale(1.07); }
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.nav-links {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}
.nav-tools { display: flex; gap: 8px; align-items: center; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .moon { display: none; }
[data-theme="light"] .theme-toggle .sun { display: none; }
[data-theme="light"] .theme-toggle .moon { display: block; }

.menu-toggle { display: none; }

/* ---------------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s, background 0.2s;
  white-space: nowrap;
}
.btn-primary {
  background: var(--grad-brand);
  color: #fff;
  background-size: 180% 180%;
  animation: shift 7s ease infinite;
  box-shadow: var(--shadow-glow);
}
@keyframes shift {
  50% { background-position: 100% 50%; }
}
.btn-primary:hover { transform: translateY(-3px) scale(1.02); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { transform: translateY(-3px); background: var(--surface-2); }

/* ------------------------------------------------------------------------- hero */
.hero { position: relative; padding-top: clamp(48px, 7vw, 86px); }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero .lead { max-width: 46ch; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.hero-stats .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  display: block;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-stats span small { color: var(--muted); font-size: 0.85rem; }

/* виниловый диск */
.disc-wrap { display: grid; place-items: center; position: relative; }
.disc {
  width: min(360px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle, #0c0a16 0 2px, #15101f 2px 5px);
  position: relative;
  box-shadow: var(--shadow), inset 0 0 0 2px rgba(255, 255, 255, 0.05);
  animation: spin 16s linear infinite;
}
.disc::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 61, 129, 0.25), transparent 40%);
}
.disc-label {
  position: absolute;
  inset: 33%;
  border-radius: 50%;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: inset 0 0 0 6px rgba(0, 0, 0, 0.25);
}
.disc-label::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--bg);
}
.disc-wrap.paused .disc { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }

/* бегущая строка */
.ticker {
  margin-top: 46px;
  border-block: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker-track {
  display: flex;
  gap: 38px;
  width: max-content;
  animation: marquee 32s linear infinite;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ticker-track span { display: inline-flex; align-items: center; gap: 38px; }
.ticker-track span::after { content: "✦"; color: var(--primary); }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------ станции (карточки) */
.stations-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.chip {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.active { background: var(--grad-brand); color: #fff; border-color: transparent; }

.station-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}
.station-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  isolation: isolate;
}
.station-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grad-soft);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}
.station-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-glow);
}
.station-card:hover::before { opacity: 1; }
.station-card.playing {
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}
.station-card.playing::before { opacity: 1; }

.sc-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.sc-emoji {
  flex: none;
  width: 54px; height: 54px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.sc-title { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; margin: 0; }
.sc-flag { font-size: 1rem; }
.sc-owner { color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.sc-desc { color: var(--muted); font-size: 0.95rem; margin: 0 0 14px; }

.sc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.sc-tags .tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

.sc-meta {
  display: grid;
  gap: 8px;
  font-size: 0.82rem;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
  margin-bottom: 16px;
}
.sc-meta .row { display: flex; justify-content: space-between; gap: 12px; }
.sc-meta .row dt { color: var(--muted-2); }
.sc-meta .row dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; }
.sc-meta .row dd.src { font-weight: 500; color: var(--muted); font-family: ui-monospace, "Cascadia Code", monospace; font-size: 0.78rem; word-break: break-all; }

.sc-actions { display: flex; align-items: center; gap: 12px; }
.play-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 999px;
  border: none;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}
.play-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-glow); }
.play-btn svg { width: 16px; height: 16px; }
.station-card.playing .play-btn .i-play { display: none; }
.station-card:not(.playing) .play-btn .i-pause { display: none; }

.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}
.live-dot b {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 0 rgba(255, 61, 129, 0.6);
  animation: ping 1.8s ease-out infinite;
}
@keyframes ping {
  70%, 100% { box-shadow: 0 0 0 8px rgba(255, 61, 129, 0); }
}

/* ------------------------------------------------------------- факты / счётчики */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.fact {
  text-align: center;
  padding: 30px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}
.fact .big {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.9rem);
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.fact p { color: var(--muted); margin: 6px 0 0; font-size: 0.95rem; }

/* ------------------------------------------------------------------- инфо-сетка */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.info-card {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s, border-color 0.25s;
}
.info-card:hover { transform: translateY(-5px); border-color: var(--border-strong); }
.info-card .ic-emoji { font-size: 1.8rem; margin-bottom: 10px; }
.info-card h3 { margin-bottom: 8px; }
.info-card p { color: var(--muted); margin: 0; font-size: 0.96rem; }

/* тизеры → ссылки на статьи */
.teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.teaser {
  display: flex;
  flex-direction: column;
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.teaser:hover { transform: translateY(-5px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.teaser .t-kicker { font-size: 0.76rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--primary); font-weight: 700; }
.teaser h3 { margin: 10px 0 8px; }
.teaser p { color: var(--muted); font-size: 0.95rem; }
.teaser .t-more { margin-top: auto; font-weight: 700; color: var(--accent); display: inline-flex; gap: 6px; align-items: center; }
.teaser:hover .t-more { gap: 12px; }
.t-more { transition: gap 0.2s; }

/* --------------------------------------------------------------- статьи (.prose) */
.article-hero { padding: clamp(48px, 7vw, 84px) 0 0; }
.breadcrumbs { font-size: 0.85rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span { color: var(--muted-2); }

.article-layout { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.toc {
  position: sticky;
  top: 90px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 20px;
  font-size: 0.92rem;
}
.toc strong { display: block; font-family: var(--font-display); margin-bottom: 12px; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.toc a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--muted); }
.toc a:hover { color: var(--text); background: var(--surface-2); }

.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.8em; scroll-margin-top: 90px; }
.prose h3 { margin-top: 1.4em; scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 4px 0 4px 22px;
  border-left: 3px solid var(--primary);
  font-size: 1.1rem;
  color: var(--text);
  font-style: italic;
}

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  background: var(--grad-soft);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 1.8em 0;
}
.callout strong { color: var(--text); }
.callout p:last-child { margin-bottom: 0; }

/* профили исполнителей / станций */
.profile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
  margin-bottom: 18px;
  transition: transform 0.2s, border-color 0.2s;
}
.profile:hover { transform: translateX(4px); border-color: var(--border-strong); }
.profile .avatar {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--grad-brand);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  color: #fff;
}
.profile h3 { margin: 0 0 4px; }
.profile p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.profile .years { font-size: 0.8rem; color: var(--primary); font-weight: 700; }

/* --------------------------------------------------------------------- плеер */
.player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  height: var(--player-h);
  background: color-mix(in srgb, var(--bg-2) 86%, transparent);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-strong);
  transform: translateY(110%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.player.active { transform: translateY(0); }
.player-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}
.player .mini-disc {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #0c0a16 0 2px, #1a1326 2px 4px);
  flex: none;
  position: relative;
  animation: spin 6s linear infinite;
}
.player .mini-disc::after {
  content: ""; position: absolute; inset: 38%;
  border-radius: 50%; background: var(--grad-brand);
}
.player.paused .mini-disc { animation-play-state: paused; }
.player-info { min-width: 0; }
.player-info .pname { font-family: var(--font-display); font-weight: 600; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-info .pstatus { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.player-controls { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* эквалайзер */
.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.eq i { width: 3px; background: var(--primary); border-radius: 2px; height: 30%; animation: bounce 1s ease-in-out infinite; }
.eq i:nth-child(2) { animation-delay: 0.2s; }
.eq i:nth-child(3) { animation-delay: 0.4s; }
.eq i:nth-child(4) { animation-delay: 0.1s; }
.player.paused .eq i { animation-play-state: paused; height: 30%; }
@keyframes bounce { 50% { height: 100%; } }

.vol { display: flex; align-items: center; gap: 8px; }
.vol input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 90px; height: 5px;
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
}
.vol input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--grad-brand);
}
.vol input[type="range"]::-moz-range-thumb {
  width: 15px; height: 15px; border: none;
  border-radius: 50%; background: var(--primary);
}
.player-controls .vol { display: none; }

/* ---------------------------------------------------------------------- footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 56px 0 30px;
  background: var(--surface);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 36px;
}
.footer-grid h4 { font-family: var(--font-display); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-grid a { color: var(--muted); font-size: 0.95rem; }
.footer-grid a:hover { color: var(--text); }
.footer-about p { color: var(--muted); font-size: 0.95rem; max-width: 38ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
  color: var(--muted-2);
  font-size: 0.85rem;
}

/* ----------------------------------------------------------------- cookie-баннер */
.cookie {
  position: fixed;
  left: 18px; right: 18px;
  bottom: calc(var(--player-h) + 18px);
  z-index: 110;
  max-width: 460px;
  margin-inline: auto;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-2) 94%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  padding: 20px;
  transform: translateY(160%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cookie.show { transform: translateY(0); }
.cookie p { font-size: 0.9rem; color: var(--muted); margin: 0 0 14px; }
.cookie .row { display: flex; gap: 10px; }
.cookie a { color: var(--accent); text-decoration: underline; }

/* ------------------------------------------------------------------- 404 page */
.error-page {
  min-height: 72vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 0;
}
.error-code {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(6rem, 24vw, 14rem);
  line-height: 1;
  background: var(--grad-brand);
  background-size: 200% 200%;
  animation: shift 6s ease infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------- scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.reveal.in { opacity: 1; transform: none; }

/* --------------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .disc-wrap { order: -1; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed;
    inset: 72px 0 auto 0;
    flex-direction: column;
    gap: 4px;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 14px 22px 22px;
    transform: translateY(-130%);
    transition: transform 0.3s;
    box-shadow: var(--shadow);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; }
  .menu-toggle { display: inline-grid; }
  .footer-grid { grid-template-columns: 1fr; }
  .player-info .pname { max-width: 40vw; }
}

@media (min-width: 560px) {
  .player-controls .vol { display: flex; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
