:root {
  --bg: #03050a;
  --text: #eef1f6;
  --muted: #8d97a8;
  --accent: #ff6a2b;
  --line: rgba(255, 255, 255, .12);
  --display: "Unbounded", system-ui, sans-serif;
  --sans: "Manrope", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }

.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px clamp(16px, 4vw, 48px);
  font-family: var(--display); font-size: 13px; letter-spacing: .2em;
  mix-blend-mode: difference;
}
.logo b { color: var(--accent); font-weight: 700; }
.timer { font-variant-numeric: tabular-nums; color: var(--muted); letter-spacing: .12em; }

.intro, .outro {
  position: relative; z-index: 2;
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  text-align: center; padding: 0 16px;
}
.eyebrow {
  font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 24px;
}
h1 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(48px, 13vw, 168px); line-height: .95; letter-spacing: -.02em;
}
h1 span { font-weight: 700; }
.lead { margin-top: 28px; color: var(--muted); font-size: clamp(15px, 1.6vw, 19px); max-width: 32ch; line-height: 1.5; }
.outro h2 { font-family: var(--display); font-weight: 500; font-size: clamp(30px, 6vw, 72px); max-width: 16ch; line-height: 1.05; }

.scroll-hint {
  position: absolute; bottom: 40px; width: 22px; height: 36px;
  border: 1px solid var(--line); border-radius: 12px;
}
.scroll-hint i {
  position: absolute; left: 50%; top: 7px; width: 2px; height: 7px; margin-left: -1px;
  background: var(--text); border-radius: 1px; animation: hint 1.8s infinite;
}
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* ——— сцена полёта: закрепляется и проигрывается прокруткой ——— */
.flight { position: relative; z-index: 1; }
.stage {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
}

.sky { position: absolute; inset: 0; opacity: 0; }
.sky-launch { opacity: 1; background: radial-gradient(120% 70% at 50% 110%, #ff7a2f 0%, #5b1d0c 30%, transparent 62%); }
.sky-orbit  { background: radial-gradient(90% 60% at 50% 120%, #2f7bd8 0%, #0d2a55 35%, transparent 65%); }
.sky-space  { background: radial-gradient(60% 50% at 75% 25%, rgba(110, 70, 200, .35), transparent 70%), radial-gradient(50% 40% at 15% 80%, rgba(40, 120, 200, .2), transparent 70%); }
.sky-return { background: radial-gradient(80% 60% at 50% -10%, #ff5a1f 0%, #7a1e08 30%, transparent 62%); }

.planet {
  position: absolute; left: 50%; top: 100%;
  width: 260vmax; height: 260vmax; margin-left: -130vmax;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 2%, #6fb6ff 0%, #1d5fae 4%, #0a2550 12%, #040b18 30%);
  filter: drop-shadow(0 -10px 40px rgba(80, 160, 255, .45));
  transform: translateY(-14vh);
}
.flare {
  position: absolute; left: 50%; top: 50%; width: 80vmin; height: 80vmin; margin: -40vmin 0 0 -40vmin;
  border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(255, 140, 60, .55), transparent 65%);
  filter: blur(10px);
}

.watch-wrap {
  position: absolute; z-index: 3;
  left: 50%; top: 50%;
  width: min(42vw, 62vh); aspect-ratio: 1;
  transform: translate(-90%, -50%);
}
.watch-tilt { width: 100%; height: 100%; }
.watch { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .7)); }
.dial-brand { font-family: var(--display); font-size: 13px; letter-spacing: .32em; fill: #dfe4ec; text-anchor: middle; }
.dial-model { font-family: var(--display); font-weight: 700; font-size: 22px; fill: var(--accent); text-anchor: middle; }
.bezel-num { font-family: var(--display); font-size: 15px; fill: #dfe4ec; text-anchor: middle; dominant-baseline: central; }

.chapters {
  position: absolute; z-index: 4;
  right: clamp(16px, 7vw, 120px); top: 50%;
  width: min(420px, 36vw);
  transform: translateY(-50%);
}
.chapter { position: absolute; top: 0; left: 0; right: 0; transform: translateY(-50%); opacity: 0; }
.chapter .num { font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.chapter h2 { font-family: var(--display); font-weight: 500; font-size: clamp(28px, 3.4vw, 52px); line-height: 1.05; margin-bottom: 18px; }
.chapter p:last-child { color: var(--muted); font-size: 17px; line-height: 1.55; max-width: 34ch; }

.progress {
  position: absolute; z-index: 5; left: clamp(16px, 4vw, 48px); bottom: 32px; right: clamp(16px, 4vw, 48px);
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; list-style: none;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted);
}
.progress li { padding-top: 12px; border-top: 1px solid var(--line); transition: color .3s, border-color .3s; }
.progress li.on { color: var(--text); border-top-color: var(--accent); }

/* ——— телефон и узкий планшет: часы сверху, текст снизу ——— */
@media (max-width: 820px), (orientation: portrait) {
  .watch-wrap { width: min(78vw, 46vh); transform: translate(-50%, -82%); }
  .stage::after {
    content: ""; position: absolute; inset: auto 0 0 0; height: 46%; z-index: 3; pointer-events: none;
    background: linear-gradient(to top, rgba(3, 5, 10, .92) 30%, rgba(3, 5, 10, 0));
  }
  .chapters { left: 16px; right: 16px; width: auto; top: auto; bottom: 84px; transform: none; text-align: center; }
  .chapter { top: auto; bottom: 0; transform: none; }
  .chapter h2 { font-size: clamp(26px, 7vw, 40px); margin-bottom: 12px; }
  .chapter .num { margin-bottom: 12px; }
  .chapter p:last-child { font-size: 15px; margin: 0 auto; }
  .progress { bottom: 24px; font-size: 9px; letter-spacing: .12em; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint i { animation: none; }
}
