/* =========================================================
   BUZAEVERSE — Супергеройские 30. Дима Бузаев, 18.09
   ========================================================= */

/* ---------- tokens ---------- */
:root {
  --ink: #07070a;
  --ink-2: #0c0c12;
  --ink-3: #131320;
  --bone: #ede7dc;
  --muted: rgba(237, 231, 220, 0.56);
  --faint: rgba(237, 231, 220, 0.12);
  --blood: #c10e27;
  --blood-hi: #e8213e;
  --gold: #d6a756;
  --steel: #8fa3d8;

  --f-display: "Unbounded", "Manrope", system-ui, sans-serif;
  --f-cond: "Oswald", "Manrope", system-ui, sans-serif;
  --f-script: "Caveat", cursive;
  --f-body: "Manrope", system-ui, -apple-system, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --maxw: 1280px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
}

/* ---------- reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.62;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.02em;
}
p {
  margin: 0 0 1em;
}
::selection {
  background: var(--blood);
  color: #fff;
}
:focus-visible {
  outline: 2px solid var(--blood-hi);
  outline-offset: 4px;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- film grain + scanlines ---------- */
.grain,
.scan {
  position: fixed;
  inset: -50%;
  pointer-events: none;
  z-index: 900;
}
.grain {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  opacity: 0.055;
  animation: grainShift 0.7s steps(6) infinite;
  will-change: transform;
}
.scan {
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0) 0 2px,
    rgba(0, 0, 0, 0.22) 2px 3px
  );
  opacity: 0.35;
  mix-blend-mode: multiply;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-4%, 3%); }
  40% { transform: translate(3%, -5%); }
  60% { transform: translate(-2%, 4%); }
  80% { transform: translate(5%, 2%); }
  100% { transform: translate(0, 0); }
}

/* ---------- scroll progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: linear-gradient(90deg, var(--blood), var(--blood-hi), var(--gold));
  z-index: 950;
}

/* ---------- curtain intro ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 990;
  display: grid;
  grid-template-columns: 1fr 1fr;
  pointer-events: none;
}
.curtain__half {
  background: linear-gradient(100deg, #4b0410, #8d0a1d 42%, #35030c);
  background-size: 200% 100%;
  position: relative;
  /* Открывается средствами CSS — сайт не заблокируется, даже если JS не загрузится. */
  animation: curtainL 1.15s var(--ease-io) 1.25s forwards;
}
.curtain__half:last-child { animation-name: curtainR; }
@keyframes curtainL { to { transform: translateX(-101%); } }
@keyframes curtainR { to { transform: translateX(101%); } }
.curtain__half::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.42) 0 6px,
    rgba(255, 255, 255, 0.05) 6px 26px,
    rgba(0, 0, 0, 0.3) 26px 40px
  );
}
.curtain__mark {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  animation: markOut 0.45s ease 1.25s forwards;
}
@keyframes markOut { to { opacity: 0; } }
.curtain__mark span {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(28px, 7vw, 84px);
  letter-spacing: 0.16em;
  color: var(--bone);
  text-shadow: 0 0 40px rgba(0, 0, 0, 0.7);
  animation: markIn 1s var(--ease) both;
}
@keyframes markIn {
  from { opacity: 0; letter-spacing: 0.5em; filter: blur(14px); }
  to { opacity: 1; letter-spacing: 0.16em; filter: blur(0); }
}
/* Повторный визит в рамках сессии — без вступления. */
body.curtain-skip .curtain { display: none; }
body.curtain-done .curtain { display: none; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter);
  transition: background 0.4s ease, backdrop-filter 0.4s ease,
    border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}
