/* ===== tokens (Design.md, locked) ===== */
:root {
  --bg: #FBF6F1;
  --surface: #FFFFFF;
  --surface-alt: #F3E7DF;
  --accent: #BD7E68;
  --accent-hover: #A2664F;
  --accent-soft: #E9D2C6;
  --sage: #7F9271;
  --sage-soft: #E3E9DC;
  --gold: #BE9A46;
  --text: #2B2521;
  --text-muted: #6E645B;
  --border: #E6D9CD;

  /* системные шрифты: без внешних запросов, полная поддержка кириллицы.
     Fraunces/Work Sans убраны - у них нет кириллицы, русский текст и так рисовался этим стеком */
  --font-head: Georgia, "Times New Roman", "Droid Serif", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius-card: 20px;
  --radius-btn: 12px;
  --radius-img: 24px;
  --shadow-soft: 0 20px 40px -20px rgba(43,37,33,.18);
  --shadow-lift: 0 30px 60px -25px rgba(43,37,33,.28);
}

/* ===== reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; margin: 0 0 .5em; color: var(--text); }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: var(--accent-hover); }
ul, ol { margin: 0; padding: 0; list-style: none; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--text); color: #fff;
  padding: 12px 20px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ===== buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 14px 28px; border-radius: var(--radius-btn); text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary { background: var(--accent-hover); color: #fff; box-shadow: var(--shadow-soft); position: relative; overflow: hidden; }
.btn-primary::before {
  content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-18deg); transition: left .55s ease;
}
.btn-primary:hover::before { left: 130%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.btn-outline { border-color: var(--accent-hover); color: var(--accent-hover); background: transparent; }
.btn-outline:hover { background: var(--accent-soft); }
.btn-small { padding: 10px 18px; font-size: .9rem; }
.btn-large { padding: 18px 36px; font-size: 1.1rem; }
.btn-block { width: 100%; }
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

/* ===== header ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251,246,241,.9); backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 0 0 rgba(43,37,33,0);
  transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(43,37,33,.35); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 16px; padding-bottom: 16px; }
.logo { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--accent-hover); text-decoration: none; white-space: nowrap; flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.logo span { color: var(--accent-hover); font-weight: 700; }
.nav { display: none; gap: 28px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; position: relative; padding-bottom: 3px; }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent-hover); transition: right .25s ease;
}
.nav a:hover { color: var(--accent-hover); }
.nav a:hover::after { right: 0; }
@media (min-width: 900px) { .nav { display: flex; } }
.btn-tail { margin-left: .3em; }
@media (max-width: 480px) {
  .logo {
    font-size: 1.05rem; line-height: 1.15; letter-spacing: -.01em;
    white-space: normal; overflow: visible; text-overflow: clip; flex-basis: 60%;
  }
  .header-inner { align-items: center; }
  .header-inner .btn-small { padding: 9px 12px; font-size: .74rem; flex-shrink: 0; }
  .btn-tail { display: none; }
}
@media (max-width: 360px) {
  .logo { font-size: .96rem; }
}

/* ===== hero ===== */
.hero {
  position: relative;
  padding: 56px 0 120px;
  background: linear-gradient(180deg, var(--surface-alt) 0%, var(--bg) 78%);
  overflow: hidden;
}
.hero-glow {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
  filter: blur(2px); opacity: .55;
}
.hero-glow-a { width: 46vw; height: 46vw; max-width: 620px; max-height: 620px; top: -14%; right: -10%; background: radial-gradient(circle at 50% 50%, var(--accent-soft), transparent 70%); }
.hero-glow-b { width: 30vw; height: 30vw; max-width: 420px; max-height: 420px; bottom: -8%; left: -8%; background: radial-gradient(circle at 50% 50%, var(--sage-soft), transparent 72%); }
.hero-deco { position: absolute; top: 18px; right: 8%; color: var(--gold); opacity: .35; z-index: 1; display: none; }
@media (min-width: 1280px) { .hero-deco { display: block; } }
.hero-inner {
  display: grid; grid-template-columns: 1fr; gap: 40px; position: relative; z-index: 2;
}
@media (min-width: 980px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; align-items: start; }
}
.badge {
  display: inline-block; background: var(--accent-soft); color: var(--accent-hover);
  font-size: .8rem; font-weight: 600; letter-spacing: .02em; padding: 7px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.6rem); max-width: 14ch; }
