/* ===== Цвета и размеры ===== */
:root {
  --bg: #0D100E;
  --bg-glass: rgba(13, 16, 14, .78);
  --card: #171C18;
  --card-2: #202722;
  --text: #EEF3EE;
  --muted: #9AA79C;
  --ink: #000;            /* толстые контуры и плотные тени */
  --line: #2C352E;
  --dot: rgba(191, 238, 22, .07);

  --lime: #BFEE16;        /* 🎾 главный акцент */
  --on-lime: #0D100E;
  --bun: #FF9F24;         /* 🍔 второй акцент */
  --tomato: #EF4444;      /* 🍅 кнопки YouTube */
  --court: #228B48;
  --sky: #29B6F6;

  --stroke: 2.5px;
  --radius: 18px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);

  --font-title: "Lilita One", "Rubik", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --font-pixel: "Silkscreen", "Pixelify Sans", ui-monospace, monospace;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #F4F7F4;
  --bg-glass: rgba(244, 247, 244, .8);
  --card: #FFFFFF;
  --card-2: #E7EDE7;
  --text: #141A15;
  --muted: #56635A;
  --ink: #141A15;
  --line: #CBD5CC;
  --dot: rgba(20, 26, 21, .09);
  --lime: #5D9300;
  --on-lime: #0D100E;
  color-scheme: light;
}

/* ===== База ===== */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image: radial-gradient(var(--dot) 1.3px, transparent 1.3px);
  background-size: 22px 22px;
  color: var(--text);
  font: 400 17px/1.6 var(--font-body);
}

main { flex: 1; }

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

a { color: inherit; text-decoration-color: var(--lime); text-underline-offset: 3px; }
a:hover { color: var(--lime); }

h1, h2, h3 {
  margin: 0 0 .4em;
  font-family: var(--font-title);
  font-weight: 800;          /* для запасного Rubik на кириллице */
  font-synthesis: none;      /* Lilita One без фальшивого жирного */
  line-height: 1.1;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.6rem, 9vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 5vw, 2.3rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px dashed var(--lime); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 880px; margin-inline: auto; padding-inline: 16px; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 8px 14px; border-radius: 999px;
  background: var(--lime); color: var(--on-lime); font-weight: 800;
}
.skip:focus { top: 12px; }

/* Пиксельная подпись в стиле комментария: // 01 · что-то */
.tag {
  margin: 0 0 .6em;
  font: 400 13px/1.4 var(--font-pixel);
  letter-spacing: .04em;
  color: var(--lime);
}

/* Объёмная «игровая» тень заголовка */
.title-pop { text-shadow: 0 3px 0 var(--ink), 0 6px 0 rgba(0, 0, 0, .25); }

.lead { font-size: 1.15rem; max-width: 40em; }
.muted { color: var(--muted); }
.small { font-size: .92rem; }

/* ===== Шапка ===== */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg-glass);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.top__in {
  display: flex; align-items: center; gap: 8px 16px;
  min-height: 64px; flex-wrap: wrap;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
  font: 400 1.5rem/1 var(--font-title);
}
.logo:hover { color: var(--text); }
.logo svg { transition: transform .5s var(--spring); }
.logo:hover svg { transform: rotate(200deg); }

.nav { display: flex; gap: 2px; margin-left: auto; }
.nav a {
  padding: 6px 11px; border-radius: 999px;
  text-decoration: none; font-weight: 700; white-space: nowrap;
  color: var(--muted);
}
.nav a:hover { color: var(--text); background: var(--card-2); }
/* Раздел пока закрыт: виден в меню, но не кликается */
.nav__soon {
  padding: 6px 11px; border-radius: 999px;
  font-weight: 700; white-space: nowrap;
  color: var(--muted); opacity: .5; cursor: not-allowed;
}
.nav__soon::after {
  content: attr(data-soon);
  margin-left: 4px; vertical-align: super;
  font: 400 9px/1 var(--font-pixel); color: var(--bun);
}
.nav a[aria-current="page"] { color: var(--on-lime); background: var(--lime); }

