/* Фарфор и титан: холодные нейтрали с синевой, глубокий морской акцент.
   Сетка: колонка 1240px, чередование светлых и тёмных полос, одна яркая зона — карусель работ. */
:root {
  --bg: #F2F4F3;
  --surface: #FBFCFC;
  --surface-2: #E8EDEC;
  --ink: #13222A;
  --slate: #4A616C;
  --titanium: #B4C0C5;
  --line: #D9E0E2;
  --sea: #1E6B73;
  --sea-hover: #164F55;
  --sea-tint: #DCEBEB;
  --sea-glow: rgba(30, 107, 115, .28);
  --deep: #13222A;
  --deep-fg: #F2F6F6;
  --deep-muted: #A6B6BC;
  --deep-line: #2A3D47;
  --gold: #E3A63B;
  --promo: #D9534A;
  --on-accent: #FFFFFF;
  --glass: rgba(251, 252, 252, .78);
  --shadow: 0 18px 40px -18px rgba(19, 34, 42, .35);
  --blob-1: #BFE0DF; --blob-2: #D7E1F0; --blob-3: #E6DDD6;
  --map-bg: #E4EAEA; --map-road: #FFFFFF; --map-street: #F5F7F7; --map-river: #C6DCE0;

  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --r-xl: 32px; --r-lg: 24px; --r-md: 16px; --r-sm: 12px;
  --gutter: clamp(16px, 4vw, 48px);
  --ease: cubic-bezier(.2, .75, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D181D; --surface: #14232A; --surface-2: #1A2C34; --ink: #E7EEEF; --slate: #9DB0B8;
    --titanium: #5B6F78; --line: #243841; --sea: #4DB0B0; --sea-hover: #6CC6C4; --sea-tint: #173A3E;
    --sea-glow: rgba(77, 176, 176, .25); --deep: #08110F; --deep-fg: #EEF4F4; --deep-muted: #93A6AD; --deep-line: #1F3038;
    --gold: #EDB24B; --promo: #E0655C; --on-accent: #062023; --glass: rgba(20, 35, 42, .8); --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
    --blob-1: #12403F; --blob-2: #172A44; --blob-3: #2A2420;
    --map-bg: #15252C; --map-road: #23363F; --map-street: #1B2D35; --map-river: #123742;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0D181D; --surface: #14232A; --surface-2: #1A2C34; --ink: #E7EEEF; --slate: #9DB0B8;
  --titanium: #5B6F78; --line: #243841; --sea: #4DB0B0; --sea-hover: #6CC6C4; --sea-tint: #173A3E;
  --sea-glow: rgba(77, 176, 176, .25); --deep: #08110F; --deep-fg: #EEF4F4; --deep-muted: #93A6AD; --deep-line: #1F3038;
  --gold: #EDB24B; --promo: #E0655C; --on-accent: #062023; --glass: rgba(20, 35, 42, .8); --shadow: 0 18px 40px -18px rgba(0, 0, 0, .7);
  --blob-1: #12403F; --blob-2: #172A44; --blob-3: #2A2420;
  --map-bg: #15252C; --map-road: #23363F; --map-street: #1B2D35; --map-river: #123742;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.08; text-wrap: balance; }
h2 { font-size: clamp(32px, 4.6vw, 54px); }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
p { margin: 0; }
.muted { color: var(--slate); }
.small { font-size: 14px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: 10px; }
.skip:focus { top: 12px; }

.wrap {
  width: 100%; max-width: 1240px; margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.sec-head { display: grid; gap: 14px; margin-bottom: clamp(32px, 4vw, 52px); max-width: 720px; }
.sub { color: var(--slate); font-size: 18px; max-width: 38em; }

/* ---------- кнопки ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border: 0; border-radius: 999px;
  background: var(--sea); color: var(--on-accent); font: 600 16px/1.1 var(--font);
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn:hover { background: var(--sea-hover); transform: translateY(-2px); box-shadow: 0 12px 26px -10px var(--sea-glow); }
.btn:active { transform: translateY(0); }
.btn-lg { padding: 18px 28px; font-size: 17px; }
.btn-sm { padding: 11px 18px; font-size: 15px; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--titanium), 0 10px 22px -14px rgba(19, 34, 42, .4); }
.btn .ic-move, .link .ic-move { transition: transform .25s var(--ease); }
.btn:hover .ic-move, .link:hover .ic-move { transform: translateX(4px); }
.btn-shine::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.35) 50%, transparent 65%);
  transform: translateX(-120%);
}
.btn-shine:hover::after { transition: transform .8s var(--ease); transform: translateX(120%); }

.link { display: inline-flex; align-items: center; gap: 8px; color: var(--sea); font-weight: 600; text-decoration: none; }
.link:hover { color: var(--sea-hover); }

/* ---------- шапка ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; transition: background .3s, box-shadow .3s; }
.top.is-scrolled, .top.is-menu {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.top-in { display: flex; align-items: center; gap: 20px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--sea); color: var(--on-accent); flex: none; transition: transform .4s var(--ease); }
.brand:hover .brand-mark { transform: rotate(-10deg); }
.brand-mark .ic { width: 24px; height: 24px; stroke-width: 2; }
.brand-txt { display: grid; font-weight: 700; font-size: 17px; line-height: 1.15; letter-spacing: -0.01em; }
.brand-txt small { font-weight: 500; font-size: 13px; color: var(--slate); letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) { position: relative; padding: 8px 12px; text-decoration: none; color: var(--slate); font-size: 15px; font-weight: 500; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:not(.btn):hover { color: var(--ink); background: var(--surface-2); }
.nav a.is-active { color: var(--ink); }
.nav a.is-active::after { content: ""; position: absolute; left: 50%; bottom: 1px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--sea); }
.nav-cta { display: none; }
.burger { display: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); cursor: pointer; place-items: center; }
.burger .ic { width: 22px; height: 22px; }
.burger .ic-close { display: none; }
.burger[aria-expanded="true"] .ic-open { display: none; }
.burger[aria-expanded="true"] .ic-close { display: block; }

/* ---------- главный экран ---------- */
.hero { position: relative; isolation: isolate; padding-block: clamp(24px, 5vw, 64px) clamp(56px, 8vw, 110px); }
.hero-bg { position: absolute; inset: -80px 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .9; }
.b1 { width: 520px; height: 520px; background: var(--blob-1); right: -120px; top: 20px; animation: drift1 18s ease-in-out infinite alternate; }
.b2 { width: 420px; height: 420px; background: var(--blob-2); right: 22%; top: 240px; animation: drift2 22s ease-in-out infinite alternate; }
.b3 { width: 360px; height: 360px; background: var(--blob-3); left: -140px; top: 320px; animation: drift1 26s ease-in-out infinite alternate-reverse; }
@keyframes drift1 { to { transform: translate(-60px, 50px) scale(1.08); } }
@keyframes drift2 { to { transform: translate(70px, -40px) scale(.92); } }

.hero-in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.status {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px;
  padding: 8px 14px 8px 12px; border-radius: 999px; background: var(--glass);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.status .dot { width: 9px; height: 9px; border-radius: 50%; background: #2FA86B; animation: ping 2.2s infinite; }
.status.is-closed .dot { background: var(--titanium); animation: none; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(47, 168, 107, .55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(47, 168, 107, 0); } }
.hero-h1 { font: inherit; letter-spacing: normal; line-height: inherit; margin: 0; }
.role { display: block; color: var(--slate); font-size: 18px; font-weight: 400; line-height: 1.5; margin-bottom: 18px; text-wrap: pretty; }
.name { display: block; font-size: clamp(56px, 9.6vw, 140px); font-weight: 800; letter-spacing: -0.06em; line-height: .88; margin-bottom: 32px; }
.name .line { display: block; white-space: nowrap; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.name .line-2 { padding-left: .58em; }
.name .line-2 { color: var(--sea); }
.name .ch { display: inline-block; }
.lead { max-width: 33em; font-size: 19px; line-height: 1.6; color: var(--slate); margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }

.stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 14px 32px; }
.stats li { display: flex; align-items: center; gap: 12px; }
.stat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sea-tint); color: var(--sea); flex: none; }
.stat-ic .ic { width: 22px; height: 22px; }
.stats li:nth-child(2) .stat-ic { color: var(--gold); }
.stats li > span:last-child { display: grid; font-size: 15px; font-weight: 500; line-height: 1.25; }
.stats b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stats small { font-size: 13px; color: var(--slate); font-weight: 400; }

.hero-visual { position: relative; padding: 20px 20px 40px; }
.portrait {
  margin: 0; position: relative; aspect-ratio: 4 / 5; overflow: hidden; max-width: 100%;
  border-radius: 999px 999px var(--r-xl) var(--r-xl);
  background: linear-gradient(170deg, var(--surface) 0%, var(--sea-tint) 100%);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line);
  display: grid; place-items: center;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.implant-art { width: 44%; height: auto; animation: float 6s ease-in-out infinite; overflow: visible; }
.implant-art .threads path { stroke-dasharray: 64; stroke-dashoffset: 0; }
@keyframes float { 50% { transform: translateY(-10px); } }
.portrait figcaption { position: absolute; left: 0; right: 0; bottom: 64px; text-align: center; font-size: 13px; color: var(--slate); padding: 0 28px; }
.portrait.has-photo figcaption { display: none; }

.chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px 12px 12px; border-radius: 18px; background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.25;
}
.chip b { display: block; font-weight: 600; font-size: 15px; }
.chip small { color: var(--slate); font-size: 13px; }
.chip-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--sea); color: var(--on-accent); flex: none; }
.chip-a { left: -28px; top: 28%; }
.chip-b { right: -18px; top: 6%; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 16px; }
.chip-c { right: -8px; bottom: 4px; }
.stars { display: inline-flex; gap: 2px; color: var(--gold); }
.stars .ic { width: 17px; height: 17px; }