.hero-sub { font-size: 1.1rem; max-width: 44ch; }
.hero-objection { color: var(--sage); font-weight: 600; font-size: .95rem; margin-bottom: 28px; }
.proof-bar { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 8px; }
.proof-bar li { display: flex; flex-direction: column; }
.proof-bar strong { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent-hover); }
.proof-bar span { font-size: .82rem; color: var(--text-muted); max-width: 12ch; }

.hero-photo {
  position: absolute; right: -6vw; top: 40px; width: 42vw; max-width: 560px;
  border-radius: var(--radius-img); overflow: hidden; box-shadow: var(--shadow-lift);
  transform: rotate(2deg); z-index: 1; display: none;
}
.hero-photo img { height: 620px; object-fit: cover; }
@media (min-width: 1280px) { .hero-photo { display: block; } }

.hero-form-card {
  background: var(--surface); border-radius: var(--radius-card); padding: 32px;
  box-shadow: var(--shadow-lift); border: 1px solid var(--border);
}
.hero-form-card h2 { font-size: 1.4rem; margin-bottom: 18px; }
.lead-form .field { display: block; margin-bottom: 16px; }
.lead-form .field span { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.lead-form input[type="text"],
.lead-form input[type="tel"],
.lead-form select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font-body); font-size: 1rem; background: var(--bg); color: var(--text);
}
.lead-form input:focus, .lead-form select:focus { outline: 2px solid var(--accent-hover); outline-offset: 1px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; font-size: .82rem; color: var(--text-muted); }
.checkbox-field input { margin-top: 3px; }
.checkbox-field span a { color: var(--accent-hover); }
.form-status { min-height: 1.2em; font-size: .9rem; margin-top: 10px; }
.form-status.ok { color: var(--sage); font-weight: 600; }
.form-status.err { color: #A2432F; font-weight: 600; }

/* ===== section shared ===== */
section { padding: 88px 0; position: relative; }
section h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); max-width: 20ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-body); font-weight: 700; font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-hover); margin: 0 0 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }
.eyebrow-light { color: var(--gold); }

