/* ==========================================================================
   РемКом-Перм — таблица стилей
   Токены → база → фон → компоненты → секции → подвал → модалки → адаптив
   ========================================================================== */

/* ---------- Дизайн-токены ---------- */
:root {
  --bg: #f3f7ff;
  --bg-2: #e9f1ff;
  --tint: rgba(226, 238, 255, .6);
  --surface: #ffffff;
  --surface-2: #f4f8ff;
  --text: #132441;
  --muted: #5b6b85;
  --line: #dfe8f6;

  --brand: #2264e5;
  --brand-2: #4f8bff;
  --brand-soft: #e3edff;
  --cyan: #19b8d8;
  --grad-brand: linear-gradient(135deg, #2f74f2 0%, #1b4fc0 62%, #123a97 100%);
  --grad-electric: linear-gradient(120deg, #2f74f2, #19b8d8 55%, #2f74f2);

  --accent: #ffc63a;
  --accent-2: #ffd76a;
  --accent-ink: #231a00;
  --accent-soft: #fff1cc;

  --danger: #e5484d;
  --success: #2fbf71;
  --success-soft: #e6f9f0;

  --ring: rgba(34, 100, 229, .35);
  --shadow-1: 0 6px 24px rgba(23, 58, 131, .08);
  --shadow-2: 0 18px 50px rgba(23, 58, 131, .16);
  --header-bg: rgba(255, 255, 255, .84);
  --overlay: rgba(9, 17, 34, .55);

  --radius-lg: 24px;
  --radius: 16px;
  --radius-sm: 10px;
  --header-h: 76px;
  --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a1120;
  --bg-2: #0d1628;
  --tint: rgba(13, 22, 40, .6);
  --surface: #121c31;
  --surface-2: #182642;
  --text: #e9effc;
  --muted: #93a3bf;
  --line: #243654;

  --brand: #4f8bff;
  --brand-2: #6ea1ff;
  --brand-soft: #1c2d4f;
  --cyan: #2cd4f5;
  --grad-brand: linear-gradient(135deg, #2b62c9 0%, #1a3a8a 62%, #122a68 100%);
  --grad-electric: linear-gradient(120deg, #2b62c9, #1798b8 55%, #2b62c9);

  --accent: #ffc63a;
  --accent-2: #ffd76a;
  --accent-ink: #231a00;
  --accent-soft: #33270e;

  --danger: #ff6b6e;
  --success: #3ddc8a;
  --success-soft: #123527;

  --ring: rgba(110, 161, 255, .45);
  --shadow-1: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, .5);
  --header-bg: rgba(10, 17, 32, .82);
  --overlay: rgba(3, 8, 18, .7);
  color-scheme: dark;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scrollbar-color: var(--brand-2) var(--bg); }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s ease, color .35s ease;
}

body.is-locked { position: fixed; left: 0; right: 0; overflow: hidden; }

img { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
button { font-family: inherit; }
ul { list-style: none; }

::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-2); }

.container { max-width: 1200px; margin-inline: auto; padding-inline: clamp(14px, 4vw, 32px); }
.section { padding-block: clamp(60px, 9vw, 104px); position: relative; }
.section--tint { background: var(--tint); transition: background-color .35s ease; }
section[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: 2000;
  padding: 10px 18px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 700;
  transition: top .2s ease;
}
.skip-link:focus { top: 12px; }

.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* ---------- Анимированный фон ---------- */
.bg-scene { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; will-change: transform; }
.blob--1 { width: 560px; height: 560px; top: -180px; left: -140px; background: radial-gradient(circle, var(--brand-2), transparent 70%); animation: blob-a 26s ease-in-out infinite alternate; }
.blob--2 { width: 480px; height: 480px; top: 30%; right: -180px; background: radial-gradient(circle, var(--accent), transparent 70%); opacity: .26; animation: blob-b 32s ease-in-out infinite alternate; }
.blob--3 { width: 520px; height: 520px; bottom: -220px; left: 28%; background: radial-gradient(circle, var(--brand), transparent 70%); opacity: .2; animation: blob-a 38s ease-in-out infinite alternate-reverse; }
.blob--4 { width: 380px; height: 380px; top: 58%; left: -160px; background: radial-gradient(circle, var(--cyan), transparent 70%); opacity: .16; animation: blob-b 44s ease-in-out infinite alternate-reverse; }
[data-theme="dark"] .blob { opacity: .2; }
[data-theme="dark"] .blob--2 { opacity: .1; }
[data-theme="dark"] .blob--3 { opacity: .15; }
[data-theme="dark"] .blob--4 { opacity: .1; }

.bg-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 20%, transparent 75%);
}
[data-theme="dark"] .bg-grid { opacity: .22; }

.bg-grain {
  position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
[data-theme="dark"] .bg-grain { opacity: .08; }

@keyframes blob-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(90px, 60px) scale(1.15); } }
@keyframes blob-b { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-110px, -50px) scale(.95); } }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 24px; border-radius: 14px; border: 1.5px solid transparent;
  font: 700 15px/1.2 var(--font); cursor: pointer; text-align: center;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn .icon { width: 19px; height: 19px; }
.btn:active { transform: scale(.97); }
.btn--lg { padding: 16px 28px; font-size: 16px; }
.btn--sm { padding: 10px 18px; font-size: 14px; }
.btn--block { width: 100%; }

.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 26px rgba(255, 198, 58, .35); }
.btn--primary:hover { transform: translateY(-2px); background: var(--accent-2); box-shadow: 0 14px 32px rgba(255, 198, 58, .45); }

