/* =========================================================
   PORTA — межкомнатные двери в Алматы
   Mobile-first. Чистый CSS, без фреймворков.
   ========================================================= */

/* ---------- Дизайн-токены ---------- */
:root {
  --brand: #111b4e;
  --brand-hover: #1b2768;
  --white: #ffffff;
  --soft: #f3f4f7;
  --graphite: #23262f;
  --accent: #b08d57;

  --text: var(--graphite);
  --muted: rgba(35, 38, 47, 0.64);
  --line: rgba(17, 27, 78, 0.12);
  --on-brand-muted: rgba(255, 255, 255, 0.72);
  --on-brand-line: rgba(255, 255, 255, 0.18);

  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --container: 1240px;
  --gutter: 20px;
  --section-y: 72px;
  --header-h: 64px;
  --mobile-bar-h: 64px;

  --shadow: 0 18px 50px -24px rgba(17, 27, 78, 0.35);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 768px) {
  :root { --gutter: 32px; --section-y: 96px; --header-h: 76px; }
}
@media (min-width: 1100px) {
  :root { --section-y: 120px; }
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background: var(--white);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
  padding-bottom: var(--mobile-bar-h);
  -webkit-font-smoothing: antialiased;
}
@media (min-width: 1024px) { body { padding-bottom: 0; } }