/* diagonal seam between sections via clip-path wrapper */
.pains { background: var(--surface); clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 calc(100% - 3vw)); margin-top: -3vw; }
.process { background: var(--surface-alt); clip-path: polygon(0 0, 100% 3vw, 100% calc(100% - 3vw), 0 100%); margin-top: -3vw; }
.delivery { background: var(--surface); clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 calc(100% - 3vw)); margin-top: -3vw; }
.delivery-intro { max-width: 680px; margin: 0 0 28px; color: var(--muted); font-size: 1.05rem; }
.delivery-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.delivery-card { padding: 26px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface-alt); }
.delivery-label { display: inline-block; margin-bottom: 14px; color: var(--accent-hover); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.delivery-card h3 { margin: 0 0 10px; font-size: 1.2rem; }
.delivery-card p, .delivery-note { margin: 0; color: var(--muted); line-height: 1.6; }
.delivery-note { margin-top: 22px; font-size: .92rem; }
.catalog { background: var(--bg); overflow: hidden; }
.catalog-deco {
  position: absolute; left: 0; right: 0; top: -90px; bottom: -90px; width: 100%; height: calc(100% + 180px);
  z-index: 0; pointer-events: none; will-change: transform;
  mask-image: radial-gradient(ellipse 80% 90% at 50% 45%, #000 55%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 90% at 50% 45%, #000 55%, transparent 100%);
}
.catalog > .wrap { position: relative; z-index: 1; }
.portfolio { background: var(--surface); clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 calc(100% - 3vw)); margin-top: -3vw; }
.trust { background: var(--text); color: #fff; clip-path: polygon(0 0, 100% 3vw, 100% calc(100% - 3vw), 0 100%); margin-top: -3vw; }
.trust h2 { color: #fff; }
.faq { background: var(--bg); }
.cta-final { background: var(--accent-soft); clip-path: polygon(0 3vw, 100% 0, 100% 100%, 0 calc(100% - 3vw)); margin-top: -3vw; padding-bottom: 110px; }

/* ===== pains ===== */
.pains h2 { margin-bottom: 40px; }
.pains-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 700px) { .pains-grid { grid-template-columns: repeat(2, 1fr); } }
.pain-card {
  background: var(--surface-alt); border-radius: var(--radius-card); padding: 28px;
  border: 1px solid var(--border);
}
.pain-num { font-family: var(--font-head); font-size: 1.6rem; color: var(--accent-hover); display: block; margin-bottom: 10px; }
.pain-card p { color: var(--text); font-size: 1.02rem; margin: 0; }

/* ===== process ===== */
.process h2 { margin-bottom: 44px; }
.process-steps { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 40px; }
@media (min-width: 800px) { .process-steps { grid-template-columns: repeat(4, 1fr); } }
.step-num { font-family: var(--font-head); font-size: 2.6rem; font-weight: 600; color: var(--accent); opacity: .55; display: block; }
.process-steps h3 { font-size: 1.15rem; margin: 6px 0 8px; }
.process-steps p { margin: 0; font-size: .95rem; }
.process + .delivery h2 { margin-bottom: 12px; }
@media (min-width: 700px) { .delivery-grid { grid-template-columns: repeat(2, 1fr); } }

/* ===== «Виды и наши работы»: вкладки как в проекте «Волновой принцип» + слайдер фото + описание
   (разметку собирает catalog-build/build.py) ===== */
.catalog h2 { margin-bottom: 12px; }
.catalog-lead { max-width: 64ch; margin-bottom: 26px; }
#portfolio { scroll-margin-top: 90px; }
#hero-form { scroll-margin-top: 90px; }

/* вкладки-карточки в одну строку, листаются вбок. Что строку можно листать, видно сразу:
   последняя карточка обрезана краем, у края затухание и стрелка, под строкой полоска прокрутки,
   на телефоне подпись «листайте» и один лёгкий сдвиг строки при первом показе */
.vid-tabs-wrap { position: relative; margin-bottom: 26px; }
.vid-tabs-hint { display: none; margin: 0 0 8px; font-size: .8rem; font-weight: 600; color: var(--text-muted); }
.vid-tabs-hint span { display: inline-block; color: var(--accent-hover); }
.vid-tabs {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
  scroll-padding-inline: 24px; padding: 3px 3px 4px;
  /* затухание у краёв: справа, пока есть что листать, слева - когда уже пролистали */
  --fade-l: 0px; --fade-r: 64px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent 100%);
}
.vid-tabs::-webkit-scrollbar { display: none; }
.vid-tabs-wrap:not(.is-start) .vid-tabs { --fade-l: 56px; }
.vid-tabs-wrap.is-end .vid-tabs { --fade-r: 0px; }
/* 7 карточек и половина восьмой на компьютере */
.vid-tab {
  flex: 0 0 142px; scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: center; gap: 3px; min-width: 0; min-height: 62px; padding: 10px 12px;
  font: inherit; text-align: left; cursor: pointer; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.vid-tab:hover { border-color: var(--accent); }
.vid-tab[aria-selected="true"] { border-color: var(--accent-hover); box-shadow: inset 0 0 0 1px var(--accent-hover); background: var(--accent-soft); }
.vid-tab:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vt-name { font-weight: 700; font-size: .92rem; line-height: 1.2; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.vt-sub { font-size: .78rem; line-height: 1.2; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vid-scroll {
  position: absolute; top: calc(50% - 6px); transform: translateY(-50%); z-index: 2; width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; line-height: 1; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft);
  transition: opacity .15s ease;
}
.vid-scroll-prev { left: -6px; }
.vid-scroll-next { right: -6px; }
.vid-tabs-wrap.is-start .vid-scroll-prev, .vid-tabs-wrap.is-end .vid-scroll-next { opacity: 0; pointer-events: none; }
.vid-tabs-track { display: block; position: relative; height: 3px; margin: 8px 3px 0; border-radius: 3px; background: var(--border); overflow: hidden; }
.vid-tabs-track span { position: absolute; top: 0; bottom: 0; left: 0; width: 50%; border-radius: inherit; background: var(--accent-hover); }
@media (max-width: 640px) {
  /* телефон: строка до краёв экрана, видно две карточки и половину третьей */
  .vid-tabs-wrap { margin: 0 -24px 20px; }
  .vid-tabs { padding-inline: 24px; gap: 8px; }
  .vid-tabs-hint { display: block; padding-inline: 24px; }
  .vid-tab { flex-basis: 140px; min-height: 58px; padding: 9px 11px; border-radius: 10px; }
  .vt-name { font-size: .86rem; }
  .vt-sub { font-size: .75rem; }
  .vid-scroll-prev { left: 8px; }
  .vid-scroll-next { right: 8px; }
  .vid-tabs-track { margin-inline: 24px; }
}
@media (prefers-reduced-motion: no-preference) {
  .vid-tabs-hint span { animation: vid-hint 1.6s ease-in-out 3; }
  @keyframes vid-hint { 0%, 100% { transform: none; } 50% { transform: translateX(5px); } }
}

/* панель вида: на телефоне заголовок, слайдер, описание; на компьютере слайдер слева, текст справа */
.vid-panel { display: grid; gap: 14px; grid-template-areas: "head" "gallery" "info"; }
.vid-panel[hidden] { display: none !important; }
@media (min-width: 900px) {
  .vid-panel { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); grid-template-rows: auto 1fr;
    grid-template-areas: "gallery head" "gallery info"; column-gap: 32px; row-gap: 10px; align-items: start; }
}
.vid-head { grid-area: head; }
.vid-kicker { margin: 0 0 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-hover); }
.vid-head h3 { margin: 0; font-size: clamp(1.35rem, 3vw, 1.7rem); }
.vid-info { grid-area: info; }
.vid-tag { margin: 0 0 6px; font-size: 1.02rem; font-weight: 600; color: var(--text); }
.vid-info .cat-price { margin: 0 0 14px; }
.vid-info h4 { margin: 14px 0 4px; font-family: var(--font-head); font-size: 1.02rem; font-weight: 600; color: var(--text); }
.vid-info p { font-size: .98rem; }
.vid-info h4 + p { margin: 0; }
.vid-actions { display: flex; gap: 10px; margin-top: 20px; }
.vid-actions .btn { flex: 1; padding: 13px 14px; white-space: nowrap; }
.vid-actions .btn-primary { flex: 1.6; }
@media (min-width: 900px) { .vid-actions .btn, .vid-actions .btn-primary { flex: none; } }
@media (max-width: 370px) { .vid-actions .btn { white-space: normal; } }
.cat-price { font-size: 1.15rem; font-weight: 700; color: var(--accent-hover); line-height: 1.3; }
.cat-price span { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.cat-price .cat-price-free { font-size: .95rem; font-weight: 600; color: var(--text-muted); }

/* слайдер: свайп пальцем, стрелки на фото, счётчик и полоска прогресса */
.vid-gallery { grid-area: gallery; position: relative; min-width: 0; }
.vid-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; outline: none;
  border-radius: var(--radius-img); background: var(--surface-alt);
}
.vid-track::-webkit-scrollbar { display: none; }
.vid-track:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vid-slide { flex: 0 0 100%; margin: 0; aspect-ratio: 4 / 5; scroll-snap-align: center; cursor: zoom-in; }
@media (min-width: 900px) { .vid-slide { aspect-ratio: 4 / 3; } }
.vid-slide img { width: 100%; height: 100%; object-fit: contain; }
.vid-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.7rem; line-height: 1; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); box-shadow: var(--shadow-soft);
}
.vid-nav:disabled { opacity: .35; cursor: default; }
/* свой display у стрелок перебивает атрибут hidden - прячем явно */
.vid-nav[hidden] { display: none !important; }
.vid-panel { scroll-margin-top: 84px; }
.vid-nav:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vid-prev { left: 10px; }
.vid-next { right: 10px; }
.vid-counter {
  position: absolute; top: 12px; right: 12px; z-index: 2; padding: 4px 11px; border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: .82rem; font-weight: 600; box-shadow: var(--shadow-soft);
}
.vid-progress { position: absolute; left: 18px; right: 18px; bottom: 12px; z-index: 2; height: 4px; border-radius: 4px; background: rgba(0,0,0,.18); overflow: hidden; }
.vid-progress span { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent-hover); transition: width .25s ease; }
.vid-data { display: none !important; }

