/* Лендинг intellecta. Идея — призма: один белый луч (запрос) входит в ◆ и
   раскладывается на пять цветов, и каждый цвет — это форма ответа. Цвета ниже
   не украшение: по всей странице они означают одно и то же. */
:root {
  --ink: #0d0a1e;
  --ink-2: #15112b;
  --ink-3: #1f1a3d;
  --line: rgba(238, 234, 248, .12);
  --paper: #eeeaf8;
  --mute: #9a94b8;

  --c-text: #8fb3ff;
  --c-img: #ffb547;
  --c-vid: #ff6185;
  --c-mus: #4fe3b0;
  --c-api: #c39bff;

  --f-display: "Geologica", "Golos Text", system-ui, sans-serif;
  --f-body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font: 17px/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--c-text); outline-offset: 3px; border-radius: 6px; }

.eyebrow {
  margin: 0 0 18px;
  font: 500 13px/1 var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
}
.section-title {
  margin: 0;
  font: 300 clamp(34px, 5vw, 64px)/1.06 var(--f-display);
  letter-spacing: -.02em;
}
.section-title .dim { color: var(--mute); }
.section-lede { max-width: 620px; margin: 22px 0 0; color: var(--mute); font-size: 19px; }

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 26px; border-radius: 999px;
  font: 500 16px/1 var(--f-body); text-decoration: none;
  transition: transform .2s var(--ease), background .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-main { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 0 rgba(238,234,248,.4); }
.btn-main:hover { box-shadow: 0 10px 40px -8px rgba(195,155,255,.55); }
.btn-ghost { color: var(--paper); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(238,234,248,.06); }
.btn-line { border: 1px solid var(--line); color: var(--paper); width: 100%; }
.btn-line:hover { background: rgba(238,234,248,.06); }

/* ---------- верхняя полоса ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 16px var(--gutter);
  background: linear-gradient(var(--ink) 30%, rgba(13,10,30,0));
}
.logo { display: inline-flex; align-items: center; gap: 8px; font: 600 19px/1 var(--f-display); text-decoration: none; letter-spacing: -.01em; }
.logo-mark { color: var(--c-api); }
.top-links { display: flex; gap: 26px; margin-left: auto; }
.top-links a { color: var(--mute); text-decoration: none; font-size: 15px; transition: color .2s; }
.top-links a:hover { color: var(--paper); }
.top-login { padding: 9px 18px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 15px; }
.top-login:hover { background: rgba(238,234,248,.06); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  padding: 120px var(--gutter) 40px;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
.hero::before { /* туман вокруг призмы */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(40% 50% at 66% 50%, rgba(143,179,255,.10), transparent 70%),
    radial-gradient(30% 40% at 90% 30%, rgba(195,155,255,.08), transparent 70%);
}
.hero-copy { position: relative; z-index: 2; max-width: 700px; }
.hero-title { margin: 0; font-family: var(--f-display); letter-spacing: -.035em; line-height: .98; }
.ht-line { display: block; font-size: clamp(46px, 6.4vw, 104px); font-weight: 200; }
.ht-strong { font-weight: 800; }
/* Дисперсия: при загрузке слова раскладываются на цвета и собираются в белый. */
.ht-strong {
  animation: disperse 2.4s 1.1s var(--ease) both;
}
@keyframes disperse {
  0%   { text-shadow: 0 0 0 transparent; opacity: 0; filter: blur(8px); }
  30%  { opacity: 1; filter: blur(0); text-shadow: -14px 0 0 rgba(143,179,255,.8), -7px 0 0 rgba(255,181,71,.7), 7px 0 0 rgba(255,97,133,.7), 14px 0 0 rgba(79,227,176,.7), 21px 0 0 rgba(195,155,255,.6); }
  100% { text-shadow: -1.5px 0 0 rgba(143,179,255,.55), 1.5px 0 0 rgba(255,97,133,.45); }
}
.ht-line:first-child { animation: rise 1s .2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } }
.hero-lede { max-width: 520px; margin: 28px 0 0; color: var(--mute); font-size: 19px; animation: rise 1s .5s var(--ease) both; }