.nav.stuck {
  background: rgba(7, 7, 10, 0.82);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--faint);
}
.nav__logo {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 14px;
  letter-spacing: 0.22em;
  white-space: nowrap;
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
}
.nav__logo b { color: var(--blood-hi); font-weight: 900; }
.nav__links {
  display: flex;
  gap: clamp(12px, 2.4vw, 34px);
  align-items: center;
}
.nav__links a {
  font-family: var(--f-cond);
  font-weight: 500;
  font-size: clamp(11px, 1.15vw, 13px);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-block: 6px;
  transition: color 0.3s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: var(--blood-hi);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.45s var(--ease);
}
.nav__links a:hover,
.nav__links a[aria-current="page"] { color: var(--bone); }
.nav__links a:hover::after,
.nav__links a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}
.nav__date {
  font-family: var(--f-cond);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--blood-hi);
  white-space: nowrap;
}
@media (max-width: 720px) { .nav__date { display: none; } }
@media (max-width: 580px) {
  .nav { padding-inline: 14px; gap: 8px; }
  .nav__logo { font-size: 11px; letter-spacing: 0.12em; }
  .nav__links { gap: 11px; }
  .nav__links a { font-size: 10px; letter-spacing: 0.09em; }
}
@media (max-width: 480px) {
  .nav { padding-inline: 12px; gap: 6px; }
  .nav__logo { font-size: 10px; letter-spacing: 0.05em; }
  .nav__links { gap: 9px; }
  .nav__links a { font-size: 9.5px; letter-spacing: 0.06em; }
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--blood);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 15px 28px;
  border-radius: 999px;
  background: var(--bg);
  color: #fff;
  font-family: var(--f-cond);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
  box-shadow: 0 10px 34px -14px rgba(193, 14, 39, 0.9);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, var(--blood-hi), #ff5a3c);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 18px 44px -14px rgba(232, 33, 62, 0.9); }
.btn:hover::before { transform: translateY(0); }
.btn--ghost {
  background: transparent;
  color: var(--bone);
  border: 1px solid var(--faint);
  box-shadow: none;
}
.btn--ghost::before { background: rgba(237, 231, 220, 0.08); }
.btn--ghost:hover { box-shadow: none; border-color: rgba(237, 231, 220, 0.3); }

/* ---------- shared section furniture ---------- */
.sec { padding-block: clamp(72px, 11vw, 150px); position: relative; }
.sec--tight { padding-block: clamp(48px, 7vw, 92px); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-cond);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--blood-hi);
}

.h-sec {
  font-family: var(--f-display);
  font-size: clamp(27px, 5.6vw, 78px);
  text-transform: uppercase;
  margin-bottom: 0.34em;
}
.h-script {
  font-family: var(--f-script);
  font-weight: 700;
  color: var(--blood-hi);
  font-size: clamp(30px, 5vw, 62px);
  line-height: 1;
  letter-spacing: 0;
  transform: rotate(-2.5deg);
  display: inline-block;
}
.lead {
  font-size: clamp(16px, 1.35vw, 20px);
  color: var(--muted);
  max-width: 62ch;
}
.lead strong { color: var(--bone); font-weight: 700; }

/* reveal on scroll */
.rv {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.rv.in { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 0.09s; }
.rv-d2 { transition-delay: 0.18s; }
.rv-d3 { transition-delay: 0.27s; }
.rv-d4 { transition-delay: 0.36s; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: center;
  overflow: hidden;
  padding-top: 88px;
}
.hero__spot {
  position: absolute;
  width: 78vmax;
  height: 78vmax;
  left: 50%;
  top: 45%;
  translate: -50% -50%;
  background: radial-gradient(
    circle,
    rgba(193, 14, 39, 0.3) 0%,
    rgba(193, 14, 39, 0.09) 32%,
    transparent 62%
  );
  pointer-events: none;
  transition: transform 0.9s var(--ease);
}
.hero__grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(20px, 4vw, 64px);
  align-items: center;
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero { padding-top: 104px; padding-bottom: 40px; }
}

.hero__kicker {
  font-family: var(--f-script);
  font-size: clamp(24px, 3.2vw, 42px);
  color: var(--blood-hi);
  transform: rotate(-2deg);
  margin-bottom: 8px;
  line-height: 1.1;
}
.hero__title {
  font-family: var(--f-display);
  font-size: clamp(27px, 5.6vw, 78px);
  text-transform: uppercase;
  line-height: 0.92;
  margin-bottom: 6px;
}
.hero__title .ln { display: block; overflow: hidden; }
.hero__title .ln > span {
  display: block;
  transform: translateY(105%);
  animation: lineUp 1.1s var(--ease) forwards;
}
.hero__title .ln:nth-child(2) > span { animation-delay: 0.1s; }
@keyframes lineUp { to { transform: none; } }

