/* ============================================================
   Лендинг нутрициолога Елизаветы Мухиной
   Тёплая натуральная палитра: бежевый фон + глубокий зелёный
   ============================================================ */

:root {
  --bg: #FAF7F1;
  --bg-tinted: #F1EDE3;
  --surface: #FFFFFF;
  --ink: #26332B;
  --muted: #6E7B70;
  --accent: #3E7C4F;
  --accent-dark: #2E5F3C;
  --accent-soft: #E4EFE4;
  --warn: #B4632F;
  --warn-soft: #FBF4EE;
  --warn-line: #EAD9CC;
  --line: #E4DFD3;
  --radius: 20px;
  --shadow: 0 10px 30px rgba(38, 51, 43, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Montserrat", "Segoe UI", Tahoma, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

section[id] { scroll-margin-top: 92px; }

.center { text-align: center; }

/* ---------- Доступность ---------- */

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 0 0 12px 12px;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* ---------- Типографика ---------- */

h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

h3 { font-size: 19px; font-weight: 700; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.lead { font-size: 18px; color: var(--muted); }

.accent { color: var(--accent); }

.section { padding: 88px 0; }

.section-tinted { background: var(--bg-tinted); }

.section-note {
  margin-top: 28px;
  color: var(--muted);
  font-size: 15px;
  max-width: 640px;
}
.section-note.center { margin-left: auto; margin-right: auto; }

/* ---------- Кнопки ---------- */

.btn {
  display: inline-block;
  padding: 15px 30px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { text-decoration: none; transform: translateY(-2px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(62, 124, 79, 0.35);
}
.btn-primary:hover { background: var(--accent-dark); }

.btn-ghost {
  background: transparent;
  color: var(--accent-dark);
  border-color: var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); }

.btn-small { padding: 10px 22px; font-size: 15px; }

.btn-block { display: block; text-align: center; width: 100%; }

/* ---------- Шапка ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 247, 241, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo { display: flex; flex-direction: column; line-height: 1.2; }
.logo:hover { text-decoration: none; }
.logo-name { font-weight: 800; font-size: 18px; }
.logo-role {
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav a { color: var(--ink); font-weight: 600; font-size: 15px; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav .btn { color: #fff; }
.site-nav .btn:hover { color: #fff; }

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ---------- Первый экран ---------- */

.hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(600px 400px at 85% 10%, rgba(62, 124, 79, 0.12), transparent 70%),
    radial-gradient(500px 380px at 5% 90%, rgba(217, 119, 87, 0.08), transparent 70%);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-text .lead { margin: 18px 0 30px; max-width: 520px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 38px; }

.stats {
  display: flex;
  gap: 36px;
  list-style: none;
}
.stats li { display: flex; flex-direction: column; }
.stats strong { font-size: 26px; font-weight: 800; color: var(--accent-dark); }
.stats span { font-size: 14px; color: var(--muted); }

.hero-photo img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 220px 220px var(--radius) var(--radius);
  box-shadow: var(--shadow);
}

/* ---------- Карточки «болей» ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.card p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- Обо мне ---------- */

.about-inner {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 56px;
  align-items: center;
}

.about-photo img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.about-text .lead { margin: 12px 0 18px; }

.about-text p { margin-bottom: 12px; }

.about-subtitle {
  font-weight: 700;
  margin-top: 16px;
}

.checklist { list-style: none; margin: 12px 0 16px; }
.checklist li {
  padding-left: 32px;
  position: relative;
  margin-bottom: 10px;
  color: var(--ink);
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E5F3C' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

.about-quote {
  border-left: 4px solid var(--accent);
  padding: 6px 0 6px 18px;
  font-style: italic;
  color: var(--accent-dark);
  font-weight: 600;
}

/* ---------- Взрослым и детям ---------- */

.family-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}

.family-text p { margin-bottom: 12px; max-width: 560px; }

.restrictions {
  background: var(--warn-soft);
  border: 1px solid var(--warn-line);
  border-left: 4px solid var(--warn);
  border-radius: var(--radius);
  padding: 26px 28px;
}

.restrictions-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warn);
  margin-bottom: 12px;
}

.restrictions ul { list-style: none; }
.restrictions li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 15px;
  color: var(--ink);
}
.restrictions li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warn);
}

/* ---------- Услуги и цены ---------- */

.price-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 36px;
  align-items: stretch;
}

.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
}
.price-card h3 { margin-bottom: 8px; }

.price { font-size: 30px; font-weight: 800; margin-bottom: 18px; }
.price span {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-left: 6px;
}

.price-card ul {
  list-style: none;
  margin-bottom: 26px;
  flex-grow: 1;
}
.price-card li {
  padding-left: 26px;
  position: relative;
  margin-bottom: 9px;
  font-size: 15px;
  color: var(--muted);
}
.price-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E5F3C' stroke-width='3'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/10px no-repeat;
}

.price-card.featured {
  border: 2px solid var(--accent);
  box-shadow: var(--shadow);
}

.price-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

/* ---------- Шаги ---------- */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 36px;
  list-style: none;
  counter-reset: steps;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 14px;
}

.step-card p { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ---------- Отзывы ---------- */

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 36px;
}

.review-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.review-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 39px;
  height: 39px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.review-avatar svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.review-card blockquote {
  flex-grow: 1;
  font-size: 15.5px;
  color: var(--ink);
}

