:root {
  --night: #0b1530;
  --night-2: #12224a;
  --ink: #f4f1e8;
  --muted: #b8c0d8;
  --gold: #f3c55b;
  --gold-2: #e9a83a;
  --red: #d8453b;
  --green: #2f8f6b;
  --card: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --radius: 18px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, Segoe UI, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: radial-gradient(1200px 700px at 80% -10%, #1d3570 0%, transparent 60%),
              radial-gradient(900px 600px at -10% 30%, #1a2b5c 0%, transparent 60%),
              var(--night);
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

#snow { position: fixed; inset: 0; pointer-events: none; z-index: 15; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(11, 21, 48, .72);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-family: var(--serif); font-weight: 900; font-size: 1.5rem; text-decoration: none; letter-spacing: .5px; line-height: 1; }
/* «Динамика» по горизонтали, «Мая» по вертикали через 4-ю букву «а» */
.logo { display: inline-block; padding: 18px 0; font-size: 1.6rem; }
.logo-word { display: inline-block; white-space: nowrap; }
.logo-col { position: relative; display: inline-block; }
.logo-col b { font-weight: 900; color: var(--gold); }
.logo-col i {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-style: normal; font-weight: 900; color: var(--gold); line-height: .95; text-align: center;
  font-size: .58em;
}
.logo-col i.up { bottom: calc(100% - .42rem); font-size: .48em; }
.logo-col i.down { top: 100%; }
.nav nav { display: flex; gap: clamp(10px, 2.5vw, 28px); align-items: center; }
.nav nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; }
.nav nav a:hover { color: var(--ink); }
.nav .nav-cta { color: var(--night); background: var(--gold); padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.nav .nav-cta:hover { color: var(--night); background: #ffd774; }

main, .footer { position: relative; z-index: 2; }

/* HERO */
.hero { position: relative; min-height: 88vh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.hero-slides { position: absolute; inset: 0; }
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center 55%;
  filter: saturate(1.1) brightness(.85);
  opacity: 0; transform: scale(1.08);
  transition: opacity 1.4s ease, transform 7s ease-out;
}
.hero-bg.is-on { opacity: 1; transform: scale(1.0); }
.hero-years { position: absolute; z-index: 2; bottom: 28px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-years button {
  font: 700 .85rem var(--sans); color: var(--muted); background: rgba(11,21,48,.55); cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 5px 14px; pointer-events: auto;
}
.hero-years button.is-on { color: #2a1a00; background: var(--gold); border-color: var(--gold); }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 55% at 50% 50%, rgba(11,21,48,.55) 0%, rgba(11,21,48,.15) 70%, transparent 100%),
    linear-gradient(180deg, rgba(11,21,48,.15) 0%, rgba(11,21,48,.1) 70%, var(--night) 100%);
}
.hero-inner h1, .hero-inner .lead, .hero-inner .eyebrow, .countdown-note { text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 1px 3px rgba(0,0,0,.9); }
.countdown div { backdrop-filter: blur(6px); background: rgba(11,21,48,.55); }
.hero-inner { position: relative; z-index: 1; max-width: 860px; padding: 80px 16px 60px; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: var(--gold); font-weight: 700; margin: 0 0 14px; }
h1 { font-family: var(--serif); font-weight: 900; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1.05; margin: 0 0 20px; }
h1 em { font-style: normal; color: var(--gold); }
.lead { font-size: clamp(1rem, 2.2vw, 1.2rem); color: #dfe3ef; max-width: 640px; margin: 0 auto 32px; }

.countdown { display: inline-grid; grid-template-columns: repeat(4, minmax(64px, 96px)); gap: 10px; }
.countdown div { background: rgba(255,255,255,.08); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; }
.countdown b { display: block; font-family: var(--serif); font-size: clamp(1.6rem, 4.5vw, 2.4rem); line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.countdown span { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.countdown-note { color: var(--muted); margin: 10px 0 30px; font-size: .9rem; }

.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  font: 700 1rem var(--sans); padding: 14px 26px; border-radius: 999px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #2a1a00; box-shadow: 0 8px 30px rgba(243,197,91,.25); }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--ink); border: 1px solid var(--line); }

/* STATS */
.stats { display: flex; justify-content: center; gap: clamp(20px, 6vw, 80px); flex-wrap: wrap; padding: 10px 16px 30px; }
.stat { text-align: center; }
.stat b { display: block; font-family: var(--serif); font-size: 2.6rem; color: var(--gold); line-height: 1.1; }
.stat span { color: var(--muted); font-size: .9rem; }

/* SECTIONS */
section { padding: 70px clamp(16px, 4vw, 48px); }
.section-title { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.8rem); text-align: center; margin: 0 0 12px; }
.section-title.left { text-align: left; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 30px; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; max-width: 1040px; margin: 30px auto 0; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-icon { font-size: 2rem; }
.step h3 { font-family: var(--serif); font-size: 1.4rem; margin: 8px 0 6px; }
.step p { margin: 0; color: var(--muted); }

/* ARCHIVE */
.tabs { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.tab {
  font: 700 1rem var(--sans); color: var(--muted); background: transparent; border: 1px solid var(--line);
  padding: 7px 20px; border-radius: 16px; cursor: pointer;
  display: inline-flex; flex-direction: column; align-items: center; line-height: 1.2;
}
.tab-team { font-weight: 500; font-size: .78rem; opacity: .9; }
.team-line { text-align: center; color: var(--muted); margin: -12px 0 26px; font-size: 1.05rem; }
.team-line b { color: var(--gold); font-family: var(--serif); font-size: 1.25rem; }
.tab[aria-selected="true"] { background: var(--gold); color: #2a1a00; border-color: var(--gold); }
.tab:disabled { opacity: .45; cursor: default; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; max-width: 1240px; margin: 0 auto; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; display: flex; flex-direction: column; text-align: left; color: inherit; font: inherit; padding: 0;
  transition: transform .2s ease, border-color .2s, box-shadow .2s;
}
.card:hover, .card:focus-visible { transform: translateY(-4px); border-color: rgba(243,197,91,.6); box-shadow: 0 18px 40px rgba(0,0,0,.35); outline: none; }
.thumb { position: relative; aspect-ratio: 16/9; background: #000 center/cover no-repeat; }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.65)); }
.play {
  position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 62px; height: 62px; border-radius: 50%; background: rgba(243,197,91,.92);
  display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.4); transition: transform .2s;
}
.play::before { content: ""; border-left: 20px solid #2a1a00; border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 5px; }
.card:hover .play { transform: translate(-50%, -50%) scale(1.1); }
.badge { position: absolute; z-index: 1; left: 12px; top: 12px; background: var(--red); color: #fff; font-weight: 700; font-size: .8rem; padding: 4px 10px; border-radius: 999px; }
.dur { position: absolute; z-index: 1; right: 12px; bottom: 10px; font-size: .8rem; color: #fff; font-weight: 700; }
.card-body { padding: 18px 20px 22px; }
.card-body .q { margin: 0; font-size: 1.02rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.card-body .more { margin-top: 10px; color: var(--gold); font-size: .85rem; font-weight: 700; }
.empty { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 40px; border: 1px dashed var(--line); border-radius: var(--radius); }

/* SEND */
.send-card {
  max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px;
  background: linear-gradient(145deg, rgba(47,143,107,.18), rgba(216,69,59,.12));
  border: 1px solid var(--line); border-radius: 26px; padding: clamp(22px, 4vw, 48px);
}
.send-text p { color: #dfe3ef; }
.rules { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.rules li { background: rgba(255,255,255,.06); border-radius: 12px; padding: 12px 16px; color: var(--muted); }
.rules b { color: var(--gold); }
.send-form { display: grid; gap: 14px; align-content: start; }
.send-form label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.send-form small { color: var(--muted); font-weight: 400; }
.send-form input, .send-form textarea {
  font: 400 1rem var(--sans); color: var(--ink); background: rgba(11,21,48,.6);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; resize: vertical;
}
.send-form input:focus, .send-form textarea:focus { outline: 2px solid var(--gold); border-color: transparent; }
.form-hint { color: var(--muted); font-size: .85rem; margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.send-form button:disabled { opacity: .6; cursor: wait; transform: none; }
.form-hint.ok { color: #8fe0b8; }
.form-hint.err { color: #ff9a8f; }

/* MODAL */
.modal { width: min(1000px, 94vw); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--night-2); color: var(--ink); overflow: hidden; }
.modal::backdrop { background: rgba(3,8,20,.82); backdrop-filter: blur(4px); }
.modal-video { aspect-ratio: 16/9; background: #000; }
/* вертикальное видео: окно узкое, видео по высоте экрана */
.modal.portrait { width: min(94vw, 460px); max-height: 96vh; overflow-y: auto; }
.modal.portrait .modal-video { aspect-ratio: 9/16; max-height: 72vh; margin: 0 auto; }
/* cover: обложка 16:9 обрезается до вертикального кадра по центру; само видео 9:16 не обрезается */
.modal.portrait .modal-video video { object-fit: cover; }
.modal-video video, .modal-video iframe { width: 100%; height: 100%; display: block; border: 0; }
.modal-body { padding: 18px 24px 24px; }
.modal-meta { margin: 0 0 6px; color: var(--gold); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .1em; }
.video-missing { height: 100%; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: 1.1rem; }
.modal-q p, .modal-q ol { margin: 0; font-size: 1.1rem; line-height: 1.55; }
.qs { margin: 0; padding-left: 1.3em; display: grid; gap: 4px; }
.card-body ol.q { display: grid; -webkit-line-clamp: unset; }
.modal-close { position: absolute; right: 10px; top: 10px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 1.1rem; cursor: pointer; }

.footer { text-align: center; color: var(--muted); padding: 40px 16px 60px; border-top: 1px solid var(--line); font-size: .9rem; }

@media (max-width: 820px) {
  .send-card { grid-template-columns: 1fr; }
  .nav nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 480px) {
  .logo { font-size: 1.2rem; }
  .nav .nav-cta { padding: 7px 11px; font-size: .85rem; }
}
@media (max-width: 420px) {
  .countdown { grid-template-columns: repeat(4, 1fr); width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  #snow { display: none; }
}
