/* KVANT LAB v6 — главная. Токены из DIRECTION.md (перенесены из hero.html как есть) */
@font-face { font-family: "Manrope"; src: url(../fonts/Manrope.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(../fonts/SpaceGrotesk.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --d0: #050505; --d1: #0A0A0A; --d2: #0F0F0F; --d3: #141414; --d4: #1A1A1A; --d5: #232323; --d6: #2E2E2E;
  --silver: #A6A6A6; --mute: #6F6F6C; --paper: #F2F2F0; --white: #FFFFFF;
  --light: 233 214 174;               /* тёплый свет #E9D6AE: только там, где горит */
  --ease-out: cubic-bezier(.2, .8, .2, 1); --ease-io: cubic-bezier(.6, 0, .2, 1);
  --gut: clamp(20px, 4vw, 60px); --wrap: min(1320px, calc(100vw - 2 * var(--gut)));
  --sec: clamp(96px, 11vw, 168px); --hdr: 84px;
}
@property --arc   { syntax: "<angle>";  inherits: true; initial-value: 0deg; }
@property --trace { syntax: "<angle>";  inherits: true; initial-value: 0deg; }
@property --lit   { syntax: "<number>"; inherits: true; initial-value: 0; }

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { background: var(--d0); color-scheme: dark; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { background: var(--d1); color: var(--paper); font: 400 16px/1.55 "Manrope", system-ui, sans-serif; overflow-x: clip;
       -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: lining-nums; }
/* статичное зерно 2/255 против полос в тёмных переходах (не анимируется) */
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .035;
  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='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; }
.wrap { width: var(--wrap); margin: 0 auto; }
b, strong { font-weight: 600; }

/* ---------- заставка ---------- */
.intro { position: fixed; inset: 0; z-index: 200; display: none; place-items: center; background: var(--d0); }
.js .intro.on { display: grid; animation: introOut .38s var(--ease-io) 2.07s forwards; }
.intro svg { overflow: visible; }
.intro path { fill: rgb(var(--light)); fill-opacity: 0; stroke: rgb(var(--light)); stroke-width: .5; stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px rgb(var(--light) / .8)); }
.intro.on path { animation: draw .95s var(--ease-io) .1s forwards, fillIn .45s var(--ease-out) 1s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillIn { to { fill-opacity: 1; fill: var(--paper); stroke: var(--paper); filter: drop-shadow(0 0 14px rgb(var(--light) / .55)); } }
@keyframes introOut { to { opacity: 0; visibility: hidden; } }

/* ---------- шапка: фиксированная, стекло и прогрессивное размытие после прокрутки ---------- */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: var(--hdr); }
.top__in { position: relative; z-index: 1; width: var(--wrap); margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 40px; }
.top__blur { position: absolute; inset: 0 0 -28px; opacity: 0; transition: opacity .4s var(--ease-out); pointer-events: none; }
.top__blur::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(5 5 5 / .78), rgb(5 5 5 / .4) 70%, transparent); }
.top__blur i { position: absolute; inset: 0; }
.top__blur i:nth-child(1) { -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); -webkit-mask: linear-gradient(#000 60%, transparent); mask: linear-gradient(#000 60%, transparent); }
.top__blur i:nth-child(2) { -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); -webkit-mask: linear-gradient(#000 40%, transparent 80%); mask: linear-gradient(#000 40%, transparent 80%); }
.top__blur i:nth-child(3) { -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); -webkit-mask: linear-gradient(#000 20%, transparent 60%); mask: linear-gradient(#000 20%, transparent 60%); }
.top.scrolled .top__blur { opacity: 1; }
.brand { display: flex; align-items: center; height: 18px; }
.brand img { height: 17px; width: auto; }
.nav { display: flex; gap: 30px; margin-left: auto; font-size: 14px; font-weight: 500; color: var(--silver); }
.nav a { position: relative; padding: 6px 0; transition: color .3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgb(var(--light)); transform: scaleX(0);
                transform-origin: right; transition: transform .5s var(--ease-io); box-shadow: 0 0 8px rgb(var(--light) / .6); }
.nav a:hover, .nav a.cur { color: var(--paper); } .nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.burger { display: none; }

/* мобильное меню: сосед шапки, а не потомок (у шапки backdrop-filter) */
.menu { position: fixed; inset: 0; z-index: 45; padding: 92px var(--gut) 28px; display: flex; flex-direction: column; justify-content: space-between;
        background: rgb(5 5 5 / .9); -webkit-backdrop-filter: blur(22px) saturate(1.2); backdrop-filter: blur(22px) saturate(1.2);
        animation: menuIn .45s var(--ease-out); }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { font-size: 30px; font-weight: 600; letter-spacing: -.035em; padding: 10px 0; color: var(--paper); border-bottom: 1px solid rgb(255 255 255 / .06);
              opacity: 0; transform: translateY(10px); animation: up .5s var(--ease-out) forwards; }
.menu nav a:nth-child(2) { animation-delay: .04s } .menu nav a:nth-child(3) { animation-delay: .08s } .menu nav a:nth-child(4) { animation-delay: .12s }
.menu nav a:nth-child(5) { animation-delay: .16s } .menu nav a:nth-child(6) { animation-delay: .2s } .menu nav a:nth-child(7) { animation-delay: .24s }
.menu__foot { display: grid; gap: 18px; justify-items: start; }
.menu__foot .btn { width: 100%; justify-content: space-between; }
@keyframes menuIn { from { opacity: 0; } }
@keyframes up { to { opacity: 1; transform: none; } }

/* ---------- первый экран ---------- */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: var(--hdr) 1fr auto; overflow: hidden; isolation: isolate; background: var(--d0); }
.stage { position: absolute; inset: 0; z-index: -1; background: var(--d0); overflow: hidden; }
.stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s var(--ease-out); }
.stage.ready canvas { opacity: 1; }
/* дыхание света щели: мягкое тёплое сияние вдоль щели, только пока первый экран в окне */
.breath { position: absolute; top: 0; bottom: 0; left: var(--slit-x, 70%); width: 340px; margin-left: -170px; pointer-events: none; opacity: 0;
  background: radial-gradient(50% 46% at 50% 52%, rgb(var(--light) / .22), rgb(var(--light) / .07) 45%, transparent 72%);
  transform-origin: 50% 55%; transition: opacity 1.4s var(--ease-out); }
.stage.ready .breath { opacity: .55; animation: breathe 6.2s ease-in-out infinite alternate; }
.stage.paused .breath { animation-play-state: paused; }
@keyframes breathe {
  0%   { opacity: .38; transform: scaleX(.78) scaleY(.96); }
  45%  { opacity: .72; transform: scaleX(1.08) scaleY(1); }
  70%  { opacity: .55; transform: scaleX(.94) scaleY(.98); }
  100% { opacity: .82; transform: scaleX(1.16) scaleY(1.02); }
}
.shade { position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgb(5 5 5 / .8) 0%, rgb(5 5 5 / .55) 32%, rgb(5 5 5 / 0) 58%),
              linear-gradient(0deg, rgb(5 5 5 / .92) 0%, rgb(5 5 5 / 0) 24%),
              linear-gradient(180deg, rgb(5 5 5 / .7) 0%, rgb(5 5 5 / 0) 16%); }