.hero__num {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(78px, 15vw, 208px);
  line-height: 0.78;
  color: var(--blood);
  position: relative;
  display: inline-block;
  letter-spacing: -0.04em;
  text-shadow: 0 0 70px rgba(193, 14, 39, 0.45);
}
.hero__num::before,
.hero__num::after {
  content: attr(data-t);
  position: absolute;
  inset: 0;
  opacity: 0;
}
.hero__num::before { color: #00e5ff; }
.hero__num::after { color: #ffe600; }
.hero__num.glitch::before { animation: gl1 0.4s steps(2) 2; opacity: 0.8; }
.hero__num.glitch::after { animation: gl2 0.4s steps(2) 2; opacity: 0.65; }
@keyframes gl1 {
  0%, 100% { transform: none; }
  50% { transform: translate(-5px, 2px); }
}
@keyframes gl2 {
  0%, 100% { transform: none; }
  50% { transform: translate(5px, -2px); }
}

.hero__numwrap {
  display: flex;
  align-items: flex-end;
  gap: clamp(12px, 2vw, 28px);
  margin-top: -0.04em;
}
@media (max-width: 900px) { .hero__numwrap { justify-content: center; } }
.hero__numside {
  font-family: var(--f-cond);
  font-size: clamp(12px, 1.5vw, 19px);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.55;
  color: var(--muted);
  padding-bottom: clamp(16px, 2.6vw, 40px);
  text-align: left;
}
.hero__numside b { display: block; color: var(--bone); font-weight: 700; }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 20px 0 30px;
}
@media (max-width: 900px) { .hero__meta { justify-content: center; } }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border: 1px solid var(--faint);
  border-radius: 999px;
  font-family: var(--f-cond);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}
.chip b { color: var(--bone); font-weight: 700; }
.chip--red { border-color: rgba(232, 33, 62, 0.5); color: #ffb9c3; }
.chip--red b { color: #fff; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 900px) { .hero__cta { justify-content: center; } }

/* hero portrait */
.hero__art {
  position: relative;
  justify-self: center;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.85)) contrast(1.06)
    saturate(1.08);
  animation: float 7.5s ease-in-out infinite;
}
.hero__art img {
  width: min(430px, 100%);
  height: auto;
  -webkit-mask-image: radial-gradient(
    ellipse 78% 72% at 50% 44%,
    #000 58%,
    transparent 96%
  );
  mask-image: radial-gradient(
    ellipse 78% 72% at 50% 44%,
    #000 58%,
    transparent 96%
  );
}
.hero__art::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6%;
  translate: -50% 0;
  width: 62%;
  height: 26px;
  background: radial-gradient(ellipse, rgba(193, 14, 39, 0.5), transparent 72%);
  filter: blur(9px);
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-16px); }
}
@media (max-width: 900px) {
  .hero__art img { width: min(290px, 62vw); }
}

.hero__scroll {
  position: absolute;
  bottom: 22px;
  left: 50%;
  translate: -50% 0;
  z-index: 4;
  font-family: var(--f-cond);
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  display: grid;
  justify-items: center;
  gap: 9px;
}
.hero__scroll i {
  width: 1px;
  height: 42px;
  background: linear-gradient(var(--blood-hi), transparent);
  animation: scrollLine 1.9s ease-in-out infinite;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.4; transform-origin: 0 0; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: 0 0; }
}
@media (max-width: 900px) { .hero__scroll { display: none; } }

/* =========================================================
   COUNTDOWN
   ========================================================= */
