/* WMR — «Сцена ночью». Один файл стилей.
   Тёмная сцена, гели прожекторов, стекло, зерно плёнки. Движение — site.js, здесь только состояния.
   Сайт тёмный всегда: это сцена, а не документ. */

@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url(../fonts/unbounded-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-weight: 200 900; font-display: swap; src: url(../fonts/unbounded-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(../fonts/onest-cyrillic-wght-normal.woff2) format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Onest'; font-weight: 100 900; font-display: swap; src: url(../fonts/onest-latin-wght-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: dark;
  --void: #04050a;
  --panel: rgba(16, 21, 36, .62);
  --panel-solid: #0d1220;
  --glass: rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .085);
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --text: #eef1fb;
  --soft: #c3cadb;
  --muted: #8a93aa;

  /* гели прожекторов */
  --gel-blue: #4f7cff;
  --gel-violet: #9b6bff;
  --gel-cyan: #38e1d2;
  --gel-amber: #ffb547;
  --gel-magenta: #ff5fb0;
  --spectrum: linear-gradient(100deg, #6ea8ff 0%, #9b6bff 42%, #ff7ac0 72%, #ffb547 100%);
  --cool: linear-gradient(100deg, #7fb2ff, #a98bff);

  /* светофор наличия — словарь продукта */
  --go: #34d399;
  --wait: #fbbf24;
  --stop: #f87171;

  --display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wide: 1320px;
  --gutter: clamp(18px, 4.5vw, 64px);
  --r-lg: 20px;
  --r-md: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--void); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--void);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, canvas, svg { display: block; max-width: 100%; }
img, video { height: auto; }
a { color: inherit; }
::selection { background: rgba(155, 107, 255, .45); color: #fff; }
:focus-visible { outline: 2px solid var(--gel-cyan); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wide)); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--panel-solid); padding: 10px 14px; border-radius: 10px; }

/* зерно плёнки и прожектор за курсором — мышь не ловят */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .06; mix-blend-mode: overlay;
  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='3' 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); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
.torch { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(640px circle at var(--mx, 50%) var(--my, 30%), rgba(110, 140, 255, .06), transparent 60%); }
main { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .grain { animation: none; } }

