/* =========================================================
   Доктор Гальченко — главная
   ========================================================= */

/* ---------- CSS variables ---------- */
:root {
  /* Light theme */
  --bg:                 #ffffff;
  --bg-soft:            #f5f6f8;
  --bg-card:            #ffffff;
  --bg-dark:            #11192c;     /* тёмные секции */
  --bg-dark-soft:       #1a2540;

  --text:               #14171c;
  --text-secondary:     #4b5563;
  --text-muted:         #9aa3b2;     /* для серых половин заголовков */
  --text-on-dark:       #f4f6fa;
  --text-on-dark-muted: #6b7791;

  --accent:             #1e3a5f;     /* тёмно-синий */
  --accent-hover:       #294f80;
  --accent-light:       #c9d3e2;     /* мягкая тень акцента для подложек */
  --accent-soft:        rgba(30, 58, 95, 0.07);
  --accent-border:      rgba(30, 58, 95, 0.16);

  --border:             #e5e7ec;
  --border-strong:      #d0d4dc;

  --radius-xl:          28px;
  --radius-lg:          22px;
  --radius-md:          16px;
  --radius-sm:          10px;
  --radius-pill:        999px;

  --container:          1280px;
  --gutter:             clamp(20px, 4vw, 40px);

  --section-pad:        clamp(72px, 9vw, 120px);

  --font:               'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --shadow-sm:          0 1px 2px rgba(20,23,28,0.04), 0 1px 1px rgba(20,23,28,0.02);
  --shadow-md:          0 8px 24px rgba(20,23,28,0.06), 0 2px 6px rgba(20,23,28,0.04);
  --shadow-lg:          0 24px 60px rgba(20,23,28,0.10), 0 8px 20px rgba(20,23,28,0.06);

  --t:                  220ms cubic-bezier(.4,.0,.2,1);
}

/* ---------- Dark theme overrides ---------- */
[data-theme="dark"] {
  --bg:                 #0a0f1d;       /* page */
  --bg-soft:            #0f1626;       /* secondary section bg (slightly elevated) */
  --bg-card:            #141c30;       /* cards (more elevated) */
  --bg-dark:            #1a2540;       /* контрастные секции в тёмной теме — приподняты, чтобы читалось */
  --bg-dark-soft:       #243155;

  --text:               #eef1f6;
  --text-secondary:     #b3bccc;
  --text-muted:         #5f6a7e;
  --text-on-dark:       #f4f6fa;
  --text-on-dark-muted: #8d97ac;

  --accent:             #6e94c8;
  --accent-hover:       #88a8d6;
  --accent-light:       rgba(110, 148, 200, 0.18);
  --accent-soft:        rgba(110, 148, 200, 0.10);
  --accent-border:      rgba(110, 148, 200, 0.25);

  --border:             #1d2740;
  --border-strong:      #2a364f;

  --shadow-sm:          0 1px 2px rgba(0,0,0,0.4);
  --shadow-md:          0 12px 32px rgba(0,0,0,0.5);
  --shadow-lg:          0 24px 60px rgba(0,0,0,0.6);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip; /* mobile: не даём горизонтальному переполнению «раздувать» вьюпорт и сдвигать секции вправо */
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background var(--t), color var(--t);
}

img { max-width: 100%; display: block; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t);
}

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }

p { margin: 0; }

::selection {
  background: var(--accent);
  color: #fff;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */
.btn {
  /* Each variant fully owns its base + hover state via custom properties.
     This avoids the .btn:hover global override fighting with variant-specific
     hover (which caused the ghost button to flash dark-blue on hover). */
  --btn-bg: var(--accent);
  --btn-color: #fff;
  --btn-border: var(--accent);
  --btn-bg-hover: var(--accent-hover);
  --btn-color-hover: #fff;
  --btn-border-hover: var(--accent-hover);

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border: 1.5px solid var(--btn-border);
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-color);
  font-weight: 500;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
  white-space: nowrap;
}
.btn:hover {
  background: var(--btn-bg-hover);
  border-color: var(--btn-border-hover);
  color: var(--btn-color-hover);
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; transition: transform var(--t); }
.btn:hover svg { transform: translateX(3px); }

.btn--ghost {
  --btn-bg: var(--bg);
  --btn-color: var(--text);
  --btn-border: var(--border-strong);
  --btn-bg-hover: var(--bg);
  --btn-color-hover: var(--accent);
  --btn-border-hover: var(--accent);
}

.btn--lg {
  padding: 16px 30px;
  font-size: 16px;
}

/* ---------- Section title (двухцветные заголовки à la Юров) ---------- */
.section-header {
  margin-bottom: 40px;
}
.section-header .section-lead { max-width: 720px; }
.section-header--light * { color: var(--text-on-dark); }

.section-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.section-title--muted,
.section-title > .section-title--muted {
  color: var(--text-muted);
  font-weight: 400;
}
.section-title--light { color: var(--text-on-dark); }
.section-title--muted-light { color: var(--text-on-dark-muted); }

.section-lead {
  margin-top: 18px;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.6;
}
.section-lead--light { color: var(--text-on-dark-muted); }

/* ---------- HEADER ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid transparent;
  transition: background var(--t), border-color var(--t), box-shadow var(--t), backdrop-filter var(--t);
}

.header.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--border);
  box-shadow: 0 6px 24px rgba(20, 23, 28, 0.05);
}
[data-theme="dark"] .header.is-scrolled {
  background: rgba(10, 15, 29, 0.85);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.logo__name {
  display: flex;
  flex-direction: column;
  line-height: 1;
  letter-spacing: -0.01em;
}
.logo__name-line:first-child {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.logo__name-line:last-child {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.015em;
}
.logo__pipe {
  width: 1px;
  align-self: stretch;
  background: var(--border);
  margin: 6px 0;
}
.logo__role {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: -0.005em;
  display: flex;
  align-items: center;
  width: 16ch;
  height: 32px;
  line-height: 1.2;
  white-space: normal;
  overflow: hidden;
  transition: opacity 600ms cubic-bezier(.45, 0, .35, 1),
              transform 600ms cubic-bezier(.45, 0, .35, 1),
              filter 600ms cubic-bezier(.45, 0, .35, 1);
  will-change: opacity, transform, filter;
}
.logo__role.is-fading {
  opacity: 0;
  transform: translateY(-4px);
  filter: blur(3px);
}
@media (max-width: 1100px) {
  .logo__pipe, .logo__role { display: none; }
}

.nav {
  margin-left: 12px;
  flex: 1;
}
.nav { min-width: 0; }
.nav__list {
  display: flex;
  gap: 0;
  flex-wrap: nowrap;
  justify-content: center;
}
.nav__list a {
  display: inline-block;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav__list a:hover {
  color: var(--text);
  background: var(--accent-soft);
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: var(--text-secondary);
  transition: background var(--t), color var(--t);
}
.theme-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
/* Логика: в светлой теме видна луна (нажми чтобы перейти в тёмную),
   в тёмной теме видно солнце (нажми чтобы перейти в светлую). */
.theme-toggle__sun { display: none; }
.theme-toggle__moon { display: block; }
[data-theme="dark"] .theme-toggle__sun { display: block; }
[data-theme="dark"] .theme-toggle__moon { display: none; }

