/* Concept: 30,000 points, one per car part, fill the whole screen behind the page.
   Text and product screens float over that world. On desktop every size is in rem derived from
   the viewport, so a laptop and a stand screen show the same composition. */

@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-cyrillic.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; src: url("../fonts/unbounded-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Golos Text"; src: url("../fonts/golos-cyrillic.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Golos Text"; src: url("../fonts/golos-latin.woff2") format("woff2"); font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-cyrillic.woff2") format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-latin.woff2") format("woff2"); font-weight: 400 600; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122; }

:root {
  color-scheme: dark;
  --ink-950: #060a15;
  --ink-900: #0a1020;
  --ink-800: #0f172a;
  --ink-700: #17223b;
  --line: #2a3a5e;
  --line-soft: #1c2944;
  --text: #eef2fb;
  --muted: #a9b8d6;
  --blue: #4285f4;
  --blue-bright: #7da7f7;
  --blue-deep: #1967d2;
  --amber: #f59e0b;
  --green: #34d399;
  --font-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --gutter: max(1rem, env(safe-area-inset-left, 0px));
  --gutter-r: max(1rem, env(safe-area-inset-right, 0px));
  --nav-h: 3.5rem;
  --out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; background: var(--ink-950); overflow-anchor: none; }
body { margin: 0; background: var(--ink-950); color: var(--text); font-family: var(--font-body); font-size: 1rem; line-height: 1.55; overflow-x: hidden; overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 3px; border-radius: 4px; }
.eyebrow { font-family: var(--font-mono); font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-bright); }

@media (min-width: 900px) and (min-height: 540px) {
  html { font-size: clamp(12.5px, min(1.78vh, 1.111vw), 44px); }
  :root { --gutter: 4rem; --gutter-r: 4rem; --nav-h: 4.5rem; }
}

/* The world */
#world { position: fixed; left: 0; top: 0; z-index: 0; display: block; width: 100vw; height: 100vh; height: 100lvh; }
.vignette { position: fixed; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 95% at 58% 46%, transparent 58%, rgba(3, 5, 12, .72) 100%); }
.no-gl #world, .no-gl .tether { display: none; }
.no-gl .wi { transform: none !important; transition: none !important; }
main { position: relative; z-index: 2; }
.tether { position: fixed; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: 0; transition: opacity .35s ease; }
.tether.is-on { opacity: 1; }
.tether line { stroke: var(--blue-bright); stroke-width: 1; stroke-dasharray: 3 5; opacity: .55; }
.tether circle { fill: var(--blue-bright); }

/* Words rising out of a mask */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: .08em .02em .16em 0; margin-bottom: -.16em; }
.js .wi { display: inline-block; transform: translateY(125%); transition: transform .95s var(--out); transition-delay: calc(var(--i) * 45ms); will-change: transform; }
.js .is-in .wi { transform: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3rem; padding: .7rem 1.4rem; border-radius: .75rem; font-weight: 600; text-decoration: none; transition: transform .15s ease, background-color .15s ease, border-color .15s ease; }
.btn:active { transform: scale(.98); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 0 2.5rem rgba(66, 133, 244, .45); }
.btn--primary:hover { background: var(--blue-deep); }
.btn--ghost { border: 1px solid var(--line); background: rgba(10, 16, 32, .6); }
.btn--ghost:hover { border-color: var(--blue-bright); }

/* Nav */
.nav { position: fixed; inset: 0 0 auto; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) var(--gutter-r) 0 var(--gutter); display: flex; align-items: center; gap: 1rem; transition: background-color .25s ease; }
.nav__brand { display: flex; align-items: center; gap: .6rem; margin-right: auto; font-family: var(--font-display); font-weight: 700; font-size: 1rem; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.nav__brand img { width: 1.6rem; height: 1.6rem; display: block; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: .6rem; overflow: hidden; background: rgba(10, 16, 32, .6); }
.lang button { min-width: 2.75rem; min-height: 2.5rem; padding: 0 .5rem; font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); }
.lang button[aria-pressed="true"] { background: var(--ink-700); color: var(--text); }
.nav__cta { display: none; min-height: 2.5rem; padding: .4rem 1.1rem; font-size: .9375rem; box-shadow: none; }
@media (min-width: 640px) { .nav__cta { display: inline-flex; } }