/* ---------- типографика ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }
.h-xl { font-family: var(--display); font-size: clamp(2.5rem, 1rem + 6vw, 7rem); font-weight: 600; letter-spacing: -.05em; line-height: .96; }
.h-lg { font-family: var(--display); font-size: clamp(2rem, 1rem + 3.4vw, 4.2rem); font-weight: 600; letter-spacing: -.04em; line-height: 1.02; }
.lead { font-size: clamp(1.1rem, 1rem + .45vw, 1.32rem); line-height: 1.55; color: var(--soft); max-width: 58ch; }
p { margin: 0 0 1em; text-wrap: pretty; }
.grad { background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--soft); margin-bottom: 22px; }
.kicker::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--k, var(--gel-cyan)); box-shadow: 0 0 14px var(--k, var(--gel-cyan)); }

/* ---------- навигация: плавающая стеклянная капсула ---------- */
.nav {
  position: fixed; top: 16px; left: 50%; z-index: 50; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px;
  background: rgba(10, 13, 24, .55); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 10px 40px -12px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06);
  max-width: calc(100% - 24px);
  transition: transform .5s var(--ease), opacity .5s var(--ease);
}
.nav.is-hidden { transform: translate(-50%, -140%); opacity: 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: .95rem; letter-spacing: .02em; margin-right: 8px; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: var(--spectrum); display: grid; place-items: center; box-shadow: 0 0 18px rgba(155, 107, 255, .45); }
.brand-mark::after { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--void); }
.nav-links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: .86rem; font-weight: 500; padding: 8px 12px; border-radius: 999px; white-space: nowrap; transition: color .25s, background .25s; }
.nav-links a:hover { color: var(--text); background: var(--glass); }
.nav-links a[aria-current="page"] { color: var(--text); background: var(--glass-strong); }
.nav-try { margin-left: 6px; text-decoration: none; white-space: nowrap; font-size: .86rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; background: #fff; color: #07080f; transition: box-shadow .3s; }
.nav-try:hover { box-shadow: 0 8px 30px -6px rgba(155, 107, 255, .75); }
@media (max-width: 980px) { .nav-links { display: none; } .nav { padding-right: 6px; } }

/* ---------- первый экран: 3D-сцена ---------- */
.hero { position: relative; height: 100svh; min-height: 660px; overflow: hidden; isolation: isolate; }
.hero-stage { position: absolute; inset: 0; z-index: 0; }
.hero-stage canvas { width: 100% !important; height: 100% !important; }
.hero-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 1.4s var(--ease); }
.hero.is-live .hero-poster { opacity: 0; }
.hero::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(70% 70% at 12% 88%, rgba(4, 5, 10, .88) 0%, rgba(4, 5, 10, .55) 45%, transparent 75%),
    radial-gradient(120% 85% at 62% 30%, transparent 38%, rgba(4, 5, 10, .5) 72%, var(--void) 100%),
    linear-gradient(180deg, rgba(4, 5, 10, .45) 0%, transparent 20%, transparent 52%, rgba(4, 5, 10, .85) 84%, var(--void) 100%);
}
.hero-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: clamp(40px, 9vh, 104px); pointer-events: none; }
.hero-copy a, .hero-copy .btn { pointer-events: auto; }
.hero-copy .h-xl { max-width: 12.5ch; }
.hero-copy .lead { margin-top: 24px; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.btn {
  position: relative; display: inline-flex; align-items: center; gap: 10px; text-decoration: none;
  font-weight: 600; font-size: .98rem; padding: 14px 22px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .06); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--text);
  transition: transform .35s var(--ease), background .3s, border-color .3s, box-shadow .3s;
}
.btn:hover { transform: translateY(-2px); background: var(--glass-strong); border-color: rgba(255, 255, 255, .3); }
.btn-primary { background: #fff; color: #07080f; border-color: #fff; }
.btn-primary:hover { background: #fff; box-shadow: 0 12px 44px -8px rgba(155, 107, 255, .75); }
.hero-note { position: absolute; z-index: 2; right: var(--gutter); bottom: clamp(40px, 9vh, 104px); max-width: 250px; font-size: .78rem; line-height: 1.5; color: var(--muted); text-align: right; }
.hero-note b { color: var(--soft); font-weight: 500; }
.scroll-cue { position: absolute; z-index: 2; left: 50%; bottom: 18px; width: 22px; height: 36px; margin-left: -11px; border: 1.5px solid var(--line-strong); border-radius: 12px; }
.scroll-cue::after { content: ''; position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--soft); animation: cue 1.8s var(--ease) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(11px); opacity: 0; } 100% { opacity: 0; } }
@media (max-width: 900px) { .hero-note { display: none; } }
@media (max-width: 600px) { .scroll-cue { display: none; } }

/* ---------- бегущая строка ---------- */
.marquee { position: relative; border-block: 1px solid var(--line); padding: 22px 0; overflow: hidden; -webkit-mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; animation: marquee 56s linear infinite; }
.marquee span { font-family: var(--display); font-size: clamp(1.05rem, .8rem + 1vw, 1.55rem); font-weight: 500; letter-spacing: -.02em; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 44px; padding-right: 44px; }
.marquee span::after { content: ''; width: 9px; height: 9px; border-radius: 2px; background: var(--c, var(--gel-violet)); box-shadow: 0 0 16px var(--c, var(--gel-violet)); }
.marquee span:nth-child(3n+1) { --c: var(--gel-blue); }
.marquee span:nth-child(3n+2) { --c: var(--gel-violet); }
.marquee span:nth-child(3n) { --c: var(--gel-amber); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ---------- секции ---------- */
.section { position: relative; padding: clamp(100px, 13vw, 190px) 0; overflow-x: clip; }
.section-head { max-width: 920px; margin-bottom: clamp(48px, 7vw, 96px); }
.section-head .lead { margin-top: 28px; }
.section-head .h-lg { max-width: 20ch; }
.glow { position: absolute; z-index: -1; pointer-events: none; width: 1000px; height: 1000px; left: var(--gx, 70%); top: var(--gy, 20%); transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--gc, rgba(79, 124, 255, .14)), transparent); }