.burger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: var(--radius-sm);
}
.burger span {
  width: 22px;
  height: 1.8px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}

/* ---------- HERO (новая версия: фото справа на 30%, контент слева) ---------- */
.hero {
  position: relative;
  padding: clamp(28px, 4.5vw, 64px) 0 clamp(40px, 5vw, 72px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 400px at 30% 30%, var(--accent-soft), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* фото в рамке со скруглением — как у фотографий ниже по странице,
   по просьбе заказчика (не «вылезает за пределы сайта») */
.hero__photo-bleed {
  border-radius: var(--radius-xl);
  overflow: hidden;
  height: clamp(440px, 64vh, 640px);
  box-shadow: var(--shadow-md);
}
.hero__photo-bleed img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
.hero__content {
  min-width: 0;
}

.hero__media {
  position: relative;
  align-self: stretch;
  min-height: 600px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  isolation: isolate;
  margin-bottom: 0;
}

/* мягкая светло-серая «подушка» под фигурой — даёт ground-эффект как у Юрова */
.hero__media-halo {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 95%;
  height: 55%;
  background:
    radial-gradient(ellipse at center bottom,
      #e8ecf2 0%,
      #eef1f6 35%,
      rgba(238, 242, 247, 0.4) 65%,
      transparent 85%);
  z-index: 0;
  pointer-events: none;
}
[data-theme="dark"] .hero__media-halo {
  background:
    radial-gradient(ellipse at center bottom,
      rgba(36, 49, 85, 0.45) 0%,
      rgba(36, 49, 85, 0.20) 50%,
      transparent 85%);
}

.hero__photo {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 660px;
  height: auto;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 20px 24px rgba(17, 25, 44, 0.10));
}

/* плавающая карточка с регалиями — лежит «на земле» с внешней стороны фото */
.hero__media-card {
  position: absolute;
  right: -12px;
  bottom: 48px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: 0 24px 40px rgba(17, 25, 44, 0.08), 0 4px 12px rgba(17, 25, 44, 0.04);
  min-width: 240px;
}
.hero__media-card-num {
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.hero__media-card-plus {
  color: var(--accent);
  font-weight: 600;
}
.hero__media-card-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero__media-card-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
}
.hero__media-card-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: -0.005em;
}

.hero__title {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin-bottom: 24px;
}
.hero__title-line {
  display: block;
}
.hero__title-line--muted {
  color: var(--text-muted);
  font-weight: 400;
}

