/* ============================================================
   Мебельная мастерская — публичная страница
   Всё через CSS-переменные. Тема оформления задаётся атрибутом
   data-theme на <html>: "light" (по умолчанию) | "neutral" | "dark".
   Тему выбирает администратор; фронт применяет её из контента
   (js/main.js -> applyTheme) и кэширует в localStorage.
   ============================================================ */

:root,
:root[data-theme="light"] {
  /* Тёплая «древесная» — по умолчанию. Вместо чёрного — мягкий тёпло-коричневый. */
  --bg: #FBF7F1;
  --bg-alt: #F4ECE0;
  --surface: #FFFFFF;
  --text: #574B41;      /* основной текст, списки, маркеры */
  --text-soft: #6F655A;
  --heading: #574B41;   /* заголовки — тот же мягкий тон */
  --accent: #B07D56;
  --accent-strong: #8E5E3B;
  --accent-tint: #EFE1D1;
  --line: #E7DCCC;
  --ink: #574B41;       /* тёмные кнопки и CTA-полоса — тоже без чёрного */
  --ink-text: #FBF7F1;
  --ok: #4F7A54;
  --err: #B4453C;
  color-scheme: light;
}

:root[data-theme="neutral"] {
  /* Спокойная светлая: тёплый серый + приглушённый шалфейный акцент. Без чёрного. */
  --bg: #F6F6F3;
  --bg-alt: #ECECE7;
  --surface: #FFFFFF;
  --text: #4A4842;      /* текст, списки, маркеры — мягкий тон заголовков */
  --text-soft: #5E5B54;
  --heading: #4A4842;
  --accent: #7E8A74;
  --accent-strong: #515C48;
  --accent-tint: #E4E8DE;
  --line: #E1E0DA;
  --ink: #4A4842;       /* тёмные кнопки и CTA-полоса — тоже без чёрного */
  --ink-text: #F6F6F3;
  --ok: #4F7A54;
  --err: #B4453C;
  color-scheme: light;
}

:root[data-theme="dark"] {
  /* Тёмная: тёплый графит, светлый текст, карамельный акцент */
  --bg: #1E1B18;
  --bg-alt: #262220;
  --surface: #2B2724;
  --text: #F1EBE2;
  --text-soft: #B3A996;
  --heading: #F3EADC;
  --accent: #CB9E72;
  --accent-strong: #E6BE92;
  --accent-tint: #3A322A;
  --line: #3C352E;
  --ink: #F1EBE2;
  --ink-text: #1E1B18;
  --ok: #86C08A;
  --err: #E98A80;
  color-scheme: dark;
}

/* Плавный переход при смене темы (включается на ~650мс из JS) */
html.theme-anim,
html.theme-anim * {
  transition: background-color 0.5s ease, color 0.5s ease,
              border-color 0.5s ease, box-shadow 0.5s ease,
              fill 0.5s ease !important;
}

