/* НРАВ — сайт на основе стиля Dala (refero): чёрная пустота, огромная лёгкая типографика,
   созвездие частиц. Акцент действия — абрикосовый НРАВ. */
@font-face {
  font-family: Inter; src: url(../fonts/Inter-var.woff) format('woff');
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --color-void: #000000;
  --color-bone-white: #ffffff;
  --color-ash-gray: #9a9a9a;
  --color-silver-mist: #bdbdbd;
  --color-electric-iris: #8052ff;
  --color-saffron-spark: #ffb829;
  --color-deep-verdant: #15846e;
  --color-nrav-apricot: #fc9a62;
  --color-nrav-apricot-hover: #ffb38a;

  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --text-caption: 12px;
  --text-nav-label: 14px;
  --tracking-nav-label: .025em;
  --text-body: 18px;
  --text-heading-xs: 27px;
  --text-heading-sm: clamp(28px, 2.9vw, 42px);
  --text-heading-lg: clamp(40px, 5.4vw, 78px);
  --text-display: clamp(54px, 7.85vw, 113px);
  --tracking-display: -.04em;

  --spacing-6: 6px; --spacing-12: 12px; --spacing-18: 18px; --spacing-24: 24px; --spacing-30: 30px;
  --spacing-36: 36px; --spacing-60: 60px; --spacing-96: 96px; --spacing-120: 120px;
  --page-max-width: 1280px;
  --gutter: clamp(16px, 4.2vw, 60px);
  --radius-3xl: 24px; --radius-full: 9999px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-cine: cubic-bezier(.65, 0, .35, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--color-void); -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--color-void); color: var(--color-bone-white);
  font-family: var(--font); font-size: var(--text-body); font-weight: 200; line-height: 1.5;
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
::selection { background: var(--color-nrav-apricot); color: #000; }
img, video, canvas, svg { display: block; max-width: 100%; }
[hidden] { display: none !important; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--color-saffron-spark); outline-offset: 4px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--color-bone-white); color: #000; padding: 10px 16px; border-radius: var(--radius-3xl); font-weight: 600; font-size: 14px; text-decoration: none; }
.skip:focus { top: 16px; }

#stage { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
main, .footer { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: calc(var(--page-max-width) + var(--gutter) * 2); margin: 0 auto; padding-inline: var(--gutter); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-60); align-items: center; }

/* ---------- type ---------- */
.display, .h-lg, .h-sm, .display-2 { font-weight: 400; letter-spacing: var(--tracking-display); margin: 0; text-wrap: balance; }
.display { font-size: var(--text-display); line-height: 1.02; }
.display .line { display: block; white-space: nowrap; }
.display-2 { font-size: clamp(44px, 6.6vw, 96px); line-height: 1.04; }
.h-lg { font-size: var(--text-heading-lg); line-height: 1.04; }
.h-sm { font-size: var(--text-heading-sm); line-height: 1.12; }
.label { margin: var(--spacing-36) 0 var(--spacing-12); color: var(--color-saffron-spark); font-size: var(--text-nav-label); font-weight: 600; line-height: 1.2; letter-spacing: var(--tracking-nav-label); text-transform: uppercase; }
.body { margin: 0 0 var(--spacing-18); max-width: 34em; font-size: var(--text-body); font-weight: 200; line-height: 1.5; }
.body.muted { color: var(--color-silver-mist); }
.note { margin: var(--spacing-30) 0 0; max-width: 36em; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 400; line-height: 1.5; }

/* ---------- actions ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--spacing-18) var(--spacing-30); margin-top: var(--spacing-30); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 45px; padding: 14px 18px; border-radius: 22.5px; font-size: var(--text-nav-label); font-weight: 600; line-height: 1; letter-spacing: var(--tracking-nav-label); text-transform: uppercase; text-decoration: none; white-space: nowrap; transition: background-color .25s, transform .25s var(--ease-out); }
.btn-primary { background: var(--color-nrav-apricot); color: #000; }
.btn-primary:hover { background: var(--color-nrav-apricot-hover); }
.btn-primary:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }
.ghost, .toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 45px; color: var(--color-bone-white); font-size: var(--text-nav-label); font-weight: 600; letter-spacing: var(--tracking-nav-label); text-transform: uppercase; text-decoration: none; transition: color .2s; }
.ghost:hover, .toggle:hover { color: var(--color-nrav-apricot); }
.ghost span { transition: transform .3s var(--ease-out); }
.ghost:hover span { transform: translateX(4px); }
.toggle .dot { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; transition: background-color .25s, border-color .25s; }
.toggle[aria-pressed="true"] .dot { background: var(--color-nrav-apricot); border-color: var(--color-nrav-apricot); }
.icon-btn { display: inline-grid; place-items: center; width: 45px; height: 45px; border-radius: 50%; color: var(--color-ash-gray); transition: color .2s, background-color .2s; }
.icon-btn:hover { color: var(--color-bone-white); background: rgba(255, 255, 255, .08); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-pressed="true"] { color: var(--color-bone-white); }

/* ---------- nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; display: flex; align-items: center; gap: var(--spacing-30); height: 76px; padding: 0 var(--gutter); transition: transform .45s var(--ease-out), background-color .3s; }
/* no backdrop blur: under the bar the WebGL stage changes every frame, so a blur would be recomputed every frame */
.nav.is-scrolled { background: rgba(0, 0, 0, .84); box-shadow: 0 1px 0 rgba(255, 255, 255, .05); }
.nav.is-hidden { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--color-bone-white); text-decoration: none; font-size: 18px; font-weight: 600; letter-spacing: .02em; }
.logo svg { width: 30px; height: 30px; fill: none; stroke-width: 7.5; }
.logo .arc-1 { stroke: var(--color-bone-white); }
.logo .arc-2 { stroke: var(--color-nrav-apricot); }
.nav-links { display: flex; gap: var(--spacing-30); margin-left: auto; }
.nav-links a { color: var(--color-ash-gray); font-size: var(--text-nav-label); font-weight: 600; letter-spacing: var(--tracking-nav-label); text-transform: uppercase; text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a.is-active { color: var(--color-bone-white); }
.nav-tools { display: flex; align-items: center; gap: 6px; }
.nav-cta { margin-left: 12px; }
.menu-btn { display: none; }
.i-play { display: none; }
body.motion-off .i-play { display: block; }
body.motion-off .i-pause { display: none; }
.menu { position: fixed; inset: 76px 0 0; z-index: 49; background: var(--color-void); padding: var(--spacing-36) var(--gutter); overflow-y: auto; }
.menu nav { display: grid; gap: var(--spacing-12); }
.menu a { font-size: clamp(34px, 9vw, 48px); font-weight: 400; letter-spacing: -.04em; line-height: 1.15; text-decoration: none; }
.menu a:hover { color: var(--color-nrav-apricot); }

/* ---------- sections ---------- */
section { position: relative; }
.visual { position: relative; width: 100%; }
.hero { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: 120px 0 96px; }
.hero-grid { grid-template-columns: 1.12fr .88fr; }
.hero .visual { height: min(78vh, 760px); }
.hero .body { max-width: 30em; }
.scroll-cue { position: absolute; left: 50%; bottom: 28px; width: 26px; height: 42px; margin-left: -13px; border-radius: 13px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .35); }
.scroll-cue span { position: absolute; left: 50%; top: 9px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--color-bone-white); animation: cue 2s var(--ease-cine) infinite; }
@keyframes cue { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 80% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

.split { min-height: 100vh; display: grid; align-items: center; padding: var(--spacing-120) 0; }
.split-grid .visual { height: min(76vh, 720px); }
.split .copy { max-width: 600px; }
.reverse > .visual { order: -1; }

.services { list-style: none; margin: var(--spacing-36) 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--spacing-24) var(--spacing-36); }
.services li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 4px; }
.services .num { grid-row: span 2; color: var(--color-saffron-spark); font-size: var(--text-caption); font-weight: 600; letter-spacing: .05em; padding-top: 7px; }
.services b { font-size: 24px; font-weight: 400; letter-spacing: -.02em; line-height: 1.25; }
.services span:last-child { color: var(--color-silver-mist); font-size: 15px; line-height: 1.45; }