.hero__lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 32px;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero__bases {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.base-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 14px 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: color var(--t), border-color var(--t), background var(--t);
}
.base-link:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.base-link__icon { width: 16px; height: 16px; color: var(--accent); }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px dashed var(--accent-border);
  color: var(--text-secondary);
  font-size: 13px;
}
.hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ---------- ABOUT ---------- */
.about {
  padding: var(--section-pad) 0;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.about__head { margin-bottom: 64px; }
.about__head .section-title { max-width: none; }

.about__stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 64px;
  padding: 36px 32px;
  background: var(--bg-soft);
  border-radius: var(--radius-xl);
}
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat__num {
  font-size: clamp(40px, 4.8vw, 60px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
}
.stat__plus {
  color: var(--accent);
  margin-left: 2px;
  font-size: 0.7em;
}
.stat__label {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.about__layout {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.about__lead {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.4;
  color: var(--text);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.about__lead strong { color: var(--text); font-weight: 600; }

.about__sections {
  display: flex;
  flex-direction: column;
}

.about__section {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}
.about__section:last-child { padding-bottom: 0; }

.about__section-label {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding-top: 8px;
  position: sticky;
  top: 100px;
  align-self: start;
}

.about__section-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0;
}
.about__section-text em {
  color: var(--text);
  font-style: normal;
  font-weight: 500;
}

@media (max-width: 880px) {
  .about__section {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .about__section-label { position: static; padding-top: 0; }
}

.inline-link {
  color: var(--accent);
  border-bottom: 1px solid var(--accent-border);
  font-weight: 500;
  transition: color var(--t), border-color var(--t);
  /* без white-space:nowrap — длинные ссылки-фразы должны переноситься,
     иначе на мобильном они растягивают страницу вправо */
}
.inline-link:hover {
  color: var(--accent-hover);
  border-color: var(--accent-hover);
}

.about__aside {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about__quote {
  position: relative;
  margin: 0;
  padding: 36px 32px 28px;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.about__quote-mark {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  color: var(--accent);
  opacity: 0.6;
}
[data-theme="dark"] .about__quote-mark { color: #88a8d6; }
.about__quote p {
  font-size: 18px;
  line-height: 1.55;
  font-weight: 500;
  margin-bottom: 16px;
}
.about__quote footer {
  font-size: 13px;
  color: var(--text-on-dark-muted);
  font-style: normal;
}

.about__highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.about__highlight {
  display: flex;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--t), transform var(--t);
}
.about__highlight:hover {
  border-color: var(--accent-border);
  transform: translateY(-2px);
}
.about__highlight-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.about__highlight-icon svg { width: 20px; height: 20px; }
.about__highlight strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-bottom: 2px;
}
.about__highlight p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ---------- HELP (Чем могу помочь) — sticky-стек карточек ---------- */
.help {
  padding: var(--section-pad) 0;
  background: var(--bg-soft);
}

.help__header {
  /* стандартный section-header, но сверху над двухколоночным layout */
  margin-bottom: 56px;
}

.help__layout {
  display: grid;
  grid-template-columns: minmax(280px, 460px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* Левая колонка: фото врача sticky на той же высоте, что и первая карточка */
.help__sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
}
.help__photo {
  width: 100%;
  height: auto;
  border-radius: var(--radius-xl);
  display: block;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(20, 23, 28, 0.08);
}

/* Правая колонка: стек карточек */
.help__cards {
  display: flex;
  flex-direction: column;
  /* gap не используем — карточки управляют отступом через padding-bottom-родителя */
  padding-bottom: 0;
}

/* --idx подаётся inline-стилем (0..3). top = base + idx * step
   step = 104px: видимая высота свёрнутой карточки = 28 padding + 56 head + 20 margin
   = 104px → точно до разделительной линии тела (которая на 105px).
   Следующая карточка садится прямо НА линию и полностью её перекрывает,
   убирая визуальный шум. */
.help-card {
  position: sticky;
  top: calc(100px + var(--idx, 0) * 104px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgba(20, 23, 28, 0.06);
  /* небольшой отступ между карточками, когда они НЕ застаканы */
  margin-bottom: 24px;
  transition: box-shadow var(--t);
}
.help-card:last-child { margin-bottom: 0; }

.help-card__head {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 56px;
}
.help-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.help-card__icon svg { width: 26px; height: 26px; }
.help-card__icon img { width: 26px; height: 26px; object-fit: contain; }

.help-card__title {
  font-size: clamp(20px, 2.2vw, 24px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0;
  line-height: 1.2;
}

.help-card__body {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.help-card__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
}
.help-card__list li {
  position: relative;
  padding-left: 18px;
}
.help-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
/* вложенный список (например, состояния под «…при:» в карточке психиатрии) */
.help-card__sublist {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
  padding-left: 4px;
}
.help-card__sublist li { position: relative; padding-left: 18px; }
.help-card__sublist li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 9px;
  width: 7px;
  height: 1.5px;
  border-radius: 2px;
  background: var(--accent);
}

/* Sub-title and paragraph inside a help-card body — used for "Медицинское
   сопровождение" which has two named sub-blocks per the original text. */
.help-card__sub-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.005em;
  margin-top: 12px;
  margin-bottom: 8px;
}
.help-card__sub-title:first-child { margin-top: 0; }
.help-card__para {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

/* ---- Контент карточки из визуального редактора (ACF wysiwyg) ----
   Описание карточки теперь редактируется одним полем; разметку (списки,
   абзацы, жирные подзаголовки) стилизуем обобщённо, чтобы вид совпадал
   с прежними .help-card__list / __sublist / __para. */
.help-card__body ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
  list-style: none;
  margin: 0;
  padding: 0;
}
.help-card__body li { position: relative; padding-left: 18px; }
.help-card__body ul > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
/* Вложенный список — тире вместо точки. */
.help-card__body ul ul {
  gap: 6px;
  margin-top: 8px;
  padding-left: 4px;
}
.help-card__body ul ul > li::before {
  top: 9px;
  left: 2px;
  width: 7px;
  height: 1.5px;
  border-radius: 2px;
}
/* Абзацы и жирные подзаголовки внутри карточки. */
.help-card__body p {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 10px;
}
.help-card__body p:last-child { margin-bottom: 0; }
.help-card__body strong,
.help-card__body b { color: var(--text); font-weight: 600; }
.help-card__body a { color: var(--accent); text-decoration: underline; }

/* ---------- PRINCIPLES ---------- */
.principles {
  padding: var(--section-pad) 0;
  background: var(--bg-soft);
  position: relative;
}

/* Principles grid — 2 columns on desktop, with featured + accent spanning full width.
   Sized to comfortably hold the original long paragraph formulations from the author. */
.principles__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch; /* cards fill row height — clean rows */
}

.principle-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 32px 30px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden; /* clip the giant background numeral */
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}

.principle-card__head,
.principle-card__title,
.principle-card p {
  position: relative;
  z-index: 1;
}
.principle-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.principle-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.principle-card__num {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent);
  line-height: 1;
}
.principle-card__icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.principle-card__icon svg { width: 24px; height: 24px; }

.principle-card__title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--text);
  line-height: 1.2;
}
.principle-card p {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Featured card — full width on top. Long signature principle, dark backdrop. */
.principle-card--featured {
  background: var(--bg-dark);
  border-color: var(--bg-dark);
  color: var(--text-on-dark);
  grid-column: 1 / -1;
  padding: clamp(36px, 4vw, 56px) clamp(32px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
  column-gap: clamp(32px, 4vw, 64px);
  row-gap: 14px;
  align-items: start;
}
.principle-card--featured .principle-card__head { grid-column: 1; }
.principle-card--featured .principle-card__title { grid-column: 1; }
.principle-card--featured p { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.principle-card--featured .principle-card__num { color: #88a8d6; }
.principle-card--featured .principle-card__bg-num {
  color: #88a8d6;
  opacity: 0.08;
  font-size: clamp(160px, 18vw, 260px);
  top: 0;
  right: 28px;
}
.principle-card--featured:hover .principle-card__bg-num { opacity: 0.14; }
.principle-card--featured .principle-card__icon {
  background: rgba(110, 148, 200, 0.18);
  color: #b1c5e0;
  width: 56px;
  height: 56px;
}
.principle-card--featured .principle-card__icon svg { width: 28px; height: 28px; }
.principle-card--featured .principle-card__title {
  color: #fff;
  font-size: clamp(26px, 2.4vw, 32px);
  max-width: none;
}
.principle-card--featured p {
  color: rgba(244, 246, 250, 0.82);
  font-size: clamp(16px, 1.3vw, 17px);
  line-height: 1.7;
  max-width: none;
}

/* Accent card — gentle accent tone, sits in the regular grid (no full-width
   so the 5 regular + 1 accent fill 3 clean rows without empty cells). */
.principle-card--accent {
  background: linear-gradient(160deg, var(--accent-soft), var(--bg-card));
  border-color: var(--accent-border);
}
.principle-card--accent .principle-card__title { font-size: 22px; }

/* ---------- NOT-ME (editorial-style) ---------- */
.not-me {
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
}
.not-me::before {
  content: '';
  position: absolute;
  top: 6%;
  right: -120px;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.not-me__head {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: end;
  margin-bottom: 80px;
  position: relative;
  z-index: 1;
}
.not-me__lead {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 380px;
  padding-bottom: 8px;
}

.not-me__list {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.not-me__row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: start;
  gap: clamp(20px, 3vw, 32px);
  padding: 28px 0;
  border-bottom: 1px solid var(--border);
}
/* тонкая акцентная вертикальная линия слева появляется на ховер */
.not-me__row::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 3px;
  transform: translateY(-50%);
  transition: height 380ms cubic-bezier(.4, 0, .2, 1);
}
.not-me__row:hover::before { height: 50%; }

.not-me__num {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
  transition: color 380ms cubic-bezier(.4, 0, .2, 1);
}
.not-me__row:hover .not-me__num { color: var(--accent); }

.not-me__cross {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1.5px solid var(--accent-border);
  color: var(--accent);
  flex-shrink: 0;
  background: var(--bg);
  transition: background 380ms cubic-bezier(.4, 0, .2, 1),
              border-color 380ms cubic-bezier(.4, 0, .2, 1),
              color 380ms cubic-bezier(.4, 0, .2, 1);
}
.not-me__cross svg { width: 22px; height: 22px; transition: transform 380ms cubic-bezier(.4, 0, .2, 1); }
.not-me__row:hover .not-me__cross {
  background: var(--bg);
  border-color: var(--accent);
}
.not-me__row:hover .not-me__cross svg { transform: scale(1.15); }

.not-me__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.not-me__title {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.15;
  transition: color 380ms cubic-bezier(.4, 0, .2, 1);
}
.not-me__row:hover .not-me__title { color: var(--accent); }
.not-me__body p {
  font-size: 17px;
  color: var(--text);
  line-height: 1.55;
  padding-top: 12px;
}

/* ---------- PRICES ---------- */
.prices {
  padding: var(--section-pad) 0;
  background: var(--bg-soft);
}

.prices__wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.prices__group {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.prices__group--accent {
  background: linear-gradient(168deg, var(--accent-soft), var(--bg-card));
  border-color: var(--accent-border);
}
.prices__subtitle {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 20px;
}
.prices__list {
  display: flex;
  flex-direction: column;
}
.prices__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  font-size: 15.5px;
  color: var(--text);
}
.prices__row:first-child { border-top: 0; }
.prices__price {
  color: var(--accent);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  letter-spacing: -0.005em;
}
.prices__note {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-strong);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.prices__footer-note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
}

.prices__policy {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding: 24px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  max-width: 920px;
  margin-left: auto;
  margin-right: auto;
}
.prices__policy-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.prices__policy p {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}
.prices__policy strong { color: var(--text); font-weight: 600; }

/* ---------- CALCULATOR ---------- */
.calc {
  padding: var(--section-pad) 0;
}

.calc__widget {
  margin-top: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.calc__progress {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.calc__progress::before {
  content: '';
  display: block;
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--border);
  position: relative;
  overflow: hidden;
}
.calc__progress { position: relative; }
.calc__progress-bar {
  position: absolute;
  left: 0;
  top: 50%;
  margin-top: -2px;
  height: 4px;
  border-radius: 4px;
  background: var(--accent);
  width: 14%;
  max-width: calc(100% - 60px);
  transition: width var(--t);
  z-index: 1;
}
.calc__progress-label {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.calc__stage {
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.calc__step {
  display: none;
  flex-direction: column;
  gap: 24px;
}
.calc__step.is-active { display: flex; }

.calc__q-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.calc__q-icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
  color: var(--accent);
  flex-shrink: 0;
}
.calc__q-icon svg { width: 26px; height: 26px; }

.calc__q {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.calc__hint {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: -8px;
}

.calc__options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calc__opt {
  text-align: left;
  padding: 18px 22px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  font-size: 16px;
  color: var(--text);
  transition: border-color var(--t), background var(--t), transform var(--t);
}
.calc__opt:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateX(4px);
}

/* result */
.calc__result { gap: 16px; }
.calc__result-label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.calc__result-title {
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}
.calc__result-desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.6;
}
.calc__result-alt {
  font-size: 16px;
  color: var(--text-secondary);
  padding: 16px 20px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  max-width: 640px;
}
.calc__result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.calc__nav { margin-top: 20px; }
.calc__back {
  font-size: 14px;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: color var(--t), background var(--t);
}
.calc__back:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- SUPPORT ---------- */
.support {
  padding: var(--section-pad) 0;
  background: var(--bg-soft);
}

.support__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

.support-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.support-card__tag {
  display: inline-block;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.support-card__title {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.support-card p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.support__cta {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 5vw, 56px);
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
}
.support__cta h3 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.support__cta p {
  color: var(--text-on-dark-muted);
  font-size: 17px;
  max-width: 540px;
}
.support__cta .btn {
  background: #fff;
  color: var(--bg-dark);
  border-color: #fff;
}
.support__cta .btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- FOOTER ---------- */
.footer {
  position: relative;
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: clamp(56px, 7vw, 96px) 0 32px;
  overflow: hidden;
  isolation: isolate;
}
.footer__bg {
  position: absolute;
  bottom: -0.32em;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(120px, 22vw, 320px);
  font-weight: 800;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.04);
  line-height: 0.85;
  z-index: 0;
  pointer-events: none;
  white-space: nowrap;
}

.footer__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__col--brand .footer__logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  display: block;
}
.footer__tagline {
  color: var(--text-on-dark-muted);
  max-width: 320px;
  font-size: 15px;
  line-height: 1.55;
}

.footer__h {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-on-dark-muted);
  margin-bottom: 20px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 12px; }
.footer__col a {
  color: var(--text-on-dark);
  font-size: 15px;
  transition: color var(--t);
}
.footer__col a:hover { color: var(--accent); }
[data-theme="dark"] .footer__col a:hover { color: #88a8d6; }

.footer__contacts a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.footer__contact-icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}
[data-theme="dark"] .footer__contact-icon { color: #88a8d6; }

.footer__bottom {
  position: relative;
  z-index: 1;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-on-dark-muted);
}
.footer__bottom a { color: var(--text-on-dark-muted); transition: color var(--t); }
.footer__bottom a:hover { color: var(--text-on-dark); }

/* footer__bottom: левая группа (© + privacy) + кредит справа */
.footer__bottom-left {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1100px) {
  .nav__list { gap: 2px; }
  .nav__list a { padding: 8px 10px; font-size: 13.5px; }
}

@media (max-width: 960px) {
  .header__inner { gap: 12px; }
  .nav { display: none; }
  .header__actions { margin-left: auto; } /* прижимаем тогл+бургер к правому краю на мобильном */
  .burger { display: flex; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.8px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.8px) rotate(-45deg); }
  .nav.is-open {
    margin-left: 0;
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px var(--gutter);
  }
  .nav.is-open .nav__list { flex-direction: column; gap: 4px; }
  .nav.is-open .nav__list a { padding: 12px 14px; font-size: 15px; }

  .hero {
    display: flex;
    flex-direction: column;
    padding-top: clamp(20px, 3vw, 36px);
  }
  .hero__inner {
    order: 1;
    display: block;
  }
  .hero__content { padding-bottom: 0; }
  .hero__photo-bleed {
    order: 2;
    width: 100%;
    height: 360px;
    margin: 32px auto 0;
  }
  .hero__photo-bleed::after { display: none; }
  .hero__title { text-align: left; }

  .help__layout { grid-template-columns: 1fr; gap: 32px; }
  .help__sidebar { position: static; }
  .help__photo { max-width: 360px; margin: 0 auto; }
  .help-card { position: static; margin-bottom: 16px; }
  .help-card__body { padding-top: 16px; margin-top: 16px; }
  .not-me__head { grid-template-columns: 1fr; gap: 24px; align-items: start; margin-bottom: 48px; }
  .not-me__row { grid-template-columns: 56px minmax(0, 1fr); gap: 20px; padding: 28px 0; }
  .not-me__num { display: none; }
  .suits__grid { grid-template-columns: 1fr; gap: 40px; }
  .suits__media { max-width: 480px; margin: 0 auto; position: static; height: auto; aspect-ratio: 3 / 4; }
  .support__grid { grid-template-columns: 1fr; }
  .support__cta {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .about__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__aside { position: static; }
  .about__stats { grid-template-columns: repeat(2, 1fr); gap: 16px; padding: 28px 24px; }

  /* principles grid is already 2 columns by default — nothing to override here */
}

@media (max-width: 600px) {
  .header__cta { display: none; }
  .logo__pipe, .logo__role { display: none; }

  /* «Когда ко мне стоит обратиться» — на мобильном убираем фото-полоску, остаётся только текст */
  .suits__media { display: none; }
  .suits__grid { gap: 0; }
  .logo__name { font-size: 16px; }

  .hero__chips { gap: 6px; }
  .chip { font-size: 12px; padding: 6px 12px; }

  .hero__cta { flex-direction: column; }
  .hero__cta .btn { width: 100%; }

  .hero__media-card { right: 0; bottom: 0; min-width: 0; padding: 12px 16px; }
  .hero__media-card-num { font-size: 32px; }
  .hero__media-tag { left: 0; top: 12px; font-size: 11px; padding: 6px 12px; }

  .help-card { padding: 28px 24px; }
  .help-card__title { font-size: 21px; }

  .not-me__row { padding: 24px 0; }
  .not-me__title { font-size: 22px; }
  .not-me__cross { width: 44px; height: 44px; }
  .not-me__cross svg { width: 18px; height: 18px; }

  .principles__grid { grid-template-columns: 1fr; }
  .principle-card--featured { grid-column: 1 / -1; }
  .principle-card { padding: 24px 22px; }
  .principle-card--featured { padding: 28px 24px; grid-template-columns: 1fr; }
  .principle-card--featured p { grid-column: 1; grid-row: auto; align-self: start; }

  .prices__group { padding: 24px 22px; }

  .calc__widget { padding: 24px 20px; }
  .calc__opt { padding: 14px 16px; font-size: 15px; }
  .calc__q-icon { width: 44px; height: 44px; }
  .calc__q-icon svg { width: 22px; height: 22px; }

  .footer__inner { grid-template-columns: 1fr; gap: 28px; padding-bottom: 36px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }

  .about__stats { grid-template-columns: 1fr; gap: 16px; padding: 24px 20px; }
}

/* =========================================================
   END CTA — одна скромная кнопка в конце главной
   ========================================================= */
.end-cta {
  padding: clamp(48px, 7vw, 96px) 0;
  text-align: center;
  background: var(--bg-soft);
}

/* =========================================================
   Универсальный плейсхолдер для будущей картинки
   ========================================================= */
.placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 32px 24px;
  border-radius: var(--radius-xl);
  border: 1.5px dashed var(--border-strong);
  background:
    repeating-linear-gradient(
      45deg,
      var(--bg-soft) 0px,
      var(--bg-soft) 14px,
      var(--bg) 14px,
      var(--bg) 28px
    );
  color: var(--text-secondary);
  min-height: 220px;
}
.placeholder--dark {
  border-color: rgba(255, 255, 255, 0.15);
  background:
    repeating-linear-gradient(
      45deg,
      var(--bg-dark-soft) 0px,
      var(--bg-dark-soft) 14px,
      var(--bg-dark) 14px,
      var(--bg-dark) 28px
    );
  color: var(--text-on-dark-muted);
  min-height: 100%;
}
.placeholder__label {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.placeholder--dark .placeholder__label { color: #88a8d6; }
.placeholder__hint {
  font-size: 12.5px;
  font-style: italic;
  opacity: 0.75;
  max-width: 280px;
  line-height: 1.45;
}

/* about aside image slot */
.about__aside-img {
  aspect-ratio: 4 / 3;
  margin-bottom: 24px;
}
.about__aside-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  display: block;
}

/* =========================================================
   SUITS — «Кому подойдёт мой подход» (тёмная секция)
   ========================================================= */
.suits {
  padding: var(--section-pad) 0;
  /* блик в самом background — без ::before и overflow:hidden,
     т.к. overflow ломал position:sticky у фото */
  background:
    radial-gradient(540px 540px at -6% -12%, rgba(110, 148, 200, 0.10), transparent 70%),
    var(--bg-dark);
  color: var(--text-on-dark);
  position: relative;
}
.suits__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.5fr);
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
  position: relative;
  z-index: 1;
}

.suits__media {
  position: sticky;
  top: 100px;
  aspect-ratio: auto;
  height: clamp(480px, 66vh, 680px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--bg-dark-soft);
}
.suits__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  display: block;
}
/* Фикс «обрезанного» фото в блоке «Когда обратиться»: после reveal даём медиа полную высоту */
.suits__media.is-revealed { min-height: 600px !important; }