/* ---------- анимация первого экрана (одна сцена загрузки) ----------
   Короткое появление имени и первого экрана играет у всех посетителей, даже с выключенными
   «эффектами анимации» в системе: оно разовое и длится около секунды. Бесконечные «плавающие»
   эффекты для таких посетителей отключены (см. блок «уменьшение движения» внизу). */
.js .name .ch { animation: rise .9s var(--ease) both; animation-delay: calc(.12s + var(--i) * .035s); }
.js .anim { animation: fadeUp .8s var(--ease) both; animation-delay: var(--d, 0s); }
.js .status:not([hidden]) { animation: fadeUp .6s var(--ease) both; }
.js .portrait { animation: reveal 1.2s .25s var(--ease) both; }
.js .implant-art .threads path { animation: draw 1s var(--ease) both; }
.js .implant-art .threads path:nth-child(1) { animation-delay: .9s; }
.js .implant-art .threads path:nth-child(2) { animation-delay: .96s; }
.js .implant-art .threads path:nth-child(3) { animation-delay: 1.02s; }
.js .implant-art .threads path:nth-child(4) { animation-delay: 1.08s; }
.js .implant-art .threads path:nth-child(5) { animation-delay: 1.14s; }
.js .implant-art .threads path:nth-child(6) { animation-delay: 1.2s; }
.js .implant-art .threads path:nth-child(7) { animation-delay: 1.26s; }
.js .chip { animation: pop .7s var(--ease) both; }
.js .chip-a { animation-delay: 1s; }
.js .chip-b { animation-delay: 1.15s; }
.js .chip-c { animation-delay: 1.3s; }
@media (prefers-reduced-motion: no-preference) {
  .js .chip { animation: pop .7s var(--ease) both, bob 7s ease-in-out infinite; }
  .js .chip-a { animation-delay: 1s, 1.7s; }
  .js .chip-b { animation-delay: 1.15s, 2.5s; }
  .js .chip-c { animation-delay: 1.3s, 3.2s; }
  .reveal.is-in { animation: fadeUp .8s var(--ease) both; animation-delay: var(--rd, 0s); }
}
@keyframes rise { from { transform: translateY(105%); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(22px); } }
@keyframes reveal { from { clip-path: inset(100% 0 0 0 round 999px 999px 32px 32px); } to { clip-path: inset(0 0 0 0 round 999px 999px 32px 32px); } }
@keyframes draw { from { stroke-dashoffset: 64; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.92); } }
@keyframes bob { 50% { translate: 0 -6px; } }