.copy { position: relative; z-index: 2; width: var(--wrap); margin: 0 auto; align-self: center; padding: 4vh 0 6vh; }
h1 { font-weight: 600; font-size: clamp(44px, 5.9vw, 88px); line-height: .98; letter-spacing: -.045em; max-width: 9.2em; color: var(--white); }
h1 .ln { display: block; }
.lede { margin-top: 28px; max-width: 34ch; font-size: clamp(17px, 1.45vw, 21px); line-height: 1.45; color: var(--silver); letter-spacing: -.005em; }
.lede b, .head__lede b { color: var(--paper); font-weight: 500; }
.acts { margin-top: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 16px; }
.note { font-size: 13px; color: var(--mute); letter-spacing: .01em; margin-left: 4px; }

/* ---------- кнопки ---------- */
.btn { --mx: 50%; --my: 50%; position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 14px; height: 58px; padding: 0 24px 0 26px;
       border-radius: 12px; font: 600 16px/1 "Manrope", sans-serif; letter-spacing: -.01em; cursor: pointer; border: 0; outline: none; white-space: nowrap;
       transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), background-color .4s, --lit .45s; }
.btn svg { width: 8px; height: 16px; flex: none; transition: transform .45s var(--ease-out); }
.btn:hover svg { transform: translateX(4px); }
.btn:active { transform: scale(.975); transition-duration: .12s; }
.btn:disabled { opacity: .6; cursor: progress; }
.b-main { color: var(--d1); background: var(--paper);
          box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgb(0 0 0 / .14), 0 1px 0 rgb(255 255 255 / .1), 0 16px 40px -18px rgb(var(--light) / .45); }