.btn--outline { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn--outline:hover { transform: translateY(-2px); border-color: var(--brand); color: var(--brand); box-shadow: var(--shadow-1); }

.btn-mini {
  padding: 9px 16px; border: 0; border-radius: 10px; cursor: pointer;
  background: var(--brand); color: #fff; font: 700 13px/1.2 var(--font);
  transition: background-color .2s ease, transform .2s ease;
}
.btn-mini:hover { background: var(--brand-2); transform: translateY(-1px); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--text);
  transition: border-color .2s ease, color .2s ease, background-color .2s ease;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }
.icon-btn .icon { width: 20px; height: 20px; }

.link-btn {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; color: var(--brand); text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: var(--brand-2); }

/* ---------- Заголовки секций ---------- */
.sec-head { margin-bottom: clamp(28px, 4vw, 44px); }
.sec-title { font-size: clamp(1.55rem, 2.6vw + .5rem, 2.35rem); font-weight: 800; line-height: 1.25; letter-spacing: -.01em; }
.sec-sub { margin-top: 10px; color: var(--muted); font-size: clamp(.95rem, 1vw + .4rem, 1.05rem); }
.text-brand { color: var(--brand); }

.hl { background: var(--accent); color: var(--accent-ink); padding: .02em .28em; border-radius: .32em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.u { position: relative; z-index: 0; white-space: nowrap; }
.u::after { content: ""; position: absolute; left: 0; right: 0; bottom: .04em; height: .22em; background: var(--accent); border-radius: 4px; z-index: -1; }

/* ---------- Шапка ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  height: var(--header-h);
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, box-shadow .25s ease, background-color .35s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-1); }
.header-inner { display: flex; align-items: center; gap: 20px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand-logo { width: 42px; height: 42px; color: var(--brand); flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.brand-text small { font-size: 11px; color: var(--muted); font-weight: 600; }

.nav { margin-inline: auto; }
.nav-list { display: flex; gap: 4px; }
.nav-link {
  position: relative; display: block; padding: 8px 10px;
  font-size: 14px; font-weight: 600; color: var(--muted); border-radius: 8px;
  transition: color .2s ease; white-space: nowrap;
}
.nav-link::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px;
  background: var(--brand); border-radius: 2px; transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav-link:hover { color: var(--text); }
.nav-link.is-active { color: var(--brand); }
.nav-link.is-active::after, .nav-link:hover::after { transform: scaleX(1); }

.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.header-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--text); white-space: nowrap; transition: color .2s ease; }
.header-phone:hover { color: var(--brand); }
.header-phone .icon { width: 18px; height: 18px; color: var(--brand); }

.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px;
  border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer;
}
.burger span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: transform .3s ease, opacity .2s ease; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Мобильное меню ---------- */
.mobile-menu { position: fixed; inset: 0; z-index: 900; }
.mobile-overlay { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .3s ease; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.mobile-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(360px, 88vw);
  display: flex; flex-direction: column;
  background: var(--surface); padding: 20px;
  overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2, .7, .2, 1);
  box-shadow: var(--shadow-2);
  scrollbar-width: thin; scrollbar-color: var(--brand-2) var(--surface-2);
}
.mobile-panel::-webkit-scrollbar { width: 8px; }
.mobile-panel::-webkit-scrollbar-track { background: var(--surface-2); }
.mobile-panel::-webkit-scrollbar-thumb { background: var(--brand-2); border-radius: 8px; }
.mobile-menu.is-open .mobile-overlay { opacity: 1; }
.mobile-menu.is-open .mobile-panel { transform: translateX(0); }

.mobile-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mobile-nav { display: flex; flex-direction: column; }
.m-nav-link { padding: 13px 4px; font-size: 16px; font-weight: 700; color: var(--text); border-bottom: 1px solid var(--line); transition: color .2s ease, padding-left .2s ease; }
.m-nav-link:hover, .m-nav-link.is-active { color: var(--brand); padding-left: 10px; }
.mobile-foot { margin-top: auto; padding-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.mobile-phone { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; color: var(--text); }
.mobile-phone .icon { width: 20px; height: 20px; color: var(--brand); }
.mobile-hours { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.mobile-hours .icon { width: 16px; height: 16px; }

/* ---------- Соцсети ---------- */
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.social-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 42px; height: 42px; padding: 0 12px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--text);
  font-size: 13.5px; font-weight: 700;
  transition: border-color .2s ease, color .2s ease, transform .2s ease;
}
.social-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }
.social-btn .icon { width: 20px; height: 20px; }