/* ---------- бегущая строка ---------- */
.ticker { overflow: hidden; border-block: 1px solid var(--line); background: var(--surface); padding-block: 18px; -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker span { display: inline-flex; align-items: center; gap: 28px; padding-right: 28px; font-size: 20px; font-weight: 600; letter-spacing: -0.01em; color: var(--slate); white-space: nowrap; }
.ticker span::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sea); opacity: .6; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- работы ---------- */
.works { background: var(--deep); color: var(--deep-fg); padding-block: clamp(64px, 9vw, 120px); position: relative; overflow: hidden; }
.works::before { content: ""; position: absolute; width: 700px; height: 700px; right: -200px; top: -300px; border-radius: 50%; background: radial-gradient(closest-side, rgba(77, 176, 176, .22), transparent); pointer-events: none; }
.works .sub { color: var(--deep-muted); margin-top: 14px; }
.works-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; position: relative; }
.car-ctrl { display: flex; align-items: center; gap: 10px; }
.car-count { font-variant-numeric: tabular-nums; color: var(--deep-muted); margin-right: 10px; font-size: 15px; }
.arrow {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--deep-line); background: transparent; color: var(--deep-fg); cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), opacity .2s;
}
.arrow .ic { width: 22px; height: 22px; stroke-width: 2; }
.arrow:hover:not(:disabled) { background: var(--deep-fg); color: var(--deep); border-color: var(--deep-fg); transform: scale(1.06); }
.arrow:disabled { opacity: .3; cursor: default; }