.cd {
  border-block: 1px solid var(--faint);
  background: linear-gradient(180deg, rgba(193, 14, 39, 0.07), transparent 70%);
}
.cd__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.cd__units { display: flex; gap: clamp(14px, 3.2vw, 44px); }
.cd__u { text-align: center; }
.cd__digits {
  display: flex;
  gap: 3px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(26px, 6vw, 76px);
  line-height: 1;
  color: var(--bone);
}
.cd__u--days .cd__digits { color: var(--blood-hi); }
.dg {
  width: 0.98em;
  display: block;
  position: relative;
  overflow: hidden;
  height: 1em;
  text-align: center;
}
.dg span { display: block; }
.dg.roll span { animation: rollUp 0.42s var(--ease); }
@keyframes rollUp {
  from { transform: translateY(100%); opacity: 0.2; }
  to { transform: none; opacity: 1; }
}
.cd__lbl {
  font-family: var(--f-cond);
  font-size: clamp(9px, 1.1vw, 12px);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 10px;
}
.cd__note { max-width: 30ch; }
.cd__note .h-script { font-size: clamp(24px, 3vw, 40px); }

/* =========================================================
   2008 / CRT block
   ========================================================= */
.crt {
  position: relative;
  background: radial-gradient(ellipse at 50% 0%, #12131f, var(--ink) 70%);
  overflow: hidden;
}
.crt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(143, 163, 216, 0.05) 0 1px,
    transparent 1px 4px
  );
  pointer-events: none;
}
.crt__rec {
  position: absolute;
  top: 26px;
  right: var(--gutter);
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-cond);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--muted);
}
.crt__rec b {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blood-hi);
  animation: blink 1.4s steps(1) infinite;
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0.15; } }

.crt__year {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(72px, 20vw, 260px);
  line-height: 0.8;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(143, 163, 216, 0.42);
  letter-spacing: -0.03em;
  margin-bottom: 0.16em;
  position: relative;
}
.crt__year::after {
  content: "2008";
  position: absolute;
  inset: 0;
  color: var(--steel);
  -webkit-text-stroke: 0;
  opacity: 0.14;
  filter: blur(2px);
  transform: translate(4px, -3px);
}
.crt__cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(20px, 3vw, 48px);
  margin-top: 20px;
}
.crt__card {
  border: 1px solid rgba(143, 163, 216, 0.18);
  border-radius: 14px;
  padding: 24px;
  background: rgba(143, 163, 216, 0.045);
  transition: transform 0.5s var(--ease), border-color 0.5s, background 0.5s;
}
.crt__card:hover {
  transform: translateY(-6px);
  border-color: rgba(143, 163, 216, 0.42);
  background: rgba(143, 163, 216, 0.09);
}
.crt__card h4 {
  font-family: var(--f-cond);
  font-size: 15px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
  font-weight: 700;
}
.crt__card p { color: var(--muted); font-size: 15px; margin: 0; }

/* marquee */
.mq {
  overflow: hidden;
  border-block: 1px solid var(--faint);
  padding-block: 16px;
  background: rgba(143, 163, 216, 0.04);
  --dur: 34s;
}
.mq__track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: mqMove var(--dur) linear infinite;
}
.mq:hover .mq__track { animation-play-state: paused; }
.mq__track span {
  font-family: var(--f-cond);
  font-size: clamp(15px, 2vw, 26px);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(237, 231, 220, 0.34);
  padding-inline: 26px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 26px;
}
.mq__track span::after {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--blood);
  border-radius: 50%;
}
@keyframes mqMove { to { transform: translateX(-50%); } }

/* =========================================================
   ПАУТИНА — угловой декор на странице «Экипировка»
   Один <symbol> в разметке, экземпляры разворачиваются зеркально.
   ========================================================= */
.web {
  position: absolute;
  width: clamp(130px, 21vw, 300px);
  aspect-ratio: 1;
  color: rgba(237, 231, 220, 0.15);
  pointer-events: none;
  z-index: 0;
  animation: webBreathe 9s ease-in-out infinite alternate;
}
/* Паутина — фон: контент секции поднимаем над ней, иначе позиционированный
   элемент рисуется поверх текста обычного потока. */