/* ---------- noise: levitating iridescent cards ---------- */
.noise { padding: 26vh 0 18vh; }
.narrow { max-width: 940px; }
.noise-wrap { max-width: 1180px; }
.noise-line { min-height: 64vh; display: grid; align-items: center; justify-items: start; }
.noise-line:nth-child(even) { justify-items: end; }
.noise-line.is-accent { justify-items: center; }
.noise-enter { width: min(100%, 590px); opacity: .08;
  transform: perspective(1200px) translate3d(var(--dx, -40px), 90px, -180px) rotateX(26deg) rotateY(var(--ey, 14deg)) scale(.86);
  transition: opacity 1s var(--ease-out), transform 1.4s var(--ease-out); }
.noise-line:nth-child(even) .noise-enter { --dx: 40px; --ey: -14deg; }
.noise-line.is-accent .noise-enter { width: min(100%, 780px); --dx: 0px; --ey: 0deg; }
.noise-line.in .noise-enter { opacity: 1; transform: perspective(1200px) translate3d(0, 0, 0) rotateX(0) rotateY(0) scale(1); }
.noise-float { position: relative; animation: noise-float 8.5s ease-in-out infinite; animation-delay: calc(var(--i) * -1.9s); }
@keyframes noise-float {
  0%, 100% { transform: perspective(1200px) translate3d(0, 0, 0) rotateX(2deg) rotateY(-3deg) rotateZ(-.4deg); }
  50% { transform: perspective(1200px) translate3d(0, -16px, 30px) rotateX(-2.5deg) rotateY(3.5deg) rotateZ(.5deg); }
}
/* 16.11 performance: every decorative movement below runs on the compositor (transform / opacity only).
   No backdrop blur over the WebGL stage, no animated custom properties, no big blur filters, no blend modes:
   those were repainted on the main thread every frame and caused the hitches in «Шум», КП and «Работы». */
.noise-glow { position: absolute; inset: 8% 2% -10%; pointer-events: none; opacity: .62;
  background: radial-gradient(closest-side at 32% 46%, rgba(252, 154, 98, .5), rgba(252, 154, 98, .16) 55%, transparent),
    radial-gradient(closest-side at 68% 54%, rgba(128, 82, 255, .5), rgba(128, 82, 255, .16) 55%, transparent),
    radial-gradient(closest-side at 50% 82%, rgba(43, 196, 164, .3), transparent);
  animation: glow-turn 22s linear infinite; animation-delay: calc(var(--i) * -4.4s); }
@keyframes glow-turn { to { transform: rotate(360deg); } }
.noise-card { position: relative; isolation: isolate; margin: 0; padding: 30px 36px 34px; border-radius: 28px;
  font-size: clamp(22px, 2.05vw, 30px); font-weight: 400; line-height: 1.32; letter-spacing: -.016em; text-wrap: balance; color: var(--color-bone-white);
  background: radial-gradient(130% 150% at var(--mx, 25%) var(--my, 0%), rgba(255, 255, 255, .11), transparent 52%), linear-gradient(155deg, rgba(30, 25, 44, .86), rgba(8, 8, 12, .82));
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease-out); }
/* iridescent rim: two still rainbow rings turned half a circle apart; the second one breathes in and out,
   so the colours seem to flow round the edge — an opacity animation, free for the GPU */