.track {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(272px, 29vw, 392px);
  gap: clamp(14px, 2vw, 24px); overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none; align-items: start;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
  scroll-padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-block: 8px 10px;
}
@media (min-width: 1240px) {
  .track { padding-left: calc((100vw - 1240px) / 2 + var(--gutter)); padding-right: calc((100vw - 1240px) / 2 + var(--gutter)); scroll-padding-inline: calc((100vw - 1240px) / 2 + var(--gutter)); }
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -3px; }

.case { scroll-snap-align: start; display: flex; flex-direction: column; padding: 0; border: 0; text-align: left; background: none; color: inherit; font: inherit; cursor: pointer; min-width: 0; }
.case-img { display: block; position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--r-lg); overflow: hidden; background: #1E323C; transition: transform .45s var(--ease), box-shadow .45s; }
.case-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.case-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, rgba(8, 17, 15, .55)); opacity: .7; transition: opacity .3s; }
.case:hover .case-img, .case:focus-visible .case-img { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .8); }
.case:hover .case-img img { transform: scale(1.06); }
.case-badge, .case-open {
  position: absolute; z-index: 1; display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.case-badge { left: 14px; bottom: 14px; background: rgba(8, 17, 15, .55); color: #F2F6F6; }
.case-badge .ic { width: 15px; height: 15px; }
.case-open { right: 14px; top: 14px; width: 40px; height: 40px; padding: 0; justify-content: center; background: rgba(255, 255, 255, .92); color: #13222A; opacity: 0; transform: scale(.7) rotate(-20deg); transition: opacity .3s, transform .4s var(--ease); }
.case-open .ic { width: 17px; height: 17px; stroke-width: 2; }
.case:hover .case-open, .case:focus-visible .case-open { opacity: 1; transform: none; }
.case-title { display: block; margin-top: 18px; font-size: 20px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; }
.case-text { display: block; margin-top: 6px; color: var(--deep-muted); font-size: 15px; line-height: 1.5; }

.progress { margin-top: 30px; height: 3px; border-radius: 3px; background: var(--deep-line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--deep-fg); border-radius: 3px; }
.works-empty { display: flex; align-items: center; gap: 16px; color: var(--deep-muted); }
.empty-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--deep-line); }

/* ---------- лайтбокс ---------- */
.lb { width: min(1120px, 100vw - 24px); max-width: none; max-height: calc(100dvh - 24px); overflow: auto; padding: 0; border: 0; border-radius: var(--r-xl); background: var(--deep); color: var(--deep-fg); }
.lb::backdrop { background: rgba(5, 11, 14, .78); backdrop-filter: blur(6px); }
.lb[open] { animation: lbIn .35s var(--ease); }
@keyframes lbIn { from { opacity: 0; transform: translateY(16px) scale(.97); } }
.lb-in { position: relative; padding: clamp(14px, 2.5vw, 24px); display: grid; gap: 16px; }
.lb-close { position: absolute; top: 22px; right: 22px; z-index: 3; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(8, 17, 15, .6); color: #fff; cursor: pointer; display: grid; place-items: center; backdrop-filter: blur(8px); transition: transform .3s var(--ease), background .2s; }
.lb-close:hover { transform: rotate(90deg); background: rgba(8, 17, 15, .85); }
.lb-close .ic { width: 22px; height: 22px; }
.lb-stage { position: relative; border-radius: var(--r-lg); overflow: hidden; background: #0A1418; display: grid; place-items: center; min-height: 240px; }
.lb-stage img { width: 100%; max-height: calc(100dvh - 300px); object-fit: contain; }
.lb-stage img.swap { animation: imgIn .4s var(--ease); }
@keyframes imgIn { from { opacity: 0; transform: scale(.985); } }
.lb-side { position: absolute; top: 50%; translate: 0 -50%; width: 50px; height: 50px; border-radius: 50%; border: 0; background: rgba(255,255,255,.92); color: #13222A; cursor: pointer; display: grid; place-items: center; transition: transform .2s var(--ease); }
.lb-side:hover { transform: scale(1.08); }
.lb-side .ic { width: 22px; height: 22px; stroke-width: 2; }
.lb-prev { left: 14px; } .lb-next { right: 14px; }
.lb-count { position: absolute; left: 14px; bottom: 14px; padding: 6px 12px; border-radius: 999px; background: rgba(8,17,15,.6); color: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-meta { display: grid; gap: 4px; padding-inline: 4px; }
.lb-meta b { font-size: 21px; font-weight: 600; letter-spacing: -0.015em; }
.lb-meta span { color: var(--deep-muted); font-size: 15px; }
.lb-meta b:empty, .lb-meta span:empty { display: none; }
.lb-thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; padding: 3px; }
.lb-thumbs button { flex: none; width: 68px; height: 68px; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: none; opacity: .5; transition: opacity .2s; }
.lb-thumbs button:hover { opacity: .85; }
.lb-thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--deep-fg); }
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- этапы ---------- */
.steps { padding-block: clamp(64px, 9vw, 120px); }
.step-box { position: relative; }
.step-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; position: relative; }
.step-line { position: absolute; left: 40px; right: 40px; top: 37px; height: 2px; background: var(--line); overflow: hidden; border-radius: 2px; }
.step-line i { display: block; height: 100%; width: 100%; background: var(--sea); transform-origin: left; transform: scaleX(var(--p, 1)); transition: transform 1.6s var(--ease); }
.step { position: relative; padding: 18px 18px 22px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 10px; align-content: start; transition: transform .35s var(--ease), box-shadow .35s; }
.step:hover { transform: translateY(-5px); box-shadow: inset 0 0 0 1px var(--titanium), var(--shadow); }
.step-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sea); color: var(--on-accent); margin-bottom: 8px; position: relative; z-index: 1; transition: transform .4s var(--ease); }
.step:hover .step-ic { transform: rotate(-8deg) scale(1.08); }
.step-ic .ic { width: 21px; height: 21px; }
.step-n { position: absolute; top: 14px; right: 18px; font-size: 44px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; color: var(--surface-2); font-variant-numeric: tabular-nums; }
.step h3 { font-size: 18px; }
.step p { color: var(--slate); font-size: 15px; line-height: 1.5; }

