/* ==========================================================================
   Оформление шаблона. Цвета, шрифты и скругление приходят из config.js
   (theme) через CSS-переменные; значения ниже — запасные, как в базовом демо.
   ========================================================================== */

:root {
  --bg: #efebe4;
  --surface: #faf8f3;
  --text: #1e1b17;
  --muted: #6a645a;
  --accent: #2450d0;
  --accent-text: #ffffff;
  --accent-ink: #2450d0;      /* акцент как цвет текста на светлом фоне (скрипт затемняет, если мало контраста) */
  --line: #d8d1c5;
  --radius: 3px;

  --fallback-display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --fallback-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Sofia Sans Extra Condensed", var(--fallback-display);
  --font-body: "Golos Text", var(--fallback-body);
  --display-weight: 700;
  --display-scale: 1;

  --gutter: clamp(16px, 4vw, 56px);
  --gap: clamp(16px, 2.2vw, 32px);
  --max: 1440px;
  --header-h: 72px;
  --section: clamp(72px, 10vw, 160px);
  --bleed: calc(-1 * (var(--gutter) + max(0px, (100vw - var(--max)) / 2)));

  --fs-small: 0.875rem;
  --fs-body: 1.0625rem;
  --fs-lead: clamp(1.1875rem, 1.05rem + 0.55vw, 1.5rem);
  --fs-h3: calc(clamp(2rem, 1.5rem + 1.5vw, 2.75rem) * var(--display-scale));
  --fs-h2: calc(clamp(3.25rem, 1.8rem + 5.6vw, 7rem) * var(--display-scale));
  --fs-h1: calc(clamp(3rem, 13vw, 5rem) * var(--display-scale));
}

@media (min-width: 720px) {
  :root { --fs-h1: calc(clamp(3.4rem, 8.3vw, 8.25rem) * var(--display-scale)); }
}

/* ---------- База ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, address, table { margin: 0; padding: 0; }
ul, ol { list-style: none; }
address { font-style: normal; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }

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

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

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon { flex: none; display: inline-block; vertical-align: -0.12em; }
.tel { white-space: nowrap; }

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

.h2, .hero__title, .h3, .footer__mark {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.h2 { font-size: var(--fs-h2); line-height: 0.9; }
.h3 { font-size: var(--fs-h3); line-height: 0.95; }

.lead { font-size: var(--fs-lead); line-height: 1.35; max-width: 34ch; }
.note { font-size: var(--fs-small); color: var(--muted); max-width: 44ch; }

.link {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--accent-ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: text-underline-offset 0.2s ease;
}
.link:hover { text-underline-offset: 8px; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 84%, var(--text)); }
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 0.9375rem; }
.btn--lg { min-height: 56px; padding: 14px 30px; font-size: 1.0625rem; }
.btn--block { width: 100%; }

/* ---------- Фото: единая лёгкая обработка и заглушка ---------- */

.ph {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
}
.ph img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.9) contrast(1.03);
}
.ph::after {
  content: "";
  position: absolute; inset: 0;
  background: var(--bg);
  mix-blend-mode: multiply;
  opacity: 0.28;
  pointer-events: none;
}
.ph--empty::after { display: none; }

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

.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.header.is-scrolled, .header.is-open { border-bottom-color: var(--line); }

.header__in {
  display: flex; align-items: center;
  gap: clamp(16px, 2.4vw, 40px);
  min-height: var(--header-h);
}

.brand {
  display: inline-flex; align-items: center;
  flex: 0 1 auto; min-width: 0;
  text-decoration: none;
}
.brand__text {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: calc(2.375rem * var(--display-scale));
  line-height: 0.9;
  letter-spacing: 0;
}
.brand--long .brand__text {
  font-size: calc(clamp(1.25rem, 0.9rem + 1vw, 1.5rem) * var(--display-scale));
  line-height: 1;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden;
  padding-block: 2px;
}
.brand__logo { display: block; width: auto; max-width: min(240px, 46vw); object-fit: contain; }

.nav { display: none; }
.nav__list { display: flex; gap: clamp(16px, 2vw, 32px); }
.nav__list a {
  font-size: 0.9375rem; font-weight: 500;
  text-decoration: none;
  padding-block: 8px;
  transition: color 0.2s ease;
}
.nav__list a:hover { color: var(--accent-ink); }

