/* БЕРНШТАЙН — клиника эстетической стоматологии. Ночь, шампанское, янтарь.
   Playfair Display (заголовки, курсив — голос бренда) + Manrope (текст, светлое начертание).
   Медленно, просторно, ничего лишнего. Главное — зуб в янтаре и сцена с винирами. */
:root {
  --night: #0e0c0a;
  --night-2: #16130f;
  --night-3: #1f1a15;
  --ivory: #f2ebe0;
  --ivory-2: #d8cfc2;
  --smoke: #a39886;
  --champ: #d9c3a0;
  --champ-2: #e9d8bb;
  --amber: #c8862e;
  --line: rgba(242, 235, 224, .12);
  --line-2: rgba(217, 195, 160, .3);
  --serif: "Playfair Display", "Times New Roman", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --g: clamp(18px, 5vw, 80px);
  --max: 1440px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body { margin: 0; background: var(--night); color: var(--ivory); font: 300 17px/1.7 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0; line-height: 1.04; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: clamp(38px, 5vw, 76px); }
h2 em, h1 em { font-style: italic; color: var(--champ); }
h3 { font-size: 26px; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 1px solid var(--champ); outline-offset: 4px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 99; background: var(--champ); color: var(--night); padding: 8px 12px; }
.skip:focus { left: 8px; }
.muted { color: var(--smoke); }
body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .06; 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 54px; padding: 0 30px; border: 1px solid transparent; border-radius: 0; background: none; font-weight: 400; font-size: 15px; letter-spacing: .04em; text-decoration: none; transition: background-color .4s var(--ease), color .4s, border-color .4s; white-space: nowrap; }
.btn svg { width: 22px; height: 22px; transition: transform .5s var(--ease); }
.btn:hover svg { transform: translateX(6px); }
.btn--lg { min-height: 62px; padding: 0 38px; }
.btn--gold { background: var(--champ); color: var(--night); }
.btn--gold:hover { background: var(--champ-2); }
.btn--line { border-color: var(--line-2); color: var(--ivory); }
.btn--line:hover { border-color: var(--champ); color: var(--champ); }

