/* ============ Reset & tokens ============ */
:root {
  /* ===== Brand palette ===== */
  --teal-900: #0b3a3c;
  --teal-700: #0f5a5e;
  --teal-600: #12807f;
  --teal-500: #17a2a0;
  --teal-100: #d7f0ef;
  --teal-50: #eefaf9;
  --teal-solid: #12807f;
  --teal-solid-hover: #0f5a5e;
  --gold: #e8b84b;
  --danger: #d64545;
  --success: #22c55e;
  --rose: #c97f78;
  --rose-soft: #f6e7e4;
  --rose-deep: #9c4e48;

  /* ===== Semantic colors ===== */
  --ink: #132426;
  --ink-soft: #4c5f62;
  --line: #e9e2d8;
  --bg: #f6f3ec;
  --bg-tinted: #f6f3ec;
  --surface: #ffffff;
  --surface-soft: #fbfdfd;
  --header-bg: rgba(255, 255, 255, 0.86);
  --overlay: rgba(11, 58, 60, 0.38);
  --decor-teal: rgba(23, 162, 160, 0.14);
  --decor-rose: rgba(201, 127, 120, 0.14);
  --decor-dot: rgba(15, 90, 94, 0.10);

  /* ===== Typography scale ===== */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */

  /* ===== Spacing scale (4px grid) ===== */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* ===== Layout ===== */
  --container-max: 1140px;
  --header-h: 72px;

  /* ===== Radii ===== */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  /* ===== Shadows ===== */
  --shadow: 0 18px 50px -18px rgba(11, 58, 60, 0.28);
  --shadow-sm: 0 8px 24px -12px rgba(11, 58, 60, 0.22);

  /* ===== Motion ===== */
  --dur-fast: 0.15s;
  --dur-base: 0.25s;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  /* ===== Z-index ===== */
  --z-overlay: 40;
  --z-header: 50;

  /* ===== Fonts ===== */
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-head: "Manrope", "Inter", "Segoe UI", system-ui, sans-serif;
}

/* ===== Dark theme ===== */
[data-theme="dark"] {
  --teal-900: #061f21;
  --teal-700: #7fd6d3;
  --teal-600: #2bb3b0;
  --teal-500: #38c4c1;
  --teal-100: #1d3c3e;
  --teal-50: #132c2d;
  --rose: #e8a69e;
  --rose-soft: #3a2928;
  --rose-deep: #e8a69e;
  --teal-solid: #0f5a5e;
  --teal-solid-hover: #0b3a3c;

  --ink: #e7f0f0;
  --ink-soft: #9db4b6;
  --line: #244143;
  --bg: #0f1718;
  --bg-tinted: #0f1718;
  --surface: #162526;
  --surface-soft: #1b2d2f;
  --header-bg: rgba(15, 23, 24, 0.86);
  --overlay: rgba(0, 0, 0, 0.55);
  --decor-teal: rgba(56, 196, 193, 0.10);
  --decor-rose: rgba(232, 166, 158, 0.10);
  --decor-dot: rgba(255, 255, 255, 0.06);

  --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .hero::before {
  background: linear-gradient(100deg, rgba(15, 23, 24, 0.94) 0%, rgba(15, 23, 24, 0.62) 42%, rgba(15, 23, 24, 0.12) 72%);
}

/* ===== System theme preference ===== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --teal-900: #061f21;
    --teal-700: #7fd6d3;
    --teal-600: #2bb3b0;
    --teal-500: #38c4c1;
    --teal-100: #1d3c3e;
    --teal-50: #132c2d;
    --rose: #e8a69e;
    --rose-soft: #3a2928;
    --rose-deep: #e8a69e;
    --teal-solid: #0f5a5e;
    --teal-solid-hover: #0b3a3c;

    --ink: #e7f0f0;
    --ink-soft: #9db4b6;
    --line: #244143;
    --bg: #0f1718;
    --bg-tinted: #0f1718;
    --surface: #162526;
    --surface-soft: #1b2d2f;
    --header-bg: rgba(15, 23, 24, 0.86);
    --overlay: rgba(0, 0, 0, 0.55);
    --decor-teal: rgba(56, 196, 193, 0.10);
    --decor-rose: rgba(232, 166, 158, 0.10);
    --decor-dot: rgba(255, 255, 255, 0.06);

    --shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.6);
    --shadow-sm: 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  }

  :root:not([data-theme="light"]):not([data-theme="dark"]) .hero::before {
    background: linear-gradient(100deg, rgba(15, 23, 24, 0.94) 0%, rgba(15, 23, 24, 0.62) 42%, rgba(15, 23, 24, 0.12) 72%);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  color-scheme: light dark;
  /* iOS Safari при overscroll показывает фон html — он должен совпадать с сайтом */
  background-color: var(--bg);
  transition: background-color var(--dur-base) ease;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease;
}

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1140px, 100% - 40px);
  margin-inline: auto;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 12px 24px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn--primary {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: var(--teal-solid);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(18, 128, 127, 0.7);
}

