@import url('../fonts/fonts.css');

/* ==========================================================================
   Persey51 — дизайн-система
   Тема: светлая по умолчанию, полный тёмный вариант через prefers-color-scheme.
   Акцент: тёмный оливковый, под фирменный логотип.
   Радиусы (единое правило, соблюдается везде):
     кнопки и чипы — пилюля (999px)
     карточки и медиа — 18px
     поля ввода — 12px
   ========================================================================== */

:root {
  --bg:        #f4f6f8;
  --surface:   #fbfcfd;
  --surface-2: #eaeef2;
  --ink:       #10151b;
  --ink-2:     #4d5866;
  --ink-3:     #616c79;
  --line:      #dbe1e8;
  --accent:      #3d5a1e;
  --accent-hover:#325016;
  --accent-text: #2e4716;
  --accent-ink:  #ffffff;
  --accent-soft: rgba(61, 90, 30, .10);
  --shadow-1: 0 1px 2px rgba(16, 21, 27, .05), 0 6px 18px -8px rgba(16, 21, 27, .14);
  --shadow-2: 0 2px 4px rgba(16, 21, 27, .05), 0 22px 48px -18px rgba(16, 21, 27, .22);

  --r-card: 18px;
  --r-input: 12px;
  --r-pill: 999px;

  --wrap: 1280px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 7.5rem);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --t-fast: .2s var(--ease);
  --t: .38s var(--ease);

  --font-display: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Manrope', 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #0e1116;
    --surface:   #151a21;
    --surface-2: #1c232c;
    --ink:       #eef1f5;
    --ink-2:     #9aa5b3;
    --ink-3:     #828d9b;
    --line:      #26303b;
    --accent:      #7cb342;
    --accent-hover:#8ec455;
    --accent-text: #7cb342;
    --accent-ink:  #0c1505;
    --accent-soft: rgba(124, 179, 66, .14);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px -8px rgba(0, 0, 0, .55);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 22px 48px -18px rgba(0, 0, 0, .7);
  }
}

/* ---------- база ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto обязателен: у картинок проставлены атрибуты width/height (это нужно,
   чтобы браузер резервировал место и не было скачков), но без height:auto браузер
   берёт высоту из атрибута и игнорирует aspect-ratio, растягивая фото в полосу. */
img, picture, video { max-width: 100%; display: block; }
img { height: auto; }

/* Универсальная рамка с фиксированной пропорцией. Внутри картинка всегда
   заполняет её целиком и кадрируется по центру, поэтому сетки не прыгают. */
.ratio { position: relative; overflow: hidden; background: var(--surface-2); }
.ratio > img,
.ratio > picture > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ratio--4x3 { aspect-ratio: 4 / 3; }
.ratio--3x2 { aspect-ratio: 3 / 2; }
.ratio--1x1 { aspect-ratio: 1 / 1; }
.ratio--4x5 { aspect-ratio: 4 / 5; }
.ratio--16x9 { aspect-ratio: 16 / 9; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

#top-sentinel { height: 1px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -120%);
  z-index: 100; padding: .75rem 1.25rem; background: var(--accent);
  color: var(--accent-ink); border-radius: 0 0 var(--r-input) var(--r-input);
  font-weight: 700; text-decoration: none; transition: transform var(--t-fast);
}
.skip-link:focus { transform: translate(-50%, 0); }

