/* Общая основа вариантов: сброс и функциональные блоки (формы, калькулятор, модалки, FAQ).
   Внешний вид задаётся токенами в styles.css каждого варианта. */
:root {
  --bg: #fff;
  --fg: #111;
  --muted: color-mix(in srgb, var(--fg) 62%, transparent);
  --surface: #fff;
  --line: color-mix(in srgb, var(--fg) 14%, transparent);
  --accent: #111;
  --accent-fg: #fff;
  --danger: #c8372d;
  --radius: 16px;
  --radius-sm: 10px;
  --btn-radius: 999px;
  --font-body: system-ui, sans-serif;
  --font-display: var(--font-body);
  --wrap: 1240px;
  --header-h: 76px;
  --header-bg: color-mix(in srgb, var(--bg) 88%, transparent);
  --modal-bg: var(--surface);
  --modal-fg: var(--fg);
  --logo-ink: var(--fg);
  --logo-sun: var(--mark);
  --logo-h: 34px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure, fieldset { margin: 0; padding: 0; }
fieldset { border: 0; min-width: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--font-display); text-wrap: balance; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.section { padding-block: clamp(64px, 9vw, 128px); }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Логотип */
.logo { display: inline-flex; flex-shrink: 0; }
.logo svg { height: var(--logo-h); width: auto; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: var(--header-h); }
.nav { display: none; align-items: center; gap: 28px; font-size: 14px; font-weight: 600; }
.nav a { transition: opacity .2s; }
.nav a:hover { opacity: .6; }
.header-actions { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.header-phone { display: none; align-items: center; gap: 10px; line-height: 1.2; }
.header-phone svg { width: 18px; height: 18px; }
.header-phone span { display: flex; flex-direction: column; }
.header-phone strong { font-size: 15px; white-space: nowrap; }
.header-phone small { font-size: 11px; color: var(--muted); }
.header-cta { display: none; }
.menu-toggle { position: relative; width: 44px; height: 44px; flex-shrink: 0; }
.menu-toggle span { position: absolute; left: 11px; right: 11px; height: 2px; background: currentColor; transition: transform .25s, top .25s; }
.menu-toggle span:first-child { top: 17px; }
.menu-toggle span:last-child { top: 25px; }
.menu-toggle.is-open span:first-child { top: 21px; transform: rotate(45deg); }
.menu-toggle.is-open span:last-child { top: 21px; transform: rotate(-45deg); }
.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-menu nav { display: flex; flex-direction: column; padding-block: 16px 24px; font-size: 18px; font-weight: 600; }
.mobile-menu nav > a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--line); }
.mobile-menu .menu-phone { display: flex; flex-direction: column; }
.mobile-menu .menu-phone small { font-size: 12px; font-weight: 400; color: var(--muted); }
.mobile-menu .btn { margin-top: 18px; }
@media (min-width: 560px) { .header-cta { display: inline-flex; } }
@media (min-width: 768px) { .header-phone { display: flex; } }
@media (min-width: 1080px) {
  .nav { display: flex; }
  .header-actions { margin-left: 0; }
  .menu-toggle, .mobile-menu { display: none !important; }
}

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 14px 28px;
  border: 1.5px solid transparent; border-radius: var(--btn-radius);
  font-weight: 600; font-size: 16px; line-height: 1.2; text-align: center;
  transition: transform .2s, background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: .6; cursor: progress; transform: none; }