/* ---------- Главный экран ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-top: calc(var(--header-h) + clamp(36px, 6vw, 72px));
  padding-bottom: clamp(56px, 8vw, 96px);
}
.hero-canvas { position: absolute; inset: 0; z-index: 0; opacity: .6; }
[data-theme="dark"] .hero-canvas { opacity: .4; }
.hero-skyline {
  position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 190px;
  color: var(--brand); opacity: .07; z-index: 0; pointer-events: none;
  transform: translateY(calc(var(--par, 0px) * .6));
}
[data-theme="dark"] .hero-skyline { opacity: .12; }

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

.pensioner-badge {
  position: relative; display: inline-flex; align-items: center; gap: 8px; overflow: hidden;
  padding: 9px 16px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 13.5px; font-weight: 800;
  box-shadow: 0 8px 22px rgba(255, 198, 58, .4);
}
.pensioner-badge .icon { width: 16px; height: 16px; }
.pensioner-badge::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .65), transparent);
  transform: skewX(-20deg); animation: shine 3.4s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

.hero-title { margin: 20px 0 16px; font-size: clamp(1.7rem, 3.4vw + .6rem, 3.15rem); font-weight: 800; line-height: 1.16; letter-spacing: -.02em; }
.hero-lead { max-width: 560px; color: var(--muted); font-size: clamp(1rem, .6vw + .7rem, 1.125rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 30px; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 14px 26px; }
.trust-item { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 700; }
.trust-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.trust-icon .icon { width: 20px; height: 20px; }

.hero-visual { position: relative; }
.hero-decor { position: absolute; border-radius: 26px; z-index: 0; }
.hero-decor--accent { width: 130px; height: 130px; top: -22px; right: -16px; background: var(--accent); transform: rotate(12deg) translateY(var(--par, 0px)); }
.hero-decor--brand { width: 110px; height: 110px; bottom: -18px; left: -14px; background: var(--brand-soft); transform: rotate(-8deg) translateY(calc(var(--par, 0px) * -1)); }

.hero-photo {
  position: relative; z-index: 1; padding-bottom: 79%;
  border-radius: 28px; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-2));
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
}
.hero-photo img, .about-media img, .request-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-ph { position: absolute; top: 50%; left: 50%; width: 84px; height: 84px; transform: translate(-50%, -50%); color: var(--brand); opacity: .45; stroke-width: 1.4; }
.photo-ph--xl { width: 130px; height: 130px; opacity: .3; }
img.is-failed { opacity: 0; }

.float-chip {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 16px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: float 6s ease-in-out infinite;
}
.float-chip strong { display: block; font-size: 14px; font-weight: 800; line-height: 1.2; }
.float-chip small { font-size: 12px; color: var(--muted); font-weight: 600; }
.float-chip--tr { top: 20px; right: -14px; }
.float-chip--bl { bottom: 26px; left: -18px; animation-delay: -3s; }
.chip-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.chip-icon--accent { background: var(--accent-soft); color: #a97b00; }
[data-theme="dark"] .chip-icon--accent { color: var(--accent); }
.chip-icon .icon { width: 20px; height: 20px; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* ---------- Бегущая строка ---------- */
.marquee { overflow: hidden; background: var(--grad-electric); background-size: 200% 100%; color: #fff; padding: 13px 0; animation: hue-slide 14s linear infinite; }
.marquee-track { display: flex; width: max-content; animation: marquee 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 34px; padding-right: 34px; }
.mq-item { display: inline-flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.mq-item .icon { width: 14px; height: 14px; color: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes hue-slide { to { background-position: 200% 0; } }

/* ---------- О нас ---------- */
.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 56px); align-items: center; }
.about-text p { color: var(--muted); margin-bottom: 14px; }
.about-features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.mini-card {
  display: flex; align-items: center; gap: 12px; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 14px; font-weight: 700; box-shadow: var(--shadow-1);
  transition: transform .25s ease, border-color .25s ease;
}
.mini-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.mini-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.mini-icon .icon { width: 20px; height: 20px; }

.about-media {
  position: relative; padding-bottom: 76%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-2));
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
}
.about-badge {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  display: flex; align-items: center; gap: 12px; padding: 12px 18px;
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-2);
}
.about-badge strong { font-size: 26px; font-weight: 800; color: var(--brand); }
.about-badge span { font-size: 12px; font-weight: 600; color: var(--muted); line-height: 1.35; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: clamp(36px, 5vw, 56px); }
.stat-card { padding: 22px 16px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); }
.stat-value { font-size: clamp(1.5rem, 2.4vw, 2.1rem); font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat-suffix { margin-left: 4px; font-size: .7em; }
.stat-label { margin-top: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }

/* ---------- Что ремонтируем ---------- */
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: var(--brand); }
.card-media { position: relative; height: 170px; background: linear-gradient(135deg, var(--brand-soft), var(--bg-2)); }
.card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media-ph { position: absolute; top: 50%; left: 50%; width: 54px; height: 54px; transform: translate(-50%, -50%); color: var(--brand); opacity: .5; stroke-width: 1.5; }
.card-body { padding: 20px; }
.card-body h3 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.card-body p { font-size: 14px; color: var(--muted); }

.problems { display: grid; grid-template-columns: 290px 1fr; margin-top: 40px; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-2); }
.problems-side { position: relative; padding: 32px 28px; background: var(--grad-brand); color: #fff; overflow: hidden; }
.problems-side h3 { font-size: 26px; font-weight: 800; line-height: 1.2; margin-bottom: 10px; position: relative; }
.problems-side p { font-size: 13.5px; opacity: .85; position: relative; }
.problems-gear { position: absolute; right: -30px; bottom: -30px; width: 150px; height: 150px; opacity: .16; stroke-width: 1.2; }
.problems-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 24px; background: var(--surface); }
.problems-list { display: flex; flex-direction: column; gap: 12px; }
.problem {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 12px 14px; border-radius: 14px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line);
  font: 600 14px/1.35 var(--font); color: var(--text);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.problem:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-1); }
.problem-icon { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); flex-shrink: 0; }
.problem-icon .icon { width: 18px; height: 18px; }

/* ---------- Прайс ---------- */
.price-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.price-row {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  grid-template-areas: "icon name price btn";
  padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.price-row:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-2); }
.price-icon { grid-area: icon; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.price-icon .icon { width: 22px; height: 22px; }
.price-name { grid-area: name; font-size: 15px; font-weight: 700; line-height: 1.35; }
.price-value { grid-area: price; padding: 8px 13px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 14px; font-weight: 800; white-space: nowrap; }
.price-row .btn-mini { grid-area: btn; }

.price-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.price-note .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--brand); }

.price-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 22px;
  margin-top: 28px; padding: 26px 30px;
  background: var(--grad-brand); border-radius: 20px; color: #fff; box-shadow: var(--shadow-2);
}
.banner-text { display: flex; align-items: center; gap: 18px; }
.banner-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; background: rgba(255, 255, 255, .16); flex-shrink: 0; }
.banner-icon .icon { width: 26px; height: 26px; }
.banner-text h3 { font-size: 19px; font-weight: 800; }
.banner-text p { font-size: 14px; opacity: .85; margin-top: 4px; }