/* Шапка: меню слева, монограмма в центре, консультация справа */
.top { position: fixed; inset: 0 0 auto; z-index: 60; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 22px var(--g); transition: transform .6s var(--ease), background-color .5s, padding .5s; }
.top.is-scrolled { background: rgba(14, 12, 10, .72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); padding-top: 14px; padding-bottom: 14px; }
.top.is-hidden { transform: translateY(-100%); }
.menu-open .top { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; }
.menu-btn { justify-self: start; display: inline-flex; align-items: center; gap: 14px; border: 0; background: none; padding: 8px 0; font-size: 14px; letter-spacing: .08em; color: var(--ivory); }
.menu-btn__l { display: grid; gap: 7px; width: 28px; }
.menu-btn__l i { display: block; height: 1px; background: currentColor; transition: transform .5s var(--ease), width .5s var(--ease); }
.menu-btn__l i:last-child { width: 60%; }
.menu-btn[aria-expanded="true"] .menu-btn__l i:first-child { transform: translateY(4px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__l i:last-child { width: 100%; transform: translateY(-4px) rotate(-45deg); }
.logo { display: grid; justify-items: center; gap: 2px; text-decoration: none; color: var(--champ); }
.logo svg { width: 38px; height: 38px; margin-bottom: 4px; }
.logo__w { font-family: var(--serif); font-size: 21px; letter-spacing: .14em; color: var(--ivory); text-transform: uppercase; line-height: 1; padding-left: .14em; }
.logo__s { font-size: 10px; letter-spacing: .26em; color: var(--smoke); text-transform: uppercase; padding-left: .26em; }
.top.is-scrolled .logo svg, .top.is-scrolled .logo__s { display: none; }
.top__cta { justify-self: end; border: 1px solid var(--line-2); background: none; padding: 12px 20px; font-size: 14px; letter-spacing: .04em; transition: background-color .4s, color .4s, border-color .4s; }
.top__cta:hover { background: var(--champ); color: var(--night); border-color: var(--champ); }
.menu { position: fixed; inset: 0; z-index: 55; background: var(--night); display: grid; grid-template-columns: 1.4fr .6fr; align-items: end; gap: 48px; padding: 140px var(--g) 60px; background-image: radial-gradient(60% 60% at 80% 20%, rgba(200, 134, 46, .16), transparent 70%); }
.menu__links { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.menu__links li { counter-increment: m; overflow: hidden; border-bottom: 1px solid var(--line); }
.menu__links a { display: flex; align-items: baseline; gap: 28px; padding: 8px 0; text-decoration: none; font-family: var(--serif); font-size: clamp(34px, 5vw, 70px); line-height: 1.12; transition: color .4s, padding-left .6s var(--ease); }
.menu__links a::before { content: counter(m, upper-roman); font-family: var(--sans); font-size: 13px; color: var(--champ); width: 3em; letter-spacing: .1em; flex: none; }
.menu__links a:hover { color: var(--champ); padding-left: 16px; font-style: italic; }
.menu__side { color: var(--smoke); display: grid; gap: 18px; font-size: 16px; }
.menu__side a { text-decoration: none; color: var(--ivory); }

/* Первый экран */
.hero { position: relative; height: 100svh; min-height: 680px; overflow: hidden; }
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(14, 12, 10, .85) 0%, rgba(14, 12, 10, .35) 40%, transparent 65%), linear-gradient(0deg, var(--night) 0%, transparent 25%); }
.hero__copy { position: absolute; z-index: 2; left: var(--g); bottom: 13svh; max-width: 640px; }
.hero__k { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--champ); margin-bottom: 26px; }
.hero__title { font-size: clamp(64px, 9vw, 150px); line-height: .92; letter-spacing: -.02em; overflow: hidden; padding-bottom: .06em; }
.hero__title span, .hero__title em { display: inline-block; }
.hero__lead { margin-top: 28px; max-width: 32em; color: var(--ivory-2); font-size: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__note { position: absolute; z-index: 2; right: var(--g); bottom: 13svh; display: grid; text-align: right; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--smoke); }
.hero__note span:last-child { color: var(--champ); }
.hero__scroll { position: absolute; z-index: 2; left: 50%; bottom: 28px; width: 1px; height: 60px; background: var(--line); overflow: hidden; }
.hero__scroll i { position: absolute; left: 0; top: -30px; width: 1px; height: 30px; background: var(--champ); animation: drop 2.2s var(--ease) infinite; }
@keyframes drop { to { top: 60px; } }

/* Манифест */
.manifest { max-width: 1180px; margin: 0 auto; padding: clamp(110px, 14vw, 200px) var(--g) clamp(80px, 10vw, 140px); }
.manifest__k { font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--champ); margin-bottom: 32px; }
.manifest__text { font-family: var(--serif); font-size: clamp(28px, 3.4vw, 50px); line-height: 1.32; letter-spacing: -.005em; }
.manifest__facts { display: grid; grid-template-columns: repeat(3, 1fr); margin: 70px 0 0; border-top: 1px solid var(--line); }
.manifest__facts div { padding: 26px 26px 0 0; display: flex; flex-direction: column-reverse; gap: 6px; }
.manifest__facts div + div { padding-left: 26px; border-left: 1px solid var(--line); }
.manifest__facts dt { font-size: 14px; color: var(--smoke); }
.manifest__facts dd { margin: 0; font-family: var(--serif); font-size: clamp(48px, 5vw, 76px); line-height: 1; color: var(--champ); }