/* Scenes, phone first: text sits at the edges, the world shows through in the middle */
.scene { position: relative; }
.pin { position: relative; }

.hero { height: 112svh; }
.hero .pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; gap: .5rem; padding: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 1rem) var(--gutter-r) 1.25rem var(--gutter); }
.hero__title { display: flex; flex-direction: column; gap: .35rem; margin-top: .5rem; }
.hero__count { display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(3.6rem, 19vw, 6.6rem); line-height: .98; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.hero__cap { font-family: var(--font-display); font-weight: 500; font-size: clamp(1rem, 4.6vw, 1.5rem); line-height: 1.2; color: var(--muted); }
.hero__line { margin-top: .5rem; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.45rem, 6.6vw, 2.4rem); line-height: 1.14; letter-spacing: -.02em; color: var(--blue-bright); }
.hero__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: auto; }
.scrollhint { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-mono); font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); text-decoration: none; }
.scrollhint__bar { position: relative; width: 1px; height: 2.25rem; overflow: hidden; background: var(--line); }
.scrollhint__bar::after { content: ""; position: absolute; left: 0; top: -60%; width: 1px; height: 60%; background: var(--blue-bright); animation: hint 1.8s var(--out) infinite; }
@keyframes hint { to { top: 110%; } }

.idea { height: 128svh; }
.idea .pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; gap: .9rem; padding: 0 var(--gutter-r) 2.5rem var(--gutter); }
.idea__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.6rem, 7.4vw, 3rem); line-height: 1.1; letter-spacing: -.025em; text-wrap: balance; }
.idea__text { max-width: 36rem; color: var(--muted); font-size: 1.0625rem; }

/* Steps on a phone: the shape stays up top, text and the product screen scroll over it */
.step { padding-top: calc(54svh + 5.5rem); }
.step__big { display: none; }
.step__detail { display: flex; flex-direction: column; gap: 1.25rem; padding: 2.5rem var(--gutter-r) 3rem var(--gutter); background: linear-gradient(to bottom, transparent, rgba(6, 10, 21, .94) 2.5rem); }
.step__copy { display: flex; flex-direction: column; gap: .8rem; min-width: 0; }
.step__title { font-family: var(--font-display); font-weight: 700; font-size: 1.625rem; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
.step__text { color: var(--muted); }
.step__facts { display: flex; flex-direction: column; gap: .45rem; font-size: .9375rem; }
.step__facts li { position: relative; padding-left: 1.15rem; }
.step__facts li::before { content: ""; position: absolute; left: 0; top: .6em; width: .5rem; height: 2px; background: var(--blue); }
.step__screen { min-width: 0; }

/* Part card and route: only during the six steps */
.ledger, .route { opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.zone-steps .ledger, .zone-steps .route { opacity: 1; }
.ledger { position: fixed; z-index: 25; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .45rem var(--gutter-r) .55rem var(--gutter); background: rgba(10, 16, 32, .94); border-block: 1px solid var(--line-soft); }
.ledger__part { display: none; }
.ledger__cell { min-width: 0; }
.ledger__label { display: block; font-size: .6875rem; color: var(--muted); line-height: 1.25; }
.ledger__value { display: block; font-family: var(--font-mono); font-weight: 600; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.ledger__delta { display: none; }
.route { position: fixed; z-index: 26; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + 3.05rem); left: 0; right: 0; height: 2px; }
.route__line, .route__fill { position: absolute; left: 0; top: 0; height: 2px; }
.route__line { right: 0; background: var(--line-soft); }
.route__fill { width: calc(100% * ((var(--p, 0) * 5 + 1) / 6)); background: var(--blue); transition: width .7s var(--out); }
.route__nodes { display: none; }

/* Spec: laid out like a parts-catalogue position list */
.spec { position: relative; padding: 4rem var(--gutter-r) 4rem var(--gutter); background: rgba(6, 10, 21, .8); }
.section-title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.75rem, 7vw, 3.25rem); line-height: 1.1; letter-spacing: -.02em; text-wrap: balance; max-width: 22ch; margin-top: .6rem; }
.spec__list { margin-top: 2.25rem; border-top: 1px solid var(--line); }
.spec__row { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); align-content: start; gap: .15rem .5rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.spec__pos { font-family: var(--font-mono); font-size: .875rem; color: var(--blue-bright); line-height: 1.7; }
.spec__name { font-weight: 600; font-size: 1.0625rem; }
.spec__text { grid-column: 2; color: var(--muted); font-size: .9375rem; }

