@charset "UTF-8";

/* ==========================================================================
   Горизонт — Архитектурная палитра, типографика, параллакс, слайдер, калькулятор, модалки
   Шрифты Golos Text, Manrope и JetBrains Mono подключаются через Google Fonts в base.html
   ========================================================================== */

:root {
  --font-display: "Manrope", system-ui, -apple-system, sans-serif;
  --font-sans: "Golos Text", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Скандинавский премиум: известняк + угольно-оливковый + хвойно-изумрудный */
  --canvas: #f6f5f2;
  --surface: #ffffff;
  --surface-muted: #eceae4;
  --ink: #1a1f1c;
  --surface-dark: #1a1f1c;
  --ink-muted: #5a625e;
  --border: #e3e1da;
  --border-strong: #cbc8be;
  --accent: #1f6f54;
  --accent-text: #1f6f54;
  --accent-cta: #1f6f54;
  --accent-cta-hover: #175842;
  --accent-bright: #5ec2a0;
  --accent-soft: rgba(31, 111, 84, 0.08);
  --accent-border: rgba(31, 111, 84, 0.28);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --container: 1280px;
}

/* Регистрация целочисленных CSS-переменных для расчётов калькулятора без JS */
@property --calc-canvas {
  syntax: "<integer>";
  inherits: true;
  initial-value: 20400;
}

@property --calc-profile {
  syntax: "<integer>";
  inherits: true;
  initial-value: 23000;
}

@property --calc-lighting {
  syntax: "<integer>";
  inherits: true;
  initial-value: 9960;
}

@property --calc-curtain {
  syntax: "<integer>";
  inherits: true;
  initial-value: 9400;
}

@property --calc-total {
  syntax: "<integer>";
  inherits: true;
  initial-value: 62760;
}

@property --calc-area-val {
  syntax: "<integer>";
  inherits: true;
  initial-value: 24;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.55;
}

::selection {
  background: rgba(31, 111, 84, 0.18);
  color: var(--ink);
}

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

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

button,
input,
select,
textarea {
  font-family: inherit;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  margin: 0;
}

p {
  margin: 0;
}

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

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 640px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }
}

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

/* Фокус-кольца для клавиатурной доступности */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
label:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Общие заголовки секций */
.section-kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-text);
  margin-bottom: 8px;
}

.section-title {
  font-size: clamp(1.25rem, calc(0.85rem + 1.8vw), 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  color: var(--ink);
  text-wrap: balance;
}

.section-lead {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 62ch;
}

/* ==========================================================================
   1. HEADER (Фиксированная полупрозрачная шапка + мобильное меню без JS)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

@media (min-width: 1024px) {
  .header-inner {
    height: 72px;
    gap: 32px;
  }
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--ink);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  white-space: nowrap;
}

.brand-descriptor {
  display: none;
  font-size: 11px;
  color: var(--ink-muted);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .brand-descriptor {
    display: block;
  }
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 28px;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  position: relative;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-muted);
  padding: 4px 0;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.15s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1.5px;
  background: var(--accent);
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link:hover::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .header-actions {
    gap: 12px;
  }
}

.messenger-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  cursor: pointer;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn--wa:hover {
  border-color: #25d366;
  color: #128c7e;
}

.icon-btn--tg:hover {
  border-color: #229ed9;
  color: #1b84b8;
}

.header-phone {
  display: none;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--surface-dark);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}

.header-phone svg {
  width: 15px;
  height: 15px;
  color: var(--accent-bright);
  flex-shrink: 0;
}

.header-phone:hover {
  background: #28302b;
}

@media (min-width: 640px) {
  .header-phone {
    display: inline-flex;
  }
}

.mobile-menu-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}

.mobile-menu-btn .icon-close {
  display: none;
}

@media (min-width: 1024px) {
  .mobile-menu-btn {
    display: none;
  }
}

.mobile-drawer {
  display: none;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 16px 20px;
  box-shadow: 0 14px 32px rgba(26, 31, 28, 0.1);
}

#mobile-nav-toggle:checked ~ .site-header .mobile-drawer {
  display: block;
}

#mobile-nav-toggle:checked ~ .site-header .mobile-menu-btn .icon-open {
  display: none;
}

#mobile-nav-toggle:checked ~ .site-header .mobile-menu-btn .icon-close {
  display: block;
}

@media (min-width: 1024px) {
  #mobile-nav-toggle:checked ~ .site-header .mobile-drawer {
    display: none;
  }
}

.mobile-drawer-meta {
  font-size: 12px;
  color: var(--ink-muted);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  padding: 6px 0;
}

.mobile-nav-link {
  padding: 12px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  border-bottom: 1px solid var(--surface-muted);
}

.mobile-nav-link:last-child {
  border-bottom: none;
}

.mobile-phone-cta {
  margin-top: 12px;
  width: 100%;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-dark);
  color: #ffffff;
  font-size: 15px;
  font-weight: 500;
}

/* ==========================================================================
   2. HERO (100vh + CSS Scroll-Driven Parallax + CTA «Звоните»)
   ========================================================================== */

.hero-section {
  position: relative;
  min-height: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--canvas);
  padding: 28px 0 0;
}

@media (min-width: 1021px) {
  .hero-section {
    padding: 40px 0 0;
  }
}

.hero-bg-media {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg-img {
  position: absolute;
  inset: -14% 0;
  width: 100%;
  height: 128%;
  object-fit: cover;
  object-position: center 35%;
  transform: translate3d(0, 0, 0) scale(1.12);
  will-change: transform;
  filter: saturate(0.84) contrast(0.98);
}

/* Многослойная вуаль для 100% читаемости текста слева и открытого фона за мастером справа */
.hero-bg-scrim {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      100deg,
      rgba(246, 245, 242, 0.96) 0%,
      rgba(246, 245, 242, 0.91) 50%,
      rgba(246, 245, 242, 0.72) 76%,
      rgba(246, 245, 242, 0.56) 100%
    ),
    linear-gradient(
      to bottom,
      rgba(246, 245, 242, 0.34) 0%,
      rgba(246, 245, 242, 0.08) 45%,
      rgba(246, 245, 242, 0.78) 100%
    );
}

.hero-bg-grid {
  pointer-events: none;
  position: absolute;
  inset: -40px 0;
  z-index: 1;
  opacity: 0.36;
  will-change: transform;
  background-image:
    linear-gradient(to right, rgba(26, 31, 28, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 31, 28, 0.045) 1px, transparent 1px);
  background-size: 72px 72px;
}

.hero-bg-glow {
  pointer-events: none;
  position: absolute;
  top: -120px;
  right: 6%;
  z-index: 1;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(31, 111, 84, 0.12) 0%,
    rgba(31, 111, 84, 0.04) 46%,
    transparent 72%
  );
}

.hero-grid {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 48px;
  align-items: stretch;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 0;
}

.hero-region {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(2.55rem, 4.1vw, 3.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.07;
  color: var(--ink);
  max-width: 19ch;
  text-wrap: balance;
}

.hero-subtitle {
  margin-top: 24px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-muted);
  max-width: 58ch;
}

@media (min-width: 640px) {
  .hero-subtitle {
    font-size: 17px;
  }
}

.hero-benefits {
  --benefits-fade-x: 24px;
  --benefits-fade-y: 14px;
  position: relative;
  z-index: 0;
  margin: 24px 0 0;
  padding: 16px 24px 16px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  max-width: fit-content;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  list-style: none;
}

.hero-benefits::before {
  content: "";
  position: absolute;
  inset: 0 0 0 calc(-1 * var(--benefits-fade-x));
  z-index: -1;
  background: var(--canvas);
  border-radius: inherit;
  pointer-events: none;
  -webkit-mask-image:
    linear-gradient(
      90deg,
      transparent 0,
      #000 var(--benefits-fade-x),
      #000 calc(100% - var(--benefits-fade-x)),
      transparent 100%
    ),
    linear-gradient(
      180deg,
      transparent 0,
      #000 var(--benefits-fade-y),
      #000 calc(100% - var(--benefits-fade-y)),
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(
      90deg,
      transparent 0,
      #000 var(--benefits-fade-x),
      #000 calc(100% - var(--benefits-fade-x)),
      transparent 100%
    ),
    linear-gradient(
      180deg,
      transparent 0,
      #000 var(--benefits-fade-y),
      #000 calc(100% - var(--benefits-fade-y)),
      transparent 100%
    );
  mask-composite: intersect;
}

.hero-benefits li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hero-benefits svg {
  width: 24px;
  height: 24px;
  padding: 4px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent-text);
  flex-shrink: 0;
}