/* Дизайн улыбки */
.smile__pin { position: relative; height: 100svh; overflow: hidden; background: #13100d; }
.smile__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.smile__ui { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto 1fr auto; padding: 120px var(--g) 50px; pointer-events: none; }
.smile__ui h2 { grid-column: 1; }
.smile__steps { grid-column: 1; grid-row: 3; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; max-width: 980px; border-top: 1px solid var(--line); }
.smile__steps li { padding: 20px 20px 0 0; color: var(--smoke); transition: color .5s; position: relative; }
.smile__steps li::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 0; background: var(--champ); transition: width .8s var(--ease); }
.smile__steps li.on::before, .smile__steps li.done::before { width: 100%; }
.smile__steps b { display: block; font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--ivory-2); margin-bottom: 6px; }
.smile__steps li.on { color: var(--ivory-2); }
.smile__steps li.on b { color: var(--champ); font-style: italic; }
.smile__steps span { display: block; font-size: 14.5px; line-height: 1.55; }
.smile__shade { grid-column: 2; grid-row: 1; justify-self: end; text-align: right; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--smoke); }
.smile__shade b { display: block; font-family: var(--serif); font-weight: 400; font-size: 64px; letter-spacing: 0; color: var(--ivory); line-height: 1; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* Заголовки секций */
.sec-head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px 80px; align-items: end; margin-bottom: 56px; }
.sec-head p { color: var(--smoke); max-width: 30em; }

/* Направления */
.services { max-width: var(--max); margin: 0 auto; padding: clamp(110px, 13vw, 190px) var(--g) clamp(80px, 10vw, 140px); position: relative; }
.svc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc li { border-bottom: 1px solid var(--line); }
.svc__row { width: 100%; display: grid; grid-template-columns: 60px 1.1fr 1.3fr .7fr; gap: 20px 32px; align-items: baseline; padding: 30px 0; border: 0; background: none; text-align: left; transition: padding-left .7s var(--ease), color .4s; }
.svc__i { font-size: 13px; color: var(--champ); letter-spacing: .1em; }
.svc__n { font-family: var(--serif); font-size: clamp(26px, 2.6vw, 40px); line-height: 1.1; }
.svc__d { color: var(--smoke); font-size: 15.5px; }
.svc__p { justify-self: end; text-align: right; font-size: 15.5px; color: var(--champ); white-space: nowrap; }
.svc__row:hover { padding-left: 22px; }
.svc__row:hover .svc__n { font-style: italic; color: var(--champ); }
.svc__peek { position: fixed; left: 0; top: 0; z-index: 30; margin: 0; width: 300px; aspect-ratio: 4 / 5; overflow: hidden; pointer-events: none; opacity: 0; transform: translate3d(-999px, 0, 0); transition: opacity .4s; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
.svc__peek.on { opacity: 1; }
.svc__peek img { width: 100%; height: 100%; object-fit: cover; }

/* Путь гостя */
.path__pin { height: 100svh; display: grid; grid-template-rows: auto 1fr; padding: 130px 0 60px; overflow: hidden; }
.path__head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; padding: 0 var(--g); margin-bottom: 40px; }
.path__head p { color: var(--smoke); max-width: 26em; }
.path__track { display: flex; gap: 22px; padding: 0 var(--g); align-items: stretch; width: max-content; will-change: transform; }
.pcard { width: clamp(300px, 28vw, 420px); padding: 34px; border: 1px solid var(--line); background: linear-gradient(160deg, var(--night-3), var(--night-2)); display: flex; flex-direction: column; gap: 16px; }
.pcard__n { font-family: var(--serif); font-style: italic; font-size: 56px; line-height: 1; color: var(--champ); }
.pcard h3 { font-size: 34px; margin-top: auto; }
.pcard p { color: var(--smoke); }
.pcard--img { padding: 0; border: 0; width: clamp(260px, 22vw, 340px); overflow: hidden; }
.pcard--img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.85); }