.noise-card::before, .noise-card::after, .rim::before, .rim::after { content: ''; position: absolute; inset: 0; padding: 1.6px; border-radius: inherit; pointer-events: none;
  background: conic-gradient(from 20deg, #fc9a62, #ffb829, #2bc4a4, #8052ff, #b49dff, #ff7a9c, #fc9a62);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.noise-card::after, .rim::after { background: conic-gradient(from 200deg, #fc9a62, #ffb829, #2bc4a4, #8052ff, #b49dff, #ff7a9c, #fc9a62);
  animation: rim-flow 4.5s ease-in-out infinite alternate; animation-delay: calc(var(--i, 0) * -1.3s); }
@keyframes rim-flow { from { opacity: 0; } to { opacity: 1; } }
.noise-tag { display: block; margin-bottom: 14px; color: var(--color-saffron-spark); font-size: var(--text-caption); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.noise-line.is-accent .noise-card { padding: 40px 48px 46px; font-size: clamp(30px, 3.5vw, 50px); letter-spacing: -.035em; line-height: 1.12; text-align: center; }
.noise-line.is-accent .noise-glow { opacity: .6; }
.noise-card .accent { color: var(--color-nrav-apricot); }

/* ---------- KP in motion ---------- */
.kp-track { height: calc(85vh * 7 + 100vh); }
.kp-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: center; padding-top: 76px; overflow: hidden; }
.kp-grid { display: grid; grid-template-columns: minmax(320px, .78fr) 1.22fr; gap: var(--spacing-60); align-items: center; }
.kp-copy .label { margin-top: 0; }
.kp-heading { font-size: clamp(36px, 4vw, 60px); }
.kp-story { margin-top: var(--spacing-36); min-height: 300px; }
.kp-count { margin: 0 0 var(--spacing-12); color: var(--color-nrav-apricot); font-size: var(--text-nav-label); font-weight: 600; letter-spacing: .05em; }
.kp-count .of { color: var(--color-ash-gray); }
#kp-title { transition: opacity .35s, transform .5s var(--ease-out); }
#kp-title.swap { opacity: 0; transform: translateY(10px); }
.kp-text { margin-top: var(--spacing-18); min-height: 6em; }
.caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.18em; background: var(--color-nrav-apricot); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.tags { margin: 0; color: var(--color-saffron-spark); font-size: var(--text-caption); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; min-height: 1.2em; }
.kp-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: var(--spacing-30); }
.dots { display: flex; align-items: center; gap: 4px; }
.dots button { width: 28px; height: 45px; display: grid; place-items: center; }
.dots button::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .28); transition: background-color .3s, transform .3s var(--ease-out); }
.dots button:hover::before { background: rgba(255, 255, 255, .7); }
.dots button[aria-current="true"]::before { background: var(--color-nrav-apricot); transform: scale(1.35); }
.kp-pdf { margin-left: auto; }
.kp-stage { position: relative; height: min(74vh, 700px); perspective: 2200px; border-radius: var(--radius-3xl); overflow: hidden; }
.kp-cam { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform 1.4s var(--ease-cine); }
.kp-sheet { position: absolute; left: 0; top: 0; width: 1440px; height: 1018px; transform-origin: 0 0; transition: transform 1.4s var(--ease-cine); will-change: transform; }
/* 17.11: the sheet is one 2x picture; the moving parts are short loops laid exactly over it (main.js, capture_kp.py) */
.kp-sheet .kp-base { width: 100%; height: 100%; display: block; border-radius: 18px; background: #0c0d10; pointer-events: none; }
.kp-live { position: absolute; inset: 0; pointer-events: none; transform: translateZ(.5px); }
.kp-live video { position: absolute; display: block; object-fit: fill; background: transparent; }
.kp-loading { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; color: var(--color-ash-gray); font-size: var(--text-nav-label); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }

/* ---------- 3D objects ---------- */
.drag-zone { cursor: grab; touch-action: pan-y; border-radius: var(--radius-3xl); }
.drag-zone.is-dragging { cursor: grabbing; }
.drag-zone:focus-visible { outline-offset: -2px; }
.drag-hint { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; transition: opacity .5s; pointer-events: none; }
.drag-zone.was-dragged .drag-hint { opacity: 0; }
.fallback { width: 100%; height: 100%; object-fit: contain; }
.chips { display: flex; flex-wrap: wrap; gap: var(--spacing-12); margin-top: var(--spacing-30); }
.chip { display: inline-flex; align-items: center; gap: 10px; min-height: 45px; padding: 0 18px 0 12px; border-radius: var(--radius-full); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); font-size: var(--text-nav-label); font-weight: 600; letter-spacing: var(--tracking-nav-label); text-transform: uppercase; transition: box-shadow .2s, color .2s; }
.chip i { width: 20px; height: 20px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.chip:hover { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .6); }
.chip[aria-pressed="true"] { color: var(--color-nrav-apricot); box-shadow: inset 0 0 0 1.5px var(--color-nrav-apricot); }

/* ---------- film ---------- */
.film { padding: var(--spacing-120) 0; }
.film-head { align-items: end; margin-bottom: var(--spacing-60); }
.film-head .label { margin-top: 0; }
.film-frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius-3xl); overflow: hidden; background: #050505; }
.film-frame video { width: 100%; height: 100%; object-fit: cover; }
.film-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.film-play:active { transform: translate(-50%, -50%) scale(.97); }
.film-frame.is-playing .film-play { display: none; }
.film video::cue { font-family: var(--font); font-weight: 400; background: rgba(0, 0, 0, .7); }

/* ---------- process ---------- */
.steps { list-style: none; margin: var(--spacing-36) 0 0; padding: 0; display: grid; gap: var(--spacing-36); }
.steps li { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; }
.steps .num { grid-row: span 2; color: var(--color-saffron-spark); font-size: var(--text-nav-label); font-weight: 600; letter-spacing: .05em; padding-top: 9px; }
.steps h3 { margin: 0 0 6px; font-size: var(--text-heading-xs); font-weight: 400; line-height: 1.15; letter-spacing: -.03em; }
.steps p { margin: 0; color: var(--color-silver-mist); max-width: 30em; }

/* ---------- contact ---------- */
.contact { padding: var(--spacing-60) 0 var(--spacing-120); text-align: center; }
.contact .visual { height: min(44vh, 420px); margin-bottom: var(--spacing-30); }
.contact .body { margin-inline: auto; margin-top: var(--spacing-30); }
.contact .actions { justify-content: center; }
.contact .note { margin-inline: auto; text-align: center; }

.footer { padding: var(--spacing-60) 0 var(--spacing-36); }
.footer-grid { display: grid; grid-template-columns: auto 1fr auto auto; gap: var(--spacing-30) var(--spacing-60); align-items: center; }
.footer-note { margin: 0; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 400; }
.footer-links { display: flex; gap: var(--spacing-24); flex-wrap: wrap; }
.footer-links a { color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; text-decoration: none; }
.footer-links a:hover { color: var(--color-bone-white); }
.copyright { margin: 0; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 400; }