/* ---------- Почему мы ---------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.why-card {
  padding: 24px 22px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: var(--brand); }
.why-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.why-card:nth-child(4n+2) .why-icon, .why-card:nth-child(4n+3) .why-icon { background: var(--accent-soft); color: #a97b00; }
[data-theme="dark"] .why-card:nth-child(4n+2) .why-icon, [data-theme="dark"] .why-card:nth-child(4n+3) .why-icon { color: var(--accent); }
.why-icon .icon { width: 23px; height: 23px; }
.why-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.why-card p { font-size: 13.5px; color: var(--muted); }
.why-cta { text-align: center; margin-top: 36px; }

/* ---------- Как мы работаем ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step-card { position: relative; padding: 24px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-1); overflow: hidden; transition: transform .25s ease, border-color .25s ease; }
.step-card:hover { transform: translateY(-4px); border-color: var(--brand); }
.step-num { position: absolute; top: 10px; right: 16px; font-size: 44px; font-weight: 800; line-height: 1; color: var(--brand-soft); }
.step-icon { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: #fff; margin-bottom: 14px; position: relative; }
.step-icon .icon { width: 22px; height: 22px; }
.step-card h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.step-card p { font-size: 13.5px; color: var(--muted); }

/* ---------- Отзывы ---------- */
.reviews-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.reviews-head .sec-head { margin-bottom: 0; }
.rating-card { display: flex; align-items: center; gap: 14px; padding: 14px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.rating-num { font-size: 34px; font-weight: 800; color: var(--brand); line-height: 1; }
.rating-stars { display: flex; gap: 3px; color: var(--accent); }
.rating-stars .icon { width: 16px; height: 16px; }
.rating-text { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }

.reviews-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 36px; }
.review-card {
  padding: 24px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1);
  transition: transform .25s ease, box-shadow .25s ease;
}
.review-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.review-card--brand { background: var(--grad-brand); border-color: transparent; color: #fff; }
.review-card--brand .review-meta, .review-card--brand .review-text { color: rgba(255, 255, 255, .85); }
.review-card--brand .tag { background: rgba(255, 255, 255, .16); color: #fff; border-color: transparent; }
.review-card--brand .avatar { border-color: rgba(255, 255, 255, .4); }

.review-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.avatar {
  position: relative; display: grid; place-items: center;
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--brand-soft); border: 2px solid var(--surface); box-shadow: var(--shadow-1);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--fallback img { display: none; }
.avatar--fallback::after { content: attr(data-initials); font-size: 17px; font-weight: 800; color: var(--brand); }
.review-name { font-size: 15.5px; font-weight: 800; line-height: 1.3; }
.review-meta { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.review-stars { display: flex; gap: 3px; color: var(--accent); margin-bottom: 10px; }
.review-stars .icon { width: 15px; height: 15px; }
.review-text { font-size: 14.5px; color: var(--text); line-height: 1.65; }
.review-foot { margin-top: 16px; }
.tag { display: inline-block; padding: 7px 13px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 4vw, 52px); align-items: start; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-1); transition: border-color .25s ease; }
.faq-item.is-open { border-color: var(--brand-2); }
.faq-q { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 18px; border: 0; background: none; cursor: pointer; text-align: left; color: var(--text); transition: color .2s ease; }
.faq-q:hover { color: var(--brand); }
.faq-q-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; flex-shrink: 0; }
.faq-q-icon .icon { width: 16px; height: 16px; }
.faq-q-text { flex: 1; font: 700 14.5px/1.4 var(--font); }
.faq-chev { width: 18px; height: 18px; color: var(--muted); transition: transform .3s ease, color .3s ease; }
.faq-item.is-open .faq-chev { transform: rotate(180deg); color: var(--brand); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.faq-a-inner { display: flex; align-items: flex-start; gap: 10px; padding: 0 18px 16px 60px; }
.faq-a-inner p { font-size: 13.5px; color: var(--muted); line-height: 1.65; }
.faq-check { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex-shrink: 0; margin-top: 1px; }
.faq-check .icon { width: 12px; height: 12px; stroke-width: 3; }

.faq-visual { position: sticky; top: calc(var(--header-h) + 24px); min-height: 380px; }
.faq-photo { position: relative; padding-bottom: 82%; }
.faq-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.q-bubble {
  position: absolute; z-index: 2; display: grid; place-items: center;
  border-radius: 20px; color: #fff; box-shadow: var(--shadow-2);
  animation: float 7s ease-in-out infinite;
}
.q-bubble::after { content: ""; position: absolute; bottom: -9px; left: 22px; border: 10px solid transparent; border-top-color: inherit; border-bottom: 0; }
.q-bubble .icon { width: 55%; height: 55%; stroke-width: 2.4; }
.q-bubble--1 { width: 92px; height: 78px; top: -14px; left: 4%; background: var(--accent); color: var(--accent-ink); transform: rotate(-6deg); }
.q-bubble--1::after { border-top-color: var(--accent); }
.q-bubble--2 { width: 56px; height: 48px; top: 40%; left: -12px; background: var(--brand); animation-delay: -2.4s; }
.q-bubble--2::after { border-top-color: var(--brand); }
.q-bubble--3 { width: 64px; height: 55px; top: 55%; right: -10px; background: var(--brand-2); animation-delay: -4.6s; }
.q-bubble--3::after { border-top-color: var(--brand-2); }
.faq-spark { position: absolute; color: var(--accent); }
.faq-spark--1 { width: 22px; height: 22px; top: 2%; right: 12%; }
.faq-spark--2 { width: 14px; height: 14px; top: 10%; right: 5%; }

.faq-banner {
  display: flex; align-items: center; gap: 18px; justify-content: space-between;
  margin-top: clamp(28px, 4vw, 44px); padding: 22px 26px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-1);
}
.faq-banner-icon { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.faq-banner-icon .icon { width: 27px; height: 27px; }
.faq-banner-text { flex: 1; }
.faq-banner-text h3 { font-size: 19px; font-weight: 800; }
.faq-banner-text p { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------- Заявка / контакты: инлайн-форма ---------- */
.request-grid { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(22px, 3vw, 32px); align-items: start; }
.request-card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow-2); }