.hero-cta-row {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  height: auto;
  max-width: 100%;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--accent-cta);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(31, 111, 84, 0.24);
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
  background: var(--accent-cta-hover);
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary svg {
  width: 16px;
  height: 16px;
  color: #ffffff;
  flex-shrink: 0;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  height: auto;
  max-width: 100%;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.btn-secondary svg {
  flex-shrink: 0;
}

.btn-secondary:hover {
  border-color: var(--ink);
  background: var(--surface-muted);
}

/* Умное переключение CTA «Звоните»: tel: на мобильных, модалка на десктопе */
.cta-call-desktop {
  display: none;
}

.cta-call-mobile {
  display: inline-flex;
}

@media (min-width: 768px) {
  .cta-call-desktop {
    display: inline-flex;
  }

  .cta-call-mobile {
    display: none;
  }
}

.hero-metrics {
  margin-top: 44px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 560px;
}

.metric-value {
  font-size: clamp(1.35rem, 2.2vw, 1.65rem);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.metric-label {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.hero-portrait-card {
  position: relative;
  width: 100%;
  min-height: 430px;
  padding-bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  border: none;
  box-shadow: none;
}

.hero-portrait-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 450px;
  object-fit: contain;
  object-position: bottom center;
  transform-origin: bottom center;
  background: transparent;
  filter: drop-shadow(0 18px 28px rgba(26, 31, 28, 0.2));
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 70%,
    rgba(0, 0, 0, 0.55) 84%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 70%,
    rgba(0, 0, 0, 0.55) 84%,
    transparent 100%
  );
}

.hero-portrait-caption {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(320px, calc(100% - 24px));
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: rgba(20, 25, 22, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(26, 31, 28, 0.22);
  color: #ffffff;
  text-align: center;
}

.hero-portrait-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.hero-portrait-role {
  margin-top: 3px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

/* Изумрудная линия внутри нижней зоны баннера с глубоким рассеиванием от краёв к центру */
.hero-accent-line {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 3px;
  margin: 28px 0;
  background: linear-gradient(
    90deg,
    rgba(31, 111, 84, 0) 0%,
    rgba(31, 111, 84, 0) 10%,
    rgba(31, 111, 84, 0.25) 28%,
    rgba(31, 111, 84, 0.72) 42%,
    var(--accent-cta) 50%,
    rgba(31, 111, 84, 0.72) 58%,
    rgba(31, 111, 84, 0.25) 72%,
    rgba(31, 111, 84, 0) 90%,
    rgba(31, 111, 84, 0) 100%
  );
}

/* ==========================================================================
   2A. АДАПТАЦИЯ БАННЕРА 1020px → 320px:
       текст всегда слева, полное фото мастера справа вровень с текстом
   ========================================================================== */

@media (max-width: 1020px) {
  .hero-section {
    min-height: auto;
    padding: 30px 0 0;
  }

  .hero-accent-line {
    margin: 22px 0;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.92fr);
    gap: 20px;
    align-items: stretch;
  }

  .hero-content {
    padding: 0;
  }

  .hero-region {
    font-size: 12.5px;
    margin-bottom: 12px;
  }

  .hero-title {
    font-size: clamp(2.15rem, 4.1vw, 2.65rem);
    line-height: 1.08;
    max-width: 18ch;
  }

  .hero-subtitle {
    margin-top: 14px;
    font-size: 14.5px;
    line-height: 1.5;
  }

  .hero-benefits {
    --benefits-fade-x: 16px;
    --benefits-fade-y: 10px;
    margin-top: 16px;
    padding: 11px 16px 11px 0;
    gap: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
  }

  .hero-cta-row {
    margin-top: 20px;
    gap: 10px;
  }

  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-secondary {
    min-height: 44px;
    padding: 10px 16px;
    font-size: 14px;
  }

  .hero-metrics {
    margin-top: 24px;
    padding-top: 16px;
    gap: 14px;
  }

  .hero-metrics .metric-value {
    font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  }

  .hero-metrics .metric-label {
    font-size: 12px;
    line-height: 1.35;
  }

  .hero-portrait-card {
    min-height: 0;
    height: auto;
    padding-bottom: 0;
    align-self: stretch;
    align-items: flex-end;
    overflow: visible;
  }

  .hero-portrait-img {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: none;
    object-fit: contain;
    object-position: bottom center;
    transform-origin: bottom center;
  }

  .hero-portrait-caption {
    z-index: 2;
    bottom: 0;
    width: min(260px, calc(100% - 12px));
    padding: 9px 12px;
  }

  .hero-portrait-name {
    font-size: 14px;
  }

  .hero-portrait-role {
    font-size: 11.5px;
  }
}

@media (max-width: 770px) {
  .hero-section {
    padding: clamp(28px, calc(12.36px + 4.89vw), 50px) 0 0;
  }

  .hero-accent-line {
    margin: clamp(16px, calc(8.89px + 2.22vw), 26px) 0;
  }
}

@media (max-width: 767px) {
  .hero-section {
    min-height: auto;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    gap: 12px 12px;
    align-items: stretch;
  }

  .hero-content {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    align-self: center;
  }

  .hero-portrait-card {
    grid-column: 2;
    grid-row: 1;
    align-self: stretch;
    min-height: 0;
    height: auto;
  }

  .hero-portrait-img {
    bottom: 0;
    height: 100%;
  }

  .hero-metrics {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 4px;
    padding-top: 12px;
    max-width: 100%;
    gap: 12px;
  }

  .hero-region {
    font-size: 11.5px;
    line-height: 1.3;
    margin-bottom: 8px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 4.7vw, 2.15rem);
    max-width: none;
  }

  .hero-subtitle {
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.42;
  }

  .hero-benefits {
    --benefits-fade-x: 14px;
    --benefits-fade-y: 10px;
    margin-top: 14px;
    padding: 10px 14px 10px 0;
    width: 100%;
    max-width: 100%;
    gap: 6px 12px;
    font-size: 12px;
    font-weight: 600;
  }

  .hero-benefits svg {
    width: 20px;
    height: 20px;
    padding: 3px;
    border-radius: 5px;
  }

  .hero-cta-row {
    margin-top: 14px;
    gap: 8px;
  }

  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-secondary {
    min-height: 40px;
    padding: 8px 13px;
    font-size: 13px;
    gap: 7px;
  }

  .hero-portrait-caption {
    bottom: 0;
    width: min(210px, calc(100% - 8px));
    padding: 7px 9px;
  }

  .hero-portrait-name {
    font-size: 12.5px;
  }

  .hero-portrait-role {
    font-size: 10.5px;
  }
}

@media (max-width: 519px) {
  .hero-section .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.32fr) minmax(0, 0.88fr);
    gap: 10px 6px;
    align-items: stretch;
  }

  .hero-region {
    font-size: 10.5px;
    line-height: 1.25;
    margin-bottom: 6px;
  }

  .hero-title {
    font-size: clamp(1.5rem, calc(1.1rem + 2.2vw), 1.8rem);
    line-height: 1.08;
  }

  .hero-subtitle {
    margin-top: 7px;
    font-size: clamp(11px, 2.9vw, 12.5px);
    line-height: 1.35;
  }

  .hero-benefits {
    --benefits-fade-x: 12px;
    --benefits-fade-y: 10px;
    margin-top: 12px;
    padding: 10px 12px 10px 0;
    flex-direction: column;
    gap: 6px;
    font-size: clamp(10.5px, 2.85vw, 12px);
    font-weight: 600;
    line-height: 1.25;
  }

  .hero-benefits li {
    align-items: flex-start;
    gap: 6px;
  }

  .hero-benefits svg {
    width: 18px;
    height: 18px;
    padding: 3px;
    border-radius: 5px;
    margin-top: 0;
  }

  .hero-cta-row {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 6px;
  }

  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-secondary {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    font-size: clamp(11.5px, 3vw, 13px);
    gap: 6px;
  }

  .hero-cta-row .btn-primary svg,
  .hero-cta-row .btn-secondary svg {
    width: 14px;
    height: 14px;
  }

  .hero-portrait-card {
    width: calc(100% + 6px);
    margin-right: -6px;
  }

  .hero-portrait-img {
    bottom: 0;
    height: 100%;
  }

  .hero-portrait-caption {
    bottom: 0;
    width: calc(100% - 6px);
    max-width: 170px;
    padding: 5px 6px;
    border-radius: 8px;
  }

  .hero-portrait-name {
    font-size: clamp(10.5px, 2.9vw, 12.5px);
    line-height: 1.15;
  }

  .hero-portrait-role {
    margin-top: 2px;
    font-size: clamp(9px, 2.3vw, 10.5px);
    line-height: 1.15;
  }

  .hero-metrics {
    margin-top: 2px;
    padding-top: 10px;
    gap: 8px;
  }

  .hero-metrics .metric-value {
    font-size: clamp(1rem, 4.2vw, 1.25rem);
  }

  .hero-metrics .metric-label {
    margin-top: 3px;
    font-size: clamp(10px, 2.6vw, 11.5px);
    line-height: 1.25;
  }
}