.header__side { display: flex; align-items: center; gap: 12px; margin-left: auto; flex: none; }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8125rem; line-height: 1.3;
  white-space: nowrap;
}
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.is-open .status__dot { background: var(--accent-ink); }
.status__full { display: none; }

.header__book { display: none; }

.menu-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  margin-right: -10px;
  background: none; border: 0; border-radius: var(--radius);
  cursor: pointer;
}
.menu-btn__close { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__open { display: none; }
.menu-btn[aria-expanded="true"] .menu-btn__close { display: block; }

.menu {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto;
}
.menu__in { display: grid; gap: 20px; padding-block: 16px 28px; }
.menu__list a {
  display: block;
  padding-block: 6px;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: calc(2.75rem * var(--display-scale));
  line-height: 1;
  text-decoration: none;
}
.menu__status { font-size: var(--fs-small); color: var(--muted); }
.menu__phone { font-weight: 600; text-decoration: none; justify-self: start; padding-block: 6px; }

@media (min-width: 480px) {
  .header__book { display: inline-flex; }
}
@media (min-width: 1024px) {
  .nav { display: block; }
  .menu-btn, .menu { display: none !important; }
}
@media (min-width: 1240px) {
  .status__full { display: inline; }
  .status__short { display: none; }
}

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

.hero {
  padding-block: clamp(20px, 3vw, 40px) var(--section);
  overflow-x: clip;
}
.hero__grid { display: grid; gap: 32px var(--gap); }

.hero__title {
  font-size: calc(var(--fs-h1) * var(--title-fit, 1));
  line-height: 0.88;
  max-width: 11em;
}
.hero__bottom { display: grid; gap: 24px; margin-top: 28px; }
.hero__lead { font-size: var(--fs-lead); line-height: 1.35; max-width: 30ch; }
.hero__facts {
  display: flex; flex-wrap: wrap; gap: 6px 28px;
  font-size: 0.9375rem;
  color: var(--muted);
}
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

.hero__media { position: relative; margin-inline: calc(-1 * var(--gutter)); }
.hero__photo { aspect-ratio: 4 / 5; border-radius: 0; }

.card {
  position: relative; z-index: 1;
  margin: -64px var(--gutter) 0;
  padding: 20px 22px;
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.9375rem; line-height: 1.45;
  display: grid; gap: 2px;
}
.card__title { font-weight: 600; font-size: 1.0625rem; }
.card__muted { color: var(--muted); }
.card__phone { margin-top: 10px; font-weight: 600; text-decoration: none; justify-self: start; }
.card__phone:hover { color: var(--accent-ink); }

@media (min-width: 720px) {
  .hero__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
  .hero__text {
    grid-column: 1 / span 7;
    display: flex; flex-direction: column; justify-content: space-between;
    padding-top: clamp(8px, 2.4vw, 40px);
  }
  .hero__media { grid-column: 8 / -1; margin-inline: 0 var(--bleed); }
  .hero__photo {
    aspect-ratio: 4 / 5;
    min-height: 100%;
    max-height: 820px;
    border-radius: var(--radius) 0 0 var(--radius);
  }
  .card {
    position: absolute; left: clamp(-120px, -7vw, -40px); bottom: clamp(24px, 4vw, 56px);
    margin: 0;
    width: min(300px, 78%);
  }
}

/* ---------- Общие отступы и шапки блоков ---------- */

.section { padding-block: var(--section); }
.hero + .section { padding-top: 0; }

.head { display: grid; gap: 20px; margin-bottom: clamp(32px, 5vw, 72px); }
.head--split { align-items: end; }
@media (min-width: 720px) {
  .head { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); align-items: end; }
  .head > .h2 { grid-column: 1 / span 7; }
  .head > .lead { grid-column: 9 / -1; }
  .head--split > :last-child:not(.h2) { grid-column: 8 / -1; justify-self: end; text-align: right; }
}

/* ---------- 2. Услуги и цены: «бумажный» прайс ---------- */

.services__grid { display: grid; gap: 28px var(--gap); }
.services__aside { display: grid; gap: 18px; align-content: start; }
.services__filter { max-width: 22rem; }
.services__filter select { background-color: var(--surface); font-weight: 500; cursor: pointer; }
.services__nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.services__nav a {
  font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
}
.services__nav a:hover { color: var(--accent-ink); }

