/* ==========================================================================
   32 КАРАТА — Стоматология. Design system v6.
   Макет «чистой клиники» (v5): воздух, крупные скругления, мягкие тени,
   цветные фото — но в фирменной палитре бренда: тёплый чёрный + золото
   + песочные оттенки, как в логотипе и интерьере клиники.
   ========================================================================== */

:root{
  --accent: #a16207;         /* фирменное золото */
  --accent-dark: #7d4b05;
  --accent-soft: #e9d9b8;
  --dark: #171310;           /* тёплый чёрный — тёмные блоки */
  --dark-2: #241f19;
  --sand: #f6efe2;           /* песочная подложка */
  --sand-soft: #fbf8f1;
  --ink: #1c1917;            /* основной текст */
  --soft: #57534e;
  --faint: #6f6a61;   /* было #a39d92 — 2,4:1 на белом, провал WCAG AA */
  --line: #eadfcc;
  --white: #ffffff;
  --amber: #e0a213;

  /* алиасы для инлайн-стилей в разметке */
  --ink-soft: var(--soft);

  --font: "Manrope", "Helvetica Neue", Arial, sans-serif;

  --container: 1200px;
  --r-sm: 14px;
  --r-md: 22px;
  --r-lg: 32px;
  --shadow: 0 24px 60px -28px rgba(28, 25, 23, .28);
  --shadow-sm: 0 10px 30px -18px rgba(28, 25, 23, .3);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* height:auto обязателен: у картинок есть атрибуты width/height (против сдвига макета),
   без него браузер берёт высоту из атрибута буквально и растягивает картинку.
   Так 12.09.2026 поехала галерея кейсов: 274×648 вместо 274×395. */
img{ max-width: 100%; height: auto; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
button{ font-family: inherit; cursor: pointer; }
h1,h2,h3,h4{ font-family: var(--font); font-weight: 800; margin: 0; letter-spacing: -0.02em; }
p{ margin: 0; }

.container{ max-width: var(--container); margin: 0 auto; padding: 0 28px; }

.eyebrow{
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-dark); font-weight: 800; margin-bottom: 18px;
  background: var(--sand); padding: 8px 16px; border-radius: 999px;
}
.eyebrow::before{ content:""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }

.section{ padding: 104px 0; }
.section--tight{ padding: 72px 0; }
.section--dark{ background: var(--dark); color: #efe9df; }
.section--alt{ background: var(--sand-soft); }

.section-head{ max-width: 640px; margin: 0 0 56px; }
.section-head.center{ margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2{ font-size: clamp(30px, 4vw, 46px); line-height: 1.1; }
.section-head p{ margin-top: 16px; color: var(--soft); font-size: 17px; }
.section--dark .section-head p{ color: #b8ab97; }

/* ---------- кнопки ---------- */
.btn{
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px; border-radius: 999px; border: 1.5px solid transparent;
  font-size: 15px; font-weight: 800; letter-spacing: .01em;
  transition: all .22s var(--ease); white-space: nowrap;
}
.btn-gold, .btn-primary{ background: var(--ink); color: var(--white); box-shadow: 0 14px 30px -12px rgba(28,25,23,.5); }
.btn-gold:hover, .btn-primary:hover{ background: var(--accent); transform: translateY(-2px); box-shadow: 0 18px 36px -12px rgba(161,98,7,.5); }
.btn-outline{ background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-outline:hover{ border-color: var(--accent); color: var(--accent-dark); transform: translateY(-2px); }
.section--dark .btn-outline{ background: transparent; color: #efe9df; border-color: #453d33; }
.section--dark .btn-outline:hover{ border-color: var(--white); }
.btn-sm{ padding: 11px 20px; font-size: 13.5px; }
.btn-block{ width: 100%; }
.textlink{ font-weight: 800; font-size: 15px; color: var(--accent-dark); border-bottom: 2px solid var(--accent-soft); padding-bottom: 2px; transition: border-color .2s; }
.textlink:hover{ border-color: var(--accent); }

/* ---------- бегущая строка ---------- */
.marquee{ background: var(--sand); color: var(--accent-dark); overflow: hidden; white-space: nowrap; }
.marquee-track{ display: inline-flex; align-items: center; animation: marquee 36s linear infinite; }
.marquee-track span{ display: inline-flex; align-items: center; gap: 14px; padding: 11px 0; font-size: 13px; font-weight: 700; color: var(--accent-dark); }
.marquee-track span em{ font-style: normal; font-weight: 800; color: var(--ink); }
.marquee-track span::after{ content:"✦"; font-size: 10px; color: var(--accent); opacity:.55; margin: 0 22px; }
@keyframes marquee{ from{ transform: translateX(0);} to{ transform: translateX(-50%);} }
@media (prefers-reduced-motion: reduce){ .marquee-track{ animation: none; } }

/* ---------- шапка ---------- */
.topbar{ background: var(--white); color: var(--soft); font-size: 13px; border-bottom: 1px solid var(--line); }
.topbar .container{ display: flex; align-items: center; justify-content: space-between; padding-top: 9px; padding-bottom: 9px; gap: 16px; }
.topbar a{ color: var(--soft); transition: color .2s; }
.topbar a:hover{ color: var(--accent-dark); }
.topbar-links{ display: flex; gap: 22px; align-items: center; }
.topbar-links span{ color: var(--faint); }

.site-header{ position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,.94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .container{ display: flex; align-items: center; justify-content: space-between; height: 84px; }

.logo{ display: flex; align-items: center; gap: 12px; font-size: 21px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; }
.logo .diamond{ width: 38px; height: 34px; object-fit: contain; flex: none; }
.logo small{ display: block; font-size: 12px; font-weight: 800; letter-spacing: .1em; color: var(--accent-dark); text-transform: uppercase; }

.main-nav{ display: flex; align-items: center; gap: 6px; }
.main-nav a{ font-size: 14.5px; font-weight: 700; color: var(--soft); padding: 9px 15px; border-radius: 999px; transition: all .2s; }
.main-nav a:hover{ color: var(--ink); background: var(--sand-soft); }
.main-nav a.active{ color: var(--accent-dark); background: var(--sand); }

.header-actions{ display: flex; align-items: center; gap: 16px; }
.header-phone{ display: flex; flex-direction: column; text-align: right; }
.header-phone a{ font-size: 16px; font-weight: 800; }
.header-phone span{ font-size: 12px; color: var(--faint); }

.nav-toggle{ display: none; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); align-items: center; justify-content: center; flex: none; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{ content:""; display:block; width: 18px; height: 2px; border-radius: 2px; background: var(--ink); position: relative; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.nav-toggle span::before{ position:absolute; top:-6px; }
.nav-toggle span::after{ position:absolute; top:6px; }
.nav-toggle.open span{ background: transparent; }
.nav-toggle.open span::before{ top:0; transform: rotate(45deg); }
.nav-toggle.open span::after{ top:0; transform: rotate(-45deg); }

/* ---------- герой ---------- */
.hero{
  position: relative;
  background:
    radial-gradient(52% 70% at 88% 12%, rgba(161,98,7,.10), transparent 65%),
    radial-gradient(40% 50% at 4% 90%, rgba(161,98,7,.06), transparent 60%),
    var(--white);
  padding: 84px 0 72px;
  overflow: hidden;
}
.hero-canvas{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}
.hero > .container{ position: relative; z-index: 1; }
.hero-grid{ display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.hero-eyebrow{
  display:inline-flex; align-items:center; gap:8px;
  font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent-dark); font-weight: 800; margin-bottom: 22px;
  background: var(--sand); padding: 8px 16px; border-radius: 999px;
}
.hero-eyebrow::before{ content:""; width:7px; height:7px; border-radius:50%; background: var(--accent); }
.hero h1{ font-size: clamp(40px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -0.03em; }
.hero h1 em{ font-style: normal; color: var(--accent); }
.hero p.lead{ margin-top: 24px; font-size: 18px; color: var(--soft); max-width: 480px; }
.hero-actions{ display:flex; align-items:center; gap: 24px; margin-top: 36px; flex-wrap: wrap; }

/* --- 3D-сцена с главврачом: вырезанный портрет выступает из арки --- */
.hero-photo{ position: relative; perspective: 1100px; }
.tilt-inner{
  position: relative;
  height: 560px;
  margin-top: 56px; /* запас сверху — портрет выступает над аркой */
  transform-style: preserve-3d;
  transition: transform .4s var(--ease);
  will-change: transform;
}
.arch{
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 470px;
  border-radius: 235px 235px var(--r-lg) var(--r-lg);
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(255,255,255,.55), transparent 60%),
    linear-gradient(165deg, #f1e5cb 0%, #e3cda2 55%, #d3b57f 100%);
  box-shadow: var(--shadow);
  transform: translateZ(-40px);
}
.cutout{
  position: absolute; bottom: 0; left: 50%;
  height: 108%; width: auto; max-width: none;
  transform: translateX(-50%) translateZ(45px);
  filter: drop-shadow(0 34px 34px rgba(28,25,23,.32));
  pointer-events: none;
}
.hero-chip{
  position: absolute;
  display:flex; align-items:center; gap: 12px;
  background: var(--white); border-radius: 999px; padding: 13px 20px 13px 13px;
  box-shadow: var(--shadow-sm);
  font-size: 13.5px; font-weight: 700; line-height: 1.3; max-width: 250px;
}
.hero-chip .dot{
  flex:none; width: 38px; height: 38px; border-radius: 50%;
  background: var(--sand); color: var(--accent-dark);
  display:flex; align-items:center; justify-content:center;
  font-size: 15px;
}
.hero-chip .dot svg{ width: 19px; height: 19px; }
.chip-a{ left: -34px; bottom: 120px; transform: translateZ(85px); animation: chip-float 5.5s ease-in-out infinite; }
.chip-b{ right: -30px; top: 120px; transform: translateZ(100px); animation: chip-float 6.5s ease-in-out .8s infinite; }
@keyframes chip-float{
  0%,100%{ margin-top: 0; }
  50%{ margin-top: -10px; }
}
.hero-name{
  margin: 20px auto 0; width: fit-content;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 28px; text-align: center;
}
.hero-name strong{ display:block; font-size: 16px; font-weight: 800; }
.hero-name span{ font-size: 12px; color: var(--accent-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
@media (prefers-reduced-motion: reduce){
  .chip-a, .chip-b{ animation: none; }
  .tilt-inner{ transition: none; }
}

.hero-stats{ display:grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 72px; }
.hero-stats div{ background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px 24px; box-shadow: var(--shadow-sm); }
.hero-stats strong{ display:block; font-size: 28px; font-weight: 800; color: var(--accent-dark); letter-spacing:-0.02em; }
.hero-stats span{ font-size: 13px; color: var(--soft); font-weight: 600; }

/* ---------- внутренние страницы ---------- */
.page-hero{
  background: radial-gradient(60% 100% at 90% 0%, rgba(161,98,7,.10), transparent 60%), var(--sand-soft);
  padding: 64px 0 56px; border-bottom: 1px solid var(--line);
}
.page-hero .crumbs{ font-size: 13px; color: var(--faint); font-weight: 600; margin-bottom: 16px; }
.page-hero .crumbs a:hover{ color: var(--accent-dark); }
.page-hero h1{ font-size: clamp(32px,4.4vw,50px); max-width: 720px; }
.page-hero p{ margin-top: 14px; color: var(--soft); max-width: 560px; font-size: 16.5px; }

/* ---------- преимущества ---------- */
.usp-list{ display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.usp-row{
  background: var(--sand-soft); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 28px; display:flex; flex-direction: column; gap: 10px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.usp-row:hover{ transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.usp-row .n{
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: var(--ink); color: var(--white);
  display:flex; align-items:center; justify-content:center;
  font-size: 13.5px; font-weight: 800;
}
.usp-row h3{ font-size: 18.5px; margin-top: 8px; }
.usp-row p{ color: var(--soft); font-size: 14.5px; }

/* ---------- услуги (главная) ---------- */
.services-grid{ display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.service-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 30px; display:flex; flex-direction: column; gap: 14px;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.service-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card{ overflow: hidden; }
.service-card .photo{
  margin: -30px -30px 4px;
  height: 172px; overflow: hidden;
}
.service-card .photo img{ width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.service-card:hover .photo img{ transform: scale(1.05); }
.service-card .num{
  width: 42px; height: 42px; border-radius: 13px;
  background: var(--sand); color: var(--accent-dark);
  display:flex; align-items:center; justify-content:center;
  font-size: 14px; font-weight: 800;
}
.service-card h3{ font-size: 19.5px; }
.service-card p{ color: var(--soft); font-size: 14.5px; flex: 1; }
.service-card .meta{ font-size: 14px; font-weight: 800; color: var(--accent-dark); border-top: 1px solid var(--line); padding-top: 14px; }
.service-card .row a{ font-size: 14px; font-weight: 800; color: var(--accent-dark); }
.service-card .row a:hover{ color: var(--ink); }

/* ---------- услуги (каталог) ---------- */
.service-block{ background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 30px 34px; display: grid; grid-template-columns: 230px 1fr; gap: 32px; margin-bottom: 16px; }
.service-block h3{ font-size: 21px; }
.service-block .badge{ display: inline-block; margin-top: 10px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-dark); background: var(--sand); padding: 6px 12px; border-radius: 999px; font-weight: 800; }
.service-block p{ color: var(--soft); font-size: 15px; margin-bottom: 14px; }

.cat-nav{ display:flex; flex-wrap: wrap; gap: 10px; margin-bottom: 56px; }
.cat-nav a{ padding: 11px 20px; border: 1.5px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--soft); background: var(--white); transition: all .2s; }
.cat-nav a:hover{ border-color: var(--accent); color: var(--accent-dark); }

/* ---------- о клинике ---------- */
.about-split{ display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
.about-media img{ width: 100%; height: 470px; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow); }
.about-stats{ display:grid; grid-template-columns: repeat(2,1fr); gap: 14px; margin-top: 36px; }
.about-stats .stat{ background: var(--sand-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 18px 20px; }
.about-stats .stat strong{ font-size: 30px; font-weight: 800; color: var(--accent-dark); display:block; letter-spacing:-0.02em; }
.about-stats .stat strong span{ color: var(--accent); }
.about-stats .stat p{ font-size: 13px; color: var(--soft); margin-top: 4px; font-weight: 600; }
.about-list{ margin-top: 26px; display: flex; flex-direction: column; gap: 13px; }
.about-list li{ display:flex; gap: 12px; align-items:flex-start; font-size: 15.5px; color: var(--soft); font-weight: 500; }
.about-list li svg{ flex: none; width: 22px; height: 22px; color: var(--white); background: var(--accent); border-radius: 50%; padding: 4px; margin-top: 1px; }

/* ---------- врачи ---------- */
/* flex, а не grid: неполный последний ряд встаёт по центру, а не прилипает влево
   (16.09.2026 после ухода двух врачей осталось 3 карточки на главной и 4+2 на «Врачах»).
   Ширина карточки прежняя — четверть ряда. */
.doctors-grid{ display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.doctors-grid > .doctor-card{ flex: 0 0 calc((100% - 54px) / 4); }
.doctor-card{
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.doctor-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow); }
.doctor-photo{ aspect-ratio: 4/5; background: var(--sand); display:flex; align-items:center; justify-content:center; position: relative; overflow: hidden; }
.doctor-photo img{ width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.doctor-card:hover .doctor-photo img{ transform: scale(1.04); }
.doctor-photo .initials{ font-size: 42px; font-weight: 800; color: var(--accent); }
.doctor-info{ padding: 20px 22px 26px; }
.doctor-info h3{ font-size: 16.5px; }
.doctor-info .role{ display:inline-block; font-size: 12px; color: var(--accent-dark); background: var(--sand); padding: 5px 11px; border-radius: 999px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; margin-top: 10px; }
.doctor-info p{ font-size: 13.5px; color: var(--soft); margin-top: 10px; }
.doctor-info a.btn{ margin-top: 16px; width: 100%; }

.chief-card{
  display: grid; grid-template-columns: .75fr 1.25fr; gap: 46px;
  background: var(--dark); color: #efe9df; border-radius: var(--r-lg);
  padding: 48px; align-items: center; margin-bottom: 56px; box-shadow: var(--shadow);
}
.chief-photo{ aspect-ratio: 3/4; border-radius: var(--r-md); overflow: hidden; background: var(--dark-2); }
.chief-photo img{ width: 100%; height: 100%; object-fit: cover; }
.chief-photo .initials{ font-size: 56px; font-weight: 800; color: #5c5347; }
.chief-card .role{ display:inline-block; font-size: 12px; color: var(--dark); background: var(--accent-soft); padding: 6px 14px; border-radius: 999px; font-weight: 800; text-transform: uppercase; letter-spacing:.04em; }
.chief-card h2{ color: var(--white); font-size: 30px; margin-top: 14px; }
.chief-card p{ color: #b8ab97; margin-top: 14px; font-size: 15.5px; }
.chief-stats{ display:flex; gap: 14px; margin-top: 26px; flex-wrap: wrap; }
.chief-stats div{ background: rgba(255,255,255,.06); border: 1px solid #453d33; border-radius: var(--r-sm); padding: 14px 18px; }
.chief-stats div strong{ display:block; font-size: 22px; font-weight: 800; color: var(--white); }
.chief-stats div span{ font-size: 12px; color: #b8ab97; font-weight: 600; }

/* ---------- работы ---------- */
.gallery-grid{ columns: 4 220px; column-gap: 16px; }
.gallery-item{ break-inside: avoid; margin-bottom: 16px; position: relative; overflow: hidden; border-radius: var(--r-md); }
.gallery-item img{ width: 100%; display:block; transition: transform .4s var(--ease); }
.gallery-item:hover img{ transform: scale(1.05); }
.gallery-item .cap{
  position:absolute; left:10px; right:10px; bottom:10px; padding: 9px 14px;
  background: rgba(255,255,255,.92); color: var(--ink); border-radius: 999px;
  font-size: 12.5px; font-weight: 800;
  opacity: 0; transform: translateY(6px); transition: all .25s var(--ease);
}
.gallery-item:hover .cap{ opacity: 1; transform: translateY(0); }

/* ---------- отзывы ---------- */
.reviews-track{ display:grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.review-card{ background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 28px; display:flex; flex-direction: column; gap: 14px; }
.review-card .stars{ color: var(--amber); font-size: 15px; letter-spacing: 2px; }
.review-card p{ font-size: 14.5px; color: var(--soft); line-height: 1.65; }
.review-card .who{ display:flex; align-items:center; gap: 12px; margin-top: auto; padding-top: 8px; }
.review-card .avatar{ width: 38px; height: 38px; border-radius: 50%; background: var(--sand); color: var(--accent-dark); display:flex; align-items:center; justify-content:center; font-weight:800; font-size: 14px; }
.review-card .who span{ font-size: 13.5px; font-weight: 800; }
.review-card .who small{ display:block; font-size: 12px; color: var(--faint); font-weight: 600; }

.rating-strip{ display:flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; }
.rating-pill{ flex:1; min-width: 220px; display:flex; align-items:center; justify-content: space-between; background: var(--sand-soft); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 18px 22px; }
.rating-pill .name{ font-weight: 800; font-size: 14px; }
.rating-pill .score{ color: var(--amber); font-size: 17px; font-weight: 800; }
.rating-pill a{ font-size: 12.5px; text-decoration: underline; color: var(--soft); font-weight: 600; }

/* ---------- цены ---------- */
.price-table{ width: 100%; border-collapse: collapse; }
.price-table caption{ text-align: left; font-size: 22px; font-weight: 800; letter-spacing:-0.02em; padding: 42px 0 14px; }
.price-table tr{ border-bottom: 1px solid var(--line); }
.price-table td{ padding: 15px 8px; font-size: 15px; vertical-align: top; }
.price-table td.svc{ color: var(--soft); font-weight: 500; }
.price-table td.cost{ text-align: right; font-weight: 800; white-space: nowrap; font-size: 15.5px; color: var(--accent-dark); }
.price-note{ margin-top: 54px; padding: 24px 28px; background: var(--sand-soft); border: 1px solid var(--line); border-radius: var(--r-md); font-size: 14px; color: var(--soft); }

/* ---------- запись / CTA ---------- */
.cta-block{
  background: linear-gradient(135deg, var(--dark-2) 0%, var(--dark) 100%);
  color: var(--white); border-radius: var(--r-lg);
  padding: 64px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 46px;
  box-shadow: var(--shadow);
}
.cta-block h2{ color: var(--white); font-size: clamp(28px,3.4vw,40px); max-width: 470px; }
.cta-block p{ color: #b8ab97; margin-top: 16px; max-width: 430px; font-size: 15.5px; }
.cta-block .hours{ margin-top: 28px; display:flex; flex-direction:column; gap: 9px; font-size: 14.5px; color: #cfc4b2; font-weight: 600; }

.contact-form{ background: var(--white); color: var(--ink); border-radius: var(--r-md); padding: 32px; display: flex; flex-direction: column; gap: 13px; box-shadow: var(--shadow-sm); }
.contact-form h2, .contact-form h3{ font-size: 19px; margin-bottom: 2px; }
.contact-form input, .contact-form textarea{
  width: 100%; border: 1.5px solid var(--line); background: var(--sand-soft);
  border-radius: var(--r-sm); padding: 14px 16px; font-family: var(--font); font-size: 15px; color: var(--ink);
  transition: border-color .2s, background .2s;
}
.contact-form input:focus, .contact-form textarea:focus{ outline: none; border-color: var(--accent); background: var(--white); }
.contact-form .fine{ font-size: 12.5px; color: var(--faint); }
.form-status{ font-size: 13.5px; color: var(--accent-dark); font-weight: 800; min-height: 18px; }

.contact-grid{ display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info-card{ background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); padding: 30px; }
.contact-info-card + .contact-info-card{ margin-top: 18px; }
.info-row{ display:flex; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.info-row:last-child{ border-bottom: none; }
.info-row .ic{ width: 38px; height: 38px; color: var(--accent-dark); background: var(--sand); border-radius: 12px; padding: 9px; flex: none; }
.info-row strong{ display:block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 800; margin-bottom: 3px; }
.info-row span{ font-size: 15.5px; color: var(--ink); font-weight: 600; }
.map-frame{ border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line); height: 400px; }
.map-frame iframe{ width: 100%; height: 100%; border: 0; }

/* ---------- подвал ---------- */
.site-footer{ background: var(--dark); color: #b8ab97; padding: 74px 0 0; }
.footer-grid{ display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; border-bottom: 1px solid #352e26; }
.footer-grid h4, .footer-grid .footer-h{ color: var(--white); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 20px; font-weight: 800; }
.footer-grid p{ font-size: 14.5px; line-height: 1.75; color: #a39681; max-width: 280px; }
.footer-grid ul{ display:flex; flex-direction: column; gap: 12px; }
.footer-grid a{ font-size: 14.5px; color: #b8ab97; transition: color .2s; font-weight: 500; }
.footer-grid a:hover{ color: var(--accent-soft); }
.footer-logo{ display:flex; align-items:center; gap: 12px; font-size: 20px; color: var(--white); margin-bottom: 18px; font-weight: 800; }
.footer-logo .diamond{ width: 34px; height: 30px; object-fit: contain; filter: brightness(0) invert(1); }
.footer-bottom{ display:flex; align-items:center; justify-content: space-between; gap: 20px; padding: 26px 0; font-size: 12.5px; color: #9c8f7a; flex-wrap: wrap; font-weight: 600; }
.footer-bottom a{ color: #b8ab97; }
.footer-bottom a:hover{ color: var(--accent-soft); }
.footer-bottom-links{ display:flex; gap: 22px; flex-wrap: wrap; }
.footer-disclaimer{ font-size: 12.5px; color: #9c8f7a; padding-bottom: 22px; max-width: 720px; line-height: 1.7; }

.social-row{ display:flex; gap: 12px; margin-top: 18px; }
.social-row a{ width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid #453d33; display:flex; align-items:center; justify-content:center; transition: all .2s; }
.social-row a:hover{ border-color: var(--accent-soft); background: rgba(255,255,255,.06); }
.social-row svg{ width: 16px; height: 16px; color: #b8ab97; }

/* ---------- прочее ---------- */
.reveal{ opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.reveal.in{ opacity: 1; transform: translateY(0); }

.call-fab{
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--accent); color: var(--white);
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 18px 40px -12px rgba(161,98,7,.65);
  transition: transform .2s var(--ease), background .2s var(--ease);
}
.call-fab::before{
  content:""; position:absolute; inset:-6px; border-radius:50%;
  border: 2px solid rgba(161,98,7,.45);
  animation: call-pulse 2.2s ease-out infinite;
}
@keyframes call-pulse{
  0%{ transform: scale(.85); opacity: 1; }
  70%,100%{ transform: scale(1.35); opacity: 0; }
}
.call-fab:hover{ transform: translateY(-3px) scale(1.04); background: var(--ink); }
.call-fab svg{ width: 25px; height: 25px; }
@media (prefers-reduced-motion: reduce){ .call-fab::before{ animation: none; display:none; } }

/* ---------- адаптив ---------- */
@media (max-width: 1080px){
  .hero-grid{ grid-template-columns: 1fr; gap: 44px; }
  .tilt-inner{ height: 460px; max-width: 520px; margin-left: auto; margin-right: auto; }
  .arch{ height: 386px; border-radius: 190px 190px var(--r-lg) var(--r-lg); }
  .hero-stats{ grid-template-columns: repeat(2,1fr); }
  .usp-list{ grid-template-columns: repeat(2,1fr); }
  .services-grid{ grid-template-columns: repeat(2,1fr); }
  .doctors-grid > .doctor-card{ flex-basis: calc((100% - 18px) / 2); }
  .reviews-track{ grid-template-columns: repeat(2,1fr); }
  .about-split{ grid-template-columns: 1fr; gap: 40px; }
  .about-media img{ height: 360px; }
  .contact-grid{ grid-template-columns: 1fr; }
  .chief-card{ grid-template-columns: 1fr; padding: 32px; }
  .chief-photo{ max-width: 280px; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .service-block{ grid-template-columns: 1fr; gap: 12px; }
}

/* Шапка с бургером — до 1180 px: полному меню с зазорами нужно ~1150 px,
   на 861–1150 кнопка «Записаться» уходила за край экрана (замеры 16.09.2026). */
@media (max-width: 1180px){
  .topbar{ display: none; }
  /* backdrop-filter делает шапку containing block для fixed-элементов —
     мобильное меню обрезалось бы её высотой; на мобильных отключаем */
  .site-header{ backdrop-filter: none; background: var(--white); }
  .main-nav{
    position: fixed; inset: 84px 0 0 0; background: var(--white);
    flex-direction: column; align-items: flex-start; padding: 26px 24px; gap: 6px;
    transform: translateX(100%); transition: transform .3s var(--ease); overflow-y: auto;
  }
  .main-nav.open{ transform: translateX(0); }
  .main-nav a{ width: 100%; padding: 14px 16px; font-size: 15.5px; border-radius: var(--r-sm); }
  .nav-toggle{ display: flex; }
  .header-phone{ display: none; }
}

@media (max-width: 860px){
  .section{ padding: 68px 0; }
  .hero{ padding: 56px 0 56px; }
  .hero-canvas{ display: none; }
  .services-grid{ grid-template-columns: 1fr; }
  .usp-list{ grid-template-columns: 1fr; }
  .reviews-track{ grid-template-columns: 1fr; }
  .cta-block{ grid-template-columns: 1fr; padding: 30px; }
  .gallery-grid{ columns: 2 160px; }
  .footer-grid{ grid-template-columns: 1fr; }
  .footer-grid p{ max-width: none; }
  .chip-a{ left: 6px; }
  .chip-b{ right: 6px; }
  .hero-stats{ margin-top: 88px; }
}

@media (max-width: 520px){
  .doctors-grid > .doctor-card{ flex-basis: 100%; }
  .hero-stats{ grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero-stats div{ padding: 16px; }
  .gallery-grid{ columns: 2 140px; }
  .container{ padding: 0 18px; }
  .cta-block, .chief-card{ padding: 24px; }
  .tilt-inner{ height: 380px; margin-top: 44px; }
  .arch{ height: 316px; border-radius: 158px 158px var(--r-md) var(--r-md); }
  .chip-a{ left: 0; bottom: 80px; }
  .chip-b{ right: 0; top: 84px; }
  .hero-chip{ max-width: 200px; font-size: 12px; padding: 10px 14px 10px 10px; }
}

/* ===== Согласия в формах (152-ФЗ) ===== */
.agrees{display:flex;flex-direction:column;gap:9px;margin:2px 0 14px;text-align:left}
.agree{display:flex;gap:10px;align-items:flex-start;cursor:pointer;font-size:13px;color:var(--soft);line-height:1.5}
.agree a{color:var(--accent);text-decoration:underline}
.agree input{appearance:none;-webkit-appearance:none;width:18px;height:18px;flex-shrink:0;margin-top:1px;border:1.5px solid #cbbfa9;border-radius:5px;cursor:pointer;position:relative;background:var(--white);transition:background .2s,border-color .2s}
.agree input:checked{background:var(--accent);border-color:var(--accent)}
.agree input:checked::after{content:"";position:absolute;left:5px;top:1.5px;width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg)}

/* ===== Уведомление о cookie ===== */
.cookiebar{position:fixed;left:18px;bottom:18px;z-index:220;max-width:430px;background:var(--dark);color:#fff;padding:16px 18px;border-radius:var(--r-sm);display:flex;align-items:center;gap:14px;box-shadow:0 20px 50px -18px rgba(23,19,16,.55)}
.cookiebar[hidden]{display:none!important}
.cookiebar p{font-size:12.5px;line-height:1.55;color:rgba(255,255,255,.82);margin:0}
.cookiebar a{color:#fff;text-decoration:underline}
.cookiebar a:hover{color:var(--accent-soft)}
.cookiebar button{flex-shrink:0;background:#fff;color:var(--ink);border:none;border-radius:999px;padding:10px 20px;font-family:var(--font);font-size:13px;font-weight:700;cursor:pointer;transition:background .2s}
.cookiebar button:hover{background:var(--accent-soft)}
@media (max-width:640px){.cookiebar{left:8px;right:8px;bottom:8px;max-width:none;padding:13px 14px}.cookiebar p{font-size:11.5px}}


/* ==========================================================================
   Доступность, производительность, мобильная вёрстка — задачи №108, №109
   ========================================================================== */

/* <picture> не должен вклиниваться в flex/grid-раскладку контейнеров */
picture{ display: contents; }

/* Ссылка «к основному содержимому» для клавиатуры и скринридеров */
.skip-link{
  position: absolute; left: -9999px; top: 0; z-index: 500;
  background: var(--ink); color: #fff; padding: 13px 22px;
  border-radius: 0 0 var(--r-sm) 0; font-weight: 800; font-size: 14px;
}
.skip-link:focus{ left: 0; }

/* Подписи полей: не видно глазом, слышно скринридеру */
.vh{
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

/* Видимый фокус с клавиатуры (мышь его не показывает) */
:focus-visible{ outline: 3px solid var(--accent-dark); outline-offset: 2px; border-radius: 5px; }
.contact-form input:focus-visible,
.contact-form textarea:focus-visible{ outline: 3px solid var(--accent-dark); outline-offset: 1px; }
.agree input:focus-visible{ outline: 3px solid var(--accent-dark); outline-offset: 3px; }
.call-fab:focus-visible, .nav-toggle:focus-visible{ outline: 3px solid var(--accent-dark); outline-offset: 3px; }

/* Реквизиты в подвале (ПП № 736, п. 12) */
.footer-legal{ border-top: 1px solid #3a332b; margin-top: 34px; padding-top: 22px; display: grid; gap: 10px; }
.footer-legal p{ font-size: 12.5px; line-height: 1.6; color: #b8ab97; }
.footer-legal strong{ color: #efe9df; }
.footer-legal a{ color: var(--accent-soft); text-decoration: underline; }

/* Размер зоны нажатия на сенсорных экранах */
@media (pointer: coarse){
  .footer-bottom-links a,
  .footer-grid ul a,
  .topbar a{ display: inline-flex; align-items: center; min-height: 44px; }
  .main-nav a{ min-height: 48px; display: flex; align-items: center; }
  .btn-sm{ min-height: 44px; }
}

/* ---------- узкие экраны: 360 px ---------- */
@media (max-width: 400px){
  .container{ padding: 0 14px; }
  .site-header .container{ height: 72px; }
  .main-nav{ inset: 72px 0 0 0; }
  .logo{ font-size: 18px; gap: 9px; }
  .logo .diamond{ width: 32px; height: 29px; }
  .logo small{ font-size: 12px; letter-spacing: .08em; }   /* текст не мельче 12px (свод, правило 24) */
  .hero h1{ font-size: 30px; }
  .hero p.lead{ font-size: 15.5px; }
  .hero-actions{ gap: 14px; }
  .hero-actions .btn{ width: 100%; justify-content: center; }
  .tilt-inner{ height: 330px; }
  .arch{ height: 272px; border-radius: 136px 136px var(--r-md) var(--r-md); }
  .hero-chip{ max-width: 172px; font-size: 12px; padding: 8px 11px 8px 8px; }
  .hero-stats{ grid-template-columns: 1fr; }
  .section{ padding: 52px 0; }
  .section-head h2{ font-size: 25px; }
  .gallery-grid{ columns: 1; }
  .cta-block, .chief-card, .contact-form{ padding: 20px; }
  .about-media img{ height: 260px; }
  .footer-bottom{ flex-direction: column; align-items: flex-start; gap: 10px; }
  .footer-bottom-links{ flex-direction: column; align-items: flex-start; gap: 2px; }
  /* кнопка звонка не должна перекрывать нижний контент и cookie-баннер */
  .call-fab{ width: 54px; height: 54px; right: 12px; bottom: 12px; }
  body{ padding-bottom: 0; }
}

/* ---------- Сведения об организации (ПП № 736) ---------- */
.info-table{ width: 100%; border-collapse: collapse; font-size: 15px; }
.info-table th, .info-table td{ text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.info-table th{ width: 38%; font-weight: 800; color: var(--ink); background: var(--sand-soft); }
.info-table td{ color: var(--soft); }
.info-table a{ color: var(--accent-dark); text-decoration: underline; }
.info-table--wide th, .info-table--wide td{ font-size: 14px; padding: 12px; }
.info-table--wide th{ width: auto; white-space: nowrap; }
.table-scroll{ overflow-x: auto; -webkit-overflow-scrolling: touch; }
.plain-list{ display: grid; gap: 14px; font-size: 15.5px; color: var(--soft); line-height: 1.75; }
.plain-list li{ padding-left: 18px; position: relative; }
.plain-list li::before{ content: "—"; position: absolute; left: 0; color: var(--accent); }
.plain-list strong, .lead-text strong{ color: var(--ink); }
.lead-text{ font-size: 16px; color: var(--soft); line-height: 1.8; margin-bottom: 22px; }
.note{ font-size: 13.5px; color: var(--soft); line-height: 1.7; }
.note a, .plain-list a, .lead-text a{ color: var(--accent-dark); text-decoration: underline; }
/* Поле, которого ещё нет: видно и в вёрстке, и глазами — на боевой домен так уходить нельзя */
.todo{ display: inline-block; background: #fdf2d0; border: 1px dashed #c9971a; color: #7d4b05;
       font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 7px; }
@media (max-width: 640px){
  .info-table th, .info-table td{ display: block; width: auto; }
  .info-table th{ border-bottom: 0; padding-bottom: 4px; background: transparent; }
  .info-table td{ padding-top: 0; }
  .info-table--wide th, .info-table--wide td{ display: table-cell; }
}

/* Телефон в шапке не переносится: в меню добавился пункт «Сведения» */
.header-phone a{ white-space: nowrap; }
/* Компактное меню на всех ширинах, а не только до 1200: при полном меню шапка была
   заполнена под завязку (логотип 177 + меню 722 + телефон и кнопка 274 = 1173 px при
   контейнере 1144), в Chrome это скрывалось, а в Safari на 1280 надпись «32 Карата»
   наезжала на «Главная» (кадр с чужого компьютера, 16.09.2026). Плюс явный зазор между
   логотипом, меню и кнопкой — чтобы при любой ширине шрифта они не касались. */
.main-nav{ gap: 2px; } .main-nav a{ padding: 9px 11px; font-size: 14px; }
.site-header .container{ gap: 20px; }
.logo{ flex: none; white-space: nowrap; }
.header-actions{ flex: none; }

/* Пока показан cookie-баннер, кнопка звонка поднимается — иначе на планшете
   баннер накрывает её углом */
@media (max-width: 900px){
  /* высоту бара считает script.js и кладёт в --consent-h: на телефоне бар с тремя кнопками
     ~300 px, фиксированные 170 px его не перекрывали (проверка 16.09.2026) */
  body:has(#consentBar:not([hidden])) .call-fab{ bottom: calc(var(--consent-h, 154px) + 16px); }
}

/* Контраст: янтарный #e0a213 на светлом — 2,25:1, для текста не годится */
.review-card .stars, .stars, .rating-pill .score{ color: #8a6108; }
/* Плашка-«надзаголовок» внутри тёмного CTA: светлый текст на песочной плашке
   давал 1,3:1 — делаем плашку тёмной */
.cta-block .eyebrow{ background: rgba(255,255,255,.10); color: #e4cdb2 !important; }
/* Зона нажатия ссылок в подвале и меню — не меньше 24px и на десктопе */
.footer-bottom-links a, .footer-grid ul a{ display: inline-flex; align-items: center; min-height: 24px; }

/* Зона нажатия не меньше 24px (WCAG 2.2, критерий 2.5.8) */
.service-card .row a, .rating-pill a, .footer-legal a{
  display: inline-flex; align-items: center; min-height: 24px;
}

/* ---------- тексты документов (правила, положение): docx → html ---------- */
.legal-doc p{ margin: 0 0 12px; line-height: 1.7; color: var(--ink-soft); font-size: 15.5px; }
.legal-doc h1,.legal-doc h2,.legal-doc h3{ font-size: 18px; margin: 28px 0 10px; color: var(--ink); }
.legal-doc ul,.legal-doc ol{ margin: 0 0 14px 22px; line-height: 1.7; color: var(--ink-soft); }
.legal-doc table{ border-collapse: collapse; width: 100%; margin: 14px 0; font-size: 14px; }
.legal-doc td,.legal-doc th{ border: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.legal-doc .container{ overflow-x: auto; }

/* прейскурант на телефоне: три колонки должны влезать в 360–390 px без прокрутки */
@media (max-width: 520px){
  .info-table--wide th, .info-table--wide td{ padding: 8px 6px; font-size: 13px; }
  .info-table--wide td:first-child{ font-size: 12px; letter-spacing: -.01em; }
  .info-table--wide td:nth-child(2){ overflow-wrap: anywhere; }
}

/* ---------- цели касания на телефоне: текстовые ссылки не ниже 44 px ---------- */
@media (max-width: 640px){
  .service-card .row a, .textlink, .rating-pill a, .page-hero .crumbs a, .footer-grid a, .footer-legal a,
  .info-row a, .contact-info-card a{
    display: inline-flex; align-items: center; min-height: 44px; }
}

/* шапка на 360: зазор 20 px и нежимаемый логотип (правка 16.09 для Safari) снова толкали
   бургер за край на самых узких экранах — здесь зазоры меньше, кнопка компактнее */
@media (max-width: 400px){
  .site-header .container{ gap: 10px; }
  .header-actions{ gap: 10px; }
  .header-actions .btn{ padding: 10px 14px; font-size: 13.5px; }
  .logo{ flex: 0 1 auto; min-width: 0; }
}

/* подвал на телефоне: 44 px — перебивает правило pointer:coarse с min-height 24 px */
@media (max-width: 640px){
  .site-footer .footer-grid li a, .site-footer .footer-grid a, .site-footer .footer-bottom-links a{ display: inline-flex; align-items: center; min-height: 44px; }
}
/* 320 px: логотипу не хватает места рядом с кнопкой — кнопку в шапке прячем,
   записаться можно с первого экрана и по кнопке звонка */
@media (max-width: 340px){
  .header-actions .btn{ display: none; }
}

/* 18.09 SEO: заголовок колонки подвала — абзац, а не h4; тема в h1 главной */
.footer-grid .footer-h{ max-width: none; line-height: 1.3; }
.hero h1 .hero-eyebrow{ display: flex; width: fit-content; line-height: 1.4; }

/* 18.09: строка об образовании в карточке врача */
.doctor-info .doctor-edu{ font-size: 13px; line-height: 1.5; color: var(--faint); margin-top: 8px; }
