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

:root {
  /* Титан и фарфор — тёмный режим (по умолчанию) */
  color-scheme: dark;
  --ink: #0b0d0f;
  --graphite: #13171a;
  --graphite-2: #1a1f23;
  --line: #262d32;
  --porcelain: #ecebe6;
  --mist: #959ea4;
  --cure: #7fcbef;
  --cure-ink: #06222f;
  --cure-hover: #a3dbf5;
  --glass: rgb(236 235 230 / 0.06);
  --glass-strong: rgb(236 235 230 / 0.12);
  --glass-border: rgb(236 235 230 / 0.16);
  --glass-border-soft: rgb(236 235 230 / 0.08);
  --glass-border-strong: rgb(236 235 230 / 0.3);
  --pill: rgb(236 235 230 / 0.07);
  --pill-ring: rgb(236 235 230 / 0.09);
  --shade: rgb(0 0 0 / 0.55);
  --shade-strong: rgb(0 0 0 / 0.7);
  --overlay: rgb(11 13 15 / 0.78);
  --overlay-mid: rgb(11 13 15 / 0.6);
  --scrim: rgb(5 6 7 / 0.86);
  --scroll-thumb: #2c3439;
  --scroll-thumb-hover: #3a444a;
  --surface-deep: #07090b;
  --hero-glow: rgb(127 203 239 / 0.09);
  --cure-glow: rgb(127 203 239 / 0.6);
  --cure-soft: rgb(127 203 239 / 0.1);
  --grain-opacity: 0.05;
  --stage-bg-filter: saturate(0.5) brightness(0.4) contrast(1.1);
  --stage-cut-gray-filter: grayscale(1) brightness(0.62) contrast(1.05);
  --nav-scrolled-bg: color-mix(in srgb, var(--ink) 72%, transparent);

  --font-display: 'Unbounded', 'Onest', system-ui, sans-serif;
  --font-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px; --s-10: 144px;

  --r-media: 6px;
  --r-pill: 999px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 60px;
  --wrap: 1360px;
  --gutter: clamp(20px, 4vw, 48px);

  --z-nav: 40;
  --z-grain: 60;
  --z-skip: 80;
}

html[data-theme="light"] {
  /* Дневной 43 этаж: фарфор / титан / лампа — больше слоёв */
  color-scheme: light;
  --ink: #e9e3d7;
  --graphite: #ddd4c6;
  --graphite-2: #cfc5b5;
  --line: #b3a894;
  --porcelain: #101418;
  --mist: #465057;
  --cure: #0d6890;
  --cure-ink: #f7fcfe;
  --cure-hover: #09506e;
  --glass: rgb(255 252 247 / 0.5);
  --glass-strong: rgb(255 252 247 / 0.82);
  --glass-border: rgb(20 24 28 / 0.12);
  --glass-border-soft: rgb(20 24 28 / 0.08);
  --glass-border-strong: rgb(13 104 144 / 0.32);
  --pill: rgb(13 104 144 / 0.1);
  --pill-ring: rgb(13 104 144 / 0.18);
  --shade: rgb(42 34 26 / 0.12);
  --shade-strong: rgb(42 34 26 / 0.24);
  --overlay: rgb(233 227 215 / 0.92);
  --overlay-mid: rgb(233 227 215 / 0.74);
  --scrim: rgb(16 20 24 / 0.5);
  --scroll-thumb: #a89e8c;
  --scroll-thumb-hover: #8c8270;
  --surface-deep: #cfc5b5;
  --hero-glow: rgb(13 104 144 / 0.24);
  --cure-glow: rgb(13 104 144 / 0.48);
  --cure-soft: rgb(13 104 144 / 0.18);
  --grain-opacity: 0.075;
  /* Ночной кадр → дневной фарфор: поднять тени, убрать «чёрную дыру» */
  --stage-bg-filter: saturate(0.4) brightness(1.18) contrast(0.92) sepia(0.1);
  --stage-cut-gray-filter: grayscale(0.4) brightness(1.06) contrast(0.98) sepia(0.05);
  --nav-scrolled-bg: color-mix(in srgb, #faf6ee 74%, transparent);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + var(--s-4)); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ink);
  color: var(--porcelain);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: var(--grain-opacity);
  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");
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
ul { margin: 0; padding: 0; list-style: none; }

:focus-visible { outline: 2px solid var(--cure); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--cure); color: var(--cure-ink); }
html { scrollbar-color: var(--scroll-thumb) var(--ink); accent-color: var(--cure); caret-color: var(--cure); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 10px; border: 2px solid var(--ink); }
::-webkit-scrollbar-thumb:hover { background: var(--scroll-thumb-hover); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: fixed; top: var(--s-3); left: var(--s-3); z-index: var(--z-skip);
  padding: var(--s-2) var(--s-4); background: var(--cure); color: var(--cure-ink);
  border-radius: var(--r-pill); text-decoration: none; font-weight: 500;
  transform: translateY(-200%);
}
.skip:focus-visible { transform: none; }

.icon { width: 1.15em; height: 1.15em; flex: none; fill: currentColor; }

/* ---------- Защита медиа от сохранения ---------- */
.protected { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.protected img, .protected video {
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  user-select: none;
  pointer-events: none;
}

/* ---------- Типографика ---------- */
.h2 {
  font-family: var(--font-display);
  font-weight: 350;
  font-size: clamp(2rem, 4.4vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.h3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  height: 44px; padding: 0 var(--s-5);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  font-size: 15px; font-weight: 500; line-height: 1;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out), border-color .25s var(--ease-out), transform .15s var(--ease-out);
}
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--cure); color: var(--cure-ink); }
.btn--primary:hover { background: var(--cure-hover); }
.btn--ghost { border-color: var(--line); color: var(--porcelain); }
.btn--ghost:hover { border-color: var(--mist); }
.btn--lg { height: 52px; padding: 0 var(--s-6); font-size: 16px; }
.btn--xl { height: 60px; padding: 0 var(--s-7); font-size: 17px; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out), transform .15s var(--ease-out);
}
.icon-btn:hover { border-color: var(--mist); background: var(--graphite); }
.icon-btn:active { transform: scale(0.94); }

.link {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--cure); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--cure) 40%, transparent);
  padding-bottom: 2px;
  transition: border-color .2s;
}
.link:hover { border-color: var(--cure); }