.sheet {
  background: var(--surface);
  border-radius: var(--radius);
  padding: clamp(20px, 4vw, 64px) clamp(16px, 4vw, 64px);
  margin-inline: calc(var(--gutter) * -0.5);
  display: grid; gap: clamp(40px, 5vw, 72px);
}
.group { scroll-margin-top: calc(var(--header-h) + 24px); }
.group__title { margin-bottom: clamp(14px, 2vw, 24px); }
.group__list { display: grid; gap: 2px; }

.row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(20px, 1fr) auto;
  grid-template-areas: "name dots price" "desc desc time";
  column-gap: 10px; row-gap: 2px;
  align-items: baseline;
  padding: 11px 12px;
  margin-inline: -12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background-color 0.2s ease;
}
a.row:hover { background: var(--bg); }
a.row:hover .row__name { color: var(--accent-ink); }

.row__name { grid-area: name; font-weight: 500; transition: color 0.2s ease; }
.row__tag {
  display: inline-block;
  margin-left: 8px;
  font-size: 0.8125rem; font-weight: 400;
  color: var(--accent-ink);
  white-space: nowrap;
}
.row__dots { grid-area: dots; border-bottom: 2px dotted var(--line); transform: translateY(-3px); }
.row__price {
  grid-area: price;
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: calc(1.75rem * var(--display-scale));
  line-height: 1;
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  text-align: right;
}
.row__from { margin-right: 0.22em; }
.row__desc { grid-area: desc; font-size: var(--fs-small); color: var(--muted); max-width: 52ch; }
.row__time {
  grid-area: time;
  font-size: var(--fs-small); color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap; text-align: right;
}

@media (min-width: 720px) {
  .sheet { margin-inline: 0; }
  .row {
    grid-template-columns: minmax(0, auto) minmax(24px, 1fr) 5.5rem 5.25rem;
    grid-template-areas: "name dots time price" "desc desc . .";
    column-gap: 12px;
  }
}
@media (min-width: 1024px) {
  .services__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .services__aside { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 32px); gap: 24px; }
  .services__nav { display: grid; gap: 8px; }
  .sheet { grid-column: 5 / -1; }
}

/* ---------- 3. Мастера: разный размер и сдвиг ---------- */

.masters__list {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(40px, 6vw, 96px) var(--gap);
  align-items: start;
}
.master { grid-column: 1 / -1; display: grid; gap: 18px; align-content: start; }
.master__photo { aspect-ratio: 4 / 5; }
.master__body { display: grid; gap: 8px; justify-items: start; }
.master__role { font-size: var(--fs-small); color: var(--muted); }
.master__bio { max-width: 40ch; }
.master .link { margin-top: 6px; }

@media (max-width: 719.98px) {
  .master:nth-child(n + 2) {
    grid-template-columns: 44% minmax(0, 1fr);
    grid-template-areas: "photo name" "photo role" "bio bio" "link link";
    grid-template-rows: 1fr auto auto auto;
    gap: 6px 16px;
  }
  .master:nth-child(n + 2) .master__body { display: contents; }
  .master:nth-child(n + 2) .master__photo { grid-area: photo; aspect-ratio: 3 / 4; }
  .master:nth-child(n + 2) .h3 { grid-area: name; align-self: end; }
  .master:nth-child(n + 2) .master__role { grid-area: role; padding-bottom: 4px; }
  .master:nth-child(n + 2) .master__bio { grid-area: bio; margin-top: 10px; }
  .master:nth-child(n + 2) .link { grid-area: link; justify-self: start; }
  .master:nth-child(even) { grid-template-columns: minmax(0, 1fr) 44%; grid-template-areas: "name photo" "role photo" "bio bio" "link link"; }
}
@media (min-width: 720px) {
  .master:nth-child(odd) { grid-column: 1 / span 6; }
  .master:nth-child(even) { grid-column: 8 / span 5; margin-top: clamp(56px, 9vw, 144px); }
  .master:nth-child(even) .master__photo { aspect-ratio: 3 / 4; }
  .masters__list[data-count="1"] .master { grid-column: 1 / span 6; }
}
@media (min-width: 1024px) {
  .masters__list[data-count="3"] .master:nth-child(1),
  .masters__list[data-count="5"] .master:nth-child(1) { grid-column: 1 / span 5; margin-top: 0; }
  .masters__list[data-count="3"] .master:nth-child(2),
  .masters__list[data-count="5"] .master:nth-child(2) { grid-column: 6 / span 4; margin-top: clamp(64px, 9vw, 144px); }
  .masters__list[data-count="3"] .master:nth-child(3),
  .masters__list[data-count="5"] .master:nth-child(3) { grid-column: 10 / span 3; margin-top: 0; }
  .masters__list[data-count="3"] .master:nth-child(3) .master__photo,
  .masters__list[data-count="5"] .master:nth-child(3) .master__photo { aspect-ratio: 1 / 1; }
  .masters__list[data-count="5"] .master:nth-child(4) { grid-column: 2 / span 4; margin-top: 0; }
  .masters__list[data-count="5"] .master:nth-child(5) { grid-column: 7 / span 5; margin-top: clamp(40px, 6vw, 96px); }
  .masters__list[data-count="5"] .master:nth-child(4) .master__photo { aspect-ratio: 3 / 4; }
  .masters__list[data-count="5"] .master:nth-child(5) .master__photo { aspect-ratio: 4 / 5; }
}