/* ---------- цены ---------- */
.services { padding-block: clamp(64px, 9vw, 120px); background: var(--surface-2); }
.svc-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.svc { position: relative; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; min-width: 0; padding: 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.svc:hover { transform: translateY(-6px); box-shadow: inset 0 0 0 1px var(--titanium), var(--shadow); }
.svc-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sea-tint); color: var(--sea); transition: transform .5s var(--ease), background .3s, color .3s; }
.svc:hover .svc-ic { transform: rotate(-8deg) scale(1.06); background: var(--sea); color: var(--on-accent); }
.svc-ic .ic { width: 26px; height: 26px; }
.svc-name { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
.svc-note { display: block; margin-top: 6px; font-size: 14px; color: var(--slate); font-weight: 400; }
.svc-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; padding-top: 16px; border-top: 1px dashed var(--titanium); }
.svc-price b { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.svc-price s { font-size: 15px; color: var(--slate); }
.svc-tag { position: absolute; top: 22px; right: 22px; padding: 6px 11px; border-radius: 999px; background: var(--promo); color: #fff; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.svc.is-promo { box-shadow: inset 0 0 0 1.5px var(--sea); }

/* ---------- запись ---------- */
.book { position: relative; overflow: hidden; background: var(--sea); color: var(--on-accent); padding-block: clamp(64px, 9vw, 120px); }
.book-glow { position: absolute; inset: 0; background: radial-gradient(600px 400px at 85% 10%, rgba(255,255,255,.18), transparent 70%), radial-gradient(500px 400px at 0% 100%, rgba(0,0,0,.18), transparent 70%); pointer-events: none; }
.book-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.book-text { display: grid; gap: 22px; }
.book-text > p { font-size: 18px; max-width: 30em; opacity: .92; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.perks li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.perks .ic { width: 26px; height: 26px; padding: 5px; border-radius: 50%; background: rgba(255,255,255,.2); stroke-width: 2.4; }
.direct { display: grid; gap: 6px; font-size: 15px; }
.direct-row { display: flex; align-items: center; gap: 10px; }
.phone { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; color: inherit; font-variant-numeric: tabular-nums; user-select: all; }
.copy { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255,255,255,.2); color: inherit; cursor: pointer; transition: background .2s, transform .2s var(--ease); }
.copy:hover { background: rgba(255,255,255,.32); transform: scale(1.06); }
.copy .ic { width: 18px; height: 18px; }

.form { display: grid; gap: 18px; background: var(--surface); color: var(--ink); padding: clamp(22px, 3vw, 34px); border-radius: var(--r-xl); box-shadow: 0 30px 60px -30px rgba(0,0,0,.45); }
.field { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; min-width: 0; }
.field > label, .field legend { font-size: 14px; font-weight: 600; padding: 0; }
.field legend { margin-bottom: 8px; }
.opt { color: var(--slate); font-weight: 400; }
.form input:not([type="radio"]) { width: 100%; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink); font: 400 17px/1.3 var(--font); transition: border-color .2s, box-shadow .2s, background .2s; }
.form input:not([type="radio"]):focus { outline: none; border-color: var(--sea); background: var(--surface); box-shadow: 0 0 0 4px var(--sea-tint); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; pointer-events: none; }
.pill span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1.5px var(--line); font-size: 15px; font-weight: 500; transition: background .2s, color .2s, box-shadow .2s, transform .2s var(--ease); }
.pill span .ic { width: 18px; height: 18px; }
.pill:hover span { box-shadow: inset 0 0 0 1.5px var(--titanium); }
.pill input:checked + span { background: var(--sea); color: var(--on-accent); box-shadow: none; }
.pill input:focus-visible + span { outline: 3px solid var(--sea); outline-offset: 2px; }
.pill:active span { transform: scale(.96); }
.preview { padding: 14px 16px; border-radius: var(--r-md); background: var(--sea-tint); font-size: 15px; display: grid; gap: 6px; }
.preview-h { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--sea); }
.preview-h .ic { width: 16px; height: 16px; }
.preview p { white-space: pre-line; line-height: 1.5; }
.preview p.flash { animation: fadeUp .35s var(--ease); }
.form .btn { width: 100%; }
.form-err { margin: 0; color: var(--promo); font-size: 14px; font-weight: 500; }
.form-err:empty { display: none; }
.form input[aria-invalid="true"] { border-color: var(--promo); }