.cat-note {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 32px; padding: 18px 20px;
  background: var(--sage-soft); border: 1px solid var(--border); border-radius: var(--radius-card);
}
.cat-note svg { flex: none; color: var(--sage); margin-top: 2px; }
.cat-note p { margin: 0; color: var(--text); font-size: .98rem; }

/* фото на весь экран по нажатию: на телефоне во весь экран, на компьютере по центру */
html.cat-lock, html.cat-lock body { overflow: hidden; }
.cat-dialog {
  width: 100%; max-width: 100%; height: 100%; max-height: 100%; height: 100dvh; max-height: 100dvh;
  margin: 0; padding: 0; border: 0; overflow: hidden; background: var(--bg); color: var(--text);
}
.cat-dialog:not([open]) { display: none; }
.cat-dialog[open] { display: flex; flex-direction: column; }
.cat-dialog::backdrop { background: rgba(20,16,14,.62); }
.cat-dialog-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px 10px 16px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.cat-dialog-head h3 { margin: 0; font-size: 1.2rem; }
.cat-close {
  flex: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.7rem; line-height: 1;
}
.cat-close:hover { border-color: var(--accent); }
.cat-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.vid-zoom-gallery { flex: 1; min-height: 0; padding: 12px; }
.vid-zoom-gallery .vid-track { height: 100%; }
.vid-zoom-gallery .vid-slide { aspect-ratio: auto; height: 100%; cursor: default; }
.vid-zoom-gallery .vid-prev { left: 22px; }
.vid-zoom-gallery .vid-next { right: 22px; }
.vid-zoom-gallery .vid-counter { top: 24px; right: 24px; }
.vid-zoom-gallery .vid-progress { left: 30px; right: 30px; bottom: 24px; }
@media (min-width: 900px) {
  .cat-dialog { width: min(1100px, calc(100% - 48px)); height: calc(100dvh - 48px); margin: auto; border-radius: var(--radius-card); box-shadow: var(--shadow-lift); }
  .cat-dialog-head { padding: 14px 16px 14px 24px; }
}

