/* ==========================================================================
   Шаблон визитки автосервиса — styles.css
   Дизайн-система: DESIGN.md (якорь linear.md, школа Modern Tool)
   Токены задаются в :root, accent/mode/radius приходят из data.js
   ========================================================================== */

/* ── Токены: тёмная тема (дефолт) ───────────────────────────────────── */
:root {
  color-scheme: dark;

  --ground: #08090A;
  --surface-1: #16171C;
  --surface-2: #1E1F25;
  --surface-3: #26272E;
  --hairline: rgba(255, 255, 255, 0.06);
  --hairline-strong: rgba(255, 255, 255, 0.12);
  --text: #F7F8F8;
  --text-2: #9CA3AF;
  --text-3: #8A9199;

  --accent: #E8A33D;
  --accent-ink: #14110A;
  --accent-soft: color-mix(in oklch, var(--accent) 16%, transparent);
  --accent-line: color-mix(in oklch, var(--accent) 34%, transparent);
  --ok: #4FA97B;
  --closed: #8A6A6A;

  --radius-ui: 6px;
  --radius-card: 12px;
  --radius-panel: 16px;

  --shadow-raised: 0 1px 2px rgba(0, 0, 0, 0.3);

  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 40px;
  --sp-7: 64px;
  --sp-8: 96px;

  --section-y: clamp(56px, 8vw, 112px);
  --density: 1;
  --gutter: clamp(16px, 5vw, 48px);
  --container: min(1200px, 100% - (var(--gutter) * 2));
  --container-narrow: min(820px, 100% - (var(--gutter) * 2));

  --font-display: "IBM Plex Sans Condensed", "Helvetica Neue", Arial, sans-serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-move: 420ms;

  --header-h: 64px;
}

/* ── Токены: светлая тема ───────────────────────────────────────────── */
[data-mode="light"] {
  color-scheme: light;

  --ground: #F6F5F2;
  --surface-1: #FFFFFF;
  --surface-2: #FBFAF8;
  --surface-3: #F0EEE9;
  --hairline: rgba(0, 0, 0, 0.08);
  --hairline-strong: rgba(0, 0, 0, 0.16);
  --text: #141518;
  --text-2: #5B6068;
  --text-3: #868C95;

  --accent-ink: #FFFFFF;
  --accent-soft: color-mix(in oklch, var(--accent) 12%, transparent);
  --accent-line: color-mix(in oklch, var(--accent) 40%, transparent);
  --closed: #9A8787;

  --shadow-raised: 0 1px 2px rgba(20, 21, 24, 0.06);
}

/* ── База ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after { box-sizing: border-box; }

/* Авторские display не должны перебивать атрибут hidden */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(15px, 0.35vw + 14px, 17px);
  line-height: 1.6;
  font-weight: 400;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Зерно фона: одна тонкая текстура, не декоративный шум */
body[data-grain="on"]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='160' height='160' filter='url(%23n)' opacity='0.05'/></svg>");
}
[data-mode="light"] body[data-grain="on"]::before,
body[data-grain="on"][data-mode="light"]::before { opacity: 0.5; }

img, iframe { max-width: 100%; display: block; }

h1, h2, h3, h4, p, ul, ol, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.container { width: var(--container); margin-inline: auto; }
/* FAQ: заголовок по общей сетке, список уже — читаемая длина строки */
.container-narrow { width: var(--container); margin-inline: auto; }
.container-narrow .faq-list { max-width: 860px; }

.noscript-note {
  padding: var(--sp-6) 0;
  color: var(--text-2);
  border-bottom: 1px solid var(--hairline);
}

/* Skip-link: невидим до первого Tab, потом выезжает сверху */
.skip-link {
  position: fixed;
  top: var(--sp-2);
  left: var(--sp-2);
  z-index: 80;
  padding: 10px var(--sp-4);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-ui);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  transform: translateY(-300%);
  opacity: 0;
  transition: transform var(--dur-fast) ease-out, opacity var(--dur-fast) ease-out;
}
.skip-link:focus,
.skip-link:focus-visible {
  transform: none;
  opacity: 1;
}

