/* na-360 — страница закрытого эфира.
   Токены взяты из colors_and_type.css основного сайта: тот же тёплый чёрный,
   та же пара Playfair Display + Inter Light, те же квадратные углы и полное
   отсутствие теней. Страница тёмная — под видео это единственный вариант,
   и он ложится на «dark-hero» ритм основного сайта. */

/* ── Шрифты со своего сервера ────────────────────────────────────────
   Не с Google Fonts: у зрителей в РФ бывают перебои, а страница без
   шрифта выглядит сломанной. */
@font-face {
  font-family: "Playfair Display";
  src: url("./fonts/playfair-400-cyrillic.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Playfair Display";
  src: url("./fonts/playfair-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+2000-206F, U+2122, U+2191, U+2193, U+2212;
}
@font-face {
  font-family: "Inter";
  src: url("./fonts/inter-300-cyrillic.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("./fonts/inter-300-latin.woff2") format("woff2");
  font-weight: 300; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}
@font-face {
  font-family: "Inter";
  src: url("./fonts/inter-400-cyrillic.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter";
  src: url("./fonts/inter-400-latin.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2212;
}

:root {
  --ink:        #1C1C1C;
  --ink-lift:   #262626;   /* поверхность на тёмном: карточки, поля */
  --paper:      #FCFCFC;
  --cream:      #EDE5D8;
  --rouge:      #B85450;
  --fg-1:       var(--paper);
  --fg-2:       rgba(252, 252, 252, 0.72);
  --fg-3:       rgba(252, 252, 252, 0.48);
  --line:       rgba(252, 252, 252, 0.14);
  --line-soft:  rgba(252, 252, 252, 0.07);

  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-sans:    "Inter", system-ui, -apple-system, sans-serif;

  --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 40px; --s-9: 80px;
}

*, *::before, *::after { box-sizing: border-box; }

/* Атрибут hidden работает через правило [hidden]{display:none} в стилях
   браузера, а у него специфичность ниже любого нашего .class. Без этой
   строки .gate{display:grid} перебивает hidden, и экран входа не уезжает
   после успешного логина. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg-1);
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.eyebrow {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}

h1, h2 { font-family: var(--font-display); font-weight: 400; margin: 0; }
h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.15; }
h2 { font-size: clamp(20px, 3vw, 26px); line-height: 1.25; }

a { color: inherit; }

/* ── Шапка ─────────────────────────────────────────────────────────── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-5) 0;
  border-bottom: 1px solid var(--line-soft);
}
.mark {
  font-family: var(--font-display);
  font-size: 19px;
  letter-spacing: 0.04em;
}
.who {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  font-size: 13px;
  color: var(--fg-3);
  min-width: 0;
}
.who span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.linkish {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--fg-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.linkish:hover { color: var(--fg-1); }

/* ── Экран входа ───────────────────────────────────────────────────── */
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: var(--s-6) var(--s-5);
}
.gate-card { width: 100%; max-width: 420px; }
.gate h1 { margin: var(--s-4) 0 var(--s-3); }
.gate p { color: var(--fg-2); margin: 0 0 var(--s-6); }

.field { display: block; margin-bottom: var(--s-4); }
.field input {
  width: 100%;
  padding: 15px var(--s-4);
  font: inherit;
  font-size: 16px;             /* меньше 16px — iOS Safari зумит поле при фокусе */
  color: var(--fg-1);
  background: var(--ink-lift);
  border: 1px solid var(--line);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
}
.field input:focus { border-color: var(--cream); }
.field input::placeholder { color: var(--fg-3); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 15px var(--s-5);
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--paper);
  border-radius: 0;
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.btn:hover { background: transparent; color: var(--paper); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.btn-ghost { color: var(--paper); background: transparent; }
.btn-ghost:hover { background: var(--paper); color: var(--ink); }

.note {
  margin-top: var(--s-4);
  font-size: 14px;
  min-height: 1.6em;
  color: var(--fg-3);
}
.note[data-state="error"] { color: var(--rouge); }

/* ── Плеер ─────────────────────────────────────────────────────────── */
.stage { padding: var(--s-6) 0 var(--s-9); }

.player-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--line-soft);
  overflow: hidden;
}
.player-frame > #player { position: absolute; inset: 0; }
.player-frame video { width: 100%; height: 100%; object-fit: contain; }

/* Водяной знак. Внутри рамки плеера, поверх видео, кликами не перехватывает. */
.wm {
  position: absolute;
  z-index: 30;
  padding: 4px 9px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  background: rgba(0, 0, 0, 0.22);
  pointer-events: none;
  user-select: none;
  transition: top 1.4s ease, left 1.4s ease;
  white-space: nowrap;
}

/* Слой поверх видео: «включить звук», «вы вошли с другого устройства», ошибки */
.veil {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  gap: var(--s-4);
  padding: var(--s-5);
  text-align: center;
  background: rgba(28, 28, 28, 0.82);
  backdrop-filter: blur(2px);
}
.veil[hidden] { display: none; }
.veil-inner { max-width: 360px; }
.veil h2 { margin-bottom: var(--s-3); }
.veil p { color: var(--fg-2); margin: 0 0 var(--s-5); }
.veil .btn { width: auto; padding-left: var(--s-7); padding-right: var(--s-7); }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-4);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--rouge);
}
.dot[data-live="1"] { animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: 0.25; } }

/* ── Нижние блоки ──────────────────────────────────────────────────── */
.below {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--s-9);
  margin-top: var(--s-7);
}
@media (max-width: 800px) {
  .below { grid-template-columns: 1fr; gap: var(--s-7); }
}

.schedule { list-style: none; margin: var(--s-5) 0 0; padding: 0; }
.schedule li {
  display: flex;
  align-items: baseline;
  gap: var(--s-5);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line-soft);
}
.schedule li:last-child { border-bottom: 1px solid var(--line-soft); }
.schedule time {
  flex: 0 0 auto;
  min-width: 128px;
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--fg-3);
  font-variant-numeric: tabular-nums;
}
.schedule .t { color: var(--fg-1); }
.schedule li[data-soon="1"] .t { color: var(--cream); }
@media (max-width: 560px) {
  .schedule li { flex-direction: column; gap: 2px; }
  .schedule time { min-width: 0; }
}

.aside p { color: var(--fg-2); font-size: 15px; margin: var(--s-4) 0 var(--s-5); }