/* ---------- где ---------- */
.where { padding-block: clamp(64px, 9vw, 120px); }
.where-in { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 20px; align-items: stretch; }
.where-card { padding: clamp(24px, 3.5vw, 44px); border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 26px; align-content: start; }
.clinic { display: flex; gap: 16px; align-items: flex-start; }
.clinic h3 { font-size: 22px; margin-bottom: 4px; }
.clinic p { font-size: 17px; }
.clinic-ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--sea); color: var(--on-accent); flex: none; }
.clinic-ic .ic { width: 26px; height: 26px; }
.sched-h { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.sched-h .ic { color: var(--sea); }
.sched { border-collapse: collapse; width: 100%; margin-bottom: 10px; }
.sched td { padding: 13px 0; border-bottom: 1px solid var(--line); }
.sched td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sched tr.is-today td { color: var(--sea); }
.today { display: inline-block; margin-left: 10px; padding: 3px 9px; border-radius: 999px; background: var(--sea-tint); color: var(--sea); font-size: 12px; font-weight: 600; vertical-align: 2px; }
.where-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.map { position: relative; min-height: 380px; border-radius: var(--r-xl); overflow: hidden; background: var(--map-bg); box-shadow: inset 0 0 0 1px var(--line); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; z-index: 2; }
.map-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.m-bg { fill: var(--map-bg); }
.m-river { fill: var(--map-river); }
.m-road path { stroke: var(--map-road); stroke-width: 12; fill: none; }
.m-street path { stroke: var(--map-street); stroke-width: 6; fill: none; }
.map-pin { position: absolute; left: 50%; top: 44%; z-index: 1; width: 58px; height: 58px; margin: -58px 0 0 -29px; display: grid; place-items: center; animation: pinBob 2.4s var(--ease) infinite; }
.map-pin::before { content: ""; position: absolute; inset: 0; border-radius: 50% 50% 50% 6px; transform: rotate(-45deg); background: var(--sea); box-shadow: 0 14px 30px -10px var(--sea-glow); }
.map-pin::after { content: ""; position: absolute; left: 50%; top: 100%; width: 40px; height: 14px; margin: 6px 0 0 -20px; border-radius: 50%; border: 2px solid var(--sea); opacity: 0; animation: ring 2.4s ease-out infinite; }
.map-pin .ic { position: relative; width: 24px; height: 24px; color: var(--on-accent); }
.map-label { position: absolute; left: 50%; top: calc(44% + 24px); z-index: 1; transform: translateX(-50%); padding: 8px 14px; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-weight: 600; font-size: 14px; white-space: nowrap; }
@keyframes pinBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ring { 0% { opacity: .7; transform: scale(.6); } 100% { opacity: 0; transform: scale(1.7); } }

/* ---------- о докторе ---------- */
.about { padding-block: clamp(64px, 9vw, 120px); border-top: 1px solid var(--line); }
.about-in { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.about-text { display: grid; gap: 24px; }
.about-text > p { font-size: 18px; color: var(--slate); max-width: 32em; }
.rating { padding: 26px 28px; border-radius: var(--r-xl); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 18px; }
.rating-top { display: flex; align-items: center; gap: 16px; }
.rating-num { font-size: 60px; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.stars-lg .ic { width: 24px; height: 24px; }
.rating-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rating-bars li { display: grid; grid-template-columns: minmax(0, 1fr) 46%; align-items: center; gap: 14px; font-size: 14px; color: var(--slate); }
.rating-bars i { position: relative; height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.rating-bars i::after { content: ""; position: absolute; inset: 0; width: var(--w); border-radius: inherit; background: var(--sea); transform-origin: left; }
@media (prefers-reduced-motion: no-preference) {
  .rating.is-in .rating-bars i::after { animation: grow 1.2s .3s var(--ease) both; }
  .rating.is-in .rating-bars li:nth-child(2) i::after { animation-delay: .4s; }
  .rating.is-in .rating-bars li:nth-child(3) i::after { animation-delay: .5s; }
  .rating.is-in .rating-bars li:nth-child(4) i::after { animation-delay: .6s; }
}
@keyframes grow { from { transform: scaleX(0); } }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 8px; }
.timeline::before { content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 2px; background: linear-gradient(var(--sea), var(--line)); }
.timeline li { position: relative; display: grid; grid-template-columns: 48px 64px minmax(0, 1fr); gap: 16px; align-items: start; padding: 16px 18px 16px 0; border-radius: var(--r-md); transition: background .25s; }
.timeline li:hover { background: var(--surface); }
.tl-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--sea); box-shadow: inset 0 0 0 2px var(--sea-tint), 0 0 0 6px var(--bg); position: relative; z-index: 1; transition: background .25s, color .25s; }
.timeline li:hover .tl-ic { background: var(--sea); color: var(--on-accent); }
.tl-ic .ic { width: 22px; height: 22px; }
.yr { font-size: 22px; font-weight: 700; color: var(--sea); font-variant-numeric: tabular-nums; padding-top: 10px; }
.timeline h3 { font-size: 18px; padding-top: 11px; margin-bottom: 4px; }
.timeline p { color: var(--slate); font-size: 15px; line-height: 1.5; }

/* ---------- вопросы ---------- */
.faq { padding-block: clamp(64px, 9vw, 120px); background: var(--surface-2); }
.faq-in { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.faq-list { display: grid; gap: 10px; }
.qa { border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .25s; }
.qa[open] { box-shadow: inset 0 0 0 1.5px var(--sea); }
.qa summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; cursor: pointer; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; border-radius: var(--r-lg); }
.qa summary::-webkit-details-marker { display: none; }
.qa-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); flex: none; transition: transform .35s var(--ease), background .2s, color .2s; }
.qa-ic .ic { width: 18px; height: 18px; stroke-width: 2.2; }
.qa[open] .qa-ic { transform: rotate(45deg); background: var(--sea); color: var(--on-accent); }
.qa-body { padding: 0 22px 22px; color: var(--slate); font-size: 16px; max-width: 46em; }
.qa[open] .qa-body { animation: fadeUp .45s var(--ease); }