/* ── Типографика ────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 7.2vw, 5.1rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.display-2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.5vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.lead {
  font-size: clamp(1.0625rem, 0.6vw + 0.95rem, 1.3125rem);
  line-height: 1.55;
  color: var(--text-2);
  text-wrap: pretty;
  max-width: 54ch;
}

.body-lg {
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text-2);
  text-wrap: pretty;
  max-width: 62ch;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

.section-index {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: var(--sp-3);
}
[data-mode="light"] .section-index { color: color-mix(in oklch, var(--accent) 58%, #101010); }

.section-note {
  margin-top: var(--sp-3);
  color: var(--text-2);
  max-width: 64ch;
  text-wrap: pretty;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.panel-text { color: var(--text-2); margin-top: var(--sp-2); }

/* ── Кнопки ─────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  min-height: 44px;
  padding: 0 var(--sp-5);
  border-radius: var(--radius-ui);
  border: 1px solid var(--hairline-strong);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
  background: var(--surface-2);
  transition: background-color var(--dur-fast) ease-out,
              border-color var(--dur-fast) ease-out,
              transform var(--dur-fast) ease-out,
              color var(--dur-fast) ease-out;
}

.btn:hover { background: var(--surface-3); border-color: var(--accent-line); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
}
.btn-primary:hover {
  background: color-mix(in oklch, var(--accent) 88%, white);
  border-color: color-mix(in oklch, var(--accent) 88%, white);
  color: var(--accent-ink);
}

.btn-ghost { background: transparent; }

.btn-block { width: 100%; }

.btn-icon {
  width: 18px; height: 18px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

/* ── Плашка демо-данных ─────────────────────────────────────────────── */
.demo-strip {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-3) var(--gutter);
  background: color-mix(in oklch, var(--accent) 16%, var(--ground));
  border-bottom: 1px solid var(--accent-line);
}

.demo-strip-text {
  flex: 1;
  font-size: 0.75rem;
  color: var(--text-2);
  text-align: center;
}

.demo-strip-text code {
  font-family: var(--font-mono);
  color: var(--text);
  font-size: 0.75rem;
}

.demo-strip-close {
  flex: none;
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-ui);
  color: var(--text-3);
  transition: color var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out;
}
.demo-strip-close:hover { color: var(--text); background: var(--surface-2); }

/* ── Шапка ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in oklch, var(--ground) 82%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-move) var(--ease-out),
              background-color var(--dur-move) var(--ease-out);
}

.site-header.is-stuck {
  border-bottom-color: var(--hairline);
  background: color-mix(in oklch, var(--ground) 92%, transparent);
}

.bar {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  flex: none;
  min-width: 0;
}

.brand-logo { height: 28px; width: auto; }

.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav { flex: 1; min-width: 0; }

.nav ul { display: flex; gap: var(--sp-5); justify-content: center; }

.nav-link {
  position: relative;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-2);
  padding: var(--sp-2) 0;
  transition: color var(--dur-fast) ease-out;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 2px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-move) var(--ease-out);
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after { transform: scaleX(1); }

.bar-actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.status-chip::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--closed);
  flex: none;
}

.status-chip.is-open { color: var(--text); border-color: var(--accent-line); }
.status-chip.is-open::before { background: var(--ok); box-shadow: 0 0 0 3px color-mix(in oklch, var(--ok) 22%, transparent); }

.burger {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-ui);
  background: var(--surface-1);
}
.burger span {
  display: block;
  width: 16px; height: 1px;
  background: var(--text);
  transition: transform var(--dur-fast) ease-out, opacity var(--dur-fast) ease-out;
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(3px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3px) rotate(-45deg); }

.mobile-nav {
  border-top: 1px solid var(--hairline);
  background: var(--ground);
  padding: var(--sp-4) var(--gutter) var(--sp-5);
}
.mobile-nav ul { display: grid; gap: 2px; margin-bottom: var(--sp-4); }
.mobile-nav a {
  display: block;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
}

/* ── Hero ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 112px);
  overflow: hidden;
}

/* Один сдержанный ambient-свет в hero, < 8% непрозрачности */
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 0 auto;
  height: 620px;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 60% at 78% 8%, var(--accent-soft) 0%, transparent 68%),
    radial-gradient(50% 55% at 12% 0%, color-mix(in oklch, var(--surface-3) 70%, transparent) 0%, transparent 70%);
  opacity: 0.7;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.hero-copy { display: grid; gap: var(--sp-5); justify-items: start; }