/* ---------- типографика ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.08;
  margin: 0;
  text-wrap: balance;
}

.h1 { font-size: clamp(2rem, 4.2vw, 3.25rem); }
.h2 { font-size: clamp(1.6rem, 3.4vw, 2.55rem); }
.h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); line-height: 1.25; }
.h4 { font-family: var(--font-text); font-size: 1.0625rem; font-weight: 700; letter-spacing: 0; }

p { margin: 0; }

.lead {
  font-size: clamp(1.0625rem, 1.5vw, 1.2rem);
  color: var(--ink-2);
  max-width: 46ch;
  line-height: 1.55;
}

.body-text { color: var(--ink-2); max-width: 62ch; }

.eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 1rem;
}

.num { font-variant-numeric: tabular-nums; }

/* ---------- каркас ---------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--surface { background: var(--surface); }
.section-head { max-width: 56ch; margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.section-head p { margin-top: 1rem; color: var(--ink-2); }

/* ---------- кнопки ---------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  white-space: nowrap;
  padding: .95rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast);
}
.btn:hover { border-color: var(--ink-3); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0) scale(.985); }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-ink);
  border-color: transparent;
  box-shadow: var(--shadow-1);
}
.btn--primary:hover { --btn-bg: var(--accent-hover); border-color: transparent; }

.btn--lg { padding: 1.1rem 2.1rem; font-size: 1.05rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-icon { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- шапка ---------- */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(160%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.header[data-stuck='true'] { border-bottom-color: var(--line); }

@supports not (backdrop-filter: blur(1px)) { .header { background: var(--bg); } }
@media (prefers-reduced-transparency: reduce) { .header { background: var(--bg); backdrop-filter: none; } }

.header__inner {
  height: 72px;
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}

.logo {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.24rem;
  letter-spacing: -.03em;
  text-decoration: none;
  flex: none;
}
.logo span { color: var(--accent-text); }
/* Скругления нет намеренно: после обрезки полей синие дуги логотипа
   доходят до края, и border-radius их подрезал бы. */
.logo__mark { width: 46px; height: 46px; flex: none; }
.footer .logo__mark { width: 58px; height: 58px; }
@media (max-width: 620px) {
  .logo__mark { width: 42px; height: 42px; }
  /* На узком экране в шапке помещаются только знак, телефон и бургер,
     поэтому название прячем: знак сам по себе узнаваем.
     В подвале места хватает, там название остаётся. */
  .header .logo__text { display: none; }
}

.nav { margin-left: auto; }
.nav__list {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 2vw, 1.9rem);
  list-style: none;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}
.nav__list a {
  position: relative;
  text-decoration: none;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-2);
  padding-block: .35rem;
  transition: color var(--t-fast);
}
.nav__list a:hover { color: var(--ink); }
.nav__list a::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t);
}
.nav__list a:hover::after, .nav__list a[aria-current='page']::after { transform: scaleX(1); }
.nav__list a[aria-current='page'] { color: var(--ink); }

.header__phone {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-decoration: none;
  flex: none;
}
.header__phone b { font-family: var(--font-display); font-size: 1.02rem; letter-spacing: -.02em; }
.header__phone small { font-size: .72rem; color: var(--ink-3); }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  place-items: center;
  flex: none;
}
.burger i {
  display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px;
  position: relative; transition: transform var(--t), opacity var(--t-fast);
}
.burger i::before, .burger i::after {
  content: ''; position: absolute; left: 0; width: 18px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: transform var(--t);
}
.burger i::before { top: -6px; }
.burger i::after { top: 6px; }
.burger[aria-expanded='true'] i { transform: rotate(45deg); }
.burger[aria-expanded='true'] i::before { transform: translateY(6px) rotate(-90deg); }
.burger[aria-expanded='true'] i::after { opacity: 0; }

@media (max-width: 1000px) {
  .burger { display: grid; order: 3; }
  .header__phone { order: 2; margin-left: auto; }
  .nav {
    order: 4;
    position: fixed;
    inset: 72px 0 auto;
    margin: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 1rem var(--gutter) 1.75rem;
    display: grid;
    clip-path: inset(0 0 100% 0);
    transition: clip-path var(--t);
  }
  .nav[data-open='true'] { clip-path: inset(0 0 0 0); }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; white-space: normal; }
  .nav__list a { display: block; padding: .95rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); }
  .nav__list a::after { display: none; }
  .nav__list li:last-child a { border-bottom: 0; }
}

@media (max-width: 420px) { .header__phone small { display: none; } }

/* ---------- hero: асимметричный сплит ---------- */

.hero { position: relative; overflow: hidden; padding-top: clamp(2rem, 4vw, 3.25rem); padding-bottom: clamp(2.5rem, 5vw, 4rem); }
/* Unbounded заметно шире обычных гротесков, поэтому в hero свой кегль:
   иначе заголовок уезжает на 3 строки. */
.hero .h1 { font-size: clamp(1.9rem, 3.3vw, 2.6rem); }

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.25rem; }

.hero__media {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  box-shadow: var(--shadow-2);
  /* 4/3 совпадает с пропорцией самого кадра: он не кадрируется,
     и hero вместе со слайдером умещается в первый экран. */
  aspect-ratio: 4 / 3;
}
.hero__media img, .hero__media picture { width: 100%; height: 100%; object-fit: cover; }

