/* =========================================================
   one — каркас главной
   ========================================================= */

/* ---------- Шрифт ONY Sans ----------
   Файлы лежат в assets/fonts/ (см. README.txt там же).
   Основное семейство "Ony Sans": Regular 400, Medium 500, Bold 700.
   Дополнительно подключены "Ony Sans Normal" и "Ony Sans Title" — можно указать
   через font-family там, где они нужны. */
@font-face {
  font-family: "Ony Sans";
  src: url("../fonts/OnySans-Regular.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ony Sans";
  src: url("../fonts/OnySans-Medium.otf") format("opentype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ony Sans";
  src: url("../fonts/OnySans-Bold.otf") format("opentype");
  font-weight: 700 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ony Sans Normal";
  src: url("../fonts/OnySans-Normal.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Ony Sans Title";
  src: url("../fonts/OnySans-Title.otf") format("opentype");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* ---------- Токены ---------- */
:root {
  --bg:      #000;
  --surface: #151515;
  --raise:   #222;
  --text:    #fff;
  --muted:   #a6a6a6;
  --hair:    #2e2e2e;

  --violet: #5B2EFF;
  --pink:   #FF3D8B;
  --yellow: #FFE135;
  --mint:   #22E3A0;
  --ink:    #000;
  --paper:  #fff;

  --r-xl: 28px;
  --r-lg: 20px;
  --r-md: 14px;

  --font: "Ony Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --wrap: 1360px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
html:has(dialog[open]) { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px; line-height: 1.5;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
main { overflow-x: clip; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 8px; top: -100px; z-index: 300;
  background: var(--yellow); color: var(--ink); border-radius: 999px;
  padding: 10px 18px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 8px; }

/* ---------- Мелкие элементы ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 2px solid var(--paper); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-weight: 700; font-size: 16px; line-height: 1.1;
  text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--yellow); border-color: var(--yellow); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--hair); }
.btn--ghost:hover { background: var(--raise); border-color: var(--raise); color: var(--text); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--violet { background: var(--violet); border-color: var(--violet); color: var(--paper); }
.btn--violet:hover { background: var(--pink); border-color: var(--pink); color: var(--ink); }
.btn[aria-pressed="true"] { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--raise); cursor: pointer;
  transition: background-color .15s, color .15s;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover, .icon-btn[aria-expanded="true"] { background: var(--yellow); color: var(--ink); }

.dot {
  width: 9px; height: 9px; flex: 0 0 auto;
  border-radius: 50%; background: currentColor;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

.age {
  --age-h: 22px;
  display: inline-flex; flex: 0 0 auto;
  border-radius: 3px; background: var(--ink);
  line-height: 0; vertical-align: middle;
}
.age img { height: var(--age-h); width: auto; display: block; }
.age--text { padding: 2px 6px; line-height: 1.2; font-weight: 900; font-size: 13px; color: var(--paper); border: 1px solid var(--paper); }
.age--head { --age-h: 26px; }
.age--big { --age-h: 36px; }

.more {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
  border: 2px solid var(--hair); border-radius: 999px;
  font-weight: 700; font-size: 15px; text-decoration: none;
  transition: background-color .15s, border-color .15s, color .15s;
}
.more:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.link-btn {
  display: block; margin-inline: auto;
  background: none; border: 0; padding: 6px 0; margin-bottom: 10px;
  font-weight: 700; color: var(--muted); cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.link-btn:hover { color: var(--text); }
.link-btn[hidden] { display: none; }

/* ---------- Хедер ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--hair);
  padding-top: env(safe-area-inset-top, 0px);
}
.header__inner { display: flex; align-items: center; gap: 28px; height: var(--header-h); }

.logo { display: inline-flex; text-decoration: none; flex: 0 0 auto; }
.logo__img { --logo-h: 44px; display: block; height: var(--logo-h); width: auto; transition: opacity .15s;
  margin-left: calc(var(--logo-h) * -.23); /* у SVG есть поля — выравниваем знак по колонке */ }
.logo:hover .logo__img { opacity: .8; }

.nav ul { display: flex; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  font-weight: 700; font-size: 16px; text-decoration: none;
  transition: background-color .15s, color .15s;
}
.nav a:hover { background: var(--raise); }
.nav a[aria-current="true"] { color: var(--yellow); }
.nav__live .dot { color: var(--pink); }

.header__tools { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.burger {
  display: none; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--yellow); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.burger span { width: 18px; height: 2.5px; border-radius: 2px; background: var(--ink); transition: transform .2s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(4.25px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-4.25px) rotate(-45deg); }

/* ---------- Секции ---------- */
.section { padding-block: clamp(40px, 6vw, 80px); }
.section--first { padding-top: clamp(24px, 3vw, 40px); }
.section + .section { border-top: 1px solid var(--hair); }
.section__head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 16px 32px; margin-bottom: clamp(20px, 3vw, 32px);
}
.section__title { font-size: clamp(40px, 6vw, 80px); font-weight: 900; line-height: .92; letter-spacing: -.045em; }

/* ---------- Прямой эфир ---------- */
/* Окно плеера — строго 16:9, как трансляция. Фон — заставка канала. */
.live-tile {
  position: relative; width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-xl); overflow: hidden;
  background: #000 url("../img/player-bg.jpg") center / cover no-repeat;
}
@media (max-width: 1000px) {
  .live-tile { background-image: url("../img/player-bg-960.jpg"); }
}
.live-tile__top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: clamp(10px, 1.6vw, 20px);
}
.badge-live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px 7px 12px; border-radius: 999px;
  background: var(--pink); color: var(--ink);
  font-weight: 700; font-size: 15px;
}
.live-tile.is-idle .badge-live { background: var(--paper); }
.clock {
  padding: 4px 14px 5px; border-radius: 999px;
  background: rgba(0,0,0,.75); color: var(--paper);
  font-weight: 700; font-size: 20px; font-variant-numeric: tabular-nums;
}
.clock span { font-size: 13px; color: var(--muted); }
/* Кнопка под логотипом заставки, чтобы не закрывать его */
.live-tile__play {
  position: absolute; left: 50%; bottom: 8%; z-index: 2; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 24px 12px 18px; border: 0; border-radius: 999px;
  background: var(--paper); color: var(--ink); cursor: pointer;
  font-weight: 700; font-size: 17px; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .15s;
}
.live-tile__play svg { width: 22px; height: 22px; }
.live-tile__play:hover { transform: scale(1.05); background: var(--yellow); }

.live-tile__frame { display: none; }
.live-tile.is-playing .live-tile__frame { display: block; position: absolute; inset: 0; z-index: 4; background: #000; }
.live-tile__frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.live-tile.is-playing .live-tile__top,
.live-tile.is-playing .live-tile__play { visibility: hidden; }

/* Панель «Сейчас на one» под плеером */
.now {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  margin-top: 16px; padding: clamp(18px, 2.4vw, 28px);
  border-radius: var(--r-lg); background: var(--surface);
}
.now__info { display: grid; gap: 8px; flex: 1 1 420px; min-width: 0; }
.now__kicker { font-weight: 700; font-size: 14px; color: var(--muted); }
.now__title { font-size: clamp(26px, 3vw, 40px); font-weight: 700; line-height: 1; letter-spacing: -.03em; }
.now__block { display: block; font-size: 13px; letter-spacing: 0; color: var(--pink); margin-bottom: 6px; }
.now__row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.now__muted { font-size: 15px; color: var(--muted); }
.progress { height: 6px; border-radius: 999px; background: var(--raise); overflow: hidden; }
.progress__fill { height: 100%; background: var(--yellow); transition: width .6s linear; }
.now__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Телепрограмма ---------- */
.tz { display: grid; gap: 8px; }
.tz__label { font-weight: 700; font-size: 14px; color: var(--muted); }
.tz__opts { display: inline-flex; padding: 4px; gap: 4px; border-radius: 999px; background: var(--surface); }
.tz__opts button {
  padding: 8px 14px; border: 0; border-radius: 999px;
  background: none; font-weight: 700; font-size: 15px; cursor: pointer; white-space: nowrap;
}
.tz__opts button:hover { background: var(--raise); }
.tz__note { font-size: 13px; color: var(--muted); }
.tz__reset {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--yellow);
  text-decoration: underline; text-underline-offset: 3px;
}
.tz__opts button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }



.section__head--center { justify-content: center; text-align: center; }
.schedule { max-width: 880px; margin-inline: auto; }
.days-nav { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.days-nav__arrow {
  flex: 0 0 auto; width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface); cursor: pointer;
  transition: background-color .15s, color .15s, opacity .15s;
}
.days-nav__arrow svg { width: 20px; height: 20px; }
.days-nav__arrow:hover:not(:disabled) { background: var(--paper); color: var(--ink); }
.days-nav__arrow:disabled { opacity: .3; cursor: default; }
.days {
  position: relative; flex: 1; min-width: 0;
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 2px 0;
  /* мягко гасим края ленты */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
          mask-image: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}
/* центрирование, которое не обрезает ленту при прокрутке на узких экранах */
.days > :first-child { margin-left: auto; }
.days > :last-child { margin-right: auto; }
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto; min-width: 96px; padding: 10px 16px 12px;
  border: 0; border-radius: var(--r-md);
  background: var(--surface); text-align: center; cursor: pointer;
  transition: background-color .15s;
}
.day b { display: block; font-size: 20px; font-weight: 900; line-height: 1.2; }
.day small { font-size: 14px; color: var(--muted); }
.day:hover { background: var(--raise); }
.day[aria-selected="true"] { background: var(--violet); }
.day[aria-selected="true"] small { color: rgba(255,255,255,.8); }