.hero-copy .eyebrow {
  padding: 6px 10px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: var(--surface-1);
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--text-2);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-5) clamp(24px, 4vw, 48px);
  margin-top: var(--sp-2);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--hairline);
  width: 100%;
}

.hero-stats li { min-width: 120px; }

.stat-value {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.375rem, 2vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}
.stat-value .suffix { font-size: 0.7em; color: var(--text-2); }

.stat-label {
  display: block;
  margin-top: 4px;
  font-size: 0.8125rem;
  color: var(--text-3);
  max-width: 22ch;
}

.hero-media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius-panel);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  overflow: hidden;
  box-shadow: var(--shadow-raised);
}

.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.03) saturate(0.94);
  animation: heroSettle 1.2s var(--ease-out) both;
}

@keyframes heroSettle {
  from { transform: scale(1.045); opacity: 0.6; }
  to   { transform: scale(1); opacity: 1; }
}

.hero-caption {
  position: absolute;
  left: var(--sp-4); bottom: var(--sp-4);
  padding: 6px 10px;
  border-radius: var(--radius-ui);
  background: color-mix(in oklch, var(--ground) 76%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  font-size: 0.75rem;
  color: var(--text-2);
}

/* ── Плейсхолдеры фото (честные, не имитация) ───────────────────────── */
.ph {
  position: relative;
  width: 100%; height: 100%;
  min-height: 220px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: var(--sp-2);
  text-align: center;
  padding: var(--sp-5);
  background-color: var(--surface-2);
  /* угловые засечки вместо полосок: честный пустой слот без «генеративной» текстуры */
  background-image:
    linear-gradient(var(--accent-line) 0 0), linear-gradient(var(--accent-line) 0 0),
    linear-gradient(var(--accent-line) 0 0), linear-gradient(var(--accent-line) 0 0),
    linear-gradient(var(--accent-line) 0 0), linear-gradient(var(--accent-line) 0 0),
    linear-gradient(var(--accent-line) 0 0), linear-gradient(var(--accent-line) 0 0);
  background-position:
    left 10px top 10px, left 10px top 10px,
    right 10px top 10px, right 10px top 10px,
    left 10px bottom 10px, left 10px bottom 10px,
    right 10px bottom 10px, right 10px bottom 10px;
  background-size: 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px, 14px 1px, 1px 14px;
  background-repeat: no-repeat;
  border: 1px solid var(--hairline-strong);
  border-radius: inherit;
  color: var(--text-3);
}

.ph-ratio { font-size: 0.8125rem; color: var(--text-2); letter-spacing: 0.08em; }
.ph-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; }
.ph-hint { font-size: 0.75rem; max-width: 34ch; line-height: 1.5; color: var(--text-3); }

/* ── Секции ─────────────────────────────────────────────────────────── */
.section { padding-block: var(--section-y); position: relative; background: var(--ground); }
.section-tight { padding-block: calc(var(--section-y) * 0.72); }

.section + .section { border-top: 1px solid var(--hairline); }

.section-head { margin-bottom: clamp(32px, 4vw, 56px); max-width: 70ch; }

/* Появление при скролле: сдвиг 16px, без bounce */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-move) var(--ease-out), transform var(--dur-move) var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

/* ── Услуги ─────────────────────────────────────────────────────────── */
.service-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 64px);
}

.service-group-title {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--hairline);
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: var(--sp-3) var(--sp-5);
  padding: calc(var(--sp-4) * var(--density)) 0;
  border-bottom: 1px solid var(--hairline);
}
.service-row:last-child { border-bottom: 0; }