.hero__badge {
  position: absolute;
  left: clamp(.85rem, 2vw, 1.25rem);
  bottom: clamp(.85rem, 2vw, 1.25rem);
  right: clamp(.85rem, 2vw, 1.25rem);
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px) saturate(170%);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3);
  display: flex;
  align-items: center;
  gap: 1rem;
}
@media (prefers-reduced-transparency: reduce) {
  .hero__badge { background: var(--surface); backdrop-filter: none; }
}
.hero__badge strong { font-family: var(--font-display); font-size: 1.6rem; letter-spacing: -.03em; line-height: 1; }
.hero__badge span { font-size: .85rem; color: var(--ink-2); line-height: 1.3; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { aspect-ratio: 4 / 3; order: -1; }
}

/* ---------- полоса цифр ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  border-block: 1px solid var(--line);
  padding-block: clamp(2rem, 4vw, 3rem);
}
.stats__item strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  letter-spacing: -.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
/* Только прямой потомок: иначе правило цепляло <span data-count> внутри <strong>
   и число получало размер подписи, а слово рядом оставалось крупным. */
.stats__item > span { display: block; margin-top: .6rem; font-size: .9rem; color: var(--ink-2); line-height: 1.35; }
.stats__item strong span { font: inherit; color: inherit; letter-spacing: inherit; }

@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- калькулятор ---------- */

.calc { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-1);
}

.calc__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.calc__fields > .field--wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .calc__fields { grid-template-columns: 1fr; } }

.calc__result { position: sticky; top: 96px; }
@media (max-width: 980px) {
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
}

.result__total {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 5vw, 3rem);
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  transition: opacity var(--t-fast);
}
.result__total[data-pending='true'] { opacity: .45; }

.result__rows { list-style: none; margin: 1.5rem 0 0; padding: 1.5rem 0 0; border-top: 1px solid var(--line); display: grid; gap: .7rem; }
.result__rows li { display: flex; justify-content: space-between; gap: 1rem; font-size: .92rem; }
.result__rows span:first-child { color: var(--ink-2); }
.result__rows span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; }
.result__rows li[data-discount='true'] span:last-child { color: var(--accent-text); }

.note {
  font-size: .82rem;
  color: var(--ink-3);
  line-height: 1.45;
  margin-top: 1.25rem;
}

/* ---------- формы ---------- */

