/* vostorg.tech: «Полутон» на первом экране, глубокий космос в проектах.
   Montserrat, ночные чернила, фиолетовые акценты. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/montserrat-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: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(/fonts/montserrat-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+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-cyrillic-400-normal.woff2) format("woff2"); unicode-range: U+0400-045F; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(/fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF; }

:root {
  --paper: #f4f2ff;
  --paper-2: #ece8ff;
  --card: #ffffff;
  --ink: #16112e;
  --ink-2: #4a4470;
  --mute: #6e6898;
  --line: rgba(22, 17, 46, 0.11);
  --line-2: rgba(22, 17, 46, 0.2);
  --accent: #5b3cff;
  --violet-night: #8c75ff;
  --lav: #c9bfff;
  --night: #0a0817;
  --night-2: #141029;
  --night-line: #272147;
  --mint: #12a577;
  --amber: #c98a00;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1240px;
  --p-accent: var(--accent);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 500 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.ic { width: 1.1em; height: 1.1em; flex: none; }
.mute { color: var(--mute); }
.num { font: 400 13px/1 var(--mono); letter-spacing: 0.04em; color: var(--mute); }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 10px; background: var(--ink); color: #fff; }
.skip:focus { left: 8px; }

/* ── Типографика ── */
.display { font: 700 clamp(40px, 5.6vw, 84px)/0.98 var(--sans); letter-spacing: -0.05em; }
.display-sm { font-size: clamp(36px, 5.2vw, 72px); }
.h2 { font: 700 clamp(30px, 4vw, 54px)/1.04 var(--sans); letter-spacing: -0.05em; }
.h3 { font: 700 22px/1.2 var(--sans); letter-spacing: -0.035em; }
.display em, .h2 em { font-style: normal; color: var(--accent); }
.night .display em, .night .h2 em { color: var(--violet-night); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 600 12px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-2); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lead { font-size: clamp(16px, 1.35vw, 19px); line-height: 1.6; color: var(--ink-2); max-width: 600px; }
.prose { display: grid; gap: 14px; color: var(--ink-2); max-width: 620px; }
.prose-l { font-size: 18px; gap: 18px; max-width: 720px; }