.tools { display: flex; gap: 6px; }
.icon-btn {
  display: grid; place-items: center;
  min-width: 38px; height: 38px; padding: 0 8px;
  border: var(--stroke) solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--text); cursor: pointer;
  font: 400 12px/1 var(--font-pixel);
}
.icon-btn:hover { border-color: var(--lime); }

@media (max-width: 760px) {
  .top__in { padding-block: 10px; }
  .tools { margin-left: auto; }
  .nav {
    order: 3; width: 100%; margin: 0;
    overflow-x: auto; scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
}

/* ===== Кнопки-таблетки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  border: var(--stroke) solid var(--ink); border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  background: var(--card-2); color: var(--text);
  font: 800 1rem/1.2 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: transform .25s var(--spring), box-shadow .25s var(--spring);
}
.btn:hover { color: inherit; transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--ink); transition-duration: .05s; }
.btn--lime { background: var(--lime); color: var(--on-lime); }
.btn--lime:hover { color: var(--on-lime); }
.btn--yt { background: var(--tomato); color: #fff; }
.btn--yt:hover { color: #fff; }
.btn--big { padding: 16px 30px; font-size: 1.2rem; }

.actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ===== Карточки и секции ===== */
.card {
  background: var(--card);
  border: var(--stroke) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--ink);
  padding: 24px;
}

.section { padding-block: 40px; }
.section + .section { padding-top: 0; }
.page-head { padding-block: 56px 24px; }

/* Маркеры списков — теннисные мячики */
.balls { margin: 0; padding: 0; list-style: none; }
.balls li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.balls li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--ink);
  background: radial-gradient(circle at 30% 30%, #E6FF6A, var(--lime) 60%);
}

/* ===== Главная ===== */
.game { position: relative; overflow: hidden; }
.game::after {               /* полоска корта по нижнему краю */
  content: ""; position: absolute; inset: auto 0 0;
  height: 8px; background: repeating-linear-gradient(90deg, var(--court) 0 40px, #1c7a3e 40px 80px);
}
.game__title { font-size: clamp(2.1rem, 8vw, 3.4rem); color: var(--lime); }
.game p { max-width: 36em; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 14px; padding: 5px 12px;
  border: 1.5px solid var(--bun); border-radius: 999px;
  font: 400 12px/1.4 var(--font-pixel); color: var(--bun);
}
.status::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--bun); animation: blink 1.6s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .2; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips li {
  padding: 3px 12px; border-radius: 999px;
  background: var(--card-2); font-weight: 700; font-size: .9rem;
}

.steps { margin: 0 0 24px; padding: 0; list-style: none; counter-reset: s; }
.steps li {
  position: relative; counter-increment: s;
  padding: 0 0 14px 48px; min-height: 36px;
}
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: -2px;
  display: grid; place-items: center; width: 34px; height: 34px;
  border: var(--stroke) solid var(--ink); border-radius: 50%;
  background: var(--lime); color: var(--on-lime);
  font: 400 1.1rem/1 var(--font-title);
}

/* ===== Форма ===== */
.form { display: grid; gap: 16px; max-width: 520px; }
.form label { display: grid; gap: 6px; font-weight: 700; }
.form .opt { font-weight: 400; color: var(--muted); }
.form input {
  width: 100%; padding: 12px 14px;
  border: var(--stroke) solid var(--line); border-radius: 12px;
  background: var(--bg); color: var(--text);
  font: inherit;
}
.form input:focus { border-color: var(--lime); outline: none; }
.form input[aria-invalid="true"] { border-color: var(--tomato); }
.form .btn { justify-self: start; }
.form__note:empty { display: none; }
.form__note { margin: 0; font-weight: 700; color: var(--lime); }
.form__note.is-error { color: var(--tomato); }

/* ===== Играть ===== */
.play { display: grid; gap: 32px; align-items: start; }
@media (min-width: 760px) { .play { grid-template-columns: auto 1fr; } }