/* ---------- 4. Работы: неровная сетка от края до края ---------- */

.works__grid { columns: 2; column-gap: 8px; padding-inline: 8px; }
.works__grid li { break-inside: avoid; margin-bottom: 8px; }
.works__item { display: block; aspect-ratio: 4 / 5; cursor: zoom-in; }
.works__grid li:nth-child(6n + 2) .works__item { aspect-ratio: 1 / 1; }
.works__grid li:nth-child(6n + 3) .works__item { aspect-ratio: 3 / 4; }
.works__grid li:nth-child(6n + 4) .works__item { aspect-ratio: 4 / 3; }
.works__grid li:nth-child(6n + 6) .works__item { aspect-ratio: 1 / 1; }
.works__item img { transition: transform 0.5s ease; }
.works__item:hover img { transform: scale(1.03); }
.works__item:focus-visible { outline-offset: -4px; outline-color: var(--accent-text); box-shadow: inset 0 0 0 4px var(--accent); }

@media (min-width: 720px) {
  .works__grid { columns: 3; column-gap: 12px; padding-inline: 12px; }
  .works__grid li { margin-bottom: 12px; }
}
@media (min-width: 1024px) {
  .works__grid { columns: 4; }
  .works__grid[data-cols="3"] { columns: 3; }
  .works__grid[data-cols="2"] { columns: 2; }
}

/* ---------- 5. О месте ---------- */

.about { overflow-x: clip; }
.about__grid { display: grid; gap: 32px var(--gap); }
.about__photo { aspect-ratio: 4 / 5; margin-right: 20%; margin-left: calc(-1 * var(--gutter)); border-radius: 0 var(--radius) var(--radius) 0; }
.about__text { display: grid; gap: 24px; align-content: start; }
.about__paras { display: grid; gap: 16px; max-width: 54ch; }

.facts { display: grid; gap: 28px var(--gap); margin-top: 16px; }
.facts dt { font-weight: 600; margin-bottom: 4px; }
.facts dd { font-size: 0.9375rem; color: var(--muted); max-width: 40ch; }
.facts dd a { color: var(--text); text-decoration-thickness: 1px; text-underline-offset: 4px; }

@media (min-width: 560px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts--stack { grid-template-columns: 1fr; }
}
@media (min-width: 900px) {
  .about__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; }
  .about__photo { grid-column: 1 / span 5; margin: 0 0 0 var(--bleed); }
  .about__text { grid-column: 7 / -1; }
}

/* ---------- 6. Запись: поле акцентного цвета и бумажный талон ---------- */

.booking { background: var(--accent); color: var(--accent-text); }
.booking :focus-visible { outline-color: var(--accent-text); }
.booking__grid { display: grid; gap: 40px var(--gap); }
.booking__info { display: grid; gap: 20px; align-content: start; }
.booking .note { color: inherit; opacity: 0.86; }

.ways { display: grid; gap: 10px; justify-items: start; margin-top: 8px; }
.ways a {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px;
  transition: text-underline-offset 0.2s ease;
}
.ways a:hover { text-underline-offset: 8px; }
.ways .ways__phone {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-size: calc(clamp(2.5rem, 1.8rem + 2.6vw, 4.25rem) * var(--display-scale));
  line-height: 1;
  text-decoration: none;
  margin-bottom: 6px;
}

.slip {
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius);
  padding: clamp(20px, 3.4vw, 48px);
}
.slip :focus-visible { outline-color: var(--accent-ink); }