/* На узких экранах (440px → 320px) выносим H1 во всю ширину сверху:
   крупный заголовок в 2 строки сохраняет чёткую иерархию H1 > H2 > H3
   и ни одна буква не перекрывается фото мастера */
@media (max-width: 440px) {
  .hero-grid {
    gap: 10px 6px;
  }

  .hero-content {
    display: contents;
  }

  .hero-title {
    grid-column: 1 / -1;
    grid-row: 1;
    max-width: none;
    font-size: clamp(1.625rem, calc(1.05rem + 2.8vw), 1.85rem);
    line-height: 1.08;
  }

  .hero-body {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    align-self: center;
  }

  .hero-subtitle {
    margin-top: 0;
  }

  .hero-portrait-card {
    grid-column: 2;
    grid-row: 2;
    align-self: stretch;
  }
}

/* ==========================================================================
   3. ПОРТФОЛИО «ВЫПОЛНЕННЫЕ ПРОЕКТЫ» (Чистый CSS-слайдер + Lightbox)
   ========================================================================== */

.section-white {
  padding: 48px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.section-canvas {
  padding: 48px 0;
  background: var(--canvas);
  border-bottom: 1px solid var(--border);
}

#ceiling-types.section-canvas {
  padding-top: 32px;
}

@media (min-width: 640px) {
  .section-white,
  .section-canvas {
    padding: 68px 0;
  }

  #ceiling-types.section-canvas {
    padding-top: 48px;
  }
}

@media (min-width: 1024px) {
  .section-white,
  .section-canvas {
    padding: 112px 0;
  }

  #ceiling-types.section-canvas {
    padding-top: 56px;
  }
}

.section-header-split {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

@media (min-width: 768px) {
  .section-header-split {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 48px;
  }
}

.carousel-shell {
  --slide-gap: 16px;
  position: relative;
}

@media (min-width: 768px) {
  .carousel-shell {
    --slide-gap: 24px;
  }
}

@media (min-width: 1024px) {
  .carousel-shell {
    --slide-gap: 28px;
  }
}

.carousel-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.carousel-counter {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.carousel-swipe-hint {
  font-size: 12.5px;
  color: var(--ink-muted);
}

.carousel-stage {
  position: relative;
}

.slider-arrow {
  position: absolute;
  top: var(--slider-arrow-top, 34%);
  transform: translateY(-50%);
  z-index: 5;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--ink);
  box-shadow: 0 8px 24px rgba(26, 31, 28, 0.14);
  cursor: pointer;
  user-select: none;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.15s ease;
}

.slider-arrow svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.slider-arrow--prev {
  left: 10px;
}

.slider-arrow--next {
  right: 10px;
}

@media (min-width: 768px) {
  .slider-arrow {
    width: 48px;
    height: 48px;
  }

  .slider-arrow svg {
    width: 22px;
    height: 22px;
  }

  .slider-arrow--prev {
    left: 14px;
  }

  .slider-arrow--next {
    right: 14px;
  }
}

@media (min-width: 1360px) {
  .slider-arrow--prev {
    left: -24px;
  }

  .slider-arrow--next {
    right: -24px;
  }
}

.slider-arrow:hover {
  background: var(--accent-cta);
  border-color: var(--accent-cta);
  color: #ffffff;
  box-shadow: 0 10px 26px rgba(31, 111, 84, 0.28);
}

.slider-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.carousel-viewport {
  overflow: hidden;
  border-radius: var(--radius-md);
  touch-action: pan-y;
}

.carousel-track {
  display: flex;
  gap: var(--slide-gap);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.project-slide {
  flex: 0 0 100%;
  width: 100%;
  min-width: 0;
}

@media (min-width: 768px) {
  .project-slide {
    flex: 0 0 calc((100% - var(--slide-gap)) / 2);
    width: calc((100% - var(--slide-gap)) / 2);
  }
}

.project-media-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-dark);
  border: 1px solid var(--border);
}

.project-media-link {
  display: block;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.project-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-media-wrap:hover .project-media-img {
  transform: scale(1.03);
}

.lightbox-trigger-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  background: rgba(26, 31, 28, 0.8);
  color: #ffffff;
  font-size: 12px;
  font-weight: 500;
  backdrop-filter: blur(6px);
  transition: background-color 0.15s ease;
}

.lightbox-trigger-btn:hover {
  background: var(--ink);
}

.project-info {
  padding-top: 16px;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-size: 12.5px;
  color: var(--ink-muted);
}

.project-meta-strong {
  color: var(--ink);
  font-weight: 600;
}

.project-meta-accent {
  color: var(--accent-text);
  font-weight: 500;
}

.project-heading-row {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 1024px) {
  .project-heading-row {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
  }
}

.project-title {
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--ink);
}

@media (min-width: 768px) {
  .project-title {
    font-size: 18px;
  }
}

.project-location {
  font-size: 12.5px;
  color: var(--ink-muted);
  white-space: nowrap;
}

.project-desc {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.carousel-pagination {
  margin-top: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.carousel-dot {
  width: 28px;
  height: 4px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: var(--border-strong);
  cursor: pointer;
  transition: width 0.2s ease, background-color 0.2s ease;
}

.carousel-dot:hover {
  background: var(--ink-muted);
}

.carousel-dot.is-active {
  width: 48px;
  background: var(--accent);
}

/* Полноэкранный Lightbox на чистом CSS (:target) */
.lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  background: rgba(11, 15, 20, 0.96);
  backdrop-filter: blur(6px);
  color: #ffffff;
}

.lightbox-modal:target,
.lightbox-modal.is-open {
  display: flex;
}

.lightbox-modal[hidden] {
  display: none;
}

.lightbox-backdrop-close {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.lightbox-top,
.lightbox-stage,
.lightbox-bottom {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.lightbox-icon-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  transition: background-color 0.15s ease;
}

.lightbox-icon-btn:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-stage {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 0;
  margin: 16px auto;
}

.lightbox-img {
  max-height: 70vh;
  max-width: calc(100% - 110px);
  margin: 0 auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

@media (max-width: 639px) {
  .lightbox-img {
    max-width: 100%;
  }

  .lightbox-stage .lightbox-icon-btn {
    display: none;
  }
}

.lightbox-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 16px;
}

.lightbox-bottom h4 {
  font-size: 18px;
  font-weight: 600;
}

.lightbox-bottom p {
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

/* ==========================================================================
   4. КАЛЬКУЛЯТОР СТОИМОСТИ (JS-расчёт по кнопке «Рассчитать»)
   ========================================================================== */

.calc-root {
  overflow-x: clip;
}

/* Живая закреплённая строка с актуальной ценой калькулятора для мобильных и планшетов */
.calc-mobile-livebar {
  position: sticky;
  top: 72px;
  z-index: 25;
  margin-bottom: 16px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: rgba(26, 31, 28, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 28px rgba(26, 31, 28, 0.18);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.calc-mobile-livebar-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calc-mobile-livebar-label {
  font-size: 11.5px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.78);
}

.calc-mobile-livebar-price {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.35rem);
  font-weight: 700;
  line-height: 1.1;
  color: #ffffff;
}

.calc-mobile-livebar-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
  min-height: 40px;
  padding: 8px 14px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-cta);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.calc-mobile-livebar-btn:hover {
  background: var(--accent-cta-hover);
}

@media (min-width: 1024px) {
  .calc-mobile-livebar {
    display: none;
  }
}

.calc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .calc-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: 32px;
  }
}