.suits__content { display: flex; flex-direction: column; }
.suits__content .section-title { margin-top: 0; }
.suits__lead {
  margin-top: 18px;
  font-size: 16px;
  color: var(--text-on-dark-muted);
  line-height: 1.6;
  max-width: 520px;
}
.eyebrow--on-dark {
  background: rgba(110, 148, 200, 0.15);
  color: #b6cbe6;
}

.section-title--muted-light { color: var(--text-on-dark-muted); font-weight: 400; }

.suits__list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
}
.suits__item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 18px;
  padding: 22px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.suits__item:first-child { border-top: 0; padding-top: 4px; }
.suits__no {
  font-size: 18px;
  font-weight: 500;
  color: #88a8d6;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}
.suits__item h3 {
  font-size: 19px;
  font-weight: 500;
  color: var(--text-on-dark);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.suits__item p {
  font-size: 14.5px;
  color: var(--text-on-dark-muted);
  line-height: 1.6;
}

/* Мобильный фикс suits: базовое правило .suits__grid (2 колонки) идёт в файле
   НИЖЕ медиазапроса ≤960 и перебивало его → на телефоне колонка из-под фото
   оставалась пустой и сжимала текст в узкую полосу («текст вытянулся»).
   Эти правила стоят ПОСЛЕ базового, поэтому выигрывают по порядку каскада. */
@media (max-width: 960px) {
  .suits__grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .suits__item { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
}

/* =========================================================
   Sub-pages — page-hero
   ========================================================= */
.page-hero {
  padding: clamp(48px, 6vw, 96px) 0 clamp(40px, 5vw, 72px);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px 350px at 80% 20%, var(--accent-soft), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.page-hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.page-hero__title {
  font-size: clamp(36px, 6.5vw, 96px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin: 6px 0 4px;
  max-width: none;
}

/* breadcrumbs */
.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  align-self: flex-start;
}
.breadcrumbs a {
  color: var(--text-secondary);
  font-weight: 500;
  transition: color var(--t);
}
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs span[aria-hidden] { opacity: 0.5; }
.page-hero__title > .section-title--muted { font-weight: 400; }
.page-hero__lead {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 680px;
}
.page-hero__anchors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.page-hero__anchors a {
  display: inline-flex;
  align-items: center;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--t), border-color var(--t), background var(--t);
}
.page-hero__anchors a:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}
.page-hero--compact { padding: clamp(40px, 5vw, 72px) 0 clamp(20px, 3vw, 36px); }

/* nav active state */
.nav__list a.is-active {
  color: var(--text);
  background: var(--accent-soft);
}

/* =========================================================
   Societies
   ========================================================= */
.societies {
  padding: var(--section-pad) 0;
  background: var(--bg-soft);
}
.societies__list {
  border-top: 1px solid var(--border);
}
.society {
  position: relative;
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 24px 16px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background 380ms cubic-bezier(.4, 0, .2, 1), padding 380ms cubic-bezier(.4, 0, .2, 1);
}
.society::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 3px;
  transform: translateY(-50%);
  transition: height 380ms cubic-bezier(.4, 0, .2, 1);
}
.society:hover::before { height: 60%; }

/* Society logo box */
.society__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 380ms cubic-bezier(.4, 0, .2, 1);
}
.society__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.society__logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.society:hover .society__logo {
  border-color: var(--accent);
}
.society__name {
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}
.society__region {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: inline-block;
}
.society__status {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
}
.society__status--primary { color: var(--accent); border-color: var(--accent-border); background: var(--accent-soft); }
.society__status--accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.society__status--gold { color: #b48a3b; border-color: rgba(180, 138, 59, 0.3); background: rgba(180, 138, 59, 0.08); }

/* =========================================================
   Publications
   ========================================================= */
.pubs {
  padding: var(--section-pad) 0;
}
.pubs__controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}
.pubs__tabs {
  display: inline-flex;
  background: var(--bg-soft);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 2px;
}
.pubs__tab {
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  transition: background var(--t), color var(--t);
}
.pubs__tab:hover { color: var(--text); }
.pubs__tab.is-active {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.pubs__count {
  font-size: 13px;
  color: var(--text-secondary);
}

.pubs__list {
  display: flex;
  flex-direction: column;
}
.pubs__group {
  margin-bottom: 32px;
}
.pubs__group-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.pub {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  padding: 20px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t), padding var(--t);
  position: relative;
}
.pub:hover { background: var(--bg-soft); padding-left: 14px; padding-right: 14px; }
.pub__no {
  font-size: 13px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  padding-top: 4px;
}
.pub__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.4;
  margin-bottom: 6px;
}
.pub__meta {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.pub__meta em { font-style: normal; font-weight: 500; color: var(--text); }
.pub__doi-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  white-space: nowrap;
  align-self: center;
}