/* Блик, пробегающий по главной кнопке */
.btn--primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.38), transparent);
  transform: skewX(-20deg);
  transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.btn--primary:hover::before {
  left: 130%;
}

.btn--primary:hover {
  background: var(--teal-solid-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -10px rgba(18, 128, 127, 0.8);
}

.btn--primary:active {
  transform: translateY(0) scale(0.97);
  box-shadow: 0 6px 16px -8px rgba(18, 128, 127, 0.7);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 10px 24px -10px rgba(18, 128, 127, 0.7); }
  50% { box-shadow: 0 16px 36px -8px rgba(18, 128, 127, 0.95); }
}

.hero__actions .btn--primary {
  animation: pulse 2.8s ease-in-out infinite;
}

.btn--ghost {
  background: transparent;
  color: var(--teal-700);
  border-color: rgba(18, 128, 127, 0.28);
}

.btn--ghost:hover {
  background: var(--teal-50);
  border-color: var(--teal-500);
  transform: translateY(-2px);
}

.btn--lg {
  padding: 15px 30px;
  font-size: 16px;
}

.btn--block {
  width: 100%;
}

/* ============ Header ============ */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color var(--dur-base) ease, border-color var(--dur-base) ease;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.endo-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
  box-shadow: 0 4px 14px rgba(20, 184, 166, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.endo-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 184, 166, 0.45);
}

.endo-icon svg {
  width: 60%;
  height: 60%;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__text strong {
  font-family: var(--font-head);
  font-size: 15px;
}

.brand__text small {
  font-size: 12px;
  color: var(--ink-soft);
}

.nav {
  display: flex;
  gap: 20px;
  margin-left: auto;
}

.nav__link {
  position: relative;
  padding-bottom: 4px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s ease;
}

/* Подчёркивание растёт слева направо; у активного раздела остаётся */
.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--teal-500), var(--rose));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav__link:hover::after,
.nav__link.is-active::after {
  transform: scaleX(1);
}

.nav__link.is-active {
  color: var(--ink);
}

.nav__link:hover {
  color: var(--teal-700);
}

.header__cta {
  flex-shrink: 0;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu overlay */
.nav-overlay {
  position: fixed;
  inset: 72px 0 0 0;
  background: var(--overlay);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 40;
}

.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open {
  overflow: hidden;
}

@media (min-width: 961px) {
  .nav-overlay {
    display: none;
  }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  padding: 72px 0 88px;
  background: linear-gradient(160deg, var(--teal-50) 0%, var(--bg) 62%);
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero__title {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 800;
  margin-bottom: 20px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--rose-deep);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.hero__badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--rose);
}

.accent {
  color: var(--teal-600);
}

.hero__subtitle {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 30px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero__photo {
  position: relative;
  overflow: hidden;
  width: min(400px, 100%);
  aspect-ratio: 4 / 5;
  border-radius: 24px;
  background: linear-gradient(160deg, var(--bg), var(--teal-50));
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
}

.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  /* Фон снимка белый, фон сайта кремовый: multiply растворяет белое в фоне */
  mix-blend-mode: multiply;
  /* Медленное «дыхание» портрета */
  animation: kenburns 22s ease-in-out infinite alternate;
}

@keyframes kenburns {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.06) translateY(-1.5%); }
}

@media (prefers-reduced-motion: reduce) {
  .hero__img { animation: none; }
}

.hero__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(246, 243, 236, 0.35), transparent 42%);
  pointer-events: none;
}