.field { display: grid; gap: .45rem; }
.field > label { font-size: .88rem; font-weight: 700; }
.field__help { font-size: .78rem; color: var(--ink-3); }
.field__error { font-size: .8rem; color: #d1402f; font-weight: 600; min-height: 0; }
@media (prefers-color-scheme: dark) { .field__error { color: #ff8b7a; } }

.field input, .field select, .field textarea {
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-input);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { min-height: 96px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field[data-invalid='true'] input, .field[data-invalid='true'] select { border-color: #d1402f; }

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%),
                    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 19px) 51%, calc(100% - 14px) 51%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.consent { display: flex; gap: .65rem; align-items: flex-start; font-size: .8rem; color: var(--ink-2); line-height: 1.45; }
.consent input { width: 18px; height: 18px; margin-top: .12rem; flex: none; accent-color: var(--accent); }
.consent a { color: var(--accent-text); }

.honeypot { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-status { display: none; margin-top: 1.1rem; padding: .9rem 1.1rem; border-radius: var(--r-input); font-size: .92rem; font-weight: 600; }
.form-status[data-state='ok'] { display: block; background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent); }
.form-status[data-state='error'] { display: block; background: rgba(209, 64, 47, .09); color: #b3311f; border: 1px solid rgba(209, 64, 47, .35); }
@media (prefers-color-scheme: dark) { .form-status[data-state='error'] { color: #ff9c8c; } }

.spinner {
  width: 1.05em; height: 1.05em; flex: none;
  border: 2px solid color-mix(in srgb, var(--accent-ink) 40%, transparent);
  border-top-color: var(--accent-ink);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2s; } }

/* ---------- бенто: виды потолков ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: clamp(.85rem, 1.6vw, 1.15rem);
}
.bento__cell {
  position: relative;
  grid-column: span 2;
  min-height: 260px;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface-2);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.1rem, 2vw, 1.6rem);
  text-decoration: none;
}
.bento__cell--wide { grid-column: span 3; min-height: 320px; }
.bento__cell--lg   { grid-column: span 4; min-height: 340px; }
.bento__cell--full { grid-column: span 6; min-height: 300px; }
.bento__cell--tall { grid-column: span 2; grid-row: span 2; min-height: 400px; }

.bento__cell picture { position: absolute; inset: 0; z-index: -2; }
.bento__cell img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .9s var(--ease);
}
.bento__cell::after {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, rgba(8, 11, 15, .88) 0%, rgba(8, 11, 15, .45) 42%, rgba(8, 11, 15, .06) 100%);
}
.bento__cell:hover img { transform: scale(1.06); }
@media (prefers-reduced-motion: reduce) { .bento__cell:hover img { transform: none; } }

.bento__head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.bento__price {
  padding: .3rem .7rem;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bento__cell h3, .bento__cell p { color: #fff; }
.bento__cell p { margin-top: .4rem; font-size: .9rem; color: rgba(255, 255, 255, .8); max-width: 34ch; }

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento__cell, .bento__cell--wide, .bento__cell--lg,
  .bento__cell--full, .bento__cell--tall { grid-column: span 1; grid-row: auto; min-height: 220px; }
  .bento__cell--full { grid-column: span 2; }
}
@media (max-width: 520px) {
  .bento { grid-template-columns: 1fr; }
  /* В одну колонку span 2 создаёт неявную вторую колонку и ломает сетку,
     поэтому сбрасываем растяжку у всех вариантов ячейки. */
  .bento__cell, .bento__cell--wide, .bento__cell--lg,
  .bento__cell--full, .bento__cell--tall { grid-column: span 1; }
}

/* ---------- этапы работ ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(1rem, 2vw, 1.75rem);
}

.steps__item {
  position: relative;
  padding: 1.5rem 1.25rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.steps__item:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  box-shadow: var(--shadow-2);
}

/* соединительная линия между шагами, у последнего её нет */
.steps__item::after {
  content: '';
  position: absolute;
  top: 3.05rem;
  left: 100%;
  width: clamp(1rem, 2vw, 1.75rem);
  height: 2px;
  background: linear-gradient(to right, color-mix(in srgb, var(--accent) 60%, transparent), var(--line));
}
.steps__item:last-child::after { display: none; }

.steps__badge {
  counter-increment: step;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent-text);
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  transform: scale(.6);
  opacity: 0;
  transition: transform .5s var(--ease), opacity .4s var(--ease), background var(--t-fast), color var(--t-fast);
}
.steps__badge::before { content: counter(step, decimal-leading-zero); }

.steps__item.is-visible .steps__badge { transform: scale(1); opacity: 1; }
.steps__item:hover .steps__badge { background: var(--accent); color: var(--accent-ink); }

.steps__item h3 {
  margin-top: 1.1rem;
  font-family: var(--font-text);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0;
}
.steps__item p { margin-top: .5rem; font-size: .88rem; color: var(--ink-2); line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .steps__badge { transform: none; opacity: 1; }
}

@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  .steps__item:nth-child(3)::after { display: none; }
}
@media (max-width: 720px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps__item::after { display: none; }
}
@media (max-width: 430px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- преимущества: 2 колонки со разделителями ---------- */

.adv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(2rem, 5vw, 4.5rem); }
.adv__item { display: flex; gap: 1.15rem; padding-block: 1.6rem; border-top: 1px solid var(--line); }
.adv__item:nth-child(-n+2) { border-top: 0; }
.adv__icon {
  width: 46px; height: 46px; flex: none;
  border-radius: 12px;
  background: var(--accent-soft);
  display: grid; place-items: center;
  padding: 9px;
}
.adv__icon img { width: 100%; height: 100%; object-fit: contain; }
.adv__item p { margin-top: .35rem; font-size: .92rem; color: var(--ink-2); }

@media (max-width: 800px) {
  .adv { grid-template-columns: 1fr; }
  .adv__item:nth-child(2) { border-top: 1px solid var(--line); }
}

/* ---------- отзывы: горизонтальный scroll-snap ---------- */

.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(290px, 30%);
  gap: clamp(.85rem, 1.6vw, 1.15rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 1.25rem;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scrollbar-width: thin;
}
.rail > * { scroll-snap-align: start; }
@media (max-width: 700px) { .rail { grid-auto-columns: minmax(255px, 82%); } }

.quote {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: clamp(1.35rem, 2.5vw, 1.85rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.quote blockquote { margin: 0; font-size: .98rem; line-height: 1.6; color: var(--ink); }
.quote figcaption { margin-top: auto; font-size: .85rem; color: var(--ink-3); }
.quote figcaption b { display: block; color: var(--ink); font-size: .95rem; }
.quote__mark { font-family: var(--font-display); font-size: 2rem; line-height: .6; color: var(--accent-text); }

/* ---------- галерея работ ---------- */

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: clamp(.85rem, 1.6vw, 1.15rem); }

.shot {
  position: relative;
  border: 0;
  padding: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  display: block;
}
.shot picture { position: absolute; inset: 0; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.shot:hover img { transform: scale(1.05); }
@media (prefers-reduced-motion: reduce) { .shot:hover img { transform: none; } }
.shot__tag {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 2.5rem .95rem .8rem;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
  background: linear-gradient(to top, rgba(8, 11, 15, .82), transparent);
  opacity: 0;
  transition: opacity var(--t-fast);
}
.shot:hover .shot__tag, .shot:focus-visible .shot__tag { opacity: 1; }
.shot[hidden] { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); }
.chip {
  padding: .55rem 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.chip:hover { border-color: var(--ink-3); }
.chip[aria-pressed='true'] { background: var(--accent); border-color: transparent; color: var(--accent-ink); }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 90;
  display: none;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(8, 11, 15, .92);
  border: 0;
}
.lightbox[open] { display: grid; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.lightbox::backdrop { background: rgba(8, 11, 15, .92); }
/* Сцена фиксированной высоты: раньше окно прыгало при переключении, потому что
   каждое фото задавало свой размер. Теперь меняется только картинка внутри. */
.lightbox__stage {
  width: min(92vw, 1200px);
  height: min(78vh, 800px);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .04);
  border-radius: var(--r-card);
  overflow: hidden;
}
.lightbox img {
  width: 100%; height: 100%;
  object-fit: contain;
  border-radius: var(--r-card);
}
.lightbox__bar { width: min(92vw, 1200px); }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1rem; color: #fff; }
.lightbox__bar p { font-size: .95rem; }
.lightbox__nav { display: flex; gap: .5rem; }
.lightbox__nav button, .lightbox__close {
  width: 44px; height: 44px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(255, 255, 255, .3);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  cursor: pointer;
  display: grid; place-items: center;
  transition: background var(--t-fast);
}
.lightbox__nav button:hover, .lightbox__close:hover { background: rgba(255, 255, 255, .22); }
.lightbox__close { position: absolute; top: clamp(.75rem, 2vw, 1.5rem); right: clamp(.75rem, 2vw, 1.5rem); }

/* ---------- CTA-полоса ---------- */

.cta-band {
  position: relative;
  border-radius: var(--r-card);
  overflow: hidden;
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: center;
  isolation: isolate;
}
.cta-band > picture { position: absolute; inset: 0; z-index: -2; }
.cta-band img.cta-band__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.cta-band::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, rgba(8, 11, 15, .9) 0%, rgba(8, 11, 15, .72) 55%, rgba(8, 11, 15, .55) 100%);
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band p { color: rgba(255, 255, 255, .82); margin-top: 1rem; max-width: 44ch; }
.cta-band .panel { background: color-mix(in srgb, var(--surface) 96%, transparent); }
@media (max-width: 900px) { .cta-band { grid-template-columns: 1fr; } }

/* ---------- прайс-плашки ---------- */

/* Flex, а не grid: в grid неполный последний ряд прижимается влево,
   а нужно, чтобы он стоял по центру относительно верхних. Карточки не растут
   (flex-grow: 0), поэтому ширина у всех одинаковая, а justify-content
   центрирует остаток. min-width отвечает за перенос на узких экранах. */
.tiles {
  --tiles-gap: clamp(.85rem, 1.6vw, 1.15rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--tiles-gap);
}
/* Ширину задаём по брейкпоинтам, а не через min-width: карточки не растут
   (иначе неполный ряд растянется и центрирование пропадёт), поэтому без явной
   ширины на узких экранах они остались бы уже колонки. */
.tiles > * { flex: 0 1 calc((100% - var(--tiles-gap) * 3) / 4); }

@media (max-width: 1080px) {
  .tiles > * { flex-basis: calc((100% - var(--tiles-gap) * 2) / 3); }
}
@media (max-width: 800px) {
  .tiles > * { flex-basis: calc((100% - var(--tiles-gap)) / 2); }
}
@media (max-width: 520px) {
  .tiles > * { flex-basis: 100%; }
}
.tile {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 1.5rem;
  background: var(--surface);
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-1); border-color: var(--ink-3); }
.tile--media { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tile--media .tile__body { padding: 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.tile--media:hover .ratio > picture > img { transform: scale(1.05); }
.tile--media .ratio > picture > img { transition: transform .8s var(--ease); }
@media (prefers-reduced-motion: reduce) { .tile--media:hover .ratio > picture > img { transform: none; } }

.tile strong { display: block; font-family: var(--font-display); font-size: 1.5rem; letter-spacing: -.03em; }
.tile b { display: block; margin-top: .9rem; font-size: 1rem; }
.tile p { margin-top: .4rem; font-size: .88rem; color: var(--ink-2); }
.tile--accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* ---------- подвал ---------- */

.footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: clamp(2.75rem, 5vw, 4.5rem) 2rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: clamp(1.75rem, 4vw, 3rem); }
.footer h4 { margin-bottom: 1rem; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-family: var(--font-text); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .65rem; }
.footer a { text-decoration: none; color: var(--ink-2); transition: color var(--t-fast); }
.footer a:hover { color: var(--accent-text); }
.footer__phone { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.02em; color: var(--ink) !important; }
.footer__bottom {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: .82rem;
  color: var(--ink-3);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- анимации появления ---------- */

/* Скрываем только когда JS реально работает: класс .js ставится инлайн-скриптом
   в <head>. Без JS ничего не прячется и весь контент виден сразу. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: var(--d, 0ms); }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  .js .reveal-media { opacity: 0; transform: scale(1.04); transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0ms); }
  .js .reveal-media.is-visible { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-media { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* зерно поверх страницы: фиксированный слой, без перерисовок при скролле */
.grain {
  position: fixed; inset: 0; z-index: 60;
  pointer-events: none;
  opacity: .028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) { .grain { opacity: .045; } }

/* ---------- утилиты ---------- */

.stack-sm > * + * { margin-top: .75rem; }
.stack > * + * { margin-top: 1.25rem; }
.stack-lg > * + * { margin-top: 2rem; }
.text-accent { color: var(--accent-text); }
.mt-auto { margin-top: auto; }

.page-head { padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2.5rem); }
.crumbs { display: flex; gap: .5rem; align-items: center; font-size: .84rem; color: var(--ink-3); margin-bottom: 1.1rem; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 2.5rem; margin-bottom: .85rem; font-size: 1.4rem; }
.prose h3 { margin-top: 1.75rem; margin-bottom: .6rem; font-size: 1.1rem; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul, .prose ol { padding-left: 1.35rem; display: grid; gap: .5rem; margin: 0; }
.prose p + p { margin-top: 1rem; }

/* ---------- FAQ: аккордеон на нативном details ---------- */

.faq { display: grid; gap: .6rem; max-width: 62rem; }

.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
  transition: border-color var(--t-fast);
}
.faq__item[open] { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.faq__item:hover { border-color: var(--ink-3); }

.faq__item summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 1.02rem;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary svg {
  width: 20px; height: 20px; flex: none;
  margin-left: auto;
  color: var(--accent-text);
  transition: transform var(--t);
}
.faq__item[open] summary svg { transform: rotate(180deg); }

.faq__body {
  padding: 0 1.35rem 1.35rem;
  color: var(--ink-2);
  font-size: .95rem;
  line-height: 1.6;
  max-width: 62ch;
}
.faq__body ul { margin: .6rem 0 0; padding-left: 1.2rem; display: grid; gap: .35rem; }

@media (prefers-reduced-motion: no-preference) {
  .faq__item[open] .faq__body { animation: faqIn .32s var(--ease); }
  @keyframes faqIn { from { opacity: 0; transform: translateY(-6px); } }
}

/* ---------- портрет в карточке отзыва ---------- */

.quote__person { display: flex; align-items: center; gap: .85rem; margin-top: auto; }
.quote__person img {
  width: 48px; height: 48px; flex: none;
  border-radius: 50%;
  object-fit: cover;
}
.quote__person b { display: block; font-size: .95rem; }
.quote__person span { font-size: .85rem; color: var(--ink-3); }

/* ---------- плашки акций ---------- */

.promos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: clamp(.85rem, 1.6vw, 1.15rem); }
.promo {
  display: flex;
  gap: .9rem;
  padding: 1.35rem;
  border-radius: var(--r-card);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.promo svg { width: 24px; height: 24px; flex: none; color: var(--accent-text); }
.promo b { display: block; font-size: .98rem; }
.promo p { margin-top: .3rem; font-size: .88rem; color: var(--ink-2); }

/* ---------- карта на странице контактов ---------- */

.map {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: var(--shadow-1);
}
.map iframe {
  display: block;
  width: 100%;
  height: clamp(320px, 46vh, 460px);
  border: 0;
}
.map__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.35rem;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.map__bar p { font-size: .95rem; }
.map__bar p b { display: block; font-size: .8rem; color: var(--ink-3); font-weight: 600; }
.map__bar .btn { margin-left: auto; }
@media (max-width: 560px) { .map__bar .btn { margin-left: 0; width: 100%; } }

/* ==========================================================================
   Северное сияние в hero.
   Не круглые пятна, а вертикальные лучи-занавесы: именно так сияние и выглядит.
   Каждый луч это узкая полоса с градиентом, наклонённая и размытая; они плывут
   по горизонтали с разной скоростью и «дышат» по высоте. На тёмной теме
   включён режим screen, поэтому лучи складываются как настоящий свет.
   ========================================================================== */

.hero { isolation: isolate; }

.aurora {
  position: absolute;
  inset: -25% -10% auto -10%;
  height: 150%;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 45%, transparent 88%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 45%, transparent 88%);
}

/* мягкое свечение у верхней кромки, как отсвет над горизонтом */
.aurora::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 55%;
  background: radial-gradient(120% 100% at 50% 0%, rgba(90, 140, 40, .18) 0%, transparent 65%);
}

.aurora i {
  position: absolute;
  top: -12%;
  height: 124%;
  display: block;
  border-radius: 50% / 12%;
  filter: blur(38px);
  will-change: transform, opacity;
  transform-origin: 50% 0%;
  mix-blend-mode: screen;
}

/* Луч 1: широкий изумрудный, основной */
.aurora i:nth-child(1) {
  left: 4%;
  width: 15vw;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(100, 160, 50, .72) 26%, rgba(60, 120, 40, .38) 62%, transparent 92%);
  transform: skewX(-1deg);
  animation: ribbon1 21s ease-in-out infinite alternate;
}