.web ~ .wrap { position: relative; z-index: 2; }
.web--tl { top: 0; left: 0; }
.web--tr { top: 0; right: 0; transform: scaleX(-1); }
.web--bl { bottom: 0; left: 0; transform: scaleY(-1); }
.web--br { bottom: 0; right: 0; transform: scale(-1, -1); }
.web--red { color: rgba(232, 33, 62, 0.17); }
.web--soft { color: rgba(237, 231, 220, 0.09); }
@keyframes webBreathe {
  from { opacity: 0.7; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .web { animation: none; } }
@media (max-width: 620px) {
  /* на узком экране оставляем только верхние, иначе лезут в текст */
  .web--bl, .web--br { display: none; }
}

/* =========================================================
   ЛЕТУЧИЕ МЫШИ — влёт на страницу «Герои»
   Три слоя движения: перелёт через экран, взмах крыльев,
   покачивание корпуса. Глубина — через масштаб, прозрачность и размытие.
   ========================================================= */
.bats {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 700;
  overflow: hidden;
}
.bat {
  position: absolute;
  left: 0;
  top: 0;
  width: 152px;
  will-change: transform, opacity;
  filter: blur(var(--bl, 0px));
  animation: batFly var(--dur) cubic-bezier(0.36, 0.03, 0.62, 1) var(--del) both;
}
.bat__bob {
  display: block;
  animation: batBob var(--bob) ease-in-out infinite alternate;
}
.bat svg {
  display: block;
  width: 100%;
  height: auto;
  fill: #cfc9be;
  transform-origin: 50% 45%;
  animation: batFlap var(--fl) ease-in-out infinite alternate;
}
.bat--near svg { filter: drop-shadow(0 0 10px rgba(193, 14, 39, 0.55)); }

/* --dx держит место мыши внутри стаи: смещение одинаковое в начале и в конце,
   поэтому строй не рассыпается по дороге. */
@keyframes batFly {
  0% {
    transform: translate3d(calc(104vw + var(--dx)), var(--y0), 0) rotate(var(--r0)) scale(var(--sc));
    opacity: 0;
  }
  8% { opacity: var(--op); }
  88% { opacity: var(--op); }
  100% {
    transform: translate3d(calc(-28vw + var(--dx)), var(--y1), 0) rotate(var(--r1)) scale(var(--sc));
    opacity: 0;
  }
}
@keyframes batFlap {
  from { transform: scaleX(1) scaleY(1); }
  to { transform: scaleX(0.44) scaleY(1.09); }
}
@keyframes batBob {
  from { transform: translateY(-6px); }
  to { transform: translateY(6px); }
}
@media (prefers-reduced-motion: reduce) { .bats { display: none; } }


/* =========================================================
   CARD DRAW (heroes page)
   ========================================================= */
.draw {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}
@media (max-width: 900px) { .draw { grid-template-columns: 1fr; } }

.deck {
  position: relative;
  aspect-ratio: 5 / 7;
  width: min(330px, 74vw);
  justify-self: center;
  perspective: 1400px;
  cursor: pointer;
}
.deck__c {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(237, 231, 220, 0.18);
  background: linear-gradient(150deg, #17171f, #0b0b11);
  box-shadow: 0 26px 60px -26px #000;
  transition: transform 0.7s var(--ease);
}
.deck__c:nth-child(1) { transform: rotate(-8deg) translate(-14px, 6px); }
.deck__c:nth-child(2) { transform: rotate(5deg) translate(10px, 3px); }
.deck:hover .deck__c:nth-child(1) { transform: rotate(-13deg) translate(-26px, 2px); }
.deck:hover .deck__c:nth-child(2) { transform: rotate(9deg) translate(20px, 0); }

.card {
  position: absolute;
  inset: 0;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transition: transform 0.85s var(--ease);
  border-radius: 18px;
}
.card.flipped { transform: rotateY(180deg); }
/* ВАЖНО: без overflow:hidden. В Safari overflow:hidden + border-radius на грани
   ломает backface-visibility, и рубашка просвечивает сквозь лицевую сторону.
   Скругление задаётся каждому слою отдельно, вложенное ничего не выходит за края. */
.card__face {
  position: absolute;
  inset: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 18px;
  border: 1px solid rgba(237, 231, 220, 0.22);
  box-shadow: 0 30px 70px -30px #000, inset 0 0 60px rgba(0, 0, 0, 0.6);
}
.card__back {
  /* translateZ приподнимает каждую грань к зрителю в её собственной системе
     координат — видимая грань всегда физически перекрывает изнанку
     непрозрачным фоном, даже если backface-visibility подведёт. */
  transform: translateZ(1px);
  background: linear-gradient(150deg, #1c0510, #47000f 55%, #12030a);
  display: grid;
  place-items: center;
}
.card__back::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(214, 167, 86, 0.36);
  border-radius: 11px;
}
.card__back::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background-image: repeating-linear-gradient(
      45deg,
      rgba(214, 167, 86, 0.09) 0 2px,
      transparent 2px 11px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(214, 167, 86, 0.09) 0 2px,
      transparent 2px 11px
    );
}
.card__mark {
  position: relative;
  z-index: 2;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-align: center;
  line-height: 1.8;
}
.card__mark i {
  display: block;
  font-size: 44px;
  font-style: normal;
  color: var(--blood-hi);
}
.card__front {
  transform: rotateY(180deg) translateZ(1px);
  background: linear-gradient(160deg, #14141c, #08080d);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 20px;
  text-align: center;
}
.card__corner {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: 20px;
  color: var(--gold);
  text-align: left;
  line-height: 1;
}
.card__corner span { display: block; font-size: 15px; }
.card__body { display: grid; place-content: center; gap: 8px; }
.card__hero {
  font-family: var(--f-display);
  font-size: clamp(20px, 3.4vw, 32px);
  text-transform: uppercase;
  color: var(--bone);
  line-height: 1;
}
.card__uni {
  font-family: var(--f-cond);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blood-hi);
}
.card__tip { font-size: 13px; color: var(--muted); max-width: 26ch; margin-inline: auto; }
.card__corner--b { transform: rotate(180deg); text-align: left; }

.draw__panel .h-sec { font-size: clamp(30px, 5vw, 62px); }
.draw__out {
  min-height: 84px;
  margin: 18px 0 26px;
  padding-left: 18px;
  border-left: 2px solid var(--blood);
}
.draw__out--empty { border-color: var(--faint); }
.draw__out h3 {
  font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 36px);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.draw__out p { color: var(--muted); margin: 0; }

/* =========================================================
   HERO GRID
   ========================================================= */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 34px;
}
.filters button {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--faint);
  font-family: var(--f-cond);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  transition: all 0.35s var(--ease);
}
.filters button:hover { color: var(--bone); border-color: rgba(237, 231, 220, 0.3); }
.filters button[aria-pressed="true"] {
  background: var(--blood);
  border-color: var(--blood);
  color: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}