.prompt {
  display: flex; align-items: center; gap: 12px;
  max-width: 480px; margin: 34px 0 0; padding: 14px 16px 14px 20px;
  background: rgba(21,17,43,.8); border: 1px solid var(--line); border-radius: 18px;
  backdrop-filter: blur(10px);
  font-size: 16px;
  animation: rise 1s .7s var(--ease) both;
}
.prompt-dot { width: 10px; height: 10px; flex: none; border-radius: 50%; background: var(--dot, var(--c-text)); box-shadow: 0 0 14px var(--dot, var(--c-text)); transition: background .4s, box-shadow .4s; }
.prompt-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prompt-caret { width: 2px; height: 20px; margin-left: -10px; background: var(--paper); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.prompt-send { margin-left: auto; display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 10px; background: var(--ink-3); color: var(--mute); font-size: 15px; transition: background .2s, color .2s; }
.prompt.sent .prompt-send { background: var(--paper); color: var(--ink); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; animation: rise 1s .85s var(--ease) both; }

.hero-prism {
  position: absolute; z-index: 1; top: 0; right: 0; bottom: 0;
  width: min(1500px, 78vw);
  display: flex; align-items: center;
  pointer-events: none;
  transition: transform .6s var(--ease);
}
.prism-stage { position: relative; width: 100%; aspect-ratio: 1600 / 893; }
/* Фото проявляется слева направо — по ходу луча. Края растворяются в фоне. */
.prism-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  mix-blend-mode: lighten;
  animation: wipe 2.2s .3s cubic-bezier(.6, 0, .2, 1) both;
}
.prism-stage::after { /* края фото растворяются в фоне страницы */
  content: ""; position: absolute; inset: -1px;
  background:
    linear-gradient(90deg, var(--ink) 0, rgba(13,10,30,0) 32%),
    linear-gradient(var(--ink) 0, rgba(13,10,30,.8) 9%, rgba(13,10,30,.35) 21%, rgba(13,10,30,0) 34%, rgba(13,10,30,0) 70%, rgba(13,10,30,.5) 84%, var(--ink) 100%);
}
.prism-svg { z-index: 1; }
@keyframes wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.prism-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.prism-flash { opacity: 0; animation: flash 1.4s 1s ease-out both; }
@keyframes flash { 0% { opacity: 0; } 15% { opacity: .55; } 100% { opacity: 0; } }
.hero.pulse .prism-flash { animation: flash-small .9s .55s ease-out both; }
@keyframes flash-small { 0% { opacity: 0; } 25% { opacity: .35; } 100% { opacity: 0; } }

.beam-pulse { opacity: 0; }
.hero.pulse .beam-pulse { animation: travel .65s ease-in; }
@keyframes travel {
  0%   { opacity: 0; transform: translate(80px, 447px); }
  25%  { opacity: 1; }
  100% { opacity: 1; transform: translate(560px, 452px); }
}

.ray { opacity: 0; mix-blend-mode: screen; transition: opacity .7s var(--ease); }
.ray.lit { opacity: .75; }

.ray-labels text { opacity: 0; animation: rise .8s var(--ease) forwards; transition: opacity .5s; }
.ray-labels text:nth-child(1) { animation-delay: 2.1s; }
.ray-labels text:nth-child(2) { animation-delay: 2.2s; }
.ray-labels text:nth-child(3) { animation-delay: 2.3s; }
.ray-labels text:nth-child(4) { animation-delay: 2.4s; }
.ray-labels text:nth-child(5) { animation-delay: 2.5s; }
.rl-kind { font: 600 32px var(--f-display); fill: var(--paper); }
.rl-who { font: 400 20px var(--f-mono); fill: var(--mute); }
.hero.ready .ray-labels text { animation: none; opacity: .55; }
.hero.ready .ray-labels text.lit { opacity: 1; }