/* ---------- companion ---------- */
#companion { position: fixed; left: 0; top: 0; width: 136px; height: 136px; z-index: 60; pointer-events: none; filter: drop-shadow(0 0 22px rgba(252, 154, 98, .28)); will-change: transform; }
.bubble { position: fixed; left: 0; top: 0; z-index: 61; margin: 0; max-width: 220px; padding: 9px 14px; border-radius: 16px 16px 16px 4px; background: var(--color-bone-white); color: #000; font-size: 13px; font-weight: 500; line-height: 1.35; pointer-events: none; opacity: 0; transition: opacity .3s; will-change: transform; }
.bubble.is-on { opacity: 1; }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 70; transform: translate(-50%, 20px); margin: 0; padding: 12px 20px; border-radius: var(--radius-3xl); background: var(--color-bone-white); color: #000; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease-out); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- motion: letters, words, reveals ---------- */
.split-chars .char { display: inline-block; white-space: pre; }
.split-words .word { display: inline-block; white-space: pre; }
html.js .split-chars .char { opacity: 0; transform: translateY(.5em) rotate(4deg); animation: rise 1s var(--ease-out) forwards, float 6s ease-in-out infinite alternate; animation-delay: calc(var(--i) * 26ms + 150ms), calc(var(--i) * -380ms); }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes float { 0% { translate: 0 0; } 100% { translate: 0 -0.035em; } }
html.js .split-words .word { opacity: 0; transform: translateY(.45em); transition: opacity .8s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i) * 55ms); }
html.js .split-words.in .word { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease-out), transform 1s var(--ease-out); transition-delay: .12s; }
html.js .reveal.in { opacity: 1; transform: none; }
body.motion-off *, body.motion-off *::before, body.motion-off *::after { animation-play-state: paused !important; }
body.motion-off .split-chars .char, body.motion-off .split-words .word, body.motion-off .reveal, body.motion-off .noise-enter { opacity: 1 !important; filter: none !important; transform: none !important; transition: none !important; animation: none !important; }
body.motion-off .kp-sheet, body.motion-off .kp-cam { transition: none; }
body.motion-off .noise-float, body.motion-off .noise-card { transform: none !important; animation: none !important; }
@media (prefers-reduced-motion: reduce) { .scroll-cue span, .caret, .noise-float, .noise-glow, .noise-card::after, .rim::after, .intro-a, .intro-b, .intro-arrow, .summon-dot, .kp-sheen::before, .kp-stage.is-overview .kp-tilt { animation: none; } .noise-enter { transform: none; } html.js .intro { opacity: 1; transform: none; animation: none; } }
body.motion-off .intro { opacity: 1 !important; transform: none !important; }

/* ---------- hero intro: iridescent letters ---------- */
.intro { margin: 0 0 var(--spacing-30); max-width: 30em; font-size: clamp(16px, 1.35vw, 20px); font-weight: 400; line-height: 1.4; letter-spacing: -.005em; }
.intro-a, .intro-b { background: linear-gradient(100deg, #fc9a62 0%, #ffb829 16%, #2bc4a4 32%, #b49dff 48%, #8052ff 62%, #ff7a9c 78%, #fc9a62 100%); background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; animation: iris-text 7s linear infinite; }
.intro-a { font-weight: 600; }
.intro-b { animation-delay: -1.6s; }
.intro-arrow { display: inline-block; margin-left: .4em; color: var(--color-saffron-spark); animation: intro-arrow 2.2s var(--ease-cine) infinite; }
@keyframes iris-text { to { background-position: -260% 0; } }
@keyframes intro-arrow { 0%, 100% { transform: translateY(-2px); opacity: .5; } 50% { transform: translateY(4px); opacity: 1; } }
html.js .intro { opacity: 0; transform: translateY(14px); animation: rise 1.2s var(--ease-out) .05s forwards; }

/* ---------- services: more ---------- */
.services { grid-template-columns: 1fr 1fr; }
.more { margin: var(--spacing-36) 0 0; max-width: 36em; color: var(--color-silver-mist); font-size: 16px; line-height: 1.5; }
.more a { color: var(--color-bone-white); font-weight: 600; text-decoration: none; white-space: nowrap; transition: color .2s; }
.more a:hover { color: var(--color-nrav-apricot); }

/* ---------- character: a scene without text until Iskra is called ---------- */
.character { min-height: 100vh; min-height: 100svh; display: grid; align-items: center; padding: var(--spacing-96) 0; }
.character > .visual { position: absolute; inset: 8vh 0; width: auto; height: auto; }
.summon-spot { position: absolute; left: 0; top: 0; width: 64px; height: 64px; pointer-events: none; }
.summon { position: absolute; left: 0; top: 0; z-index: 3; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 18px 0 14px; border-radius: var(--radius-full); isolation: isolate;
  color: var(--color-bone-white); font-size: var(--text-nav-label); font-weight: 600; letter-spacing: var(--tracking-nav-label); text-transform: uppercase; white-space: nowrap;
  background: linear-gradient(135deg, rgba(46, 40, 60, .94), rgba(18, 16, 24, .94));
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9), 0 0 32px -6px rgba(252, 154, 98, .45);
  opacity: 0; transform: translate3d(var(--sx, -999px), var(--sy, -999px), 0) scale(.86); transition: opacity .28s var(--ease-out), transform .12s linear, box-shadow .3s; pointer-events: none; }
.summon::before, .summon::after { z-index: -1; padding: 1.4px; }
.summon::after { animation-duration: 2.2s; }
.summon-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--color-nrav-apricot); box-shadow: 0 0 0 4px rgba(252, 154, 98, .22), 0 0 14px rgba(252, 154, 98, .9); animation: summon-dot 1.6s ease-in-out infinite; }
@keyframes summon-dot { 50% { box-shadow: 0 0 0 7px rgba(252, 154, 98, .1), 0 0 22px rgba(252, 154, 98, 1); } }
.summon.is-on, .summon:focus-visible { opacity: 1; transform: translate3d(var(--sx, -999px), var(--sy, -999px), 0) scale(1); }
.summon:focus-visible { outline-offset: 3px; }
.character.is-summoned .summon, .character.is-summoning .summon { opacity: 0 !important; visibility: hidden; }
.character-copy { position: relative; z-index: 2; pointer-events: none; }
.character-copy .typed { max-width: 640px; min-height: 1px; }
.character-copy .typed p { margin-top: 0; }
.character-copy .typed-label { margin-bottom: var(--spacing-18); min-height: 1.2em; }
.character-copy .typed-title { margin-bottom: var(--spacing-30); min-height: 1.04em; }
.character-copy .typed-body { min-height: 0; }
.typed p:empty { display: none; }
.typed .caret { margin-left: 3px; }
.character:not(.is-summoned) .character-copy { visibility: hidden; }

/* ---------- KP: the first view as a real object ---------- */
.kp-tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--kx, 0deg)) rotateY(var(--ky, 0deg)) translate3d(0, var(--kfy, 0px), 0); transition: transform .9s var(--ease-out); }
.kp-sheet { transform-style: preserve-3d; }
.kp-sheet .kp-base { position: relative; transform: translateZ(0); box-shadow: 0 0 0 1px rgba(255, 255, 255, .07); }
.kp-depth i { position: absolute; inset: 0; border-radius: 18px; background: linear-gradient(160deg, #1b1b22, #08080b 70%); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .07);
  transform: translateZ(calc(var(--k) * -11px)); opacity: 0; transition: opacity .8s var(--ease-out); }
.kp-glow { position: absolute; inset: -6% -8% -22%; transform: translateZ(-150px); pointer-events: none; opacity: 0; transition: opacity 1s var(--ease-out);
  background: radial-gradient(closest-side at 40% 50%, rgba(252, 154, 98, .62), rgba(252, 154, 98, .2) 55%, transparent), radial-gradient(closest-side at 68% 58%, rgba(128, 82, 255, .58), rgba(128, 82, 255, .18) 55%, transparent); }
.kp-rim { position: absolute; inset: -2px; border-radius: 20px; pointer-events: none; opacity: 0; transform: translateZ(1px); transition: opacity .8s var(--ease-out); }
.kp-rim::before, .kp-rim::after { padding: 3px; }
/* a glint that slides across the sheet: a wide strip moved by transform inside a clipped frame */
.kp-sheen { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; pointer-events: none; opacity: 0; transform: translateZ(2px); transition: opacity .8s; }
.kp-sheen::before { content: ''; position: absolute; top: 0; bottom: 0; left: -60%; width: 60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .1) 42%, rgba(255, 184, 41, .08) 52%, transparent);
  animation: glint 7s var(--ease-cine) infinite; }