.hcard {
  position: relative;
  border: 1px solid var(--faint);
  border-radius: 16px;
  padding: 22px 20px 20px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.035), transparent);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.5s, box-shadow 0.5s;
  transform-style: preserve-3d;
}
.hcard::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    380px circle at var(--mx, 50%) var(--my, 50%),
    rgba(232, 33, 62, 0.16),
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.4s;
}
.hcard:hover {
  border-color: rgba(232, 33, 62, 0.45);
  box-shadow: 0 24px 50px -28px rgba(232, 33, 62, 0.8);
}
.hcard:hover::before { opacity: 1; }
.hcard__uni {
  font-family: var(--f-cond);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--blood-hi);
  margin-bottom: 12px;
  display: block;
}
.hcard__name {
  font-family: var(--f-display);
  font-size: 19px;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 8px;
}
.hcard__tip { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; }
.hcard__lvl {
  font-family: var(--f-cond);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.hcard__lvl i {
  width: 22px;
  height: 3px;
  border-radius: 2px;
  background: var(--faint);
  display: block;
}
.hcard__lvl i.on { background: var(--blood-hi); }
.hcard.hide { display: none; }

/* =========================================================
   TIMELINE (программа)
   ========================================================= */
.tl { position: relative; padding-left: 30px; }
.tl::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(var(--blood), rgba(193, 14, 39, 0.05));
}
.tl__i { position: relative; padding-bottom: 34px; }
.tl__i::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 7px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  border: 2px solid var(--blood);
  transition: background 0.4s, box-shadow 0.4s;
}
.tl__i:hover::before { background: var(--blood-hi); box-shadow: 0 0 0 6px rgba(232, 33, 62, 0.15); }
.tl__i h4 {
  font-family: var(--f-display);
  font-size: clamp(17px, 2.2vw, 24px);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.tl__i p { color: var(--muted); margin: 0; font-size: 15px; }
.tl__tag {
  font-family: var(--f-cond);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--blood-hi);
  display: block;
  margin-bottom: 4px;
}