.service-name {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: -0.01em;
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 7px;
  border-radius: var(--radius-ui);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  color: var(--accent);
}
[data-mode="light"] .badge { color: color-mix(in oklch, var(--accent) 72%, black); }

/* В светлой теме янтарь на белом не тянет 4.5:1 — затемняем акцентный текст */
[data-mode="light"] .map-link-arrow,
[data-mode="light"] .req,
[data-mode="light"] .faq-item[open] .faq-sign,
[data-mode="light"] .faq-item summary:hover {
  color: color-mix(in oklch, var(--accent) 58%, #101010);
}

.service-note {
  grid-column: 1 / -1;
  font-size: 0.8125rem;
  color: var(--text-3);
}

.service-price {
  font-family: var(--font-mono);
  font-size: 0.9375rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.service-duration {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-3);
  padding: 2px 7px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-ui);
  background: var(--surface-1);
  white-space: nowrap;
  justify-self: start;
  width: max-content;
}

/* ── Преимущества: асимметричная сетка, не три одинаковые карточки ──── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--sp-4);
}

.feature-card {
  grid-column: span 6;
  padding: calc(var(--sp-5) * var(--density));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-1);
  transition: border-color var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out;
}
.feature-card:nth-child(1) { grid-column: span 7; }
.feature-card:nth-child(2) { grid-column: span 5; }
.feature-card:nth-child(3) { grid-column: span 5; }
.feature-card:nth-child(4) { grid-column: span 7; }
.feature-card:nth-child(n + 5) { grid-column: span 4; }
.feature-card:hover { border-color: var(--hairline-strong); background: var(--surface-2); }

.feature-icon {
  width: 28px; height: 28px;
  display: grid;
  place-items: center;
  margin-bottom: var(--sp-4);
  border: 1px dashed var(--hairline-strong);
  border-radius: var(--radius-ui);
  color: var(--text-3);
  font-size: 0.75rem;
}
.feature-icon img { width: 100%; height: 100%; object-fit: contain; }

.feature-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-2);
}

.feature-text { color: var(--text-2); font-size: 0.9375rem; max-width: 46ch; text-wrap: pretty; }

/* ── О нас ──────────────────────────────────────────────────────────── */
.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.about-media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-panel);
  border: 1px solid var(--hairline);
  background: var(--surface-1);
  overflow: hidden;
}
.about-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.03) saturate(0.94);
}

.about-copy { display: grid; gap: var(--sp-4); align-content: start; }

.checklist { display: grid; gap: var(--sp-3); margin-top: var(--sp-4); }

.checklist li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: start;
  color: var(--text-2);
  font-size: 0.9375rem;
}
.checklist li::before {
  content: "";
  width: 7px; height: 7px;
  margin-top: 9px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}

/* ── Галерея ────────────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: clamp(180px, 23vw, 300px);
  gap: var(--sp-3);
}

.gallery-item {
  position: relative;
  grid-column: span 4;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-1);
  overflow: hidden;
  transition: border-color var(--dur-fast) ease-out, transform var(--dur-move) var(--ease-out);
}
.gallery-item:first-child { grid-column: span 7; }
.gallery-item:nth-child(2) { grid-column: span 5; }
.gallery-item:nth-child(n + 6) { grid-column: span 6; }
.gallery-item[data-ratio="16:9"] { grid-column: span 12; grid-row: span 2; }

.gallery-item:hover { border-color: var(--hairline-strong); }
.gallery-item:hover img { transform: scale(1.02); }

.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.03) saturate(0.92);
  transition: transform var(--dur-move) var(--ease-out);
}

.gallery-caption {
  position: absolute;
  left: var(--sp-3); bottom: var(--sp-3);
  padding: 5px 9px;
  border-radius: var(--radius-ui);
  background: color-mix(in oklch, var(--ground) 74%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--dur-fast) ease-out, transform var(--dur-fast) ease-out;
}
.gallery-item:hover .gallery-caption,
.gallery-item:focus-within .gallery-caption { opacity: 1; transform: none; }

/* ── Отзывы ─────────────────────────────────────────────────────────── */
.review-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--sp-4);
  align-items: start;
}