:root {
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -20px rgba(43, 38, 32, 0.28);
  --shadow-sm: 0 8px 20px -12px rgba(43, 38, 32, 0.22);
  --maxw: 1180px;
  --gap: clamp(1rem, 3vw, 2rem);
  --section-y: clamp(3.5rem, 9vw, 7rem);

  --font-head: "Playfair Display", "Times New Roman", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Общие плавные переходы для текстовых элементов (цвет — при смене темы и на ховере) */
a { transition: color 0.28s ease; }
h1, h2, h3, h4,
p, li, span, b, small,
.eyebrow, .section__lead, .price, .tag {
  transition: color 0.32s ease;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: 0.01em;
  color: var(--heading);
}
h1 { font-size: clamp(2rem, 1.3rem + 3.4vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.9vw, 2.5rem); }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem); }
p { margin: 0 0 1rem; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

.section { padding-block: var(--section-y); }
.section--alt { background: var(--bg-alt); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: 0.9rem;
}
.section__lead { color: var(--text-soft); font-size: 1.075rem; }

/* ---------- Кнопки ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: var(--ink-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.28s ease, background 0.28s ease,
              color 0.28s ease, border-color 0.28s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #fff; }
.btn--accent:hover { --btn-bg: var(--accent-strong); }
.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line);
}
.btn--ghost:hover { border-color: var(--accent); }
.btn--block { width: 100%; }
.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.9rem; }

/* ---------- Хедер ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.45s ease, box-shadow 0.45s ease, background 0.45s ease;
}
.header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 24px -18px rgba(43, 38, 32, 0.4);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: 72px;
  padding-block: 0.6rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-head);
  font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.brand__mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-size: 1.1rem;
}
.nav { margin-left: auto; }
.nav__list {
  display: flex;
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__link {
  text-decoration: none;
  color: var(--text-soft);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}
.nav__link:hover,
.nav__link.is-active { color: var(--text); border-color: var(--accent); }

.header__actions { display: flex; align-items: center; gap: 0.75rem; }
.header__phone {
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header__phone span { color: var(--text-soft); font-weight: 500; display: block; font-size: 0.72rem; }

.burger {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  padding: 0;
}
.burger span,
.burger span::before,
.burger span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  margin-inline: auto;
  background: var(--text);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
.burger span::before { transform: translateY(-6px); }
.burger span::after { transform: translateY(4px); }
.burger.is-open span { background: transparent; }
.burger.is-open span::before { transform: rotate(45deg); }
.burger.is-open span::after { transform: rotate(-45deg) translateY(-1px); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.hero__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__title { margin-bottom: 0.5em; }
.hero__subtitle {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text-soft);
  max-width: 34rem;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.8rem;
}
.hero__media {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 5 / 4;
  background: var(--accent-tint);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__badge {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  padding: 0.7rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

/* ---------- Смена слайдов обложки (класс .hero--rotating ставит main.js) ---------- */
/* Текстовую часть слайда (.hero__lead) по высоте фиксирует JS —
   min-height по самому высокому слайду, поэтому блок не «прыгает». */
.hero--rotating { overflow-x: clip; }               /* съезжающий текст не даёт горизонтальной прокрутки */
.hero--rotating .hero__lead,
.hero--rotating .hero__media img,
.hero--rotating .hero__media .hero__badge {
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
/* уход текущего слайда — влево */
.hero--rotating .hero__lead.is-leaving {
  opacity: 0;
  transform: translateX(-40px);
  transition-duration: 0.5s;
  transition-timing-function: cubic-bezier(0.55, 0, 0.55, 0.2);
}
.hero--rotating .hero__media.is-leaving img,
.hero--rotating .hero__media.is-leaving .hero__badge {
  opacity: 0;
  transform: translateX(-22px);
  transition-duration: 0.5s;
}
/* приход нового слайда — стартовое положение справа, без анимации */
.hero--rotating .hero__lead.is-entering {
  opacity: 0;
  transform: translateX(40px);
  transition: none;
}
.hero--rotating .hero__media.is-entering img,
.hero--rotating .hero__media.is-entering .hero__badge {
  opacity: 0;
  transform: translateX(22px);
  transition: none;
}

.hero__dots {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.8rem;
}
.hero__dots[hidden] { display: none; }
.hero__dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
  transition: background 0.4s ease, width 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.2s ease;
}
.hero__dot:hover { background: var(--accent-tint); }
.hero__dot.is-active { background: var(--accent); width: 24px; }

@media (prefers-reduced-motion: reduce) {
  .hero--rotating .hero__lead,
  .hero--rotating .hero__media img,
  .hero--rotating .hero__media .hero__badge,
  .hero__dot { transition: none; }
  .hero--rotating .hero__lead.is-leaving,
  .hero--rotating .hero__lead.is-entering,
  .hero--rotating .hero__media.is-leaving img,
  .hero--rotating .hero__media.is-leaving .hero__badge,
  .hero--rotating .hero__media.is-entering img,
  .hero--rotating .hero__media.is-entering .hero__badge { opacity: 1; transform: none; }
}

/* ---------- About ---------- */
.about__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
.about__media {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  background: var(--accent-tint);
}
.about__media img { width: 100%; height: 100%; object-fit: cover; }
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 2rem;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat { background: var(--surface); padding: 1.2rem 1.3rem; }
.stat__value { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent-strong); }
.stat__label { color: var(--text-soft); font-size: 0.9rem; }

/* ---------- Сетки карточек ---------- */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.35s ease, border-color 0.35s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent-tint); }
.card:hover .kitchen__name { color: var(--accent-strong); }