/* ---------- подвал ---------- */
.foot { background: var(--deep); color: var(--deep-muted); padding-block: 48px calc(110px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.foot-in { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px 40px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--deep-line); }
.foot-brand { display: flex; align-items: center; gap: 14px; }
.foot-brand p { color: var(--deep-fg); font-weight: 600; }
.foot-brand span { color: var(--deep-muted); font-weight: 400; }
.foot-links { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.foot-links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--deep-fg); }
.foot-links a:hover { color: var(--sea-hover); }
.warn { color: var(--deep-fg); font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; letter-spacing: -0.01em; }

/* ---------- плавающая кнопка ---------- */
.wa-float {
  position: fixed; z-index: 30;
  right: calc(20px + env(safe-area-inset-right, 0px)); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: var(--sea); color: var(--on-accent); box-shadow: 0 14px 30px -10px var(--sea-glow), 0 6px 16px -8px rgba(0,0,0,.4);
  transform: translateY(140px) scale(.6); transition: transform .45s var(--ease), background .2s;
}
.wa-float .ic { width: 30px; height: 30px; }
.wa-float.is-shown { transform: none; }
.wa-float.is-shown::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--sea); animation: ring 2.6s ease-out 3; }
.wa-float.is-shown:hover { background: var(--sea-hover); transform: scale(1.08); }