/* ── Кнопки ── */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1.5px solid transparent; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; overflow: hidden; isolation: isolate; transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease); }
.btn:active { transform: scale(0.98); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 14px; }
.btn-ink { background: var(--accent); color: #fff; }
/* Заливка чернилами снизу при наведении — как в Voice */
.btn-ink::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: translateY(101%); transition: transform 0.45s var(--ease); }
.btn-ink:hover::before { transform: translateY(0); }
.night .btn-ink::before { background: #fff; }
.night .btn-ink:hover { color: var(--ink); }
.btn-line { border-color: var(--line-2); color: var(--ink); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn-line-night, .night .btn-line { border-color: var(--night-line); color: #fff; }
.btn-line-night:hover, .night .btn-line:hover { border-color: var(--violet-night); color: var(--violet-night); }
.btn-ghost { padding: 0 10px; color: var(--ink-2); }
.btn-ghost:hover { color: var(--accent); }
.night .btn-ghost { color: rgba(244, 242, 255, 0.72); }
.night .btn-ghost:hover { color: var(--violet-night); }
.btn .ic { transition: transform 0.35s var(--ease); }
.btn:hover .ic { transform: translateX(3px); }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

/* ── Шапка и знак ── */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; border-bottom: 1px solid transparent; transition: background 0.3s, border-color 0.3s, color 0.3s; color: #fff; }
.nav.scrolled { background: var(--paper); border-color: var(--line); color: var(--ink); }
.nav-in { display: flex; align-items: center; gap: 24px; height: 72px; }
.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { padding: 10px 12px; font-weight: 600; font-size: 15px; text-decoration: none; opacity: 0.78; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover { opacity: 1; color: var(--accent); }
.nav:not(.scrolled) .nav-links a:hover { color: var(--violet-night); }
.brand { text-decoration: none; color: inherit; }
.lockup { display: inline-flex; align-items: center; gap: 9px; }
.lockup .mark { width: 30px; height: 30px; fill: var(--accent); overflow: visible; }
.nav:not(.scrolled) .lockup .mark { fill: var(--violet-night); }
.lockup .mark circle { transform-box: fill-box; transform-origin: center; }
.lockup b { font: 700 23px/1 var(--sans); letter-spacing: -0.04em; }
.brand:hover .mark circle { animation: pt-pulse 0.62s var(--ease) var(--dl, 0s); }
@keyframes pt-pulse { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.35); } 70% { transform: scale(0.9); } }

/* ── Ночные секции и поле точек ── */
.night { position: relative; background: var(--night); color: #f4f2ff; --line: var(--night-line); }
.night .eyebrow { color: rgba(244, 242, 255, 0.7); }
.night .eyebrow::before { background: var(--violet-night); }
.night .lead, .night .prose { color: rgba(244, 242, 255, 0.72); }
.night .mute, .night .num { color: rgba(244, 242, 255, 0.5); }
/* Без JavaScript — спокойная сетка точек вместо живого поля */
.hero-field, .contact-field { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: pan-y; }
.night[data-field-host]::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(140, 117, 255, 0.28) 1.2px, transparent 1.7px); background-size: 18px 18px; -webkit-mask-image: radial-gradient(70% 80% at 50% 30%, #000, transparent 75%); mask-image: radial-gradient(70% 80% at 50% 30%, #000, transparent 75%); pointer-events: none; }
.js .night[data-field-host]::before { display: none; }

/* ── Закреплённый фон: фирменное поле переходит в звёздный полёт ── */
.sky { position: relative; background: var(--night); overflow: clip; }
.sky-canvas { position: sticky; top: 0; z-index: 0; display: block; width: 100%; height: 100vh; margin-bottom: -100vh; pointer-events: none; }
.sky > .night { background: transparent; position: relative; z-index: 1; }
.sky::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(circle, rgba(140, 117, 255, 0.24) 1.2px, transparent 1.7px); background-size: 16px 16px; pointer-events: none; }
.js .sky::before { display: none; }
.hero-word { height: clamp(110px, 22vw, 300px); }

/* ── Первый экран ── */
.hero { min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.hero-in { position: relative; z-index: 1; padding-top: 140px; padding-bottom: clamp(48px, 8vh, 96px); display: grid; gap: 26px; pointer-events: none; }
.hero-in a, .hero-in button { pointer-events: auto; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: clamp(24px, 5vw, 80px); align-items: end; }
.hero-side { display: grid; gap: 26px; }
.hero-hint { position: absolute; left: 50%; top: 96px; transform: translateX(-50%); }

/* ── Общие элементы проекта ── */
.plogo { display: grid; place-items: center; width: 56px; height: 56px; flex: none; border-radius: 27%; background: var(--p-accent); overflow: hidden; }
.plogo img { width: 100%; height: 100%; object-fit: cover; }
.plogo:has(img) { background: var(--night); box-shadow: 0 0 0 1px var(--night-line); }
.plogo-letter { color: #fff; font-weight: 700; font-size: 24px; }
.plogo-l { width: 76px; height: 76px; }

.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px; font: 600 12px/1 var(--sans); background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.status i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--mint); background: rgba(18, 165, 119, 0.1); }
.status-live i { animation: blink 2.4s ease-in-out infinite; }
.status-beta { color: var(--amber); background: rgba(201, 138, 0, 0.12); }
.status-dev { color: var(--accent); background: rgba(91, 60, 255, 0.1); }
.night .status { background: var(--night-2); }
.night .status-live { color: #2ee6a8; }
@keyframes blink { 50% { opacity: 0.35; } }

.step-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font-size: 14px; }
.step-title { display: flex; align-items: center; gap: 16px; }
.step-tagline { font: 600 clamp(18px, 1.6vw, 22px)/1.4 var(--sans); letter-spacing: -0.015em; }
.night .step-tagline { color: #fff; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0; margin: 4px 0 0; border-top: 1px solid var(--line); }
.facts div { padding: 16px 16px 0 0; }
.facts dt { font: 700 28px/1 var(--sans); letter-spacing: -0.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.night .facts dt { color: var(--violet-night); }
.facts dd { margin: 8px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--mute); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.night .tags li { color: rgba(244, 242, 255, 0.72); }

/* Окна приложений: тонкая линия, без теней и наклонов */
.window { margin: 0; overflow: hidden; border-radius: 16px; background: var(--night-2); box-shadow: 0 0 0 1px var(--night-line); }
.window img { width: 100%; height: auto; }
.window-bar { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; background: var(--night-2); border-bottom: 1px solid var(--night-line); font: 400 11px/1 var(--mono); color: rgba(244, 242, 255, 0.45); }
.window-bar i { width: 9px; height: 9px; border-radius: 50%; background: #2b2552; }
.window-bar span { margin-left: 10px; }
.phone { margin: 0; overflow: hidden; border-radius: 26px; background: var(--night); box-shadow: 0 0 0 1px var(--night-line), 0 0 0 5px var(--night), 0 0 0 6px var(--night-line); }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ── Первый экран: подсказка прокрутки ── */
.scroll-hint { position: absolute; left: 50%; bottom: 22px; z-index: 2; width: 24px; height: 38px; margin-left: -12px; border-radius: 12px; box-shadow: inset 0 0 0 1.5px rgba(244, 242, 255, 0.35); }
.scroll-hint span { position: absolute; left: 50%; top: 8px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--violet-night); animation: hint 1.8s var(--ease) infinite; }
@keyframes hint { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(16px); opacity: 0; } }

/* ── Проекты: главы, закреплённые на экране ──
   JS задаёт каждой главе прогресс прокрутки: --reveal (выход окна из глубины),
   --phone (появление телефона), --exit (уход). Без JS главы стоят обычным списком. */
.work { position: relative; }
.work-rail { position: sticky; top: 50vh; z-index: 5; height: 0; display: none; }
.js .work-rail { display: block; }
.work-rail > * { position: relative; }
.work-rail a { position: absolute; left: clamp(16px, 2.4vw, 32px); display: flex; align-items: center; gap: 10px; text-decoration: none; font: 600 12px/1 var(--sans); letter-spacing: 0.06em; text-transform: uppercase; color: rgba(244, 242, 255, 0.4); transition: color 0.4s; }
.work-rail a:nth-child(1) { top: -24px; } .work-rail a:nth-child(2) { top: 0; } .work-rail a:nth-child(3) { top: 24px; } .work-rail a:nth-child(4) { top: 48px; } .work-rail a:nth-child(5) { top: 72px; }
.work-rail i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; transition: transform 0.4s var(--ease), background 0.4s; }
.work-rail span { opacity: 0; transform: translateX(-6px); transition: 0.4s var(--ease); }
.work-rail:hover span { opacity: 1; transform: none; }
.work-rail a.on { color: #fff; }
.work-rail a.on i { background: var(--p-accent); transform: scale(1.6); }

.chapter { position: relative; --reveal: 1; --phone: 1; --exit: 0; }
.chapter-pin { position: relative; overflow: hidden; }
.chapter-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr); gap: clamp(32px, 4.5vw, 72px); align-items: center; padding-top: 110px; padding-bottom: 80px; }
.chapter-copy { position: relative; z-index: 4; display: grid; gap: 20px; max-width: 540px; min-width: 0; }
.chapter-title { min-width: 0; }
.chapter-title { display: flex; align-items: center; gap: 16px; }
.ch-name { font: 700 clamp(36px, 4.1vw, 64px)/1.02 var(--sans); letter-spacing: -0.05em; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; min-width: 0; overflow-wrap: normal; }
.ch-name .ch { display: inline-block; }
.ch-name .wd { display: inline-block; white-space: nowrap; }
.chapter-bignum { position: absolute; right: -0.04em; bottom: -0.22em; z-index: 0; font: 700 clamp(220px, 34vw, 520px)/1 var(--mono); letter-spacing: -0.08em; color: rgba(140, 117, 255, 0.06); pointer-events: none; user-select: none; transform: translateY(calc((0.5 - var(--p, 0.5)) * 18vh)); }
.chapter-stage { position: relative; aspect-ratio: 16 / 11.5; perspective: 1400px; isolation: isolate; }
.chapter-stage::before { content: ""; position: absolute; inset: 8% 2% 0; z-index: -1; background: radial-gradient(ellipse at center, color-mix(in srgb, var(--p-accent) 15%, transparent), transparent 68%); opacity: calc(var(--reveal) * (1 - var(--exit))); pointer-events: none; }
.chapter-window { position: absolute; left: 0; top: 4%; width: 90%; z-index: 1;
  transform-origin: 55% 60%;
  transform: translate3d(0, calc((1 - var(--reveal)) * 72px - var(--exit) * 48px), calc((1 - var(--reveal)) * -180px - var(--exit) * 80px)) rotateX(calc((1 - var(--reveal)) * 9deg)) rotateY(calc((1 - var(--reveal)) * -12deg)) scale(calc(0.92 + var(--reveal) * 0.08));
  opacity: calc(var(--reveal) * (1 - var(--exit)));
  box-shadow: 0 0 0 1px rgba(213, 207, 255, 0.19), 0 28px 80px -24px rgba(0, 0, 0, 0.8);
  will-change: transform, opacity; }
.chapter-window img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.chapter-phone img { aspect-ratio: 390 / 844; width: 100%; object-fit: cover; object-position: top; }
.chapter-empty { display: grid; place-items: center; aspect-ratio: 16 / 10; background: var(--night-2); border-radius: 16px; box-shadow: 0 0 0 1px var(--night-line); }
.chapter-phone { position: absolute; right: 0; bottom: 0; width: 24%; z-index: 3;
  transform-origin: 50% 80%;
  transform: translate3d(calc((1 - var(--phone)) * 26px), calc((1 - var(--phone)) * 80px - var(--exit) * 72px), 0) rotateZ(calc((1 - var(--phone)) * 7deg));
  opacity: calc(var(--phone) * (1 - var(--exit))); will-change: transform, opacity; }

/* Появление текста главы: строки по очереди, название — по буквам. Обратимо при прокрутке вверх. */
.js .chapter .in-1, .js .chapter .in-3, .js .chapter .in-4, .js .chapter .in-5, .js .chapter .in-6, .js .chapter .in-7 { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); }
.js .chapter .ch { transform: translateY(110%); transition: transform 0.9s var(--ease); transition-delay: calc(var(--i) * 28ms); }
.js .chapter .chapter-title .plogo { opacity: 0; transform: scale(0.6); transition: 0.7s var(--ease); }
.js .chapter.on .in-1, .js .chapter.on .in-3, .js .chapter.on .in-4, .js .chapter.on .in-5, .js .chapter.on .in-6, .js .chapter.on .in-7 { opacity: 1; transform: none; }
.js .chapter.on .ch { transform: none; }
.js .chapter.on .chapter-title .plogo { opacity: 1; transform: none; }
.js .chapter.on .in-3 { transition-delay: 0.18s; } .js .chapter.on .in-4 { transition-delay: 0.26s; } .js .chapter.on .in-5 { transition-delay: 0.34s; } .js .chapter.on .in-6 { transition-delay: 0.42s; } .js .chapter.on .in-7 { transition-delay: 0.5s; }
.js .chapter.gone .chapter-copy { opacity: 0; transform: translateY(-40px); }
.chapter-copy { transition: opacity 0.6s var(--ease), transform 0.8s var(--ease); }