/* ===== trust ===== */
.trust-inner { text-align: center; }
.trust h2 { max-width: none; margin: 0 auto 40px; }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 700px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-grid strong { display: block; font-family: var(--font-head); font-size: 1.7rem; color: var(--gold); margin-bottom: 6px; }
.trust-grid span { font-size: .9rem; color: #E7DFD6; }

/* ===== faq ===== */
.faq h2 { margin-bottom: 32px; }
.faq-list { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--border); padding: 18px 0;
}
.faq-item summary {
  cursor: pointer; font-weight: 600; font-size: 1.05rem; color: var(--text);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent-hover); margin-left: 12px; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 12px 0 0; }

/* ===== cta-final ===== */
.cta-final-inner { display: flex; flex-direction: column; gap: 28px; align-items: stretch; text-align: center; }
.cta-final-inner > div { max-width: 640px; margin: 0 auto; }
.cta-final h2 { margin-bottom: 8px; }
.cta-final .btn-large { padding-top: 20px; padding-bottom: 20px; font-size: 1.15rem; }

/* ===== footer ===== */
.site-footer { background: var(--text); color: #C9BFB4; padding: 32px 0; font-size: .85rem; }
.footer-inner { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 700px) { .footer-inner { flex-direction: row; justify-content: space-between; } }
.footer-inner a { color: #E7DFD6; }

/* ===== scroll-reveal (JS-driven, progressive enhancement) ===== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .site-header, .nav a::after, .btn, .btn-primary::before { transition: none; }
  .btn-primary::before { display: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   v2 - продающий слой: телефон, цены, квиз, гарантии
   ============================================================ */

/* ---- телефон в шапке ---- */
.header-contact { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.header-phone { display: flex; flex-direction: column; text-decoration: none; line-height: 1.15; }
.header-phone strong { font-family: var(--font-head); font-size: 1.18rem; color: var(--text); letter-spacing: .2px; }
.header-phone span { font-size: .74rem; color: var(--text-muted); }
.header-phone:hover strong { color: var(--accent-hover); }

/* ---- hero: оффер с ценой ---- */
.hero-price {
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  background: var(--sage-soft); color: var(--text);
  border-radius: var(--radius-btn); padding: 12px 18px; margin: 0 0 18px;
  font-size: 1.02rem;
}
.hero-price b { font-family: var(--font-head); font-size: 1.5rem; color: var(--accent-hover); }
.hero-includes { display: flex; flex-wrap: wrap; gap: 8px 10px; margin: 0 0 20px; padding: 0; }
.hero-includes li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .92rem; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 7px 14px;
}
.hero-includes li::before { content: "✓"; color: var(--sage); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }

/* ---- квиз-калькулятор ---- */
.quiz { background: var(--surface-alt); }
.quiz-card {
  background: var(--surface); border-radius: var(--radius-card); border: 1px solid var(--border);
  box-shadow: var(--shadow-soft); padding: 32px; max-width: 720px; margin: 0 auto;
}
.quiz-progress { display: flex; gap: 6px; margin-bottom: 24px; }
.quiz-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--accent-soft); transition: background .25s ease; }
.quiz-progress span.is-done { background: var(--accent-hover); }
.quiz-step { display: none; }
.quiz-step.is-active { display: block; animation: quizIn .3s ease; }
@keyframes quizIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .quiz-step.is-active { animation: none; } }
.quiz-q { font-family: var(--font-head); font-size: 1.45rem; font-weight: 600; margin: 0 0 6px; }
.quiz-hint { font-size: .9rem; color: var(--text-muted); margin: 0 0 20px; }
.quiz-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.quiz-opt {
  text-align: left; background: var(--bg); border: 2px solid var(--border);
  border-radius: var(--radius-btn); padding: 16px 18px; cursor: pointer;
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.quiz-opt:hover { border-color: var(--accent); transform: translateY(-2px); }
.quiz-opt b { display: block; font-weight: 600; margin-bottom: 3px; }
.quiz-opt small { color: var(--text-muted); font-size: .84rem; }
.quiz-back {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  font-family: var(--font-body); font-size: .9rem; padding: 0; margin-top: 18px; text-decoration: underline;
}
.quiz-result-box {
  background: var(--sage-soft); border-radius: var(--radius-btn);
  padding: 20px 22px; margin-bottom: 20px; text-align: center;
}
.quiz-result-box .quiz-sum { font-family: var(--font-head); font-size: 2.1rem; color: var(--accent-hover); display: block; line-height: 1.1; }
.quiz-result-box p { margin: 6px 0 0; font-size: .88rem; }
.quiz-range-wrap { margin-bottom: 8px; }
.quiz-range-wrap label { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 10px; }
.quiz-range-wrap output { font-weight: 600; color: var(--accent-hover); }
.quiz-range-wrap input[type=range] { width: 100%; accent-color: var(--accent-hover); }

/* ---- прайс ---- */
.prices { background: var(--bg); }
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 22px; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
  padding: 22px 24px; display: flex; flex-direction: column;
}
.price-card h3 { font-size: 1.12rem; margin-bottom: 10px; }
.price-card .price-val { font-family: var(--font-head); font-size: 1.75rem; color: var(--accent-hover); line-height: 1; margin-bottom: 4px; }
.price-card .price-unit { font-size: .84rem; color: var(--text-muted); margin-bottom: 12px; }
.price-card p { font-size: .92rem; margin: 0; }
.price-note {
  background: var(--surface-alt); border-radius: var(--radius-btn); padding: 16px 20px;
  font-size: .92rem; color: var(--text); margin: 0;
}