/* Кухни */
.kitchen__media { aspect-ratio: 4 / 3; background: var(--accent-tint); }
.kitchen__media img { width: 100%; height: 100%; object-fit: cover; }
.kitchen__body { padding: 1.2rem 1.3rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.kitchen__style { color: var(--accent-strong); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.kitchen__name { margin: 0; }
.kitchen__desc { color: var(--text-soft); font-size: 0.95rem; margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 0.6rem; }
.tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.kitchen__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.3rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.price { line-height: 1.2; }
.price small { display: block; color: var(--text-soft); font-size: 0.72rem; font-weight: 600; }
.price b { font-family: var(--font-head); font-size: 1.35rem; }

/* Преимущества */
.feature { padding: 1.5rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.feature__icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-tint);
  color: var(--accent-strong);
  margin-bottom: 1rem;
}
.feature__icon svg { width: 24px; height: 24px; }
.feature h3 { margin-bottom: 0.35rem; }
.feature p { color: var(--text-soft); font-size: 0.95rem; margin: 0; }

/* Шаги */
.steps { counter-reset: step; display: grid; gap: 1rem; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  padding: 1.2rem 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step__n {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--ink-text);
  font-family: var(--font-head);
  font-size: 1.1rem;
}
.step h3 { margin: 0 0 0.25rem; }
.step p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

/* Акции */
.promo {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.2rem;
  align-items: start;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
}
.promo__badge {
  align-self: start;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  white-space: nowrap;
}
.promo h3 { margin: 0 0 0.3rem; }
.promo p { margin: 0; color: var(--text-soft); }
.promo__until { display: inline-block; margin-top: 0.6rem; font-size: 0.82rem; font-weight: 700; color: var(--accent-strong); }

/* Отзывы */
.review {
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.review__stars { color: var(--accent); letter-spacing: 0.15em; font-size: 0.95rem; }
.review__text { margin: 0; font-size: 0.98rem; }
.review__meta { margin-top: auto; display: flex; align-items: center; gap: 0.75rem; }
.review__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-tint);
  color: var(--accent-strong);
  font-weight: 800;
}
.review__author { font-weight: 700; line-height: 1.2; }
.review__author small { display: block; color: var(--text-soft); font-weight: 500; }

/* FAQ */
.faq { display: grid; gap: 0.75rem; max-width: 48rem; }
.faq__item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.faq__q {
  width: 100%;
  text-align: left;
  padding: 1.1rem 1.3rem;
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  transition: color 0.3s ease, background 0.3s ease;
}
.faq__q:hover { color: var(--accent-strong); }
.faq__q::after { content: "+"; font-size: 1.4rem; color: var(--accent-strong); transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
.faq__item.is-open .faq__q::after { transform: rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
.faq__a p { margin: 0; padding: 0 1.3rem 1.2rem; color: var(--text-soft); }

/* ---------- Контакты ---------- */
.contacts__grid {
  display: grid;
  gap: clamp(2rem, 5vw, 3rem);
}
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.contact-list li { display: grid; grid-template-columns: auto 1fr; gap: 0.9rem; align-items: start; }
.contact-list .ci {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--accent-tint);
  color: var(--accent-strong);
}
.contact-list b { display: block; }
.contact-list span { color: var(--text-soft); }
.socials { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.5rem; }
.socials a {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.85rem;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.socials a:hover { border-color: var(--accent); color: var(--accent-strong); transform: translateY(-2px); }

.contact-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.2rem);
}

/* ---------- Формы ---------- */
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }
.field input,
.field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint);
}
.field textarea { min-height: 96px; resize: vertical; }
.field--hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.85rem; color: var(--text-soft); }
.consent input { width: 18px; height: 18px; margin-top: 0.15rem; flex: none; }
.consent a { color: var(--accent-strong); }
.form__status { margin-top: 0.75rem; font-size: 0.9rem; font-weight: 600; min-height: 1.2em; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--err); }

/* ---------- Модалка ---------- */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(43, 38, 32, 0.5);
  backdrop-filter: blur(3px);
  animation: fade 0.32s ease;
}
.modal__box {
  position: relative;
  width: min(30rem, 100%);
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 5vw, 2.2rem);
  box-shadow: var(--shadow);
  animation: pop 0.34s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}
.modal__close {
  position: absolute;
  top: 0.8rem;
  right: 0.8rem;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-alt);
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
}
.modal__title { margin-bottom: 0.3rem; }
.modal__lead { color: var(--text-soft); font-size: 0.95rem; margin-bottom: 1.2rem; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.97); } }