.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 14px; }
.field { display: grid; gap: 6px; align-content: start; grid-column: 1 / -1; }
.field--wide { grid-column: 1 / -1; }
.field label { font-size: var(--fs-small); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0;
  min-height: 52px;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem; line-height: 1.3;
  transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 88px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 0; border-color: var(--accent-ink); }
.field select:disabled { color: var(--muted); cursor: not-allowed; }
.field ::placeholder { color: var(--muted); opacity: 1; }
.field__hint { font-size: var(--fs-small); color: var(--muted); min-height: 1.3em; }
.form__fine { font-size: var(--fs-small); color: var(--muted); }

.slip__done { font-size: var(--fs-lead); line-height: 1.35; max-width: 30ch; padding-block: clamp(24px, 6vw, 80px); }
.slip__link { display: grid; gap: 24px; align-content: center; min-height: 240px; }
.slip__link-text { font-size: var(--fs-lead); line-height: 1.35; max-width: 32ch; }

@media (min-width: 480px) {
  .field { grid-column: auto; }
  .field--wide { grid-column: 1 / -1; }
}
@media (min-width: 900px) {
  .booking__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .booking__info { grid-column: 1 / span 5; }
  .slip { grid-column: 7 / -1; margin-top: calc(-1 * var(--section) - 56px); }
  .about { padding-bottom: calc(var(--section) + 40px); }
}

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