.request-form .field { margin-bottom: 12px; }
.request-form .field--consent { margin-bottom: 14px; }
.request-form .check-text { font-size: 12px; line-height: 1.45; }
.request-form .btn { margin-top: 2px; }
.request-form .form-note { margin-top: 12px; }

.request-contacts { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.request-phone { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; color: var(--text); transition: color .2s ease; }
.request-phone:hover { color: var(--brand); }
.request-phone .icon { width: 20px; height: 20px; color: var(--brand); }
.request-mail { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--text); transition: color .2s ease; }
.request-mail:hover { color: var(--brand); }
.request-mail .icon { width: 18px; height: 18px; color: var(--brand); }
.request-hours { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); font-weight: 600; }
.request-hours .icon { width: 16px; height: 16px; }

.request-photo {
  position: relative; padding-bottom: 62%;
  border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-2));
  border: 1px solid var(--line); box-shadow: var(--shadow-2);
}
.request-facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.fact-card {
  padding: 16px 12px; text-align: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1);
  transition: transform .25s ease, border-color .25s ease;
}
.fact-card:hover { transform: translateY(-3px); border-color: var(--brand); }
.fact-card .icon { width: 22px; height: 22px; color: var(--brand); margin: 0 auto 8px; }
.fact-card p { font-size: 12.5px; font-weight: 700; line-height: 1.4; }
.fact-card small { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); font-weight: 600; }

.districts { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 26px; padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.districts-label { font-size: 14px; font-weight: 800; margin-right: 6px; }
.district-chip { padding: 7px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted); }