/* Proof: the particles spell the company's name, this finishes the sentence */
.proof { height: 128svh; }
.proof .pin { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; gap: .9rem; padding: 0 var(--gutter-r) 2.5rem var(--gutter); }
.proof__title { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.5rem, 6.8vw, 3.1rem); line-height: 1.12; letter-spacing: -.025em; text-wrap: balance; }
.gl .proof__name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.proof__text { max-width: 44rem; color: var(--muted); }

/* Contact: the QR code made of points sits above, everything else below it */
.contact { padding-top: 66svh; }
.contact .pin { display: flex; flex-direction: column; gap: 1rem; padding: 2rem var(--gutter-r) 2.5rem var(--gutter); background: linear-gradient(to bottom, transparent, rgba(6, 10, 21, .94) 2rem); }
.contact__title { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 9vw, 4.6rem); line-height: 1.04; letter-spacing: -.03em; }
.contact__lead { color: var(--muted); font-size: 1.0625rem; max-width: 34rem; }
.contact__buttons { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: .75rem; max-width: 34rem; }
.contact__buttons .btn { justify-content: flex-start; padding-inline: 1.1rem; }
.contact__buttons .btn[data-empty] { opacity: .6; border-style: dashed; box-shadow: none; }
.contact__buttons [data-contact="phone"] { grid-column: 1 / -1; white-space: nowrap; }
.contact__buttons svg { width: 1.25rem; height: 1.25rem; flex: none; }
.contact__url { font-family: var(--font-mono); font-size: 1.0625rem; }