body.is-locked { overflow: hidden; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, figure { margin: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
address { font-style: normal; }
[hidden] { display: none !important; }

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

section[id], main [id] { scroll-margin-top: calc(var(--header-h) + 12px); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: 28px; height: 28px; stroke-width: 1.4; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--brand);
  color: var(--white);
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.muted { color: var(--muted); }
.center { display: flex; justify-content: center; margin-top: 40px; }

/* ---------- Типографика секций ---------- */
.section { padding-block: var(--section-y); }
.section--soft { background: var(--soft); }
.logo img {
    width: 150px;
}
.section-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 40px;
  max-width: 760px;
}
@media (min-width: 768px) { .section-head { margin-bottom: 56px; } }

.section-head--split { max-width: none; }
@media (min-width: 900px) {
  .section-head--split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 48px;
  }
  .section-head--split > div { display: flex; flex-direction: column; gap: 14px; max-width: 640px; }
  .section-head--split .section-text { max-width: 420px; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.eyebrow--light { color: var(--on-brand-muted); }

.section-title {
  font-size: clamp(28px, 5vw, 46px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--brand);
  text-wrap: balance;
}
.section-title--light { color: var(--white); }

.section-text {
  font-size: 17px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 44px; padding: 10px 20px; font-size: 14px; }
.btn--lg { min-height: 58px; padding: 16px 32px; font-size: 16px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--brand); color: var(--white); }
.btn--primary:hover { background: var(--brand-hover); }

.btn--outline { border-color: var(--line); color: var(--brand); background: var(--white); }
.btn--outline:hover { border-color: var(--brand); }

.btn--light { background: var(--white); color: var(--brand); }
.btn--light:hover { background: var(--soft); }

.btn--wa { background: var(--soft); color: var(--brand); }
.btn--wa:hover { background: #e7e9ef; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--soft);
  transition: background-color 0.2s var(--ease);
}
.icon-btn:hover { background: #e7e9ef; }

/* ---------- Бейджи ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.2;
}
.badge--hit { background: var(--accent); color: var(--white); }
.badge--soft { background: rgba(255, 255, 255, 0.14); color: var(--white); }

/* ---------- Списки с галочками ---------- */
.check-list { display: flex; flex-direction: column; gap: 14px; }
.check-list li { display: flex; align-items: flex-start; gap: 12px; line-height: 1.5; }
.check-list .icon {
  width: 22px; height: 22px; padding: 4px;
  border-radius: 50%;
  background: rgba(17, 27, 78, 0.08);
  color: var(--brand);
  stroke-width: 2.2;
  margin-top: 1px;
}
.check-list--light li { color: var(--white); }
.check-list--light .icon { background: rgba(255, 255, 255, 0.14); color: var(--white); }

/* =========================================================
   1. HEADER
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.header.is-scrolled { border-bottom-color: var(--line); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: var(--header-h);
}

.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); }
.logo__mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--brand);
  color: var(--white);
}
.logo__text {
  display: flex; flex-direction: column;
  font-size: 19px; font-weight: 800; letter-spacing: 0.12em; line-height: 1.1;
  color: var(--brand);
}
.logo__text small {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: lowercase;
  color: var(--muted);
}
.logo--light, .logo--light .logo__text { color: var(--white); }
.logo--light .logo__mark { background: var(--white); color: var(--brand); }
.logo--light .logo__text small { color: var(--on-brand-muted); }

.nav { display: none; }
.nav__list { display: flex; gap: 28px; }
.nav__list a {
  position: relative;
  font-size: 15px; font-weight: 600;
  color: var(--graphite);
  padding-block: 6px;
  transition: color 0.2s var(--ease);
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; background: var(--brand);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.nav__list a:hover { color: var(--brand); }
.nav__list a:hover::after { transform: scaleX(1); }

.header__actions { display: flex; align-items: center; gap: 8px; }
.header__phone { display: none; font-weight: 700; color: var(--brand); white-space: nowrap; }
.header__cta { display: none; }
.icon-btn--wa { color: var(--brand); }

@media (min-width: 1024px) {
  .nav { display: block; }
  .header__phone, .header__cta { display: inline-flex; }
  .header__actions { gap: 20px; }
  .header__mobile-only, .burger { display: none; }
}
@media (min-width: 1024px) and (max-width: 1179px) {
  .nav__list { gap: 18px; }
  .nav__list a { font-size: 14px; }
  .header__phone { display: none; }
}

/* ---------- Drawer ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(17, 27, 78, 0.45);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}
.drawer-overlay.is-open { opacity: 1; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 100;
  width: min(360px, 88vw);
  display: flex; flex-direction: column;
  gap: 24px;
  padding: 20px 24px 28px;
  background: var(--white);
  transform: translateX(100%);
  transition: transform 0.4s var(--ease);
  overflow-y: auto;
  visibility: hidden;
}
.drawer.is-open { transform: translateX(0); visibility: visible; }

.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a {
  display: block;
  padding: 16px 0;
  font-size: 20px; font-weight: 700;
  color: var(--brand);
  border-bottom: 1px solid var(--line);
}
.drawer__foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.drawer__phone { font-size: 20px; font-weight: 800; color: var(--brand); margin-bottom: 4px; }

/* =========================================================
   2. HERO
   ========================================================= */
.hero { padding-block: 32px 72px; }
@media (min-width: 768px) { .hero { padding-block: 56px 96px; } }

.hero__inner { display: grid; gap: 48px; align-items: center; }
@media (min-width: 1024px) {
  .hero__inner { grid-template-columns: 1.08fr 0.92fr; gap: 72px; }
}

.hero__content { display: flex; flex-direction: column; gap: 22px; }
.hero__title {
  font-size: clamp(34px, 6.4vw, 64px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--brand);
  text-wrap: balance;
}
.hero__lead { font-size: clamp(17px, 2vw, 20px); color: var(--muted); max-width: 540px; text-wrap: pretty; }

.hero__buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
@media (min-width: 560px) { .hero__buttons { flex-direction: row; } }

.hero__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-top: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.hero__features li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.hero__features .icon { color: var(--brand); }
@media (min-width: 768px) {
  .hero__features { grid-template-columns: repeat(4, auto); justify-content: start; gap: 24px; }
}

.hero__media { position: relative; padding: 0 0 36px; }

/* Фирменный элемент: фото в пропорциях дверного полотна с «наличником» */
.door-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 4px;
}
.door-frame::before {
  content: "";
  position: absolute;
  inset: -12px -12px 0 -12px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  pointer-events: none;
}
.door-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 4px;
}
@media (min-width: 1024px) {
  .door-frame { aspect-ratio: 5 / 7; max-height: 720px; margin-left: auto; }
}