/* =========================================================
   Education
   ========================================================= */
.edu {
  padding: var(--section-pad) 0;
}
.edu--alt { background: var(--bg-soft); }
.edu--refresh { padding-top: clamp(64px, 8vw, 96px); }

.edu__timeline {
  border-top: 1px solid var(--border);
}
.edu__item {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 24px;
  padding: 30px 16px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 380ms cubic-bezier(.4, 0, .2, 1);
}
.edu__item::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  width: 3px;
  height: 0;
  background: var(--accent);
  border-radius: 3px;
  transform: translateY(-50%);
  transition: height 380ms cubic-bezier(.4, 0, .2, 1);
}
.edu__item:hover::before { height: 60%; }
.edu__item:hover .edu__year { color: var(--accent-hover); }
.edu__year {
  font-size: 22px;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* Когда отображается диапазон вроде «2009–2015» — уменьшаем кегль,
   чтобы интервал поместился в ту же колонку, что и одиночный год. */
.edu__item .edu__year { font-size: clamp(15px, 1.6vw, 19px); }
.edu__title {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.edu__univ {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.edu__direction {
  font-size: 13px;
  color: var(--text-muted);
}
.edu__zoom {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
}
.edu__zoom svg { width: 20px; height: 20px; }
.edu__item:hover .edu__zoom,
.edu-card:hover .edu__zoom {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ---------- Мобильные правки: образование и научные общества ---------- */
@media (max-width: 600px) {
  /* Пункт образования: год отдельной строкой, ниже — тело 85% + лупа 15%.
     Селектор с родителем .edu__timeline — чтобы перебить правило .edu__item
     в @media 960px (иначе оно навязывает 3 колонки 80px|1fr|40px). */
  .edu__timeline .edu__item {
    grid-template-columns: 85% 15%;
    grid-template-areas:
      "year year"
      "body zoom";
    column-gap: 0;
    row-gap: 6px;
    align-items: center;
    padding: 22px 12px;
  }
  .edu__timeline .edu__item .edu__year { grid-area: year; }
  .edu__timeline .edu__item .edu__body { grid-area: body; }
  .edu__timeline .edu__item .edu__zoom { grid-area: zoom; justify-self: end; }

  /* Научные общества: в колонку (родитель — чтобы перебить .society в @media 960px) */
  .societies__list .society {
    display: flex;
    flex-direction: column;
    text-align: left;
    align-items: baseline;
    gap: 12px;
  }
}

.edu__cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px 26px;
  cursor: pointer;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.edu-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.edu-card__year {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: inline-block;
  margin-bottom: 14px;
}
.edu-card__title {
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}
.edu-card__univ {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.45;
}
.edu-card__meta { display: flex; gap: 8px; flex-wrap: wrap; }
.edu-card__chip {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.edu__years {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.edu-year {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 32px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.edu-year__num {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.edu-year__list {
  display: flex;
  flex-direction: column;
}
.edu-line {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 64px;
  align-items: center;
  gap: 16px;
  padding: 18px 40px 18px 8px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t), padding var(--t);
}
.edu-line:first-child { border-top: 0; }
.edu-line:hover { background: var(--accent-soft); padding-left: 14px; padding-right: 46px; }

/* Аффорданс «развернуть» — диплом/курс кликабелен (показать скан) */
.edu-card,
.edu__item { position: relative; }
.edu-card::after,
.edu-line::after {
  content: "+";
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  line-height: 1;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
}
.edu-card::after {
  top: 18px; right: 18px;
  width: 28px; height: 28px;
  font-size: 19px;
}
.edu-line::after {
  top: 50%; right: 10px;
  transform: translateY(-50%);
  width: 22px; height: 22px;
  font-size: 15px;
}
.edu-card:hover::after {
  background: var(--accent); color: #fff; border-color: var(--accent);
  transform: rotate(90deg);
}
.edu-line:hover::after {
  background: var(--accent); color: #fff; border-color: var(--accent);
  transform: translateY(-50%) rotate(90deg);
}
.edu-line__title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}
.edu-line__univ {
  font-size: 13.5px;
  color: var(--text-secondary);
}
.edu-line__hours {
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.edu__note {
  margin-top: 32px;
  font-size: 13.5px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* =========================================================
   Contacts — badge + form
   ========================================================= */
.contact {
  padding: clamp(32px, 4vw, 64px) 0 var(--section-pad);
}
.contact__grid {
  display: block;
}
/* форма распределена по ширине контейнера: имя и e-mail в одну строку,
   тема и сообщение — на всю ширину */
@media (min-width: 761px) {
  #contactForm {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
    align-items: start;
  }
  #contactForm .form__row { margin: 0; }
  #contactForm .form__row:nth-of-type(3),
  #contactForm .form__row:nth-of-type(4),
  #contactForm .form__check,
  #contactForm .form__status { grid-column: 1 / -1; }
  #contactForm .form__submit { grid-column: 1 / -1; justify-self: start; }
}

/* бейдж врача на верёвочке */
.badge {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 60px;
}
.badge__lanyard {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 90px;
  background:
    linear-gradient(90deg, transparent 40%, var(--text) 40%, var(--text) 60%, transparent 60%),
    linear-gradient(180deg, var(--text), var(--text-secondary));
  background-blend-mode: multiply;
  background-color: var(--text);
  border-radius: 6px 6px 0 0;
  z-index: 1;
}
.badge__lanyard::before,
.badge__lanyard::after {
  content: '';
  position: absolute;
  top: 100%;
  width: 6px;
  height: 14px;
  background: var(--text);
  border-radius: 0 0 3px 3px;
}
.badge__lanyard::before { left: 6px; transform: rotate(-12deg) translateY(-2px); transform-origin: top center; }
.badge__lanyard::after  { right: 6px; transform: rotate(12deg) translateY(-2px); transform-origin: top center; }

.badge__card {
  position: relative;
  width: 100%;
  max-width: 320px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 72px 28px 32px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  z-index: 2;
}
.badge__clip {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 28px;
  background: linear-gradient(180deg, #c8ccd4, #9aa0aa);
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.badge__clip::before {
  content: '';
  position: absolute;
  inset: 6px 14px;
  border: 2px solid rgba(0,0,0,0.25);
  border-radius: 4px;
}
.badge__photo {
  width: 120px;
  height: 120px;
  margin: 0 auto 18px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(170deg, var(--bg-dark) 0%, var(--bg-dark-soft) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.badge__photo img {
  width: 130%;
  height: auto;
  object-fit: contain;
  object-position: top center;
  margin-top: -10px;
}
.badge__name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.badge__role {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 20px;
}
.badge__contacts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: left;
}
.badge__contacts li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.badge__contacts svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }
.badge__contacts a { color: var(--text); transition: color var(--t); word-break: break-word; }
.badge__contacts a:hover { color: var(--accent); }

/* форма */
.contact__form-title {
  font-size: clamp(36px, 4.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin-bottom: 14px;
}
.contact__form-title > .section-title--muted { font-weight: 400; }
.contact__form-lead {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form__row { display: flex; gap: 18px; }
.form__field { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.form__label {
  font-size: 12.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}
.form__input {
  width: 100%;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  transition: border-color var(--t), background var(--t);
}
.form__input::placeholder { color: var(--text-muted); }
.form__input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}
.form__input--textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}
.form__select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 44px;
  cursor: pointer;
}

/* ---------- Кастомный селект ---------- */
.cselect { position: relative; width: 100%; }
.cselect > select { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; } /* нативный скрыт, но сабмитится */
.cselect__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 16px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--t), background var(--t);
}
.cselect.is-open .cselect__trigger,
.cselect__trigger:focus-visible { outline: none; border-color: var(--accent); background: var(--bg); }
.cselect__value { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cselect__value.is-placeholder { color: var(--text-muted); }
.cselect__chev {
  width: 16px; height: 16px; flex: none;
  background: no-repeat center / contain;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  transition: transform var(--t);
}
.cselect.is-open .cselect__chev { transform: rotate(180deg); }
.cselect__list {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  z-index: 30;
  margin: 0; padding: 6px;
  list-style: none;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
  max-height: 280px; overflow: auto;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.cselect.is-open .cselect__list { opacity: 1; visibility: visible; transform: translateY(0); }
.cselect__option {
  padding: 11px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15.5px;
  color: var(--text);
  transition: background var(--t), color var(--t);
}
.cselect__option:hover { background: var(--accent-soft); }
.cselect__option.is-selected { color: var(--accent); font-weight: 500; }

.form__check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  cursor: pointer;
  margin: 8px 0 6px;
}
.form__check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  flex-shrink: 0;
}
.form__submit { align-self: flex-start; }
.form__status {
  padding: 14px 18px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text);
}

/* =========================================================
   Modal (universal)
   ========================================================= */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms cubic-bezier(.4, 0, .2, 1);
}
.modal[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 29, 0.55);
  backdrop-filter: blur(4px);
}
.modal__inner {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: clamp(28px, 4vw, 48px);
  width: 100%;
  max-width: 720px;
  max-height: 86vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.98);
  transition: transform 320ms cubic-bezier(.22, .61, .36, 1);
}
.modal__inner--narrow {
  max-width: 440px;
  padding: 28px;
}
.modal__inner--narrow .modal__title {
  font-size: 22px;
  margin-bottom: 0;
  letter-spacing: -0.015em;
}
.modal__inner--narrow .modal__content { gap: 14px; }
.modal__inner--narrow .form { gap: 10px; }
.modal__inner--narrow .form__field { gap: 4px; }
.modal__inner--narrow .form__label {
  font-size: 11px;
  letter-spacing: 0.04em;
}
.modal__inner--narrow .form__input { padding: 10px 14px; font-size: 14.5px; border-radius: 10px; }
.modal__inner--narrow .form__input--textarea { min-height: 70px; }
.modal__inner--narrow .form__check { font-size: 12.5px; margin: 4px 0; }
.modal__inner--narrow .form__check input { width: 16px; height: 16px; }
.modal__inner--narrow .form__submit { padding: 12px 22px; font-size: 14px; margin-top: 4px; }
.modal__inner--narrow .form__submit svg { width: 16px; height: 16px; }
.modal[aria-hidden="false"] .modal__inner {
  transform: translateY(0) scale(1);
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t), color var(--t);
}
.modal__close:hover { background: var(--accent); color: #fff; }
.modal__close svg { width: 18px; height: 18px; }

.modal__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal__eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}
.modal__title {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-right: 40px;
}
.modal__authors {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
}
.modal__meta {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 14px 18px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
}
.modal__meta em { font-style: normal; font-weight: 500; color: var(--text); }
.modal__abstract {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.65;
}
.modal__abstract h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.modal__abstract p { margin-bottom: 10px; }
.modal__abstract p:last-child { margin-bottom: 0; }
.modal__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------- Publication modal (wide, horizontal — meta | abstract) ---------- */
.modal__inner--pub {
  max-width: min(1060px, 94vw);
  max-height: 88vh;
  padding: clamp(24px, 3vw, 40px);
  overflow: hidden;            /* оболочка не скроллится */
  display: flex;
  flex-direction: column;
}
.modal__inner--pub .modal__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.pub-modal {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: clamp(24px, 3vw, 48px);
  align-items: stretch;
  height: 100%;
  min-height: 0;
}
.pub-modal__side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
  overflow-y: auto;            /* на случай очень длинного заголовка */
  padding-right: 4px;
}
.pub-modal__side .modal__title { margin-right: 0; }
.pub-modal__main {
  min-height: 0;
  overflow-y: auto;            /* скролл только здесь и только если абстракт реально огромный */
  padding-right: 6px;
  border-left: 1px solid var(--border);
  padding-left: clamp(20px, 2.4vw, 40px);
}
.pub-modal__main .modal__abstract { font-size: 14.5px; line-height: 1.7; padding-bottom: 30px; }

/* ---------- Education diploma modal (2-column, no scroll) ---------- */
.modal__inner--edu {
  max-width: min(1200px, 95vw);
  max-height: 90vh;
  padding: clamp(20px, 2.4vw, 32px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal__inner--edu .modal__content {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  gap: 0;
}
.modal__edu {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: clamp(20px, 2.4vw, 36px);
  align-items: stretch;
  min-height: 0;
  flex: 1 1 auto;
}
.modal__edu-text {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding-right: 4px;
  padding-top: 18px;
}
.modal__edu-text::-webkit-scrollbar { width: 6px; }
.modal__edu-text::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
.modal__edu-image {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}
.modal__scan {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  max-width: 100%;
  max-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal__scan a {
  display: block;
  cursor: zoom-in;
  max-width: 100%;
  max-height: 100%;
  line-height: 0;
}
.modal__scan img {
  display: block;
  max-width: 100%;
  max-height: calc(90vh - 80px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: #fff;
  transition: transform var(--t);
}
.modal__scan a:hover img {
  transform: scale(1.01);
}
.modal__scan-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: auto 0 0 0;
  padding-top: 12px;
  letter-spacing: 0.01em;
  font-style: italic;
}
.modal__scan-missing {
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  padding: 48px 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  text-align: center;
  margin: 0;
  border: 1px dashed var(--border);
  width: 100%;
}

/* On narrow screens (mobile / small tablet) — stack vertically and allow scroll */
@media (max-width: 820px) {
  .modal__inner--edu {
    max-height: 92vh;
    overflow-y: auto;
  }
  .modal__inner--edu .modal__content { overflow: visible; }
  /* Блоками по высоте контента (как в модалке публикаций): grid со stretch мог
     сжать строку скана ниже картинки, если текст высокий, а экран низкий. */
  .modal__edu {
    display: block;
    height: auto;
    flex: 0 0 auto;
  }
  .modal__edu-text { min-height: auto; height: auto; overflow: visible; padding-top: 8px; }
  .modal__edu-image { min-height: auto; height: auto; overflow: visible; margin-top: 16px; }
  .modal__scan img { max-height: 60vh; }

  /* Publication modal → одна колонка на мобильных. Раскладываем ПРОСТЫМИ БЛОКАМИ
     по высоте контента: grid со stretch отдавал строке .side фиксированную высоту
     меньше её содержимого (при min-height:0), и кнопка «Открыть оригинал»
     вылезала вниз, наезжая на резюме статьи. */
  .modal__inner--pub { max-height: 92vh; overflow-y: auto; }
  .modal__inner--pub .modal__content { overflow: visible; }
  .pub-modal { display: block; height: auto; }
  .pub-modal__side {
    min-height: auto;
    height: auto;
    overflow: visible;
    padding-right: 0;
  }
  .pub-modal__main {
    min-height: auto;
    height: auto;
    overflow: visible;
    border-left: 0;
    padding-left: 0;
    margin-top: 18px;
    border-top: 1px solid var(--border);
    padding-top: 16px;
  }
  .pub-modal__main .modal__abstract p { columns: auto; }
}

/* ---------- Lightbox (full-size diploma scan, second layer) ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 240ms cubic-bezier(.4, 0, .2, 1);
}
.lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 22, 0.82);
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}
.lightbox__close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  transition: background var(--t), transform var(--t);
  z-index: 2;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}
.lightbox__close svg { width: 20px; height: 20px; }
.lightbox__img {
  position: relative;
  max-width: min(94vw, 1600px);
  max-height: 94vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.96);
  transition: transform 280ms cubic-bezier(.22, .61, .36, 1);
  background: #fff;
  cursor: zoom-out;
}
.lightbox[aria-hidden="false"] .lightbox__img {
  transform: scale(1);
}
@media (max-width: 640px) {
  .lightbox { padding: 12px; }
  .lightbox__close { top: 12px; right: 12px; width: 40px; height: 40px; }
  .lightbox__img { max-width: 96vw; max-height: 90vh; }
}

/* =========================================================
   Cookie banner (152-ФЗ)
   ========================================================= */
.cookie-banner {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%) translateY(120%);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px 14px 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: 0 20px 50px rgba(20, 23, 28, 0.15);
  max-width: min(720px, calc(100vw - 32px));
  width: max-content;
  transition: transform 380ms cubic-bezier(.22, .61, .36, 1);
}
[data-theme="dark"] .cookie-banner { box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
.cookie-banner.is-visible { transform: translateX(-50%) translateY(0); }
.cookie-banner__text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}
.cookie-banner__link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 2px;
  font-weight: 500;
}
.cookie-banner__link:hover { text-decoration-color: var(--accent); }
.cookie-banner__btn {
  padding: 10px 22px;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (max-width: 700px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    bottom: 12px;
    border-radius: var(--radius-xl);
    padding: 16px 18px;
  }
  .cookie-banner__text { text-align: left; }
  .cookie-banner__btn { width: 100%; }
}

/* =========================================================
   Easter egg overlay (Melodia Vitae) — fullscreen flash à la Warcraft 3
   ========================================================= */
.easter-egg {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  background: rgba(220, 235, 255, 0.95);
  opacity: 0;
}
/* мгновенная вспышка на полную яркость — без анимации появления */
.easter-egg.is-flash { opacity: 1; }
/* и сразу затухание, без задержки */
.easter-egg.is-fading {
  opacity: 0;
  transition: opacity 900ms ease-out;
}
.easter-egg__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  filter: drop-shadow(0 0 60px rgba(125, 163, 208, 0.95));
}
.easter-egg.is-fading .easter-egg__inner {
  transform: scale(1.12);
  filter: drop-shadow(0 0 110px rgba(125, 163, 208, 0));
  transition: transform 900ms ease-out, filter 900ms ease-out;
}
.easter-egg__icon {
  height: 30vh;
  max-height: 320px;
  width: auto;
}

/* eyebrow utility */
.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  align-self: flex-start;
}