@keyframes glint { 0%, 12% { transform: translateX(0); } 62%, 100% { transform: translateX(270%); } }
.kp-pins { position: absolute; inset: 0; transform-style: preserve-3d; pointer-events: none; }
.kp-pin { position: absolute; transform-style: preserve-3d; }
.kp-pin .stem { position: absolute; left: -1.5px; top: 0; width: 3px; height: 150px; transform-origin: 50% 0; transform: rotateX(90deg);
  background: linear-gradient(to bottom, rgba(255, 184, 41, .0), rgba(255, 184, 41, .95)); }
.kp-pin .dot { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--color-saffron-spark); box-shadow: 0 0 0 8px rgba(255, 184, 41, .2), 0 0 30px rgba(255, 184, 41, .9); transform: translateZ(1px); }
.kp-pin .tag { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 14px; padding: 16px 26px 18px; border-radius: 999px; white-space: nowrap;
  transform: translate3d(-50%, -130%, 150px); background: rgba(10, 10, 14, .78); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .16), 0 30px 60px -20px rgba(0, 0, 0, .9);
  color: #fff; font: 600 30px/1 var(--font); letter-spacing: -.01em; }
.kp-pin .tag b { color: var(--color-nrav-apricot); font-weight: 600; font-size: 24px; letter-spacing: .06em; }
.kp-pin { opacity: 0; transition: opacity .6s var(--ease-out); transition-delay: calc(var(--i) * 90ms + 200ms); }
.kp-stage.is-overview .kp-depth i, .kp-stage.is-overview .kp-pin { opacity: 1; }
.kp-stage.is-overview .kp-glow { opacity: .55; }
.kp-stage.is-overview .kp-rim { opacity: .9; }
.kp-stage.is-overview .kp-sheen { opacity: 1; }
.kp-stage.is-overview .kp-tilt { animation: kp-float 7s ease-in-out infinite; }
@keyframes kp-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }
.kp-stage { overflow: visible; }
.kp-sticky { overflow: clip; }

/* ---------- works: glass coverflow of real app screens ---------- */
.works-track { height: calc(70vh * 4 + 100vh); }
.works-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: center; padding-top: 76px; overflow: clip; }
.works-grid { display: grid; grid-template-columns: minmax(300px, .72fr) 1.28fr; gap: var(--spacing-60); align-items: center; }
.works-copy .label { margin-top: 0; }
.works-heading { font-size: clamp(36px, 4vw, 60px); }
.works-lead { margin-top: var(--spacing-18); color: var(--color-silver-mist); }
.works-story { margin-top: var(--spacing-24); min-height: 200px; }
#works-title-screen { transition: opacity .35s, transform .5s var(--ease-out); }
#works-title-screen.swap { opacity: 0; transform: translateY(10px); }
.works-text { margin-top: var(--spacing-12); transition: opacity .4s; }
.works-text.swap { opacity: 0; }
.works-stage { position: relative; height: min(70vh, 640px); perspective: 1800px; perspective-origin: 50% 40%; }
.work { position: absolute; left: 50%; top: 50%; width: min(100%, 760px); aspect-ratio: 1440 / 900; margin: 0; transform-style: preserve-3d; will-change: transform, opacity;
  transform: translate(-50%, -50%) translate3d(var(--x), var(--fy, 0px), var(--z)) rotateY(var(--ry)) rotateX(var(--rx, 4deg)); opacity: var(--o); z-index: var(--zi); }
.work-glass { position: absolute; inset: 0; border-radius: 22px; padding: 10px; isolation: isolate;
  background: linear-gradient(155deg, rgba(40, 34, 58, .94), rgba(10, 10, 14, .94));
  box-shadow: 0 60px 120px -50px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, .1); }
.work-glass::before { opacity: calc(var(--rimo, .5) * .9); }
.work-glass::after { animation-duration: 5s; }
.work:not(.is-front) .work-glass::after { animation: none; opacity: 0; }
.work img { width: 100%; height: 100%; object-fit: cover; object-position: top left; border-radius: 14px; background: #0b0c10; }
.work-glow { position: absolute; inset: 0 -6% -16%; z-index: -1; transform: translateZ(-60px); pointer-events: none; opacity: calc(var(--rimo, .5) * .55);
  background: radial-gradient(closest-side at 34% 52%, rgba(252, 154, 98, .55), rgba(252, 154, 98, .14) 60%, transparent), radial-gradient(closest-side at 70% 58%, rgba(128, 82, 255, .55), rgba(128, 82, 255, .14) 60%, transparent); }
.work figcaption { position: absolute; left: 22px; bottom: -40px; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: var(--capo, 0); transition: opacity .4s; }

/* ---------- 3D object: arrows and caption ---------- */
.object-view { position: relative; }
.object-nav { display: flex; align-items: center; justify-content: center; gap: var(--spacing-18); margin-top: var(--spacing-12); opacity: 0; transform: translateY(12px); transition: opacity .7s var(--ease-out), transform .8s var(--ease-out); pointer-events: none; }
.object-nav.is-on { opacity: 1; transform: none; pointer-events: auto; }
.obj-arrow { width: 52px; height: 52px; color: var(--color-bone-white); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); background: rgba(14, 13, 18, .72); }
.obj-arrow:hover { box-shadow: inset 0 0 0 1.5px var(--color-nrav-apricot); color: var(--color-nrav-apricot); background: rgba(252, 154, 98, .08); }
.obj-arrow:disabled { opacity: .4; cursor: progress; }
.obj-caption { margin: 0; min-width: 220px; display: grid; justify-items: center; gap: 4px; text-align: center; }
.obj-count { color: var(--color-nrav-apricot); font-size: var(--text-caption); font-weight: 600; letter-spacing: .08em; }
.obj-name { font-size: 17px; font-weight: 400; letter-spacing: -.01em; }
.chips:empty { display: none; }

