:root {
  --bg: #0d0f12;
  --bg-2: #14171c;
  --bg-3: #1b1f26;
  --line: #262b33;
  --line-2: #323944;
  --ink: #eef1f5;
  --ink-2: #b6bdc8;
  --muted: #7c8593;
  --accent: #6ea8c7;
  --accent-2: #8fc3dd;
  --radius: 10px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: #b7dcec; }
img, video { display: block; max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }

/* ---------- шапка ---------- */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(13, 15, 18, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 26px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; }
.brand:hover { color: var(--ink); }
.brand .logo { width: 26px; height: 26px; }
.brand b { font-size: 18px; letter-spacing: 0.2px; font-weight: 650; }
.brand b em { color: var(--accent-2); font-style: normal; font-weight: 400; }
nav.main { margin-left: 8px; display: flex; gap: 2px; }
nav.main a { padding: 7px 12px; border-radius: 8px; color: var(--ink-2); font-size: 14.5px; }
nav.main a:hover { background: var(--bg-3); color: var(--ink); }
nav.main a[aria-current="page"] { color: var(--ink); background: var(--bg-3); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.iconbtn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--ink-2);
  border-radius: 8px; padding: 6px 11px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.iconbtn:hover { color: var(--ink); border-color: #465060; }
.iconbtn svg { width: 15px; height: 15px; }
.iconbtn.on { color: var(--accent-2); border-color: var(--accent); }
.lang { display: inline-flex; }
.lang button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px;
  padding: 4px 6px; cursor: pointer; border-radius: 6px;
}
.lang button[aria-current="true"] { color: var(--ink); }

/* ---------- герой ---------- */
.hero { position: relative; margin: 22px 0 6px; border-radius: 14px; overflow: hidden;
  background: #000; border: 1px solid var(--line); }
.hero video { width: 100%; height: min(64vh, 560px); object-fit: cover; display: block; }
.hero .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 26px 28px; background: linear-gradient(to top, rgba(6,8,10,0.78) 0%, rgba(6,8,10,0.12) 42%, rgba(6,8,10,0) 70%);
}
.hero h1 { margin: 0 0 6px; font-size: 26px; font-weight: 600; letter-spacing: -0.2px; }
.hero p { margin: 0; color: var(--ink-2); max-width: 60ch; }
.hero .badge-row { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }

.chip {
  font-size: 12px; color: var(--ink-2); background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12); padding: 2px 9px; border-radius: 20px;
}
.hero .play-hint {
  position: absolute; top: 16px; right: 16px; display: flex; gap: 8px;
}

/* ---------- кнопка запуска (видео не грузится до клика) ---------- */
.play-ov {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  z-index: 3; display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px 13px 18px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: #fff;
  background: rgba(12,14,18,0.72); border: 1px solid rgba(255,255,255,0.22);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background 0.15s ease, transform 0.15s ease;
}
.play-ov:hover { background: rgba(12,14,18,0.88); transform: translate(-50%, -50%) scale(1.04); }
.play-ov:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.play-ico {
  width: 0; height: 0; margin-left: 3px;
  border-left: 15px solid currentColor;
  border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}

/* ---------- сетка роликов ---------- */
h2.section { font-size: 17px; font-weight: 600; margin: 30px 0 4px; letter-spacing: -0.1px; }
.section-note { color: var(--muted); font-size: 13.5px; margin: 0 0 16px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.filters button {
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--ink-2);
  border-radius: 20px; padding: 5px 14px; font: inherit; font-size: 13.5px; cursor: pointer;
}
.filters button:hover { color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #08121a; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: var(--ink); display: block;
}
.card:hover { border-color: var(--line-2); color: var(--ink); }
.card .thumb { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; }
.card .thumb img, .card .thumb video { width: 100%; height: 100%; object-fit: cover; }
.card .thumb video { position: absolute; inset: 0; opacity: 0; transition: opacity .35s; }
.card:hover .thumb video { opacity: 1; }
.card .dur {
  position: absolute; right: 8px; bottom: 8px; font-size: 12px; color: #fff;
  background: rgba(0,0,0,0.62); padding: 1px 7px; border-radius: 5px; font-variant-numeric: tabular-nums;
}
.card .meta { padding: 11px 13px 13px; }
.card .meta h3 { margin: 0 0 3px; font-size: 15px; font-weight: 550; }
.card .meta .tags { color: var(--muted); font-size: 12.5px; }
.card .play-i {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .3s; pointer-events: none;
}
.card:hover .play-i { opacity: 1; }
.card .play-i span {
  width: 46px; height: 46px; border-radius: 50%; background: rgba(10,14,18,0.7);
  border: 1px solid rgba(255,255,255,0.35); display: flex; align-items: center; justify-content: center;
}