.programs { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.prog {
  display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 2.4vw, 24px);
  border-top: 1px solid var(--hair);
  transition: background-color .4s;
}
.prog:first-child { border-top: 0; }
.prog__main { display: grid; gap: 2px; min-width: 0; }
.prog__block { font-size: 12px; font-weight: 700; letter-spacing: .02em; color: var(--pink); }
.prog.is-now .prog__block { color: var(--ink); opacity: .7; }
.prog.is-flash { background: var(--violet); }
.prog--empty { display: block; text-align: center; color: var(--muted); padding: 28px; }
.prog time { font-weight: 900; font-size: 22px; font-variant-numeric: tabular-nums; }
.prog__title { display: block; font-weight: 700; font-size: 19px; line-height: 1.2; }
.prog__genre { display: block; font-size: 14px; color: var(--muted); }
.prog__side { display: flex; align-items: center; gap: 10px; }
.prog.is-past { color: #6d6d6d; }
.prog.is-past .prog__genre { color: #555; }
.prog.is-now { background: var(--yellow); color: var(--ink); }
.prog.is-now .prog__genre { color: rgba(0,0,0,.65); }
.now-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 12px 3px 10px; border-radius: 999px;
  background: var(--pink); color: var(--ink); font-weight: 900; font-size: 14px;
}


/* ---------- О сайте ---------- */
.about__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px 48px; }
.about__title { font-size: clamp(26px, 2.8vw, 36px); font-weight: 900; line-height: 1.05; letter-spacing: -.02em; max-width: 16ch; }
.about__text { display: grid; gap: 14px; color: var(--muted); max-width: 64ch; }