/* ---------- данные у вас: живая схема ---------- */
.sovereign { position: relative; padding: clamp(110px, 14vw, 200px) 0; overflow: hidden; background: radial-gradient(90% 60% at 30% 50%, rgba(52, 211, 153, .06), transparent 70%); }
.sov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.sov-sticky { position: sticky; top: 90px; }
.sov-diagram { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 640px; justify-self: center; }
.sov-diagram canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.ledger { display: grid; gap: 16px; }
.ledger-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; background: var(--panel); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.ledger-card h3 { font-family: var(--display); font-size: .98rem; font-weight: 500; letter-spacing: -.01em; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.ledger-card h3::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 12px var(--dot); }
.ledger-card.stays { --dot: var(--go); }
.ledger-card.leaves { --dot: var(--wait); }
.ledger-card ul { list-style: none; margin: 0; padding: 0; display: grid; }
.ledger-card li { padding: 9px 0; border-top: 1px solid var(--line); color: var(--soft); font-size: .95rem; }
.ledger-card li:first-child { border-top: 0; padding-top: 0; }
.ledger-card li small { display: block; color: var(--muted); font-size: .83rem; line-height: 1.45; margin-top: 3px; }
.ledger-card.stays ul { grid-template-columns: 1fr 1fr; column-gap: 20px; }
.ledger-card.stays li:nth-child(2) { border-top: 0; padding-top: 0; }
.ledger-card.stays li:last-child { grid-column: 1 / -1; }
.sov-note { margin-top: 20px; font-size: .9rem; color: var(--muted); }
.sov-note a { color: var(--gel-cyan); }
@media (max-width: 1000px) { .sov-grid { grid-template-columns: 1fr; } .sov-sticky { position: static; order: -1; } .sov-diagram { max-width: 480px; margin-inline: auto; } }
@media (max-width: 560px) { .ledger-card.stays ul { grid-template-columns: 1fr; } .ledger-card.stays li:nth-child(2) { border-top: 1px solid var(--line); padding-top: 9px; } }