/* =========================================================
   Responsive — subpages
   ========================================================= */
@media (max-width: 960px) {
  .society { grid-template-columns: 96px minmax(0, 1fr); gap: 20px; }
  .society__logo { height: 56px; }
  .society__status { grid-column: 2 / 3; margin-top: 4px; justify-self: start; }

  .pub { grid-template-columns: 36px minmax(0, 1fr); }
  .pub__doi-tag { grid-column: 2 / 3; justify-self: start; margin-top: 4px; }

  .pubs__controls { flex-direction: column; align-items: stretch; }

  .edu__item { grid-template-columns: 80px minmax(0, 1fr) 40px; gap: 16px; }
  .edu__cards { grid-template-columns: 1fr; }
  .edu-year { grid-template-columns: 1fr; gap: 12px; }
  .edu-line { grid-template-columns: 1fr; gap: 4px; }
  .edu-line__hours { text-align: left; }

  .contact__grid { grid-template-columns: 1fr; gap: 56px; }
  .badge { max-width: 360px; margin: 0 auto; }

  .form__row { flex-direction: column; }
}

/* ---------- Scroll reveal animations ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms cubic-bezier(.22,.61,.36,1),
              transform 700ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-delay="1"].is-revealed { transition-delay: 80ms; }
[data-reveal-delay="2"].is-revealed { transition-delay: 160ms; }
[data-reveal-delay="3"].is-revealed { transition-delay: 240ms; }
[data-reveal-delay="4"].is-revealed { transition-delay: 320ms; }
[data-reveal-delay="5"].is-revealed { transition-delay: 400ms; }
[data-reveal-delay="6"].is-revealed { transition-delay: 480ms; }

/* Hero — небольшая стартовая анимация без скролл-наблюдения */
.hero__chips,
.hero__title,
.hero__lead,
.hero__cta,
.hero__bases,
.hero__badge,
.hero__photo,
.hero__media-card {
  opacity: 0;
  animation: hero-in 800ms cubic-bezier(.22,.61,.36,1) forwards;
}
.hero__chips { animation-delay: 80ms; }
.hero__title { animation-delay: 180ms; }
.hero__lead  { animation-delay: 280ms; }
.hero__cta   { animation-delay: 360ms; }
.hero__bases { animation-delay: 440ms; }
.hero__badge { animation-delay: 520ms; }
.hero__photo { animation-delay: 100ms; animation-name: hero-photo-in; animation-duration: 900ms; }
.hero__media-card { animation-delay: 700ms; }

@keyframes hero-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes hero-photo-in {
  from { opacity: 0; transform: translateY(30px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* ===== Legal document body (privacy / consent) ===== */
.legal__body { max-width: 960px; }
.legal__body h2 { font-size: 21px; font-weight: 600; letter-spacing: -0.01em; margin: 30px 0 10px; }
.legal__body h2:first-child { margin-top: 0; }
.legal__body h3 { font-size: 16.5px; font-weight: 600; margin: 20px 0 8px; }
.legal__body p { font-size: 15.5px; line-height: 1.7; color: var(--text-secondary); margin: 0 0 12px; }
.legal__body ul { margin: 0 0 16px; padding-left: 22px; }
.legal__body li { font-size: 15.5px; line-height: 1.6; color: var(--text-secondary); margin-bottom: 6px; }
/* Вложенный список (подпункты правил) и жирные подписи внутри пунктов. */
.legal__body ul ul { margin: 6px 0 0; }
.legal__body strong { color: var(--text); font-weight: 600; }
.legal__date { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }
