:root {
  --bg: #05070d;
  --ink: #eef6fb;
  --ink-2: #a9bccb;
  --ink-3: #6f8597;
  --ice: #9fe7f5;
  --teal: #2dd4bf;
  --warm: #ffb86b;
  --glass: rgba(10, 16, 30, .52);
  --glass-2: rgba(16, 26, 46, .7);
  --line: rgba(196, 205, 255, .16);
  --line-2: rgba(196, 205, 255, .32);
  --radius: 22px;
  --ff-d: "Unbounded", system-ui, sans-serif;
  --ff: "Manrope", system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gut: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.6 var(--ff);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--ff-d); font-weight: 600; margin: 0; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; }

.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--ice); color: #000; padding: 10px 16px; border-radius: 10px; }
.skip:focus { top: 16px; }

/* ---------- сцена ---------- */
#scene { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; display: block; }
.sky-fallback {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(ellipse 30% 70% at 50% 100%, rgba(196,205,255,.18), transparent 70%),
    linear-gradient(#0b1630, #05070d 70%);
}
.no-webgl .sky-fallback::after {
  content: ""; position: absolute; left: 50%; bottom: 0; width: 70px; height: 86vh; transform: translateX(-50%);
  background: linear-gradient(90deg, #0d1a2e, #5b7d99 45%, #0d1a2e);
  clip-path: polygon(48% 0, 52% 0, 60% 12%, 100% 100%, 0 100%, 40% 12%);
}
.grain {
  position: fixed; inset: -50%; z-index: 1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- лоадер ---------- */
.loader {
  position: fixed; inset: 0; z-index: 60; background: var(--bg);
  display: grid; place-content: center; justify-items: center; gap: 18px;
  transition: opacity .9s var(--ease), visibility .9s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader__mark { font: 800 clamp(64px, 14vw, 140px)/1 var(--ff-d); background: linear-gradient(180deg, #fff, var(--ice) 60%, transparent); -webkit-background-clip: text; background-clip: text; color: transparent; }
.loader__bar { width: 180px; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--ice); transition: width .3s; }
.loader__txt { color: var(--ink-3); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; }

/* ---------- навигация ---------- */
.nav {
  position: fixed; top: 14px; left: var(--gut); right: var(--gut); z-index: 40;
  display: flex; align-items: center; gap: 24px;
  padding: 10px 10px 10px 20px; border-radius: 999px;
  background: rgba(8, 12, 22, .45); border: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background .4s;
}
.nav.is-scrolled { background: rgba(8, 12, 22, .72); }
.nav__logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 15px var(--ff-d); letter-spacing: .14em; color: var(--ice); }
.nav__logo b { color: var(--ink); font-weight: 800; margin-left: 2px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a { text-decoration: none; font-size: 14px; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--ink); background: rgba(196,205,255,.08); }
.nav__burger { display: none; margin-left: auto; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: transparent; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 6px; }
.nav__burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .3s; }
.nav.is-open .nav__burger span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav.is-open .nav__burger span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

/* ---------- кнопки ---------- */
.btn {
  --b: var(--ice);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 26px; border-radius: 999px; border: 1px solid transparent;
  background: linear-gradient(135deg, #d9fbff, var(--ice) 45%, var(--teal));
  color: #041016; font: 600 15px var(--ff); text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 40px -10px rgba(125, 211, 252, .55);
  transition: transform .3s var(--ease), box-shadow .3s, background .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(125, 211, 252, .75); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--ghost { background: rgba(255,255,255,.04); color: var(--ink); border-color: var(--line-2); box-shadow: none; backdrop-filter: blur(8px); }
.btn--ghost:hover { background: rgba(196,205,255,.1); box-shadow: none; }
.btn--line { background: none; box-shadow: none; color: var(--ice); padding: 10px 0; border-radius: 0; border-bottom: 1px solid var(--line-2); }
.btn--line:hover { box-shadow: none; border-color: var(--ice); transform: translateX(4px); }
.btn--wide { width: 100%; padding: 18px; font-size: 16px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- HUD ---------- */
.hud {
  position: fixed; right: var(--gut); top: 50%; transform: translateY(-50%); z-index: 30;
  display: grid; justify-items: end; gap: 6px; pointer-events: none;
  font-variant-numeric: tabular-nums;
}
.hud__alt { font: 300 46px/1 var(--ff-d); color: var(--ink); text-shadow: 0 0 30px rgba(196,205,255,.4); }
.hud__alt small { font-size: 14px; color: var(--ink-3); margin-left: 4px; }
.hud__floor, .hud__time { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.hud__floor span { color: var(--ice); }
.hud__rail { position: relative; width: 2px; height: 34vh; margin: 14px 0; background: var(--line); border-radius: 2px; }
.hud__fill { position: absolute; left: 0; bottom: 0; width: 100%; height: 0; background: linear-gradient(var(--ice), var(--teal)); border-radius: 2px; box-shadow: 0 0 12px var(--ice); }
.hud__rail i { position: absolute; right: 12px; bottom: calc(var(--p) * 100%); transform: translateY(50%); font-style: normal; font-size: 11px; white-space: nowrap; color: var(--ink-3); letter-spacing: .06em; transition: color .3s; }
.hud__rail i::after { content: ""; position: absolute; right: -15px; top: 50%; width: 8px; height: 1px; background: currentColor; }
.hud__rail i.is-on { color: var(--ice); }

/* ---------- секции ---------- */
main { position: relative; z-index: 10; }
.sec { min-height: 120vh; display: flex; align-items: center; padding: 120px var(--gut); }
.sec--tall { min-height: 160vh; }
.sec--left { justify-content: flex-start; }
.sec--right { justify-content: flex-end; padding-right: calc(var(--gut) + 150px); }
.sec--hero { min-height: 100vh; min-height: 100svh; flex-direction: column; justify-content: center; align-items: flex-start; position: relative; padding-top: 140px; }
.sec--form { min-height: 100vh; justify-content: center; }

.eyebrow { font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ice); margin-bottom: 18px; }

.hero { max-width: 760px; }
.hero__title { font-size: clamp(44px, 8.4vw, 124px); line-height: .95; font-weight: 800; letter-spacing: -.035em; margin-bottom: 28px; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .14em; margin-bottom: -.08em; }
.hero__title .line > span { display: inline-block; transform: translateY(110%); transition: transform 1.3s var(--ease); background: linear-gradient(180deg, #fff 30%, #b9eef8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__title .line--thin { font-weight: 300; font-size: .52em; letter-spacing: .02em; }
.hero__title .line--thin > span { transition-delay: .15s; background: linear-gradient(90deg, var(--ice), var(--teal)); -webkit-background-clip: text; background-clip: text; }
.is-ready .hero__title .line > span { transform: none; }
.hero__lead { font-size: clamp(16px, 1.4vw, 19px); color: var(--ink-2); max-width: 560px; margin-bottom: 34px; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero > *:not(h1) { opacity: 0; transform: translateY(20px); transition: opacity 1s .5s, transform 1s .5s var(--ease); }
.is-ready .hero > * { opacity: 1; transform: none; }

.stats { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 170px)); gap: 1px; border-radius: 18px; overflow: hidden; background: var(--line); border: 1px solid var(--line); }
.stats li { padding: 18px 20px; background: rgba(6, 10, 20, .6); backdrop-filter: blur(12px); }
.stats b { display: block; font: 600 30px/1.1 var(--ff-d); color: var(--ink); font-variant-numeric: tabular-nums; }
.stats span { font-size: 12.5px; color: var(--ink-3); }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-3); }
.scroll-hint span { width: 1px; height: 46px; background: linear-gradient(var(--ice), transparent); animation: drip 2.2s infinite var(--ease); transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- панели ---------- */
.panel {
  position: relative; width: min(560px, 100%);
  padding: clamp(26px, 3vw, 42px); border-radius: var(--radius);
  background: var(--glass); border: 1px solid var(--line);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 40px 120px -40px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.06);
}
.panel::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(196,205,255,.55), transparent 30%, transparent 70%, rgba(125,211,252,.35)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.panel h2 { font-size: clamp(26px, 2.6vw, 38px); line-height: 1.12; margin-bottom: 18px; }
.panel > p { color: var(--ink-2); }
.panel h3 { font-size: 15px; line-height: 1.3; margin-bottom: 6px; color: var(--ink); }
.panel--warm { --ice: var(--warm); }
.panel--warm::before { background: linear-gradient(140deg, rgba(255,184,107,.6), transparent 35%, transparent 70%, rgba(255,120,80,.3)); }
.panel--hero { width: min(640px, 100%); }
.panel--hero h2 { font-size: clamp(30px, 3.4vw, 48px); background: linear-gradient(180deg, #fff, var(--ice)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.panel--hero > h3 { margin: 26px 0 14px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.muted { color: var(--ink-3) !important; font-size: 13px; margin: 14px 0 0; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 28px; margin: 26px 0; }
.grid2 p { font-size: 14px; color: var(--ink-2); margin: 0; }
.feat { list-style: none; margin: 24px 0 26px; padding: 0; display: grid; gap: 4px; }
.feat li { padding: 14px 0 14px 34px; border-top: 1px solid var(--line); position: relative; }
.feat li::before { content: ""; position: absolute; left: 4px; top: 21px; width: 12px; height: 12px; border: 1px solid var(--ice); transform: rotate(45deg); }
.feat p { margin: 0; font-size: 14px; color: var(--ink-2); }

.bars { display: grid; gap: 12px; margin-bottom: 8px; }
.bar { position: relative; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-radius: 12px; overflow: hidden; font-size: 14px; color: var(--ink-2); background: rgba(255,255,255,.03); }
.bar::before { content: ""; position: absolute; inset: 0; width: calc(var(--v) / 600 * 100%); background: linear-gradient(90deg, rgba(196,205,255,.04), rgba(196,205,255,.16)); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease); }
.is-in .bar::before { transform: none; }
.bar span, .bar b { position: relative; }
.bar b { font-family: var(--ff-d); color: var(--ink); font-weight: 600; }
.bar--me { color: var(--ink); }
.bar--me::before { background: linear-gradient(90deg, rgba(125,211,252,.2), rgba(196,205,255,.5)); box-shadow: 0 0 30px rgba(196,205,255,.4); }

.sky { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; height: 300px; margin: 20px 0 0; border-bottom: 1px solid var(--line-2); }
.sky figure { margin: 0; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.sky figure div { width: 14px; height: 0; transition: height 1.8s var(--ease); background: linear-gradient(rgba(255,255,255,.7), rgba(196,205,255,.12)); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); }
.is-in .sky figure div { height: calc(var(--h) / 828 * 82%); }
.sky figure.me div { width: 20px; background: linear-gradient(#fff, var(--ice) 30%, rgba(125,211,252,.2)); filter: drop-shadow(0 0 10px var(--ice)); }
.sky figcaption { order: -1; text-align: center; font-size: 11px; line-height: 1.25; color: var(--ink-3); margin-bottom: 8px; }
.sky figcaption b { display: block; font: 600 15px var(--ff-d); color: var(--ink-2); }
.sky .me figcaption b { color: var(--ice); }

details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; }
summary::-webkit-details-marker { display: none; }
summary h3 { font-size: 16px !important; margin: 0 !important; display: inline; }
summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 300 24px var(--ff-d); color: var(--ice); transition: transform .3s; }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
details p { color: var(--ink-2); font-size: 15px; padding-bottom: 6px; }

/* ---------- форма ---------- */
.panel--form { width: min(1040px, 100%); display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px, 4vw, 60px); background: var(--glass-2); }
.form__intro h2 { font-size: clamp(28px, 3vw, 44px); }
.form__intro > p { color: var(--ink-2); }
.ticks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: var(--ink-2); font-size: 14px; }
.ticks li { padding-left: 26px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 7px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.form { display: grid; gap: 14px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 24px 18px 10px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255,255,255,.035); color: var(--ink);
  font: 500 16px var(--ff); transition: border-color .25s, background .25s; resize: vertical;
}
.field input:hover, .field textarea:hover { border-color: var(--line-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ice); background: rgba(196,205,255,.06); }
.field label { position: absolute; left: 19px; top: 17px; font-size: 15px; color: var(--ink-3); pointer-events: none; transition: all .2s var(--ease); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 7px; font-size: 11.5px; color: var(--ice); letter-spacing: .04em; }
.field.is-err input { border-color: #ff7a7a; }
.chips { border: 0; padding: 0; margin: 4px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-size: 12px; color: var(--ink-3); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); transition: all .2s; }
.chips label:hover span { border-color: var(--line-2); color: var(--ink); }
.chips input:checked + span { background: rgba(196,205,255,.14); border-color: var(--ice); color: var(--ink); }
.chips input:focus-visible + span { outline: 2px solid var(--ice); outline-offset: 2px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--ink-3); cursor: pointer; line-height: 1.45; }
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--teal); flex: none; cursor: pointer; }
.consent a { color: var(--ice); }
.consent.is-err span { color: #ff9a9a; }
.form__status { min-height: 1.4em; margin: 0; font-size: 14px; }
.form__status.ok { color: var(--teal); }
.form__status.err { color: #ff9a9a; }

/* ---------- футер ---------- */
.foot { position: relative; z-index: 10; padding: 60px var(--gut) 40px; background: linear-gradient(transparent, rgba(5,7,13,.92) 30%); }
.foot__buy { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding: 22px 28px; border: 1px solid var(--line); border-radius: 18px; margin-bottom: 30px; background: var(--glass); backdrop-filter: blur(12px); }
.foot__buy p { margin: 0; color: var(--ink-2); }
.foot__buy b { color: var(--ink); }
.foot__legal { font-size: 12.5px; color: var(--ink-3); max-width: 900px; }
.foot__row { display: flex; gap: 24px; font-size: 13px; color: var(--ink-3); margin: 0; }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(60px) scale(.97); filter: blur(8px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease), filter 1.1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; filter: none; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .nav__links a { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 960px) {
  .nav { gap: 12px; }
  .nav__links { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; flex-direction: column; padding: 10px; border-radius: 20px; background: rgba(8,12,22,.94); border: 1px solid var(--line); }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 13px 16px; font-size: 16px; }
  .nav__burger { display: flex; margin-left: 0; }
  .nav > .btn--sm { margin-left: auto; }
  .hud { top: 76px; transform: none; right: 16px; grid-auto-flow: column; align-items: baseline; gap: 10px; padding: 6px 14px; border-radius: 999px; background: rgba(8,12,22,.55); border: 1px solid var(--line); backdrop-filter: blur(10px); }
  .hud__rail, .hud__time { display: none; }
  .hud__alt { font-size: 18px; }
  .hud__alt small { font-size: 11px; }
  .hud__floor { font-size: 10px; }
  .sec--right { padding-right: var(--gut); justify-content: flex-start; }
  .sec { align-items: flex-end; min-height: 115vh; padding-bottom: 90px; }
  .sec--hero { align-items: flex-start; justify-content: flex-end; padding-bottom: 110px; }
  .panel { background: rgba(8, 13, 25, .74); }
  .panel--form { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); width: 100%; margin-top: 40px; }
  .scroll-hint { display: none; }
}
@media (max-width: 560px) {
  .nav { top: 10px; padding: 8px 8px 8px 16px; }
  .nav > .btn--sm { display: none; }
  .nav__burger { margin-left: auto; }
  .grid2 { grid-template-columns: 1fr; }
  .sky { height: 230px; gap: 4px; }
  .sky figcaption { font-size: 9.5px; }
  .foot__buy { padding: 18px; }
  .stats b { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hero > *, .hero__title .line > span { transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .scroll-hint span { animation: none; }
}
.no-webgl .hud, .no-webgl #scene { display: none; }
.hud { transition: opacity .5s; }
.hud.is-hidden { opacity: 0; }

/* Лахта Центр 3 — сиренево-ледяной акцент */
body.t3 { --ice: #c4cdff; --teal: #7dd3fc; --line: rgba(196, 205, 255, .16); --line-2: rgba(196, 205, 255, .32); }
body.t3 .panel--warm { --ice: var(--warm); }
.panel h2 { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
@media (max-width: 560px) { .form__intro h2 { font-size: 25px; } .panel h2 { font-size: 24px; } }
.panel--form > * { min-width: 0; }
