/* Эндокринология.рф — стили по макету Figma «MEDO Clinic / ЭНДОКРИНОЛОГИЯ.РФ» (десктоп 1440, мобайл 390) */

:root {
  --navy: #0b1a3e;
  --text: #55617d;
  --blue: #7c9bea;
  --border: #d7dfec;
  --bg: #eaeff7;
  --bg-soft: #f2f4f8;
  --red: #ed3338;
  --hero-grad: linear-gradient(139.98deg, #0a1836 13.2%, #0e2049 46.3%, #071229 86.8%);
  --pad-x: clamp(16px, 5.56vw, 80px);
  --font: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-logo: 'Oswald', 'Arial Narrow', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--navy); font: 400 16px/1.5 var(--font-ui); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding-inline: var(--pad-x); }
.section { padding-block: 96px; }
.h2 { font: 600 42px/1.2 var(--font); letter-spacing: -.02em; color: var(--navy); }
.h2--light { color: #fff; }
.h2--xl { font-size: 48px; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 32px; }
.head__text { font-size: 16px; line-height: 1.55; color: var(--text); }
.head__text--narrow { max-width: 450px; line-height: 1.5; }

/* Кнопка-«пилюля» со стрелкой */
.pill { display: inline-flex; align-items: center; gap: 12px; padding: 6px 6px 6px 24px; border-radius: 100px; background: #fff; color: var(--navy); font: 500 14.5px/1.2 var(--font-ui); white-space: nowrap; transition: background .2s, box-shadow .2s, transform .2s; }
.pill__arr { width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; transition: transform .2s; }
.pill:hover { box-shadow: 0 8px 24px -8px rgba(124, 155, 234, .6); }
.pill:hover .pill__arr { transform: translateX(3px); }
.pill:active { transform: translateY(1px); }
.pill:focus-visible, .filter:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.pill--lg { font-size: 16px; }
.pill--dark { padding: 5px 5px 5px 20px; gap: 10px; background: var(--navy); color: #fff; font-size: 14px; }
.pill--dark .pill__arr { width: 30px; height: 30px; background: var(--blue); font-size: 14px; }
.pill--dark:hover { background: #16295a; }
.pill--block { width: 100%; justify-content: space-between; padding-block: 8px; font-size: 16px; }
.pill--block .pill__arr { width: 38px; height: 38px; }
.pill:disabled { opacity: .6; cursor: default; }

/* Навигация */
.nav { position: fixed; z-index: 50; top: 0; left: 0; right: 0; transition: background .25s, box-shadow .25s; }
.nav.is-scrolled { background: rgba(10, 24, 54, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .6); }
.nav__bar { max-width: 1440px; height: 100px; margin: 0 auto; padding: 0 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; transition: height .25s; }
.nav.is-scrolled .nav__bar { height: 72px; }
.logo { font: 500 22px/1 var(--font-logo); letter-spacing: -.5px; color: #fff; white-space: nowrap; }
.logo i { font-style: normal; color: var(--red); }
.nav__links { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 28px; }
.nav__links > a { font-size: 13.5px; color: rgba(255, 255, 255, .75); transition: color .2s; }
.nav__links > a:hover { color: #fff; }
.nav__links > a:first-child { margin-left: auto; }
.nav__phone { display: none; }
.nav__cta { width: 160px; margin-left: auto; justify-content: space-between; }
.nav__burger { display: none; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .12); align-items: center; justify-content: center; flex-direction: column; gap: 4px; }
.nav__burger span { display: block; width: 16px; height: 2px; background: #fff; border-radius: 1px; transition: transform .2s, opacity .2s; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 1. Первый экран */
.hero { background: var(--hero-grad); border-radius: 0 0 42px 42px; overflow: hidden; }
.hero__inner { position: relative; max-width: 1440px; height: 703px; margin: 0 auto; padding: 156px 80px 110px; }
.hero__copy { position: relative; z-index: 2; width: 766px; display: flex; flex-direction: column; align-items: flex-start; }
.hero__eyebrow { margin-bottom: 16px; font: 500 14px/1.2 var(--font); letter-spacing: .14em; color: var(--blue); }
.hero__title { margin-bottom: 24px; font: 600 58px/1.12 var(--font); letter-spacing: -.02em; color: #fff; }
.hero__text { margin-bottom: 48px; font: 400 16px/1.4 'Raleway', var(--font-ui); color: rgba(255, 255, 255, .8); }
.hero__visual { position: absolute; right: 0; bottom: -1px; width: 671px; height: 647px; overflow: hidden; pointer-events: none; }
.hero__visual img { position: absolute; top: 0; left: -19.87%; width: 128.51%; height: 100%; max-width: none; object-fit: cover; }

/* 2. С чем мы помогаем */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { height: 220px; padding: 24px; border: 1px solid var(--border); border-radius: 28px; background: #fff; box-shadow: 0 8px 16px rgba(11, 26, 62, .02); display: flex; flex-direction: column; gap: 20px; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .25s; }
.services .card:hover, .card--accent { border-color: var(--blue); box-shadow: 0 0 0 .5px var(--blue), 0 12px 28px -12px rgba(43, 94, 171, .25); }
.services .card:hover { transform: translateY(-3px); }
.services .card:hover .icon-circle, .card--accent .icon-circle { background: #edf2fd; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card__title { min-width: 0; font: 600 22px/1.25 var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-circle { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: #f4f7fc; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.card__body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; }
.card__body--center { justify-content: center; }
.card__text { font-size: 14px; line-height: 1.5; color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { padding: 6px 14px; border: 1px solid rgba(11, 26, 62, .08); border-radius: 100px; background: rgba(11, 26, 62, .03); font-size: 14px; line-height: 1.2; white-space: nowrap; }
.tags--sm .tag { font-weight: 500; font-size: 13px; }
.tags--xs .tag { font-size: 12px; }

/* 3. О нас */
.about { background: var(--bg-soft); }
.about__text { margin: 16px 0 32px; font-size: 16px; line-height: 1.5; color: var(--text); }
.bento { display: flex; gap: 32px; }
.bento__photo { flex: 1; min-width: 0; height: 480px; border: 1px solid var(--border); border-radius: 28px; overflow: hidden; box-shadow: 0 12px 24px rgba(11, 26, 62, .05); }
.bento__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.bento__photo:hover img { transform: scale(1.03); }
.bento__stats { width: 440px; flex-shrink: 0; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.stat { padding: 24px; border: 1px solid var(--border); border-radius: 28px; background: #fff; filter: drop-shadow(0 8px 8px rgba(11, 26, 62, .05)); display: flex; flex-direction: column; gap: 12px; }
.stat--row { flex-direction: row; align-items: center; justify-content: space-between; gap: 20px; }
.stat--row > div { display: flex; flex-direction: column; gap: 4px; }
.stat__num { font: 600 36px/1.2 var(--font); color: var(--blue); }
.stat__label { font: 500 16px/1.3 var(--font); color: var(--text); }
.stat__icon { width: 48px; height: 48px; flex-shrink: 0; border-radius: 50%; background: rgba(124, 155, 234, .08); display: flex; align-items: center; justify-content: center; }
.doctor-quote { margin-top: 32px; height: 288px; padding-right: 32px; border: 1px solid var(--border); border-radius: 28px; background: #fff; filter: drop-shadow(0 12px 16px rgba(11, 26, 62, .08)); display: flex; align-items: center; gap: 32px; }
.doctor-quote__avatar { position: relative; width: 320px; height: 100%; flex-shrink: 0; overflow: hidden; border: 1.5px solid #bfcfee; border-radius: 28px 0 0 28px; margin: -1px 0 -1px -1px; height: calc(100% + 2px); background: radial-gradient(circle at 50% 50%, #c8dcff 0%, #e8f0ff 55%, #f0f5ff 100%); box-shadow: 0 16px 40px -8px rgba(43, 94, 171, .16); }
.doctor-quote__avatar img { position: absolute; left: -8.39%; top: -48px; width: 116.77%; max-width: none; }
.doctor-quote__body { flex: 1; min-width: 0; height: 224px; display: flex; flex-direction: column; justify-content: space-between; }
.doctor-quote__name { margin-bottom: 12px; font: 700 32px/1.2 var(--font); }
.doctor-quote__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font: 400 16px var(--font); color: var(--text); }
.dot { color: var(--blue); }
.badge { padding: 6px 12px; border-radius: 100px; background: #edf1f8; color: var(--navy); }
.doctor-quote__text { font: 500 28px/1.5 var(--font); }

/* 4. Диагностика — путь */
.path { position: relative; padding: 72px 64px; border-radius: 42px; overflow: hidden; background: #02071a; }
.path__bg { position: absolute; left: 6.79%; top: -8.75%; width: 100%; height: 117.5%; max-width: none; object-fit: cover; pointer-events: none; }
.path__content { position: relative; display: flex; flex-direction: column; align-items: flex-start; }
.path .h2 { line-height: 1.15; }
.path__text { margin: 16px 0 32px; font-size: 16px; color: rgba(255, 255, 255, .8); }
.path__steps { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 32px; }
.path__step { padding: 24px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 18px; background: rgba(255, 255, 255, .06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; flex-direction: column; align-items: flex-start; gap: 14px; font-weight: 500; font-size: 20px; line-height: 1.2; color: #fff; transition: background .2s, border-color .2s; }
.path__step:hover { background: rgba(255, 255, 255, .1); border-color: rgba(124, 155, 234, .5); }
.chip { padding: 5px 14px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 100px; background: rgba(255, 255, 255, .1); font-size: 12.5px; color: var(--blue); }

/* 5. Исследования */
.research__inner { display: flex; gap: 40px; align-items: flex-start; }
.research__left { width: 496px; flex-shrink: 0; display: flex; flex-direction: column; gap: 24px; }
.note { padding: 24px; border: 1px solid #ede6c6; border-radius: 24px; background: #fdfaeb; display: flex; align-items: flex-start; gap: 16px; font-size: 14px; line-height: 1.45; }
.note__icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: rgba(209, 161, 31, .1); display: flex; align-items: center; justify-content: center; }
.illustration { position: relative; height: 280px; border-radius: 28px; overflow: hidden; background: linear-gradient(90deg, #0a1836, #0e2049); }
.illustration img { position: absolute; left: -28.62%; top: -13.57%; width: 128.6%; height: 127.14%; max-width: none; object-fit: cover; }
.research__right { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.research__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card--research { height: auto; min-height: 210px; padding: 28px; box-shadow: 0 8px 16px rgba(11, 26, 62, .03); }
.card--research.card--accent { min-height: 200px; border-width: 2px; box-shadow: 0 8px 16px rgba(11, 26, 62, .03); }
.card--short { min-height: 140px; }

/* 6. Врачи */
.doctors { padding-bottom: 96px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.filter { padding: 9px 20px; border: 1px solid var(--border); border-radius: 100px; background: #fff; font-size: 14px; line-height: 1.2; color: var(--text); transition: background .15s, color .15s, border-color .15s; }
.filter:hover { border-color: var(--blue); color: var(--navy); }
.filter.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.carousel { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad-x); scrollbar-width: none; cursor: grab; }
.carousel::-webkit-scrollbar { display: none; }
.carousel.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.carousel.is-dragging .doctor { pointer-events: none; }
.carousel__track { display: flex; gap: 16px; width: max-content; padding-inline: var(--pad-x); }
@media (min-width: 1025px) {
  .carousel { max-width: calc(1440px - 2 * var(--pad-x)); margin-inline: max(var(--pad-x), calc((100vw - 1440px) / 2 + var(--pad-x))); scroll-padding-inline: 0; }
  .carousel__track { padding-inline: 0; }
}
.doctor { width: 416px; height: 519px; flex-shrink: 0; scroll-snap-align: start; border: 1px solid var(--border); border-radius: 28px; background: #fff; overflow: hidden; display: flex; flex-direction: column; }
.doctor__photo { position: relative; flex: 1; min-height: 0; overflow: hidden; background: linear-gradient(128.9deg, #dce5f3 9.2%, #b9c8e4 100%); }
.doctor__photo img { position: absolute; left: 5.83%; top: -9.62%; width: 88.33%; max-width: none; user-select: none; }
.doctor--doctorgrekov .doctor__photo img { left: .67%; top: -13.94%; width: 98.65%; }
.doctor__exp { position: absolute; left: 14px; top: 14px; padding: 4px 12px; border-radius: 100px; background: #edf1f8; font: 400 14px var(--font); }
.doctor__body { padding: 16px 16px 24px; display: flex; flex-direction: column; align-items: flex-start; }
.doctor__body .tags { margin-bottom: 12px; }
.doctor__name { margin-bottom: 8px; font: 600 20px/1.3 var(--font); letter-spacing: -.01em; }
.doctor__about { margin-bottom: 24px; font-weight: 500; font-size: 14px; line-height: 1.3; color: var(--blue); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.scrollbar { position: relative; width: 360px; max-width: calc(100% - 32px); height: 4px; margin: 32px auto 0; border-radius: 100px; background: var(--border); overflow: hidden; }
.scrollbar span { position: absolute; left: 0; top: 0; height: 100%; width: 25%; border-radius: 100px; background: var(--navy); }

/* 7. Как проходит приём */
.visit .head { margin-bottom: 48px; }
.track { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); }
.track::before, .track::after { content: ''; position: absolute; z-index: 0; left: 0; top: 26.5px; height: 3px; border-radius: 3px; }
.track::before { right: 0; background: var(--border); }
.track::after { width: 0; background: var(--blue); box-shadow: 0 0 12px rgba(124, 155, 234, .6); transition: width 1.6s cubic-bezier(.4, 0, .2, 1); }
.track.is-visible::after { width: 100%; }
.track__step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.track__marker { position: relative; z-index: 1; width: 56px; height: 56px; margin-bottom: 16px; border: 2px solid var(--border); border-radius: 50%; background: #fff; filter: drop-shadow(0 8px 8px rgba(11, 26, 62, .13)); display: flex; align-items: center; justify-content: center; font: 600 16px var(--font); color: var(--text); }
.track__title { margin-bottom: 8px; font-weight: 600; font-size: 20px; line-height: 1.2; }
.track__text { font-size: 14px; line-height: 1.4; color: var(--text); }

/* 8. Финальный блок */
.final { padding: 64px 0 96px; }
.final .container { padding-inline: max(var(--pad-x), min(140px, 9.7vw)); }
.final__card { position: relative; padding: 96px 40px; border-radius: 42px; overflow: hidden; background: linear-gradient(157.93deg, #0a1836 7.1%, #0e2049 46.1%, #071229 78%); display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; }
.final__pattern { position: absolute; left: -93.53%; top: -47.54%; width: 183%; height: 234%; max-width: none; opacity: .5; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 62%); mask-image: linear-gradient(90deg, #000 45%, transparent 62%); }
.final__title { position: relative; font: 600 44px/1.15 var(--font); letter-spacing: -.02em; color: #fff; }
.final__text { position: relative; margin-bottom: 8px; font-size: 15.5px; color: rgba(255, 255, 255, .68); }
.final .pill { position: relative; }

/* Подвал */
.footer { font-family: var(--font-ui); color: #fff; }
.footer__main { background: linear-gradient(150.12deg, #0a1836 13.2%, #0e2049 46.3%, #071229 86.8%); padding-block: 64px; }
.footer__container { max-width: 1440px; margin: 0 auto; padding-inline: var(--pad-x); display: flex; flex-direction: column; gap: 32px; }
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo--footer { font-size: 26px; }
.footer__slogan { display: none; margin-top: 12px; font-size: 14px; line-height: 1.4; color: rgba(255, 255, 255, .47); }
.socials { display: flex; align-items: center; gap: 26px; }
.socials a { transition: opacity .2s; }
.socials a:hover { opacity: .75; }
.footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.footer__legal { display: flex; flex-direction: column; gap: 10px; max-width: 240px; font-size: 9.2px; line-height: 11px; letter-spacing: -.02em; color: rgba(255, 255, 255, .47); }
.footer__links { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; font-size: 14px; line-height: 1.2; color: rgba(255, 255, 255, .75); }
.footer__links a:hover, .footer__contact:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer__contacts { display: flex; flex-direction: column; gap: 32px; font-size: 16px; line-height: 20.9px; letter-spacing: -.02em; }
.footer__contact { display: block; margin-bottom: 4px; }
.footer__hint { font-size: 14px; line-height: 15.4px; letter-spacing: 0; color: rgba(255, 255, 255, .47); }
.footer__dev { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 15.4px; color: rgba(255, 255, 255, .47); }
.footer__disclaimer { background: #1a2748; padding: 27px var(--pad-x) 26px; text-align: center; font-size: 12px; line-height: 19.5px; color: rgba(255, 255, 255, .47); }
.footer__disclaimer p { max-width: 1310px; margin: 0 auto; }
.footer__warning { margin-top: 8px !important; font-weight: 700; font-size: 13.3px; letter-spacing: .02em; color: rgba(255, 255, 255, .75); }

/* Модальное окно */
.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal__overlay { position: absolute; inset: 0; background: rgba(7, 18, 41, .6); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal__dialog { position: relative; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; padding: 44px 36px 32px; border-radius: 28px; background: #fff; box-shadow: 0 30px 80px -20px rgba(7, 18, 41, .5); animation: pop .25s ease; }
.modal__close { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; font-size: 28px; line-height: 1; color: var(--text); }
.modal__close:hover { background: var(--bg-soft); color: var(--navy); }
.modal__form { display: flex; flex-direction: column; gap: 14px; }
.modal__title { padding-right: 24px; font: 600 28px/1.2 var(--font); letter-spacing: -.01em; }
.modal__text { margin-bottom: 8px; font-size: 15px; line-height: 1.5; color: var(--text); }
.modal__text a { color: var(--navy); font-weight: 600; }
.input { width: 100%; height: 56px; padding: 0 20px; border: 1px solid var(--border); border-radius: 100px; background: var(--bg-soft); font: 400 16px var(--font-ui); color: var(--navy); transition: border-color .15s, background .15s; }
.input::placeholder { color: rgba(85, 97, 125, .6); }
.input:focus, .input:focus-visible { outline: 0; border-color: var(--blue); background: #fff; }
.input:-webkit-autofill, .input:-webkit-autofill:hover { -webkit-text-fill-color: var(--navy); -webkit-box-shadow: 0 0 0 100px var(--bg-soft) inset; transition: background-color 9999s; }
.input.is-error { border-color: #d64545; background: #fff6f6; }
.form-error { font-size: 14px; color: #d64545; }
.consent { font-size: 12px; line-height: 1.5; color: var(--text); }
.consent a { text-decoration: underline; }
.modal__success { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.check { width: 56px; height: 56px; border-radius: 50%; background: #edf2fd; color: var(--blue); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 26px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
body.is-locked { overflow: hidden; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .track::after { width: 100%; transition: none; }
  *, *::before, *::after { animation: none !important; }
}

/* ---------- Адаптив ---------- */

@media (max-width: 1280px) {
  .nav__bar { padding-inline: var(--pad-x); }
  .nav__links { gap: 20px; }
  .hero__inner { padding-inline: var(--pad-x); }
  .hero__copy { width: 58%; }
  .hero__visual { width: 50%; }
  .hero__title { font-size: clamp(40px, 4.4vw, 58px); }
  .bento__stats { width: 36%; }
  .doctor-quote__text { font-size: 22px; }
  .research__left { width: 38%; }
}

@media (max-width: 1024px) {
  .nav__bar { height: 72px; }
  .nav.is-scrolled .nav__bar { height: 64px; }
  .nav__burger { display: flex; }
  .nav__links { position: fixed; top: 72px; left: 0; right: 0; height: calc(100vh - 72px); height: calc(100dvh - 72px); padding: 32px var(--pad-x); flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 0; background: var(--hero-grad); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; }
  .nav.is-scrolled .nav__links { top: 64px; }
  .nav.is-open { background: #0a1836; }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; }
  .nav__links > a { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); font: 500 22px/1.2 var(--font); color: #fff; }
  .nav__links > a:first-child { margin-left: 0; }
  .nav__links > .nav__phone { display: block; border: 0; color: var(--blue); }
  .nav__cta { width: 100%; margin: 16px 0 0; padding-block: 8px; font-size: 16px; }

  .section { padding-block: 72px; }
  .h2 { font-size: 34px; }
  .h2--xl { font-size: 38px; }
  .head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .head__text br { display: none; }

  .hero__inner { height: auto; padding-top: 112px; padding-bottom: 0; display: flex; flex-direction: column; }
  .hero__copy { width: 100%; max-width: 640px; }
  .hero__text { margin-bottom: 28px; }
  .hero__visual { position: relative; align-self: center; width: min(520px, 100%); height: auto; aspect-ratio: 671 / 560; margin-top: 8px; }
  .hero__visual img { height: auto; top: 0; }

  .services__grid { grid-template-columns: 1fr 1fr; }
  .bento { flex-direction: column; }
  .bento__photo { height: 380px; }
  .bento__stats { width: 100%; flex-direction: row; }
  .stat { flex: 1; }
  .doctor-quote { height: auto; flex-direction: column; align-items: stretch; padding: 0; gap: 0; overflow: hidden; }
  .doctor-quote__avatar { width: 100%; height: 320px; margin: 0; border: 0; border-bottom: 1.5px solid #bfcfee; border-radius: 0; }
  .doctor-quote__avatar img { left: 50%; top: -4%; width: 360px; transform: translateX(-50%); }
  .doctor-quote__body { height: auto; padding: 24px; gap: 24px; }
  .path { padding: 48px 32px; }
  .path__steps { grid-template-columns: 1fr 1fr; }
  .research__inner { flex-direction: column; }
  .research__left { width: 100%; }
  .research__right { width: 100%; }
  .track { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
  .track::before, .track::after { display: none; }
  .final .container { padding-inline: var(--pad-x); }
  .footer__cols { grid-template-columns: 1fr 1fr; row-gap: 40px; }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 76px; }
  .section { padding-block: 56px; }
  .h2 { font-size: 28px; line-height: 1.2; }
  .h2--xl { font-size: 28px; }
  .head { margin-bottom: 24px; }
  .head__text { font-size: 14px; }
  .logo { font-size: 20px; }

  .hero { border-radius: 0 0 28px 28px; }
  .hero__inner { padding-top: 96px; }
  .hero__eyebrow { font-size: 11px; margin-bottom: 12px; }
  .hero__title { font-size: 34px; line-height: 1.15; margin-bottom: 16px; }
  .hero__text { font-size: 14px; margin-bottom: 24px; }
  .hero__visual { width: 110%; }

  .services__grid { grid-template-columns: 1fr; gap: 12px; }
  .card { height: auto; min-height: 0; padding: 20px 16px; gap: 20px; border-radius: 20px; }
  .card__title { font-size: 18px; white-space: normal; }
  .icon-circle { width: 40px; height: 40px; }
  .tag { font-size: 12px; padding: 5px 12px; }

  .about__text { font-size: 14px; }
  .bento__photo { height: 240px; border-radius: 20px; }
  .bento__stats { flex-direction: column; gap: 12px; }
  .stat { padding: 16px 20px; border-radius: 20px; gap: 6px; }
  .stat__num { font-size: 28px; }
  .stat__label { font-size: 14px; }
  .doctor-quote { border-radius: 20px; }
  .doctor-quote__avatar { height: 300px; }
  .doctor-quote__body { padding: 20px 16px; }
  .doctor-quote__name { font-size: 20px; margin-bottom: 8px; }
  .doctor-quote__meta { font-size: 13px; gap: 8px; }
  .doctor-quote__text { font-size: 16px; }

  .diagnostics .container { padding-inline: var(--pad-x); }
  .path { padding: 32px 16px 24px; border-radius: 28px; }
  .path__bg { left: -10%; top: 20%; width: 160%; height: auto; opacity: .7; }
  .path__text { font-size: 14px; }
  .path .h2 br { display: none; }
  .path__steps { grid-template-columns: 1fr; gap: 10px; }
  .path__step { padding: 16px; font-size: 17px; gap: 10px; }
  .path .pill { width: 100%; justify-content: space-between; }

  .research__left { gap: 16px; }
  .note { padding: 16px; font-size: 13px; }
  .illustration { height: 200px; border-radius: 20px; }
  .research__row { grid-template-columns: 1fr; gap: 12px; }
  .research__right { gap: 12px; }
  .card--research { min-height: 0; padding: 20px 16px; }

  .filters { gap: 6px; margin-bottom: 20px; }
  .filter { padding: 7px 12px; font-size: 12px; }
  .carousel__track { gap: 12px; }
  .doctor { width: min(320px, calc(100vw - 56px)); height: 470px; border-radius: 20px; }
  .doctor__name { font-size: 18px; }

  .track { grid-template-columns: 1fr; row-gap: 20px; }
  .track::before { display: block; left: 19px; right: auto; top: 20px; bottom: 30px; width: 2px; height: auto; }
  .track__step { display: grid; grid-template-columns: 40px 1fr; column-gap: 16px; text-align: left; align-items: start; }
  .track__marker { grid-row: span 2; width: 40px; height: 40px; margin: 0; font-size: 13px; }
  .track__title { font-size: 17px; margin: 2px 0 4px; }
  .track__text { font-size: 13px; }

  .final { padding: 24px 0 56px; }
  .final__card { padding: 40px 20px; border-radius: 28px; }
  .final__title { font-size: 24px; }
  .final__title br { display: none; }
  .final__text { font-size: 14px; }
  .final .pill { font-size: 13.5px; }

  .footer__main { padding-block: 40px; }
  .footer__top { align-items: flex-start; }
  .logo--footer { font-size: 22px; }
  .footer__slogan { display: block; }
  .socials { gap: 12px; }
  .socials img { width: 24px; height: auto; }
  .footer__cols { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
  .footer__legal { grid-column: 1 / -1; order: -1; max-width: none; }
  .footer__links { gap: 20px; }
  .footer__contacts { grid-column: 1 / -1; gap: 20px; }
  .footer__disclaimer { text-align: left; }
  .modal { align-items: flex-end; padding: 0; }
  .modal__dialog { max-width: none; border-radius: 24px 24px 0 0; padding: 32px 16px 20px; }
  .modal__title { font-size: 24px; }
}

/* Юридические страницы */
.legal-page .nav { background: #0a1836; }
.legal-page .nav__bar { height: 76px; }
.legal { max-width: 920px; padding-top: 136px; padding-bottom: 80px; }
.legal__crumbs { font-size: 14px; color: var(--text); margin-bottom: 16px; }
.legal__crumbs a { text-decoration: underline; text-underline-offset: 3px; }
.legal .h2 { margin-bottom: 32px; }
.legal__body { font-size: 16px; line-height: 1.6; }
.legal__body h2 { margin: 32px 0 12px; font: 600 22px/1.3 var(--font); }
.legal__body p, .legal__body ul { margin-bottom: 12px; }
.legal__body ul { padding-left: 22px; list-style: disc; }
.legal__body li { margin-bottom: 6px; }
.legal__body a { text-decoration: underline; }
.legal-page .footer__disclaimer a { color: inherit; }
@media (max-width: 1024px) { .legal-page .nav__bar { height: 64px; } .legal { padding-top: 104px; } }