.review-card {
  grid-column: span 4;
  padding: calc(var(--sp-5) * var(--density));
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  background: var(--surface-1);
  display: grid;
  gap: var(--sp-3);
}
.review-card:first-child { grid-column: span 5; }
.review-card:nth-child(2) { grid-column: span 4; }
.review-card:nth-child(3) { grid-column: span 3; }
.review-card:nth-child(n + 4) { grid-column: span 4; }

.review-head { display: flex; align-items: center; gap: var(--sp-3); }

.avatar {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-3);
  border: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.review-author { font-weight: 500; font-size: 0.9375rem; }
.review-source { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }

.rating { display: flex; gap: 3px; }
.rating i {
  width: 10px; height: 10px;
  border-radius: 1px;
  background: var(--accent);
  transform: rotate(45deg);
}
.rating i.is-empty { background: var(--surface-3); }

.review-text { color: var(--text-2); font-size: 0.9375rem; text-wrap: pretty; }
.review-card:first-child .review-text { font-size: 1.0625rem; line-height: 1.6; }

.review-date { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }

/* ── Вопросы ────────────────────────────────────────────────────────── */
.faq-list { border-top: 1px solid var(--hairline); }

.faq-item { border-bottom: 1px solid var(--hairline); }

.faq-item summary {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 20px;
  gap: var(--sp-3);
  align-items: baseline;
  padding: calc(var(--sp-4) * var(--density)) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 500;
  letter-spacing: -0.015em;
  transition: color var(--dur-fast) ease-out;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--accent); }

.faq-num { font-family: var(--font-mono); font-size: 0.75rem; color: var(--text-3); }

.faq-sign {
  justify-self: end;
  font-family: var(--font-mono);
  color: var(--text-3);
  transition: transform var(--dur-move) var(--ease-out), color var(--dur-fast) ease-out;
}
.faq-item[open] .faq-sign { transform: rotate(45deg); color: var(--accent); }

.faq-answer {
  padding: 0 0 calc(var(--sp-5) * var(--density)) 44px;
  color: var(--text-2);
  max-width: 68ch;
  text-wrap: pretty;
}

/* ── Контакты ───────────────────────────────────────────────────────── */
.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--sp-4);
  align-items: start;
}

.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-panel);
  background: var(--surface-1);
  padding: calc(var(--sp-5) * var(--density)) clamp(16px, 2.4vw, 28px);
  box-shadow: var(--shadow-raised);
}

.contacts-main { grid-column: 1; display: grid; gap: var(--sp-5); }
.contacts-map {
  grid-column: 2;
  grid-row: span 2;
  padding: 0;
  overflow: hidden;
  min-height: 360px;
  display: grid;
  grid-template-rows: minmax(280px, 1fr) auto;
}
.contacts-info { grid-column: 1; }

.contact-list { display: grid; gap: var(--sp-3); }

.contact-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: baseline;
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--hairline);
}
.contact-item:last-child { border-bottom: 0; padding-bottom: 0; }

.contact-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

.contact-value { font-size: 1rem; font-weight: 500; }
.contact-value a { transition: color var(--dur-fast) ease-out; }
.contact-value a:hover { color: var(--accent); }
.contact-value.is-big {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.contact-sub { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--text-3); font-weight: 400; }

.hours { display: grid; gap: var(--sp-3); }
.hours-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; }

.hours-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.hours-table td {
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--text-2);
}
.hours-table tr:last-child td { border-bottom: 0; }
.hours-table td:last-child { text-align: right; color: var(--text); }
.hours-table tr.is-today td { color: var(--text); }
.hours-table tr.is-today td:first-child::before {
  content: "·";
  color: var(--accent);
  margin-right: 6px;
}
.hours-table .is-off { color: var(--text-3); }

.hours-note { font-size: 0.8125rem; color: var(--text-3); }