.reviews__rating { font-size: var(--fs-lead); }
.reviews__grid { display: grid; gap: clamp(40px, 5vw, 72px) var(--gap); }
.review { display: grid; gap: 14px; align-content: start; }
.review blockquote p { text-wrap: pretty; }
.review figcaption { font-size: var(--fs-small); }
.review__author { font-weight: 600; }
.review__source { color: var(--muted); margin-left: 8px; }
.review--lead blockquote p {
  font-size: clamp(1.25rem, 0.9rem + 1.9vw, 2.25rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
  max-width: 30em;
}
.reviews__rest { display: grid; gap: 32px var(--gap); align-items: start; }

@media (min-width: 720px) {
  .reviews__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .review--lead { grid-column: 1 / -1; }
  .reviews__rest { grid-column: 3 / -1; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
}
@media (min-width: 1024px) {
  .review--lead { grid-column: 1 / span 9; }
  .reviews__rest { grid-column: 4 / -1; }
  .reviews__rest .review:nth-child(2) { margin-top: 40px; }
}

/* ---------- 8. Частые вопросы ---------- */

.faq { background: var(--surface); }
.faq__grid { display: grid; gap: 32px var(--gap); }
.faq__aside { display: grid; gap: 18px; align-content: start; justify-items: start; }
.faq__phone { font-weight: 600; font-size: var(--fs-lead); text-decoration: none; }
.faq__phone:hover { color: var(--accent-ink); }

.faq__list details { border-top: 1px solid var(--line); }
.faq__list details:last-child { border-bottom: 1px solid var(--line); }
.faq__list summary {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  padding-block: 20px;
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.3125rem);
  font-weight: 500; line-height: 1.3;
  cursor: pointer;
  list-style: none;
  transition: color 0.2s ease;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary:hover { color: var(--accent-ink); }
.faq__list summary { position: relative; padding-right: 40px; }
.faq__list summary::before, .faq__list summary::after {
  content: "";
  position: absolute; right: 0; top: 50%;
  width: 14px; height: 2px; margin-top: -1px;
  background: currentColor;
  transition: transform 0.2s ease;
}
.faq__list summary::before { transform: rotate(90deg); }
.faq__list details[open] summary::before { transform: rotate(0deg); }
.faq__answer { padding-bottom: 24px; max-width: 60ch; }

@media (min-width: 900px) {
  .faq__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
  .faq__aside { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 32px); }
  .faq__list { grid-column: 6 / -1; }
}

/* ---------- 9. Контакты и карта ---------- */

.contacts { overflow-x: clip; }
.contacts__grid { display: grid; gap: 40px var(--gap); }
.contacts__info { display: grid; gap: 22px; align-content: start; justify-items: start; }
.contacts__address { font-size: var(--fs-lead); line-height: 1.3; }
.contacts__address span { display: block; color: var(--muted); font-size: var(--fs-body); }

.hours { width: 100%; max-width: 420px; border-collapse: collapse; margin-top: 10px; font-variant-numeric: tabular-nums; }
.hours th, .hours td { padding: 9px 0; border-top: 1px solid var(--line); font-weight: 400; text-align: left; vertical-align: baseline; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 1px solid var(--line); }
.hours td { text-align: right; white-space: nowrap; }
.hours .is-off td { color: var(--muted); }
.hours .is-today th, .hours .is-today td { font-weight: 600; }
.hours__today { margin-left: 10px; font-size: 0.8125rem; font-weight: 500; color: var(--accent-ink); }

.facts--stack { width: 100%; max-width: 420px; }

.contacts__map { aspect-ratio: 4 / 5; margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
.contacts__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.contacts__map::after { display: none; }

@media (min-width: 720px) {
  .contacts__map { aspect-ratio: 16 / 10; }
}
@media (min-width: 900px) {
  .contacts__grid { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: stretch; }
  .contacts__info { grid-column: 1 / span 5; }
  .contacts__map {
    grid-column: 7 / -1;
    aspect-ratio: auto; min-height: 560px;
    margin: 0 var(--bleed) 0 0;
    border-radius: var(--radius) 0 0 var(--radius);
  }
}

/* ---------- 10. Подвал: оборот карточки ---------- */

.footer {
  background: var(--text);
  color: var(--bg);
  padding-block: clamp(48px, 7vw, 96px) calc(88px + env(safe-area-inset-bottom));
  overflow: hidden;
}
.footer :focus-visible { outline-color: var(--bg); }
.footer__mark {
  font-size: calc(max(3rem, min(24vw, 21rem, 210vw / var(--name-len, 4))) * var(--display-scale));
  line-height: 0.86;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  margin-bottom: clamp(32px, 5vw, 72px);
}
.footer__logo { width: auto; max-width: 100%; object-fit: contain; }
.footer__grid { display: grid; gap: 24px var(--gap); font-size: 0.9375rem; line-height: 1.5; }
.footer__grid a { text-decoration: none; }
.footer__grid a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer__nav { display: grid; gap: 4px; }
.footer__tagline { font-weight: 600; }
.footer__hours span, .footer__address span { display: block; }
.footer__demo {
  margin-top: clamp(40px, 6vw, 80px);
  font-size: 0.8125rem;
  color: color-mix(in srgb, var(--bg) 72%, var(--text));
  max-width: 60ch;
}
@media (min-width: 720px) {
  .footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Плашка демо ---------- */

.badge {
  position: fixed; z-index: 40;
  right: 16px; bottom: calc(16px + env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: #fff; color: #1e1b17;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 4px 14px rgba(30, 27, 23, 0.1);
  font-size: 0.78125rem; line-height: 1.2;
  text-decoration: none;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.badge:hover { color: var(--accent-ink); border-color: var(--accent-ink); }
.badge .icon { width: 12px; height: 12px; }
@media (max-width: 599.98px) {
  .badge { right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px 10px; font-size: 0.71875rem; }
}

/* ---------- Просмотр фото ---------- */

.lb {
  position: fixed; inset: 0;
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: color-mix(in srgb, var(--text) 96%, transparent);
  color: var(--bg);
}
.lb::backdrop { background: transparent; }
.lb[open] { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
.lb :focus-visible { outline-color: var(--bg); }
.lb__figure {
  grid-column: 2;
  display: grid; justify-items: center; gap: 12px;
  padding: 56px 0 20px;
  height: 100dvh;
  grid-template-rows: minmax(0, 1fr) auto;
}
.lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; align-self: center; border-radius: var(--radius); }
.lb__caption { display: flex; gap: 16px; justify-content: center; font-size: var(--fs-small); text-align: center; }
.lb__count { opacity: 0.7; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lb__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px;
  margin: 8px;
  background: none; border: 0; border-radius: var(--radius);
  color: inherit; cursor: pointer;
  transition: background-color 0.2s ease;
}
.lb__btn:hover { background: color-mix(in srgb, var(--bg) 16%, transparent); }
.lb__close { position: absolute; top: 0; right: 0; z-index: 1; }
.lb__prev { grid-column: 1; grid-row: 1; }
.lb__next { grid-column: 3; grid-row: 1; }
@media (max-width: 599.98px) {
  .lb__btn { margin: 2px; width: 44px; }
}

/* ---------- Появление при прокрутке ---------- */

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .has-reveal .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.5s ease, transform 0.5s ease; }
  .has-reveal .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .header, .badge, .menu { display: none !important; }
}