/* =========================================================
   RENT LIST
   ========================================================= */
.rent { display: grid; gap: 12px; }
.rent__i {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--faint);
  border-radius: 14px;
  transition: border-color 0.4s, background 0.4s, transform 0.4s var(--ease);
}
.rent__i:hover {
  border-color: rgba(232, 33, 62, 0.42);
  background: rgba(232, 33, 62, 0.045);
  transform: translateX(5px);
}
.rent__n {
  font-family: var(--f-display);
  font-size: 15px;
  color: rgba(237, 231, 220, 0.28);
  min-width: 2ch;
}
.rent__t { font-family: var(--f-cond); font-weight: 700; font-size: 17px; letter-spacing: 0.02em; }
.rent__d { color: var(--muted); font-size: 14px; margin: 3px 0 0; }
.rent__meta {
  font-family: var(--f-cond);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blood-hi);
  white-space: nowrap;
  text-align: right;
}
.rent__meta span { display: block; color: var(--muted); }
@media (max-width: 720px) {
  .rent__i { grid-template-columns: auto 1fr; }
  .rent__meta { grid-column: 2; text-align: left; }
}

/* dress code statement */
.dc {
  text-align: center;
  border: 1px solid rgba(232, 33, 62, 0.35);
  border-radius: 20px;
  padding: clamp(30px, 6vw, 70px) clamp(16px, 4vw, 52px);
  background: radial-gradient(ellipse at 50% 0%, rgba(193, 14, 39, 0.16), transparent 65%);
}
.dc__big {
  font-family: var(--f-display);
  font-size: clamp(23px, 5.6vw, 86px);
  text-transform: uppercase;
  line-height: 0.9;
}
.dc__big em { color: var(--blood-hi); font-style: normal; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 40px;
  text-align: left;
}
.step { border-top: 2px solid var(--blood); padding-top: 16px; }
.step b {
  font-family: var(--f-display);
  font-size: 28px;
  color: var(--blood-hi);
  display: block;
  line-height: 1;
  margin-bottom: 10px;
}
.step p { color: var(--muted); font-size: 14.5px; margin: 0; }
.step h5 {
  margin: 0 0 6px;
  font-family: var(--f-cond);
  font-size: 15px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* =========================================================
   FOOTER
   ========================================================= */
.foot {
  border-top: 1px solid var(--faint);
  padding-block: 54px 40px;
  text-align: center;
}
.foot__mark {
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(30px, 8vw, 96px);
  letter-spacing: 0.06em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 231, 220, 0.16);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 22px;
}
.foot__l {
  font-family: var(--f-cond);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot__l a { color: var(--blood-hi); }

/* =========================================================
   PAGE HEADER (inner pages)
   ========================================================= */
.phead {
  padding-top: clamp(130px, 17vw, 210px);
  padding-bottom: clamp(30px, 5vw, 60px);
  position: relative;
  overflow: hidden;
}
.phead::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  right: -18vmax;
  top: -26vmax;
  background: radial-gradient(circle, rgba(193, 14, 39, 0.2), transparent 63%);
  pointer-events: none;
}
.phead__n {
  position: absolute;
  right: var(--gutter);
  bottom: -8px;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: clamp(90px, 18vw, 220px);
  color: transparent;
  -webkit-text-stroke: 1px rgba(237, 231, 220, 0.09);
  line-height: 0.8;
  pointer-events: none;
}

/* =========================================================
   MOTION / RESPONSIVE GUARDS
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
  .hero__title .ln > span { transform: none; }
  .grain, .scan { display: none; }
}

/* view transitions between pages */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vtOut 0.32s var(--ease-io) both; }
::view-transition-new(root) { animation: vtIn 0.42s var(--ease) both; }
@keyframes vtOut { to { opacity: 0; transform: scale(0.99); } }
@keyframes vtIn { from { opacity: 0; transform: scale(1.008); } }