.map-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-4) clamp(16px, 2.4vw, 24px);
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
  color: var(--text-2);
  transition: color var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out;
}
.map-link:hover { color: var(--text); background: var(--surface-2); }
.map-link-arrow { color: var(--accent); }
#mapFrame { width: 100%; height: 100%; min-height: 320px; border: 0; filter: saturate(0.85) contrast(1.02); }
[data-mode="light"] #mapFrame { filter: none; }

/* ── Инфоблок вместо формы (форма и её стили — черновик drafts/booking/) ── */
.contacts-info { display: grid; gap: var(--sp-4); align-content: start; }
.info-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ── Финальный призыв ───────────────────────────────────────────────── */
.cta-band { background: var(--surface-1); border-top: 1px solid var(--hairline); }

.cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--sp-5);
  align-items: center;
}

.cta-copy { display: grid; gap: var(--sp-3); }
.cta-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

/* ── Подвал ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: var(--sp-6) var(--sp-5);
  background: var(--ground);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto;
  gap: var(--sp-5);
  align-items: start;
}

.footer-brand { display: grid; gap: var(--sp-2); }
.footer-note { font-size: 0.75rem; color: var(--text-3); }

.footer-nav ul { display: grid; gap: var(--sp-2); }
.footer-nav a { font-size: 0.875rem; color: var(--text-2); transition: color var(--dur-fast) ease-out; }
.footer-nav a:hover { color: var(--text); }

.footer-links { display: grid; gap: var(--sp-3); justify-items: end; }
.social-list { display: grid; gap: var(--sp-2); justify-items: end; }
.social-list a { font-size: 0.875rem; color: var(--text-2); transition: color var(--dur-fast) ease-out; }
.social-list a:hover { color: var(--accent); }
.to-top { font-size: 0.75rem; color: var(--text-3); transition: color var(--dur-fast) ease-out; }
.to-top:hover { color: var(--text); }

/* ── Лайтбокс ───────────────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(16px, 5vw, 64px);
  background: color-mix(in oklch, var(--ground) 92%, black);
  backdrop-filter: blur(6px);
}

.lb-figure {
  max-width: min(1100px, 100%);
  max-height: 100%;
  display: grid;
  gap: var(--sp-3);
  justify-items: center;
}

.lb-figure img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
}

.lb-caption { font-size: 0.75rem; color: var(--text-2); text-align: center; }
.lb-counter { position: absolute; bottom: var(--sp-4); left: 50%; transform: translateX(-50%); font-size: 0.75rem; color: var(--text-3); }

.lb-close, .lb-nav {
  position: absolute;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-ui);
  background: var(--surface-1);
  color: var(--text-2);
  transition: color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, background-color var(--dur-fast) ease-out;
}
.lb-close:hover, .lb-nav:hover { color: var(--text); border-color: var(--accent-line); background: var(--surface-2); }
.lb-close { top: var(--sp-4); right: var(--sp-4); }
.lb-prev { left: var(--sp-4); top: 50%; transform: translateY(-50%); }
.lb-next { right: var(--sp-4); top: 50%; transform: translateY(-50%); }

/* ── Tweaks ─────────────────────────────────────────────────────────── */
.tweaks {
  position: fixed;
  right: var(--sp-4); bottom: var(--sp-4);
  z-index: 70;
  width: 264px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-card);
  background: var(--surface-1);
  overflow: hidden;
}

.tweaks-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-2);
}

.tweaks-title { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--text-3); }
.tweaks-close { color: var(--text-3); font-size: 0.8125rem; }
.tweaks-close:hover { color: var(--text); }

.tweaks-body { display: grid; gap: var(--sp-3); padding: var(--sp-4); }

.tweaks-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: var(--sp-3);
  align-items: center;
}

.tweaks-label { font-size: 0.75rem; color: var(--text-3); }

.tweaks-input {
  width: 100%;
  min-height: 32px;
  padding: 4px var(--sp-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-ui);
  background: var(--ground);
  color: var(--text);
  font-size: 0.75rem;
}