/* ---- гарантии ---- */
.guarantee { background: var(--surface-alt); }
.guarantee-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.guarantee-card {
  background: var(--surface); border-radius: var(--radius-card); padding: 26px 24px;
  border-left: 4px solid var(--sage);
}
.guarantee-card h3 { font-size: 1.1rem; margin-bottom: 8px; }
.guarantee-card p { margin: 0; font-size: .95rem; }

/* ---- плавающая кнопка звонка (мобильный) ---- */
.call-fab {
  position: fixed; right: 16px; bottom: 16px; z-index: 120;
  display: none; align-items: center; gap: 9px;
  background: var(--accent-hover); color: #fff; text-decoration: none;
  padding: 14px 20px; border-radius: 999px; font-weight: 600; font-size: .98rem;
  box-shadow: var(--shadow-lift);
}
.call-fab svg { width: 18px; height: 18px; fill: currentColor; }

/* ---- контакты в подвале ---- */
.footer-contacts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-bottom: 10px; }
.footer-contacts a { color: var(--text); text-decoration: none; font-weight: 600; }
.footer-contacts a:hover { color: var(--accent-hover); }

@media (max-width: 860px) {
  .header-contact .btn { display: none; }
  .header-phone strong { font-size: 1.05rem; }
  .call-fab { display: inline-flex; }
  body { padding-bottom: 76px; }
  .quiz-card { padding: 24px 20px; }
  .hero-price { width: 100%; }
}
@media (max-width: 420px) {
  .header-phone span { display: none; }
}

