:root {
  --ink: #160818;
  --cream: #fff3df;
  --orange: #ff7a1a;
  --orange-2: #ffb347;
  --pink: #ff3d8b;
  --violet: #8b3dff;
  --sign: #1d4ea8;
  --u: min(1vw, 1.75vh);
  --head: 'Oswald', 'Arial Narrow', Impact, sans-serif;
  --display: 'Alumni Sans', 'Oswald', Impact, sans-serif;
  --body: 'Manrope', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--ink); color: var(--cream); font: 16px/1.5 var(--body); overflow-x: hidden; }
img { -webkit-user-drag: none; user-select: none; }

/* ============ HERO ============ */
.hero {
  position: relative; width: 100%; height: 100vh; height: 100svh; min-height: 600px;
  overflow: hidden; background: var(--ink); isolation: isolate;
}

.hero__loader {
  position: absolute; inset: 0; z-index: 50; display: grid; place-items: center; background: var(--ink);
  font: 700 28px var(--head); letter-spacing: .12em; color: var(--cream); pointer-events: none;
}
.hero__loader b { color: var(--orange); font-weight: 700; }
.hero__loader span { animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .35; transform: scale(.97); } to { opacity: 1; transform: scale(1); } }

/* ---- окна ---- */
.panels { position: absolute; inset: 0; z-index: 1; }
.panel { position: absolute; overflow: hidden; background: #2a0f33; will-change: transform; }
.panel canvas, .panel > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.panel > img { object-fit: cover; }

/* центральное окно — всё нарисовано кодом */
.panel--center { inset: 0; background: #2a0b40; }
.cp { position: absolute; inset: -3% -3% -3% -3%; width: 106%; height: 106%; pointer-events: none; will-change: transform; }
.cp-sky {
  background:
    radial-gradient(60% 22% at 50% 88%, rgba(255, 150, 70, .85), transparent 70%),
    radial-gradient(40% 45% at 50% 48%, rgba(26, 5, 34, .85), rgba(26, 5, 34, .4) 55%, transparent 80%),
    linear-gradient(180deg, #2c0838 0%, #3d0b4a 25%, #4a0f55 45%, #8a1f6a 66%, #e2406a 78%, #ff7a4a 88%, #ffb25a 100%);
}
.cp-sun { display: grid; place-items: center; }
.cp-sun i {
  position: absolute; left: 50%; bottom: 14%; width: 17%; aspect-ratio: 1; transform: translate(-50%, 0); border-radius: 50%;
  background: linear-gradient(180deg, #fff27a 0%, #ffc04d 40%, #ff6a3d 75%, #ff3d6e 100%);
  -webkit-mask: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 64%, transparent 64% 69%, #000 69% 75%, transparent 75% 81%, #000 81% 86%, transparent 86% 93%, #000 93%);
          mask: linear-gradient(180deg, #000 0 52%, transparent 52% 56%, #000 56% 64%, transparent 64% 69%, #000 69% 75%, transparent 75% 81%, #000 81% 86%, transparent 86% 93%, #000 93%);
  filter: drop-shadow(0 0 40px rgba(255, 120, 60, .9));
  animation: sun 5s ease-in-out infinite alternate;
}
@keyframes sun { to { filter: drop-shadow(0 0 70px rgba(255, 90, 90, 1)) brightness(1.08); } }
.cp-clouds {
  background:
    radial-gradient(30% 4% at 22% 30%, rgba(255, 120, 170, .45), transparent 70%),
    radial-gradient(26% 3% at 75% 22%, rgba(255, 140, 120, .4), transparent 70%),
    radial-gradient(40% 5% at 60% 44%, rgba(255, 90, 140, .35), transparent 70%),
    radial-gradient(22% 3% at 30% 52%, rgba(255, 170, 110, .4), transparent 70%),
    radial-gradient(35% 4% at 80% 58%, rgba(255, 110, 150, .3), transparent 70%);
  animation: clouds 40s linear infinite alternate;
}
@keyframes clouds { to { background-position: 6% 0, -5% 0, 4% 0, -6% 0, 5% 0; } }
.cp-palms path { fill: #22072e; }
.cp-palms--back path { fill: #c2357a; opacity: .45; }
.cp-palms .palm { transform-box: fill-box; transform-origin: 50% 100%; animation: sway var(--d, 6s) ease-in-out var(--dl, 0s) infinite alternate; }
@keyframes sway { from { transform: rotate(calc(var(--a, 1.2deg) * -1)); } to { transform: rotate(var(--a, 1.2deg)); } }
.cp-skyline { top: auto; bottom: 13.5%; height: 20%; }
.cp-skyline .b { fill: #3b0f4a; }
.cp-skyline .b2 { fill: #24082f; }
.cp-skyline .w { fill: #ffd27a; animation: twinkle var(--t, 3s) ease-in-out var(--td, 0s) infinite alternate; }
@keyframes twinkle { from { opacity: .15; } to { opacity: 1; } }
.cp-water {
  top: auto; bottom: -3%; height: 17%;
  background:
    radial-gradient(14% 60% at 50% 0%, rgba(255, 190, 90, .85), transparent 70%),
    repeating-linear-gradient(180deg, rgba(255, 140, 120, .28) 0 2px, transparent 2px 9px),
    linear-gradient(180deg, #5a1550, #1e0726);
  background-size: 100% 100%, 100% 100%, 100% 100%;
  animation: water 3s linear infinite;
}
@keyframes water { to { background-position: 0 0, 0 18px, 0 0; } }

/* ---- таблички городов ---- */
.signs { position: absolute; inset: 0; z-index: 3; pointer-events: none; perspective: 800px; }
.sign {
  position: absolute; padding: .32em .9em .36em; border-radius: .32em; background: var(--sign); color: #fff;
  font: 600 calc(var(--u) * 1.45) / 1 var(--head); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
  box-shadow: inset 0 0 0 .14em #fff, inset 0 0 0 .22em var(--sign), 0 .3em .8em rgba(0, 0, 0, .45);
  transform-origin: 50% 0; transform-style: preserve-3d; backface-visibility: hidden;
}
.sign::before, .sign::after { content: ''; position: absolute; top: 100%; width: .16em; height: 1.4em; background: #c9cdd6; }
.sign::before { left: 18%; } .sign::after { right: 18%; }

/* ---- неоновые следы ---- */
.trails { position: absolute; left: 0; bottom: 0; width: 100%; height: 34%; z-index: 2; pointer-events: none; mix-blend-mode: screen; }

/* ---- сцена ---- */
.stage { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.layer { position: absolute; will-change: transform; }
.layer > * { pointer-events: auto; }
.char { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .3s; }
.char.is-loaded { opacity: 1; }
.char:not(.is-loaded) { visibility: hidden; }

.layer--courier { left: 0; bottom: 0; height: 90%; width: 36%; }
.layer--courier .char { object-position: left bottom; transform-origin: 30% 100%; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .45)); }
.layer--girl { right: 0; bottom: 6%; height: 64%; width: 26%; }
.layer--girl .char { object-position: right bottom; transform-origin: 70% 100%; filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .4)); }
.layer--car { right: -3%; bottom: -4%; width: 46%; aspect-ratio: 2; z-index: 2; }
.car { position: relative; width: 100%; height: 100%; cursor: pointer; }
.car .char { filter: drop-shadow(0 30px 25px rgba(0, 0, 0, .55)); }
.car__light { position: absolute; width: 18%; aspect-ratio: 1; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(200, 235, 255, 1) 0, rgba(120, 190, 255, .55) 22%, transparent 62%); mix-blend-mode: screen; }
.car__light--l { left: 1%; top: 33%; }
.car__light--r { left: 38%; top: 34%; }
.car.has-img .car__light { opacity: .7; }

/* ---- призы ---- */
.layer--prizes { left: 50%; top: 8%; width: calc(var(--u) * 46); height: calc(var(--u) * 15); margin-left: calc(var(--u) * -23); }
.prizes { position: relative; width: 100%; height: 100%; --cw: calc(var(--u) * 6.4); }
.prize { position: absolute; left: 50%; top: 50%; width: var(--cw); aspect-ratio: .8; margin: calc(var(--cw) * -.625) 0 0 calc(var(--cw) * -.5); cursor: pointer; }
.prize__in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .25s; }
.prize:hover .prize__in { transform: translateY(-8%) scale(1.06); }
.prize--phone { width: calc(var(--cw) * 1.25); aspect-ratio: .52; margin: calc(var(--cw) * -1.2) 0 0 calc(var(--cw) * -.625); }

/* PS5 коробка — заглушка кодом */
.box {
  position: absolute; inset: 0; border-radius: 6%; overflow: hidden;
  background: linear-gradient(135deg, #3d78ff, #1238c9 60%, #0b237f);
  padding: 4%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 .6em 1.4em rgba(20, 0, 60, .55), 0 0 1.6em rgba(160, 80, 255, .55);
  font-size: calc(var(--cw) / 10);
}
.box__top { height: 15%; background: #f4f4f8; border-radius: 3% 3% 0 0; display: flex; align-items: center; padding-left: 8%; color: #111; font: 700 1.5em/1 var(--body); letter-spacing: .02em; }
.box__art {
  position: relative; height: 85%; overflow: hidden;
  background: linear-gradient(180deg, rgba(60, 10, 90, .1), rgba(255, 60, 140, .35) 60%, rgba(40, 0, 60, .8)), var(--art) center 40% / cover;
}
.box__logo { position: absolute; left: 0; right: 0; top: 34%; text-align: center; font: 700 2.1em/0.86 var(--head); color: #fff; text-transform: uppercase; text-shadow: 0 .08em 0 #3a0b45; }
.box__logo b { display: block; font-size: 2.2em; line-height: .9; background: linear-gradient(180deg, #ff9bd2, #ff3d8b 45%, #6a7bff); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: none; filter: drop-shadow(0 .05em 0 #3a0b45); }
.prize img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 .6em 1em rgba(20, 0, 60, .55)) drop-shadow(0 0 1.2em rgba(160, 80, 255, .55)); }
.shine { position: absolute; inset: 0; overflow: hidden; border-radius: 6%; pointer-events: none; mix-blend-mode: overlay; }
.shine::after {
  content: ''; position: absolute; top: -20%; bottom: -20%; width: 45%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9), transparent);
  animation: shine 4.5s ease-in-out var(--sd, 0s) infinite;
}
@keyframes shine { 0%, 62% { left: -60%; } 100% { left: 130%; } }

/* iPhone — заглушка кодом */
.phone {
  position: absolute; inset: 0; border-radius: 16% / 8%;
  background: linear-gradient(120deg, #fdfdff 0%, #d7d9e2 35%, #f7f7fb 55%, #b9bcc8 100%);
  box-shadow: 0 0 0 2px #8d909c inset, 0 0 0 3.5px #e9eaf0 inset, 0 .8em 1.6em rgba(20, 0, 60, .55), 0 0 2em rgba(255, 255, 255, .25);
  font-size: calc(var(--cw) / 10);
}
.phone__cam { position: absolute; left: 12%; top: 6%; width: 34%; height: 34%; border-radius: 30%; background: linear-gradient(135deg, #f2f2f6, #c9cbd4); box-shadow: 0 0 0 1px #9da0ab; }
.phone__cam i { position: absolute; left: 14%; width: 72%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #5a5f8a 0 12%, #0d0e16 30%, #000 62%, #3b3d48 66%, #d9dbe2 72%); }
.phone__cam i:first-child { top: 4%; } .phone__cam i:last-child { bottom: 4%; }

/* ---- заголовок ---- */
.layer--title { left: 50%; top: 34%; width: calc(var(--u) * 54); margin-left: calc(var(--u) * -27); display: flex; flex-direction: column; align-items: center; text-align: center; z-index: 3; }
.title { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .8; color: var(--cream); letter-spacing: .005em; }
.title > span { display: block; white-space: nowrap; }
.title > span > span { display: inline-block; }
.title__l1 { font-size: calc(var(--u) * 7.4); }
.title__l2 { font-size: calc(var(--u) * 9.6); }
.title__l3 { font-size: calc(var(--u) * 6.7); }
.title span {
  -webkit-text-stroke: .045em #1f0626; paint-order: stroke fill;
  text-shadow: 0 .03em 0 #2a0a30, 0 .06em 0 #2a0a30, 0 .09em 0 #1a0620, 0 .11em 0 #1a0620, 0 .14em .3em rgba(10, 0, 16, .7), 0 0 .5em rgba(20, 4, 30, .5);
}
.title .hot { text-transform: none; color: #ff7a24; animation: hot 2.4s ease-in-out infinite alternate; }
@keyframes hot { to { color: #ff9a3c; } }

.sub { margin: calc(var(--u) * 1.6) 0 0; font: 800 calc(var(--u) * 1.85) / 1.2 var(--body); color: #fff; text-shadow: 0 2px 0 #1f0626, 0 0 14px rgba(20, 0, 30, .9), 0 0 4px rgba(20, 0, 30, .9); }

.cta {
  position: relative; margin-top: calc(var(--u) * 2.2); display: inline-flex; align-items: center; gap: .8em;
  padding: .95em 2.4em; border-radius: .45em; text-decoration: none; overflow: hidden;
  font: 700 calc(var(--u) * 1.45) / 1 var(--body); letter-spacing: .03em; text-transform: uppercase; color: #2a0a1a;
  background: linear-gradient(180deg, #ffa55a, #ff7a1a 55%, #f05f10);
  box-shadow: 0 0 0 2px rgba(255, 220, 180, .55) inset, 0 .5em 1.6em rgba(255, 110, 30, .5), 0 0 0 0 rgba(255, 122, 26, .6);
  animation: ctaGlow 2.2s ease-in-out infinite;
  will-change: transform;
}
.cta svg { width: 1.3em; height: 1.3em; transition: transform .25s; }
.cta:hover svg { transform: translateX(.3em); }
.cta::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .65), transparent); animation: shine 3.2s ease-in-out 1s infinite; }
@keyframes ctaGlow { 50% { box-shadow: 0 0 0 2px rgba(255, 220, 180, .55) inset, 0 .5em 2.2em rgba(255, 110, 30, .75), 0 0 0 .6em rgba(255, 122, 26, 0); } }

.countdown { margin-top: calc(var(--u) * 1.8); display: flex; align-items: center; gap: .8em; font: 600 calc(var(--u) * 1.1) / 1 var(--head); text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 243, 223, .85); text-shadow: 0 2px 10px rgba(40, 0, 50, .9); }
.countdown__cells { display: inline-flex; align-items: baseline; gap: .2em; }
.countdown b { display: inline-block; min-width: 1.5em; padding: .25em .3em; border-radius: .25em; background: rgba(22, 8, 24, .55); backdrop-filter: blur(6px); color: #fff; font-size: 1.35em; text-align: center; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 1px rgba(255, 255, 255, .12) inset; }
.countdown i { font-style: normal; opacity: .7; }

/* ---- эффекты поверх ---- */
.dust { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 6; pointer-events: none; mix-blend-mode: screen; }
.fx-grain {
  position: absolute; inset: -50%; z-index: 7; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain .7s steps(5) infinite;
}
@keyframes grain { 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-1%, 3%); } 80% { transform: translate(3%, 1%); } }
.fx-scan { display: none; position: absolute; inset: 0; z-index: 7; pointer-events: none; opacity: .22; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .35) 0 1px, transparent 1px 3px); }
.fx-vignette { position: absolute; inset: 0; z-index: 7; pointer-events: none; background: radial-gradient(130% 100% at 50% 45%, transparent 65%, rgba(10, 0, 16, .35) 100%); }
.fx-flash { position: absolute; inset: 0; z-index: 8; pointer-events: none; background: #fff; opacity: 0; }

/* ---- навигация ---- */
.nav { position: absolute; top: 0; left: 0; right: 0; z-index: 10; display: flex; align-items: center; gap: 32px; padding: 20px 32px; }
.nav__logo { font: 700 22px var(--head); letter-spacing: .1em; color: var(--cream); text-decoration: none; text-shadow: 0 2px 10px rgba(0, 0, 0, .6); }
.nav__logo b { color: var(--orange); font-weight: 700; }
.nav__links { margin-left: auto; display: flex; gap: 32px; }
.nav__links a { font: 600 17px var(--head); letter-spacing: .08em; text-transform: uppercase; color: #fff; text-decoration: none; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); position: relative; }
.nav__links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform .25s; transform-origin: left; }
.nav__links a:hover::after { transform: scaleX(1); }

.sound {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 12px; border-radius: 999px; cursor: pointer;
  border: 0; background: rgba(22, 8, 24, .55); backdrop-filter: blur(8px); color: #fff; font: 600 14px var(--head); letter-spacing: .08em; text-transform: uppercase;
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .25) inset; animation: soundCall 1.6s ease-in-out infinite;
}
.sound[aria-pressed="true"] { animation: none; box-shadow: 0 0 0 1.5px rgba(255, 122, 26, .8) inset; }
@keyframes soundCall { 50% { box-shadow: 0 0 0 1.5px rgba(255, 122, 26, .9) inset, 0 0 18px rgba(255, 122, 26, .55); } }
.sound__bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 14px; }
.sound__bars i { width: 3px; height: 3px; border-radius: 2px; background: currentColor; }
.sound[aria-pressed="true"] .sound__bars i { animation: eq .9s ease-in-out infinite alternate; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(2) { animation-delay: -.3s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(3) { animation-delay: -.6s; }
.sound[aria-pressed="true"] .sound__bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { from { height: 3px; } to { height: 14px; } }

/* ============ следующие секции (заглушки) ============ */
.next { min-height: 60vh; display: grid; place-items: center; padding: 80px 16px; background: #1d0a22; }
.next--alt { background: #24102b; }
.next__in { width: min(1100px, 100%); }
.next h2 { font: 700 clamp(36px, 5vw, 64px) / 1 var(--head); text-transform: uppercase; margin: 0 0 16px; }
.next p { color: rgba(255, 243, 223, .6); }
.foot { padding: 28px 16px; text-align: center; font-size: 12px; color: rgba(255, 243, 223, .45); background: var(--ink); }

/* ============ портрет / телефоны ============ */
@media (max-aspect-ratio: 4/5) {
  :root { --u: min(2.05vw, 1.12vh); }
  .cp-sun i { bottom: 31%; width: 46%; }
  .nav { padding: 14px 16px; gap: 12px; }
  .nav__logo { font-size: 18px; }
  .nav__links { display: none; }
  .sound { margin-left: auto; padding: 8px 12px 8px 10px; font-size: 12px; }
  .layer--prizes { top: 26%; width: calc(var(--u) * 44); margin-left: calc(var(--u) * -22); height: calc(var(--u) * 14); }
  .prizes { --cw: calc(var(--u) * 6.6); }
  .layer--title { top: 41%; width: 96%; margin-left: -48%; }
  .sub { font-size: calc(var(--u) * 2.1); }
  .cta { font-size: calc(var(--u) * 1.75); padding: 1em 1.8em; }
  .countdown { font-size: calc(var(--u) * 1.4); }
  .layer--courier { left: -6%; height: 33%; width: 48%; }
  .layer--girl { right: -4%; bottom: 0; height: 28%; width: 42%; }
  .layer--car { right: auto; left: 18%; bottom: -2%; width: 64%; z-index: 0; }
  .sign { font-size: calc(var(--u) * 1.9); }
  .trails { height: 22%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
}