/* ---------- Подвал ---------- */
.site-footer {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, #0a1428 0%, #081124 55%, #0a1730 100%);
  color: #eaf1ff;
  padding: clamp(52px, 7vw, 76px) 0 28px;
}
.site-footer::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
}
.footer-arc { position: absolute; top: -300px; left: -200px; width: 660px; height: 660px; border: 2px solid rgba(255, 198, 58, .32); border-radius: 50%; pointer-events: none; }
.footer-arc::before { content: ""; position: absolute; inset: 56px; border: 1.5px solid rgba(255, 198, 58, .14); border-radius: 50%; }
.footer-dots {
  position: absolute; top: 36px; left: 4%; width: 150px; height: 92px; opacity: .55; pointer-events: none;
  background-image: radial-gradient(rgba(255, 198, 58, .55) 1.5px, transparent 1.6px);
  background-size: 16px 16px;
}
.footer-dots::after {
  content: ""; position: absolute; left: calc(100vw - 320px); top: calc(100% + 260px);
  width: 130px; height: 70px;
  background-image: radial-gradient(rgba(234, 241, 255, .35) 1.5px, transparent 1.6px);
  background-size: 16px 16px;
}
.footer-circuit { position: absolute; right: 0; bottom: 0; width: min(560px, 62%); color: #ffc63a; stroke: currentColor; stroke-width: 2; opacity: .9; pointer-events: none; }
.footer-circuit circle { fill: currentColor; stroke: none; }

.site-footer .container { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.15fr .75fr 1fr; gap: clamp(28px, 4vw, 52px); align-items: start; }

.brand--footer { color: #eaf1ff; }
.brand--footer .brand-logo { color: #6ea1ff; }
.brand--footer .brand-text small { color: #9fb0cf; }
.footer-heading { margin: 20px 0 12px; font-size: clamp(1.2rem, 1.5vw + .5rem, 1.6rem); font-weight: 800; line-height: 1.3; max-width: 420px; }
.footer-lead { color: #9fb0cf; font-size: 14.5px; max-width: 400px; }
.footer-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin: 22px 0 14px; }
.footer-phone { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; color: #eaf1ff; transition: color .2s ease; }
.footer-phone:hover { color: #ffc63a; }
.footer-phone .icon { width: 18px; height: 18px; color: #ffc63a; }
.footer-mail { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-weight: 700; font-size: 14.5px; color: #dbe6ff; transition: color .2s ease; }
.footer-mail:hover { color: #ffc63a; }
.footer-mail .icon { width: 17px; height: 17px; color: #ffc63a; }
.footer-socials .social-btn { background: #0e1b36; border-color: #1d2c4d; color: #eaf1ff; }
.footer-socials .social-btn:hover { border-color: #ffc63a; color: #ffc63a; }

.footer-nav { display: flex; flex-direction: column; padding-top: 6px; }
.footer-nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  color: #dbe6ff; font-size: 15px; font-weight: 600;
  transition: color .2s ease, transform .2s ease;
}
.footer-nav a .icon { width: 16px; height: 16px; color: #ffc63a; }
.footer-nav a:hover { color: #ffc63a; transform: translateX(5px); }

.footer-card { background: #0e1b36; border: 1px solid #1d2c4d; border-radius: 18px; padding: 6px 22px; }
.footer-card-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid #1d2c4d; }
.footer-card-row:last-child { border-bottom: 0; }
.footer-card-row .icon { width: 23px; height: 23px; color: #ffc63a; }
.footer-card-row p { font-size: 14px; font-weight: 600; color: #dbe6ff; line-height: 1.45; }
.footer-card-row a { color: #dbe6ff; transition: color .2s ease; }
.footer-card-row a:hover { color: #ffc63a; }

.footer-bottom { margin-top: clamp(36px, 5vw, 52px); padding-top: 22px; border-top: 1px solid #1d2c4d; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legal-links .link-btn { font-size: 13px; font-weight: 600; color: #9fb0cf; }
.legal-links .link-btn:hover { color: #ffc63a; }
.copyright { margin-top: 14px; font-size: 12.5px; color: #9fb0cf; line-height: 1.7; }
.disclaimer { margin-top: 6px; font-size: 12px; color: #7d8fb2; }

/* ---------- Кнопка «наверх» ---------- */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 700;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 50%; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--line); color: var(--brand);
  box-shadow: var(--shadow-2);
  opacity: 0; pointer-events: none; transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, background-color .2s ease, color .2s ease, bottom .3s ease;
}
.to-top.is-show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--brand); color: #fff; border-color: var(--brand); }
.to-top .icon { width: 20px; height: 20px; }

/* ---------- Cookie ---------- */
.cookie-banner {
  position: fixed; left: 16px; bottom: 16px; z-index: 800;
  width: min(400px, calc(100vw - 32px));
  padding: 18px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(20px);
  transition: opacity .35s ease, transform .35s ease;
}
.cookie-banner.is-open { opacity: 1; transform: translateY(0); }
.cookie-head { display: flex; align-items: center; gap: 10px; font-size: 15px; }
.cookie-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); }
.cookie-icon .icon { width: 20px; height: 20px; }
.cookie-text { margin: 10px 0 14px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }

/* ---------- Тосты ---------- */
.toasts { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 1300; display: flex; flex-direction: column; gap: 10px; }
.toast {
  max-width: 340px; padding: 13px 16px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--danger);
  border-radius: 12px; box-shadow: var(--shadow-2);
  font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateX(20px);
  transition: opacity .3s ease, transform .3s ease;
}
.toast--success { border-left-color: var(--success); }
.toast.is-in { opacity: 1; transform: translateX(0); }

/* ---------- Модальные окна ---------- */
.modal {
  position: fixed; left: 0; right: 0;
  top: var(--vv-top, 0px); height: var(--vv-h, 100%);
  z-index: 1000; display: grid; place-items: center; padding: 16px;
}
.modal-overlay { position: absolute; inset: 0; background: var(--overlay); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .28s ease; }

.modal-card {
  position: relative; z-index: 1;
  width: min(560px, 100%);
  max-height: calc(var(--vv-h, 100vh) - 32px);
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow-2); overscroll-behavior: contain;
  opacity: 0; transform: translateY(26px) scale(.97);
  transition: opacity .28s ease, transform .28s cubic-bezier(.2, .7, .2, 1);
}
.modal-card--legal { width: min(760px, 100%); }
.modal.is-open .modal-overlay { opacity: 1; }
.modal.is-open .modal-card { opacity: 1; transform: none; }

.modal-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  border: 1.5px solid var(--line); background: var(--surface); color: var(--muted);
  transition: color .2s ease, border-color .2s ease;
}
.modal-close:hover { color: var(--danger); border-color: var(--danger); }
.modal-close .icon { width: 18px; height: 18px; }

.modal-body {
  flex: 1 1 auto; min-height: 0;
  padding: 28px;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: var(--brand-2) var(--surface-2);
}
.modal-body::-webkit-scrollbar { width: 8px; }
.modal-body::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--brand-2); border-radius: 8px; }
.modal-body::-webkit-scrollbar-thumb:hover { background: var(--brand); }
.modal-title { font-size: 22px; font-weight: 800; line-height: 1.25; padding-right: 34px; }
.modal-sub { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* --- Компактная форма в модальном окне --- */
.modal-card--lead { width: min(420px, 100%); }
.modal-card--lead .modal-body { padding: 24px; }
.modal-card--lead .modal-title { font-size: 21px; }
.modal-card--lead .modal-sub { font-size: 13px; margin-top: 5px; }
#leadForm { margin-top: 16px; }
.modal-card--lead .field { margin-bottom: 12px; }
.modal-card--lead .field--consent { margin-bottom: 14px; }
.modal-card--lead .field-label { font-size: 12.5px; margin-bottom: 5px; }
.modal-card--lead .check-text { font-size: 12px; line-height: 1.45; }
.modal-card--lead .form-note { margin-top: 10px; font-size: 11.5px; }

.field { margin-bottom: 16px; }
.field-label { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 700; }
.req { color: var(--danger); }

.input-wrap { position: relative; }
.input-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; transition: color .2s ease; }
.input-wrap:focus-within .input-icon { color: var(--brand); }
.field.has-error .input-icon { color: var(--danger); }

.field input[type="text"], .field input[type="tel"] {
  width: 100%; padding: 13px 14px 13px 44px;
  border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--text);
  font: 500 16px/1.4 var(--font);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--ring); }
.field input::placeholder { color: var(--muted); opacity: .7; }

.field.has-error input { border-color: var(--danger); }
.field-error { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; color: var(--danger); }

.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.check-box {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; margin-top: 1px; flex-shrink: 0;
  border: 1.5px solid var(--line); border-radius: 7px; background: var(--surface-2);
  transition: background-color .2s ease, border-color .2s ease;
}
.check-box .icon { width: 14px; height: 14px; color: #fff; opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .2s ease; }
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check-box .icon { opacity: 1; transform: scale(1); }
.check input:focus-visible + .check-box { box-shadow: 0 0 0 4px var(--ring); }
.check-text { font-size: 13px; color: var(--muted); line-height: 1.55; }
.check-text .link-btn { font-size: inherit; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

button[type="submit"] { position: relative; }
.btn-spinner {
  position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px;
  border: 2.5px solid rgba(35, 26, 0, .3); border-top-color: var(--accent-ink); border-radius: 50%;
  opacity: 0; animation: spin .7s linear infinite;
}
button[type="submit"].is-loading { pointer-events: none; }
button[type="submit"].is-loading .btn-label { opacity: 0; }
button[type="submit"].is-loading .btn-spinner { opacity: 1; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.form-note .icon { width: 15px; height: 15px; color: var(--success); }

/* Успех */
.modal-card--success { width: min(420px, 100%); }
.success-box { text-align: center; padding: 36px 26px 28px; }
.success-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--success-soft); color: var(--success);
  animation: pop .45s cubic-bezier(.2, .9, .3, 1.4);
}
.success-icon .icon { width: 38px; height: 38px; stroke-width: 1.8; }
.success-box .modal-title { padding-right: 0; margin-top: 16px; }
.success-box .modal-sub { margin-bottom: 22px; }
.success-tel { display: inline-block; margin-top: 14px; font-size: 13.5px; font-weight: 700; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* Юридические документы */
.legal h4 { font-size: 16px; font-weight: 800; margin: 22px 0 8px; }
.legal p { font-size: 14px; color: var(--muted); line-height: 1.7; margin-bottom: 8px; }
.legal a { text-decoration: underline; text-underline-offset: 3px; }
.legal-date { display: inline-block; margin-top: 10px; padding: 6px 12px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px !important; font-weight: 700; }

/* ---------- Появление при скролле ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2, .65, .2, 1), transform .7s cubic-bezier(.2, .65, .2, 1); transition-delay: var(--rd, 0ms); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Адаптив
   ========================================================================== */

@media (max-width: 1199px) {
  .nav { display: none; }
  .burger { display: flex; }
}

@media (min-width: 761px) {
  .review-card:nth-child(even) { margin-top: 46px; }
  .reviews-grid { padding-bottom: 46px; }
}

@media (max-width: 991px) {
  :root { --header-h: 68px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 560px; }
  .float-chip--tr { right: 10px; }
  .float-chip--bl { left: 10px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-media { max-width: 560px; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .why-grid, .steps-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .problems { grid-template-columns: 1fr; }
  .problems-side { padding: 24px; }
  .problems-side h3 { font-size: 22px; }
  .price-grid { grid-template-columns: 1fr; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-visual { position: relative; top: 0; min-height: 0; max-width: 480px; margin-inline: auto; width: 100%; }
  .request-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-cta { grid-column: 1 / -1; }
  .footer-dots::after { display: none; }
}

@media (max-width: 760px) {
  .header-phone span { display: none; }
  .header-phone { width: 40px; height: 40px; justify-content: center; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); }
  .header-phone .icon { width: 19px; height: 19px; }
  .reviews-grid { grid-template-columns: 1fr; }
  .reviews-head { flex-direction: column; align-items: flex-start; }
  .price-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .price-banner .btn { width: 100%; }
  .problems-cols { grid-template-columns: 1fr; }
  .faq-banner { flex-direction: column; align-items: stretch; text-align: left; }
  .faq-banner .btn { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-circuit { width: 82%; opacity: .55; }
}

@media (max-width: 620px) {
  .cards-grid { grid-template-columns: 1fr; }
  .card-media { height: 190px; }
  .price-row { grid-template-columns: auto 1fr auto; grid-template-areas: "icon name price" "btn btn btn"; row-gap: 12px; }
  .price-row .btn-mini { padding: 11px; }
  .request-facts { grid-template-columns: 1fr 1fr; }
}

/* --- Мобильные: аккуратные заголовки в две строки + компактная форма --- */
@media (max-width: 560px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: 15.5px; }
  .brand-logo { width: 36px; height: 36px; }
  .header-inner { gap: 10px; }
  .header-actions { gap: 8px; }
  .why-grid, .steps-grid, .about-features { grid-template-columns: 1fr; }

  .hero-title {
    font-size: clamp(1.35rem, 5.6vw, 1.75rem);
    line-height: 1.22;
    text-wrap: balance;
    margin: 16px 0 12px;
  }
  .sec-title {
    font-size: clamp(1.3rem, 5vw, 1.6rem);
    line-height: 1.3;
    text-wrap: balance;
  }
  .hero-lead { font-size: .95rem; }
  .hero-actions { flex-direction: column; align-items: stretch; margin: 22px 0 24px; }
  .hero-actions .btn { width: 100%; }
  .float-chip { padding: 10px 12px; }
  .float-chip strong { font-size: 13px; }
  .float-chip small { font-size: 11px; }
  .chip-icon { width: 32px; height: 32px; }

  .modal { padding: 14px; }
  .modal-card { max-height: calc(var(--vv-h, 100vh) - 28px); max-height: 100%; }
  .modal-body { padding: 22px 18px; }
  .modal-title { font-size: 19px; }
  .modal-card--lead { width: min(330px, 100%); border-radius: 18px; }
  .modal-card--lead .modal-body { padding: 18px 16px 16px; }
  .modal-card--lead .modal-title { font-size: 18px; padding-right: 30px; }
  .modal-card--lead .modal-sub { font-size: 12px; margin-top: 4px; }
  .modal-card--lead #leadForm { margin-top: 12px; }
  .modal-card--lead .field { margin-bottom: 10px; }
  .modal-card--lead .field--consent { margin-bottom: 12px; }
  .modal-card--lead .field-label { font-size: 11.5px; margin-bottom: 4px; }
  .modal-card--lead .field input[type="text"], .modal-card--lead .field input[type="tel"] { padding: 11px 12px 11px 38px; border-radius: 10px; }
  .modal-card--lead .input-icon { left: 12px; width: 17px; height: 17px; }
  .modal-card--lead .check { gap: 9px; }
  .modal-card--lead .check-box { width: 18px; height: 18px; border-radius: 6px; }
  .modal-card--lead .check-box .icon { width: 11px; height: 11px; }
  .modal-card--lead .check-text { font-size: 11px; line-height: 1.4; }
  .modal-card--lead button[type="submit"] { padding: 12px; font-size: 14.5px; border-radius: 12px; }
  .modal-card--lead .form-note { display: none; }
  .modal-card--lead .modal-close { top: 10px; right: 10px; width: 30px; height: 30px; border-radius: 9px; }
  .modal-card--lead .modal-close .icon { width: 15px; height: 15px; }
  .modal-card--success { width: min(330px, 100%); }
  .success-box { padding: 28px 20px 22px; }
  .success-icon { width: 60px; height: 60px; }
  .success-icon .icon { width: 32px; height: 32px; }

  .request-card { padding: 18px; }
  .request-form .field input[type="text"], .request-form .field input[type="tel"] { padding: 12px 12px 12px 40px; }
  .request-form .check-text { font-size: 11.5px; }
  .request-form button[type="submit"] { padding: 13px; font-size: 15px; }
  .request-phone { font-size: 19px; }

  .toasts { left: 12px; right: 12px; }
  .toast { max-width: none; }
  .cookie-banner { left: 12px; bottom: 12px; width: calc(100vw - 24px); }
  .to-top { right: 14px; bottom: 14px; }
  body.has-cookie .to-top { bottom: 200px; }
  .faq-a-inner { padding-left: 18px; }
  .q-bubble--1 { width: 70px; height: 60px; }
  .q-bubble--2 { left: -4px; }
  .q-bubble--3 { right: -4px; }
  .footer-actions { flex-direction: column; align-items: stretch; }
  .footer-actions .btn { width: 100%; }
}

/* --- Низкий вьюпорт (открытая клавиатура) --- */
@media (max-height: 520px) {
  .modal-card--lead .modal-sub { display: none; }
  .modal-card--lead .modal-body { padding: 14px; }
  .modal-card--lead .modal-title { font-size: 16px; }
  .modal-card--lead #leadForm { margin-top: 10px; }
  .modal-card--lead .field { margin-bottom: 8px; }
  .modal-card--lead .field--consent { margin-bottom: 10px; }
  .modal-card--lead .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .modal-card--lead .field input[type="text"], .modal-card--lead .field input[type="tel"] { padding: 10px 12px 10px 38px; }
  .modal-card--lead .check-text { font-size: 10.5px; }
  .modal-card--lead button[type="submit"] { padding: 11px; }
}
html.is-short .modal-card--lead .modal-sub { display: none; }
html.is-short .modal-card--lead .modal-body { padding: 14px; }
html.is-short .modal-card--lead .modal-title { font-size: 16px; }
html.is-short .modal-card--lead #leadForm { margin-top: 10px; }
html.is-short .modal-card--lead .field { margin-bottom: 8px; }
html.is-short .modal-card--lead .field--consent { margin-bottom: 10px; }
html.is-short .modal-card--lead .field-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.is-short .modal-card--lead .field input[type="text"], html.is-short .modal-card--lead .field input[type="tel"] { padding: 10px 12px 10px 38px; }
html.is-short .modal-card--lead .check-text { font-size: 10.5px; }
html.is-short .modal-card--lead button[type="submit"] { padding: 11px; }

@media (max-height: 340px) {
  .modal-card--lead .modal-body { padding: 12px; }
  .modal-card--lead .modal-title { font-size: 15px; }
  .modal-card--lead .field { margin-bottom: 6px; }
  .modal-card--lead .field input[type="text"], .modal-card--lead .field input[type="tel"] { padding: 9px 10px 9px 34px; }
  .modal-card--lead .input-icon { left: 10px; width: 15px; height: 15px; }
  .modal-card--lead .check-text { font-size: 10px; line-height: 1.35; }
  .modal-card--lead button[type="submit"] { padding: 10px; font-size: 13.5px; }
}
html.is-tiny .modal-card--lead .modal-body { padding: 12px; }
html.is-tiny .modal-card--lead .modal-title { font-size: 15px; }
html.is-tiny .modal-card--lead .field { margin-bottom: 6px; }
html.is-tiny .modal-card--lead .field input[type="text"], html.is-tiny .modal-card--lead .field input[type="tel"] { padding: 9px 10px 9px 34px; }
html.is-tiny .modal-card--lead .input-icon { left: 10px; width: 15px; height: 15px; }
html.is-tiny .modal-card--lead .check-text { font-size: 10px; line-height: 1.35; }
html.is-tiny .modal-card--lead button[type="submit"] { padding: 10px; font-size: 13.5px; }

@media (max-width: 359px) {
  body { font-size: 15px; }
  .hero-title { font-size: 1.3rem; }
  .sec-title { font-size: 1.25rem; }
  .pensioner-badge { font-size: 12px; padding: 8px 12px; }
  .trust-item { font-size: 12.5px; }
  .stat-value { font-size: 1.35rem; }
  .stat-label { font-size: 11.5px; }
  .price-value { font-size: 12.5px; padding: 7px 10px; }
  .price-name { font-size: 13.5px; }
  .header-phone { display: none; }
  .btn--lg { padding: 14px 20px; font-size: 15px; }
  .review-card { padding: 18px; }
  .rating-card { padding: 12px 16px; }
  .rating-num { font-size: 28px; }
  .fact-card p { font-size: 11.5px; }
  .faq-q-text { font-size: 13.5px; }
  .modal-card--lead { width: 100%; }
  .request-mail { font-size: 14px; }
}

/* ---------- prefers-reduced-motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .marquee-track, .marquee { animation: none; }
  .hero-canvas { display: none; }
  .hero-decor--accent, .hero-decor--brand, .hero-skyline { transform: none; }
}