.promo-badge {
  position: absolute;
  left: -4px; right: 24px; bottom: 0;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--white);
  box-shadow: var(--shadow);
  transition: transform 0.3s var(--ease);
}
.promo-badge:hover { transform: translateY(-3px); }
.promo-badge__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}
.promo-badge__text { font-size: 15px; line-height: 1.35; font-weight: 500; }
.promo-badge__text strong { display: block; font-size: 16px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
@media (min-width: 1024px) {
  .promo-badge { left: -40px; right: auto; max-width: 340px; bottom: 56px; }
  .hero__media { padding-bottom: 0; }
}

/* =========================================================
   3. КАТАЛОГ
   ========================================================= */
.catalog {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 768px) { .catalog { gap: 20px; } }
@media (min-width: 1024px) {
  .catalog { grid-template-columns: repeat(4, 1fr); gap: 24px; }
}

.cat-card { display: flex; flex-direction: column; gap: 12px; color: var(--brand); }
.cat-card__img { overflow: hidden; border-radius: var(--radius); aspect-ratio: 3 / 4; background: var(--soft); }
.cat-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.cat-card:hover .cat-card__img img { transform: scale(1.04); }
.cat-card__name {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 15px; font-weight: 700; line-height: 1.3;
}
.cat-card__name .icon { width: 18px; height: 18px; transition: transform 0.3s var(--ease); }
.cat-card:hover .cat-card__name .icon { transform: translateX(4px); }
@media (min-width: 768px) { .cat-card__name { font-size: 17px; } }

/* Приоритетная карточка — скрытые двери */
.cat-card--featured {
  position: relative;
  grid-column: 1 / -1;
  min-height: 460px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
}
.cat-card--featured img {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1s var(--ease);
}
.cat-card--featured::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(17, 27, 78, 0) 35%, rgba(17, 27, 78, 0.88) 100%);
}
.cat-card--featured:hover img { transform: scale(1.03); }
.cat-card--featured .badge { position: absolute; top: 20px; left: 20px; }
.cat-card__overlay {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px;
  color: var(--white);
}
.cat-card__title { font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.cat-card__text { color: var(--on-brand-muted); max-width: 360px; }
.cat-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; font-weight: 700; }
@media (min-width: 1024px) {
  .cat-card--featured { grid-column: 1 / 3; grid-row: 1 / 3; min-height: 0; }
  .cat-card__overlay { padding: 36px; }
}

.cat-card--cta {
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--white);
  grid-column: 1 / -1;
}
.cat-card--cta p { color: var(--on-brand-muted); font-size: 15px; }
.cat-card--cta .btn { align-self: flex-start; margin-top: 4px; }
.cat-card__cta-title { font-size: 20px; font-weight: 800; line-height: 1.2; }
@media (min-width: 1024px) { .cat-card--cta { grid-column: auto; } }

/* =========================================================
   4. ХИТ ПРОДАЖ
   ========================================================= */
.hit { background: var(--brand); color: var(--white); overflow: hidden; }
.hit__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .hit__inner { grid-template-columns: 1fr 1fr; gap: 72px; } }

.hit__media { position: relative; }
.hit__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.hit__badge { position: absolute; top: 20px; left: 20px; }

.hit__content { display: flex; flex-direction: column; gap: 22px; }
.hit__lead { font-size: 19px; color: var(--on-brand-muted); }
.hit__content .check-list { margin-block: 8px 12px; font-size: 17px; }
.hit__content .btn { align-self: flex-start; }
@media (max-width: 559px) { .hit__content .btn { align-self: stretch; } }

/* =========================================================
   5. ПОДБОР
   ========================================================= */
.styles-grid { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .styles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .styles-grid { grid-template-columns: repeat(4, 1fr); } }

.style-card { display: flex; flex-direction: column; gap: 8px; }
.style-card__img { overflow: hidden; border-radius: var(--radius); aspect-ratio: 4 / 5; margin-bottom: 10px; }
.style-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.style-card:hover .style-card__img img { transform: scale(1.04); }
.style-card h3 { font-size: 19px; font-weight: 700; color: var(--brand); }
.style-card p { color: var(--muted); font-size: 15px; }

