:root {
  --coat: #f2f4f3;
  --row: #e7ecec;
  --ink: #18242b;
  --seam: #58686f;
  --xray: #0e1a22;
  --film: #c9d6dc;
  --film-2: #8fa3ad;
  --nerve: #f2c14e;
  --serif: 'Alegreya', Georgia, 'Times New Roman', serif;
  --sans: 'Golos Text', 'Segoe UI', system-ui, sans-serif;
  --pad: clamp(16px, 4vw, 48px);
  --wrap: 1240px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--coat); color: var(--ink); font: 400 17px/1.6 var(--sans); overflow-x: hidden; }
h1, h2, h3, p, ol, ul, dl, dd, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }
svg { display: block; }
main:focus { outline: none; }
body::before { content: ''; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 50; background: var(--coat); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 8px; }
.atlas :focus-visible, .book__plate :focus-visible { outline-color: var(--nerve); }
.skip { position: absolute; left: 12px; top: -64px; z-index: 60; background: var(--ink); color: var(--coat); padding: 10px 16px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }
section[id] { scroll-margin-top: 72px; }
h2 { font: 500 clamp(32px, 3.4vw, 46px)/1.1 var(--serif); letter-spacing: -0.01em; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 600 16px/1.2 var(--sans); text-decoration: none; text-align: center; cursor: pointer; border: 0; border-radius: 999px; padding: 15px 26px; transition: background-color 0.2s, box-shadow 0.2s; }
.btn--gold { background: var(--nerve); color: var(--ink); }
.btn--gold:hover { background: #f6cf6c; }
.btn--line { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(201, 214, 220, 0.4); }
.btn--line:hover { box-shadow: inset 0 0 0 1.5px #fff; }
.btn--small { padding: 11px 18px; font-size: 15px; }
.btn--wide { width: 100%; }
@media (pointer: coarse) { .btn, .switch__btn, .views__btn, .nerves, .problem, .steps button, .pl__show { min-height: 44px; } }

/* ---------- header ---------- */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; display: flex; align-items: center; gap: 28px; padding: 12px var(--pad); background: rgba(242, 244, 243, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 26px/1 var(--serif); text-decoration: none; }
.logo svg { width: 26px; height: 26px; fill: var(--ink); }
.top__nav { display: flex; gap: 26px; margin-left: auto; font-size: 15px; }
.top__nav a { color: var(--seam); text-decoration: none; transition: color 0.2s; }
.top__nav a:hover { color: var(--ink); }
.top__phone { font-size: 15px; font-weight: 500; text-decoration: none; white-space: nowrap; }
@media (max-width: 1020px) { .top__nav { display: none; } .top__phone { margin-left: auto; } }
@media (max-width: 560px) { .top__phone { display: none; } .top .btn { margin-left: auto; } }

/* ---------- 1. hero ---------- */
.hero { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(40px, 8vh, 96px) var(--pad) clamp(56px, 9vh, 110px); }
.hero h1 { font: 500 clamp(42px, 5.2vw, 72px)/1.04 var(--serif); letter-spacing: -0.02em; max-width: 14ch; }
.lede { margin-top: 24px; font-size: 20px; line-height: 1.55; color: var(--seam); max-width: 40ch; }
.hero__actions { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.hero__phone { font-weight: 500; text-decoration: underline; text-decoration-color: rgba(24, 36, 43, 0.3); text-underline-offset: 4px; }
.hero__phone:hover { text-decoration-color: currentColor; }
.hero__where { margin-top: 22px; font-size: 15px; color: var(--seam); }
.fears { display: grid; gap: 6px; padding: 10px; border-radius: 24px; background: #fff; }
.fears li { padding: 20px 22px; border-radius: 16px; }
.fears li + li { background: var(--coat); }
.fears li:nth-child(3) { background: var(--row); }
.fears h2 { font: 700 24px/1.2 var(--serif); }
.fears p { margin-top: 6px; font-size: 16px; color: var(--seam); max-width: 44ch; }

/* ---------- shared section head ---------- */
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: end; margin-bottom: 32px; }
.section-head p { color: var(--seam); max-width: 46ch; }

/* ---------- 2. prices ---------- */
.prices { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--pad); }
.pricelist li { display: grid; grid-template-columns: 1fr 190px 150px 150px; gap: 20px; align-items: baseline; padding: 18px 24px; border-radius: 14px; }
.pricelist li:nth-child(even) { background: var(--row); }
.pricelist li.pricelist__free { background: #fff; }
.pricelist h3 { font: 500 23px/1.2 var(--serif); }
.pl__what { margin-top: 2px; font-size: 15px; color: var(--seam); }
.pl__time { font-size: 15px; color: var(--seam); }
.pl__price { font: 700 22px var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl__show { justify-self: end; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 8px 0; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(24, 36, 43, 0.3); text-underline-offset: 4px; }
.pl__show:hover { text-decoration-color: currentColor; }
.pl__show svg { width: 18px; height: 18px; }
.prices__note { margin-top: 20px; padding-left: 24px; color: var(--seam); }

/* ---------- 3. atlas ---------- */
.atlas { background: var(--xray); color: var(--film); padding: clamp(48px, 7vw, 96px) var(--pad) clamp(40px, 6vw, 80px); }
.atlas > * { max-width: 1480px; margin-left: auto; margin-right: auto; }
.atlas h2 { color: #fff; }
.atlas__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px 40px; margin-bottom: 28px; }
.atlas__head p { margin-top: 10px; max-width: 52ch; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.views { display: flex; padding: 4px; border-radius: 999px; background: rgba(201, 214, 220, 0.08); box-shadow: inset 0 0 0 1px rgba(201, 214, 220, 0.14); }
.views__btn { border: 0; background: none; border-radius: 999px; padding: 9px 16px; font-size: 15px; font-weight: 500; color: var(--film-2); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.views__btn:hover { color: var(--film); }
.views__btn.is-on { background: rgba(201, 214, 220, 0.16); color: #fff; }
.nerves { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 9px 16px; font-size: 15px; font-weight: 500; color: var(--film-2); background: rgba(201, 214, 220, 0.08); box-shadow: inset 0 0 0 1px rgba(201, 214, 220, 0.14); cursor: pointer; transition: color 0.2s, box-shadow 0.2s; }
.nerves::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: rgba(201, 214, 220, 0.35); }
.nerves[aria-pressed='true'] { color: #fff; box-shadow: inset 0 0 0 1px rgba(242, 193, 78, 0.6); }
.nerves[aria-pressed='true']::before { background: var(--nerve); box-shadow: 0 0 10px var(--nerve); }
.nerves:disabled { opacity: 0.35; cursor: default; }

.atlas__grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.atlas__side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; scrollbar-width: thin; padding-right: 4px; }
.switch { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(201, 214, 220, 0.08); margin-bottom: 12px; }
.switch__btn { border: 0; background: none; border-radius: 999px; padding: 8px 16px; font-size: 15px; font-weight: 500; color: var(--film-2); cursor: pointer; transition: background-color 0.2s, color 0.2s; }
.switch__btn.is-on { background: var(--film); color: var(--xray); }
.problems { display: grid; gap: 2px; }
.problem { width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; align-items: baseline; text-align: left; border: 0; background: none; padding: 12px 14px; border-radius: 12px; cursor: pointer; transition: background-color 0.2s; }
.problem:hover { background: rgba(201, 214, 220, 0.08); }
.problem strong { font-weight: 600; font-size: 17px; color: #fff; }
.problem span { grid-column: 1; font-size: 14.5px; color: var(--film-2); }
.problem em { grid-column: 2; grid-row: 1; font-style: normal; font-size: 14.5px; color: var(--film-2); white-space: nowrap; }

.back { border: 0; background: none; padding: 6px 0; margin-bottom: 16px; font-size: 15px; color: var(--film-2); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(143, 163, 173, 0.4); text-underline-offset: 4px; }
.back:hover { color: #fff; }
.player h3 { font: 500 32px/1.1 var(--serif); color: #fff; }
.player__meta { margin-top: 8px; color: var(--film-2); font-size: 15.5px; }
.player__meta strong { color: #fff; font: 700 20px var(--serif); margin-right: 10px; }
.steps { margin: 22px 0 24px; display: grid; gap: 2px; counter-reset: step; }
.steps li { counter-increment: step; }
.steps button { width: 100%; display: grid; grid-template-columns: 30px 1fr; align-items: baseline; text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-size: 16px; color: var(--film-2); transition: background-color 0.2s, color 0.2s; }
.steps button::before { content: counter(step); font: 700 18px var(--serif); }
.steps button:hover { background: rgba(201, 214, 220, 0.08); color: #fff; }
.steps li.is-done button { color: var(--film); }
.steps li.is-on button { background: rgba(201, 214, 220, 0.12); color: #fff; font-weight: 600; }
.steps li.is-on button::before { color: var(--nerve); }
.player__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.atlas__stage { min-width: 0; }
.plate__view { position: relative; height: clamp(520px, calc(100vh - 250px), 860px); border-radius: 20px; overflow: hidden; background: #0b151c; box-shadow: inset 0 0 0 1px rgba(201, 214, 220, 0.08); }
.plate__gl { position: absolute; inset: 0; }
.plate__gl canvas { display: block; width: 100% !important; height: 100% !important; touch-action: none; cursor: grab; }
.plate__gl canvas:active { cursor: grabbing; }
.plate__fade { position: absolute; inset: 0; background: #0b151c; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.plate__fade.is-on { opacity: 1; }
.plate__labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.atlas__hint { margin-top: 12px; font-size: 14px; color: var(--film-2); }

.timeline { margin-top: 12px; display: grid; grid-template-columns: 44px 1fr; gap: 6px 16px; align-items: center; padding: 14px 18px; border-radius: 16px; background: rgba(201, 214, 220, 0.06); box-shadow: inset 0 0 0 1px rgba(201, 214, 220, 0.1); }
.timeline__play { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--nerve); color: var(--xray); display: grid; place-items: center; cursor: pointer; }
.timeline__play:hover { background: #f6cf6c; }
.timeline__play svg { width: 20px; height: 20px; fill: currentColor; display: none; }
.timeline__play[data-state='playing'] .i-pause, .timeline__play[data-state='paused'] .i-play, .timeline__play[data-state='ended'] .i-replay { display: block; }
.timeline__body { min-width: 0; }
.timeline__title { font-size: 17px; font-weight: 600; color: #fff; }
.timeline__text { margin-top: 2px; font-size: 15px; line-height: 1.5; color: var(--film); max-width: 80ch; }
.timeline__bar { grid-column: 1 / -1; position: relative; height: 16px; cursor: pointer; }
.timeline__segs { position: absolute; left: 0; right: 0; top: 6px; height: 4px; display: flex; gap: 4px; }
.timeline__segs span { height: 100%; border-radius: 4px; background: rgba(201, 214, 220, 0.18); }
.timeline__fill { position: absolute; left: 0; top: 6px; width: 0; height: 4px; border-radius: 4px; background: var(--nerve); pointer-events: none; }

.loader { position: absolute; inset: 0; z-index: 4; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(11, 21, 28, 0.75); color: var(--film-2); font-size: 14px; transition: opacity 0.35s; }
.loader.is-off { opacity: 0; pointer-events: none; }
.loader svg { width: 48px; height: 48px; transform: rotate(-90deg); }
.loader circle { fill: none; stroke: rgba(201, 214, 220, 0.15); stroke-width: 3; }
.loader .loader__bar { stroke: var(--nerve); stroke-linecap: round; stroke-dasharray: 126; stroke-dashoffset: 126; transition: stroke-dashoffset 0.3s; }
.fallback { position: absolute; inset: 0; display: grid; place-content: center; padding: 0 24px; text-align: center; }
.tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.15s; padding: 7px 11px; border-radius: 10px; background: rgba(9, 18, 24, 0.9); color: #fff; font-size: 13px; white-space: nowrap; }
.tip.is-on { opacity: 1; }
.tip b { color: var(--nerve); margin-right: 6px; font-weight: 600; }

/* anatomy callouts, set like an atlas plate */
.co-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.co-line { fill: none; stroke: rgba(201, 214, 220, 0.5); stroke-width: 1; opacity: 0; transition: opacity 0.3s; }
.co-line.is-on { opacity: 1; }
.co-dot { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16), 0 0 10px rgba(255, 255, 255, 0.8); opacity: 0; transition: opacity 0.3s; }
.co-dot.is-on { opacity: 1; }
.co { position: absolute; left: 0; top: 0; width: 214px; display: grid; grid-template-columns: 26px 1fr; gap: 10px; align-items: start; opacity: 0; transition: opacity 0.3s; }
.co.is-on { opacity: 1; }
.co__n { --c: #5fe0d0; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 700 14px var(--serif); color: var(--xray); background: var(--c); }
.co__body strong { display: block; padding-top: 2px; font: 700 17px/1.15 var(--serif); color: #fff; }
.co__body p { margin-top: 3px; font-size: 12.5px; line-height: 1.4; color: var(--film-2); }
.co-dot--num { --c: #5fe0d0; width: 20px; height: 20px; margin: -10px 0 0 -10px; display: grid; place-items: center; font: 700 11px/1 var(--serif); color: var(--xray); background: var(--c); box-shadow: 0 0 0 2px rgba(14, 26, 34, 0.75), 0 0 10px rgba(0, 0, 0, 0.4); }
.legend { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.legend li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.legend b { --c: #5fe0d0; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font: 700 12px/1 var(--serif); color: var(--xray); background: var(--c); }
.legend strong { display: block; font: 700 16px/1.2 var(--serif); color: #fff; }
.legend p { margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--film-2); }
@media (max-width: 420px) { .legend { grid-template-columns: 1fr; } }
.is-compact .co { width: 112px; grid-template-columns: 20px 1fr; gap: 6px; }
.is-compact .co__n { width: 20px; height: 20px; font-size: 11px; }
.is-compact .co__body strong { font-size: 13px; }
.is-compact .co__body p { display: none; }

/* ---------- 4. doctors ---------- */
.doctors { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 110px) var(--pad) clamp(40px, 5vw, 64px); }
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.team li { display: grid; gap: 16px; align-content: start; }
.avatar { display: grid; place-items: center; width: 88px; height: 88px; border-radius: 50%; background: var(--xray); color: var(--nerve); font: 700 28px var(--serif); }
.team h3 { font: 700 22px/1.2 var(--serif); }
.team p { margin-top: 6px; font-size: 15.5px; color: var(--seam); max-width: 30ch; }
.team .team__exp { color: var(--ink); font-weight: 500; }

/* ---------- 5. reviews ---------- */
.reviews { background: var(--row); padding: clamp(48px, 7vw, 96px) var(--pad); }
.reviews > * { max-width: var(--wrap); margin-left: auto; margin-right: auto; }
.reviews__note { margin-top: 10px; color: var(--seam); font-size: 15px; }
.quotes { margin-top: 36px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 40px); }
.quotes blockquote { font: 500 22px/1.4 var(--serif); }
.quotes p { margin-top: 14px; font-size: 15px; color: var(--seam); }

/* ---------- 6. clinic ---------- */
.clinic { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 8vw, 110px) var(--pad) clamp(32px, 4vw, 48px); display: grid; grid-template-columns: 4fr 8fr; gap: 40px; align-items: start; }
.clinic h2 { max-width: 10ch; }
.facts-list { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 40px; }
.facts-list h3 { font-size: 18px; font-weight: 600; }
.facts-list p { margin-top: 4px; color: var(--seam); max-width: 38ch; }

/* ---------- 7. first visit ---------- */
.visit { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 88px) var(--pad); }
.visit__steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 56px); margin-top: 32px; counter-reset: v; }
.visit__steps li { counter-increment: v; }
.visit__steps li::before { content: counter(v); display: block; font: 500 64px/1 var(--serif); color: var(--seam); opacity: 0.55; margin-bottom: 14px; }
.visit__steps h3 { font-size: 19px; font-weight: 600; }
.visit__steps p { margin-top: 6px; color: var(--seam); max-width: 32ch; }

/* ---------- 8. faq ---------- */
.faq { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--pad); display: grid; grid-template-columns: 4fr 8fr; gap: 40px; align-items: start; }
.faq h2 { max-width: 12ch; }
.faq__list { display: grid; gap: 4px; }
.faq details { border-radius: 14px; padding: 0 20px; transition: background-color 0.2s; }
.faq details:hover { background: var(--row); }
.faq details[open] { background: #fff; }
.faq summary { list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative; font-size: 18px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font: 400 26px/1 var(--sans); color: var(--seam); }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { padding: 0 0 20px; color: var(--seam); max-width: 62ch; }

/* ---------- 9. booking ---------- */
.book { padding: 24px var(--pad) clamp(56px, 8vw, 100px); }
.book__plate { max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: 1fr minmax(0, 440px); gap: clamp(28px, 5vw, 72px); padding: clamp(28px, 5vw, 64px); border-radius: 24px; background: var(--xray); color: var(--film); scroll-margin-top: 72px; }
.book h2 { color: #fff; }
.book__copy > p { margin-top: 14px; max-width: 38ch; }
.book__facts { margin-top: 32px; display: grid; gap: 14px; }
.book__facts div { display: grid; grid-template-columns: 90px 1fr; gap: 16px; align-items: baseline; }
.book__facts dt { font-size: 14px; color: var(--film-2); }
.book__facts dd { color: #fff; }
.book__facts a { text-decoration: none; }
.form { position: relative; display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-size: 14px; color: var(--film-2); }
.form input, .form select { width: 100%; font: 400 16px var(--sans); color: #fff; background: rgba(201, 214, 220, 0.06); border: 1px solid rgba(201, 214, 220, 0.3); border-radius: 10px; padding: 14px; outline: none; transition: border-color 0.2s; }
.form select option { color: var(--ink); }
.form input:focus, .form select:focus { border-color: var(--nerve); }
.form input[aria-invalid='true'] { border-color: #f5a97f; }
.form__error { font-size: 14px; color: #f5a97f; }
.form__note { font-size: 13px; color: var(--film-2); text-align: center; }
.form__done { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; padding: 20px; border-radius: 16px; background: var(--xray); }
.form__done-title { font: 700 28px var(--serif); color: #fff; }
.form__done p:last-child { max-width: 34ch; margin: 0 auto; }

.foot { padding: 0 var(--pad) 40px; text-align: center; font-size: 14px; color: var(--seam); display: grid; gap: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .pricelist li { grid-template-columns: 1fr 140px 140px; }
  .pl__time { display: none; }
  .team { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; min-height: 0; }
  .section-head, .clinic, .faq { grid-template-columns: 1fr; gap: 16px; }
  .atlas__grid { grid-template-columns: 1fr; }
  .atlas__side { position: static; max-height: none; overflow: visible; order: 2; }
  .plate__view { height: 72svh; min-height: 420px; }
  .quotes, .visit__steps { grid-template-columns: 1fr; }
  .book__plate { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .pricelist li { grid-template-columns: 1fr auto; gap: 6px 16px; padding: 16px; }
  .pl__price { grid-column: 2; grid-row: 1; }
  .pl__show { grid-column: 1 / -1; justify-self: start; }
  .prices__note { padding-left: 16px; }
  .facts-list, .team { grid-template-columns: 1fr; }
  .views__btn, .nerves { padding: 8px 11px; font-size: 14px; }
  .timeline { padding: 12px; gap: 6px 12px; }
  .timeline__text { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