.b-main::after { content: ""; position: absolute; left: 8%; right: 8%; bottom: -16px; height: 26px; z-index: -1; border-radius: 50%;
                 background: radial-gradient(50% 50% at 50% 50%, rgb(var(--light) / .55), transparent 70%); filter: blur(10px); opacity: .45;
                 transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.b-main:hover { box-shadow: inset 0 1px 0 #fff, inset 0 -2px 0 rgb(0 0 0 / .14), 0 1px 0 rgb(255 255 255 / .1), 0 22px 56px -16px rgb(var(--light) / .75); }
.b-main:hover::after { opacity: 1; transform: scaleX(1.1); }
.b-main:active { box-shadow: inset 0 2px 6px rgb(0 0 0 / .25), 0 8px 24px -10px rgb(var(--light) / .5); }
.b-main:focus-visible { box-shadow: 0 0 0 3px var(--d0), 0 0 0 4px rgb(var(--light)); }
.b-glass { color: var(--paper); background: linear-gradient(180deg, rgb(255 255 255 / .07), rgb(255 255 255 / .025));
           -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
           box-shadow: inset 0 1px 0 rgb(255 255 255 / .14), inset 0 -1px 0 rgb(0 0 0 / .4), 0 10px 30px rgb(0 0 0 / .45); }
.b-glass.go { animation: orbit 7s linear .3s 2 both; }
.b-glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 1;
  background:
    conic-gradient(from var(--arc), transparent 0 62%, rgb(var(--light) / 0) 64%, rgb(var(--light) / .95) 75%, rgb(var(--light) / 0) 84%, transparent 100%),
    conic-gradient(from 200deg, rgb(var(--light) / .85) var(--trace), rgb(255 255 255 / .09) var(--trace));
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.b-glass:not(.go):not(.ran)::before { background: conic-gradient(from 200deg, rgb(var(--light) / .85) var(--trace), rgb(255 255 255 / .09) var(--trace)); }
.b-glass::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none; opacity: var(--lit);
  background: radial-gradient(150px 90px at var(--mx) var(--my), rgb(var(--light) / .16), transparent 70%);
  box-shadow: 0 18px 40px -18px rgb(var(--light) / .6); }
.b-glass.ran { animation: none; --arc: 0deg; }
.b-glass.ran::before { background: conic-gradient(from 200deg, rgb(var(--light) / .85) var(--trace), rgb(255 255 255 / .09) var(--trace)); }
.b-glass:hover, .b-glass:focus-visible { --lit: 1; animation: trace .7s var(--ease-io) forwards; }
.b-glass:active { box-shadow: inset 0 2px 8px rgb(0 0 0 / .6), 0 4px 14px rgb(0 0 0 / .45); }
.b-glass:focus-visible { box-shadow: 0 0 0 3px var(--d0), 0 0 0 4px rgb(var(--light) / .9); }
.b-sm { height: 42px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
@keyframes orbit { from { --arc: 0deg; } to { --arc: 360deg; } }
@keyframes trace { from { --trace: 0deg; } to { --trace: 360deg; } }
/* ссылка: линия тёплого света прочерчивается слева направо */
.lnk { position: relative; display: inline-flex; align-items: center; gap: 10px; color: var(--paper); font-weight: 500; padding-bottom: 3px;
       background: linear-gradient(rgb(255 255 255 / .18), rgb(255 255 255 / .18)) left bottom / 100% 1px no-repeat; }
.lnk::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: rgb(var(--light)); box-shadow: 0 0 10px rgb(var(--light) / .8);
              transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-io); }
.lnk:hover::after { transform: scaleX(1); }
.lnk svg { width: 7px; height: 14px; transition: transform .45s var(--ease-out); }
.lnk:hover svg { transform: translateX(4px); }
.lnk:focus-visible { outline: 1px solid rgb(var(--light)); outline-offset: 6px; }

/* полоса клиентов */
.clients { position: relative; z-index: 2; width: var(--wrap); margin: 0 auto; padding: 22px 0 30px; display: flex; align-items: center; gap: 28px;
           border-top: 1px solid rgb(255 255 255 / .07); }