/* =========================================================
   6. ЦЕНЫ
   ========================================================= */
.prices { display: grid; gap: 20px; }
@media (min-width: 900px) { .prices { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.price-card {
  display: flex; flex-direction: column; gap: 18px;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  background: var(--white);
  border: 1px solid var(--line);
}
.price-card__title { font-size: 20px; font-weight: 700; color: var(--brand); }
.price-card__price { font-size: 15px; color: var(--muted); padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.price-card__price span { font-size: 38px; font-weight: 800; letter-spacing: -0.03em; color: var(--brand); }
.price-card .check-list { font-size: 15px; }

.price-card--accent { background: var(--brand); border-color: var(--brand); color: var(--white); }
.price-card--accent .price-card__title,
.price-card--accent .price-card__price span { color: var(--white); }
.price-card--accent .price-card__price { color: var(--on-brand-muted); border-color: var(--on-brand-line); }

.prices__foot {
  display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
  margin-top: 32px;
}
.prices__foot p { color: var(--muted); max-width: 560px; }
@media (min-width: 768px) {
  .prices__foot { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* =========================================================
   7. КАЛЬКУЛЯТОР
   ========================================================= */
.calc {
  display: grid;
  gap: 20px;
}
@media (min-width: 1024px) { .calc { grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; } }

.calc__fields {
  display: flex; flex-direction: column; gap: 28px;
  padding: 28px 22px;
  border-radius: var(--radius-lg);
  background: var(--soft);
}
@media (min-width: 768px) { .calc__fields { padding: 40px; } }

.field-group { display: flex; flex-direction: column; gap: 12px; }
.field-label { display: block; font-size: 14px; font-weight: 700; color: var(--brand); padding: 0; }
.field-group .field-label { margin-bottom: 0; }

.stepper {
  display: inline-flex; align-items: center; align-self: flex-start;
  gap: 4px; padding: 6px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
}
.stepper__btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  color: var(--brand);
  transition: background-color 0.2s var(--ease);
}
.stepper__btn:hover { background: var(--soft); }
.stepper__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper__value { min-width: 56px; text-align: center; font-size: 22px; font-weight: 800; color: var(--brand); }

.segmented { display: grid; gap: 8px; }
.segmented--2 { grid-template-columns: repeat(2, 1fr); max-width: 320px; }
.segmented--3 { grid-template-columns: 1fr; }
@media (min-width: 480px) { .segmented--3 { grid-template-columns: repeat(3, 1fr); } }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.segmented span {
  display: flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 600; font-size: 15px;
  transition: all 0.2s var(--ease);
  cursor: pointer;
}
.segmented input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--white); }
.segmented input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.field-row { display: grid; gap: 16px; }
@media (min-width: 640px) { .field-row { grid-template-columns: 1fr 1fr; } }

.field { display: flex; flex-direction: column; gap: 8px; }
.input {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 16px;
  color: var(--graphite);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  appearance: none;
}
.input::placeholder { color: rgba(35, 38, 47, 0.4); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(17, 27, 78, 0.12); }
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111B4E' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 18px;
  padding-right: 44px;
}
.field.has-error .input { border-color: #c0392b; }
.field-error { font-size: 13px; color: #c0392b; min-height: 0; }
.field-error:empty { display: none; }

.calc__summary {
  display: flex; flex-direction: column; gap: 18px;
  padding: 28px 22px;
  border-radius: var(--radius-lg);
  background: var(--brand);
  color: var(--white);
}
@media (min-width: 768px) { .calc__summary { padding: 40px; } }
@media (min-width: 1024px) { .calc__summary { position: sticky; top: calc(var(--header-h) + 24px); } }

.calc__summary-label { font-size: 14px; color: var(--on-brand-muted); font-weight: 600; }
.calc__total { font-size: 18px; color: var(--on-brand-muted); line-height: 1.1; }
.calc__total span { font-size: clamp(36px, 5vw, 48px); font-weight: 800; letter-spacing: -0.03em; color: var(--white); }
.calc__details {
  display: flex; flex-direction: column;
  margin: 0;
  border-top: 1px solid var(--on-brand-line);
}
.calc__details div {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--on-brand-line);
  font-size: 15px;
}
.calc__details dt { color: var(--on-brand-muted); }
.calc__details dd { margin: 0; font-weight: 700; }

.calc__gift {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14.5px;
  line-height: 1.4;
}
.calc__gift .icon { color: var(--accent); }
.calc__gift.is-active { background: var(--accent); }
.calc__gift.is-active .icon { color: var(--white); }
.calc__note { font-size: 13px; color: var(--on-brand-muted); }

/* =========================================================
   8. АКЦИЯ
   ========================================================= */
.promo-section { padding-top: 0; }
.promo {
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--soft);
}
@media (min-width: 900px) { .promo { grid-template-columns: 1.1fr 0.9fr; } }
.promo__content { display: flex; flex-direction: column; gap: 20px; padding: 36px 24px; justify-content: center; }
@media (min-width: 768px) { .promo__content { padding: 64px; } }
.promo__content .btn { align-self: flex-start; margin-top: 8px; }
.promo__media { min-height: 300px; }
.promo__media img { width: 100%; height: 100%; object-fit: cover; }

/* =========================================================
   9. ПОЧЕМУ МЫ
   ========================================================= */
.features { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); } }