.ray-chips { display: none; }

.where {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  margin: 56px 0 0; padding: 0; list-style: none;
  color: var(--mute); font-size: 14px;
  animation: rise 1s 1.2s var(--ease) both;
}
.where b { color: var(--paper); font-weight: 500; margin-right: 4px; }

/* ---------- ИСТОРИЯ ---------- */
.day { position: relative; padding: 140px var(--gutter) 60px; }
.day-intro { max-width: 900px; margin-bottom: 80px; }

.day-grid {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: clamp(32px, 6vw, 96px);
}
.clock { position: sticky; top: 110px; align-self: start; }
.clock-time {
  font: 200 clamp(72px, 9vw, 148px)/.9 var(--f-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.04em;
  color: var(--cur, var(--c-text));
  text-shadow: 0 0 60px color-mix(in srgb, var(--cur, var(--c-text)) 45%, transparent);
  transition: color .6s, text-shadow .6s;
}
.clock-time.tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: .2; transform: translateY(-14px); filter: blur(4px); } }
.clock-meta { margin-top: 14px; color: var(--mute); font: 500 14px var(--f-mono); }
.clock-track { margin: 40px 0 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.clock-track li {
  position: relative; padding: 10px 0 10px 22px;
  color: var(--mute); font-size: 15px; transition: color .4s;
}
.clock-track li span { display: inline-block; width: 58px; font: 400 13px var(--f-mono); }
.clock-track li::before {
  content: ""; position: absolute; left: -4px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--ink-3); transition: background .4s, box-shadow .4s, transform .4s;
}
.clock-track li.done { color: var(--paper); }
.clock-track li.done::before { background: var(--c); }
.clock-track li.now { color: var(--paper); }
.clock-track li.now::before { background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 25%, transparent); transform: scale(1.3); }

.chapters { display: flex; flex-direction: column; gap: clamp(100px, 16vh, 180px); padding-bottom: 60px; }
.chapter {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center;
  min-height: 78vh;
}
.ch-time { margin: 0 0 14px; font: 500 14px var(--f-mono); color: var(--c); }
.ch-title { margin: 0; font: 400 clamp(28px, 3vw, 40px)/1.12 var(--f-display); letter-spacing: -.02em; }
.ch-text { margin: 18px 0 0; color: var(--mute); }
.ch-text b { color: var(--paper); }
.ch-tag { display: inline-flex; gap: 10px; align-items: center; margin: 22px 0 0; padding: 8px 14px; border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); border-radius: 999px; font: 500 14px var(--f-body); color: var(--c); }
.ch-tag span { padding: 2px 8px; border-radius: 999px; background: var(--c); color: var(--ink); font-size: 12px; }