/* Врачи */
.doctors { max-width: var(--max); margin: 0 auto; padding: clamp(110px, 13vw, 190px) var(--g) clamp(80px, 10vw, 140px); }
.dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.dcard figure { margin: 0 0 22px; aspect-ratio: 3 / 4; overflow: hidden; background: var(--night-3); }
.dcard img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; filter: grayscale(1) contrast(1.05) brightness(.92); transition: filter 1s var(--ease), transform 1.4s var(--ease); }
.dcard:hover img { filter: grayscale(0) contrast(1) brightness(1); transform: scale(1.03); }
.dcard--low { margin-top: 80px; }
.dcard h3 { font-size: 32px; }
.dcard__r { color: var(--champ); font-style: italic; font-family: var(--serif); font-size: 18px; margin: 4px 0 12px; }
.dcard p:last-child { color: var(--smoke); font-size: 15.5px; }

/* Вилла */
.villa { max-width: var(--max); margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--g); display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px 80px; align-items: center; }
.villa__copy p { margin-top: 26px; color: var(--ivory-2); max-width: 30em; }
.villa__grid { display: grid; grid-template-columns: 1.2fr 1fr; grid-template-rows: 260px 260px; gap: 16px; }
.villa__grid figure { margin: 0; overflow: hidden; }
.villa__grid img { width: 100%; height: 118%; object-fit: cover; filter: saturate(.85); }
.v1 { grid-row: span 2; }

/* Гости из других городов */
.travel { max-width: var(--max); margin: 0 auto; padding: clamp(60px, 8vw, 110px) var(--g); border-top: 1px solid var(--line); display: grid; grid-template-columns: .8fr 1.2fr; gap: 40px 80px; }
.travel h2 { font-size: clamp(32px, 3.6vw, 54px); }
.travel__list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.travel__list li { display: grid; gap: 10px; align-content: start; padding-top: 20px; border-top: 1px solid var(--line-2); }
.travel__list b { font-family: var(--serif); font-weight: 400; font-size: 24px; color: var(--champ); }
.travel__list span { color: var(--smoke); font-size: 15.5px; }

/* Консультация */
.contact { position: relative; padding: clamp(110px, 13vw, 180px) var(--g); display: grid; grid-template-columns: 1fr 1fr; gap: 48px 100px; max-width: var(--max); margin: 0 auto; }
.contact::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); z-index: -1; background: radial-gradient(50% 60% at 20% 30%, rgba(200, 134, 46, .14), transparent 70%), var(--night-2); }
.contact > * { min-width: 0; }
.contact__copy p { margin-top: 24px; color: var(--ivory-2); max-width: 28em; }
.contact address { font-style: normal; font-family: var(--serif); font-size: 24px; line-height: 1.4; margin: 36px 0 10px; }
.contact address a { text-decoration: none; color: var(--champ); }
.cform { display: grid; gap: 22px; }
.f { display: grid; gap: 8px; }
.f > span { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--smoke); }
.f input, .f select { width: 100%; min-height: 54px; padding: 0 2px; border: 0; border-bottom: 1px solid var(--line-2); background: transparent; color: var(--ivory); font-size: 18px; font-weight: 300; border-radius: 0; }
.f select option { background: var(--night-2); color: var(--ivory); }
.f input:focus, .f select:focus { outline: none; border-bottom-color: var(--champ); }
.f.bad input { border-bottom-color: #d0705a; }
.err { color: #e09078; font-size: 13.5px; font-style: normal; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg button { min-height: 46px; padding: 0 20px; border: 1px solid var(--line-2); background: none; font-size: 15px; transition: background-color .3s, color .3s, border-color .3s; }
.seg button[aria-checked="true"] { background: var(--champ); color: var(--night); border-color: var(--champ); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--smoke); }
.check input { width: 18px; height: 18px; accent-color: var(--champ); margin-top: 3px; flex: none; }
.cform .btn { justify-self: start; margin-top: 8px; }

.foot { padding: 70px var(--g) 50px; border-top: 1px solid var(--line); color: var(--smoke); font-size: 14px; display: grid; gap: 10px; }
.foot__mark { display: flex; align-items: center; gap: 18px; color: var(--champ); margin-bottom: 20px; }
.foot__mark svg { width: 56px; height: 56px; }
.foot__mark span { font-family: var(--serif); font-size: clamp(40px, 7vw, 110px); color: var(--ivory); letter-spacing: .06em; text-transform: uppercase; line-height: 1; }
.foot__warn { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--ivory-2); }
.foot__credit { font-size: 13px; opacity: .75; }