.qr-crisp { position: fixed; left: 0; top: 0; z-index: 1; opacity: 0; pointer-events: none; transition: opacity .9s ease .1s; will-change: transform; }
.qr-crisp img { position: absolute; left: 12.121%; top: 12.121%; display: block; width: 75.758%; height: 75.758%; }
.qr-crisp.is-on { opacity: 1; }
.no-gl .qr-crisp { position: static; width: 12rem; height: 12rem; margin: 1rem var(--gutter); background: #fff; opacity: 1; transform: none !important; }

.footer { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.5rem var(--gutter-r) calc(1.5rem + env(safe-area-inset-bottom, 0px)) var(--gutter); background: var(--ink-950); border-top: 1px solid var(--line-soft); font-size: .8125rem; color: var(--muted); }

/* Without WebGL the scenes collapse into an ordinary page */
.no-gl .hero, .no-gl .idea, .no-gl .proof { height: auto; }
.no-gl .hero .pin, .no-gl .idea .pin, .no-gl .proof .pin { position: static; height: auto; padding-block: 5rem 2rem; }
.no-gl .step, .no-gl .contact { padding-top: 2rem; }

/* Desktop: scenes pin and play out as you scroll */
@media (min-width: 900px) and (min-height: 540px) {
  .eyebrow { font-size: .9375rem; }
  .js .scene + .scene { margin-top: -50vh; }
  /* Scenes overlap, so an empty part of one must not swallow clicks meant for the one below. */
  .scene { pointer-events: none; }
  .pin > * { pointer-events: auto; transition: opacity .3s ease; }
  .gl .scene:not(.is-in) .pin > * { opacity: 0; }
  .pin > * { position: relative; z-index: 1; }
  .idea .pin::before, .js .step .pin::before { content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .35s ease; }
  .idea.is-in .pin::before, .js .step.is-in .pin::before { opacity: 1; }
  .hero { height: 108vh; }
  .hero .pin { height: 100vh; padding: calc(var(--nav-h) + 3rem) var(--gutter-r) 3rem var(--gutter); }
  .hero__count { font-size: 9.4rem; }
  .hero__cap { font-size: 1.65rem; }
  .hero__line { font-size: 2.75rem; max-width: 32rem; margin-top: 1.1rem; }
  .scrollhint { font-size: .875rem; }
  .hero__foot { justify-content: flex-start; gap: 2.5rem; }

  .idea { height: 125vh; }
  .idea .pin { height: 100vh; padding: 0 var(--gutter-r) 4rem var(--gutter); }
  .idea .pin::before { background: linear-gradient(to top, rgba(6, 10, 21, .92), rgba(6, 10, 21, .6) 30%, transparent 48%); }
  .idea__title { font-size: 3.6rem; max-width: 62rem; }
  .idea__text { font-size: 1.3rem; max-width: 46rem; }

  .js .step { height: 140vh; padding: 0; }
  .js .step .pin { position: sticky; top: 0; height: 100vh; overflow: clip; }
  .js .step .pin::before { background: linear-gradient(to right, rgba(6, 10, 21, .9), rgba(6, 10, 21, .62) 30%, transparent 52%); }
  .js .step .step__big { position: absolute; left: var(--gutter); top: 50%; display: flex; flex-direction: column; gap: 1rem; width: 47rem; transform: translateY(-58%); transition: opacity .45s ease, transform .7s var(--out); }
  .bigtitle { font-family: var(--font-display); font-weight: 800; font-size: 3.9rem; line-height: 1.06; letter-spacing: -.035em; }
  .js .step.is-detail .step__big { opacity: 0; transform: translateY(-78%); }

  .js .step .step__detail { position: absolute; inset: 0; display: grid; grid-template-columns: 30rem minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 3.5rem; padding: calc(var(--nav-h) + .5rem) var(--gutter-r) 5rem var(--gutter); background: none; pointer-events: none; }
  .js .step.is-detail .step__detail { pointer-events: auto; }
  .js .step__copy { gap: 1rem; padding: .85rem 1rem 1rem; margin: -.85rem -1rem 0; border-radius: 1rem; background: rgba(6, 10, 21, .72); align-self: start; opacity: 0; transform: translateY(1.6rem); transition: opacity .4s ease, transform .9s var(--out); }
  .js .step.is-detail .step__copy { opacity: 1; transform: none; transition-delay: .12s; }
  .step__title { font-size: 2.5rem; }
  .step__text { font-size: 1.125rem; }
  .step__facts { font-size: 1rem; gap: .55rem; }

  .js .step__screen { align-self: center; opacity: 0; transform: perspective(90rem) translate3d(12rem, 2rem, 0) rotateY(-32deg); transform-origin: 100% 50%; transition: opacity .55s ease, transform 1.1s var(--out); will-change: transform; }
  .js .step.is-detail .step__screen { opacity: 1; transform: perspective(90rem) rotateY(calc(var(--ry, 0) * 1deg)) rotateX(calc(var(--rx, 0) * 1deg)); transition: opacity .55s ease .1s, transform .9s var(--out); }

  .ledger { top: auto; left: var(--gutter); right: auto; bottom: 1.5rem; width: 30rem; grid-template-columns: 1fr 1fr 1fr; gap: .25rem 1rem; padding: .9rem 1.2rem .75rem; background: rgba(23, 34, 59, .88); border: 1px solid var(--line); border-radius: .875rem; }
  .ledger__part { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .2rem .75rem; grid-column: 1 / -1; padding-bottom: .5rem; margin-bottom: .35rem; border-bottom: 1px solid var(--line); font-size: .9375rem; }
  .ledger__sku { font-family: var(--font-mono); font-size: .8125rem; color: var(--blue-bright); }
  .ledger__label { font-size: .8125rem; }
  .ledger__value { font-size: 1.375rem; }
  .ledger__delta { display: block; height: 1.3em; font-family: var(--font-mono); font-size: .8125rem; color: var(--green); }
  .ledger__delta.is-minus { color: var(--amber); }

  .route { top: auto; left: calc(var(--gutter) + 34rem); right: var(--gutter); bottom: 3.1rem; height: 2px; }
  .route__line { background: var(--line); }
  .route__fill { width: calc(100% * var(--p, 0)); }
  .route__nodes { position: absolute; inset: 0; display: block; }
  .route__node { position: absolute; top: 0; left: calc(var(--i) * 20%); transform: translateX(-50%); display: grid; justify-items: center; }
  .route__dot { width: .75rem; height: .75rem; margin-top: -.3rem; border-radius: 50%; background: var(--ink-900); border: 2px solid var(--line); transition: border-color .3s ease, background-color .3s ease; }
  .route__node.is-passed .route__dot { border-color: var(--blue); background: var(--blue); }
  .route__label { margin-top: .45rem; font-family: var(--font-mono); font-size: .8125rem; color: var(--muted); white-space: nowrap; transition: color .3s ease; }
  .route__node.is-current .route__label { color: var(--text); }

  .spec { padding-block: 7rem; }
  .spec__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 4rem; }
  .spec__row { grid-template-columns: 3rem minmax(0, 1fr); padding: 1.4rem 0; }
  .spec__name { font-size: 1.1875rem; }
  .spec__text { font-size: 1rem; }

  .proof { height: 125vh; }
  .proof .pin { height: 100vh; padding: 0 var(--gutter-r) 4.5rem var(--gutter); }
  .proof__title { font-size: 3.5rem; max-width: 62rem; }
  .proof__text { font-size: 1.1875rem; }

  .contact { padding-top: 0; height: 112vh; }
  .contact .pin { position: sticky; top: 0; height: 100vh; justify-content: center; gap: 1.4rem; padding: var(--nav-h) var(--gutter-r) 2rem var(--gutter); background: none; }
  .contact .pin > * { max-width: 34rem; }
  .contact__title { font-size: 4.6rem; }
  .contact__lead { font-size: 1.1875rem; }
  .contact__buttons { grid-template-columns: 1fr 1fr; }
  .contact__url { font-size: 1.25rem; }
}