.clients .lbl { font-size: 12px; color: var(--mute); white-space: nowrap; letter-spacing: .02em; }
.clients ul { display: flex; align-items: center; justify-content: space-between; flex: 1; gap: 24px; }
.clients li { color: #8C8C89; font-size: 15px; white-space: nowrap; transition: color .4s; }
.clients li:hover { color: var(--paper); }
.mk { display: block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.mk.loya { --m: url(../img/cases/loya-logo.svg); width: 64px; height: 23px; }
.mk.ray  { --m: url(../img/cases/rayflow-logo.svg); width: 104px; height: 12px; }
.w-nicky { font: 700 15px/1 "Manrope"; letter-spacing: .02em; }
.w-nicky i { font-style: normal; font-weight: 400; letter-spacing: .14em; font-size: 11px; margin-left: 6px; text-transform: uppercase; }
.w-waiski { font: 600 18px/1 "Space Grotesk"; letter-spacing: -.02em; }
.w-lena { font: 300 15px/1 "Space Grotesk"; letter-spacing: .26em; text-transform: uppercase; }
.w-aroma { font: 500 14px/1 "Manrope"; letter-spacing: .01em; }

/* вход первого экрана: строки из размытия (скрытие только при JS) */
.js .rv { opacity: 0; filter: blur(14px); transform: translateY(14px); }
.ready .rv { opacity: 1; filter: blur(0); transform: none;
             transition: opacity 1.1s var(--ease-out), filter 1.1s var(--ease-out), transform 1.1s var(--ease-out); transition-delay: var(--d, 0s); }

/* ---------- секции ---------- */
.sec { position: relative; padding: var(--sec) 0; }
.s-work { background: var(--d1); }
.s-demo { background: var(--d2); }
.s-services { background: var(--d1); }
.s-how { background: var(--d2); }
.s-about { background: var(--d1); }
.s-faq { background: var(--d2); }
.h2 { font-weight: 600; font-size: clamp(36px, 4.2vw, 64px); line-height: 1.02; letter-spacing: -.04em; color: var(--white); text-wrap: balance; }
.h2--xl { font-size: clamp(44px, 6.4vw, 104px); line-height: .98; letter-spacing: -.045em; }
.head { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; align-items: end; margin-bottom: clamp(44px, 5vw, 72px); }
.head .h2 { grid-column: 1 / span 7; }
.head__lede { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; color: var(--silver); max-width: 40ch; }
.head .head__lede { grid-column: 9 / span 4; }

/* появление блоков: сдвиг 24 px + шторка слева направо; заголовки из размытия */
/* после входа маска снимается: иначе режет свет под кнопками и стекло */
.js .up.done { opacity: 1; transform: none; -webkit-mask: none; mask: none; }
/* шторка — маской, не clip-path: clip-path обнуляет пересечение для IntersectionObserver */
.js .up { opacity: 0; transform: translateY(24px);
  -webkit-mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 220% 100% no-repeat; mask: linear-gradient(90deg, #000 45%, transparent 55%) 100% 0 / 220% 100% no-repeat; }
.js .up.in:not(.done) { opacity: 1; transform: none; -webkit-mask-position: 0 0; mask-position: 0 0;
  transition: opacity .8s ease, transform .8s var(--ease-out), -webkit-mask-position 1.1s var(--ease-io), mask-position 1.1s var(--ease-io); transition-delay: var(--sd, 0s); }
.js .blur-in { opacity: 0; filter: blur(14px); transform: translateY(14px); }
.js .blur-in.in { opacity: 1; filter: blur(0); transform: none; transition: opacity 1.1s var(--ease-out), filter 1.1s var(--ease-out), transform 1.1s var(--ease-out); }

/* ---------- карточки: стекло Raycast без синей тени, кромка горит со стороны курсора ---------- */
.card { --mx: -999px; --my: -999px; position: relative; isolation: isolate; border-radius: 16px; background: var(--d3);
  box-shadow: 0 1px 0 rgb(255 255 255 / .03) inset, 0 2px 2px rgb(0 0 0 / .3), 0 12px 24px -8px rgb(0 0 0 / .5), 0 40px 80px -30px rgb(0 0 0 / .7);
  transition: background-color .6s var(--ease-out), transform .6s var(--ease-out); }
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 2;
  background: linear-gradient(135deg, rgb(255 255 255 / .16), rgb(255 255 255 / .05) 30%, rgb(255 255 255 / .03) 70%, rgb(255 255 255 / .1));
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: 3;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgb(var(--light) / .7), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.card:hover { background: var(--d5); }

/* бенто работ: 12 колонок, 3 больших по 4 колонки и 3 малых по 4 колонки */
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.case { display: flex; flex-direction: column; grid-column: span 4; padding: 10px; }
.case__media { position: relative; display: block; overflow: hidden; border-radius: 10px; aspect-ratio: 16 / 10; background: var(--d4); }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.case__media::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); pointer-events: none; }
.case:hover .case__media img { transform: scale(1.03); }
.case__body { display: flex; flex-direction: column; gap: 12px; padding: 26px 16px 16px; flex: 1; }
.case__num { font: 500 clamp(48px, 5.2vw, 84px)/1 "Space Grotesk", "Manrope", sans-serif; letter-spacing: -.04em; color: var(--white); white-space: nowrap; }
.case__num em { font-style: normal; font-family: "Manrope"; font-weight: 500; font-size: .42em; letter-spacing: -.02em; color: var(--silver); margin-left: .12em; }
.case__num em:first-child, .case__num em:not(:last-child) { }
.case--big .case__num em { vertical-align: .1em; }
.case__line { color: var(--silver); font-size: 16px; line-height: 1.5; max-width: 34ch; }
.case__name { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500;
              color: var(--mute); letter-spacing: .02em; border-top: 1px solid rgb(255 255 255 / .06); }
.case__name svg { width: 7px; height: 14px; color: var(--silver); transition: transform .45s var(--ease-out), color .4s; }
.case:hover .case__name { color: var(--paper); }
.case:hover .case__name svg { transform: translateX(4px); color: rgb(var(--light)); }
.case--sm { flex-direction: row; gap: 4px; }
.case--sm .case__media { width: 44%; flex: none; aspect-ratio: 16 / 10; align-self: flex-start; }
.case--sm .case__body { padding: 6px 8px 6px 18px; gap: 8px; }
.case__num--sm { font-size: clamp(30px, 2.6vw, 40px); }
.case--sm .case__line { font-size: 14px; line-height: 1.45; }
.case--sm .case__name { padding-top: 10px; }
.after { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: clamp(44px, 5vw, 64px);
         padding-top: 32px; border-top: 1px solid rgb(255 255 255 / .06); }
.after p { font-size: clamp(20px, 1.8vw, 26px); font-weight: 600; letter-spacing: -.025em; color: var(--paper); }
.after__acts { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }

/* ---------- демо ---------- */
.s-demo::before { content: ""; position: absolute; top: 0; left: 50%; width: min(880px, 70vw); height: 1px; transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgb(var(--light) / .9) 50%, transparent); box-shadow: 0 0 18px 1px rgb(var(--light) / .45); }
.s-demo::after { content: ""; position: absolute; top: 0; left: 50%; width: min(640px, 60vw); height: 140px; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(50% 100% at 50% 0%, rgb(var(--light) / .07), transparent 70%); }
.demo { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; align-items: start; }
.demo__head { grid-column: 1 / span 5; position: sticky; top: 120px; }
.demo__head .head__lede { margin-top: 24px; }
.demo__facts { margin-top: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: rgb(255 255 255 / .06); border-radius: 12px; overflow: hidden; }
.demo__facts li { background: var(--d2); padding: 18px 16px 16px; display: grid; gap: 6px; }
.demo__facts b { font: 500 24px/1 "Space Grotesk", "Manrope"; letter-spacing: -.03em; color: var(--paper); }
.demo__facts span { font-size: 13px; color: var(--mute); line-height: 1.35; }
.glass { position: relative; border-radius: 18px; background: linear-gradient(180deg, rgb(255 255 255 / .045), rgb(255 255 255 / .015)) , var(--d3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 30px 80px -30px rgb(0 0 0 / .8); }
.glass::before { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(160deg, rgb(var(--light) / .45), rgb(255 255 255 / .06) 35%, rgb(255 255 255 / .03) 70%, rgb(255 255 255 / .08));
  -webkit-mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.try__stage { isolation: isolate; grid-column: 7 / span 6; padding: clamp(24px, 3vw, 40px); }
.try__form { display: grid; gap: 22px; }
.try__form fieldset { border: 0; min-width: 0; }
.try__grp { display: grid; gap: 22px; }
.try__mode { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 12px; background: var(--d1); box-shadow: inset 0 1px 2px rgb(0 0 0 / .6); }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; height: 44px; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--mute); transition: color .3s, background-color .4s, box-shadow .4s; }
.seg input:checked + span { color: var(--paper); background: var(--d5); box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), 0 4px 14px rgb(0 0 0 / .5); }
.seg input:focus-visible + span { box-shadow: 0 0 0 1px rgb(var(--light)); }
.fld { position: relative; display: grid; gap: 8px; }
.try__l { font-size: 13px; font-weight: 500; color: var(--silver); letter-spacing: .01em; }
.try__in { width: 100%; font: 400 16px/1.4 "Manrope", sans-serif; color: var(--paper); background: var(--d4); border: 0; border-radius: 10px; padding: 15px 16px;
           box-shadow: inset 0 0 0 1px var(--d6); transition: box-shadow .35s var(--ease-out), background-color .35s; resize: vertical; }