/* ---------- CTA-полоса ---------- */
.cta-band {
  background: var(--ink);
  color: var(--ink-text);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2rem, 6vw, 3.5rem);
  display: grid;
  gap: 1.5rem;
  align-items: center;
}
.cta-band h2 { color: var(--ink-text); margin: 0; }
.cta-band p { color: color-mix(in srgb, var(--ink-text) 72%, transparent); margin: 0.4rem 0 0; }
.cta-band .btn--ghost { --btn-fg: var(--ink-text); border-color: color-mix(in srgb, var(--ink-text) 38%, transparent); }
.cta-band .btn--ghost:hover { border-color: var(--ink-text); }

/* ---------- Футер ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.5rem, 6vw, 3.5rem);
  font-size: 0.92rem;
}
.footer__grid { display: grid; gap: 1.6rem; }
.footer__cols { display: grid; gap: 1.6rem; }
.footer h4 { font-family: var(--font-body); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-soft); margin: 0 0 0.8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer a { text-decoration: none; color: var(--text-soft); }
.footer a:hover { color: var(--text); }
.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--text-soft);
  cursor: pointer;
  text-align: left;
  transition: color 0.28s ease;
}
.linklike:hover { color: var(--text); }
.footer__bottom {
  margin-top: 2rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  display: grid;
  gap: 0.5rem;
}

/* ---------- Появление блоков ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.95s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 110ms);
  will-change: opacity, transform;
}
.reveal.is-visible { opacity: 1; transform: none; }

/* Текст внутри появляющегося блока «подтягивается» чуть позже самого блока */
.reveal :is(h1, h2, h3, p, .eyebrow, .btn, .stat, .tag) {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 110ms + 120ms);
}
.reveal.is-visible :is(h1, h2, h3, p, .eyebrow, .btn, .stat, .tag) {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal :is(h1, h2, h3, p, .eyebrow, .btn, .stat, .tag) {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn, .card, .faq__a, .nav, .header,
  a, h1, h2, h3, h4, p, li, span, b, small { transition: none; }
  .modal__overlay, .modal__box { animation: none; }
}

/* ---------- Правовые страницы ---------- */
.prose { max-width: 52rem; }
.prose h1 { margin-bottom: 0.6em; }
.prose h2 { font-size: clamp(1.2rem, 1rem + 1vw, 1.5rem); margin-top: 2rem; }
.prose ol, .prose ul { padding-left: 1.3rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .muted { color: var(--text-soft); font-size: 0.95rem; }
.prose .back { display: inline-block; margin-bottom: 2rem; font-weight: 700; text-decoration: none; color: var(--accent-strong); }
.prose .doc-meta {
  margin: 0 0 2rem;
  padding: 0.9rem 1.1rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text-soft);
  font-size: 0.92rem;
}
.prose h2 + p, .prose h2 + ul { margin-top: 0.5rem; }
/* Незаполненный реквизит: администратор подставит значение в панели. */
.prose .ph {
  background: var(--accent-tint);
  color: var(--accent-strong);
  padding: 0.05em 0.4em;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.94em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--ink-text);
  padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ============================================================
   Адаптив
   ============================================================ */
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .cta-band { grid-template-columns: 1fr auto; }
  .cta-band__actions { display: flex; gap: 0.8rem; }
  .footer__grid { grid-template-columns: 1.4fr 2fr; }
  .footer__cols { grid-template-columns: repeat(3, 1fr); }
  .footer__bottom { grid-auto-flow: column; justify-content: space-between; }
}

@media (min-width: 900px) {
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; }
  .about__grid { grid-template-columns: 0.95fr 1.05fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps .step:first-child { grid-column: 1 / -1; }
  .contacts__grid { grid-template-columns: 1fr 1fr; align-items: start; }
}

/* Мобильное меню (бургер до 1023px — чтобы горизонтальному меню всегда хватало места) */
@media (max-width: 1023px) {
  .burger { display: grid; place-items: center; }
  .nav {
    position: fixed;
    inset: 72px 0 auto 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 1rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
    margin: 0;
  }
  .nav.is-open { transform: translateY(0); }
  .nav__list { flex-direction: column; gap: 0.25rem; }
  .nav__link { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--line); }
  .nav__link:last-child { border-bottom: 0; }
  .header__phone span { display: none; }
}

@media (max-width: 520px) {
  .promo { grid-template-columns: 1fr; }
  .kitchen__foot { flex-direction: column; align-items: stretch; }
  .kitchen__foot .btn { width: 100%; }
  .hero__actions .btn { width: 100%; }
}