/* Заглушка живёт только пока фото не загрузилось */
.hero__photo.has-photo .hero__photo-placeholder,
.hero__photo:has(.hero__img) .hero__photo-placeholder {
  display: none;
}

/* В тёмной теме multiply даёт грязную кляксу — фото живёт как светлая карточка */
[data-theme="dark"] .hero__img {
  mix-blend-mode: normal;
  filter: brightness(0.92) contrast(1.02);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__img {
    mix-blend-mode: normal;
    filter: brightness(0.92) contrast(1.02);
  }
}

.hero__photo picture {
  display: contents;
}

.hero__photo-placeholder {
  font-size: 120px;
  filter: drop-shadow(0 10px 18px rgba(11, 58, 60, 0.15));
}

/* ============ Sections ============ */
.section {
  position: relative;
  overflow: hidden;
  padding: 84px 0;
}

/* Тонкая линия вместо стены воздуха — секции перестают слипаться */
.section + .section,
.hero + .section {
  border-top: 1px solid var(--line);
}

.section::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--decor-teal), transparent 70%);
  filter: blur(60px);
  opacity: 0.55;
  top: -160px;
  right: -160px;
  pointer-events: none;
}

.section::after {
  content: "";
  position: absolute;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--decor-rose), transparent 70%);
  filter: blur(60px);
  opacity: 0.55;
  bottom: -180px;
  left: -180px;
  pointer-events: none;
}

.section > .container {
  position: relative;
  z-index: 1;
}

.section--tinted {
  background-color: var(--bg-tinted);
  background-image:
    linear-gradient(to bottom, var(--bg-tinted) 0%, transparent 22%, transparent 78%, var(--bg-tinted) 100%),
    radial-gradient(circle, var(--decor-dot) 1.4px, transparent 1.5px);
  background-size: 100% 100%, 24px 24px;
}

.section__head {
  max-width: 620px;
  margin-bottom: 48px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 12.5px;
  color: var(--rose-deep);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  /* Маска: заголовок выезжает из-под линии.
     padding даёт место нижним выносным (р, у, д), отрицательный margin
     возвращает прежний визуальный отступ */
  overflow: hidden;
  padding-bottom: 0.14em;
  margin-bottom: -0.14em;
}

.section__title > span {
  display: block;
}

.reveal .section__title > span {
  transform: translateY(115%);
  transition: transform 0.7s cubic-bezier(0.16, 0.8, 0.3, 1) 0.06s;
}

.reveal.in-view .section__title > span {
  transform: translateY(0);
}

.section__sub {
  color: var(--ink-soft);
  margin-top: 12px;
  font-size: 16px;
}

/* ============ About ============ */
.about__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}

.about__text {
  max-width: 720px;
}

.about__text p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  font-size: 16px;
}

.about__list {
  list-style: none;
  margin-top: 24px;
  display: grid;
  gap: 12px;
}

.about__list li {
  position: relative;
  padding-left: 30px;
  color: var(--ink);
  font-weight: 500;
}

.about__list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--teal-100);
  color: var(--teal-700);
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

/* ============ Services ============ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.service {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background-color var(--dur-base) ease;
}

.service:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow);
  border-color: var(--teal-100);
}

/* Один визуальный язык для всех иконок: плашка 44px */
.service__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--teal-50);
  color: var(--teal-600);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease;
}

.service__title {
  font-size: 17px;
  margin-bottom: 8px;
}

.service__text {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ============ Patients ============ */
.patients__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.patient-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 26px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background-color var(--dur-base) ease;
}

.patient-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--rose), var(--teal-500));
}

.patient-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow);
  border-color: var(--rose-soft);
}

.patient-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--rose-soft);
  color: var(--rose-deep);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease;
}

.patient-card__icon svg {
  width: 22px;
  height: 22px;
}

.patient-card__title {
  font-size: 18px;
  margin-bottom: 8px;
}

.patient-card__text {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ============ Method ============ */
/* Принципы — не карточки: им хватает иконки и текста */
.method__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px 32px;
  margin-bottom: 56px;
}

.method-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.method-item__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--teal-50);
  color: var(--teal-600);
  display: grid;
  place-items: center;
  transition: background-color var(--dur-base) ease, color var(--dur-base) ease;
}

.method-item__icon svg {
  width: 22px;
  height: 22px;
}