.btn-sm { min-height: 42px; padding: 9px 18px; font-size: 14px; }
.btn-primary, .btn-accent { background: var(--accent); color: var(--accent-fg); }
.btn-secondary { border-color: currentColor; }
.btn-light { background: #fff; color: #111; }
.btn-block { width: 100%; }

/* Поля */
.field { display: block; }
.field > span { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.field > div {
  display: flex; align-items: center; gap: 8px; padding: 0 16px;
  border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, currentColor 4%, transparent);
  transition: border-color .2s;
}
.field > div:focus-within { border-color: var(--accent); }
.field input { flex: 1; min-width: 0; height: 54px; border: 0; outline: 0; background: transparent; font-size: 17px; font-weight: 500; }
.field input::placeholder { color: color-mix(in srgb, currentColor 40%, transparent); }
.field input[aria-invalid] { color: var(--danger); }
.field i { font-style: normal; font-size: 14px; color: color-mix(in srgb, currentColor 55%, transparent); }
.field + .field, .lead-field-error + .field { margin-top: 18px; }
.field-grid { display: grid; gap: 18px; }
.field-grid .field { margin-top: 0; }
@media (min-width: 560px) { .field-grid { grid-template-columns: 1fr 1fr; } }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 22px; font-size: 12.5px; line-height: 1.5; color: color-mix(in srgb, currentColor 70%, transparent); }
.consent input { flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.consent a { text-decoration: underline; text-underline-offset: 3px; }
.lead-field-error { margin-top: 6px; font-size: 13px; color: var(--danger); }
.form-note { margin-top: 18px; font-size: 12px; line-height: 1.5; color: color-mix(in srgb, currentColor 50%, transparent); }
.form-message { margin-top: 16px; font-size: 14px; }
/* Ловушка для ботов: поле есть в DOM, но человек его не видит. display:none не используем — боты его распознают. */
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-message.is-error { color: var(--danger); }
[data-lead-form] .btn { margin-top: 26px; }

/* Калькулятор */
.calculator-tabs { display: flex; gap: 6px; padding: 5px; margin-bottom: 26px; border-radius: var(--btn-radius); background: color-mix(in srgb, currentColor 7%, transparent); }
.calc-tab { flex: 1; padding: 11px 12px; border-radius: var(--btn-radius); font-size: 14px; font-weight: 600; line-height: 1.2; transition: background .2s, color .2s; }
.calc-tab.is-active { background: var(--accent); color: var(--accent-fg); }
.calc-form fieldset { margin-top: 22px; }
.calc-form legend { margin: 0 0 12px; padding: 0; font-size: 13px; font-weight: 600; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-group input { position: absolute; opacity: 0; pointer-events: none; }
.radio-group span { display: block; padding: 10px 22px; border: 1.5px solid color-mix(in srgb, currentColor 22%, transparent); border-radius: var(--btn-radius); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.radio-group input:checked + span { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.radio-group input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
.calc-form .btn { margin-top: 26px; }
.calc-result { margin-top: 26px; padding: 26px; border-radius: var(--radius); background: var(--accent); color: var(--accent-fg); }
.calc-result .micro-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.calc-result strong { display: block; margin: 8px 0 10px; font-family: var(--font-display); font-size: clamp(36px, 5vw, 54px); line-height: 1.05; }
.calc-result p { font-size: 15px; line-height: 1.55; opacity: .85; }
.calc-result p + p { margin-top: 8px; }
.calc-note { margin-top: 18px; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* FAQ */
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 0; font-family: var(--font-display); font-size: clamp(18px, 2vw, 22px); font-weight: 600; line-height: 1.3; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex-shrink: 0; font-family: var(--font-body); font-size: 28px; font-weight: 300; line-height: 1; transition: transform .25s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details > div { max-width: 820px; padding: 0 0 26px; color: var(--muted); }

/* Модальные окна */
.story-modal { width: min(100% - 24px, 860px); max-height: min(100dvh - 24px, 920px); padding: 0; border: 0; border-radius: var(--radius); background: var(--modal-bg); color: var(--modal-fg); overflow: hidden; }
.story-modal::backdrop { background: rgb(8 12 16 / 62%); backdrop-filter: blur(4px); }
.story-modal[open] { display: flex; animation: modal-in .3s cubic-bezier(.2, .7, .2, 1); }
@keyframes modal-in { from { opacity: 0; transform: translateY(20px); } }
.story-modal-shell { position: relative; width: 100%; padding: clamp(28px, 5vw, 56px); overflow-y: auto; }
.story-modal-close { position: sticky; top: 0; float: right; z-index: 2; width: 44px; height: 44px; margin: -8px -8px 0 16px; border-radius: 50%; background: color-mix(in srgb, var(--modal-fg) 8%, var(--modal-bg)); font-size: 26px; line-height: 1; }
.story-article .tag { display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.story-article h2 { margin-top: 14px; font-size: clamp(26px, 4vw, 42px); line-height: 1.12; }
.story-modal-lead { margin-top: 20px; font-size: 18px; line-height: 1.6; }
.story-modal-section { margin-top: 36px; padding-top: 28px; border-top: 1px solid color-mix(in srgb, var(--modal-fg) 14%, transparent); }
.story-modal-section h3 { margin-bottom: 14px; font-size: 22px; }
.story-modal-section p, .story-modal-section li { color: color-mix(in srgb, var(--modal-fg) 76%, transparent); }
.story-modal-section p + p { margin-top: 12px; }
.story-modal-section ol { counter-reset: s; display: grid; gap: 12px; }
.story-modal-section li { counter-increment: s; position: relative; padding-left: 38px; }
.story-modal-section li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--modal-fg); font-size: 13px; font-weight: 700; }
.story-modal-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; margin-top: 40px; padding: 26px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--modal-fg) 6%, transparent); }
.story-modal-footer strong { font-family: var(--font-display); font-size: 19px; }
.story-modal-footer p { margin-top: 4px; font-size: 15px; color: color-mix(in srgb, var(--modal-fg) 70%, transparent); }
.pricing-modal { width: min(100% - 24px, 520px); }
.pricing-modal h2, .lead-success-modal h2 { margin-top: 12px; font-size: clamp(26px, 4vw, 34px); line-height: 1.15; }
.pricing-modal .modal-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pricing-modal h2 + p, .lead-success-modal h2 + p { margin: 12px 0 26px; color: color-mix(in srgb, var(--modal-fg) 70%, transparent); }
.lead-success-modal { width: min(100% - 24px, 440px); }
.lead-success-modal h2 + p { margin-bottom: 0; }

/* Кнопка «Наверх» */
.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 48px; height: 48px; border-radius: var(--btn-radius); background: var(--accent); color: var(--accent-fg); font-size: 20px; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .25s, transform .25s; }
.to-top.is-visible { opacity: 1; pointer-events: auto; transform: none; }

/* Подвал */
.footer-grid { display: grid; gap: 40px; padding-block: 56px; }
.footer-grid h3 { margin-bottom: 14px; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.footer-grid .footer-col a { display: block; padding: 5px 0; font-size: 15px; }
.footer-grid .footer-col a:hover { opacity: .65; }
.footer-about { margin-top: 18px; max-width: 300px; font-size: 14px; color: var(--muted); }
.footer-phone { font-family: var(--font-display); font-size: 26px !important; font-weight: 600; white-space: nowrap; }
.footer-hours { margin-top: 4px; font-size: 13px; color: var(--muted); }
.footer-bottom { display: flex; flex-direction: column; gap: 8px; padding-block: 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
@media (min-width: 1080px) { .footer-grid { grid-template-columns: 1.3fr .8fr .8fr 1fr; } }
