:root, [data-theme="light"] {
  --primary: #4665B9;
  --primary-hover: #37528F;
  --primary-tint: #E5E9F5;
  --teal: #227766;
  --bg: #FBFAF9;
  --surface: #FFFFFF;
  --surface-alt: #F3F2EE;
  --border: #DDE4E4;
  --text: #182125;
  --text-2: #56646B;
  --error: #B4261B;
  --success: #227766;

  --font-display: 'Golos Text', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  --radius: 14px;
  --radius-sm: 10px;
  --section: clamp(2.25rem, 4.5vw, 4rem);
  color-scheme: light;
}

[data-theme="dark"] {
  --primary: #8EA6E6;
  --primary-hover: #AFC1F0;
  --primary-tint: #232C44;
  --teal: #5FC2AC;
  --bg: #121517;
  --surface: #1A1E21;
  --surface-alt: #161A1C;
  --border: #2C3438;
  --text: #E3E7E8;
  --text-2: #9AA6AB;
  --error: #F08A80;
  --success: #5FC2AC;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --primary: #8EA6E6; --primary-hover: #AFC1F0; --primary-tint: #232C44; --teal: #5FC2AC;
    --bg: #121517; --surface: #1A1E21; --surface-alt: #161A1C; --border: #2C3438;
    --text: #E3E7E8; --text-2: #9AA6AB; --error: #F08A80; --success: #5FC2AC;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--text-base); line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: var(--text-2xl); font-weight: 700; }
h2 { font-size: var(--text-xl); font-weight: 700; margin-bottom: 1.25rem; }
h3 { font-size: var(--text-lg); font-weight: 600; }
p { margin: 0; text-wrap: pretty; }
a { color: var(--primary); }
.muted { color: var(--text-2); }
.visually-hidden, .hp { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 2.5rem); margin-inline: auto; }
.narrow { width: min(760px, 100% - 2.5rem); }

/* Шапка */
.header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.header__row { display: flex; align-items: center; gap: 1.5rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand__mark { width: 34px; height: 34px; color: #4665B9; flex-shrink: 0; }
.brand__name { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; white-space: nowrap; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a { color: var(--text-2); text-decoration: none; font-size: var(--text-sm); font-weight: 500; }
.nav a:hover { color: var(--text); }
.header__actions { display: flex; align-items: center; gap: .75rem; }
.theme { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); border-radius: 10px; cursor: pointer; }
.theme:hover { color: var(--text); }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: 0 1.4rem; border-radius: 12px; font: 600 var(--text-sm)/1 var(--font-body); text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background .18s, border-color .18s, color .18s; white-space: nowrap; }
.btn--primary { background: #4665B9; color: #fff; }
.btn--primary:hover { background: #37528F; }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn--ghost:hover { border-color: var(--text-2); }
.btn--sm { min-height: 40px; padding: 0 1rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

/* Первый экран */
.hero { padding: clamp(1.5rem, 3.5vw, 3rem) 0 var(--section); }
.hero__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(1.25rem, 3.5vw, 3rem); align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: var(--text-sm); font-weight: 600; color: var(--teal); margin-bottom: .9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lead { font-size: var(--text-lg); line-height: 1.5; color: var(--text-2); margin-top: 1rem; max-width: 34em; }
.lead--sm { font-size: var(--text-base); margin: 0 0 1.25rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.facts { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; grid-template-columns: repeat(3, auto); gap: 1rem 2rem; justify-content: start; border-top: 1px solid var(--border); padding-top: 1.25rem; }
.facts li { display: flex; flex-direction: column; gap: 2px; }
.facts b { font-family: var(--font-display); font-weight: 600; font-size: var(--text-base); }
.facts span { color: var(--text-2); font-size: var(--text-xs); }
.hero__media { margin: 0; }
.hero__media img, .split__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; }

/* Секции */
.section { padding: var(--section) 0; }
.section--alt { background: var(--surface-alt); border-block: 1px solid var(--border); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.steps li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.steps__n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--primary-tint); color: var(--primary); font: 700 .95rem/1 var(--font-display); margin-bottom: .75rem; }
.steps h3 { font-size: 1.125rem; margin-bottom: .5rem; }
.steps p { color: var(--text-2); font-size: var(--text-sm); }

/* Цены */
.prices__head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.prices__head h2 { margin-bottom: .5rem; }
.city select { font: 500 var(--text-sm) var(--font-body); color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; min-height: 44px; padding: 0 2.25rem 0 .9rem; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.prices__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 1.25rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.25rem, 3vw, 2rem); }
.card h3 { margin-bottom: 1rem; }
.price { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums lining-nums; }
.price td { padding: .65rem 0; border-bottom: 1px solid var(--border); vertical-align: top; }
.price tr:last-child td { border-bottom: 0; }
.price td:first-child { padding-right: 1rem; }
.price td:last-child { text-align: right; font-weight: 600; white-space: nowrap; font-family: var(--font-display); }
.price small { display: block; color: var(--text-2); font-size: var(--text-xs); font-weight: 400; }
.note { color: var(--text-2); font-size: var(--text-xs); margin-top: .75rem; }
.includes { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); font-size: var(--text-sm); color: var(--text-2); }
.includes b { color: var(--text); font-weight: 600; }

/* Клинерам */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.25rem, 3.5vw, 3rem); align-items: center; }
.split__media { margin: 0; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .9rem; }
.ticks li { position: relative; padding-left: 1.75rem; color: var(--text-2); font-size: var(--text-sm); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .45em; width: 14px; height: 8px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }
.ticks b { color: var(--text); font-weight: 600; }

