:root {
  --navy: #0b2a3f;
  --navy-deep: #071c2b;
  --teal: #12b5a0;
  --teal-dark: #0a8f7f;
  --mint: #35d0ba;
  --ink: #14242f;
  --muted: #5b6b76;
  --line: #e2eaee;
  --tint: #f2f8f8;
  --white: #fff;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(11, 42, 63, .08);
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-dark); }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; text-wrap: balance; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: 20px; letter-spacing: -.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 780px; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 26px; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { color: var(--white); border-color: rgba(255, 255, 255, .5); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-outline { color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-sm { padding: 9px 18px; font-size: 15px; }
.btn-block { width: 100%; }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 4px 20px rgba(11, 42, 63, .06); }
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.logo-mark { width: 38px; height: 38px; flex: none; }
.logo-text { font-size: 21px; font-weight: 700; letter-spacing: -.02em; }
.logo-text b { color: var(--teal); }
.logo-light { color: var(--white); }

.nav-panel { display: flex; align-items: center; gap: 26px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.nav-links a:hover { color: var(--teal-dark); }

.nav-toggle { display: none; width: 44px; height: 44px; padding: 11px 9px; background: none; border: 0; cursor: pointer; }
.nav-toggle span { display: block; height: 2px; margin: 5px 0; background: var(--navy); border-radius: 2px; }

/* Первый экран */
.hero {
  position: relative; color: var(--white);
  background-color: var(--navy); background-size: cover; background-position: 62% center;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(7, 28, 43, .94) 0%, rgba(7, 28, 43, .78) 45%, rgba(7, 28, 43, .2) 100%);
}
.hero-inner { position: relative; padding-top: clamp(64px, 11vw, 130px); padding-bottom: clamp(56px, 9vw, 110px); }
.hero h1 { font-size: clamp(34px, 5.6vw, 64px); max-width: 15em; }
.hero-lead { max-width: 36em; margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); color: rgba(255, 255, 255, .86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.badge {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 22px; padding: 7px 14px;
  font-size: 14px; font-weight: 500; border-radius: 999px;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .22);
}
.badge i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(53, 208, 186, .25); }

.hero-facts { display: flex; flex-wrap: wrap; gap: 14px 40px; margin-top: 52px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .18); max-width: 640px; }
.hero-facts li { font-size: 14px; color: rgba(255, 255, 255, .72); }
.hero-facts strong { display: block; font-size: 19px; color: var(--white); }

/* Секции */
.section { padding: clamp(60px, 9vw, 108px) 0; }
.section-tint { background: var(--tint); }
.section-dark { background: var(--navy); color: var(--white); }
.eyebrow { margin-bottom: 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--teal-dark); }
.section-dark .eyebrow { color: var(--mint); }
.section-lead { max-width: 44em; margin-top: 18px; font-size: 19px; color: var(--muted); }
.section-dark .section-lead { color: rgba(255, 255, 255, .78); }
.note { margin-top: 26px; color: var(--muted); }

/* Карточки */
.cards { display: grid; gap: 20px; margin-top: 44px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.cards-1 { margin-top: 0; }
.card { padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 16px; }
.card-flat { box-shadow: none; border-top: 3px solid var(--teal); border-radius: 0 0 var(--radius) var(--radius); }
.card-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 20px; border-radius: 14px; background: var(--tint); color: var(--teal-dark); }
.card-icon svg { width: 26px; height: 26px; }

/* Шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
.steps li { position: relative; padding: 28px 24px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); }
.steps h3 { margin: 16px 0 8px; }
.steps p { color: var(--muted); font-size: 16px; }
.step-num { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 700; }

/* Галерея */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.gallery figure { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: #23272b; }
.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.gallery-main { grid-column: 1 / -1; }
.gallery-main img { aspect-ratio: 21 / 9; object-position: center 40%; }
.gallery-plan { background: var(--white); border: 1px solid var(--line); }
.gallery-plan img { object-fit: contain; padding: 10px 10px 46px; }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 30px 18px 14px;
  font-size: 14px; font-weight: 500; color: var(--white);
  background: linear-gradient(transparent, rgba(7, 28, 43, .85));
}