/* ---------- fallback without WebGL ---------- */
html.no-webgl .fallback { display: block !important; }
html.no-webgl .drag-hint { display: none; }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-grid; }
  .services { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .grid, .hero-grid, .kp-grid { grid-template-columns: 1fr; gap: var(--spacing-30); }
  .hero { padding: 92px 0 72px; align-items: start; }
  .hero .visual { order: -1; height: 40vh; height: 40svh; margin-bottom: 4px; }
  .split { min-height: 0; padding: var(--spacing-96) 0; }
  .split-grid .visual { height: 56vw; min-height: 300px; max-height: 460px; }
  .reverse > .visual, .split-grid > .visual { order: -1; }
  .label { margin-top: var(--spacing-24); }
  .film-head { align-items: start; margin-bottom: var(--spacing-30); }
  .footer-grid { grid-template-columns: 1fr; }
  .noise-line { min-height: 54vh; }
  .noise-line, .noise-line:nth-child(even) { justify-items: stretch; }
  .noise-enter, .noise-line.is-accent .noise-enter { width: 100%; }
  .noise-card { padding: 24px 24px 26px; border-radius: 22px; }
  .noise-line.is-accent .noise-card { padding: 30px 24px 32px; }
  .kp-track { height: calc(80vh * 7 + 100vh); }
  .kp-sticky { padding-top: 72px; align-items: start; }
  .kp-grid { gap: var(--spacing-18); }
  .kp-stage { order: -1; height: 36vh; height: 36svh; overflow: hidden; }  /* the zoomed card stays framed in the stage, the story text below stays visible */
  .kp-heading { display: none; }
  .kp-story { margin-top: var(--spacing-12); min-height: 0; }
  .kp-text { min-height: 7.5em; font-size: 16px; }
  .kp-controls { margin-top: var(--spacing-12); }
  .kp-pdf { margin-left: 0; }
  .kp-pins { display: none; }
  .works-sticky { padding-top: 72px; align-items: start; }
  .works-grid { grid-template-columns: 1fr; gap: var(--spacing-18); }
  .works-stage { order: -1; height: 34vh; height: 34svh; perspective: 1100px; }
  .work { width: 86%; }
  .works-heading { font-size: 30px; }
  .works-lead { display: none; }
  .works-story { margin-top: var(--spacing-12); min-height: 0; }
  .works-text { min-height: 6em; font-size: 16px; }
  .works-copy .note { margin-top: var(--spacing-12); }
  .character { padding: var(--spacing-60) 0; align-items: end; }
  .character > .visual { inset: 4vh 0 30vh; }
  .character.is-summoned { align-items: center; }
  .obj-caption { min-width: 0; flex: 1; }
}
@media (max-width: 560px) {
  .nav { gap: 8px; height: 68px; }
  .nav-cta { display: none; }
  .menu { inset: 68px 0 0; }
  .actions { gap: var(--spacing-12) var(--spacing-24); }
  .chips { gap: 8px; }
  .chip { padding: 0 14px 0 10px; }
  .film-play { padding: 12px 16px; }
}

/* 15.11 (6th session): summon pointer, showcase loading state */
.character.is-pointing { cursor: pointer; }
.object-nav .obj-caption { transition: opacity .4s; }
.object-nav.is-loading .obj-caption { opacity: .55; }

/* 15.11 evening: the rainbow rim of the KP sheet stays on at every step, not only in the overview */
.kp-rim { opacity: .9; }

/* 15.11 evening — phones and touch screens: the same look, without what costs every frame
   (backdrop blur, big blurred glows, endlessly animated gradients) */
@media (max-width: 760px), (pointer: coarse) {
  .nav.is-scrolled { background: rgba(0, 0, 0, .9); }
  .work-glass { background: linear-gradient(155deg, rgba(34, 29, 50, .96), rgba(10, 10, 14, .96)); }
  .noise-glow, .work-glow, .kp-glow { display: none; }
  .noise-float, .kp-stage.is-overview .kp-tilt, .noise-card::after, .rim::after, .kp-sheen::before { animation: none; }
  .noise-card::after, .rim::after { opacity: 0; }
}
@media (max-width: 760px), (pointer: coarse) { .noise-card { background-color: rgba(10, 9, 15, .62); } }

/* works: the project name, lead and note change with the screen */
.works-heading, .works-lead, .works-note { transition: opacity .35s; }
.works-heading.swap, .works-lead.swap, .works-note.swap { opacity: 0; }
.works-track { height: calc(62vh * 7 + 100vh); }

/* ---------- 16.11 intro: a quiet first screen with the full-screen recommendation.
   The particle field already drifts behind it while the heavy scenes (КП, shaders) warm up out of sight;
   the page and its first figure appear only when the visitor steps in. ---------- */
.intro-screen { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(60% 55% at 50% 48%, rgba(0, 0, 0, .25), rgba(0, 0, 0, .78));
  transition: opacity .9s var(--ease-out), visibility 0s .9s;
  animation: intro-failsafe .01s 14s forwards; }          /* if the scripts never run, the page is not locked */