.calc-controls-card {
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

@media (min-width: 640px) {
  .calc-controls-card {
    padding: 32px;
  }
}

.calc-selects-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

.calc-selects-grid > div {
  min-width: 0;
}

@media (min-width: 640px) {
  .calc-selects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }
}

.field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.field-hint {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.select-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}

.field-select,
.field-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.field-select {
  appearance: none;
  padding-right: 38px;
  text-overflow: ellipsis;
  cursor: pointer;
}

.field-select:hover,
.field-input:hover {
  border-color: #8f9691;
}

.field-select:focus,
.field-input:focus {
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 84, 0.16);
}

/* Предотвращаем принудительный автозум Safari на iOS в полях ввода (< 16px) */
@media (max-width: 767px) {
  .field-select,
  .field-input,
  .geo-popup-input,
  .css-modal input,
  .css-modal select,
  .css-modal textarea {
    font-size: 16px;
  }
}

.select-chevron {
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--ink-muted);
}

/* Шкала площади на чистом CSS */
.area-block {
  min-width: 0;
  max-width: 100%;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.area-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.area-readout {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--canvas);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

/* Горизонтальный скролл (ползунок) выбора площади помещения */
.area-slider-wrap {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.area-range-input {
  --range-progress: 15.56%;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    to right,
    var(--accent) 0%,
    var(--accent) var(--range-progress),
    var(--surface-muted) var(--range-progress),
    var(--surface-muted) 100%
  );
  border: 1px solid var(--border);
  cursor: pointer;
  outline: none;
}

.area-range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--accent);
  box-shadow: 0 4px 12px rgba(26, 31, 28, 0.18);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.area-range-input::-webkit-slider-thumb:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 16px rgba(31, 111, 84, 0.28);
}

.area-range-input::-webkit-slider-thumb:active {
  cursor: grabbing;
}

.area-range-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface);
  border: 2.5px solid var(--accent);
  box-shadow: 0 4px 12px rgba(26, 31, 28, 0.18);
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.area-scale {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.area-scale-btn {
  flex: 1 0 auto;
  min-width: 58px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--canvas);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.area-scale-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.area-scale-btn.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #ffffff;
}

.calc-scoreboard-col {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Табло результата калькулятора (угольно-оливковый + хвойный акцент) */
.calc-scoreboard {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  background:
    radial-gradient(circle at 92% 0%, rgba(31, 111, 84, 0.28) 0%, transparent 50%),
    var(--surface-dark);
  color: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(94, 194, 160, 0.34),
    0 20px 48px rgba(26, 31, 28, 0.15);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 640px) {
  .calc-scoreboard {
    padding: 32px;
  }
}

.scoreboard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.88);
}

.scoreboard-total-block {
  padding: 26px 0;
}

.scoreboard-total-label {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 8px;
}

.scoreboard-total-value {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.15rem, 3.6vw, 2.8rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #ffffff;
}

.scoreboard-status {
  margin-top: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
}

.scoreboard-breakdown {
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
}

.breakdown-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.breakdown-row dt {
  color: rgba(255, 255, 255, 0.82);
}

.breakdown-row dd {
  margin: 0;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  white-space: nowrap;
}

.scoreboard-actions {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scoreboard-btn-calc {
  width: 100%;
  background: var(--accent-cta);
  color: #ffffff;
  box-shadow: none;
}

.scoreboard-btn-calc:hover {
  background: var(--accent-cta-hover);
}

.scoreboard-btn-outline {
  width: 100%;
  min-height: 44px;
  height: auto;
  padding: 10px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.scoreboard-btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.55);
  color: #ffffff;
}

.scoreboard-disclaimer {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.76);
}

/* Подсветка табло при нажатии «Рассчитать» */
.calc-scoreboard.is-updated {
  box-shadow: 0 0 0 2px var(--accent-bright), 0 20px 50px rgba(26, 31, 28, 0.26);
}

@media (max-width: 479px) {
  .calc-root {
    padding: 56px 0;
  }

  .calc-root > .container > div:first-child {
    margin-bottom: 24px !important;
  }

  .calc-root .section-title {
    line-height: 1.16;
  }

  .calc-root .section-lead {
    font-size: 14px;
  }

  .calc-grid {
    gap: 20px;
  }

  .calc-controls-card {
    padding: 18px 16px;
    gap: 18px;
  }

  .calc-selects-grid {
    gap: 16px;
  }

  .calc-root .field-select {
    height: 44px;
    padding: 0 32px 0 12px;
    font-size: 13.5px;
  }

  .calc-root .area-block {
    padding-top: 18px;
  }

  .calc-root .area-header {
    gap: 10px;
  }

  .calc-root .area-header > div:first-child {
    min-width: 0;
    flex: 1 1 170px;
  }

  .calc-root .area-readout {
    padding: 4px 10px;
    font-size: 16px;
  }

  .calc-root .area-scale {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    overflow-x: visible;
  }

  .calc-root .area-scale-btn {
    min-width: 0;
    height: 34px;
    padding: 0 6px;
    font-size: 12px;
  }

  .calc-scoreboard {
    padding: 18px 16px;
  }

  .calc-root .scoreboard-top {
    padding-bottom: 14px;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 13px;
  }

  .calc-root .scoreboard-area-badge {
    flex-shrink: 0;
    white-space: nowrap;
  }

  .calc-root .scoreboard-total-block {
    padding: 18px 0;
  }

  .calc-root .scoreboard-total-value {
    font-size: clamp(1.7rem, 7.5vw, 2.15rem);
  }

  .calc-root .scoreboard-breakdown {
    padding-top: 16px;
    gap: 8px;
    font-size: 13px;
  }

  .calc-root .breakdown-row {
    gap: 8px;
  }

  .calc-root .breakdown-row dt {
    min-width: 0;
  }

  .calc-root .breakdown-row dd {
    flex-shrink: 0;
  }

  .calc-root .scoreboard-actions {
    margin-top: 20px;
    padding-top: 16px;
  }

  .calc-root .scoreboard-btn-calc,
  .calc-root .scoreboard-btn-outline {
    height: auto;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13.5px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

@media (max-width: 359px) {
  .calc-root .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .calc-controls-card,
  .calc-scoreboard {
    padding: 16px 14px;
  }

  .calc-root .field-select {
    font-size: 12.5px;
  }

  .calc-root .area-scale-btn {
    font-size: 11.5px;
  }

  .calc-root .scoreboard-breakdown {
    font-size: 12px;
  }
}

/* ==========================================================================
   5. ИЗ ЧЕГО СКЛАДЫВАЕТСЯ СТОИМОСТЬ (Асимметричная сетка из 5 карточек)
   ========================================================================== */

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .pricing-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 24px;
  }

  .pricing-card--wide {
    grid-column: span 3;
  }

  .pricing-card--third {
    grid-column: span 2;
  }
}

.pricing-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--canvas);
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease;
}

.pricing-card:hover {
  border-color: var(--border-strong);
}

.pricing-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pricing-index {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-muted);
}

.pricing-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-text);
}

.pricing-icon-box svg {
  width: 20px;
  height: 20px;
}

.pricing-card-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.pricing-card-summary {
  margin-top: 10px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.45;
}

.pricing-card-details {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-muted);
}

.pricing-card-foot {
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

/* ==========================================================================
   6. ФОРМА ЗАЯВКИ (Нативная HTML5 валидация + подтверждение на :target)
   ========================================================================== */

.lead-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: start;
}