/* Луч 2: узкий бирюзовый */
.aurora i:nth-child(2) {
  left: 21%;
  width: 8vw;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(130, 190, 60, .58) 30%, rgba(70, 130, 50, .3) 68%, transparent 94%);
  transform: skewX(-3deg);
  animation: ribbon2 27s ease-in-out infinite alternate;
  animation-delay: -7s;
}

/* Луч 3: холодный синий, уходит вправо */
.aurora i:nth-child(3) {
  left: 40%;
  width: 19vw;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(80, 150, 40, .46) 24%, rgba(50, 100, 30, .26) 60%, transparent 90%);
  transform: skewX(-3deg);
  animation: ribbon3 33s ease-in-out infinite alternate;
  animation-delay: -14s;
}

/* Луч 4: тонкий яркий, добавляет «иглу» света */
.aurora i:nth-child(4) {
  left: 58%;
  width: 5vw;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(160, 210, 80, .6) 22%, rgba(90, 150, 50, .28) 58%, transparent 88%);
  transform: skewX(-9deg);
  filter: blur(26px);
  animation: ribbon2 24s ease-in-out infinite alternate;
  animation-delay: -3s;
}

/* Луч 5: широкий фиолетовый на дальнем плане */
.aurora i:nth-child(5) {
  left: 72%;
  width: 22vw;
  background: linear-gradient(to bottom,
    transparent 0%, rgba(100, 140, 50, .34) 28%, rgba(60, 110, 40, .22) 66%, transparent 92%);
  transform: skewX(-1deg);
  filter: blur(52px);
  animation: ribbon1 38s ease-in-out infinite alternate;
  animation-delay: -19s;
}