.tweaks-row input[type="color"] {
  width: 100%; height: 32px;
  padding: 2px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-ui);
  background: var(--ground);
}

.tweaks-reset {
  margin-top: var(--sp-2);
  padding: 9px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-ui);
  font-size: 0.75rem;
  color: var(--text-3);
  transition: color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out;
}
.tweaks-reset:hover { color: var(--text); border-color: var(--accent-line); }

.tweaks-fab {
  position: fixed;
  right: var(--sp-4); bottom: var(--sp-4);
  z-index: 69;
  padding: 9px 13px;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  background: var(--surface-1);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-3);
  transition: color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out;
}
.tweaks-fab:hover { color: var(--text); border-color: var(--accent-line); }

/* ── Адаптив ────────────────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .nav { display: none; }
  .burger { display: flex; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .hero-copy { order: 1; }
  .hero-media { order: 0; aspect-ratio: 16 / 10; }
  .contacts-grid { grid-template-columns: minmax(0, 1fr); }
  .contacts-main, .contacts-info { grid-column: 1; }
  .contacts-map { grid-column: 1; grid-row: auto; min-height: 300px; }
  .about-grid { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .about-media { aspect-ratio: 16 / 10; max-height: 420px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) auto; gap: var(--sp-5); }
  .footer-nav { grid-column: 1 / -1; }
  .footer-nav ul { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}

@media (max-width: 860px) {
  .service-groups { grid-template-columns: minmax(0, 1fr); gap: var(--sp-6); }
  .feature-card,
  .feature-card:nth-child(1),
  .feature-card:nth-child(2),
  .feature-card:nth-child(3),
  .feature-card:nth-child(4),
  .feature-card:nth-child(n + 5) { grid-column: span 6; }
  .review-card,
  .review-card:first-child,
  .review-card:nth-child(2),
  .review-card:nth-child(3),
  .review-card:nth-child(n + 4) { grid-column: span 6; }
  .cta-inner { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 620px) {
  :root { --header-h: 56px; }
  .status-chip { display: none; }
  .bar-actions .btn { padding-inline: 0; width: 44px; }
  .bar-actions .btn-label { display: none; }
  .bar-actions .btn .btn-icon { width: 20px; height: 20px; }
  .hero { padding-block: var(--sp-6) var(--sp-7); }
  .hero-stats { gap: var(--sp-4); }
  .hero-stats li { flex: 1 1 40%; min-width: 0; }
  .feature-card,
  .feature-card:nth-child(n) { grid-column: span 12; }
  .review-card,
  .review-card:nth-child(n) { grid-column: span 12; }
  .gallery-grid { grid-auto-rows: 200px; }
  .gallery-item,
  .gallery-item:nth-child(2),
  .gallery-item:nth-child(n + 6) { grid-column: span 6; }
  .gallery-item:first-child { grid-column: span 12; }
  .gallery-item[data-ratio="16:9"] { grid-column: span 12; grid-row: span 1; }
  .contact-item { grid-template-columns: 78px minmax(0, 1fr); }
  .faq-answer { padding-left: 0; }
  .faq-item summary { grid-template-columns: 26px minmax(0, 1fr) 18px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-links { justify-items: start; }
  .social-list { justify-items: start; }
  .lb-prev { left: var(--sp-2); }
  .lb-next { right: var(--sp-2); }
  .tweaks, .tweaks-fab { right: var(--sp-2); bottom: var(--sp-2); }
}

/* ── Уважение к reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* Ручное отключение motion из панели Tweaks */
body[data-motion="off"] *,
body[data-motion="off"] *::before,
body[data-motion="off"] *::after {
  animation-duration: 0.001ms !important;
  transition-duration: 0.001ms !important;
}
body[data-motion="off"] .reveal { opacity: 1; transform: none; }

/* ── Печать: визитку иногда хотят распечатать ───────────────────────── */
@media print {
  .site-header, .tweaks, .tweaks-fab, .lightbox, .demo-strip, .cta-actions { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 16px; break-inside: avoid; }
}