/* 3D-доктора */
.doctors { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.checks { margin: 28px 0 34px; display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 32px; color: rgba(255, 255, 255, .88); }
.checks li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--teal) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.3l2.7 2.7L13 6.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.doctors-media { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: end; }
.doctor-shot { position: relative; margin: 0; overflow: hidden; border-radius: var(--radius); background: #000; border: 1px solid rgba(255, 255, 255, .14); }
.doctor-shot img { width: 100%; aspect-ratio: 3 / 4.3; object-fit: cover; }
.doctor-shot-b { margin-bottom: 36px; }
.doctor-shot figcaption { position: absolute; left: 12px; bottom: 12px; padding: 5px 12px; font-size: 13px; border-radius: 999px; background: rgba(7, 28, 43, .78); color: var(--white); }

/* Сообщества */
.tags { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.tags li { padding: 12px 20px; font-weight: 500; background: var(--white); border: 1px solid var(--line); border-radius: 999px; }

/* Партнёрам */
.partners { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.partners .btn { margin-top: 30px; }

/* Дорожная карта */
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 44px; }
.roadmap li { padding: 26px 24px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.roadmap h3 { margin: 14px 0 8px; }
.roadmap p { color: var(--muted); font-size: 16px; }
.roadmap-state { display: inline-block; padding: 4px 12px; font-size: 13px; font-weight: 600; border-radius: 999px; background: var(--tint); color: var(--muted); }
.roadmap .is-done .roadmap-state { background: var(--navy); color: var(--white); }
.roadmap .is-now { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18, 181, 160, .15); }
.roadmap .is-now .roadmap-state { background: var(--teal); color: var(--white); }

/* Вопросы */
.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { position: relative; padding: 22px 40px 22px 0; font-size: 19px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 28px; font-weight: 400; color: var(--teal-dark); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 40px 24px 0; color: var(--muted); }

/* Заявка */
.signup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.signup-form { padding: 32px; background: var(--white); color: var(--ink); border-radius: var(--radius); }
.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; font: inherit; color: inherit;
  background: var(--white); border: 1px solid #cbd6dc; border-radius: 12px;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }
.field textarea { resize: vertical; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 20px; font-size: 14px; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--teal); }
.form-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin-bottom: 18px; padding: 14px 16px; border-radius: 12px; font-weight: 500; }
.form-msg-ok { background: #e3f7f3; color: #076b5f; }
.form-msg-error { background: #fdecec; color: #a12a2a; }

/* Подвал */
.site-footer { padding: 56px 0 32px; background: var(--navy-deep); color: rgba(255, 255, 255, .72); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-about { margin-top: 14px; max-width: 26em; }
.footer-links { display: grid; gap: 10px; align-content: start; }
.footer-links a { color: rgba(255, 255, 255, .82); text-decoration: none; }
.footer-links a:hover { color: var(--mint); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .12); font-size: 13px; }
.disclaimer { max-width: 62em; margin-bottom: 14px; color: rgba(255, 255, 255, .6); }

/* Внутренние страницы */
.page-main { padding: clamp(40px, 7vw, 80px) 0; min-height: 60vh; }
.page-title { margin-bottom: 24px; font-size: clamp(30px, 4.5vw, 46px); }
.post-meta { margin-bottom: 20px; font-size: 14px; color: var(--muted); }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { margin-top: 1.6em; font-size: 28px; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content img { border-radius: var(--radius); }
.post-item { padding: 26px 0; border-bottom: 1px solid var(--line); }
.post-item h2 { font-size: 26px; margin-bottom: 6px; }
.post-item h2 a { color: var(--ink); text-decoration: none; }
.post-item h2 a:hover { color: var(--teal-dark); }
.pagination { margin-top: 32px; }
.pagination .nav-links { gap: 8px; }
.pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; }

/* Адаптив */
@media (max-width: 1020px) {
  .cards-4, .steps, .roadmap { grid-template-columns: repeat(2, 1fr); }
  .doctors, .partners, .signup-grid { grid-template-columns: 1fr; gap: 40px; }
  .doctors-media { max-width: 560px; }

  .nav-toggle { display: block; }
  .nav-panel {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 18px; padding: 20px;
    background: var(--white); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(11, 42, 63, .1);
  }
  .nav-open .nav-panel { display: flex; }
  .nav-panel .nav-links { flex-direction: column; gap: 4px; }
  .nav-panel .nav-links a { display: block; padding: 10px 0; font-size: 17px; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .cards-3, .gallery, .footer-grid { grid-template-columns: 1fr; }
  .gallery-main img { aspect-ratio: 4 / 3; }
  .hero { background-position: 58% center; }
  .hero::before { background: linear-gradient(180deg, rgba(7, 28, 43, .9) 0%, rgba(7, 28, 43, .8) 100%); }
  .hero-actions .btn { width: 100%; }
  .signup-form { padding: 22px; }
}

@media (max-width: 520px) {
  .cards-4, .steps, .roadmap { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .faq summary::after { transition: none; }
}