.feature { display: flex; flex-direction: column; gap: 10px; padding: 32px 28px; background: var(--white); }
@media (min-width: 1024px) { .feature { padding: 40px 36px; } }
.feature__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; color: var(--brand); }
.feature__num { font-size: 14px; font-weight: 800; letter-spacing: 0.1em; color: var(--accent); }
.feature h3 { font-size: 20px; font-weight: 700; color: var(--brand); }
.feature p { color: var(--muted); }

/* =========================================================
   10. КАК МЫ РАБОТАЕМ
   ========================================================= */
.steps { display: grid; gap: 0; counter-reset: step; }
.step {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 18px;
  padding-bottom: 32px;
}
.step::before {
  content: "";
  position: absolute; left: 25px; top: 52px; bottom: 0;
  width: 1px; background: var(--line);
}
.step:last-child { padding-bottom: 0; }
.step:last-child::before { display: none; }
.step__num {
  grid-row: span 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--line);
  font-weight: 800; font-size: 15px; color: var(--brand);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.step:hover .step__num { background: var(--brand); color: var(--white); }
.step h3 { font-size: 18px; font-weight: 700; color: var(--brand); padding-top: 12px; }
.step p { color: var(--muted); font-size: 15px; }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 48px 32px; }
  .step { grid-template-columns: 1fr; padding-bottom: 0; row-gap: 6px; }
  .step::before { left: 64px; right: -24px; top: 26px; bottom: auto; width: auto; height: 1px; }
  .step:nth-child(3n)::before { display: none; }
  .step__num { grid-row: auto; margin-bottom: 14px; }
  .step h3 { padding-top: 0; }
}
@media (min-width: 1200px) {
  .steps { grid-template-columns: repeat(6, 1fr); gap: 24px; }
  .step:nth-child(3n)::before { display: block; }
  .step:last-child::before { display: none; }
}

/* =========================================================
   11. НАШИ РАБОТЫ
   ========================================================= */