/* ---------- Навигация ---------- */
.nav {
  position: fixed;
  top: max(var(--s-3), env(safe-area-inset-top, 0px));
  left: 0; right: 0; z-index: var(--z-nav);
  height: var(--nav-h);
  pointer-events: none;
}
.nav__inner {
  position: relative;
  pointer-events: auto;
  width: min(100% - 24px, 1240px);
  height: 100%;
  margin-inline: auto;
  padding: 0 var(--s-2) 0 var(--s-3);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--s-4);
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  transition: background-color .4s var(--ease-out), border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.nav.is-scrolled .nav__inner {
  background: var(--nav-scrolled-bg);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  border-color: var(--glass-border-soft);
  box-shadow: 0 18px 40px -18px var(--shade);
}
.nav__brand { justify-self: start; display: inline-flex; align-items: center; gap: var(--s-3); text-decoration: none; }
.nav__mono {
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  font-family: var(--font-display); font-size: 12px; font-weight: 500; letter-spacing: 0.02em;
  transition: border-color .3s var(--ease-out), color .3s var(--ease-out);
}
.nav__brand:hover .nav__mono { border-color: var(--cure); color: var(--cure); }
.nav__name { font-family: var(--font-display); font-size: 14px; font-weight: 400; letter-spacing: -0.01em; }
.nav__links { position: relative; display: flex; gap: 2px; padding: 4px; }
.nav__links a {
  position: relative; z-index: 1;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 14.5px; color: var(--mist); text-decoration: none;
  transition: color .25s var(--ease-out);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--porcelain); }
.nav__pill {
  position: absolute; top: 4px; bottom: 4px; left: 0;
  width: var(--pill-w, 0px);
  transform: translateX(var(--pill-x, 0px));
  border-radius: var(--r-pill);
  background: var(--pill);
  box-shadow: inset 0 0 0 1px var(--pill-ring);
  opacity: 0;
  transition: transform .45s var(--ease-out), width .45s var(--ease-out), opacity .3s var(--ease-out);
  pointer-events: none;
}
.nav__pill.is-visible { opacity: 1; }
.nav__actions { justify-self: end; }
.nav__toggle { display: none; }
.nav__progress {
  position: absolute; left: 32px; right: 32px; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cure) 20%, var(--cure) 80%, transparent);
  transform-origin: left center;
  transform: scaleX(0);
  opacity: 0;
  transition: opacity .4s var(--ease-out);
  pointer-events: none;
}
.nav.is-scrolled .nav__progress { opacity: 0.8; }
@supports (animation-timeline: scroll()) {
  .nav__progress { animation: nav-progress linear both; animation-timeline: scroll(root); }
}
@supports not (animation-timeline: scroll()) {
  .nav__progress { display: none; }
}
@keyframes nav-progress { to { transform: scaleX(1); } }

@media (max-width: 1080px) {
  .nav__links a { padding: 8px 10px; font-size: 14px; }
  .nav__name { display: none; }
}
@media (max-width: 960px) {
  .nav__inner { grid-template-columns: 1fr auto auto; gap: var(--s-2); }
  .nav__name { display: inline; }
  .nav__toggle {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; border-radius: var(--r-pill);
    border: 1px solid var(--glass-border); background: transparent; cursor: pointer;
  }
  .nav__pill { display: none; }
  .nav__links {
    position: absolute; top: calc(100% + var(--s-2)); left: 0; right: 0;
    flex-direction: column; gap: 0;
    padding: var(--s-3) var(--s-5) var(--s-5);
    border-radius: 24px;
    background: var(--graphite);
    border: 1px solid var(--glass-border-soft);
    box-shadow: 0 24px 60px -20px var(--shade-strong);
    opacity: 0; visibility: hidden; transform: translateY(-8px) scale(0.98);
    transform-origin: top center;
    transition: opacity .25s var(--ease-out), transform .3s var(--ease-out), visibility 0s linear .3s;
  }
  .nav__links a {
    padding: var(--s-4) 0; border-radius: 0;
    font-size: 22px; color: var(--porcelain);
    font-family: var(--font-display); font-weight: 350; letter-spacing: -0.02em;
  }
  .nav__links a + a { border-top: 1px solid var(--line); }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav.is-open .nav__inner { background: var(--graphite); border-color: var(--glass-border-soft); }
}
@media (max-width: 520px) {
  .nav { top: var(--s-2); }
  .nav__inner { width: calc(100% - 16px); }
  .nav__name { display: none; }
  .nav__cta { height: 40px; padding: 0 var(--s-4); }
  .theme-toggle { width: 40px; height: 40px; }
  .nav__cta .icon { display: none; }
}

.btn--glass {
  color: var(--porcelain);
  background: var(--glass);
  border-color: var(--glass-border);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.btn--glass:hover { background: var(--glass-strong); border-color: var(--glass-border-strong); }

/* ---------- Первый экран: фон, имя, силуэт ---------- */
.stage {
  --edge: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  position: relative;
  isolation: isolate;
  height: 100svh;
  min-height: 680px;
  max-height: 1120px;
  overflow: hidden;
}
.stage::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(42% 58% at 72% 48%, var(--hero-glow), transparent 70%);
  pointer-events: none;
}
.stage__scene {
  position: absolute; top: 0; bottom: 0;
  right: max(0px, calc((100vw - 1760px) / 2));
  height: 100%;
  aspect-ratio: 1200 / 1600;
  pointer-events: none;
}
.stage__inner { position: absolute; inset: 0; display: block; }
.stage__scene img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  object-position: 58% 18%;
}

.stage__bg { z-index: 1; }
.stage__bg img {
  filter: var(--stage-bg-filter);
  -webkit-mask-image: linear-gradient(90deg, transparent 2%, #000 42%), linear-gradient(0deg, transparent 4%, #000 40%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 2%, #000 42%), linear-gradient(0deg, transparent 4%, #000 40%);
  mask-composite: intersect;
}

.stage__name {
  position: absolute; z-index: 2;
  left: var(--edge);
  top: clamp(110px, 19svh, 220px);
  margin: 0 0 0 -0.04em;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: min(11.6vw, 21svh, 13rem);
  line-height: 0.86;
  letter-spacing: -0.065em;
  white-space: nowrap;
  pointer-events: none;
}
.stage__name .stage__inner { position: static; }
.stage__name .line { display: block; overflow: hidden; padding: 0.02em 0.04em 0.06em 0; }
.stage__name .line > span { display: inline-block; }
.stage__name .line--shift { padding-left: 0.9em; }
.stage__name .line--shift > span { color: var(--mist); }

.stage__cut { z-index: 3; --scan: 100%; }
.stage__cut-gray { filter: var(--stage-cut-gray-filter); }
.stage__cut-color {
  clip-path: inset(0 calc(100% - var(--scan)) 0 0);
  filter: saturate(0.95) contrast(1.04);
}
.stage__scan {
  position: absolute; top: 0; bottom: 0; left: var(--scan);
  width: 2px; margin-left: -1px;
  background: var(--cure);
  box-shadow: 0 0 18px 2px var(--cure-glow), 0 0 60px 8px color-mix(in srgb, var(--cure) 25%, transparent);
  opacity: 0;
}

.stage__fade {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 4;
  height: 42%;
  background: linear-gradient(0deg, var(--ink) 6%, var(--overlay) 40%, transparent);
  pointer-events: none;
}

.stage__copy {
  position: absolute; z-index: 5;
  left: var(--edge);
  bottom: clamp(36px, 7svh, 80px);
  width: min(520px, 44vw);
  display: grid; gap: var(--s-5);
}
.stage__role {
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(1rem, 1.35vw, 1.2rem); letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: var(--s-3);
}
.stage__role::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; flex: none;
  background: var(--cure);
  box-shadow: 0 0 12px var(--cure);
}
.stage__lead { color: var(--mist); font-size: clamp(1.02rem, 1.25vw, 1.15rem); line-height: 1.55; max-width: 38ch; }
.stage__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }

.stage__place {
  position: absolute; z-index: 5;
  right: var(--edge);
  bottom: clamp(36px, 7svh, 80px);
  display: flex; gap: var(--s-2);
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.5; color: var(--mist);
}
.stage__place .icon { color: var(--cure); margin-top: 2px; }

@media (max-width: 1100px) and (min-width: 861px) {
  .stage__scene { right: -12%; }
}

@media (max-width: 860px) {
  .stage {
    --stage-top: 0px;
    height: auto;
    min-height: 0;
    max-height: none;
    padding-bottom: var(--s-8);
    overflow: hidden;
  }
  .stage::before {
    background: radial-gradient(70% 40% at 58% 28%, var(--cure-soft), transparent 70%);
  }
  /* Нежный блюр сверху поверх фото (фото касается края) */
  .stage::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: calc(56px + env(safe-area-inset-top, 0px));
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--ink) 18%, transparent) 0%,
      transparent 100%
    );
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
  }
  .stage__scene {
    top: 0;
    bottom: auto;
    left: auto;
    right: -10vw;
    width: 120vw;
    height: 128vw;
    aspect-ratio: auto;
  }
  .stage__scene img {
    /* Кадр до самого верха экрана */
    object-position: 54% 0%;
    transform: translate3d(0, -22%, 0) scale(1.18);
    transform-origin: 50% 0%;
  }
  .stage__bg img {
    /* На мобиле фон чуть светлее у верха — видно под блюром */
    filter: saturate(0.55) brightness(0.58) contrast(1.06);
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 55%, transparent 100%);
  }
  .stage__name {
    z-index: 5;
    left: var(--gutter);
    right: var(--gutter);
    top: calc(74vw + env(safe-area-inset-top, 0px));
    margin: 0;
    font-size: clamp(2.8rem, 15vw, 4.2rem);
    line-height: 0.88;
    letter-spacing: -0.055em;
    white-space: nowrap;
  }
  .stage__name .line {
    overflow: visible;
    padding-right: 0.04em;
  }
  .stage__name .line--shift {
    padding-left: 0.32em;
  }
  .stage__fade {
    top: 54vw;
    bottom: auto;
    height: 70vw;
    background: linear-gradient(0deg, var(--ink) 26%, transparent);
  }
  .stage__copy {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    margin-top: calc(24px + env(safe-area-inset-top, 0px) + 128vw);
    padding-inline: var(--gutter);
    gap: var(--s-4);
  }
  .stage__place {
    position: relative;
    right: auto;
    bottom: auto;
    margin-top: var(--s-6);
    padding-inline: var(--gutter);
  }
}

@media (max-width: 360px) {
  .stage__name {
    font-size: clamp(2.45rem, 13.5vw, 3.5rem);
  }
  .stage__name .line--shift {
    padding-left: 0.2em;
  }
}

/* Светлый + мобиле: органика выреза (верх/блюр — общие адаптивные правила) */
@media (max-width: 860px) {
  html[data-theme="light"] .stage::after {
    left: 0;
    height: calc(56px + env(safe-area-inset-top, 0px));
    background: linear-gradient(
      180deg,
      color-mix(in srgb, var(--ink) 22%, transparent) 0%,
      transparent 100%
    );
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  html[data-theme="light"] .stage__scene img {
    object-position: 54% 0%;
    transform: translate3d(0, -22%, 0) scale(1.18);
    transform-origin: 50% 0%;
  }
  html[data-theme="light"] .stage__bg img {
    opacity: 0.7;
    -webkit-mask-image:
      linear-gradient(180deg, #000 0%, #000 52%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
    mask-image:
      linear-gradient(180deg, #000 0%, #000 52%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 22%, #000 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  html[data-theme="light"] .stage__cut {
    -webkit-mask-image:
      linear-gradient(180deg, #000 0%, #000 60%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 8%, #000 100%);
    mask-image:
      linear-gradient(180deg, #000 0%, #000 60%, transparent 100%),
      linear-gradient(90deg, transparent 0%, #000 8%, #000 100%);
    -webkit-mask-composite: source-in;
    mask-composite: intersect;
  }
  html[data-theme="light"] .stage__fade {
    top: 50vw;
    height: 76vw;
    background: linear-gradient(0deg, var(--ink) 20%, rgb(233 227 215 / 0.65) 52%, transparent 100%);
  }
}

/* ---------- Факты ---------- */
.facts { padding-block: var(--s-4) var(--s-9); }
.facts__list {
  margin: 0;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  border-top: 1px solid var(--line);
}
.fact { padding: var(--s-6) var(--s-5) 0 0; display: grid; gap: var(--s-3); align-content: start; }
.fact + .fact { padding-left: var(--s-5); border-left: 1px solid var(--line); }
.fact__value {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.4rem, 4.6vw, 4.25rem); line-height: 1; letter-spacing: -0.04em;
}
.fact:first-child .fact__value { color: var(--cure); }
.fact__label { margin: 0; color: var(--mist); font-size: 15px; max-width: 22ch; line-height: 1.45; }

@media (max-width: 860px) {
  .facts__list { grid-template-columns: 1fr 1fr; }
  .fact, .fact + .fact { padding: var(--s-5) var(--s-4) var(--s-5) 0; border-left: 0; }
  .fact:nth-child(even) { padding-left: var(--s-4); border-left: 1px solid var(--line); }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- До и после ---------- */
.works { padding-block: var(--s-9); background: linear-gradient(180deg, var(--ink), var(--graphite) 30%, var(--graphite) 70%, var(--ink)); }
.works__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-6); flex-wrap: wrap; }
.works__title {
  display: flex; align-items: center; gap: 0.16em;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(3.2rem, 10vw, 9rem);
  line-height: 0.95; letter-spacing: -0.06em;
}
.works__title > span:first-child { color: var(--mist); }
.works__bar {
  display: block; flex: none;
  width: 3px; height: 0.8em; border-radius: 2px;
  background: var(--cure);
  box-shadow: 0 0 20px 2px var(--cure-glow), 0 0 60px 6px color-mix(in srgb, var(--cure) 20%, transparent);
}
.works__hint { display: inline-flex; align-items: center; gap: var(--s-2); font-family: var(--font-mono); font-size: 13px; color: var(--mist); }
.works__hint .icon { color: var(--cure); }

.ba {
  --pos: 50%;
  position: relative;
  aspect-ratio: var(--ratio, 2 / 1);
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--ink);
  touch-action: pan-y;
  cursor: ew-resize;
  isolation: isolate;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .35s var(--ease-out), filter .35s var(--ease-out); }
.ba__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba.is-swapping .ba__img { opacity: 0; filter: blur(8px); }

.ba__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; margin-left: -1px;
  background: var(--cure);
  box-shadow: 0 0 12px 1px var(--cure-glow), 0 0 42px 6px color-mix(in srgb, var(--cure) 18%, transparent);
  pointer-events: none;
  z-index: 2;
}
.ba__knob {
  position: absolute; top: 50%; left: 50%;
  width: 52px; height: 52px; margin: -26px 0 0 -26px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--ink) 55%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--cure);
  color: var(--cure);
  transition: transform .2s var(--ease-out);
}
.ba.is-dragging .ba__knob { transform: scale(1.12); }
.ba__tag {
  position: absolute; top: var(--s-4); z-index: 1;
  padding: 6px var(--s-3);
  border-radius: var(--r-pill);
  background: var(--overlay-mid);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em;
  pointer-events: none;
  transition: opacity .2s;
}
.ba__tag--before { left: var(--s-4); }
.ba__tag--after { right: var(--s-4); color: var(--cure); }
.ba__range {
  position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none;
  left: var(--pos); bottom: 0;
}
.ba:has(.ba__range:focus-visible) { outline: 2px solid var(--cure); outline-offset: 4px; }