/* ---------- Футер ---------- */
.footer {
  border-top: 1px solid var(--hair);
  padding: clamp(40px, 5vw, 64px) 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
.footer__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.footer__brand { display: grid; gap: 14px; justify-items: start; align-content: start; }
.footer a { text-decoration: none; }
.footer a:hover { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }
.footer__links { display: grid; gap: 8px; font-weight: 700; }
.footer__social { display: grid; gap: 16px; justify-items: start; align-content: start; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
  display: inline-flex; padding: 8px 16px; border-radius: 999px;
  background: var(--surface); font-weight: 700; font-size: 15px;
}
.socials a:hover { background: var(--violet); text-decoration: none; }

/* ---------- Тост ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 400;
  max-width: calc(100% - 32px); padding: 14px 22px; border-radius: 999px;
  background: var(--yellow); color: var(--ink); font-weight: 700; text-align: center;
  transform: translate(-50%, 160%); visibility: hidden; pointer-events: none;
  transition: transform .3s var(--ease), visibility 0s linear .3s;
}
.toast.is-shown { transform: translate(-50%, 0); visibility: visible; transition: transform .3s var(--ease); }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1180px) {
  .nav a { padding: 8px 10px; font-size: 15px; }
  .header__inner { gap: 16px; }
}

@media (max-width: 1000px) {
  :root { --header-h: 64px; }
  .burger { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    display: none; background: var(--bg); border-bottom: 1px solid var(--hair);
  }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; padding: 10px var(--gutter) 22px; }
  .nav a { font-size: 28px; font-weight: 900; letter-spacing: -.03em; padding: 8px 12px; }
  .logo__img { --logo-h: 38px; }

  .footer__top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .about__inner { grid-template-columns: minmax(0, 1fr); }
  .prog { grid-template-columns: 62px minmax(0, 1fr); gap: 4px 12px; }
  .prog__side { grid-column: 2; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
  .prog time { font-size: 18px; }
  .prog__title { font-size: 17px; }
  .live-tile__play { padding: 8px 16px 8px 12px; font-size: 14px; bottom: 6%; }
  .live-tile__play svg { width: 18px; height: 18px; }
  .badge-live { font-size: 13px; padding: 4px 10px 5px 9px; }
  .clock { font-size: 15px; padding: 3px 10px 4px; }
  .days-nav__arrow { width: 36px; height: 36px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .hide-sm { display: none; }
  .tz { width: 100%; }
  .tz__opts { display: flex; }
  .tz__opts button { flex: 1; padding: 8px 4px; font-size: 14px; }
  .footer__top { grid-template-columns: minmax(0, 1fr); }
}

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