.filters {
  display: flex; gap: 8px;
  margin-bottom: 28px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.filters::-webkit-scrollbar { display: none; }
@media (min-width: 768px) { .filters { flex-wrap: wrap; margin-inline: 0; padding-inline: 0; overflow: visible; } }

.filter {
  flex-shrink: 0;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 14px; font-weight: 600;
  color: var(--graphite);
  white-space: nowrap;
  transition: all 0.2s var(--ease);
}
.filter:hover { border-color: var(--brand); color: var(--brand); }
.filter.is-active { background: var(--brand); border-color: var(--brand); color: var(--white); }

.gallery { columns: 2; column-gap: 12px; }
@media (min-width: 768px) { .gallery { columns: 3; column-gap: 20px; } }

.gallery__item {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  break-inside: avoid;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  animation: fadeIn 0.5s var(--ease);
}
@media (min-width: 768px) { .gallery__item { margin-bottom: 20px; } }
.gallery__item img { width: 100%; transition: transform 0.8s var(--ease), opacity 0.3s; }
.gallery__item:hover img { transform: scale(1.03); opacity: 0.92; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 150;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 16px;
  background: rgba(13, 18, 45, 0.94);
  animation: fadeIn 0.3s var(--ease);
}
.lightbox__figure { display: flex; flex-direction: column; align-items: center; gap: 14px; max-width: 1100px; }
.lightbox__img { max-height: calc(100vh - 160px); width: auto; border-radius: var(--radius-sm); }
.lightbox__caption { color: var(--on-brand-muted); font-size: 14px; text-align: center; }
.lightbox__btn {
  position: absolute;
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  transition: background-color 0.2s;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, 0.2); }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 767px) {
  .lightbox__prev, .lightbox__next { top: auto; bottom: 12px; transform: none; }
  .lightbox__prev { left: calc(50% - 56px); }
  .lightbox__next { right: calc(50% - 56px); }
}

/* =========================================================
   12. ДО / ПОСЛЕ
   ========================================================= */
.ba-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .ba-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }

.ba-card { display: flex; flex-direction: column; gap: 16px; }
.ba-card figcaption { display: flex; flex-direction: column; gap: 2px; }
.ba-card figcaption strong { color: var(--brand); font-size: 17px; }
.ba-card figcaption span { color: var(--muted); font-size: 15px; }

.ba {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  user-select: none;
  touch-action: pan-y;
}
.ba__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba__img--before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba__line {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; margin-left: -1px;
  background: var(--white);
  pointer-events: none;
}
.ba__handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--white); color: var(--brand);
  box-shadow: var(--shadow);
}
.ba__handle .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.ba__tag {
  position: absolute; top: 16px;
  padding: 6px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  pointer-events: none;
}
.ba__tag--before { left: 16px; background: rgba(35, 38, 47, 0.7); color: var(--white); }
.ba__tag--after { right: 16px; background: var(--white); color: var(--brand); }
.ba__range {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  -webkit-appearance: none; appearance: none;
}
.ba__range:focus-visible ~ .ba__line .ba__handle,
.ba:has(.ba__range:focus-visible) .ba__handle { outline: 2px solid var(--brand); outline-offset: 3px; }

/* =========================================================
   13. МАТЕРИАЛЫ
   ========================================================= */
.materials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 768px) { .materials { grid-template-columns: repeat(4, 1fr); gap: 24px; } }
.material { display: flex; flex-direction: column; gap: 12px; }
.material__img { overflow: hidden; aspect-ratio: 1; border-radius: var(--radius); background: var(--soft); }
.material__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.material:hover .material__img img { transform: scale(1.05); }
.material h3 { font-size: 16px; font-weight: 700; color: var(--brand); }
@media (min-width: 768px) { .material h3 { font-size: 18px; } }

/* =========================================================
   14. ДЛЯ КОГО
   ========================================================= */
.audience { display: grid; gap: 16px; }
@media (min-width: 640px) { .audience { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1024px) { .audience { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

.aud-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
  isolation: isolate;
}
.aud-card img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.aud-card::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(17, 27, 78, 0) 40%, rgba(17, 27, 78, 0.85) 100%);
}
.aud-card:hover img { transform: scale(1.04); }
.aud-card__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 4px;
  padding: 24px;
  color: var(--white);
}
.aud-card h3 { font-size: 22px; font-weight: 800; }
.aud-card p { color: var(--on-brand-muted); font-size: 15px; }

/* =========================================================
   15. ДЛЯ ДИЗАЙНЕРОВ
   ========================================================= */