html.js .intro-screen { animation: none; }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; } }
.intro-screen.is-out { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-inner { display: grid; justify-items: center; text-align: center; width: min(100%, 560px); transition: transform 1.1s var(--ease-out); }
.intro-screen.is-out .intro-inner { transform: scale(1.06); }
.intro-mark { width: 74px; height: 74px; fill: none; stroke-width: 7.5; overflow: visible; }
.intro-mark path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: mark-draw 1.6s var(--ease-cine) forwards; }
.intro-mark .arc-1 { stroke: var(--color-bone-white); }
.intro-mark .arc-2 { stroke: var(--color-nrav-apricot); animation-delay: .35s; }
@keyframes mark-draw { to { stroke-dashoffset: 0; } }
.intro-brand { margin: 22px 0 0; font-size: clamp(40px, 6vw, 64px); font-weight: 400; letter-spacing: -.04em; line-height: 1; }
.intro-brand span { display: block; margin-top: 14px; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.intro-load { position: relative; width: min(260px, 70vw); height: 2px; margin-top: 38px; border-radius: 2px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.intro-load i { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(var(--p, .04)); transition: transform .6s var(--ease-out);
  background: linear-gradient(90deg, var(--color-nrav-apricot), var(--color-saffron-spark)); }
.intro-status { margin: 12px 0 0; min-height: 1.5em; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.intro-tip { margin-top: 34px; padding: 18px 26px 20px; border-radius: 20px; background: rgba(18, 16, 24, .72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); }
.intro-tip-label { margin: 0 0 8px; color: var(--color-saffron-spark); font-size: var(--text-caption); font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.intro-tip-text { margin: 0; font-size: clamp(17px, 1.5vw, 20px); font-weight: 300; line-height: 1.4; text-wrap: balance; }
.intro-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 28px; margin-top: 26px; opacity: .35; transition: opacity .6s var(--ease-out); }
.intro-screen.is-ready .intro-actions { opacity: 1; }
.intro-actions button:disabled { cursor: progress; }
.intro-actions .btn svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.intro-screen.no-full .intro-tip, .intro-screen.no-full #intro-full { display: none; }
.intro-screen.no-full #intro-go { min-height: 45px; padding: 14px 22px; border-radius: 22.5px; background: var(--color-nrav-apricot); color: #000; }
/* while the intro is up, the page waits: hidden, and its entrance animations hold their first frame */
main, .footer { transition: opacity 1s var(--ease-out) .1s; }
.nav { transition: transform .45s var(--ease-out), background-color .3s, opacity 1s var(--ease-out) .1s; }
html.intro-on main, html.intro-on .footer, html.intro-on .nav { opacity: 0; }
html.intro-on .split-chars .char, html.intro-on .intro, html.intro-on .intro-a, html.intro-on .intro-b { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) { .intro-mark path { animation: none; stroke-dashoffset: 0; } .intro-screen, .intro-inner { transition: none; } }
@media (max-width: 560px) { .intro-tip { padding: 16px 18px 18px; } .intro-actions { flex-direction: column; } }
html:not(.intro-on) .intro-screen { display: none; }
html.intro-on:not(.js) main, html.intro-on:not(.js) .nav, html.intro-on:not(.js) .footer { animation: page-failsafe .01s 14s forwards; }
@keyframes page-failsafe { to { opacity: 1; } }
html.intro-on { overflow: hidden; }

/* 16.11: Iskra's scene — before she is called, a quiet line under her figure says what to do */
.summon-hint { position: absolute; left: 50%; bottom: 5vh; z-index: 2; margin: 0; display: flex; align-items: center; gap: 12px; white-space: nowrap;
  color: var(--color-silver-mist); font-size: var(--text-caption); font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  opacity: 0; transform: translate(-50%, 8px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); pointer-events: none; }
.summon-hint .summon-dot { width: 8px; height: 8px; }
.summon-hint.is-on { opacity: .92; transform: translate(-50%, 0); }
.character.is-pointing .summon-hint, .character.is-summoning .summon-hint, .character.is-summoned .summon-hint { opacity: 0; }
@media (pointer: coarse) { .summon-hint { display: none; } }
.intro-screen:focus { outline: none; }

/* 16.11 evening 2 — phone light mode: static posters instead of the live 3D models (no GLB loads),
   the controls that would do nothing are hidden */
.obj-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.phone-light #obj-chips, .phone-light #chair-reset, .phone-light #digital-angle, .phone-light .drag-hint { display: none; }

/* ---------- 17.11 (Claude): phones and narrow screens — КП and «Работы» as plain flowing content ----------
   No sticky scroll-jacking and no 3D layers there: on iPhone those painted late (empty sheet until you scroll)
   and jumped when the toolbar showed or hid. */
.kpm, .worksm { display: none; }
@media (max-width: 860px) {
  .kp-track, .works-track { display: none; }
  .kpm, .worksm { display: block; }
  .kp, .works { padding: var(--spacing-60) 0; }
  .kpm .label, .worksm .label { margin-top: 0; }
  .kpm > .body { margin-top: var(--spacing-18); color: var(--color-silver-mist); }
  .kpm-sheet { position: relative; margin: var(--spacing-24) 0 var(--spacing-12); border-radius: 16px; overflow: hidden; isolation: isolate; background: #0c0d10; }
  .kpm-sheet img { width: 100%; height: auto; border-radius: 16px; }
  .kpm-list { list-style: none; margin: var(--spacing-36) 0 0; padding: 0; display: grid; gap: var(--spacing-60); }
  .kpm-card { position: relative; border-radius: 15px; overflow: hidden; background: #14161b; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .06); }
  .kpm-card img, .kpm-card video { position: absolute; display: block; }
  .kpm-card img { inset: 0; width: 100%; height: 100%; }
  .kpm-card video { object-fit: fill; pointer-events: none; }
  .kpm-item .kp-count { margin: var(--spacing-18) 0 var(--spacing-6); }
  .kpm-item .h-sm { font-size: 28px; }
  .kpm-item .body { margin: var(--spacing-12) 0; font-size: 16px; color: var(--color-silver-mist); }

  .wm-proj { font-size: 34px; }
  .wm-lead { margin-top: var(--spacing-12); color: var(--color-silver-mist); font-size: 16px; }
  .wm-rail { display: flex; gap: 14px; margin: var(--spacing-24) calc(var(--gutter) * -1) 0; padding: 4px var(--gutter) 34px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .wm-rail::-webkit-scrollbar { display: none; }
  .wm-slide { position: relative; flex: 0 0 86%; margin: 0; scroll-snap-align: start; opacity: .55; transition: opacity .4s; }
  .wm-slide.is-on { opacity: 1; }
  .wm-glass { border-radius: 18px; padding: 7px; background: linear-gradient(155deg, rgba(34, 29, 50, .96), rgba(10, 10, 14, .96)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 0 1px rgba(255, 255, 255, .08); }
  .wm-glass img { width: 100%; height: auto; aspect-ratio: 1440 / 900; object-fit: cover; object-position: top left; border-radius: 12px; background: #0b0c10; }
  .wm-slide figcaption { position: absolute; left: 10px; bottom: -24px; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
  .wm-story { margin-top: var(--spacing-12); min-height: 230px; }
  .wm-swipe { margin-left: 14px; color: var(--color-ash-gray); font-weight: 400; letter-spacing: .02em; text-transform: none; }
  .wm-text { margin-top: var(--spacing-12); font-size: 16px; }
}

/* ---------- 17.11: Iskra's chat — the right half of her scene after she is summoned ---------- */
.iskra-chat { position: relative; pointer-events: auto; opacity: 0; transform: translate3d(0, 26px, 0) scale(.97);
  transition: opacity 1s var(--ease-out) 1.1s, transform 1.2s var(--ease-out) 1.1s; }
.character.is-summoned .iskra-chat { opacity: 1; transform: none; }
.character:not(.is-summoned) .iskra-chat { visibility: hidden; }
@media (min-width: 1001px) {
  .character-copy { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); gap: var(--spacing-60); align-items: center; }
}
@media (max-width: 1000px) { .iskra-chat { margin-top: var(--spacing-36); max-width: 520px; } }
.iskra-orbit { position: absolute; left: 50%; top: 50%; width: 150%; aspect-ratio: 1.6; translate: -50% -50%; pointer-events: none; z-index: -1; }
.iskra-orbit i { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(252, 154, 98, .22); animation: orbit-turn 38s linear infinite; }
.iskra-orbit i + i { inset: 9% 3%; box-shadow: inset 0 0 0 1px rgba(128, 82, 255, .24); animation-duration: 52s; animation-direction: reverse; }
.iskra-orbit i::after { content: ''; position: absolute; left: 50%; top: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--color-saffron-spark); }
.iskra-orbit i + i::after { top: auto; bottom: -3px; background: var(--color-electric-iris); }
@keyframes orbit-turn { to { transform: rotate(-1turn); } }
.chat-card { position: relative; isolation: isolate; border-radius: 26px; padding: 22px 22px 20px;
  background: radial-gradient(120% 90% at 20% 0%, rgba(255, 255, 255, .07), transparent 55%), linear-gradient(155deg, rgba(30, 25, 44, .92), rgba(8, 8, 12, .9));
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .95), inset 0 1px 0 rgba(255, 255, 255, .08); }
.chat-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.chat-head p { margin: 0; display: grid; gap: 2px; }
.chat-head b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.chat-head span { display: flex; align-items: center; gap: 7px; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.chat-live { width: 7px; height: 7px; border-radius: 50%; background: #2bc4a4; }
.chat-ava { position: relative; flex: none; width: 42px; height: 42px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6e8 0 8%, #ffb829 30%, #fc9a62 62%, #8a3f1f 100%); box-shadow: 0 6px 18px -6px rgba(252, 154, 98, .7); }
.chat-ava i { position: absolute; top: 15px; width: 5px; height: 8px; border-radius: 3px; background: #1a0f0a; animation: ava-blink 5s infinite; }
.chat-ava i:first-child { left: 13px; } .chat-ava i + i { right: 13px; }
@keyframes ava-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.chat-log { list-style: none; margin: 0; padding: 18px 0 6px; min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; }
.msg { display: grid; gap: 6px; max-width: 88%; animation: msg-in .45s var(--ease-out) both; }
.msg p { margin: 0; padding: 10px 14px; font-size: 15px; font-weight: 400; line-height: 1.42; }
.msg-iskra p { background: rgba(255, 255, 255, .07); border-radius: 16px 16px 16px 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.msg-me { align-self: flex-end; }
.msg-me p { background: var(--color-nrav-apricot); color: #000; border-radius: 16px 16px 4px 16px; font-weight: 500; }
.msg-link { justify-self: start; color: var(--color-nrav-apricot); font-size: 13px; font-weight: 600; letter-spacing: .03em; text-decoration: none; }
.msg-link:hover { color: var(--color-nrav-apricot-hover); }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px); } }
.msg .dots { display: inline-flex; gap: 4px; padding: 3px 0; }
.msg .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--color-silver-mist); animation: dot-wave 1s ease-in-out infinite; }
.msg .dots i:nth-child(2) { animation-delay: .15s; } .msg .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot-wave { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.chat-hint { margin: 12px 0 8px; color: var(--color-ash-gray); font-size: var(--text-caption); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.chat-asks { display: flex; flex-wrap: wrap; gap: 8px; }
.chat-ask { min-height: 38px; padding: 0 14px; font-size: 12px; text-transform: none; letter-spacing: .01em; font-weight: 500; }
.chat-ask[aria-pressed="true"] { color: var(--color-ash-gray); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); }
@media (max-width: 760px), (pointer: coarse) { .iskra-orbit { display: none; } .chat-log { min-height: 200px; } }
@media (prefers-reduced-motion: reduce) { .iskra-orbit i, .chat-ava i, .msg, .msg .dots i { animation: none; } }
body.motion-off .iskra-chat { transition: none; }

/* 17.11: focus look of the sheet (was inside the iframe): apricot ring on the card, the rest dimmed */
.kp-dim { position: absolute; inset: 0; border-radius: 18px; overflow: hidden; pointer-events: none; transform: translateZ(.8px); }
.kp-dim i { position: absolute; left: 40px; top: 315px; width: 517px; height: 276px; border-radius: 15px; opacity: 0;
  box-shadow: 0 0 0 1.5px var(--color-nrav-apricot), 0 0 60px rgba(252, 154, 98, .25), 0 0 0 3000px rgba(8, 9, 12, .55);
  transition: opacity .7s var(--ease-out), left 1.4s var(--ease-cine), top 1.4s var(--ease-cine), width 1.4s var(--ease-cine), height 1.4s var(--ease-cine); }
.kp-stage:not(.is-overview) .kp-dim i { opacity: 1; }
body.motion-off .kp-dim i { transition: none; }
/* 17.11: eleven screens in «Работы» — tighter dots so the arrows stay on one line */
#works-dots { gap: 0; }
#works-dots button { width: 24px; }

/* 17.11 — resilient loading on lossy links (VPN, weak mobile): a picture that is being fetched again is hidden
   (no broken «?»), its frame shows a quiet skeleton; a note appears only while the app script itself retries. */
img.media-wait, video.media-wait { visibility: hidden; }
.kpm-card::before, .wm-glass::after {
  content: ''; position: absolute; inset: 0; z-index: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .06) 50%, rgba(255, 255, 255, 0) 70%) 0 0 / 250% 100%;
  animation: skel 1.6s linear infinite; }
.kpm-card > img, .kpm-card > video { z-index: 1; }
.kpm-card:has(> img.media-ok)::before, .wm-glass:has(> img.media-ok)::after { animation: none; opacity: 0; }
.wm-glass { position: relative; }
.wm-glass > img { position: relative; z-index: 1; }
@keyframes skel { from { background-position: 125% 0; } to { background-position: -125% 0; } }
@media (prefers-reduced-motion: reduce) { .kpm-card::before, .wm-glass::after { animation: none; } }
.net-note { display: none; position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); z-index: 200; transform: translateX(-50%);
  padding: 9px 16px; border-radius: 99px; background: rgba(20, 20, 26, .92); color: #e8e8e8; font: 500 13px/1.2 Inter, system-ui, sans-serif;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 12px 30px -10px #000; white-space: nowrap; }
html.net-slow .net-note { display: block; }