/* ---------- уменьшение движения ---------- */
/* Имя и бегущая строка анимируются у всех; здесь выключаем только бесконечные фоновые эффекты. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blob, .implant-art, .map-pin, .map-pin::after, .status .dot, .wa-float.is-shown::before { animation: none !important; }
  .ticker-track { animation-duration: 70s; }
}

/* ---------- адаптив ---------- */
@media (max-width: 1080px) {
  .step-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .step-line { display: none; }
}
@media (max-width: 980px) {
  .burger { display: grid; }
  .top-cta { display: none; }
  .nav {
    position: fixed; inset: 0; z-index: -1; flex-direction: column; align-items: stretch; justify-content: center; gap: 4px;
    padding: 96px max(24px, env(safe-area-inset-right, 0px)) 40px max(24px, env(safe-area-inset-left, 0px));
    background: var(--bg); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
  }
  .nav a:not(.btn) { font-size: 28px; font-weight: 700; color: var(--ink); padding: 12px 8px; border-radius: 14px; letter-spacing: -0.02em; transform: translateY(12px); opacity: 0; transition: transform .45s var(--ease), opacity .45s; }
  .nav a.is-active::after { display: none; }
  .nav-cta { display: inline-flex; margin-top: 24px; padding: 18px; font-size: 18px; }
  .nav.is-open { opacity: 1; visibility: visible; }
  .nav.is-open a:not(.btn) { transform: none; opacity: 1; }
  .nav.is-open a:nth-child(2) { transition-delay: .04s; } .nav.is-open a:nth-child(3) { transition-delay: .08s; }
  .nav.is-open a:nth-child(4) { transition-delay: .12s; } .nav.is-open a:nth-child(5) { transition-delay: .16s; }
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { order: -1; width: min(440px, 100%); padding: 10px 40px 20px; }
  .book-in, .where-in, .about-in, .faq-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .top-in { height: 66px; }
  .brand-txt small { display: none; }
  .hero-visual { width: 100%; padding: 6px 0 16px; }
  .portrait { width: 64%; margin-inline: auto; }
  .chip { padding: 9px 12px 9px 9px; gap: 9px; border-radius: 14px; }
  .chip-ic { width: 32px; height: 32px; border-radius: 10px; }
  .chip-ic .ic { width: 18px; height: 18px; }
  .chip b { font-size: 13px; } .chip small { font-size: 12px; }
  .chip-a { left: 0; top: 36%; } .chip-b { right: 0; top: 2%; padding: 9px 12px; } .chip-c { right: 0; bottom: 6%; }
  .stars .ic { width: 14px; height: 14px; }
  .portrait figcaption { display: none; }
  .name { margin-bottom: 24px; }
  .name .line-2 { padding-left: .4em; }
  .lead { font-size: 17px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .stats { gap: 14px 20px; }
  .works-head { flex-direction: column; align-items: flex-start; }
  .track { grid-auto-columns: 80vw; }
  .step-list { grid-template-columns: minmax(0, 1fr); }
  .rating-bars li { grid-template-columns: minmax(0, 1fr) 40%; }
  .rating { padding: 22px; }
  .timeline li { grid-template-columns: 48px minmax(0, 1fr); gap: 4px 16px; }
  .timeline .tl-ic { grid-row: span 2; }
  .timeline .yr { padding-top: 2px; font-size: 18px; }
  .timeline li > div { grid-column: 2; }
  .timeline h3 { padding-top: 0; }
  .map { min-height: 280px; }
  .lb { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .lb-stage img { max-height: calc(100dvh - 280px); }
  .lb-side { width: 42px; height: 42px; }
  .qa summary { font-size: 17px; padding: 18px; }
  .qa-body { padding: 0 18px 18px; }
  .phone { font-size: 22px; }
}