@media (min-width: 961px) {
  .js .chapter { height: 280vh; }
  .js .chapter-pin { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
  .js .chapter-grid { width: 100%; padding-top: 72px; padding-bottom: 0; }
}

/* ── Контакты ── */
.contact { overflow: hidden; min-height: 100svh; min-height: 100dvh; isolation: isolate; }
.sky > .contact { background: radial-gradient(ellipse at 50% 85%, rgba(98, 61, 196, 0.3), transparent 66%), radial-gradient(ellipse at 10% 15%, rgba(43, 74, 129, 0.2), transparent 55%), linear-gradient(180deg, rgba(13, 10, 29, 0.62), rgba(23, 14, 48, 0.86)); }
.contact::before { content: ""; position: absolute; z-index: -1; left: 50%; bottom: -64vw; width: max(1100px, 130vw); aspect-ratio: 1; border: 1px solid rgba(185, 162, 255, 0.13); border-radius: 50%; transform: translateX(-50%) rotateX(52deg); box-shadow: 0 0 0 54px rgba(185, 162, 255, 0.035), 0 0 0 108px rgba(185, 162, 255, 0.02); pointer-events: none; }
.contact::after { content: ""; position: absolute; inset: 0 8% auto; height: 1px; background: linear-gradient(90deg, transparent, rgba(185, 162, 255, 0.32), transparent); pointer-events: none; }
.contact-in { position: relative; z-index: 1; display: grid; min-height: inherit; align-content: center; justify-items: center; gap: 28px; padding-top: clamp(112px, 14vh, 160px); padding-bottom: clamp(80px, 10vh, 120px); text-align: center; pointer-events: none; }
.contact-in a { pointer-events: auto; }
.contact-in .display { max-width: 1000px; font-size: clamp(44px, 7.2vw, 104px); line-height: 1.04; text-wrap: balance; }
.contact-in .lead { margin: 0 auto; max-width: 620px; }
.contact-in .cta { justify-content: center; margin-top: 10px; }
@media (max-width: 560px) {
  .contact-in { gap: 24px; }
  .contact-in .cta { width: 100%; max-width: 360px; }
  .contact-in .cta .btn { flex: 1 1 auto; }
  .contact::before { bottom: -700px; }
}

/* ── Подвал ── */
.foot { border-top: 1px solid var(--line); }
.foot-in { display: grid; grid-template-columns: 1fr auto auto; gap: 24px 48px; align-items: start; padding-top: 40px; padding-bottom: 44px; font-size: 14px; }
.foot-in > div { display: grid; gap: 12px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.foot-links a { font-weight: 600; text-decoration: none; }
.foot-links a:hover { color: var(--accent); }

/* ── Страница проекта ── */
.detail-hero { min-height: 82svh; display: flex; align-items: flex-end; overflow: hidden; }
.detail-in { position: relative; z-index: 1; display: grid; gap: 20px; justify-items: start; padding-top: 140px; padding-bottom: clamp(48px, 8vh, 90px); pointer-events: none; }
.detail-in a { pointer-events: auto; }
.back { font-weight: 600; font-size: 14px; text-decoration: none; color: rgba(244, 242, 255, 0.7); }
.back:hover { color: var(--violet-night); }
.detail-body { display: grid; gap: 32px; padding-top: clamp(60px, 9vh, 100px); padding-bottom: 40px; }
.facts-wide { max-width: 900px; }
.gallery { display: grid; gap: 28px; padding-bottom: clamp(60px, 9vh, 100px); }
.shot { all: unset; display: grid; gap: 12px; cursor: zoom-in; }
.shot .window { transition: box-shadow 0.3s var(--ease); }
.shot:hover .window, .shot:focus-visible .window { box-shadow: 0 0 0 2px var(--p-accent); }
.shot-cap { font-size: 14px; color: var(--mute); }
.phones { display: flex; flex-wrap: wrap; gap: 28px; }
.shot-phone { width: min(300px, 70vw); }
.shot-phone:hover .phone { box-shadow: 0 0 0 1px var(--night-line), 0 0 0 5px var(--night), 0 0 0 7px var(--p-accent); }
.next { display: grid; gap: 14px; padding-top: 48px; padding-bottom: 80px; border-top: 1px solid var(--line); text-decoration: none; }
.next-name { display: flex; align-items: center; gap: 18px; font: 700 clamp(30px, 4.4vw, 56px)/1 var(--sans); letter-spacing: -0.05em; }
.next:hover .next-name { color: var(--accent); }
.zoom { padding: 0; border: 0; background: transparent; max-width: 96vw; max-height: 94vh; overflow: visible; }
.zoom::backdrop { background: rgba(10, 8, 23, 0.9); }
.zoom img { max-width: 96vw; max-height: 90vh; width: auto; border-radius: 14px; box-shadow: 0 0 0 1px var(--night-line); }
.zoom-close { position: absolute; top: -16px; right: -16px; width: 42px; height: 42px; border-radius: 50%; border: 0; background: #fff; color: var(--ink); font-size: 24px; cursor: pointer; }
.notfound { min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; }
.notfound-in { position: relative; z-index: 1; display: grid; gap: 22px; justify-items: start; padding-top: 140px; padding-bottom: 90px; pointer-events: none; }
.notfound-in a { pointer-events: auto; }

/* ── Телефоны и планшеты ── */
@media (max-width: 960px) {
  .hero-row { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: 1fr; gap: 36px; padding-top: 72px; padding-bottom: 72px; }
  .chapter-stage { order: -1; perspective: 1000px; }
  .work-rail { display: none !important; }
  .chapter-bignum { font-size: 60vw; bottom: auto; top: 0; right: -0.06em; }
  .ch-name { white-space: normal; }
  .foot-in { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .nav-in .btn { margin-left: auto; }
  .btn { min-height: 48px; padding: 0 20px; font-size: 14.5px; }
  .hero .cta .btn { flex: 1 1 auto; }
  .facts { grid-template-columns: 1fr 1fr; }
  .chapter-window { width: 86%; }
  .chapter-phone { width: 30%; }
  .scroll-hint { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .js .chapter .in-1, .js .chapter .in-3, .js .chapter .in-4, .js .chapter .in-5, .js .chapter .in-6, .js .chapter .in-7, .js .chapter .ch, .js .chapter .chapter-title .plogo { opacity: 1; transform: none; }
  .chapter-window, .chapter-phone { transform: none; will-change: auto; }
  .js .chapter.gone .chapter-copy { opacity: 1; transform: none; }
  .chapter { --reveal: 1 !important; --phone: 1 !important; --exit: 0 !important; }
}