.hero-form-sub { font-size: .9rem; margin: -6px 0 16px; }
.cta-final-actions { display: flex; flex-direction: column; gap: 10px; min-width: 300px; }
.cta-final-actions .btn-outline { border-color: currentColor; }
@media (max-width: 720px) { .cta-final-actions { min-width: 0; width: 100%; } }

/* ---- v2: плотный первый экран на мобильном ---- */
.header-phone strong { white-space: nowrap; }
@media (max-width: 860px) {
  .hero-copy { display: flex; flex-direction: column; }
  .hero-copy .badge        { order: 1; }
  .hero-copy h1            { order: 2; font-size: clamp(1.75rem, 7.2vw, 2.3rem); margin-bottom: .45em; }
  .hero-copy .hero-price   { order: 3; margin-bottom: 14px; padding: 10px 14px; }
  .hero-copy .hero-price b { font-size: 1.35rem; }
  .hero-copy .hero-includes { order: 4; gap: 6px; margin-bottom: 16px; }
  .hero-copy .hero-includes li { font-size: .84rem; padding: 6px 11px; }
  .hero-copy .hero-actions { order: 5; margin-bottom: 16px; }
  .hero-copy .hero-actions .btn { flex: 1 1 100%; }
  .hero-copy .hero-sub     { order: 6; font-size: .98rem; }
  .hero-copy .hero-objection { order: 7; }
  .hero-copy .proof-bar    { order: 8; }
}
@media (max-width: 560px) {
  .header-phone strong { font-size: .95rem; }
  .logo { font-size: 1rem; }
}