.method-item h3 {
  font-size: 17px;
  margin-bottom: 4px;
}

.method-item p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

/* ============ Process ============ */
.process {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  counter-reset: step;
}

.process__step {
  position: relative;
  padding: 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease,
    background-color var(--dur-base) ease;
}

.process__step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--teal-100);
}

.process__num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal-solid), var(--teal-900));
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.process__step h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.process__step p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}

.process-block {
  margin-top: 56px;
}

.process-block__title {
  font-size: 20px;
  margin-bottom: 24px;
}

/* ============ Contacts ============ */
.contacts__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 56px;
  align-items: center;
}

.contacts__info {
  max-width: 560px;
}

.contacts__sub {
  color: var(--ink-soft);
  margin-top: 12px;
  font-size: 16px;
}

.contacts__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.contacts__actions svg {
  width: 18px;
  height: 18px;
}

.contacts__note {
  margin-top: 20px;
  font-size: 13px;
  color: var(--ink-soft);
}

/* Фирменный знак — заполняет правую половину вместо пустоты */
.contacts__visual {
  display: grid;
  place-items: center;
}

.contacts__mark {
  position: relative;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 25%, var(--teal-50), transparent 62%),
    radial-gradient(circle at 72% 78%, var(--rose-soft), transparent 58%);
  box-shadow: 0 30px 60px -40px rgba(11, 58, 60, 0.45);
}

.contacts__mark::before {
  content: "";
  position: absolute;
  inset: 26px;
  border-radius: 50%;
  border: 1px dashed var(--line);
}

.contacts__mark svg {
  width: 140px;
  height: 140px;
  color: var(--teal-700);
}

/* ============ Footer ============ */
.footer {
  background: var(--teal-900);
  color: rgba(255, 255, 255, 0.75);
  padding: 28px 0;
  transition: border-color var(--dur-base) ease;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
}

.footer__disclaimer {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

/* В тёмной теме футер сливается с фоном — даём границу */
[data-theme="dark"] .footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
}

/* ============ Icon colors ============ */
.hero__photo-placeholder {
  color: var(--teal-500);
}

.service__icon {
  color: var(--teal-600);
}

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero__visual { order: 0; }
  .hero__photo { width: min(320px, 100%); }

  .about__grid {
    grid-template-columns: 1fr;
  }

  .contacts__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contacts__visual {
    display: none;
  }

  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .patients__grid,
  .method__grid {
    grid-template-columns: 1fr;
  }

  .process {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--surface);
    flex-direction: column;
    padding: 20px;
    gap: 6px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    margin-left: 0;
    /* display вместо сдвига за экран: в Safari iOS уехавшее меню
       выглядывало белой плашкой под адресной строкой */
    display: none;
  }

  .nav.open {
    display: flex;
  }

  /* Safari iOS: backdrop-filter на sticky-шапке рисует "белую плашку" над ней */
  .header {
    background: var(--surface);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav__link { padding: 12px 4px; font-size: 16px; }
  .header__cta { margin-left: auto; }
  .burger { display: flex; }
}