@media (min-width: 1024px) {
  .lead-grid {
    grid-template-columns: 5fr 7fr;
    gap: 48px;
  }
}

.direct-contacts {
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}

.direct-phone {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 4px;
  transition: color 0.15s ease;
}

.direct-phone:hover {
  color: var(--accent-text);
}

.direct-phone svg {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
}

.direct-messengers {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.messenger-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  height: auto;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  color: var(--ink);
  transition: border-color 0.15s ease;
}

.messenger-link-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.messenger-link-btn--wa svg { color: #128c7e; }
.messenger-link-btn--wa:hover { border-color: #25d366; }

.messenger-link-btn--tg svg { color: #1b84b8; }
.messenger-link-btn--tg:hover { border-color: #229ed9; }

.lead-form-card {
  background: var(--canvas);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.lead-form-card .field-input {
  background: var(--surface);
}

@media (min-width: 640px) {
  .lead-form-card {
    padding: 36px;
  }
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

@media (min-width: 640px) {
  .form-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.field-input:user-invalid,
.field-input.is-invalid {
  border-color: #b91c1c;
  background: #fef2f2;
}

.field-input.is-invalid:focus {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.field-error-hint {
  display: none;
  margin-top: 6px;
  font-size: 12px;
  color: #b91c1c;
}

.field-input:user-invalid + .field-error-hint,
.field-input.is-invalid + .field-error-hint {
  display: block;
}

.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
  cursor: pointer;
}

.consent-label input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.form-submit-row {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 640px) {
  .form-submit-row {
    flex-direction: row;
    align-items: center;
  }
}

.form-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* Сообщение об успешной отправке формы на чистом CSS (:target) */
.form-success-box {
  display: none;
  padding: 20px;
  border-radius: var(--radius-md);
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #064e3b;
  margin-bottom: 24px;
}

.form-success-box:target {
  display: block;
}

.form-success-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
}

.form-success-text {
  margin-top: 6px;
  font-size: 14px;
  color: #065f46;
}

.form-success-close {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #064e3b;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   7. ГЕОГРАФИЯ РАБОТЫ (Список районов + интерактивный iframe OpenStreetMap)
   ========================================================================== */

.geo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
}

@media (min-width: 1024px) {
  .geo-grid {
    grid-template-columns: 4fr 8fr;
  }
}

.geo-list-panel {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  max-height: 540px;
  overflow: hidden;
}

.geo-list-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 600;
}

.geo-list-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.geo-item-link {
  display: block;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.geo-item-link:last-child {
  border-bottom: none;
}

.geo-item-link:hover,
.geo-item-link:focus-visible {
  background: var(--canvas);
}

.geo-item-link.is-active {
  background: var(--accent-soft);
  border-left-color: var(--accent-cta);
}

.geo-item-link.is-active .geo-item-title {
  color: var(--accent-text);
}

.geo-item-custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.geo-item-remove-btn {
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  line-height: 1;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.geo-item-remove-btn:hover {
  background: #fef2f2;
  color: #991b1b;
}

.geo-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.geo-item-link:hover .geo-item-title {
  color: var(--accent-text);
}

.geo-item-title svg {
  width: 15px;
  height: 15px;
  color: var(--accent-text);
  flex-shrink: 0;
}

.geo-item-sub {
  margin-top: 4px;
  padding-left: 23px;
  font-size: 12px;
  color: var(--ink-muted);
}

.geo-map-frame-wrap {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  min-height: 460px;
}

@media (min-width: 1024px) {
  .geo-map-frame-wrap {
    min-height: 540px;
  }
}

.geo-map-toolbar {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.geo-toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.geo-tool-btn {
  min-height: 34px;
  height: auto;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.geo-tool-btn:hover {
  border-color: var(--accent-cta);
  color: var(--accent-text);
}

.geo-tool-btn.is-active {
  background: var(--accent-cta);
  border-color: var(--accent-cta);
  color: #ffffff;
}

.geo-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  height: auto;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.geo-action-btn[hidden] {
  display: none;
}

.geo-action-btn:hover {
  background: var(--canvas);
  color: var(--ink);
}

.geo-action-btn--accent {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-text);
}

.geo-action-btn--accent:hover {
  background: var(--accent-cta);
  border-color: var(--accent-cta);
  color: #ffffff;
}

.geo-action-btn--danger:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.geo-map-hint {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--canvas);
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 14px;
}

.geo-territory-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-text);
}

.geo-map-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 360px;
}

.geo-map-canvas {
  flex: 1;
  width: 100%;
  min-height: 360px;
  background: #e7e5de;
  overscroll-behavior: contain;
}

.geo-touch-guard {
  position: absolute;
  inset: 0;
  z-index: 450;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  border: 0;
  background: linear-gradient(
    to top,
    rgba(26, 31, 28, 0.22) 0%,
    rgba(26, 31, 28, 0.04) 45%,
    transparent 100%
  );
  cursor: pointer;
  touch-action: pan-y;
}

.geo-touch-guard[hidden] {
  display: none;
}

.geo-touch-guard-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(26, 31, 28, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 22px rgba(26, 31, 28, 0.24);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

@media (min-width: 1024px) {
  .geo-map-stage,
  .geo-map-canvas {
    min-height: 430px;
  }
}

@media (max-width: 1023px) {
  .geo-list-panel {
    max-height: 280px;
  }

  .geo-tool-btn,
  .geo-action-btn {
    min-height: 40px;
    padding: 8px 12px;
  }

  .geo-popup-btn {
    min-height: 38px;
  }
}

@media (max-width: 767px) {
  .geo-list-panel {
    max-height: none;
  }

  .geo-list-header {
    padding: 12px 14px;
  }

  .geo-list-scroll {
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
    gap: 8px;
    padding: 10px 12px;
    -webkit-overflow-scrolling: touch;
  }

  .geo-item-link {
    flex: 0 0 auto;
    min-width: 196px;
    max-width: 240px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--canvas);
    scroll-snap-align: start;
  }

  .geo-item-link:last-child {
    border-bottom: 1px solid var(--border);
  }

  .geo-item-sub {
    padding-left: 23px;
    font-size: 11.5px;
    line-height: 1.3;
  }

  .geo-map-frame-wrap {
    min-height: 380px;
  }

  .geo-map-stage,
  .geo-map-canvas {
    min-height: 310px;
  }
}

.geo-map-canvas.is-crosshair,
.geo-map-canvas.is-crosshair .leaflet-grab {
  cursor: crosshair;
}

/* Пользовательские маркеры и узлы контура Leaflet в акцентном цвете кнопок */
.geo-pin-wrapper,
.geo-vertex-wrapper {
  background: transparent;
  border: 0;
}

.geo-pin {
  width: 24px;
  height: 24px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--accent-cta);
  border: 2px solid #ffffff;
  box-shadow: 0 3px 10px rgba(26, 31, 28, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.geo-pin::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  transform: rotate(45deg);
}

.geo-pin--custom {
  background: var(--accent-cta-hover);
  box-shadow: 0 0 0 3px rgba(31, 111, 84, 0.28), 0 4px 12px rgba(26, 31, 28, 0.35);
}

.geo-vertex-handle {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--accent-cta);
  box-shadow: 0 2px 6px rgba(26, 31, 28, 0.3);
  cursor: move;
}

.geo-vertex-handle--first {
  width: 16px;
  height: 16px;
  background: var(--accent-cta);
  border-color: #ffffff;
}

.geo-popup {
  min-width: 200px;
  font-family: var(--font-sans);
  color: var(--ink);
}

.geo-popup-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.geo-popup-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink-muted);
}

.geo-popup-input {
  width: 100%;
  margin-top: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--canvas);
}

.geo-popup-actions {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.geo-popup-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  height: auto;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--accent-cta);
  background: var(--accent-cta);
  color: #ffffff;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
}