/* Размер под экран: холст 9:16 + полоса Defold 42px снизу */
.player {
  width: min(calc(100vw - 32px), max(260px, min(420px, calc((100vh - 190px) * 9 / 16))));
  margin-inline: auto;
}
@supports (height: 100svh) {
  .player { width: min(calc(100vw - 32px), max(260px, min(420px, calc((100svh - 190px) * 9 / 16)))); }
}
.player__box {
  position: relative; height: 0; padding-bottom: calc(177.78% + 42px);
  overflow: hidden;
  border: var(--stroke) solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--ink);
  background: #0D100E;
}
.player__box > * { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.poster {
  display: grid; place-content: center; justify-items: center; gap: 14px;
  padding: 24px; text-align: center; color: #EEF3EE;
  background:
    radial-gradient(circle at 50% 38%, rgba(191, 238, 22, .18), transparent 55%),
    repeating-linear-gradient(90deg, #1c7a3e 0 60px, var(--court) 60px 120px);
}
.poster__title {
  margin: 0; font: 400 2.2rem/1.05 var(--font-title); color: #BFEE16;
  text-shadow: 0 3px 0 #000, 0 6px 0 rgba(0, 0, 0, .25);
}
.poster .muted { margin: 0; color: #DDE8DE; font-size: .9rem; }
.poster svg { animation: bounce 1.2s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translateY(-14px); } }

.play__side h2 { font-size: 1.6rem; margin-top: 8px; }

/* ===== Процесс разработки ===== */
.process { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.process li { display: grid; grid-template-columns: auto 1fr; gap: 4px 18px; }
.process .num {
  grid-row: span 2;
  font: 400 1.6rem/1 var(--font-pixel); color: var(--lime);
  padding-top: 2px;
}
.process h3 { margin: 0; }
.process p { margin: 0; color: var(--muted); }

/* ===== Видео ===== */
.videos { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.videos--shorts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }

.video { margin: 0; }
.video__frame {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; padding: 0; overflow: hidden;
  border: var(--stroke) solid var(--ink); border-radius: var(--radius);
  box-shadow: 0 4px 0 var(--ink);
  background: var(--card-2); cursor: pointer;
}
.videos--shorts .video__frame { aspect-ratio: 9 / 16; }
.video__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.video__frame:hover img { transform: scale(1.04); }
.video__frame iframe { width: 100%; height: 100%; border: 0; }
.video__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  display: grid; place-items: center; width: 64px; height: 46px;
  border: var(--stroke) solid var(--ink); border-radius: 14px;
  background: var(--tomato); box-shadow: 0 3px 0 var(--ink);
  transition: transform .25s var(--spring);
}
.video__frame:hover .video__play { transform: scale(1.12); }
.video figcaption { margin-top: 12px; font-weight: 800; }

.empty { text-align: center; padding: 40px 24px; }
.empty p { color: var(--muted); }

/* ===== Планы ===== */
.road { position: relative; margin: 0; padding: 0; list-style: none; }
.road::before {
  content: ""; position: absolute; left: 11px; top: 8px; bottom: 8px;
  border-left: 3px dashed var(--line);
}
.road > li { position: relative; padding: 0 0 28px 48px; }
.road > li::before {        /* маркер-мячик */
  content: ""; position: absolute; left: 0; top: 4px;
  width: 25px; height: 25px; border-radius: 50%;
  border: var(--stroke) solid var(--ink);
  background: var(--card-2);
}
.road > li.is-now::before { background: var(--lime); box-shadow: 0 0 14px var(--lime); }
.road h3 { margin-bottom: .3em; }
.road p { margin: 0; color: var(--muted); }
.road .when { margin-bottom: 4px; font: 400 12px/1.4 var(--font-pixel); color: var(--muted); }
.road .is-now .when { color: var(--lime); }
.road .is-now a { display: inline-block; margin-top: 6px; font-weight: 800; color: var(--lime); }

/* ===== Подвал ===== */
.foot { margin-top: 56px; border-top: 1px solid var(--line); }
.foot__in {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px;
  padding-block: 22px; color: var(--muted); font-size: .92rem;
}

/* ===== Меньше движения ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