@media (max-width: 560px) {
  .container {
    width: min(1140px, 100% - 32px);
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  /* Декор-пятна на телефоне читаются как грязные заплатки — выключаем */
  .section::before,
  .section::after {
    display: none;
  }

  .section { padding: 56px 0; }
  .section__head { margin-bottom: 36px; }
  .section__title { font-size: 26px; }

  .hero {
    padding: 36px 0 56px;
  }

  .hero__title {
    font-size: 32px;
    margin-bottom: 14px;
  }

  .hero__subtitle {
    font-size: 16px;
    margin-bottom: 22px;
  }

  .hero__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__photo {
    width: min(280px, 100%);
  }

  .hero__photo-placeholder {
    font-size: 88px;
  }

  .header__inner {
    gap: 10px;
  }

  .header__cta {
    padding: 10px 16px;
    font-size: 14px;
  }

  .brand__text strong {
    font-size: 14px;
  }

  .btn--lg {
    padding: 14px 24px;
    font-size: 15px;
  }

  /* Компактный таймлайн вместо карточек — экономит высоту */
  .process {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .process__step {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    align-items: start;
    padding: 14px 0;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .process__step + .process__step {
    border-top: 1px solid var(--line);
  }

  .process__num {
    grid-row: 1 / 3;
    width: 34px;
    height: 34px;
    margin-bottom: 0;
    font-size: 14px;
  }

  .process__step h3 {
    grid-column: 2;
    margin-bottom: 2px;
  }

  .process__step p {
    grid-column: 2;
    font-size: 14px;
  }

  .contacts__actions .btn {
    width: 100%;
  }

  /* Компактные карточки ЦА: иконка слева, текст справа */
  .patients__grid {
    gap: 14px;
  }

  .patient-card {
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 16px;
    align-items: start;
    padding: 20px;
  }

  .patient-card__icon {
    grid-row: 1 / 3;
    margin-bottom: 0;
  }

  .patient-card__title {
    grid-column: 2;
    font-size: 16px;
    margin-bottom: 4px;
  }

  .patient-card__text {
    grid-column: 2;
  }

  /* Компактные метод-пункты */
  .method__grid {
    gap: 10px;
    margin-bottom: 36px;
  }

  .method-item {
    padding: 14px 16px;
  }

  /* Компактные услуги: иконка слева, текст справа */
  .services__grid {
    gap: 10px;
  }

  .service {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 14px;
    align-items: start;
    padding: 16px 18px;
  }

  .service__icon {
    grid-row: 1 / 3;
    margin-bottom: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--teal-50);
    display: grid;
    place-items: center;
  }

  .service__icon svg {
    width: 20px;
    height: 20px;
  }

  .method-item__icon,
  .patient-card__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .method-item__icon svg,
  .patient-card__icon svg {
    width: 20px;
    height: 20px;
  }

  .service__title {
    grid-column: 2;
    font-size: 16px;
    margin-bottom: 2px;
  }

  .service__text {
    grid-column: 2;
    font-size: 14px;
  }

  .process-block {
    margin-top: 36px;
  }
}

/* ============ Selection ============ */
::selection {
  background: var(--teal-100);
  color: var(--ink);
}

/* ============ Keyboard focus ============ */
:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
  border-radius: 4px;
}

.btn:focus-visible,
.burger:focus-visible,
.theme-toggle__option:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

/* ============ Skip link ============ */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 200;
  background: var(--teal-solid);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 12px 12px 0;
  font-weight: 600;
  font-size: 14px;
}

.skip-link:focus-visible {
  left: 0;
  top: 12px;
}

/* ============ Theme toggle ============ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.theme-toggle__option {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  color: var(--ink-soft);
  transition: background var(--dur-fast) ease, color var(--dur-fast) ease, transform var(--dur-fast) ease;
}

.theme-toggle__option:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.theme-toggle__option.active {
  background: var(--teal-solid);
  color: #fff;
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .reveal,
  .fly-in {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============ Theme toggle — compact on mobile ============ */
@media (max-width: 560px) {
  /* CTA в шапке дублирует кнопку в hero — освобождаем место под toggle */
  .header__cta {
    display: none;
  }

  .theme-toggle__option {
    width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .theme-toggle__option[data-theme="system"] {
    display: none;
  }
}

/* ============ Reveal on scroll ============ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ============ Method fly-in (right to left, staggered) ============ */
.fly-in {
  opacity: 0;
  transform: translateX(48px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.fly-in.in-view {
  opacity: 1;
  transform: none;
}

.method-item:nth-child(1) { transition-delay: 0s; }
.method-item:nth-child(2) { transition-delay: 0.2s; }
.method-item:nth-child(3) { transition-delay: 0.4s; }

.process__step:nth-child(1) { transition-delay: 0s; }
.process__step:nth-child(2) { transition-delay: 0.2s; }
.process__step:nth-child(3) { transition-delay: 0.4s; }
.process__step:nth-child(4) { transition-delay: 0.6s; }

/* ============ Decorative: gradient border on hover ============ */
.service,
.patient-card,
.process__step {
  position: relative;
}

.service::after,
.patient-card::after,
.process__step::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(135deg, var(--teal-500), var(--rose));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.service:hover::after,
.patient-card:hover::after,
.process__step:hover::after {
  opacity: 1;
}

/* ============ SVG icon sizes ============ */
.service__icon svg {
  width: 32px;
  height: 32px;
}

.hero__photo-placeholder svg {
  width: 100px;
  height: 100px;
}