.ba-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-5); }
.ba-bar__title { font-family: var(--font-display); font-weight: 350; font-size: clamp(1.1rem, 1.8vw, 1.4rem); letter-spacing: -0.02em; }
.ba-bar__nav { display: flex; gap: var(--s-2); }

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(128px, 1fr);
  gap: var(--s-3);
  margin-top: var(--s-5);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: var(--s-2);
}
.rail::-webkit-scrollbar { display: none; }
.rail__item {
  position: relative;
  scroll-snap-align: start;
  aspect-ratio: 2 / 1;
  padding: 0;
  border: 0;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--ink);
  cursor: pointer;
  opacity: 0.45;
  transition: opacity .25s var(--ease-out);
}
.rail__item img { width: 100%; height: 100%; object-fit: cover; }
.rail__before { position: absolute; inset: 0; opacity: 0; transition: opacity .35s var(--ease-out); }
.rail__item:hover .rail__before { opacity: 1; }
.rail__item::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .25s var(--ease-out);
}
.rail__item:hover { opacity: 0.8; }
.rail__item[aria-pressed="true"] { opacity: 1; }
.rail__item[aria-pressed="true"]::after { box-shadow: inset 0 0 0 2px var(--cure); }

.stages { margin-top: var(--s-9); display: grid; gap: var(--s-5); }
.stages__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: var(--s-4);
}
.step {
  position: relative;
  display: grid;
  gap: var(--s-3);
  align-content: start;
  padding: 0; border: 0; background: none;
  text-align: left; cursor: zoom-in;
}
.step img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--r-media);
  transition: transform .6s var(--ease-out), filter .6s var(--ease-out);
  filter: saturate(0.92);
}
.step:hover img { transform: scale(1.015); filter: saturate(1); }
.step__caption { font-size: 15px; color: var(--mist); line-height: 1.45; max-width: 36ch; }
.step--tall { grid-row: span 1; }
.step:not(.step--tall) { margin-top: var(--s-9); }

@media (max-width: 860px) {
  .steps__grid { grid-template-columns: 1fr 1fr; }
  .step--tall { grid-column: 1 / -1; }
  .step:not(.step--tall) { margin-top: 0; }
  .ba { --ratio: 4 / 3 !important; }
  .ba__knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* ---------- О враче ---------- */
.about {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: var(--s-9);
  align-items: center;
  padding-block: var(--s-9);
}
.about__media { position: relative; padding-right: 22%; padding-bottom: 18%; }
.about__img { border-radius: var(--r-media); object-fit: cover; }
.about__img--main { width: 100%; aspect-ratio: 4 / 5; }
.about__img--side {
  position: absolute; right: 0; bottom: 0;
  width: 44%; aspect-ratio: 3 / 4;
  outline: 8px solid var(--ink);
}
.about__copy { display: grid; gap: var(--s-6); }
.about__text { color: var(--mist); font-size: 18px; max-width: 52ch; }
.quote { margin: 0; padding-top: var(--s-5); border-top: 1px solid var(--line); display: grid; gap: var(--s-4); }
.quote p { font-family: var(--font-display); font-weight: 300; font-size: clamp(1.35rem, 2.2vw, 1.85rem); line-height: 1.32; letter-spacing: -0.025em; text-wrap: balance; }
.quote__mark { display: inline-block; margin-left: -0.55em; width: 0.55em; color: var(--cure); }
.quote footer { font-family: var(--font-mono); font-size: 13px; color: var(--mist); }
.brands { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.brands li {
  padding: var(--s-2) var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 14px;
}

@media (max-width: 960px) {
  .about { grid-template-columns: 1fr; gap: var(--s-7); padding-block: var(--s-9) var(--s-8); }
  .about__media { max-width: 560px; }
}

/* ---------- Видео ---------- */
.video { padding-block: var(--s-9); border-top: 1px solid var(--line); }
.video__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-5); margin-bottom: var(--s-6); }
.video__nav { display: flex; gap: var(--s-2); }
.reel {
  --reel-h: clamp(360px, 58vh, 560px);
  display: flex;
  gap: var(--s-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  padding-bottom: var(--s-3);
  scrollbar-width: none;
}
.reel::-webkit-scrollbar { display: none; }
.reel__item { flex: none; scroll-snap-align: start; }
.reel__btn {
  position: relative;
  display: block;
  height: var(--reel-h);
  aspect-ratio: var(--ar);
  max-width: min(84vw, 860px);
  padding: 0; border: 0;
  border-radius: var(--r-media);
  overflow: hidden;
  background: var(--graphite);
  cursor: pointer;
}
.reel__btn video, .reel__btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__btn video { opacity: 0; transition: opacity .5s var(--ease-out); }
.reel__btn.is-playing video { opacity: 1; }
.reel__btn::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, var(--overlay));
  pointer-events: none;
}
.reel__meta {
  position: absolute; left: var(--s-4); right: var(--s-4); bottom: var(--s-4); z-index: 1;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.reel__play {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: var(--r-pill);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border-strong);
  transition: background-color .25s var(--ease-out), color .25s var(--ease-out);
}
.reel__btn:hover .reel__play, .reel__btn:focus-visible .reel__play { background: var(--cure); color: var(--cure-ink); border-color: var(--cure); }
.reel__time { font-family: var(--font-mono); font-size: 12px; color: var(--porcelain); }