.chapter > :last-child { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.chapter.seen > :last-child { opacity: 1; transform: none; }

/* --- телефон и Совет --- */
.phone {
  justify-self: center;
  width: 330px; max-width: 100%; height: 640px;
  padding: 12px; border-radius: 52px;
  background: linear-gradient(160deg, #2a2450, #120f26);
  box-shadow: 0 40px 120px -40px color-mix(in srgb, var(--c) 50%, transparent), inset 0 0 0 1px rgba(255,255,255,.08);
  position: relative;
}
.phone-notch { position: absolute; top: 22px; left: 50%; width: 96px; height: 26px; margin-left: -48px; border-radius: 20px; background: #000; z-index: 2; }
.phone-screen {
  height: 100%; overflow: hidden; border-radius: 42px; background: #0a0818;
  padding: 62px 14px 16px; display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; line-height: 1.45;
}
.msg-me { align-self: flex-end; max-width: 86%; padding: 10px 13px; border-radius: 18px 18px 4px 18px; background: #2b3a66; }
.council-label { margin-top: 4px; font: 500 11px var(--f-mono); color: var(--mute); text-transform: uppercase; letter-spacing: .08em; }
.council { display: flex; flex-direction: column; gap: 8px; }
.cm { padding: 9px 12px; border-radius: 14px; background: var(--ink-2); border-left: 3px solid var(--m); }
.cm-who { font: 600 11.5px var(--f-mono); color: var(--m); }
.cm-say { margin: 4px 0 0; min-height: 1.45em; color: var(--paper); }
.cm-say:empty::after { content: "думает…"; color: var(--mute); animation: blink 1.2s steps(2) infinite; }
.verdict {
  margin-top: auto; padding: 11px 13px; border-radius: 16px;
  background: linear-gradient(var(--ink-2), var(--ink-2)) padding-box,
              linear-gradient(110deg, var(--c-text), var(--c-img), var(--c-vid), var(--c-mus), var(--c-api)) border-box;
  border: 1px solid transparent;
  opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.verdict.on { opacity: 1; transform: none; }
.verdict-head { font: 600 12px var(--f-mono); margin-bottom: 4px; }
.verdict p { margin: 2px 0 0; color: var(--mute); }
.verdict b { color: var(--paper); }

/* --- окно браузера и «проявка» --- */
.window, .code {
  border-radius: 16px; overflow: hidden;
  background: var(--ink-2); border: 1px solid var(--line);
  box-shadow: 0 40px 120px -50px color-mix(in srgb, var(--c) 55%, transparent);
}
.window-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--line); font: 400 12px var(--f-mono); color: var(--mute); }
.window-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.window-bar span { margin-left: 10px; }
.window-body { padding: 16px; }
.gen-prompt { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: baseline; min-height: 3.2em; margin-bottom: 14px; font-size: 14.5px; }
.gen-model { padding: 3px 10px; border-radius: 999px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); font: 500 12px var(--f-mono); white-space: nowrap; }
.develop { position: relative; margin: 0; border-radius: 12px; overflow: hidden; max-height: 520px; }
.develop img { width: 100%; height: 100%; max-height: 520px; object-fit: cover; filter: blur(28px) saturate(0) contrast(.7); transform: scale(1.08); transition: filter 3.2s var(--ease), transform 3.2s var(--ease); }
.develop::after { /* шум, из которого проступает картинка */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%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)' opacity='.9'/%3E%3C/svg%3E");
  mix-blend-mode: overlay; opacity: .9; transition: opacity 3.2s var(--ease);
}
.develop.on img { filter: none; transform: none; }
.develop.on::after { opacity: .06; }
.develop figcaption {
  position: absolute; inset: auto 0 0; display: flex; justify-content: space-between;
  padding: 30px 14px 12px; background: linear-gradient(transparent, rgba(0,0,0,.7));
  font: 500 12px var(--f-mono); color: var(--paper); opacity: 0; transition: opacity .6s 2.8s;
}
.develop.on figcaption { opacity: 1; }

/* --- ролик по кадрам --- */
.reel { display: flex; flex-direction: column; gap: 16px; }
.reel-frames { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.reel-frames figure { margin: 0; position: relative; }
.reel-frames img { aspect-ratio: 16/9; width: 100%; object-fit: cover; border-radius: 10px; outline: 1px solid var(--line); }
.reel-frames figcaption { margin-top: 6px; font: 500 12px var(--f-mono); color: var(--mute); }
.reel-frames figure::after { /* стрелка от кадра к плееру */
  content: ""; position: absolute; left: 50%; bottom: -16px; width: 1px; height: 0; background: var(--c);
  transition: height .6s var(--ease) .6s;
}
.reel.on .reel-frames figure::after { height: 14px; }
.reel-player { border-radius: 14px; overflow: hidden; background: #000; border: 1px solid var(--line); box-shadow: 0 40px 120px -50px color-mix(in srgb, var(--c) 60%, transparent); }
.reel-screen { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.reel-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.reel-screen img:first-child { opacity: 1; }
.reel.on .reel-screen img { animation: reel 6s linear infinite; }
.reel.on .reel-screen img:nth-child(2) { animation-delay: 2s; }
.reel.on .reel-screen img:nth-child(3) { animation-delay: 4s; }
@keyframes reel {
  0%   { opacity: 0; transform: scale(1.02); }
  8%   { opacity: 1; }
  33%  { opacity: 1; }
  42%  { opacity: 0; transform: scale(1.12); }
  100% { opacity: 0; transform: scale(1.12); }
}
.reel.on .reel-screen img:first-child { animation-name: reel-first; }
@keyframes reel-first {
  0%   { opacity: 1; transform: scale(1.02); }
  33%  { opacity: 1; }
  42%  { opacity: 0; transform: scale(1.12); }
  92%  { opacity: 0; transform: scale(1.02); }
  100% { opacity: 1; transform: scale(1.02); }
}
.reel-scrub { position: relative; height: 3px; margin: 0 14px; background: rgba(255,255,255,.15); }
.reel-scrub b { position: absolute; top: -3px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 2px; transform: rotate(45deg); background: var(--c); }
.reel-head { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: var(--paper); }
.reel.on .reel-head { animation: scrub 6s linear infinite; }
@keyframes scrub { to { width: 100%; } }
.reel-meta { display: flex; justify-content: space-between; padding: 12px 14px; font: 500 12px var(--f-mono); color: var(--mute); }

/* --- Telegram --- */
.tg { justify-self: center; width: 380px; max-width: 100%; border-radius: 22px; overflow: hidden; background: #0e1621; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 40px 120px -50px color-mix(in srgb, var(--c) 60%, transparent); }
.tg-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #17212b; }
.tg-head b { display: block; font-size: 15px; }
.tg-head small { color: #7f91a4; font-size: 12.5px; }
.tg-ava { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--c-api), var(--c-text)); color: var(--ink); font-size: 16px; }
.tg-body { display: flex; flex-direction: column; gap: 10px; padding: 18px 14px; min-height: 470px; justify-content: flex-end; font-size: 14.5px; }
.tg-msg { max-width: 82%; border-radius: 16px; }
.tg-me { align-self: flex-end; padding: 9px 13px; background: #2b5278; border-bottom-right-radius: 4px; }
.tg-bot { align-self: flex-start; padding: 5px; background: #182533; border-bottom-left-radius: 4px; opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease) .8s, transform .7s var(--ease) .8s; }
.tg.on .tg-bot { opacity: 1; transform: none; }
.tg-bot img { width: 100%; border-radius: 12px; aspect-ratio: 1; object-fit: cover; }
.tg-track { display: flex; align-items: center; gap: 10px; padding: 10px 8px 4px; }
.tg-play { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--c); color: var(--ink); font-size: 13px; }
.tg-wave { display: flex; align-items: center; gap: 2px; height: 28px; flex: 1; }
.tg-wave i { flex: 1; height: 30%; border-radius: 2px; background: color-mix(in srgb, var(--c) 70%, #fff); }
.tg.on .tg-wave i { animation: wave 1.1s ease-in-out infinite alternate; }
/* Задержки после сокращённой записи animation и с той же специфичностью — иначе она их обнулит. */
.tg.on .tg-wave i:nth-child(3n) { animation-delay: -.3s; }
.tg.on .tg-wave i:nth-child(3n+1) { animation-delay: -.65s; }
.tg.on .tg-wave i:nth-child(4n) { animation-delay: -.9s; animation-duration: .8s; }
.tg.on .tg-wave i:nth-child(5n+2) { animation-duration: 1.4s; }
.tg.on .tg-wave i:nth-child(7n+3) { animation-duration: .7s; animation-delay: -.2s; }
@keyframes wave { from { height: 18%; } to { height: 100%; } }
.tg-dur { font: 500 12px var(--f-mono); color: #7f91a4; }
.tg-cap { padding: 2px 8px 6px; color: #7f91a4; font-size: 13px; }

/* --- код --- */
.code-body { margin: 0; padding: 18px 20px; overflow-x: auto; font: 400 13.5px/1.7 var(--f-mono); color: #cfc9e6; }
.code-body .k { color: var(--c-api); }
.code-body .s { color: var(--c-mus); }
.code-body .hl { display: inline-block; width: calc(100% + 40px); margin: 0 -20px; padding: 0 20px; transition: background .6s .4s, box-shadow .6s .4s; }
.code.on .hl { background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 3px 0 0 var(--c); }
.term { padding: 14px 20px 18px; border-top: 1px solid var(--line); font: 400 13.5px/1.6 var(--f-mono); min-height: 92px; background: #0a0818; }
.term-prompt { display: block; color: var(--mute); }
.term-out { color: var(--paper); }

/* ночная сцена: фото, а поверх — окно с кодом */
.api-scene { position: relative; }
.api-photo { width: 86%; margin-left: auto; border-radius: 16px; aspect-ratio: 16 / 9; object-fit: cover; opacity: .9; }
.api-scene .code { position: relative; width: 92%; margin-top: -13%; }

/* набираемый текст */
[data-type].typing::after { content: ""; display: inline-block; width: 7px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: blink 1s steps(1) infinite; }

/* ---------- ЧЕК ---------- */
.bill {
  display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: clamp(40px, 7vw, 120px); align-items: center;
  padding: 140px var(--gutter);
  overflow-x: clip; /* печать до удара в 2,4 раза больше и вылезала бы за край */
  background: radial-gradient(60% 60% at 75% 50%, rgba(195,155,255,.09), transparent 70%);
}
.receipt { justify-self: center; width: 100%; max-width: 400px; }
.receipt-paper {
  position: relative;
  padding: 28px 26px 34px;
  background: #f3efff; color: #1b1733;
  font: 400 14px/1.5 var(--f-mono);
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1.8s var(--ease);
  box-shadow: 0 30px 80px -30px rgba(195,155,255,.5);
}
.receipt.on .receipt-paper { clip-path: inset(0 0 0 0); }
.receipt-paper::after { /* оторванный край */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 8px;
  background: radial-gradient(circle at 50% 100%, var(--ink) 5px, transparent 5.5px) 0 0 / 14px 8px repeat-x;
}
.r-head { display: flex; flex-direction: column; align-items: center; gap: 2px; padding-bottom: 16px; border-bottom: 1.5px dashed rgba(27,23,51,.3); color: #57507a; font-size: 12.5px; }
.r-head b { color: #1b1733; font: 700 18px var(--f-display); }
.r-lines { list-style: none; margin: 0; padding: 14px 0; border-bottom: 1.5px dashed rgba(27,23,51,.3); }
.r-lines li { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s; }
.receipt.on .r-lines li { opacity: 1; transform: none; }
.receipt.on .r-lines li:nth-child(1) { transition-delay: .5s; }
.receipt.on .r-lines li:nth-child(2) { transition-delay: .75s; }
.receipt.on .r-lines li:nth-child(3) { transition-delay: 1s; }
.receipt.on .r-lines li:nth-child(4) { transition-delay: 1.25s; }
.receipt.on .r-lines li:nth-child(5) { transition-delay: 1.5s; }
.r-lines b { font-weight: 500; white-space: nowrap; }
.r-total, .r-pay { display: flex; justify-content: space-between; padding-top: 12px; }
.r-total { font-size: 15px; }
.r-total b { font-variant-numeric: tabular-nums; text-decoration: line-through; text-decoration-color: transparent; transition: text-decoration-color .3s 2.9s; }
.receipt.on .r-total b { text-decoration-color: #c2185b; text-decoration-thickness: 2px; }
.r-pay { font: 700 22px var(--f-display); }
.r-stamp {
  position: absolute; right: 14px; top: 18px;
  padding: 8px 12px; border: 3px solid #7a3cff; border-radius: 8px;
  color: #7a3cff; font: 800 13px/1.1 var(--f-display); text-transform: uppercase; text-align: center; letter-spacing: .06em;
  transform: rotate(-12deg) scale(2.4); opacity: 0;
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1) 3.1s, opacity .2s 3.1s;
}
.receipt.on .r-stamp { transform: rotate(-12deg) scale(1); opacity: .9; }

/* ---------- МОДЕЛИ ---------- */
.models { padding: 120px var(--gutter); border-top: 1px solid var(--line); }
.model-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; margin-top: 64px; border-top: 1px solid var(--line); }
.mcol { padding: 22px 18px 0 0; }
.mcol + .mcol { padding-left: 18px; border-left: 1px solid var(--line); }
.mcol h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 500 13px var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.mcol h3::before { content: ""; width: 9px; height: 9px; transform: rotate(45deg); background: var(--c); box-shadow: 0 0 12px var(--c); }
.mcol ul { margin: 0; padding: 0; list-style: none; }
.mcol li { padding: 6px 0; font: 300 clamp(17px, 1.6vw, 22px)/1.3 var(--f-display); transition: color .2s, transform .2s; }
.mcol li:hover { color: var(--c); transform: translateX(4px); }

/* ---------- ТАРИФЫ ---------- */
.pricing { padding: 120px var(--gutter); }
.plan-switch { display: inline-flex; margin: 40px 0 36px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; }
.plan-switch button { padding: 10px 20px; border: 0; border-radius: 999px; background: none; color: var(--mute); font: 500 15px var(--f-body); cursor: pointer; transition: background .25s, color .25s; }
.plan-switch button[aria-selected="true"] { background: var(--paper); color: var(--ink); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plans:not([hidden]) .plan { animation: rise .6s var(--ease) both; }
.plans .plan:nth-child(2) { animation-delay: .06s; }
.plans .plan:nth-child(3) { animation-delay: .12s; }
.plan { position: relative; display: flex; flex-direction: column; padding: 30px 26px 26px; border-radius: 22px; background: var(--ink-2); border: 1px solid var(--line); }
.plan h3 { margin: 0; font: 500 22px var(--f-display); }
.plan-price { margin: 18px 0 0; display: flex; align-items: baseline; gap: 10px; }
.plan-price b { font: 300 46px/1 var(--f-display); letter-spacing: -.03em; }
.plan-price span { color: var(--mute); font-size: 15px; }
.plan-for { margin: 10px 0 20px; color: var(--mute); }
.plan ul { flex: 1; margin: 0 0 26px; padding: 18px 0 0; border-top: 1px solid var(--line); list-style: none; }
.plan li { position: relative; padding: 6px 0 6px 22px; font-size: 15.5px; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 7px; height: 7px; transform: rotate(45deg); border: 1.5px solid var(--mute); }
.plan-hot {
  background: linear-gradient(var(--ink-2), var(--ink-2)) padding-box,
              linear-gradient(140deg, var(--c-text), var(--c-img), var(--c-vid), var(--c-mus), var(--c-api)) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 30px 90px -40px rgba(195,155,255,.55);
}
.plan-hot li::before { border-color: var(--c-api); background: var(--c-api); }
.plan-badge { position: absolute; top: -13px; left: 24px; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--paper); color: var(--ink); font: 600 12px var(--f-body); }

/* ---------- ВОПРОСЫ ---------- */
.faq { max-width: 860px; padding: 60px var(--gutter) 120px; }
.faq .section-title { margin-bottom: 36px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font: 400 20px/1.35 var(--f-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "◆"; flex: none; color: var(--mute); font-size: 12px; transition: transform .3s, color .3s; }
.faq details[open] summary::after { transform: rotate(45deg); color: var(--c-api); }
.faq details p { margin: 0 0 24px; max-width: 680px; color: var(--mute); }

/* ---------- ФИНАЛ ---------- */
.finale { position: relative; display: grid; place-items: center; min-height: 86vh; padding: 100px var(--gutter); overflow: hidden; text-align: center; }
.finale-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.finale::after { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 60% at 50% 50%, rgba(13,10,30,.35), var(--ink) 92%); }
.finale-copy { position: relative; z-index: 1; }
.finale-title { margin: 0; font: 800 clamp(48px, 9vw, 132px)/1 var(--f-display); letter-spacing: -.04em; text-shadow: -2px 0 0 rgba(143,179,255,.5), 2px 0 0 rgba(255,97,133,.4); }
.finale-copy p { margin: 18px 0 34px; color: var(--mute); font-size: 19px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; padding: 30px var(--gutter) 40px; border-top: 1px solid var(--line); color: var(--mute); font-size: 14px; }
.foot nav { display: flex; gap: 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); }

/* ---------- узкие экраны ---------- */
@media (max-width: 1100px) {
  .chapter { grid-template-columns: minmax(0, 1fr); gap: 36px; min-height: 0; }
  .model-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mcol:nth-child(4) { padding-left: 0; border-left: 0; }
  .mcol:nth-child(n+4) { border-top: 1px solid var(--line); margin-top: 22px; }
}
@media (max-width: 860px) {
  body { font-size: 16px; }
  .top-links { display: none; }
  .top-login { margin-left: auto; }
  .top { padding-top: 12px; padding-bottom: 12px; background: var(--ink); }
  .hero { padding-top: 96px; min-height: 0; }
  /* Призма встаёт сразу под заголовок: иначе на телефоне она уезжает под сгиб. */
  .hero-copy { display: contents; }
  .hero-prism { position: relative; order: 3; width: 150%; margin: 0 0 0 -22%; }
  .hero-lede { order: 4; margin-top: 4px; }
  .prompt { order: 5; }
  .hero-actions { order: 6; }
  .where { order: 7; }
  .ray-labels { display: none; }
  .ray-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: -6px 0 0; padding: 0; list-style: none; position: absolute; bottom: 6%; left: 0; right: 0; }
  .ray-chips li { padding: 4px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 50%, transparent); color: var(--c); font: 500 12px var(--f-mono); }
  .where { margin-top: 18px; }
  .day { padding-top: 90px; }
  .day-intro { margin-bottom: 40px; }
  .day-grid { grid-template-columns: minmax(0, 1fr); }
  /* Часы превращаются в липкую строку сверху. */
  .clock {
    top: var(--top-h, 66px); z-index: 5; display: flex; align-items: baseline; gap: 14px;
    margin: 0 calc(var(--gutter) * -1); padding: 10px var(--gutter);
    background: var(--ink); border-bottom: 1px solid var(--line);
  }
  .clock-time { font-size: 34px; text-shadow: none; }
  .clock-meta { margin: 0; font-size: 12.5px; }
  .clock-track { display: none; }
  .chapters { gap: 90px; }
  .phone { height: 600px; }
  .api-photo { width: 100%; }
  .api-scene .code { width: 100%; margin-top: -12%; }
  .bill { grid-template-columns: 1fr; padding: 100px var(--gutter); }
  .models, .pricing { padding: 90px var(--gutter); }
  .model-cols { grid-template-columns: 1fr 1fr; }
  .mcol, .mcol + .mcol { padding: 20px 12px 0 0; border-left: 0; border-top: 1px solid var(--line); margin-top: 0; }
  .plans { grid-template-columns: 1fr; gap: 26px; }
  .finale { min-height: 70vh; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}