.geo-popup-btn--danger {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

/* ==========================================================================
   8. FOOTER
   ========================================================================== */

.site-footer {
  background: var(--surface-dark);
  color: #ffffff;
  border-top: 2px solid var(--accent);
  padding: 56px 0 32px;
}

@media (max-width: 767px) {
  .site-footer {
    padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  }
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

@media (min-width: 1024px) {
  .footer-top {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.footer-brand .brand-icon,
.footer-brand .brand-name {
  color: #ffffff;
}

.footer-brand .brand-descriptor {
  display: block;
  color: rgba(255, 255, 255, 0.78);
}

.footer-contacts {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  height: auto;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  transition: background-color 0.15s ease;
}

.footer-phone-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.footer-phone-btn svg {
  width: 15px;
  height: 15px;
  color: var(--accent-bright);
  flex-shrink: 0;
}

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  height: auto;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13.5px;
  line-height: 1.25;
  text-align: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.footer-social-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-social-btn--wa svg { color: #25d366; }
.footer-social-btn--wa:hover { border-color: #25d366; color: #ffffff; }

.footer-social-btn--tg svg { color: #38bdf8; }
.footer-social-btn--tg:hover { border-color: #38bdf8; color: #ffffff; }

.footer-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 1024px) {
  .footer-right {
    align-items: flex-end;
  }
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.86);
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-hours {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.76);
}

.footer-bottom {
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.76);
}

@media (min-width: 640px) {
  .footer-bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО «ЗВОНИТЕ» ДЛЯ ДЕСКТОПА (Чистый CSS :target)
   ========================================================================== */

.css-modal {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(26, 31, 28, 0.62);
  backdrop-filter: blur(4px);
}

.css-modal:target,
.css-modal.is-open {
  display: flex;
}

.css-modal[hidden] {
  display: none;
}

.css-modal-backdrop {
  position: absolute;
  inset: 0;
}

.css-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(26, 31, 28, 0.25);
  padding: 28px;
}

.css-modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.css-modal-close:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

/* Компактное модальное окно выбора мессенджеров (WhatsApp / Telegram) */
.css-modal-card--compact {
  max-width: 400px;
}

.messenger-modal-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding-right: 32px;
}

.messenger-modal-subtitle {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.messenger-modal-actions {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.messenger-choice-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  height: auto;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--canvas);
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.messenger-choice-btn:hover {
  transform: translateY(-1px);
  background: var(--surface);
}

.messenger-choice-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.messenger-choice-btn--wa svg {
  color: #128c7e;
}

.messenger-choice-btn--wa:hover {
  border-color: #25d366;
}

.messenger-choice-btn--tg svg {
  color: #1b84b8;
}

.messenger-choice-btn--tg:hover {
  border-color: #229ed9;
}

.modal-phone-box {
  margin-top: 18px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: var(--canvas);
  border: 1px solid var(--border);
}

.modal-phone-box .direct-phone {
  margin-top: 0;
  font-size: 19px;
  white-space: nowrap;
}

@media (max-width: 399px) {
  .modal-phone-box {
    padding: 12px;
  }

  .modal-phone-box .direct-phone {
    font-size: clamp(13.5px, 4.1vw, 16px);
  }
}

.modal-messengers {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-form .btn-primary {
  width: 100%;
  min-height: 46px;
  height: auto;
  padding: 11px 18px;
}

.modal-form-status {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 500;
}

.modal-form-status[hidden] {
  display: none;
}

#lead-form-status {
  margin-bottom: 14px;
}

.modal-form-status--success {
  background: rgba(31, 111, 84, 0.1);
  border: 1px solid rgba(31, 111, 84, 0.3);
  color: #14533e;
}

.modal-form-status--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.btn-primary:disabled {
  opacity: 0.72;
  cursor: wait;
}

/* ==========================================================================
   3B. СРАВНЕНИЕ: ТЁМНЫЙ АРХИТЕКТУРНЫЙ РАЗРЫВ (НАПРЯМУЮ VS КРУПНАЯ КОМПАНИЯ)
   ========================================================================== */

.section-comparison-dark {
  position: relative;
  overflow: hidden;
  padding: 88px 0;
  background: var(--surface-dark);
  color: #ffffff;
  border-top: 2px solid var(--accent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (min-width: 1024px) {
  .section-comparison-dark {
    padding: 116px 0;
  }
}

.comparison-bg-grid {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.032) 1px, transparent 1px);
  background-size: 64px 64px;
}

.comparison-bg-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 86% 8%, rgba(31, 111, 84, 0.34) 0%, transparent 46%),
    radial-gradient(circle at 12% 92%, rgba(94, 194, 160, 0.12) 0%, transparent 44%);
}

.comparison-inner {
  position: relative;
  z-index: 2;
}

.comparison-kicker {
  color: var(--accent-bright);
}

.comparison-title {
  color: #ffffff;
}

.comparison-lead {
  margin-top: 0;
  max-width: 44ch;
  color: rgba(255, 255, 255, 0.74);
}

.comparison-table {
  position: relative;
  border-radius: var(--radius-lg);
  border: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow:
    inset 0 18px 32px -16px rgba(255, 255, 255, 0.1),
    inset 0 -18px 28px -14px rgba(0, 0, 0, 0.52),
    0 10px 14px -4px rgba(0, 0, 0, 0.78),
    0 28px 56px -8px rgba(0, 0, 0, 0.7),
    0 12px 24px -6px rgba(31, 111, 84, 0.2);
  overflow: hidden;
}

.comparison-row {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-row:last-child {
  border-bottom: none;
}

@media (min-width: 900px) {
  .comparison-row {
    grid-template-columns: 2.3fr 4.2fr 3.5fr;
  }
}

.comparison-head {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

@media (min-width: 900px) {
  .comparison-head {
    display: grid;
  }
}

.comparison-cell {
  padding: 18px 20px;
  font-size: 14.5px;
  line-height: 1.55;
}

@media (min-width: 900px) {
  .comparison-cell {
    padding: 22px 26px;
  }
}

.comparison-criteria {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.comparison-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .comparison-criteria {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Выделенная белая колонка-лидер «Напрямую с нами» */
.comparison-us {
  background: #ffffff;
  color: var(--ink);
  border-bottom: 1px solid var(--border);
}

.comparison-row:last-child .comparison-us {
  border-bottom: none;
}

.comparison-us strong {
  color: var(--ink);
  font-weight: 700;
}

.comparison-head .comparison-us--head {
  background: var(--accent);
  color: #ffffff;
  border-bottom: none;
}

.comparison-head-us {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.comparison-head .comparison-them--head {
  color: rgba(255, 255, 255, 0.65);
}

@media (min-width: 900px) {
  .comparison-us {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, #ffffff 0%, #f4f2ec 100%);
    box-shadow:
      inset 2px 0 0 var(--accent),
      inset -1px 0 0 rgba(31, 111, 84, 0.24),
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      -12px 0 24px rgba(0, 0, 0, 0.34),
      12px 0 24px rgba(0, 0, 0, 0.34);
  }

  .comparison-head .comparison-us--head {
    background: linear-gradient(180deg, #278867 0%, #195d46 100%);
    box-shadow:
      inset 0 1.5px 0 rgba(255, 255, 255, 0.34),
      inset 0 -3px 0 rgba(0, 0, 0, 0.24),
      -12px 0 24px rgba(0, 0, 0, 0.34),
      12px 0 24px rgba(0, 0, 0, 0.34);
  }
}

/* Приглушённая тёмная колонка конкурентов */
.comparison-them {
  background: rgba(255, 255, 255, 0.02);
  color: rgba(255, 255, 255, 0.68);
}

.comparison-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.comparison-icon {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.comparison-icon svg {
  width: 13px;
  height: 13px;
}

.comparison-icon--ok {
  background: rgba(31, 111, 84, 0.14);
  color: var(--accent);
}

.comparison-icon--no {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.48);
}

@media (max-width: 899px) {
  .comparison-us::before {
    content: "\00041d\000430\00043f\000440\00044f\00043c\000443\00044e \000441 \00043d\000430\00043c\000438 (\0000ab\000413\00043e\000440\000438\000437\00043e\00043d\000442\0000bb)";
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-text);
    margin-bottom: 8px;
  }

  .comparison-them::before {
    content: "\00041a\000440\000443\00043f\00043d\000430\00044f \00043f\00043e\000442\00043e\00043b\00043e\000447\00043d\000430\00044f \00043a\00043e\00043c\00043f\000430\00043d\000438\00044f";
    display: block;
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.56);
    margin-bottom: 8px;
  }
}

/* Нижняя итоговая полоса с выгодой и CTA */
.comparison-summary {
  margin-top: 34px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.095) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow:
    inset 0 16px 28px -14px rgba(94, 194, 160, 0.18),
    inset 0 -16px 24px -12px rgba(0, 0, 0, 0.48),
    0 8px 12px -4px rgba(0, 0, 0, 0.76),
    0 22px 44px -8px rgba(0, 0, 0, 0.64),
    0 8px 20px -4px rgba(31, 111, 84, 0.18);
}

@media (min-width: 900px) {
  .comparison-summary {
    padding: 24px 32px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
  }
}

.comparison-summary-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.8);
}

@media (min-width: 640px) {
  .comparison-summary-text {
    flex-direction: row;
    align-items: center;
    gap: 20px;
  }
}

.comparison-summary-text strong {
  color: #ffffff;
  font-weight: 600;
}

.comparison-saving {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: -0.02em;
  white-space: nowrap;
  flex-shrink: 0;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.5);
}

.comparison-summary-cta {
  flex-shrink: 0;
  min-height: 48px;
  height: auto;
  padding: 11px 24px;
  box-shadow: none;
}

/* ==========================================================================
   3C. ТИПОВЫЕ ГОТОВЫЕ СМЕТЫ ПОД КЛЮЧ + ПРОВЕРКА СМЕТЫ КОНКУРЕНТА
   ========================================================================== */

.estimates-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: stretch;
}

@media (min-width: 768px) and (max-width: 1023px) {
  .estimates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .estimates-grid > .estimate-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .estimates-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.estimate-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--canvas);
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.estimate-card--featured {
  background: var(--surface);
  border-color: var(--accent-border);
  box-shadow: 0 18px 44px rgba(26, 31, 28, 0.07);
}

.estimate-meta {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.estimate-title {
  margin-top: 8px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.estimate-price {
  margin-top: 18px;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
}

.estimate-price-note {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--accent-text);
  font-weight: 500;
}

.estimate-specs {
  list-style: none;
  margin: 20px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.estimate-specs li {
  position: relative;
  padding-left: 16px;
}

.estimate-specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 1.5px;
  background: var(--accent);
}

.estimate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  height: auto;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.estimate-cta:hover {
  border-color: var(--ink);
}

.estimate-cta--primary {
  background: var(--accent-cta);
  border-color: var(--accent-cta);
  color: #ffffff;
}

.estimate-cta--primary:hover {
  background: var(--accent-cta-hover);
  border-color: var(--accent-cta-hover);
}

/* Баннер «Проверка сметы конкурента» */
.audit-banner {
  margin-top: 32px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% 10%, rgba(31, 111, 84, 0.28) 0%, transparent 52%),
    var(--surface-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(94, 194, 160, 0.34);
  color: #ffffff;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: center;
}

@media (min-width: 900px) {
  .audit-banner {
    padding: 36px 40px;
    grid-template-columns: 7fr 5fr;
    gap: 36px;
  }
}

.audit-kicker {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-bright);
  margin-bottom: 8px;
}

.audit-title {
  font-size: clamp(1.3rem, 2.2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #ffffff;
  text-wrap: balance;
}

.audit-desc {
  margin-top: 10px;
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
  max-width: 56ch;
}

.audit-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audit-btn-wa {
  width: 100%;
  min-height: 48px;
  height: auto;
  padding: 11px 18px;
  background: var(--accent-cta);
  color: #ffffff;
  box-shadow: none;
}

.audit-btn-wa:hover {
  background: var(--accent-cta-hover);
}

.audit-btn-tg {
  min-height: 48px;
  height: auto;
  padding: 11px 18px;
}

@media (max-width: 359px) {
  .audit-banner {
    padding: 20px 16px;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .audit-banner-text,
  .audit-banner-actions {
    min-width: 0;
  }

  .audit-kicker {
    font-size: 12px;
  }

  .audit-title {
    font-size: 1.18rem;
    line-height: 1.25;
  }

  .audit-desc {
    font-size: 13.5px;
    line-height: 1.55;
  }

  .audit-btn-wa,
  .audit-btn-tg {
    height: auto;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 13.5px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
  }
}

/* ==========================================================================
   5B. ЧАСТЫЕ ВОПРОСЫ (FAQ на чистом HTML <details> без JavaScript)
   ========================================================================== */

.faq-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}

@media (min-width: 1024px) {
  .faq-layout {
    grid-template-columns: 4.5fr 7.5fr;
    gap: 48px;
  }
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.15s ease;
}

.faq-item[open] {
  border-color: var(--accent-border);
}

.faq-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.faq-summary::-webkit-details-marker {
  display: none;
}

.faq-plus {
  position: relative;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 6px;
  background: var(--canvas);
  border: 1px solid var(--border);
}

.faq-plus::before,
.faq-plus::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
  transition: transform 0.18s ease, opacity 0.18s ease, background-color 0.18s ease;
}

.faq-plus::before {
  width: 10px;
  height: 1.5px;
}

.faq-plus::after {
  width: 1.5px;
  height: 10px;
}

.faq-item[open] .faq-plus {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}

.faq-item[open] .faq-plus::before {
  background: var(--accent-text);
}

.faq-item[open] .faq-plus::after {
  opacity: 0;
  transform: translate(-50%, -50%) rotate(90deg);
}

.faq-body {
  padding: 0 22px 20px;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}

/* ==========================================================================
   2B. ВИДЫ НАТЯЖНЫХ ПОТОЛКОВ (Карточки + модальное окно «фото слева / текст»)
   ========================================================================== */

.ceiling-types-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 360px) {
  .ceiling-types-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (min-width: 640px) {
  .ceiling-types-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (min-width: 1024px) {
  .ceiling-types-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
  }
}

.ceiling-type-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.ceiling-type-card:hover,
.ceiling-type-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: 0 14px 32px rgba(26, 31, 28, 0.08);
}

.ceiling-type-media {
  position: relative;
  aspect-ratio: 16 / 10;
  width: 100%;
  background: var(--surface-muted);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.ceiling-type-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.ceiling-type-card:hover .ceiling-type-img {
  transform: scale(1.03);
}

.ceiling-type-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 14px;
}

.ceiling-type-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
  transition: color 0.15s ease;
}

