/* PHOENIX — тёмная тема, золото и огонь. Сначала телефон, потом широкие экраны.
   Без внешних шрифтов и библиотек. */
:root {
  --bg: #0b0d18;
  --bg2: #11152a;
  --card: #161b33;
  --line: #2a2f4d;
  --text: #ece6d6;
  --muted: #b3aec2;
  --gold: #f3c35a;
  --gold2: #ffe39a;
  --fire: #ff7a1a;
  --fire2: #ff4d00;
  --ok: #6be38a;
  --radius: 14px;
  --top: 56px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 8px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
}
img, video { max-width: 100%; display: block; }
a { color: var(--gold); }
a:hover { color: var(--gold2); }
h1, h2, h3, .logo {
  font-family: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  letter-spacing: .03em;
}
h2 {
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  margin: 0 0 1rem;
  color: var(--gold);
  text-transform: uppercase;
  line-height: 1.2;
}
h2::after {
  content: ""; display: block; width: 64px; height: 3px; margin-top: .5rem;
  background: linear-gradient(90deg, var(--fire), var(--gold));
  border-radius: 2px;
}
h3 { line-height: 1.25; }
.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 18px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text { max-width: 720px; margin-top: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: #000; padding: 8px 12px; z-index: 200; }
.skip:focus { left: 8px; }

/* Верхняя панель */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 13, 24, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; height: var(--top); }
.logo { color: var(--gold); text-decoration: none; font-weight: 700; font-size: 1.25rem; }
.nav-toggle { background: none; border: 0; padding: 10px; cursor: pointer; min-width: 44px; min-height: 44px; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--gold); transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.menu {
  display: none; position: absolute; top: var(--top); left: 0; right: 0;
  background: var(--bg2); border-bottom: 1px solid var(--line);
  flex-direction: column; padding: 4px 18px 14px;
  max-height: calc(100vh - var(--top)); overflow-y: auto;
}
.menu.open { display: flex; }
.menu a { color: var(--text); text-decoration: none; padding: 11px 0; border-bottom: 1px solid var(--line); }
.menu a:hover, .menu a.active { color: var(--gold); }
.menu .menu-cta { color: var(--fire); font-weight: 700; border: 0; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  text-decoration: none; font-weight: 700; line-height: 1.2;
  padding: 14px 22px; border-radius: 999px; min-height: 50px;
  transition: transform .15s, box-shadow .15s, background-color .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-fire {
  color: #1a0d00;
  background: linear-gradient(135deg, var(--gold2), var(--gold) 40%, var(--fire));
  box-shadow: 0 6px 24px rgba(255, 122, 26, .35);
}
.btn-fire:hover { color: #1a0d00; box-shadow: 0 8px 32px rgba(255, 122, 26, .55); }
.btn-ghost { color: var(--gold); border: 1px solid var(--gold); background: rgba(243, 195, 90, .06); }
.btn-ghost:hover { background: rgba(243, 195, 90, .14); }

/* Первый экран */
.hero { position: relative; background: radial-gradient(ellipse at 50% 0, #1a1f45 0, #070914 70%); overflow: hidden; }
.hero-img { width: 100%; height: auto; aspect-ratio: 1600 / 894; object-fit: cover; }
.hero-text { padding: 18px 18px 30px; text-align: center; max-width: 640px; margin: 0 auto; }
.badge {
  display: inline-block; margin: 0 0 10px; padding: 4px 14px; border-radius: 999px;
  font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--fire); border: 1px solid var(--fire); background: rgba(255, 122, 26, .1);
}
.hero h1 { margin: 0; font-size: clamp(1.9rem, 8vw, 3.2rem); color: var(--gold2); line-height: 1.1; }
.hero h1 span { display: block; font-size: .45em; color: var(--muted); letter-spacing: .14em; margin-top: 8px; }
.slogan { margin: 10px 0 0; font-family: Georgia, "Times New Roman", serif; font-style: italic; color: var(--gold); font-size: 1.1rem; }
.lead { font-size: 1.02rem; margin: 10px auto 14px; }
.lead strong { color: var(--fire); }

.countdown { margin: 0 0 18px; }
.cd-title { margin: 0 0 6px; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.cd-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; max-width: 400px; margin: 0 auto; }
.cd-grid div {
  background: rgba(22, 27, 51, .9); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 4px 6px; display: flex; flex-direction: column; align-items: center;
}
.cd-grid b { font-size: 1.6rem; line-height: 1.1; color: var(--gold2); font-variant-numeric: tabular-nums; }
.cd-grid span { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cd-note { margin: 6px 0 0; }
.hero-btns, .join-btns { display: flex; flex-direction: column; gap: 12px; }

/* Секции */
.section { padding: 56px 0; }
.section-alt { background: var(--bg2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Почему мы */
.grid-3 { display: grid; gap: 14px; margin-top: 18px; }
.perk {
  background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--fire);
  border-radius: var(--radius); padding: 16px 18px;
}
.perk h3 { margin: 0 0 6px; color: var(--gold); font-size: 1.1rem; }
.perk p { margin: 0; color: var(--muted); }

/* Чем живём */
.cards { display: grid; gap: 14px; }
.card {
  background: linear-gradient(180deg, var(--card), #12162b);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px;
  position: relative; overflow: hidden;
}
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--fire2), var(--gold));
}
.card-ico { font-size: 1.9rem; color: var(--fire); line-height: 1; }
.card h3 { margin: 10px 0 6px; color: var(--gold); font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }

/* Расписание */
.tag-draft, .draft-note {
  color: #1a0d00; background: var(--gold); border-radius: 6px; padding: 1px 8px; font-weight: 700;
}
.draft-note { display: inline-block; margin: 0 0 18px; font-size: .9rem; padding: 6px 12px; }
.sched { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 12px; }
.sched li {
  display: grid; grid-template-columns: 48px 1fr; gap: 4px 14px; align-items: start;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.s-ico {
  grid-row: span 3; width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  font-size: 1.4rem; background: rgba(255, 122, 26, .12); border: 1px solid rgba(255, 122, 26, .4); color: var(--fire);
}
.s-when { font-size: .85rem; color: var(--gold2); font-weight: 700; }
.s-title { margin: 0; font-size: 1.05rem; color: var(--text); font-family: inherit; letter-spacing: 0; }
.s-note { margin: 0; font-size: .9rem; color: var(--muted); }
.s-draft { display: inline-block; margin-left: 6px; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--gold); border: 1px solid var(--gold); border-radius: 6px; padding: 0 6px; vertical-align: middle; }

/* Видео */
.video-box { max-width: 960px; margin: 0 auto; position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--gold); box-shadow: 0 0 40px rgba(243, 195, 90, .15); background: #000; aspect-ratio: 16 / 9; }
.video-box video { width: 100%; height: 100%; }
.video-poster {
  all: unset; box-sizing: border-box; position: absolute; inset: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 12px;
}
.video-poster:focus-visible { outline: 2px solid var(--fire); outline-offset: -4px; }
.video-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vp-shade { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, rgba(7, 9, 20, .35), rgba(7, 9, 20, .85)); }
.vp-play {
  position: relative; width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold2), var(--fire)); box-shadow: 0 0 0 8px rgba(255, 122, 26, .2), 0 10px 40px rgba(0, 0, 0, .6);
  transition: transform .2s;
}
.vp-play::after {
  content: ""; position: absolute; left: 29px; top: 22px;
  border-left: 24px solid #1a0d00; border-top: 15px solid transparent; border-bottom: 15px solid transparent;
}
.video-poster:hover .vp-play { transform: scale(1.08); }
.vp-title { position: relative; font-family: Georgia, serif; font-weight: 700; color: var(--gold2); font-size: clamp(1.05rem, 3.5vw, 1.6rem); text-shadow: 0 2px 8px #000; margin-top: 6px; }
.vp-sub { position: relative; color: var(--text); font-size: .9rem; text-shadow: 0 1px 4px #000; }
.video-box.no-file .vp-play { opacity: .45; }

/* Галерея */
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 4px; }
.filter button {
  font: inherit; font-size: .9rem; cursor: pointer; min-height: 40px; padding: 6px 16px; border-radius: 999px;
  color: var(--text); background: var(--card); border: 1px solid var(--line);
}
.filter button[aria-pressed="true"] { color: #1a0d00; background: var(--gold); border-color: var(--gold); font-weight: 700; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 12px; }
.g-item { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.g-item[hidden] { display: none; }
/* Телефон: первый кадр во всю ширину — сетка без «сироты» */
@media (max-width: 639px) {
  .gallery.all .g-item:first-child { grid-column: span 2; }
}
.g-item img { width: 100%; height: auto; aspect-ratio: 480 / 252; object-fit: cover; transition: transform .3s, opacity .3s; }
.g-item:hover img { transform: scale(1.05); opacity: .9; }

/* Правила */
.rules { display: grid; gap: 16px; }
.rule-col { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.rule-col h3 { margin: 0 0 10px; color: var(--gold); }
.rule-list { margin: 0; padding-left: 1.2em; }
.rule-list li { margin: 0 0 8px; }
.rule-list li:last-child { margin-bottom: 0; }
.rule-list.dkp { list-style: none; padding: 0; }
.rule-list b { color: var(--gold2); }

/* Набор */
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.role { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.role h3 { margin: 0 0 4px; font-size: 1rem; color: var(--gold); }
.role p { margin: 0; font-size: .88rem; }
.req { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; max-width: 720px; }
.req-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--card); }
.req-row:last-child { border-bottom: 0; }
.req-row b { font-weight: 600; }
.req-row span { text-align: right; color: var(--gold2); }
.ok { color: var(--ok) !important; font-weight: 700; }
.tbd { color: var(--muted) !important; font-style: italic; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 820px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.faq summary {
  cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; list-style: none; position: relative; min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  color: var(--fire); font-size: 1.4rem; line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { color: var(--gold); }
.faq details p { margin: 0; padding: 0 16px 16px; color: var(--muted); }

/* Шаги */
.join { background: radial-gradient(ellipse at 50% 100%, #2a1608 0, var(--bg) 70%); }
.steps { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step-n {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 800; font-size: 1.2rem; color: #1a0d00;
  background: linear-gradient(135deg, var(--gold2), var(--fire));
}
.steps h3 { margin: 0 0 4px; color: var(--gold); font-size: 1.1rem; }
.steps p { margin: 0; color: var(--muted); }

/* Подвал */
.footer { padding: 36px 0 96px; text-align: center; border-top: 1px solid var(--line); }
.footer p { margin: 6px 0; }
.footer .logo { font-size: 1.6rem; }

/* Плавающая кнопка (телефон) */
.fab {
  position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
  display: flex; align-items: center; justify-content: center; min-height: 52px; border-radius: 999px;
  font-weight: 800; text-decoration: none; color: #1a0d00;
  background: linear-gradient(135deg, var(--gold2), var(--gold) 40%, var(--fire));
  box-shadow: 0 8px 30px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 227, 154, .4);
  transform: translateY(160%); transition: transform .25s;
}
.fab.show { transform: none; }
.fab:hover { color: #1a0d00; }

/* Лайтбокс */
.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .94);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: 96vw; }
.lightbox img { max-width: 96vw; max-height: 82vh; width: auto; height: auto; margin: 0 auto; border-radius: 6px; }
.lb-cap { text-align: center; color: var(--muted); padding: 10px; font-size: .9rem; }
.lightbox button {
  position: absolute; background: rgba(0, 0, 0, .55); color: var(--gold); border: 1px solid var(--line);
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.8rem; line-height: 1; cursor: pointer;
}
.lightbox button:hover { border-color: var(--gold); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 8px; top: 50%; transform: translateY(-50%); }

:focus-visible { outline: 2px solid var(--fire); outline-offset: 2px; }

/* Планшет */
@media (min-width: 640px) {
  .hero-btns, .join-btns { flex-direction: row; justify-content: center; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps li { flex-direction: column; }
  .join-btns { justify-content: flex-start; }
  .roles { grid-template-columns: repeat(4, 1fr); }
  .rules { grid-template-columns: 1fr 1fr; }
  .sched { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .cards { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .section { padding: 80px 0; }
  .fab { display: none; }
  .footer { padding-bottom: 48px; }
}
/* Компьютер: меню в строку, первый экран в две колонки */
@media (min-width: 1100px) {
  .nav-toggle { display: none; }
  .menu { display: flex; position: static; flex-direction: row; align-items: center; gap: 20px; padding: 0; background: none; border: 0; max-height: none; overflow: visible; }
  .menu a { border: 0; padding: 0; font-size: .93rem; }
  .menu .menu-cta { padding: 8px 18px; border: 1px solid var(--fire); border-radius: 999px; }
  .gallery { grid-template-columns: repeat(5, 1fr); }
  .hero-in {
    display: grid; grid-template-columns: 58fr 42fr; align-items: center;
    max-width: 1440px; margin: 0 auto;
  }
  .hero-media { position: relative; }
  .hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, #070914); pointer-events: none; }
  .hero-text { text-align: left; padding: 24px 40px 24px 24px; margin: 0; }
  .hero-text .cd-grid { margin: 0; }
  .hero-btns { justify-content: flex-start; flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .btn:hover, .g-item:hover img, .video-poster:hover .vp-play { transform: none; }
}
