:root {
  --bg: #0a0a0a;
  --ink: #f2f2f2;
  --ink-2: rgba(242, 242, 242, .62);
  --mute: rgba(242, 242, 242, .38);
  --line: rgba(255, 255, 255, .09);
  --sans: 'Manrope', 'Segoe UI Variable Display', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --pad: clamp(20px, 6vw, 112px);
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
body { background: var(--bg); color: var(--ink); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
::selection { background: #f2f2f2; color: #0a0a0a; }

#gl, #pm { position: fixed; pointer-events: none; z-index: 0; }
#gl { inset: 0; width: 100%; height: 100%; display: block; }
#pm { display: none; }
main, .foot { position: relative; z-index: 1; }
/* лёгкое зерно поверх всего — живой, «плёночный» чёрный вместо плоского */
.grain { position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: .045;
  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' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0% { transform: translate(0, 0); } 33% { transform: translate(-3%, 2%); } 66% { transform: translate(2%, -3%); } 100% { transform: translate(0, 0); } }

/* ── шапка: прячется при прокрутке вниз, возвращается при прокрутке вверх ── */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; height: 56px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--pad); transition: transform .6s var(--ease), background .4s, backdrop-filter .4s; }
.nav.solid { background: rgba(10, 10, 10, .62); backdrop-filter: saturate(1.4) blur(18px); }
.nav.up { transform: translateY(-100%); }
.nav nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 34px); font-size: 14px; color: var(--ink-2); }
.nav nav a { transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.pill { padding: 7px 16px; border-radius: 18px; border: 1px solid rgba(255, 255, 255, .2); color: var(--ink) !important; }
.pill:hover { background: rgba(255, 255, 255, .06); }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 600 12.5px/1 var(--sans); letter-spacing: .34em; }
.dot { display: inline-block; width: 15px; height: 15px; border-radius: 50%; flex: 0 0 15px;
  background: radial-gradient(ellipse 34% 16% at 50% 22%, rgba(255, 255, 255, .9), transparent 70%), radial-gradient(circle at 50% 55%, #1c1c1c 0, #040404 65%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 0 12px rgba(255, 255, 255, .14); }

/* ── типографика ── */
.kicker { font: 500 13px/1 var(--sans); letter-spacing: .26em; text-transform: uppercase; color: var(--mute); }
.mega { font: 600 clamp(58px, 11.5vw, 188px)/.92 var(--sans); letter-spacing: -.055em; }
.big { font: 600 clamp(44px, 7.6vw, 124px)/.96 var(--sans); letter-spacing: -.045em; }
.lede { font-size: clamp(18px, 1.55vw, 23px); line-height: 1.5; color: var(--ink-2); max-width: 640px; margin-top: 28px; }
.split .ln { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split .wd { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease); }
.split.in .wd { transform: none; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── 1. сцена ── */
.stage { height: 560vh; position: relative; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-type { position: absolute; left: 0; right: 0; top: 13vh; text-align: center; will-change: transform, opacity; }
.hero-type .kicker { margin-bottom: 26px; opacity: 0; transform: translateY(10px); transition: opacity 1.4s var(--ease) .2s, transform 1.4s var(--ease) .2s; }
.hero-type .mega .w { display: inline-block; opacity: 0; transform: translateY(.35em); filter: blur(10px);
  transition: opacity 1.4s var(--ease), transform 1.4s var(--ease), filter 1.4s var(--ease); }
.hero-type .mega .w + .w { transition-delay: .14s; }
body.ready .hero-type .kicker, body.ready .hero-type .mega .w { opacity: 1; transform: none; filter: none; }
.orb-hit { position: absolute; border-radius: 50%; cursor: pointer; touch-action: none; z-index: 2; }
.orb-tip { position: absolute; left: 0; right: 0; bottom: 6.5vh; text-align: center; font-size: 13px; color: var(--mute); transition: opacity .5s, color .3s; }
.beats { position: absolute; inset: 0; pointer-events: none; }
.beat { position: absolute; left: var(--pad); top: 50%; width: min(42vw, 560px); opacity: 0; transform: translateY(-50%); will-change: opacity, transform; }
.beat .n { font: 500 13px/1 var(--mono); color: var(--mute); margin-bottom: 22px; }
.beat h2 { font: 600 clamp(44px, 6.4vw, 104px)/.95 var(--sans); letter-spacing: -.045em; }
.beat .d { font-size: clamp(17px, 1.45vw, 22px); color: var(--ink-2); margin-top: 22px; max-width: 460px; min-height: 1.5em; }
.said { font-style: normal; }
.said::before { content: '«'; } .said::after { content: '»'; }
.said .caret { display: inline-block; width: 2px; height: 1.05em; background: var(--ink); vertical-align: -3px; margin-left: 2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.scroll-cue { position: absolute; left: 50%; bottom: 0; width: 1px; height: 56px; background: rgba(255, 255, 255, .12); overflow: hidden; transition: opacity .5s; }
.scroll-cue i { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--ink); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { to { top: 110%; } }

/* ── 2. экран с игрой ── */
.screen-sec, .list-sec, .demo-sec, .lang-sec { padding: 24vh var(--pad) 0; }
.screen { position: relative; margin-top: 9vh; aspect-ratio: 16 / 9; border-radius: clamp(16px, 2vw, 30px); overflow: hidden; background: #050505;
  box-shadow: 0 0 0 1px var(--line), 0 60px 160px rgba(0, 0, 0, .7); transform-origin: 50% 0; will-change: transform; }
.scene { position: absolute; inset: 0; background:
  radial-gradient(120% 70% at 50% 110%, #1b1410 0, transparent 60%),
  linear-gradient(180deg, #0b0d12 0%, #151820 45%, #0d0b0a 46%, #070605 100%); }
.scene i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: drift 18s ease-in-out infinite alternate; }
.scene i:nth-child(1) { width: 46%; height: 40%; left: 8%; top: 18%; background: #3a2a1d; }
.scene i:nth-child(2) { width: 30%; height: 30%; right: 10%; top: 30%; background: #1d2a3a; animation-duration: 23s; }
.scene i:nth-child(3) { width: 60%; height: 22%; left: 20%; bottom: 6%; background: #2a1712; animation-duration: 15s; }
@keyframes drift { to { transform: translate(6%, -4%) scale(1.12); } }
.hud { position: absolute; top: 4%; right: 3%; width: clamp(210px, 26%, 340px); display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 8px; border-radius: 16px; background: rgba(12, 12, 12, .82); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); backdrop-filter: blur(8px); }
.tile { border-radius: 11px; background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); padding: 7px 9px 5px; display: grid; grid-template-columns: 1fr auto; }
.tile span { font-size: 10.5px; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile b { font: 500 13px/1.2 var(--mono); font-variant-numeric: tabular-nums; }
.tile canvas { grid-column: 1 / -1; width: 100%; height: 24px; margin-top: 4px; }
.toast { position: absolute; left: 3%; bottom: 5%; display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px; border-radius: 22px;
  background: rgba(14, 14, 14, .86); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); backdrop-filter: blur(8px); font-size: clamp(12px, 1.1vw, 15px);
  opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .8s var(--ease); }
.toast.show { opacity: 1; transform: none; }

/* ── 3. строки возможностей ── */
.rows { list-style: none; margin-top: 10vh; border-top: 1px solid var(--line); }
.rows li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: baseline; padding: 34px 0;
  border-bottom: 1px solid var(--line); }
.rows h3 { font: 600 clamp(26px, 3.2vw, 46px)/1.05 var(--sans); letter-spacing: -.03em; transition: transform .6s var(--ease), color .3s; }
.rows p { color: var(--ink-2); font-size: clamp(16px, 1.3vw, 20px); max-width: 520px; }
.rows li:hover h3 { transform: translateX(10px); }

/* ── 4. облик ── */
.looks-sec { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 4vw; padding: 24vh var(--pad) 0; }
.looks-orb { aspect-ratio: 1; width: 100%; max-width: 620px; justify-self: center; }
.picker { display: flex; gap: 10px; margin-top: 44px; flex-wrap: wrap; }
.picker button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-align: left;
  padding: 12px 22px 12px 12px; border-radius: 22px; box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .3s, background .3s; min-width: 190px; }
.picker button:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24); }
.picker button.on { background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.picker .sw { grid-row: 1 / 3; width: 38px; height: 38px; border-radius: 50%; }
.picker span { font-weight: 600; font-size: 16px; }
.picker small { font-size: 12.5px; color: var(--mute); }
.sw.orb { background: radial-gradient(ellipse 36% 18% at 50% 22%, rgba(255, 255, 255, .9), transparent 70%), radial-gradient(circle at 50% 55%, #1c1c1c 0, #030303 66%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.sw.polymer { background: radial-gradient(ellipse 30% 16% at 42% 24%, rgba(255, 235, 235, .95), transparent 70%), radial-gradient(circle at 50% 58%, #a3060f 0, #3c0004 72%);
  box-shadow: 0 0 18px rgba(200, 10, 20, .35); }

/* ── 5. языки ── */
.lang-sec { text-align: left; }
.langs { display: flex; flex-direction: column; margin-top: 4vh; }
.lg { font: 600 clamp(56px, 12vw, 200px)/1 var(--sans); letter-spacing: -.055em; color: rgba(242, 242, 242, .12); transition: color .8s var(--ease); }
.lg.on { color: var(--ink); }

/* ── 6. демо ── */
.device { margin: 9vh auto 0; max-width: 1240px; aspect-ratio: 16 / 10; max-height: 82vh; border-radius: clamp(16px, 2vw, 28px); overflow: hidden; background: #0a0a0a;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 0 0 8px rgba(255, 255, 255, .025), 0 70px 180px rgba(0, 0, 0, .8); }
.device iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ── 7. финал ── */
.end-sec { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24vh var(--pad) 8vh; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 56px; }
.btn { display: inline-flex; align-items: center; height: 52px; padding: 0 28px; border-radius: 26px; font-weight: 500; font-size: 16px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); transition: background .25s, transform .4s var(--ease); }
.btn:hover { background: rgba(255, 255, 255, .06); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--ink); color: #0a0a0a; box-shadow: none; }
.btn.soon { cursor: default; }
.btn.soon:hover { background: var(--ink); }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 36px var(--pad); border-top: 1px solid var(--line); color: var(--mute); font-size: 13px; }

body.loading .nav { opacity: 0; }
.nav { transition: transform .6s var(--ease), background .4s, opacity 1s var(--ease); }

@media (max-width: 820px) {
  .beat { left: var(--pad); right: var(--pad); width: auto; top: auto; bottom: 9vh; transform: none; }
  .beat h2 { font-size: clamp(40px, 11vw, 64px); }
  .hero-type { top: 16vh; }
  .rows li { grid-template-columns: 1fr; gap: 10px; padding: 26px 0; }
  .looks-sec { grid-template-columns: 1fr; padding-top: 18vh; }
  .looks-orb { max-width: 86vw; order: -1; }
  .picker button { min-width: 0; flex: 1; }
  .hud { width: 46%; gap: 4px; padding: 5px; }
  .tile canvas { height: 14px; }
  .tile span { font-size: 9px; }
  .device { aspect-ratio: 9 / 15; }
  .nav nav a:not(.pill) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal, .split .wd, .hero-type .mega .w, .hero-type .kicker { transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important; }
  .grain, .scene i { animation: none; }
}

/* прицел в «игре» и плавная смена текста облика */
.cross { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; transform: translate(-50%, -50%); opacity: .7; }
.cross::before, .cross::after { content: ''; position: absolute; background: rgba(255, 255, 255, .85); left: 50%; top: 50%; transform: translate(-50%, -50%); }
.cross::before { width: 2px; height: 100%; } .cross::after { width: 100%; height: 2px; }
#lookText { transition: opacity .25s, transform 1.1s var(--ease); }