@keyframes ribbon1 {
  0%   { transform: skewX(-1deg) translateX(0) scaleY(1);      opacity: .75; }
  50%  { transform: skewX(-3deg)  translateX(4vw) scaleY(1.12); opacity: 1; }
  100% { transform: skewX(-6deg) translateX(-3vw) scaleY(.92); opacity: .6; }
}
@keyframes ribbon2 {
  0%   { transform: skewX(-3deg) translateX(0) scaleY(1.05);   opacity: .55; }
  50%  { transform: skewX(-4deg) translateX(-5vw) scaleY(.9);  opacity: .95; }
  100% { transform: skewX(-4deg) translateX(6vw) scaleY(1.15); opacity: .5; }
}
@keyframes ribbon3 {
  0%   { transform: skewX(-3deg)  translateX(0) scaleY(.95);    opacity: .5; }
  50%  { transform: skewX(-1deg)  translateX(7vw) scaleY(1.18); opacity: .85; }
  100% { transform: skewX(-5deg) translateX(-4vw) scaleY(1);   opacity: .45; }
}

/* В светлой теме сияние почти незаметно: screen на светлом фоне не работает,
   поэтому обычное наложение и низкая прозрачность. */
@media (prefers-color-scheme: light) {
  .aurora i { mix-blend-mode: normal; opacity: .16; filter: blur(50px); }
  .aurora::before { background: radial-gradient(120% 100% at 50% 0%, rgba(80, 120, 30, .07) 0%, transparent 65%); }
}