/* ---- страницы видов (собирает catalog-build/pages.py) ---- */
.vid-more { display: inline-block; margin-top: 14px; font-weight: 600; text-decoration: none; }
.vid-more:hover { text-decoration: underline; }
.footer-vidy { display: flex; flex-wrap: wrap; gap: 6px 16px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-vidy a { text-decoration: none; }
.footer-vidy a:hover { text-decoration: underline; }
.pg section { padding: 40px 0; }
.pg .pg-hero { padding: 110px 0 24px; }
.pg-crumbs { font-size: .9rem; color: var(--text-muted); margin-bottom: 14px; }
.pg-crumbs a { text-decoration: none; }
.pg-crumbs span { margin: 0 4px; }
.pg h1 { font-size: clamp(1.8rem, 4.6vw, 2.8rem); max-width: 860px; }
.pg-price { font-size: 1.3rem; }
.pg-actions { max-width: 460px; }
.pg-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
.pg-grid > * { min-width: 0; }
@media (min-width: 900px) { .pg-grid { grid-template-columns: 1.3fr 1fr; } .pg-form { position: sticky; top: 96px; } }
.pg-text h2 { font-size: 1.35rem; margin-top: 1.2em; max-width: none; }
.pg-text h2:first-child { margin-top: 0; }
.pg-text p, .pg-steps li, .pg-promises li { color: var(--text); font-size: 1.02rem; }
.pg-steps { padding-left: 1.2em; margin: 0 0 18px; }
.pg-steps li { margin-bottom: 8px; }
.pg-promises { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.pg-promises li { padding: 10px 14px; background: var(--sage-soft); border-radius: 12px; }
.pg-note { margin: 16px 0 6px; }
.pg-gallery { background: var(--surface-alt); }
.pg-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 700px) { .pg-photos { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .pg-photos { grid-template-columns: repeat(4, 1fr); } }
.pg-photo { display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 14px; background: var(--border); }
.pg-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.pg-photo:hover img { transform: scale(1.03); }
.pg-rels { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.pg-rel { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); text-decoration: none; color: var(--text); }
.pg-rel span { color: var(--text-muted); font-size: .9rem; }
.pg-rel:hover { border-color: var(--accent); }
/* статьи /stati/ - страницы собирает seo-engine/publish_site.py на сервере */
.pg-date { margin: 0 0 14px; font-size: .9rem; color: var(--text-muted); }
.pg-article h3 { font-size: 1.08rem; margin: 1.1em 0 .3em; }
.pg-article ul { padding-left: 1.3em; list-style: disc; }
.pg-article li { margin-bottom: 6px; color: var(--text); }
.pg-fig { margin: 22px 0; }
.pg-fig img { width: 100%; height: auto; border-radius: var(--radius-card); display: block; }
.pg-fig figcaption { font-size: .88rem; color: var(--text-muted); margin-top: 6px; }
.pg-more-link { margin: 22px 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.st-list { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-card { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: start; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); text-decoration: none; color: var(--text); }
.st-card img { width: 132px; height: 132px; object-fit: cover; border-radius: 10px; }
.st-card strong { display: block; font-size: 1.08rem; margin-bottom: 6px; }
.st-card span { color: var(--text-muted); font-size: .95rem; }
.st-card .pg-date { margin-bottom: 6px; }
.st-card:hover { border-color: var(--accent); }
@media (max-width: 560px) { .st-card { grid-template-columns: 1fr; } .st-card img { width: 100%; height: 180px; } }
.footer-vidy + .footer-vidy { padding-top: 2px; }
.pg-table { overflow-x: auto; margin: 0 0 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.pg-table table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.pg-table th, .pg-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.pg-table th { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.pg-table tr:last-child td { border-bottom: 0; }
.pg-table td.n { white-space: nowrap; font-weight: 600; }