/* ---------- без ограничений: крупные знаки ---------- */
.limits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.limit { position: relative; padding: 28px 26px 30px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.limit .big { font-family: var(--display); font-weight: 600; font-size: clamp(3.4rem, 2rem + 3vw, 5.2rem); line-height: 1; letter-spacing: -.05em; background: var(--spectrum); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 22px; }
.limit h3 { font-family: var(--display); font-size: 1.05rem; font-weight: 500; letter-spacing: -.02em; margin-bottom: 8px; }
.limit p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.5; }
.limits-note { margin-top: 22px; padding: 18px 22px; border-radius: var(--r-md); border: 1px solid var(--line); background: linear-gradient(90deg, rgba(56, 225, 210, .08), transparent 70%); color: var(--soft); max-width: 860px; }
@media (max-width: 1100px) { .limits { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .limits { grid-template-columns: 1fr; } }

/* ---------- отличия: карточка с кадром и тремя доказательствами ---------- */
.diffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.diff { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .3s, transform .45s var(--ease); }
.diff:hover { border-color: color-mix(in srgb, var(--tc) 55%, transparent); transform: translateY(-4px); }
.diff-img { aspect-ratio: 16 / 10; overflow: hidden; background: #0b0f1a; border-bottom: 1px solid var(--line); }
.diff-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform .8s var(--ease); }
.diff:hover .diff-img img { transform: scale(1.03); }
.diff-body { padding: 22px 24px 26px; }
.diff h3 { font-family: var(--display); font-size: 1.12rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 14px; }
.diff ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.diff li { position: relative; padding-left: 18px; font-size: .92rem; line-height: 1.45; color: var(--soft); }
.diff li::before { content: ''; position: absolute; left: 0; top: .55em; width: 7px; height: 7px; border-radius: 2px; background: var(--tc); box-shadow: 0 0 10px var(--tc); }
@media (max-width: 1100px) { .diffs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .diffs { grid-template-columns: 1fr; } }

/* ---------- атлас: вся система по модулям ---------- */
.atlas { margin-top: clamp(80px, 10vw, 140px); }
.atlas-head { margin-bottom: 28px; max-width: 820px; }
.atlas-head .h-md { font-family: var(--display); font-size: clamp(1.6rem, 1rem + 1.6vw, 2.5rem); font-weight: 500; letter-spacing: -.035em; margin-bottom: 12px; }
.atabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.atab { display: inline-flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--soft); font: 500 .92rem var(--body); cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.atab span { font-size: .78rem; color: var(--muted); padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.atab:hover { color: var(--text); border-color: var(--line-strong); }
.atab[aria-selected="true"] { color: var(--text); border-color: color-mix(in srgb, var(--tc) 70%, transparent); background: color-mix(in srgb, var(--tc) 14%, var(--panel-solid)); }
.atab[aria-selected="true"] span { background: color-mix(in srgb, var(--tc) 30%, transparent); color: #fff; }
.agrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.acard { display: flex; flex-direction: column; text-decoration: none; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .25s, transform .4s var(--ease); }
.acard:hover { border-color: color-mix(in srgb, var(--tc) 55%, transparent); transform: translateY(-3px); }
.acard-img { aspect-ratio: 16 / 10; overflow: hidden; background: #0b0f1a; border-bottom: 1px solid var(--line); }
.acard-img img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.acard-img.is-phone { background: radial-gradient(80% 90% at 50% 40%, color-mix(in srgb, var(--tc) 18%, #0b0f1a), #0b0f1a); padding: 14px 0; }
.acard-img.is-phone img { object-fit: contain; object-position: center; border-radius: 12px; }
.acard h3 { font-family: var(--display); font-size: 1rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.3; margin: 16px 18px 6px; }
.acard p { margin: 0 18px 18px; font-size: .88rem; line-height: 1.45; color: var(--muted); }
.amore { margin: 20px 0 0; font-size: .92rem; color: var(--muted); line-height: 1.7; }
.amore b { color: var(--soft); font-weight: 600; }
.amore a { color: var(--soft); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.amore a:hover { color: var(--text); border-color: var(--text); }
.alink { margin: 18px 0 0; }
.alink a { font-weight: 600; font-size: .95rem; text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; }
.apanel[hidden] { display: none; }
@media (max-width: 1000px) { .agrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .agrid { grid-template-columns: 1fr; } }

/* ---------- тезисы ---------- */
.thesis { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(20px, 5vw, 80px); padding: clamp(32px, 4.5vw, 56px) 0; border-top: 1px solid var(--line); align-items: start; }
.thesis:last-child { border-bottom: 1px solid var(--line); }
.thesis h3 { font-family: var(--display); font-size: clamp(1.5rem, 1rem + 1.8vw, 2.7rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.08; }
.thesis p { color: var(--soft); font-size: 1.06rem; margin: 6px 0 0; }
@media (max-width: 820px) { .thesis { grid-template-columns: 1fr; } }

/* ---------- путь проекта: полоса фаз, как на Ганте ---------- */
.path { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.path a { display: block; height: 100%; text-decoration: none; padding: 22px 18px 24px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--panel); transition: border-color .3s, transform .45s var(--ease), background .3s; }
.path a:hover { border-color: color-mix(in srgb, var(--c) 60%, transparent); transform: translateY(-4px); background: rgba(20, 26, 44, .85); }
.path .bar { height: 6px; border-radius: 3px; margin-bottom: 22px; background: var(--c); box-shadow: 0 0 22px color-mix(in srgb, var(--c) 70%, transparent); transform-origin: left center; }
.path .step { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.path h3 { font-family: var(--display); font-size: 1rem; font-weight: 500; margin: 8px 0; letter-spacing: -.01em; }
.path p { font-size: .9rem; color: var(--muted); margin: 0; line-height: 1.5; }
.path li:nth-child(1) { --c: #94a3b8; }
.path li:nth-child(2) { --c: var(--gel-blue); }
.path li:nth-child(3) { --c: var(--gel-violet); }
.path li:nth-child(4) { --c: var(--go); }
.path li:nth-child(5) { --c: var(--gel-cyan); }
.path li:nth-child(6) { --c: var(--gel-amber); }
.js .path .bar { transform: scaleX(0); }
.js .path.is-in .bar { transform: scaleX(1); transition: transform 1s var(--ease); }
.js .path.is-in li:nth-child(2) .bar { transition-delay: .12s; }
.js .path.is-in li:nth-child(3) .bar { transition-delay: .24s; }
.js .path.is-in li:nth-child(4) .bar { transition-delay: .36s; }
.js .path.is-in li:nth-child(5) .bar { transition-delay: .48s; }
.js .path.is-in li:nth-child(6) .bar { transition-delay: .6s; }
@media (max-width: 1100px) { .path { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .path { grid-template-columns: 1fr 1fr; } }

/* ---------- окно приложения: подача кадров ---------- */
.window { position: relative; margin: 0; }
.window .frame {
  position: relative; z-index: 1; overflow: hidden; border-radius: var(--r-lg);
  border: 1px solid rgba(255, 255, 255, .12); background: #0b0f1a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 40px 90px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 0, 0, .6);
  transform-style: preserve-3d;
}
.window .bar { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); font-size: .76rem; color: var(--muted); }
.window .bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .12); flex: none; }
.window .bar i:first-child { background: var(--wc, var(--gel-violet)); box-shadow: 0 0 10px var(--wc, var(--gel-violet)); }
.window .bar span { margin-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.window .media { display: block; width: 100%; aspect-ratio: var(--ar, 16 / 10); object-fit: contain; background: #0b0f1a; }
/* картинка — всегда целиком, в своих пропорциях (иначе обрезались края, например датчик маржи) */
.window img.media { aspect-ratio: auto; height: auto; }
.window .halo { position: absolute; z-index: 0; inset: 10% 8% -4%; border-radius: 40px; background: radial-gradient(closest-side, color-mix(in srgb, var(--wc, var(--gel-violet)) 60%, transparent), transparent); filter: blur(46px); opacity: .5; pointer-events: none; }
.window figcaption { position: relative; z-index: 1; margin-top: 14px; font-size: .85rem; color: var(--muted); max-width: 70ch; }
.window.phone { max-width: 310px; margin-inline: auto; }
.window.phone .frame { border-radius: 44px; border: 1px solid rgba(255, 255, 255, .2); padding: 9px; background: #05070d; }
.window.phone .media { border-radius: 36px; aspect-ratio: 390 / 844; }
.window.phone .bar { display: none; }
.window.phone figcaption { text-align: center; margin-inline: auto; }

/* ---------- сюжет по прокрутке: закреплённое окно, сменяющиеся кадры ---------- */
.story { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); }
.story-step { min-height: 82vh; display: flex; flex-direction: column; justify-content: center; padding: 40px 0; opacity: .25; transition: opacity .6s var(--ease); }
.story-step.is-active { opacity: 1; }
.story-step .kicker { --k: var(--wc); }
.story-step h3 { font-family: var(--display); font-size: clamp(1.6rem, 1rem + 1.6vw, 2.5rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.08; margin-bottom: 20px; }
.story-step p { color: var(--soft); }
.story-step .more { display: inline-flex; margin-top: 10px; font-weight: 600; font-size: .95rem; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line-strong); padding-bottom: 2px; align-self: flex-start; }
.story-step .more:hover { border-color: var(--text); }
.story-stage { position: sticky; top: 0; height: 100vh; }
.story-stage .slot { position: absolute; inset: 0; display: grid; align-items: center; opacity: 0; transform: translateY(40px) scale(.96); transition: opacity .8s var(--ease), transform 1s var(--ease); pointer-events: none; }
.story-stage .slot.is-active { opacity: 1; transform: none; pointer-events: auto; }
.story-stage .window .media { max-height: 70vh; }
.story-stage .window.phone .media { max-height: 72vh; width: auto; margin-inline: auto; }
.story-mobile-media { display: none; }
@media (max-width: 1000px) {
  .story { grid-template-columns: 1fr; }
  .story-stage { display: none; }
  .story-step { min-height: 0; opacity: 1; padding: 56px 0; border-top: 1px solid var(--line); }
  .story-mobile-media { display: block; margin-top: 30px; }
}

/* ---------- бенто: плитки возможностей ---------- */
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.tile {
  --mx: 50%; --my: 50%;
  position: relative; grid-column: span 4; display: flex; flex-direction: column; justify-content: flex-end; min-height: 240px;
  padding: 26px; border-radius: var(--r-lg); text-decoration: none; overflow: hidden; isolation: isolate;
  background: var(--panel); border: 1px solid var(--line);
  transition: transform .5s var(--ease), border-color .3s;
}
.tile::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .35s; background: radial-gradient(380px circle at var(--mx) var(--my), color-mix(in srgb, var(--tc, var(--gel-violet)) 22%, transparent), transparent 60%); }
.tile::after {
  content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .35s;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--tc, var(--gel-violet)) 90%, #fff), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.tile:hover { transform: translateY(-3px); }
.tile:hover::before, .tile:hover::after { opacity: 1; }
.tile .t-art { position: absolute; inset: 0; z-index: -2; background: radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--tc) 26%, transparent), transparent 55%); }
.tile .t-img { position: absolute; z-index: -1; right: -2%; top: -4%; width: 78%; height: 78%; object-fit: cover; object-position: left top; border-radius: 14px; opacity: .85; transform: perspective(900px) rotateY(-10deg) rotateX(4deg); transition: transform .8s var(--ease), opacity .4s; -webkit-mask: linear-gradient(200deg, #000 30%, transparent 78%); mask: linear-gradient(200deg, #000 30%, transparent 78%); }
.tile:hover .t-img { transform: perspective(900px) rotateY(-4deg) rotateX(2deg) scale(1.03); opacity: 1; }
.tile .t-chapter { position: absolute; top: 22px; left: 26px; font-size: .78rem; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.tile .t-chapter::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--tc); box-shadow: 0 0 10px var(--tc); }
.tile h3 { font-family: var(--display); font-size: 1.1rem; font-weight: 500; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 10px; }
.tile p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.5; }
.tile.w6 { grid-column: span 6; }
.tile.w8 { grid-column: span 8; }
.tile.tall { min-height: 300px; }
.tile.tall h3 { font-size: 1.45rem; }
@media (max-width: 1100px) { .tile, .tile.w6, .tile.w8 { grid-column: span 6; } }
@media (max-width: 640px) { .tile, .tile.w6, .tile.w8 { grid-column: span 12; min-height: 190px; } }

/* ---------- главы: большие карточки ---------- */
.chapters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.chapter-card { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 22px; align-items: center; padding: 28px 30px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); text-decoration: none; overflow: hidden; transition: border-color .3s, transform .5s var(--ease); }
.chapter-card:hover { border-color: color-mix(in srgb, var(--cc) 55%, transparent); transform: translateY(-3px); }
.chapter-card .n { font-family: var(--display); font-size: 2.6rem; font-weight: 600; letter-spacing: -.05em; line-height: 1; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--cc) 80%, #fff); }
.chapter-card h3 { font-family: var(--display); font-size: 1.2rem; font-weight: 500; letter-spacing: -.025em; }
.chapter-card p { margin: 6px 0 0; color: var(--muted); font-size: .93rem; }
.chapter-card::after { content: ''; position: absolute; right: -80px; top: -80px; width: 220px; height: 220px; background: radial-gradient(closest-side, color-mix(in srgb, var(--cc) 28%, transparent), transparent); }
@media (max-width: 820px) { .chapters { grid-template-columns: 1fr; } }

/* ---------- роли ---------- */
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); }
.role { padding: 26px 0; border-top: 1px solid var(--line); }
.role h3 { font-family: var(--display); font-size: 1.02rem; font-weight: 500; margin-bottom: 8px; }
.role p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .roles { grid-template-columns: 1fr; } }

/* ---------- лучи прожекторов (финал, шапки глав) ---------- */
.beams { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.beams .beam {
  position: absolute; top: -12%; width: 38vw; height: 135%; transform-origin: 50% 0; opacity: .42; mix-blend-mode: screen; filter: blur(6px);
  background: conic-gradient(from 180deg at 50% 0%, transparent 169deg, color-mix(in srgb, var(--bc) 50%, transparent) 180deg, transparent 191deg);
  animation: sweep var(--bd, 11s) ease-in-out infinite alternate;
}
.beams .beam:nth-child(1) { left: 8%; --bc: var(--gel-blue); --bd: 12s; }
.beams .beam:nth-child(2) { left: 36%; --bc: var(--gel-violet); --bd: 9s; animation-delay: -3s; }
.beams .beam:nth-child(3) { left: 64%; --bc: var(--gel-magenta); --bd: 14s; animation-delay: -6s; }
.beams .beam:nth-child(4) { left: 90%; --bc: var(--gel-amber); --bd: 10s; animation-delay: -2s; }
.beams::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--void)); }
@keyframes sweep { from { transform: translateX(-50%) rotate(-15deg); } to { transform: translateX(-50%) rotate(15deg); } }
@media (prefers-reduced-motion: reduce) { .beams .beam { animation: none; } }

/* ---------- финал и подвал ---------- */
.finale { position: relative; padding: clamp(130px, 16vw, 240px) 0 0; text-align: center; overflow: hidden; isolation: isolate; }
.finale .h-lg { max-width: 17ch; margin-inline: auto; }
.finale .lead { margin: 24px auto 0; }
.finale .hero-actions { justify-content: center; }
.wordmark { font-family: var(--display); font-weight: 700; font-size: clamp(7rem, 30vw, 26rem); letter-spacing: -.08em; line-height: .78; text-align: center; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .1); user-select: none; margin-top: clamp(70px, 9vw, 130px); background: linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 85%); -webkit-background-clip: text; background-clip: text; }
.foot { border-top: 1px solid var(--line); padding: 34px 0 46px; color: var(--muted); font-size: .88rem; position: relative; z-index: 1; }
.foot .wrap { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: start; }
.foot p { margin: 12px 0 0; max-width: 46ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: flex-end; }
.foot nav a { text-decoration: none; color: var(--muted); }
.foot nav a:hover { color: var(--text); }
.foot .contact:empty { display: none; }
.foot .contact { margin-top: 14px; }
.foot .contact a { color: var(--soft); text-underline-offset: 3px; }
.foot .contact a:hover { color: var(--text); }
.foot .legal { font-size: .8rem; line-height: 1.6; }
@media (max-width: 760px) { .foot .wrap { grid-template-columns: 1fr; } .foot nav { justify-content: flex-start; } }