.review-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
}

.review-date {
  /* прижимает дату к нижнему правому углу карточки */
  margin-top: auto;
  text-align: right;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ---------- FAQ ---------- */

.faq-container { max-width: 780px; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-top: 14px;
  padding: 4px 24px;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  list-style: none;
  position: relative;
  padding-right: 36px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: var(--accent);
  font-weight: 600;
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { padding-bottom: 18px; color: var(--muted); font-size: 15.5px; }

/* ---------- Контакты ---------- */

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.contact-info .lead { margin: 12px 0 26px; }

.contact-list { list-style: none; }
.contact-list li {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}
.contact-list span {
  min-width: 90px;
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-top: 2px;
}
.contact-list a { font-weight: 700; font-size: 17px; }

.contact-note {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--muted);
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 30px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-weight: 600;
  font-size: 14.5px;
}
.contact-form label small { color: var(--muted); font-weight: 500; }

.contact-form input[type="text"],
.contact-form textarea {
  font-family: inherit;
  font-size: 15.5px;
  padding: 13px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.15s ease;
  width: 100%;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.consent {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px !important;
  font-weight: 400 !important;
  font-size: 13.5px !important;
  color: var(--muted);
}
.consent input { margin-top: 3px; accent-color: var(--accent); }

.form-result { font-weight: 600; font-size: 15px; min-height: 1.4em; }
.form-result.success { color: var(--accent-dark); }
.form-result.error { color: #C0392B; }

/* ---------- Страница политики ---------- */

.page { padding: 64px 0 88px; }

.page-container { max-width: 780px; }

.page h1 { margin-bottom: 8px; }
.page h2 { margin-top: 34px; font-size: 22px; }
.page p, .page ul { margin-top: 12px; color: var(--ink); }
.page ul { padding-left: 22px; }
.page li { margin-bottom: 6px; }

.page-updated {
  color: var(--muted);
  font-size: 14px;
  font-style: italic;
}

/* ---------- Футер ---------- */

.site-footer {
  background: #22301F;
  color: rgba(255, 255, 255, 0.85);
  padding: 36px 0;
  font-size: 14px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-name { font-weight: 700; color: #fff; }
.footer-note { color: rgba(255, 255, 255, 0.55); font-size: 13px; }

.footer-links { display: flex; gap: 22px; }
.footer-links a { color: rgba(255, 255, 255, 0.85); }
.footer-links a:hover { color: #fff; }

/* ---------- Блог ---------- */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 36px;
}

.blog-card h3 { margin-bottom: 8px; }
.blog-card h3 a { color: var(--ink); text-decoration: none; }
.blog-card h3 a:hover { color: var(--accent); text-decoration: none; }
.blog-card p { color: var(--muted); font-size: 15px; }

.blog-date { margin-top: 12px; font-size: 13.5px; color: var(--muted); }

.blog-cta {
  margin-top: 28px;
  padding: 24px 26px;
  background: var(--accent-soft);
  border-radius: var(--radius);
}
.blog-cta p { margin-bottom: 14px; font-weight: 600; }

.blog-disclaimer {
  margin-top: 24px;
  padding: 16px 20px;
  background: var(--bg-tinted);
  border-radius: 12px;
  font-size: 14px;
  color: var(--muted);
}

.author-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-top: 24px;
  padding: 22px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.author-name { font-weight: 800; margin-bottom: 4px; }
.author-bio { font-size: 14.5px; color: var(--muted); }

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

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 420px; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .family-inner { grid-template-columns: 1fr; gap: 36px; }
  .price-grid { grid-template-columns: 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
  .steps-grid { grid-template-columns: repeat(2, 1fr); }
  .reviews-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .blog-grid { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }

  .menu-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 22px 20px 26px;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  body.nav-open .site-nav { display: flex; }
  body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .section { padding: 60px 0; }
  .hero { padding: 44px 0 60px; }
  .cards-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .stats { gap: 24px; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* ---------- Сертификаты ---------- */
.certs {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.certs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.cert {
  padding: 0;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) / 2);
  background: var(--surface);
  cursor: zoom-in;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.cert img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 842 / 595;
  object-fit: cover;
}

.cert:hover,
.cert:focus-visible {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

/* Лайтбокс. Критично: стили только для состояния [open] — если задать
   display на самом dialog, он станет видимым всегда (перебьёт браузерное
   dialog:not([open]) { display: none }). Кнопки прибиты к углам экрана
   (диалог = полноэкранный контейнер), а не к картинке — не прячутся за
   контентом и работают при любом размере изображения. */
.lightbox[open] {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 56px 16px 20px;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.lightbox::backdrop {
  background: rgba(24, 32, 27, 0.88);
}

/* Единый размер просмотра: высота фиксирована (68vh), у сертификатов
   почти одинаковые пропорции — на экране они одного размера */
.lightbox img {
  display: block;
  max-width: min(86vw, 1000px);
  max-height: 68vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-btn {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(24, 32, 27, 0.55);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-btn:hover,
.lightbox-btn:focus-visible {
  background: var(--accent);
}

.lightbox-close {
  top: 12px;
  right: 16px;
}

.lightbox-prev {
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  margin: 0;
}

@media (max-width: 560px) {
  .certs-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}