/* Stand screen: scenes replace scrolling */
.kiosk-qr { display: none; }
.kiosk, .kiosk body { height: 100%; overflow: hidden; }
.kiosk body { cursor: none; }
.kiosk .nav__cta, .kiosk .lang, .kiosk .hero__foot, .kiosk .contact__buttons, .kiosk .spec, .kiosk .footer, .kiosk .route { display: none; }
.kiosk [data-scene] { position: fixed; inset: 0; height: 100vh; padding: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility 0s linear .7s; }
.kiosk [data-scene].is-on { opacity: 1; visibility: visible; transition: opacity .7s ease; }
.kiosk [data-scene] .pin { position: absolute; inset: 0; height: 100%; }
.kiosk .scene + .scene, .no-gl .scene + .scene { margin-top: 0; }
.kiosk .step__screen { margin-right: 12rem; }
.kiosk .contact__lead { font-size: 1.5rem; }
.kiosk .contact__url { font-size: 2rem; }
.kiosk .kiosk-qr { position: fixed; right: 1rem; bottom: 1rem; z-index: 40; display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: 1.5rem 1.5rem .5rem; background: #fff; border-radius: .875rem; color: #0f172a; transition: opacity .4s ease; }
.kiosk .kiosk-qr img { display: block; width: 9.5rem; height: 9.5rem; }
.kiosk .kiosk-qr span { font-family: var(--font-mono); font-weight: 600; font-size: .9375rem; }
.kiosk .kiosk-qr.is-hidden { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .wi { transform: none; }
}