.ceiling-type-card:hover .ceiling-type-title {
  color: var(--accent-text);
}

.ceiling-type-sub {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.38;
  color: var(--ink-muted);
}

.ceiling-type-more {
  margin-top: auto;
  padding-top: 10px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-text);
}

@media (min-width: 640px) {
  .ceiling-type-body {
    padding: 20px 22px 22px;
  }

  .ceiling-type-title {
    font-size: 19px;
  }

  .ceiling-type-sub {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.5;
  }

  .ceiling-type-more {
    padding-top: 14px;
    font-size: 13.5px;
  }
}

/* Модальное окно вида потолка: фото в левом верхнем углу, описание обтекает справа и занимает всю ширину снизу */
.css-modal-card--wide {
  max-width: 820px;
  padding: 20px 20px 22px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}

@media (min-width: 640px) {
  .css-modal-card--wide {
    padding: 28px 32px 26px;
  }
}

.ceiling-modal-layout {
  display: flow-root;
}

.ceiling-modal-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  margin: 36px 0 18px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-muted);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .ceiling-modal-media {
    float: left;
    width: 310px;
    height: 300px;
    aspect-ratio: auto;
    margin: 0 26px 16px 0;
  }
}

.ceiling-modal-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.ceiling-modal-body,
.ceiling-modal-content {
  display: contents;
}

.ceiling-modal-kicker {
  margin: 0;
  padding-right: 40px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.ceiling-modal-title {
  margin: 8px 0 0;
  padding-right: 40px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.ceiling-modal-desc {
  margin: 12px 0 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-muted);
}

.ceiling-modal-specs {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flow-root;
}

.ceiling-modal-specs li {
  position: relative;
  display: flow-root;
  padding-left: 18px;
  font-size: 13.5px;
  line-height: 1.48;
  color: var(--ink);
}

.ceiling-modal-specs li + li {
  margin-top: 8px;
}

.ceiling-modal-specs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cta);
}