.try__in::placeholder { color: #55554f; }
.try__in:hover { box-shadow: inset 0 0 0 1px #3a3a3a; }
.try__in:focus { outline: none; background: var(--d5); box-shadow: inset 0 0 0 1px rgb(var(--light) / .7), 0 0 0 4px rgb(var(--light) / .08); }
.try__cnt { position: absolute; right: 12px; bottom: 10px; font-size: 11px; color: var(--mute); pointer-events: none; }
.try__ok { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--silver); cursor: pointer; }
.try__ok input { appearance: none; width: 20px; height: 20px; border-radius: 6px; background: var(--d4); box-shadow: inset 0 0 0 1px #3a3a3a; flex: none; cursor: pointer;
                 display: grid; place-items: center; transition: background-color .3s, box-shadow .3s; }
.try__ok input:checked { background: var(--paper); box-shadow: 0 0 12px rgb(var(--light) / .35); }
.try__ok input:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid var(--d1); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg); }
.try__ok input:focus-visible { outline: 1px solid rgb(var(--light)); outline-offset: 3px; }
.try__ok a { color: var(--paper); text-decoration: underline; text-decoration-color: rgb(255 255 255 / .25); text-underline-offset: 3px; }
.try__go { width: 100%; justify-content: space-between; }
.try__err { color: #E9D6AE; font-size: 14px; }
/* ожидание: свечение «думаю» растёт из нуля один раз */
.try__wait { position: relative; display: grid; gap: 28px; }
.try__wait::before { content: ""; position: absolute; left: 50%; top: 40%; width: 360px; height: 220px; margin: -110px 0 0 -180px; z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, rgb(var(--light) / .16), transparent 70%); animation: think .6s var(--ease-out) both; }
@keyframes think { from { transform: scale(0); opacity: 0; } }
.seq { display: grid; gap: 14px; }
.seq li { display: grid; grid-template-columns: 40px 1fr; align-items: baseline; color: var(--mute); transition: color .4s; }
.seq li p { grid-column: 2; font-size: 13px; }
.seq__n { font: 500 13px/1 "Space Grotesk"; }
.seq h3 { font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.seq li.was { color: var(--silver); }
.seq li.on { color: var(--paper); }
.seq li.on .seq__n { color: rgb(var(--light)); }
.try__pulse { display: flex; align-items: center; gap: 16px; }
.try__pulse svg { width: 200px; height: 32px; overflow: visible; }
.try__pulse line { stroke: var(--d6); stroke-width: 1.5; }
.try__pulse .bar line { stroke: var(--silver); stroke-width: 2; }
.try__pulse .imp { stroke: rgb(var(--light)); stroke-width: 2; filter: drop-shadow(0 0 4px rgb(var(--light))); animation: imp 1.6s var(--ease-io) infinite; }
.try__pulse svg[data-m="through"] .imp { animation-name: impT; }
.try__pulse svg[data-m="done"] .imp { animation: impT .9s var(--ease-io) forwards; }
@keyframes imp { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateX(100px); opacity: 0; } }
@keyframes impT { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateX(184px); opacity: 0; } }
.try__word { font-size: 13px; color: rgb(var(--light)); }
.try__say { font-size: 17px; color: var(--paper); min-height: 1.5em; }
.try__say.is-new { animation: sayIn .6s var(--ease-out); }
@keyframes sayIn { from { opacity: 0; filter: blur(6px); } }
.try__late, .try__note, .try__msg { font-size: 14px; color: var(--silver); }
.try__shot { --k: .4; position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: var(--d4); }
.try__shot iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 900px; border: 0; transform: scale(var(--k)); transform-origin: 0 0; opacity: 0; transition: opacity .8s; pointer-events: none; }
.try__shot iframe.ok { opacity: 1; }
.try__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.try__reset { margin-top: 20px; background: none; border: 0; color: var(--mute); font: 500 13px "Manrope"; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- услуги и цены ---------- */
.svc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.svc__card { display: flex; flex-direction: column; gap: 14px; padding: 30px 28px 28px; min-height: 340px; }
.svc__card h3 { font-size: 23px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: var(--white); }
.svc__card p { color: var(--silver); font-size: 15.5px; line-height: 1.55; }
.price { margin-top: auto; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .07); display: grid; gap: 6px; }
.price__v { font-size: clamp(26px, 2.3vw, 34px); font-weight: 600; letter-spacing: -.035em; color: var(--paper); white-space: nowrap; }
.price__v small { font-size: .5em; font-weight: 500; color: var(--silver); letter-spacing: 0; margin-left: 2px; }
.price__t { font-size: 13px; color: var(--mute); font-weight: 500; letter-spacing: .02em; }
.svc__card:first-child .price__v { color: var(--white); text-shadow: 0 0 24px rgb(var(--light) / .25); }
.pay { margin-top: 28px; display: flex; align-items: center; gap: 14px; color: var(--silver); font-size: 16px; }
.pay__dot { width: 7px; height: 7px; border-radius: 2px; background: rgb(var(--light)); box-shadow: 0 0 12px rgb(var(--light) / .9); flex: none; }