.designers { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .designers { grid-template-columns: 1fr 1fr; gap: 80px; } }
.designers__media img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-lg); }
.designers__content { display: flex; flex-direction: column; gap: 22px; }
.designers__content .check-list { font-size: 17px; margin-block: 6px 10px; }
.designers__content .btn { align-self: flex-start; }

/* =========================================================
   16. ОТЗЫВЫ
   ========================================================= */
.reviews {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 85%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  padding-bottom: 4px;
}
.reviews::-webkit-scrollbar { display: none; }
@media (min-width: 900px) {
  .reviews { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); gap: 24px; overflow: visible; margin-inline: 0; padding-inline: 0; }
}

.review {
  display: flex; flex-direction: column;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--white);
  scroll-snap-align: start;
}
.review__img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.review__body { display: flex; flex-direction: column; gap: 14px; padding: 24px; }
.review__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.review__meta h3 { font-size: 18px; font-weight: 800; color: var(--brand); }
.review__meta span {
  padding: 5px 12px; border-radius: 999px;
  background: var(--soft);
  font-size: 13px; font-weight: 700; color: var(--brand);
  white-space: nowrap;
}
.review p { color: var(--muted); font-size: 15.5px; }

/* =========================================================
   17. FAQ
   ========================================================= */
.faq-layout { display: grid; gap: 8px; }
@media (min-width: 1024px) {
  .faq-layout { grid-template-columns: 0.8fr 1.2fr; gap: 80px; align-items: start; }
  .faq-layout .section-head { position: sticky; top: calc(var(--header-h) + 32px); }
}
.faq-layout .section-head .btn { align-self: flex-start; margin-top: 8px; }

.accordion { border-top: 1px solid var(--line); }
.acc-item { border-bottom: 1px solid var(--line); }
.acc-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%;
  padding: 22px 0;
  text-align: left;
  font-size: 17px; font-weight: 700; line-height: 1.4;
  color: var(--brand);
}
@media (min-width: 768px) { .acc-trigger { font-size: 19px; padding: 26px 0; } }
.acc-trigger .icon {
  width: 36px; height: 36px; padding: 8px;
  border-radius: 50%;
  background: var(--soft);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}
.acc-trigger[aria-expanded="true"] .icon { transform: rotate(45deg); background: var(--brand); color: var(--white); }
.acc-panel { padding: 0 52px 24px 0; color: var(--muted); animation: fadeIn 0.35s var(--ease); }

/* =========================================================
   18. ФИНАЛЬНЫЙ CTA
   ========================================================= */
.final { background: var(--brand); color: var(--white); }
.final__inner { display: grid; gap: 40px; align-items: center; }
@media (min-width: 1024px) { .final__inner { grid-template-columns: 1fr 0.9fr; gap: 80px; } }
.final__content { display: flex; flex-direction: column; gap: 22px; }
.final__lead { font-size: 18px; color: var(--on-brand-muted); max-width: 540px; text-wrap: pretty; }
.final__wa {
  display: inline-flex; align-items: center; gap: 12px; align-self: flex-start;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--on-brand-line);
  font-weight: 600;
  transition: background-color 0.2s;
}
.final__wa:hover { background: rgba(255, 255, 255, 0.08); }

.final__form {
  display: flex; flex-direction: column; gap: 16px;
  padding: 28px 22px;
  border-radius: var(--radius-lg);
  background: var(--white);
  color: var(--graphite);
}
@media (min-width: 768px) { .final__form { padding: 40px; } }
.form-policy { font-size: 12.5px; color: var(--muted); text-align: center; line-height: 1.5; }

/* =========================================================
   19. КОНТАКТЫ
   ========================================================= */
.contacts { display: grid; gap: 40px; }
@media (min-width: 900px) { .contacts { grid-template-columns: 0.9fr 1.1fr; gap: 64px; align-items: stretch; } }
.contacts__info { display: flex; flex-direction: column; gap: 14px; }
.contacts__list { display: flex; flex-direction: column; margin-top: 24px; border-top: 1px solid var(--line); }
.contact-row {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.contact-row > .icon {
  width: 44px; height: 44px; padding: 11px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--brand);
}
.contact-row__label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.contact-row p { font-size: 17px; font-weight: 600; color: var(--brand); line-height: 1.5; }
.contact-row a:hover { text-decoration: underline; text-underline-offset: 3px; }