@media (max-width: 640px) {
  .reel { --reel-h: 420px; }
}

/* ---------- Услуги ---------- */
.services {
  position: relative;
  padding-block: var(--s-9);
  border-top: 1px solid var(--line);
  background: radial-gradient(50% 40% at 85% 0%, var(--cure-soft), transparent 70%);
}
.services__head {
  display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-6);
  margin-bottom: var(--s-8);
}
.services__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 7.5rem);
  line-height: 0.98; letter-spacing: -0.06em;
}
.services__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.services__title .line > span { display: inline-block; }
.services__title .line + .line { padding-left: 0.9em; }
.services__title .line + .line > span { color: var(--mist); }
.services__side { max-width: 34ch; padding-bottom: var(--s-3); }
.services__note { color: var(--mist); font-size: 15px; line-height: 1.55; }

.svc-list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.svc {
  --mx: 50%; --my: 50%;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 140px 15rem 48px;
  align-items: center;
  gap: var(--s-6);
  padding: var(--s-6) var(--s-5);
  border-bottom: 1px solid var(--line);
}
.svc::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(420px circle at var(--mx) var(--my), var(--hero-glow), transparent 70%),
    var(--graphite);
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.svc::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, var(--cure), color-mix(in srgb, var(--cure) 20%, transparent) 70%, transparent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .7s var(--ease-out);
}
.svc:hover::before, .svc:focus-within::before { opacity: 1; }
.svc:hover::after, .svc:focus-within::after { transform: scaleX(1); }

.svc__index { font-family: var(--font-mono); font-size: 13px; color: var(--mist); transition: color .3s var(--ease-out); }
.svc__body { display: grid; gap: var(--s-2); transition: transform .5s var(--ease-out); }
.svc__name {
  font-family: var(--font-display); font-weight: 350;
  font-size: clamp(1.2rem, 2vw, 1.75rem);
  line-height: 1.2; letter-spacing: -0.025em;
}
.svc__link { text-decoration: none; }
.svc__link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.svc__link:focus-visible { outline: none; }
.svc:has(.svc__link:focus-visible) { outline: 2px solid var(--cure); outline-offset: -2px; border-radius: var(--r-media); }
.svc__desc { color: var(--mist); font-size: 15.5px; line-height: 1.5; max-width: 52ch; }
.svc__cat {
  justify-self: start;
  padding: 5px var(--s-3);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-family: var(--font-mono); font-size: 12px; color: var(--mist);
  white-space: nowrap;
}
.svc__price {
  justify-self: end;
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.6rem, 2.8vw, 2.6rem);
  line-height: 1; letter-spacing: -0.04em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  transition: color .3s var(--ease-out);
}
.svc__from { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; color: var(--mist); vertical-align: 0.5em; margin-right: 2px; }
.svc__go {
  display: grid; place-items: center;
  width: 48px; height: 48px; border-radius: var(--r-pill);
  border: 1px solid var(--line);
  transition: background-color .3s var(--ease-out), border-color .3s var(--ease-out), color .3s var(--ease-out), transform .5s var(--ease-out);
}
.svc:hover .svc__index, .svc:focus-within .svc__index { color: var(--cure); }
.svc:hover .svc__body, .svc:focus-within .svc__body { transform: translateX(8px); }
.svc:hover .svc__price, .svc:focus-within .svc__price { color: var(--cure); }
.svc:hover .svc__go, .svc:focus-within .svc__go { background: var(--cure); border-color: var(--cure); color: var(--cure-ink); transform: rotate(45deg); }

.services__foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: var(--s-5);
  margin-top: var(--s-7);
  padding: var(--s-5) var(--s-5) var(--s-5) var(--s-6);
  border-radius: 20px;
  background: var(--graphite);
}
.services__foot p { color: var(--mist); font-size: 15.5px; max-width: 52ch; }

@media (max-width: 1100px) {
  .svc { grid-template-columns: 40px minmax(0, 1fr) 12rem 48px; }
  .svc__cat { display: none; }
}
@media (max-width: 720px) {
  .services__title .line + .line { padding-left: 0.5em; }
  .services__head { margin-bottom: var(--s-6); }
  .svc {
    grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-areas: "idx go" "body body" "price price";
    gap: var(--s-3);
    padding: var(--s-5) 0;
  }
  .svc::before { inset: 0 calc(var(--gutter) * -1); }
  .svc__index { grid-area: idx; }
  .svc__go { grid-area: go; width: 44px; height: 44px; }
  .svc__body { grid-area: body; }
  .svc__price { grid-area: price; justify-self: start; margin-top: var(--s-2); }
  .svc:hover .svc__body { transform: none; }
  .services__foot { padding: var(--s-5); }
  .services__foot .btn { width: 100%; justify-content: center; }
}

/* ---------- Контакты ---------- */
.contact {
  position: relative; isolation: isolate; overflow: hidden;
  padding-block: var(--s-10) var(--s-9);
  border-top: 1px solid var(--line);
  background:
    radial-gradient(60% 50% at 50% 0%, var(--cure-soft), transparent 70%),
    var(--ink);
}
.contact__inner { position: relative; z-index: 1; display: grid; gap: var(--s-6); }
.contact__doctor {
  position: absolute; z-index: 0; bottom: 0;
  right: max(-80px, calc((100vw - var(--wrap)) / 2 - 80px));
  height: min(96%, 900px); width: auto; max-width: none;
  filter: grayscale(1) brightness(0.5);
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(0deg, transparent 4%, #000 45%), linear-gradient(90deg, transparent, #000 45%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(0deg, transparent 4%, #000 45%), linear-gradient(90deg, transparent, #000 45%);
  mask-composite: intersect;
  pointer-events: none;
}
.contact__title .line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.contact__title .line > span { display: inline-block; }
.contact__title .line + .line > span { color: var(--mist); }
.contact__title {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.9rem, 8vw, 6.5rem);
  line-height: 1.02; letter-spacing: -0.05em;
  text-wrap: balance;
}
.contact__lead { color: var(--mist); font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 44ch; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-6); margin-top: var(--s-3); }
.contact__phone {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--font-mono); font-size: 18px; text-decoration: none;
  color: var(--porcelain);
}
.contact__phone:hover { color: var(--cure); }
.contact__address {
  font-style: normal;
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: var(--s-6);
  align-items: start;
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  color: var(--porcelain);
}
.contact__label { font-family: var(--font-mono); font-size: 12px; color: var(--mist); margin-bottom: var(--s-2); }

@media (max-width: 860px) {
  .contact__address { grid-template-columns: 1fr; gap: var(--s-5); }
  .contact__doctor { height: 62%; right: -30%; opacity: 0.35; }
}