.ok { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(14, 12, 10, .8); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.ok__card { width: min(520px, 100%); padding: 44px 40px 36px; background: var(--night-2); border: 1px solid var(--line-2); text-align: center; }
.ok__mono { width: 60px; height: 60px; color: var(--champ); margin: 0 auto 18px; }
.ok__card h3 { font-size: 34px; margin-bottom: 14px; }
.ok__card p { color: var(--ivory-2); }
.ok__card dl { margin: 22px 0; border-top: 1px solid var(--line); text-align: left; }
.ok__card dl div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.ok__card dt { color: var(--smoke); }
.ok__card dd { margin: 0; color: var(--champ); text-align: right; }
.ok__card .muted { font-size: 14px; margin-bottom: 22px; }

@media (max-width: 1100px) {
  .svc__row { grid-template-columns: 44px 1fr auto; }
  .svc__d { grid-column: 2 / -1; grid-row: 2; }
  .dgrid { grid-template-columns: 1fr 1fr; }
  .dcard--low { margin-top: 0; }
  .travel, .villa { grid-template-columns: 1fr; }
}
@media (max-width: 899px) {
  .top { grid-template-columns: auto 1fr auto; padding: 16px var(--g); }
  .menu-btn span:last-child { display: none; }
  .logo svg, .logo__s { display: none; }
  .logo__w { font-size: 18px; }
  .top__cta { display: none; }
  .top::after { content: ""; width: 28px; }
  .menu { grid-template-columns: 1fr; padding-top: 110px; align-items: start; }
  .hero { min-height: 640px; }
  .hero::after { background: linear-gradient(0deg, var(--night) 40%, rgba(14, 12, 10, .6) 62%, rgba(14, 12, 10, 0) 80%); }
  .hero__copy { left: var(--g); right: var(--g); bottom: 80px; }
  .hero__k { font-size: 11.5px; margin-bottom: 16px; }
  .hero__title { font-size: 19vw; }
  .hero__lead { font-size: 16px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__note { display: none; }
  .manifest__facts { grid-template-columns: 1fr; }
  .manifest__facts div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .manifest__facts div { padding: 20px 0; }
  .smile__ui { grid-template-columns: 1fr; padding: 100px var(--g) 30px; }
  .smile__shade { grid-column: 1; grid-row: 2; justify-self: start; text-align: left; align-self: start; margin-top: 10px; }
  .smile__shade b { font-size: 44px; }
  .smile__steps { grid-template-columns: 1fr; border-top: 0; }
  .smile__steps li { display: none; padding: 18px; background: rgba(14, 12, 10, .72); border-top: 1px solid var(--champ); }
  .smile__steps li.on { display: block; }
  .sec-head { grid-template-columns: 1fr; }
  .svc__row { grid-template-columns: 1fr; gap: 6px; padding: 24px 0; }
  .svc__i { display: none; }
  .svc__d, .svc__p { grid-column: auto; grid-row: auto; justify-self: start; text-align: left; }
  .svc__row:hover { padding-left: 0; }
  .path__pin { height: auto; padding: 90px 0 40px; display: block; }
  .path__track { width: auto; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 10px; }
  .path__track::-webkit-scrollbar { display: none; }
  .pcard { flex: 0 0 78vw; scroll-snap-align: start; padding: 26px; }
  .pcard--img { flex-basis: 60vw; }
  .dgrid { grid-template-columns: 1fr; gap: 40px; }
  .villa__grid { grid-template-rows: 200px 200px; }
  .travel__list { grid-template-columns: 1fr; }
  .contact { grid-template-columns: 1fr; }
  .cform .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; } body::after { display: none; } }