/* Вопросы */
details { border-bottom: 1px solid var(--border); }
details:first-of-type { border-top: 1px solid var(--border); }
summary { cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0; font-weight: 600; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--text-2); }
details[open] summary::after { content: "−"; }
details p { padding: 0 0 1.25rem; color: var(--text-2); max-width: 62ch; }

/* Заявка */
.lead-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.25rem, 3.5vw, 3rem); align-items: start; }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: clamp(1.25rem, 2.5vw, 1.75rem); display: grid; gap: .9rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 0; padding: 4px; margin: 0; background: var(--surface-alt); border-radius: 12px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 42px; border-radius: 9px; font-size: var(--text-sm); font-weight: 600; color: var(--text-2); text-align: center; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border); }
.seg input:focus-visible + span { outline: 2px solid var(--primary); }
.field { display: grid; gap: .4rem; }
.field label { font-size: var(--text-sm); font-weight: 500; }
.field input, .field textarea { font: inherit; font-size: 1rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: .75rem .9rem; min-height: 48px; width: 100%; }
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-tint); }
.field[hidden] { display: none; }
.consent { display: flex; gap: .65rem; align-items: flex-start; font-size: var(--text-xs); color: var(--text-2); line-height: 1.5; }
.consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: #4665B9; flex-shrink: 0; }
.form__status { font-size: var(--text-sm); min-height: 1.5em; }
.form__status.is-error { color: var(--error); }
.form__status.is-ok { color: var(--success); font-weight: 600; }
.is-invalid { border-color: var(--error) !important; }

.footer { border-top: 1px solid var(--border); padding: 1.5rem 0; font-size: var(--text-xs); color: var(--text-2); }
.footer__row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer a { color: var(--text-2); }
.footer__docs { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: .75rem; }

/* Политика */
.doc { padding: clamp(2rem, 5vw, 4rem) 0 var(--section); }
.doc h1 { font-size: var(--text-xl); margin-bottom: 1.5rem; }
.doc h2 { font-size: var(--text-lg); margin: 2rem 0 .75rem; }
.doc p, .doc li { color: var(--text-2); max-width: 70ch; }
.doc p + p { margin-top: .75rem; }

@media (max-width: 960px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .hero__grid, .split, .lead-grid, .prices__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .steps { gap: .75rem; }
  .nav { display: none; }
  .header__actions { margin-left: auto; }
}
@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: .5rem; }
  .facts li { flex-direction: row; align-items: baseline; gap: .5rem; flex-wrap: wrap; }
  .hero__cta .btn { flex: 1 1 100%; }
  .header__actions .btn--sm { display: none; }
}