/* ---------- Подвал ---------- */
.footer { border-top: 1px solid var(--line); padding-block: var(--s-6); }
.footer__inner { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); justify-content: space-between; font-size: 13px; color: var(--mist); }
.footer__legal { width: 100%; font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- Лайтбокс ---------- */
.lightbox {
  width: fit-content;
  min-width: min(560px, calc(100vw - 32px));
  max-width: min(1200px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--ink);
  color: var(--porcelain);
  overflow: hidden;
}
.lightbox::backdrop { background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lightbox[open] { animation: lb-in .35s var(--ease-out); }
.lightbox[open]::backdrop { animation: lb-fade .35s var(--ease-out); }
@keyframes lb-in { from { opacity: 0; transform: translateY(12px) scale(0.985); } }
@keyframes lb-fade { from { opacity: 0; } }
.lightbox__stage { display: grid; place-items: center; background: var(--surface-deep); }
.lightbox__stage img, .lightbox__stage video { max-width: 100%; max-height: calc(100dvh - 32px - 76px); width: auto; height: auto; object-fit: contain; }
.lightbox__bar { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4); }
.lightbox__caption { flex: 1; font-size: 15px; color: var(--mist); min-width: 0; }
.lightbox__caption:empty { display: none; }
.player { flex: 1; display: flex; align-items: center; gap: var(--s-3); }
.player[hidden] { display: none; }
.player__progress { flex: 1; accent-color: var(--cure); height: 44px; background: transparent; cursor: pointer; }
.lightbox__close { margin-left: auto; }



/* ---------- Тема: светлая / тёмная ---------- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: transparent;
  cursor: pointer;
  color: var(--porcelain);
  transition: border-color .25s var(--ease-out), color .25s var(--ease-out), background-color .25s var(--ease-out);
}
.theme-toggle:hover {
  border-color: var(--cure);
  color: var(--cure);
  background: var(--glass);
}
.theme-toggle .icon { width: 1.2em; height: 1.2em; }
/* В тёмном — солнце (переключить на светлый), в светлом — луна */
.theme-toggle__sun { display: block; }
.theme-toggle__moon { display: none; }
html[data-theme="light"] .theme-toggle__sun { display: none; }
html[data-theme="light"] .theme-toggle__moon { display: block; }

.nav__actions {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}

/* Светлый режим v2: слои, блики, панели — не плоский лист */
html[data-theme="light"] body {
  background:
    radial-gradient(90% 58% at 92% -12%, rgb(13 104 144 / 0.2), transparent 56%),
    radial-gradient(65% 48% at 4% 22%, rgb(198 168 122 / 0.2), transparent 50%),
    radial-gradient(50% 36% at 48% 110%, rgb(13 104 144 / 0.1), transparent 58%),
    linear-gradient(135deg, rgb(255 255 255 / 0.62) 0%, transparent 40%),
    linear-gradient(180deg, #f7f2e9 0%, #e9e3d7 38%, #ddd4c6 72%, #e7e1d4 100%);
}
html[data-theme="light"] .stage::before {
  background:
    radial-gradient(50% 55% at 72% 42%, rgb(13 104 144 / 0.14), transparent 70%),
    radial-gradient(42% 38% at 18% 78%, rgb(198 168 122 / 0.14), transparent 68%);
}
/* Десктоп светлый: мягкий вход сверху только над фото */
@media (min-width: 861px) {
  html[data-theme="light"] .stage::after {
    content: "";
    position: absolute;
    top: 0; left: 42%; right: 0;
    height: min(110px, 14svh);
    z-index: 4;
    pointer-events: none;
    background: linear-gradient(180deg, var(--ink) 0%, rgb(233 227 215 / 0.45) 45%, transparent 100%);
  }
}
/* Без «наклейки»: убрать жёсткую тень выреза */
html[data-theme="light"] .stage__scene {
  filter: none;
}
/* Фон-сцена — мягкий ореол, не ночной прямоугольник */
html[data-theme="light"] .stage__bg img {
  opacity: 0.5;
  filter: var(--stage-bg-filter);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 22%, #000 85%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 22%, #000 85%, transparent 100%),
    linear-gradient(180deg, #000 0%, #000 58%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* Силуэт: растворяем только слева и снизу — макушку не трогаем */
html[data-theme="light"] .stage__cut {
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, #000 10%, #000 100%),
    linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, #000 10%, #000 100%),
    linear-gradient(180deg, #000 0%, #000 68%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
/* Scan gray/color — тёмный приём; в светлом только цельный цветной силуэт */
html[data-theme="light"] .stage__cut-gray,
html[data-theme="light"] .stage__scan {
  display: none;
}
html[data-theme="light"] .stage__cut-color {
  clip-path: none;
  filter: saturate(0.94) contrast(1.03) brightness(1.05) sepia(0.03);
}
@media (min-width: 861px) {
  html[data-theme="light"] .stage__scene img {
    object-position: 58% 12%;
  }
}
/* Тёплый фейд снизу/слева — без молочного тумана поверх лица */
html[data-theme="light"] .stage__fade {
  height: 36%;
  background:
    linear-gradient(0deg, var(--ink) 14%, rgb(233 227 215 / 0.5) 58%, transparent 100%),
    linear-gradient(90deg, var(--ink) 0%, transparent 22%);
}
html[data-theme="light"] .contact__doctor {
  filter: grayscale(0.25) brightness(1.05) contrast(1.02) sepia(0.04);
  opacity: 0.4;
  -webkit-mask-image:
    linear-gradient(0deg, transparent 0%, #000 35%, #000 85%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 40%);
  mask-image:
    linear-gradient(0deg, transparent 0%, #000 35%, #000 85%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 40%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}
html[data-theme="light"] .stage__name .line--shift > span {
  color: color-mix(in srgb, var(--mist) 72%, var(--cure));
}
html[data-theme="light"] .stage__role::before {
  box-shadow: 0 0 16px rgb(13 104 144 / 0.55), 0 0 36px rgb(13 104 144 / 0.25);
}
html[data-theme="light"] .nav.is-scrolled .nav__inner,
html[data-theme="light"] .nav.is-open .nav__inner {
  border-color: rgb(13 104 144 / 0.16);
  box-shadow:
    0 20px 48px -22px rgb(42 34 26 / 0.28),
    0 0 0 1px rgb(255 255 255 / 0.35),
    inset 0 1px 0 rgb(255 255 255 / 0.85);
}
html[data-theme="light"] .nav__mono {
  background: linear-gradient(180deg, rgb(255 252 247 / 0.9), rgb(255 252 247 / 0.45));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.9),
    0 8px 18px -12px rgb(42 34 26 / 0.35);
}
html[data-theme="light"] .nav__links a.is-active {
  color: var(--porcelain);
}
html[data-theme="light"] .btn--primary {
  box-shadow:
    0 14px 34px -14px rgb(13 104 144 / 0.7),
    0 0 0 1px rgb(13 104 144 / 0.15),
    inset 0 1px 0 rgb(255 255 255 / 0.32);
}
html[data-theme="light"] .btn--ghost {
  background: rgb(255 252 247 / 0.4);
  border-color: rgb(20 24 28 / 0.14);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
}
html[data-theme="light"] .btn--ghost:hover {
  border-color: rgb(13 104 144 / 0.35);
  color: var(--cure);
}
html[data-theme="light"] .btn--glass {
  background: rgb(255 252 247 / 0.62);
  border-color: rgb(20 24 28 / 0.12);
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.75),
    0 10px 24px -18px rgb(42 34 26 / 0.3);
}
html[data-theme="light"] .btn--glass:hover {
  background: rgb(255 252 247 / 0.9);
  border-color: rgb(13 104 144 / 0.32);
}
html[data-theme="light"] .icon-btn {
  background: rgb(255 252 247 / 0.55);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.75);
}
html[data-theme="light"] .facts__list {
  background:
    linear-gradient(165deg, rgb(255 252 247 / 0.72), rgb(221 212 198 / 0.78));
  border: 1px solid rgb(20 24 28 / 0.1);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 28px 56px -34px rgb(42 34 26 / 0.28),
    inset 0 1px 0 rgb(255 255 255 / 0.7);
}
html[data-theme="light"] .fact__value {
  color: var(--cure);
}
html[data-theme="light"] .works {
  background:
    radial-gradient(55% 45% at 12% 8%, rgb(13 104 144 / 0.14), transparent 60%),
    radial-gradient(48% 42% at 92% 78%, rgb(198 168 122 / 0.16), transparent 58%),
    linear-gradient(180deg, #e9e3d7 0%, #ddd4c6 30%, #d3c9b8 68%, #e9e3d7 100%);
}
html[data-theme="light"] .works__title > span:first-child {
  color: color-mix(in srgb, var(--mist) 55%, var(--cure));
}
html[data-theme="light"] .works__bar {
  box-shadow:
    0 0 22px 2px rgb(13 104 144 / 0.55),
    0 0 64px 8px rgb(13 104 144 / 0.22);
}
html[data-theme="light"] .ba {
  box-shadow:
    0 32px 70px -32px rgb(42 34 26 / 0.38),
    0 0 0 1px rgb(20 24 28 / 0.08);
  border: 1px solid rgb(20 24 28 / 0.1);
}
html[data-theme="light"] .ba__tag {
  background: rgb(255 252 247 / 0.78);
  border: 1px solid rgb(20 24 28 / 0.1);
  box-shadow: 0 8px 18px -12px rgb(42 34 26 / 0.35);
  color: var(--porcelain);
}
html[data-theme="light"] .ba__tag--after { color: var(--cure); }
html[data-theme="light"] .ba__knob {
  background: rgb(255 252 247 / 0.82);
  box-shadow: 0 10px 24px -10px rgb(13 104 144 / 0.45);
}
html[data-theme="light"] .rail__item {
  box-shadow: 0 12px 30px -16px rgb(42 34 26 / 0.32);
  border-radius: var(--r-media);
  overflow: hidden;
}
html[data-theme="light"] .step img {
  box-shadow: 0 22px 48px -28px rgb(42 34 26 / 0.35);
  border: 1px solid rgb(20 24 28 / 0.08);
}
html[data-theme="light"] .about {
  background:
    radial-gradient(50% 55% at 0% 40%, rgb(13 104 144 / 0.1), transparent 60%),
    radial-gradient(40% 40% at 100% 70%, rgb(198 168 122 / 0.12), transparent 55%);
}
html[data-theme="light"] .about__img {
  box-shadow:
    0 32px 68px -34px rgb(42 34 26 / 0.4),
    0 0 0 1px rgb(20 24 28 / 0.08);
}
html[data-theme="light"] .brands li {
  background: rgb(255 252 247 / 0.65);
  border-color: rgb(13 104 144 / 0.18);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.75);
}
html[data-theme="light"] .video {
  background:
    radial-gradient(60% 50% at 80% 0%, rgb(13 104 144 / 0.12), transparent 60%),
    linear-gradient(180deg, transparent, rgb(221 212 198 / 0.45) 40%, transparent);
}
html[data-theme="light"] .reel__btn {
  box-shadow: 0 22px 48px -26px rgb(42 34 26 / 0.4);
  border: 1px solid rgb(20 24 28 / 0.1);
}
html[data-theme="light"] .reel__play {
  background: rgb(255 252 247 / 0.78);
  color: var(--porcelain);
  border-color: rgb(20 24 28 / 0.12);
  box-shadow: 0 10px 24px -12px rgb(42 34 26 / 0.35);
}
html[data-theme="light"] .services {
  background:
    radial-gradient(55% 42% at 94% -4%, rgb(13 104 144 / 0.2), transparent 62%),
    radial-gradient(42% 36% at -4% 88%, rgb(198 168 122 / 0.16), transparent 56%),
    linear-gradient(180deg, #ddd4c6 0%, #e9e3d7 45%, #f0ebe2 100%);
}
html[data-theme="light"] .svc-list {
  background: rgb(255 252 247 / 0.35);
  border: 1px solid rgb(20 24 28 / 0.08);
  border-radius: 22px;
  overflow: hidden;
  box-shadow:
    0 28px 60px -36px rgb(42 34 26 / 0.28),
    inset 0 1px 0 rgb(255 255 255 / 0.65);
}
html[data-theme="light"] .svc::before {
  background:
    radial-gradient(420px circle at var(--mx) var(--my), rgb(13 104 144 / 0.16), transparent 70%),
    linear-gradient(180deg, rgb(255 252 247 / 0.92), rgb(232 224 210 / 0.95));
}
html[data-theme="light"] .svc__index {
  color: var(--cure);
}
html[data-theme="light"] .services__foot {
  background: rgb(255 252 247 / 0.55);
  border: 1px solid rgb(20 24 28 / 0.08);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.7);
}
html[data-theme="light"] .contact {
  background:
    radial-gradient(58% 50% at 50% -8%, rgb(13 104 144 / 0.18), transparent 62%),
    radial-gradient(46% 42% at 100% 85%, rgb(198 168 122 / 0.14), transparent 58%),
    linear-gradient(180deg, #e9e3d7, #ddd4c6 55%, #e9e3d7);
}
html[data-theme="light"] .play {
  background:
    radial-gradient(70% 52% at 10% -5%, rgb(13 104 144 / 0.18), transparent 55%),
    radial-gradient(50% 42% at 95% 75%, rgb(198 168 122 / 0.14), transparent 55%),
    linear-gradient(180deg, #e9e3d7, #d8cfbf 48%, #e9e3d7);
}
html[data-theme="light"] [data-game-frame] {
  box-shadow:
    0 28px 64px -30px rgb(42 34 26 / 0.4),
    0 0 0 1px rgb(20 24 28 / 0.12);
  border-radius: 16px;
  background: #0b0d0f;
}
html[data-theme="light"] .theme-toggle {
  background: linear-gradient(180deg, rgb(255 252 247 / 0.85), rgb(255 252 247 / 0.4));
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.8),
    0 8px 18px -12px rgb(42 34 26 / 0.3);
}
html[data-theme="light"] .footer {
  background: linear-gradient(180deg, transparent, rgb(221 212 198 / 0.55));
  border-top-color: rgb(13 104 144 / 0.14);
}
html[data-theme="light"] .splash {
  background:
    radial-gradient(42% 36% at 50% 46%, rgb(13 104 144 / 0.2), transparent 70%),
    radial-gradient(60% 50% at 18% 100%, rgb(198 168 122 / 0.18), transparent 58%),
    linear-gradient(180deg, #f7f2e9, #e9e3d7);
}

/* ---------- Заставка ---------- */
.splash { display: none; }
.js .splash {
  position: fixed; inset: 0; z-index: 90;
  display: grid; place-items: center;
  background:
    radial-gradient(40% 35% at 50% 46%, var(--hero-glow), transparent 70%),
    var(--ink);
  clip-path: inset(0 0 0 0);
  animation: splash-failsafe 0s linear 6s forwards;
}
.is-splash, .is-splash body { overflow: hidden; }
.splash__inner { display: grid; justify-items: center; text-align: center; }
.splash__mark { position: relative; width: 112px; height: 112px; display: grid; place-items: center; margin-bottom: var(--s-6); }
.splash__ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.splash__ring circle {
  fill: none; stroke: var(--cure); stroke-width: 1.2;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  filter: drop-shadow(0 0 6px var(--cure-glow));
  animation: splash-ring 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.1s forwards;
}
.splash__mono {
  font-family: var(--font-display); font-weight: 400; font-size: 26px; letter-spacing: 0.02em;
  opacity: 0; animation: splash-up .9s var(--ease-out) .35s forwards;
}
.splash__name {
  font-family: var(--font-display); font-weight: 300;
  font-size: clamp(1.6rem, 3.4vw, 2.6rem); letter-spacing: -0.04em; line-height: 1.1;
  opacity: 0; animation: splash-up .9s var(--ease-out) .55s forwards;
}
.splash__role {
  margin-top: var(--s-2);
  font-family: var(--font-mono); font-size: 12.5px; color: var(--mist);
  opacity: 0; animation: splash-up .9s var(--ease-out) .7s forwards;
}
.splash__foot {
  position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(24px, 5vh, 48px);
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s-5);
  font-family: var(--font-mono); font-size: 12px; color: var(--mist);
}
.splash__bar { position: relative; height: 1px; background: var(--line); overflow: hidden; }
.splash__bar > span {
  position: absolute; inset: 0;
  background: var(--cure); box-shadow: 0 0 10px var(--cure);
  transform: scaleX(0); transform-origin: left center;
}
.splash__count { min-width: 3ch; text-align: right; color: var(--porcelain); font-variant-numeric: tabular-nums; }
@keyframes splash-failsafe { to { visibility: hidden; } }
@keyframes splash-ring { to { stroke-dashoffset: 0; } }
@keyframes splash-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .js .splash { display: none; } }
@media (max-width: 520px) {
  .splash__foot { grid-template-columns: 1fr auto; }
  .splash__foot > span:first-child { display: none; }
}

/* ---------- Параллакс на нативной шкале прокрутки ---------- */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    .stage__bg, .stage__name, .stage__cut { animation: linear both; animation-timeline: scroll(root); animation-range: 0 100svh; }
    .stage__bg { animation-name: px-bg; }
    .stage__name { animation-name: px-name; }
    .stage__cut { animation-name: px-cut; }
    .about__img--side { animation: px-side linear both; animation-timeline: view(); }
  }
}
@keyframes px-bg { to { translate: 0 14%; } }
@keyframes px-name { to { translate: 0 -40%; opacity: 0; } }
@keyframes px-cut { to { translate: 0 7%; } }
@keyframes px-side { from { translate: 0 60px; } to { translate: 0 -40px; } }

/* ---------- Анимации появления ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); }
.js [data-hero-line], .js [data-title-line] { transform: translateY(108%); }
.js [data-hero-item] { opacity: 0; transform: translateY(14px); }
.js .stage__bg { opacity: 0; }
.js .stage__cut { opacity: 0; --scan: 0%; }
.js [data-works-bar] { transform: scaleY(0); }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-hero-line], .js [data-title-line], .js [data-hero-item] { opacity: 1; transform: none; }
  .js .stage__bg, .js .stage__cut { opacity: 1; --scan: 100%; }
  .js [data-works-bar] { transform: none; }
  .ba__img, .step img, .lightbox[open], .lightbox[open]::backdrop, .nav__pill, .svc::after, .svc::before, .svc__body, .rail__before { transition: none; animation: none; }
}

/* ---------- Play / arcade ---------- */
.play {
  padding-block: var(--s-9);
  background:
    radial-gradient(70% 50% at 10% 0%, var(--cure-soft), transparent 50%),
    radial-gradient(60% 40% at 90% 20%, rgb(255 90 120 / 0.06), transparent 45%),
    linear-gradient(180deg, var(--ink), var(--graphite) 40%, var(--ink));
  border-block: 1px solid var(--line);
}
.play__intro { max-width: 780px; margin-bottom: var(--s-6); }
.play__eyebrow {
  margin: 0 0 var(--s-3);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cure);
}
.play__lead { margin: var(--s-4) 0 0; color: var(--mist); max-width: 54ch; }
.play__panel[hidden] { display: none; }

.game {
  border: 1px solid var(--line);
  background: var(--overlay);
  border-radius: 18px;
  padding: clamp(14px, 2.5vw, 24px);
}
.game__meta {
  display: flex;
  justify-content: space-between;
  gap: var(--s-5);
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: var(--s-4);
}
.game__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}
.game__hint { margin: 6px 0 0; color: var(--mist); font-size: 14px; max-width: 52ch; }
.game__credit {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mist);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.game__credit:hover { color: var(--cure); border-color: var(--cure); }

.arcade {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-deep);
}
.arcade--tetris {
  aspect-ratio: 9 / 16;
  max-width: 420px;
  margin-inline: auto;
  max-height: min(85vh, 820px);
  overscroll-behavior: contain;
  touch-action: none;
}
@media (min-width: 900px) {
  .arcade--tetris {
    aspect-ratio: 16 / 10;
    max-width: 980px;
    max-height: min(78vh, 720px);
  }
}
.arcade__frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--ink);
  touch-action: none;
  overscroll-behavior: contain;
}

@media (max-width: 640px) {
  .arcade--tetris { aspect-ratio: 9 / 16; max-width: none; max-height: 82vh; }
}