/* ---------- как работаем ---------- */
.steps { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.steps::before { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: rgb(255 255 255 / .07); }
.steps::after { content: ""; position: absolute; left: 0; right: 0; top: 23px; height: 1px; background: linear-gradient(90deg, rgb(var(--light) / .2), rgb(var(--light)) 85%, rgb(var(--light) / 0));
  box-shadow: 0 0 10px rgb(var(--light) / .5); transform-origin: left; transform: scaleX(1); }
@supports (animation-timeline: view()) {
  .steps::after { animation: lineGrow linear both; animation-timeline: view(); animation-range: entry 40% cover 55%; }
}
@keyframes lineGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.step { position: relative; padding-right: 28px; }
.step__n { position: relative; z-index: 1; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--d3);
           font: 500 15px/1 "Space Grotesk"; color: var(--paper); box-shadow: inset 0 1px 0 rgb(255 255 255 / .1), inset 0 0 0 1px rgb(255 255 255 / .06); }
.step h3 { margin-top: 32px; font-size: clamp(22px, 1.9vw, 26px); line-height: 1.2; font-weight: 600; letter-spacing: -.02em; color: var(--white); max-width: 16ch; }
.step p { margin-top: 14px; color: var(--silver); max-width: 34ch; }

/* ---------- кто мы ---------- */
.about { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; align-items: end; }
.about__text { grid-column: 1 / span 5; align-self: center; }
.about__text .head__lede { margin-top: 24px; }
.people { grid-column: 7 / span 6; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.person { display: grid; gap: 16px; }
.portrait { position: relative; aspect-ratio: 4 / 5; border-radius: 16px; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(120% 70% at 62% 100%, #1d1b18, var(--d2) 60%), var(--d2);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .08), inset 0 0 0 1px rgb(255 255 255 / .05), 0 30px 60px -30px rgb(0 0 0 / .8); }
.portrait__slit { position: absolute; top: 0; bottom: 0; left: 62%; width: 2px; background: linear-gradient(180deg, transparent, rgb(var(--light) / .9) 30%, rgb(var(--light) / .9) 75%, transparent);
  box-shadow: 0 0 22px 5px rgb(var(--light) / .22), 0 0 70px 16px rgb(var(--light) / .08); }
.portrait--b .portrait__slit { left: 38%; }
.portrait::after { content: ""; position: absolute; inset: 14% 18%; border-radius: 8px;
  -webkit-backdrop-filter: blur(10px) brightness(1.25); backdrop-filter: blur(10px) brightness(1.25);
  background: linear-gradient(100deg, rgb(255 255 255 / .03), rgb(var(--light) / .08) 55%, rgb(255 255 255 / .02));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .3), inset 1px 0 0 rgb(255 255 255 / .1), inset -1px 0 0 rgb(var(--light) / .4), 0 30px 60px rgb(0 0 0 / .55); }
.portrait__mark { position: relative; z-index: 1; width: 34px; height: 38px; color: rgb(255 255 255 / .82); filter: drop-shadow(0 0 10px rgb(var(--light) / .35)); }
.person figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 0 4px; }
.person b { font-size: 22px; font-weight: 600; letter-spacing: -.02em; color: var(--white); }
.person span { font-size: 13px; color: var(--mute); }

/* ---------- вопросы ---------- */
.faq { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.faq .h2 { grid-column: 1 / span 4; align-self: start; position: sticky; top: 120px; }
.faq__list { grid-column: 6 / span 7; border-top: 1px solid rgb(255 255 255 / .08); }
.qa { border-bottom: 1px solid rgb(255 255 255 / .08); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 4px;
              font-size: clamp(18px, 1.5vw, 21px); font-weight: 600; letter-spacing: -.02em; color: var(--paper); transition: color .3s; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary svg { width: 8px; height: 16px; flex: none; color: var(--mute); transition: transform .5s var(--ease-out), color .4s; }
.qa summary:hover svg { color: rgb(var(--light)); }
.qa[open] summary svg { transform: rotate(90deg); color: rgb(var(--light)); }
.qa summary:focus-visible { outline: 1px solid rgb(var(--light)); outline-offset: 4px; border-radius: 4px; }
.qa__a { overflow: hidden; }
.qa__a p { padding: 0 4px 28px; color: var(--silver); max-width: 60ch; }

/* ---------- финал ---------- */
.s-final { background: var(--d0); overflow: hidden; isolation: isolate; padding: calc(var(--sec) * 1.15) 0; }
.final__bg { position: absolute; inset: 0; z-index: -1; }
.final__photo { position: absolute; inset: 0; background: url(../img/hero3d/d_18.webp) 70% 50% / cover no-repeat; filter: brightness(.8); left: 34%;
  -webkit-mask: linear-gradient(90deg, transparent 0%, #000 55%), linear-gradient(0deg, transparent, #000 25%, #000 75%, transparent); -webkit-mask-composite: source-in;
  mask: linear-gradient(90deg, transparent 0%, #000 55%) intersect, linear-gradient(0deg, transparent, #000 25%, #000 75%, transparent); }
.final__slab { display: none; position: absolute; right: 12%; top: 18%; bottom: 14%; width: min(220px, 15vw); border-radius: 8px;
  -webkit-backdrop-filter: blur(10px) brightness(1.25); backdrop-filter: blur(10px) brightness(1.25);
  background: linear-gradient(100deg, rgb(255 255 255 / .03), rgb(var(--light) / .10) 55%, rgb(255 255 255 / .02));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .35), inset 1px 0 0 rgb(255 255 255 / .12), inset -1px 0 0 rgb(var(--light) / .45), 0 40px 80px rgb(0 0 0 / .6); }
.final { position: relative; }
.final .head__lede { margin-top: 26px; }
.final .acts { margin-top: 40px; }
.final__contacts { margin-top: 56px; display: flex; gap: 48px; flex-wrap: wrap; }
.final__contacts li { display: grid; gap: 8px; }
.final__contacts span { font-size: 12px; color: var(--mute); letter-spacing: .02em; }

/* ---------- подвал ---------- */
.foot { background: var(--d0); padding: 72px 0 34px; border-top: 1px solid rgb(255 255 255 / .05); }
.foot__in { display: grid; grid-template-columns: repeat(12, 1fr); gap: 12px; }
.foot__brand { grid-column: 1 / span 4; display: grid; gap: 16px; align-content: start; }
.foot__brand img { height: 17px; width: auto; }
.foot__brand p { color: var(--mute); font-size: 14px; }
.foot__nav { grid-column: 6 / span 3; display: grid; gap: 10px; font-size: 14px; color: var(--silver); align-content: start; }
.foot__nav a { transition: color .3s; width: fit-content; }
.foot__nav a:hover { color: var(--paper); }
.foot__contact { grid-column: 9 / span 4; display: grid; gap: 14px; justify-items: start; font-size: 14px; align-content: start; }
.foot__base { margin-top: 64px; padding-top: 22px; border-top: 1px solid rgb(255 255 255 / .06); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
              font-size: 12px; color: var(--mute); letter-spacing: .02em; }
.foot__base a:hover { color: var(--paper); }

/* липкая панель на телефоне */
.dock { display: none; }

/* ---------- планшет и телефон ---------- */
@media (max-width: 1100px) {
  .svc { grid-template-columns: repeat(2, 1fr); }
  .bento .case--sm { grid-column: span 12; }
  .case--sm .case__media { width: 34%; }
  .case--big { grid-column: span 6; }
  .case--big:first-child { grid-column: span 12; }
}
@media (max-width: 860px) {
  :root { --hdr: 68px; }
  .nav, .top .b-sm { display: none; }
  .burger { display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; background: rgb(255 255 255 / .06); cursor: pointer;
            border: 0; color: var(--paper); box-shadow: inset 0 1px 0 rgb(255 255 255 / .12); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
  .burger span, .burger span::before { display: block; width: 18px; height: 1.5px; background: currentColor; position: relative; transition: transform .4s var(--ease-out); }
  .burger span::before { content: ""; position: absolute; top: 6px; }
  .burger span { transform: translateY(-3px); }
  .burger[aria-expanded="true"] span { transform: rotate(45deg); }
  .burger[aria-expanded="true"] span::before { transform: translateY(-6px) rotate(-90deg); }
  .copy { align-self: end; padding: 0 0 26px; }
  h1 { font-size: clamp(40px, 11.6vw, 56px); }
  .lede { margin-top: 18px; font-size: 16.5px; }
  .acts { margin-top: 26px; flex-direction: column; align-items: stretch; gap: 10px; }
  .btn { justify-content: space-between; height: 56px; }
  .note { margin: -2px 0 6px 2px; order: 1; } .acts .b-main { order: 0; } .acts .b-glass { order: 2; }
  .shade { background: linear-gradient(0deg, rgb(5 5 5 / .96) 0%, rgb(5 5 5 / .85) 40%, rgb(5 5 5 / 0) 62%),
                       linear-gradient(180deg, rgb(5 5 5 / .5) 0%, rgb(5 5 5 / 0) 14%); }
  .clients { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 0 24px; }
  .clients ul { flex-wrap: wrap; justify-content: flex-start; gap: 14px 22px; }
  .breath { width: 220px; margin-left: -110px; }

  .head { display: block; }
  .head .head__lede { margin-top: 18px; }
  .js .up { -webkit-mask: none; mask: none; }
  .bento { display: flex; flex-direction: column; gap: 12px; }
  .case--sm { flex-direction: column; }
  .case--sm .case__media { width: 100%; }
  .case--sm .case__body { padding: 20px 10px 10px; }
  .case__body { padding: 22px 10px 10px; }
  .after { flex-direction: column; align-items: stretch; }
  .after__acts { flex-direction: column; align-items: stretch; gap: 18px; }
  .after__acts .lnk { align-self: flex-start; }
  .demo, .about, .faq, .foot__in { display: block; }
  .demo__head { position: static; margin-bottom: 32px; }
  .demo__facts li { padding: 14px 12px; }
  .demo__facts b { font-size: 20px; }
  .svc { grid-template-columns: 1fr; }
  .svc__card { min-height: 0; }
  .steps { grid-template-columns: 1fr; gap: 40px; padding-left: 0; }
  .steps::before, .steps::after { left: 23px; right: auto; top: 0; bottom: 0; width: 1px; height: auto; }
  .steps::after { background: linear-gradient(180deg, rgb(var(--light) / .2), rgb(var(--light)) 85%, rgb(var(--light) / 0)); transform-origin: top; }
  @supports (animation-timeline: view()) { .steps::after { animation-name: lineGrowV; } }
  .step { display: grid; grid-template-columns: 46px 1fr; column-gap: 20px; padding: 0; }
  .step h3 { margin-top: 10px; grid-column: 2; } .step p { grid-column: 2; }
  .step__n { grid-row: 1 / span 2; }
  .people { margin-top: 36px; }
  .person figcaption { flex-direction: column; gap: 2px; }
  .person b { font-size: 19px; }
  .faq .h2 { position: static; margin-bottom: 28px; }
  .qa summary { padding: 22px 2px; }
  .final__slab { right: 10%; width: 22vw; top: 5%; bottom: auto; height: 22%; }
  .final__photo { -webkit-mask: linear-gradient(180deg, #000 0%, transparent 60%); mask: linear-gradient(180deg, #000 0%, transparent 60%); background-image: url(../img/hero3d/m_08.webp); background-position: 50% 0%; left: 0; }
  .s-final .h2 { margin-top: 20vh; }
  .final__contacts { gap: 24px; }
  .foot__nav, .foot__contact { margin-top: 36px; }
  .foot { padding-bottom: 110px; }
  .dock { display: block; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40;
          transform: translateY(140%); transition: transform .6s var(--ease-out); }
  .dock .btn { width: 100%; box-shadow: inset 0 1px 0 #fff, 0 18px 40px rgb(0 0 0 / .7), 0 16px 40px -18px rgb(var(--light) / .45); }
  .dock.on { transform: none; }
}
@keyframes lineGrowV { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv, .js .up, .js .blur-in { opacity: 1 !important; filter: none !important; transform: none !important; -webkit-mask: none !important; mask: none !important; }
  .b-glass.go { animation: none; } .b-glass:hover { animation: none; --trace: 360deg; }
  .stage.ready .breath { animation: none; opacity: .6; }
  .steps::after { animation: none !important; transform: none; }
  .case:hover .case__media img { transform: none; }
  .intro { display: none !important; }
  .try__wait::before, .try__pulse .imp { animation: none; }
}