/* ---------- страница главы ---------- */
.ch-hero { position: relative; padding: clamp(120px, 17vh, 190px) 0 clamp(40px, 6vw, 80px); isolation: isolate; }
.ch-hero .beams { opacity: .8; }
.ch-hero .crumb { font-size: .88rem; color: var(--muted); margin-bottom: 26px; display: flex; gap: 12px; align-items: center; }
.ch-hero .crumb a { color: var(--soft); text-decoration: none; }
.ch-hero .crumb a:hover { color: var(--text); }
.ch-hero .crumb .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 12px var(--cc); }
.ch-hero .h-xl { font-size: clamp(2.6rem, 1rem + 5.2vw, 6.2rem); max-width: 14ch; }
.ch-hero .lead { margin-top: 28px; }
.ch-hero .window { margin-top: clamp(36px, 4.5vw, 64px); }
.ch-body { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 120px); }
.toc { position: sticky; top: 100px; align-self: start; font-size: .87rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { position: relative; display: block; padding: 7px 0 7px 18px; color: var(--muted); text-decoration: none; line-height: 1.35; transition: color .25s; }
.toc a::before { content: ''; position: absolute; left: 0; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--line-strong); transition: background .25s, box-shadow .25s; }
.toc a:hover { color: var(--text); }
.toc a.is-current { color: var(--text); }
.toc a.is-current::before { background: var(--cc, var(--gel-cyan)); box-shadow: 0 0 10px var(--cc, var(--gel-cyan)); }
@media (max-width: 1060px) { .ch-body { grid-template-columns: 1fr; } .toc { display: none; } }
.feat { padding: clamp(60px, 8vw, 110px) 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.feat:first-child { border-top: 0; padding-top: 0; }
.feat h2 { font-family: var(--display); font-size: clamp(1.5rem, 1rem + 1.5vw, 2.4rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 22px; max-width: 22ch; }
.feat .text { max-width: 66ch; color: var(--soft); }
.feat .text strong { color: var(--text); font-weight: 600; }
.why { margin: 26px 0 0; padding: 18px 22px; border-radius: var(--r-md); background: linear-gradient(90deg, color-mix(in srgb, var(--cc, var(--gel-violet)) 14%, transparent), transparent 75%); border: 1px solid color-mix(in srgb, var(--cc, var(--gel-violet)) 26%, transparent); max-width: 66ch; color: var(--text); }
.why b { display: block; font-family: var(--display); font-size: .78rem; font-weight: 500; letter-spacing: .01em; color: color-mix(in srgb, var(--cc, var(--gel-violet)) 65%, #fff); margin-bottom: 4px; }
.feat .window { margin-top: clamp(32px, 4.5vw, 56px); }
.feat-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; align-items: start; }
.feat-gallery .window { margin-top: 0; }
@media (max-width: 760px) { .feat-gallery { grid-template-columns: 1fr; } }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: clamp(28px, 5vw, 72px); align-items: center; }
.pair .window { margin-top: 0; }
@media (max-width: 820px) { .pair { grid-template-columns: 1fr; } .pair .window { margin-top: 24px; } }
.minors-head { padding-top: clamp(60px, 8vw, 110px); border-top: 1px solid var(--line); margin-bottom: 24px; }
.minors-head h2 { font-family: var(--display); font-size: clamp(1.3rem, 1rem + 1vw, 1.8rem); font-weight: 500; letter-spacing: -.03em; }
.minors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.minor { padding: 24px 26px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); scroll-margin-top: 90px; }
.minor h3 { font-family: var(--display); font-size: 1rem; font-weight: 500; letter-spacing: -.02em; margin-bottom: 10px; }
.minor .text { font-size: .93rem; color: var(--muted); }
.minor .text p:last-child { margin-bottom: 0; }
@media (max-width: 760px) { .minors { grid-template-columns: 1fr; } }
.ch-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 110px); border-top: 1px solid var(--line); }
.ch-next a { display: block; padding: 28px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--panel); text-decoration: none; transition: border-color .3s, transform .5s var(--ease); }
.ch-next a:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.ch-next .dir { font-size: .82rem; color: var(--muted); }
.ch-next strong { display: block; font-family: var(--display); font-size: 1.3rem; font-weight: 500; letter-spacing: -.03em; margin-top: 8px; }
.ch-next .nx { text-align: right; }
@media (max-width: 640px) { .ch-next { grid-template-columns: 1fr; } .ch-next .nx { text-align: left; } }

/* ---------- появление при прокрутке (включает site.js; без JS всё видно) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(30px); filter: blur(8px); }
.js [data-reveal].is-in { opacity: 1; transform: none; filter: none; transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease); transition-delay: var(--d, 0s); }
.js .lines > .ln { display: block; overflow: hidden; padding-bottom: .1em; margin-bottom: -.1em; }
.js .lines > .ln > span { display: block; transform: translateY(105%); }
.js .lines.is-in > .ln > span { transform: none; transition: transform 1.3s var(--ease); }
.js .lines.is-in > .ln:nth-child(2) > span { transition-delay: .09s; }
.js .lines.is-in > .ln:nth-child(3) > span { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; filter: none; }
  .js .lines > .ln > span { transform: none; }
}