@media (prefers-reduced-motion: reduce) {
  .aurora i { animation: none; }
}

@media (max-width: 700px) {
  .aurora i { filter: blur(30px); }
  .aurora i:nth-child(5) { display: none; }
}

/* ==========================================================================
   Карточки с ценами по фактурам
   ========================================================================== */

.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: clamp(.85rem, 1.6vw, 1.15rem);
}

.price-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--accent); }
.price-card:hover .ratio > picture > img { transform: scale(1.06); }
.price-card .ratio > picture > img { transition: transform .8s var(--ease); }
@media (prefers-reduced-motion: reduce) { .price-card:hover .ratio > picture > img { transform: none; } }

.price-card__body { padding: 1.15rem 1.25rem 1.35rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.price-card__body h3 { font-family: var(--font-text); font-size: 1.05rem; font-weight: 700; letter-spacing: 0; }
.price-card__body p { font-size: .87rem; color: var(--ink-2); line-height: 1.45; }

.price-card__price {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  gap: .4rem;
}
.price-card__price b {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -.03em;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.price-card__price span { font-size: .82rem; color: var(--ink-3); }

/* ==========================================================================
   Переключатель версии сайта
   ========================================================================== */

.viewport-switch {
  display: none;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink-2);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.viewport-switch:hover { border-color: var(--ink-3); color: var(--ink); }
.viewport-switch svg { width: 16px; height: 16px; }

/* Показываем только там, где выбор действительно имеет смысл */
@media (max-width: 900px), (pointer: coarse) {
  .viewport-switch { display: inline-flex; }
}
html[data-force-desktop='1'] .viewport-switch { display: inline-flex; }

/* ==========================================================================
   Слайдер фактур в hero: карточки листаются сами и вручную
   ========================================================================== */

.hero__slider { margin-top: clamp(1.75rem, 3.5vw, 2.75rem); }

.slider__head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.slider__head h2 {
  font-family: var(--font-text);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Flex, а не grid: у grid все колонки одного размера, и добавить в конец
   ширину карточки задать отдельно нельзя. */
.slider__track {
  display: flex;
  gap: clamp(.75rem, 1.4vw, 1rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: .5rem;
  scrollbar-width: none;
}
.slider__track > .slide { flex: 0 0 clamp(230px, 22vw, 260px); }
.slider__track::-webkit-scrollbar { display: none; }
@media (prefers-reduced-motion: reduce) { .slider__track { scroll-behavior: auto; } }

.slide {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
  overflow: hidden;
  text-decoration: none;
  transition: transform var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast);
}
.slide:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-2); }
.slide:hover .ratio > picture > img { transform: scale(1.06); }
.slide .ratio > picture > img { transition: transform .8s var(--ease); }
@media (prefers-reduced-motion: reduce) { .slide:hover .ratio > picture > img { transform: none; } }

.slide__body { padding: .8rem .95rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.slide__body h3 { font-family: var(--font-text); font-size: 1rem; font-weight: 700; letter-spacing: 0; }
.slide__body p { font-size: .84rem; color: var(--ink-2); line-height: 1.4; }
.slide__price {
  margin-top: auto;
  padding-top: .7rem;
  display: flex;
  align-items: baseline;
  gap: .35rem;
}
.slide__price b {
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: -.03em;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}
.slide__price span { font-size: .78rem; color: var(--ink-3); }

.slider__nav { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.slider__nav button {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.slider__nav button:hover { border-color: var(--accent); }
.slider__nav button:active { transform: scale(.94); }
.slider__nav svg { width: 18px; height: 18px; }

.slider__dots { display: flex; gap: .4rem; align-items: center; }
.slider__dots button {
  width: 8px; height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background var(--t-fast), width var(--t-fast);
}
.slider__dots button[aria-current='true'] { background: var(--accent); width: 22px; border-radius: var(--r-pill); }

@media (max-width: 600px) {
  .slider__track > .slide { flex-basis: min(72%, 260px); }
  .slider__nav button { width: 34px; height: 34px; }
}