.ceiling-modal-footer {
  clear: both;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.ceiling-modal-price-label {
  display: block;
  font-size: 12px;
  color: var(--ink-muted);
}

.ceiling-modal-price {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО «КОНТАКТЫ» (Адрес, увеличиваемая карта, телефон, мессенджеры)
   ========================================================================== */

.css-modal--contacts {
  z-index: 60;
}

.css-modal-card--contacts {
  max-width: 520px;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 20px 18px;
  transition: max-width 0.2s ease;
}

@media (min-width: 640px) {
  .css-modal-card--contacts {
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    padding: 28px;
  }
}

.css-modal-card--contacts.is-map-expanded {
  max-width: 780px;
}

.contacts-modal-kicker {
  margin: 0;
  padding-right: 42px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.contacts-modal-title {
  margin: 6px 0 0;
  padding-right: 42px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.contacts-address-box {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--canvas);
  display: flex;
  align-items: center;
  gap: 12px;
}

.contacts-address-emoji {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.contacts-address-label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.contacts-address-value {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}

.contacts-map-box {
  margin-top: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--canvas);
  overflow: hidden;
}

.contacts-map-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.contacts-map-caption {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
}

.contacts-map-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.contacts-map-expand-btn:hover {
  background: var(--accent-cta);
  border-color: var(--accent-cta);
  color: #ffffff;
}

.contacts-modal-map {
  width: 100%;
  height: 190px;
  position: relative;
  isolation: isolate;
  z-index: 1;
  background: var(--surface-muted);
  transition: height 0.2s ease;
}

.css-modal-card--contacts.is-map-expanded .contacts-modal-map {
  height: 380px;
}

@media (max-height: 760px) {
  .css-modal-card--contacts.is-map-expanded .contacts-modal-map {
    height: 300px;
  }
}

.contacts-links-block {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contacts-phone-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  height: auto;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--canvas);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.contacts-phone-link svg {
  width: 18px;
  height: 18px;
  color: var(--accent-text);
  flex-shrink: 0;
}

.contacts-phone-link:hover {
  border-color: var(--accent-cta);
  background: var(--surface);
  color: var(--accent-text);
}

.contacts-messengers-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 639px) {
  .css-modal--contacts {
    padding: 10px;
    align-items: flex-end;
  }

  .css-modal-card--contacts {
    max-width: 100%;
    max-height: calc(100dvh - 20px);
    padding: 18px 16px max(18px, env(safe-area-inset-bottom));
    border-radius: 16px;
  }

  .css-modal-card--contacts.is-map-expanded {
    max-width: 100%;
  }

  .css-modal-card--contacts .css-modal-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .contacts-modal-title {
    font-size: 18px;
    line-height: 1.28;
  }

  .contacts-address-box {
    margin-top: 12px;
    padding: 10px 12px;
    gap: 10px;
  }

  .contacts-address-emoji {
    font-size: 20px;
  }

  .contacts-address-value {
    font-size: 14px;
  }

  .contacts-map-box {
    margin-top: 12px;
  }

  .contacts-map-toolbar {
    padding: 8px 10px;
  }

  .contacts-map-expand-btn {
    min-height: 36px;
    padding: 4px 10px;
    font-size: 12px;
  }

  .contacts-modal-map {
    height: 170px;
  }

  .css-modal-card--contacts.is-map-expanded .contacts-modal-map {
    height: min(50dvh, 320px);
  }

  .contacts-links-block {
    margin-top: 12px;
    gap: 8px;
  }

  .contacts-phone-link {
    min-height: 46px;
    font-size: 15.5px;
    white-space: nowrap;
  }

  .contacts-messengers-row {
    gap: 8px;
  }

  .contacts-messengers-row .messenger-choice-btn {
    min-height: 44px;
    font-size: 14px;
  }
}

@media (max-width: 399px) {
  .contacts-phone-link {
    min-height: 44px;
    padding: 10px;
    gap: 7px;
    font-size: clamp(13px, 4vw, 15px);
  }

  .contacts-phone-link svg {
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 639px) and (max-height: 680px) {
  .contacts-modal-map {
    height: 140px;
  }

  .css-modal-card--contacts.is-map-expanded .contacts-modal-map {
    height: 240px;
  }
}

@media (max-width: 359px) {
  .contacts-messengers-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО «ЗАЯВКА ОТПРАВЛЕНА»
   ========================================================================== */

.success-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(26, 31, 28, 0.62);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.18s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.18s ease;
}

.success-modal.is-open {
  display: flex;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.success-modal[hidden] {
  display: none !important;
}

.success-modal-backdrop {
  position: absolute;
  inset: 0;
}

.success-modal-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 24px 64px rgba(26, 31, 28, 0.25);
  text-align: center;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.success-modal.is-open .success-modal-card {
  transform: translateY(0) scale(1);
}

.success-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--ink-muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.success-modal-close:hover {
  background: var(--surface-muted);
  color: var(--ink);
}

.success-modal-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.success-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
  text-wrap: balance;
}

.success-modal-text {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-muted);
}

.success-modal-meta {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--ink-muted);
}

.success-modal-phone {
  color: var(--ink);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: color 0.15s ease;
}

.success-modal-phone:hover {
  color: var(--accent);
}

.success-modal-btn {
  margin-top: 20px;
  width: 100%;
  height: 46px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-cta);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.success-modal-btn:hover {
  background: var(--accent-cta-hover);
}

.success-modal-btn:active {
  transform: translateY(1px);
}

.success-modal-close:focus-visible,
.success-modal-btn:focus-visible,
.success-modal-phone:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (max-width: 359px) {
  .success-modal {
    padding: 12px;
  }

  .success-modal-card {
    padding: 24px 18px 20px;
  }

  .success-modal-title {
    font-size: 20px;
  }

  .success-modal-text {
    font-size: 13.5px;
  }

  .success-modal-btn {
    height: 44px;
    font-size: 14px;
  }
}

/* ==========================================================================
   КНОПКА ВОЗВРАТА ПРОКРУТКИ КАРТЫ И НИЖНЯЯ ПАНЕЛЬ СВЯЗИ ДЛЯ МОБИЛЬНЫХ (< 768px)
   ========================================================================== */

.geo-touch-lock-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 460;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(26, 31, 28, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px rgba(26, 31, 28, 0.22);
  color: #ffffff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.geo-touch-lock-btn[hidden] {
  display: none;
}

.mobile-sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 38;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(26, 31, 28, 0.08);
}

.mobile-sticky-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.mobile-sticky-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.mobile-sticky-btn--call {
  flex: 1;
  border-color: var(--accent-cta);
  background: var(--accent-cta);
  color: #ffffff;
  font-size: 14px;
  box-shadow: 0 6px 16px rgba(31, 111, 84, 0.24);
}

.mobile-sticky-btn--call:hover {
  background: var(--accent-cta-hover);
  border-color: var(--accent-cta-hover);
}

.mobile-sticky-btn--wa svg {
  color: #16a34a;
}

.mobile-sticky-btn--wa:hover {
  border-color: #16a34a;
  background: #f0fdf4;
}

.mobile-sticky-btn--tg svg {
  color: #0284c7;
}

.mobile-sticky-btn--tg:hover {
  border-color: #0284c7;
  background: #f0f9ff;
}

@media (max-width: 419px) {
  .mobile-sticky-btn--wa,
  .mobile-sticky-btn--tg {
    padding: 8px 10px;
  }

  .mobile-sticky-label {
    display: none;
  }
}

@media (min-width: 768px) {
  .mobile-sticky-bar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .carousel-track,
  .project-media-img,
  .ceiling-type-img,
  .css-modal-card--contacts,
  .contacts-modal-map,
  .success-modal,
  .success-modal-card,
  .success-modal-close,
  .success-modal-btn,
  .success-modal-phone {
    transition: none;
  }
}