/* ---------- страница просмотра ---------- */
.watch { margin: 22px 0; }
.player-box { position: relative; background: #000; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.player-box video { width: 100%; max-height: 78vh; display: block; background: #000; }
.watch h1 { font-size: 22px; margin: 18px 0 6px; font-weight: 600; }
.watch .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 14px; }
.watch .sub a { color: var(--ink-2); }
.crumbs { color: var(--muted); font-size: 13px; margin: 4px 0 14px; }
.crumbs a { color: var(--muted); }

/* ---------- контентные страницы ---------- */
main { padding-bottom: 60px; }
.prose { max-width: 760px; }
.prose h1 { font-size: 26px; margin: 24px 0 12px; letter-spacing: -0.3px; }
.prose h2 { font-size: 18px; margin: 28px 0 10px; }
.prose p { color: var(--ink-2); margin: 0 0 13px; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose ul { color: var(--ink-2); margin: 0 0 13px; padding-left: 20px; }
.prose li { margin-bottom: 5px; }

table.grid-t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.grid-t th, table.grid-t td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
table.grid-t th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
table.grid-t td { color: var(--ink-2); }
.table-scroll { overflow-x: auto; }

footer.site { border-top: 1px solid var(--line); background: var(--bg-2); padding: 24px 0 34px; margin-top: 30px; }
footer.site .wrap { display: flex; gap: 30px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
footer.site .col b { display: block; color: var(--ink-2); margin-bottom: 7px; font-size: 13px; }
footer.site .col a { display: block; color: var(--ink-2); margin-bottom: 4px; }
footer.site .legal { margin-left: auto; max-width: 340px; }

/* ---------- кнопка доступа ---------- */
.cta {
  display: inline-block; padding: 7px 14px; border-radius: 8px;
  background: var(--accent); color: #08121a; font-size: 13px; font-weight: 600;
  border: 1px solid var(--accent); cursor: pointer; white-space: nowrap;
}
.cta:hover { background: var(--accent-2); border-color: var(--accent-2); color: #08121a; }

/* ---------- закрытая карточка ---------- */
.card.locked .thumb img { opacity: .62; filter: saturate(.85); transition: opacity .25s; }
.card.locked:hover .thumb img { opacity: .78; }
.card.locked .meta h3 { color: var(--ink-2); }
.card .lock {
  position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 8px 3px 7px; border-radius: 6px; font-size: 11.5px; letter-spacing: .2px;
  background: rgba(10, 13, 17, .78); color: var(--ink-2); border: 1px solid var(--line-2);
  backdrop-filter: blur(3px);
}
.card .lock svg { opacity: .85; }

/* ---------- закрытый ролик на странице просмотра ---------- */
.locked-panel { position: relative; }
.locked-panel img { width: 100%; aspect-ratio: 16 / 9; max-height: 72vh; object-fit: cover; opacity: .38; }
.locked-panel .lp-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 22px; gap: 10px;
}
.locked-panel h2 { margin: 0; font-size: 20px; font-weight: 600; }
.locked-panel p { margin: 0; color: var(--ink-2); max-width: 46ch; font-size: 14px; }

/* ---------- форма раннего доступа ---------- */
.lead { color: var(--ink-2); margin: 0 0 18px; }
.access-form { margin: 0 0 6px; }
.access-form .lbl { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.access-form .row { display: flex; gap: 8px; flex-wrap: wrap; }
.access-form input {
  flex: 1 1 240px; min-width: 0; padding: 9px 12px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--line-2); color: var(--ink);
  font: inherit; font-size: 14px;
}
.access-form input:focus { outline: none; border-color: var(--accent); }
.access-form button[type="submit"] {
  padding: 9px 16px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: #08121a; font: inherit; font-size: 14px;
  font-weight: 600; cursor: pointer;
}
.access-form button[type="submit"]:hover:not(:disabled) { background: var(--accent-2); }
.access-form button[type="submit"]:disabled { opacity: .55; cursor: default; }
.form-msg { min-height: 18px; margin: 9px 0 0; font-size: 13px; }
.form-msg.ok { color: var(--accent-2); }
.form-msg.err { color: #d99; }
.fine { color: var(--muted); font-size: 12.5px; margin: 6px 0 0; max-width: 58ch; }
.access-why { margin-top: 6px; }

/* ---------- модальное окно ---------- */
body.noscroll { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; background: rgba(6, 8, 11, .72); backdrop-filter: blur(2px); }
.modal-card {
  position: relative; width: 100%; max-width: 520px; background: var(--bg-2);
  border: 1px solid var(--line-2); border-radius: 14px; padding: 26px 26px 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.modal-card h2 { margin: 0 0 10px; font-size: 21px; font-weight: 600; }
.modal-x {
  position: absolute; right: 10px; top: 8px; background: none; border: 0;
  color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px;
}
.modal-x:hover { color: var(--ink); }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  header.site .wrap { gap: 14px; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero video { height: 44vh; }
  nav.main { display: none; }
  .modal-card { padding: 22px 18px 18px; }
}