.map {
  position: relative;
  min-height: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  padding: 24px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--soft);
}
.map__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
}
.map__pin {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--brand); color: var(--white);
  box-shadow: 0 0 0 12px rgba(17, 27, 78, 0.1), var(--shadow);
}
.map__note { position: relative; max-width: 300px; text-align: center; color: var(--muted); font-size: 14px; }

/* =========================================================
   20. FOOTER
   ========================================================= */
.footer { background: var(--graphite); color: var(--white); padding-block: 56px 24px; }
.footer__inner { display: grid; gap: 36px; }
@media (min-width: 900px) { .footer__inner { grid-template-columns: 1.2fr 1.4fr 1fr; gap: 48px; } }
.footer__brand { display: flex; flex-direction: column; gap: 16px; }
.footer__brand p { color: var(--on-brand-muted); max-width: 300px; }
.footer__nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 24px; }
.footer__nav a { color: var(--on-brand-muted); transition: color 0.2s; }
.footer__nav a:hover { color: var(--white); }
.footer__contacts { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer__phone { font-size: 20px; font-weight: 800; }
.footer__wa { display: inline-flex; align-items: center; gap: 10px; color: var(--on-brand-muted); }
.footer__wa:hover { color: var(--white); }
.footer__bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--on-brand-line); color: var(--on-brand-muted); font-size: 14px; }

/* WhatsApp-иконка — заливка, а не обводка */
use[href="#i-whatsapp"] { stroke: none; }

/* =========================================================
   Мобильная нижняя панель
   ========================================================= */
.mobile-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1.6fr 1fr;
  gap: 8px;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: var(--white);
  border-top: 1px solid var(--line);
  box-sizing: content-box;
  height: calc(var(--mobile-bar-h) - 16px);
}
.mobile-bar__item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 700;
  color: var(--brand);
}
.mobile-bar__item .icon { width: 20px; height: 20px; }
.mobile-bar__item--main { background: var(--brand); color: var(--white); font-size: 15px; border-radius: 999px; }
@media (min-width: 1024px) { .mobile-bar { display: none; } }

/* =========================================================
   Модальное окно
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 120;
  display: flex; align-items: flex-end; justify-content: center;
}
@media (min-width: 640px) { .modal { align-items: center; padding: 24px; } }
.modal__overlay { position: absolute; inset: 0; background: rgba(17, 27, 78, 0.5); animation: fadeIn 0.3s var(--ease); }
.modal__dialog {
  position: relative;
  width: 100%; max-width: 480px;
  max-height: 100%;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 12px;
  padding: 32px 22px calc(24px + env(safe-area-inset-bottom));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: var(--white);
  animation: slideUp 0.4s var(--ease);
}
@media (min-width: 640px) { .modal__dialog { padding: 40px; border-radius: var(--radius-lg); } }
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal__close { position: absolute; top: 14px; right: 14px; }
.modal__title { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; color: var(--brand); line-height: 1.2; padding-right: 40px; }
.modal__text { color: var(--muted); font-size: 15px; }
.modal__form { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }

/* =========================================================
   Уведомление
   ========================================================= */
.toast {
  position: fixed;
  left: 16px; right: 16px;
  bottom: calc(var(--mobile-bar-h) + 16px + env(safe-area-inset-bottom));
  z-index: 160;
  display: flex; align-items: center; gap: 14px;
  max-width: 440px;
  margin-inline: auto;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--brand);
  color: var(--white);
  box-shadow: var(--shadow);
  font-size: 15px; line-height: 1.45;
  animation: slideUp 0.4s var(--ease);
}
@media (min-width: 1024px) { .toast { left: auto; right: 32px; bottom: 32px; } }
.toast__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
}
.toast__icon .icon { stroke-width: 2.4; }

/* =========================================================
   Анимация появления
   ========================================================= */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
