/* Пригон авто под ключ — премиальная система: графит + металлик + один красный акцент */
:root {
  --bg: #f4f4f1; --card: #ffffff; --ink: #0e1116; --ink-2: #2a2f37; --muted: #5d6572; --line: #e4e4de;
  --dark: #0b0d11; --dark-2: #151920; --dark-line: #262b33; --on-dark: #eef0f3; --on-dark-muted: #9aa3af;
  --accent: #e5462e; --accent-2: #c7341f; --accent-ink: #fff;
  --ok: #17794a; --ok-bg: #e8f5ee; --bad: #b3261e; --bad-bg: #fcebe9;
  --radius: 18px; --max: 1160px;
  --shadow-sm: 0 1px 2px rgba(14,17,22,.04), 0 2px 8px rgba(14,17,22,.04);
  --shadow: 0 1px 2px rgba(14,17,22,.05), 0 12px 32px -8px rgba(14,17,22,.12);
  --font: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { letter-spacing: -.02em; font-weight: 800; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }

/* ---------- Шапка ---------- */
header.top { position: sticky; top: 0; z-index: 20; background: rgba(244,244,241,.82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid var(--line); }
header.top.on-dark { background: var(--dark); border-bottom-color: var(--dark-line); color: var(--on-dark); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; min-height: 64px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; text-decoration: none; font-size: 18px; letter-spacing: -.01em; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.logo-text span { color: var(--accent); }
nav.menu { display: flex; gap: 6px 20px; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
nav.menu a { text-decoration: none; color: var(--muted); transition: color .15s; }
header.top.on-dark nav.menu a { color: var(--on-dark-muted); }
nav.menu a:hover, header.top.on-dark nav.menu a:hover { color: var(--accent); }
@media (max-width: 700px) { nav.menu { font-size: 14px; gap: 4px 14px; padding-bottom: 10px; } }

.crumbs { font-size: 14px; color: var(--muted); margin: 20px auto 0; }
.crumbs a { color: var(--muted); }

/* ---------- Тёмный главный экран ---------- */
.band-dark { background:
    radial-gradient(900px 480px at 78% 30%, rgba(229,70,46,.16), transparent 60%),
    radial-gradient(700px 420px at 10% 0%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
  color: var(--on-dark); border-bottom: 1px solid var(--dark-line); }
.hero-home { display: grid; grid-template-columns: 1fr 1.05fr; gap: 32px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
@media (max-width: 900px) { .hero-home { grid-template-columns: 1fr; padding-top: 28px; padding-bottom: 36px; gap: 8px; } .car-scene { order: -1; } }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 14px; }
.hero-home h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; margin: 0 0 18px; color: #fff; }
.hero-home .lead { font-size: 18px; color: var(--on-dark-muted); margin: 0 0 26px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-cta .btn { margin-top: 0; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--dark-line); }
.stats div { margin: 0; }
.stats dt { font-size: 26px; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.stats dd { margin: 2px 0 0; font-size: 13px; color: var(--on-dark-muted); line-height: 1.35; }
@media (max-width: 480px) { .stats dt { font-size: 21px; } }

/* ---------- Машина ---------- */
.car-scene { position: relative; }
.car-scene svg { display: block; width: 100%; height: auto; }
.route { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; justify-content: center; font-size: 14px; color: var(--on-dark-muted); margin-bottom: 0; }
.route-words { position: relative; display: inline-block; height: 1.6em; min-width: 7.5em; overflow: hidden; vertical-align: bottom; }
.route-words b { position: absolute; left: 0; right: 0; text-align: center; color: #fff; opacity: 0; animation: word 9s infinite; }
.route-words b:nth-child(2) { animation-delay: 3s; }
.route-words b:nth-child(3) { animation-delay: 6s; }
@keyframes word { 0% { opacity: 0; transform: translateY(100%); } 4%, 30% { opacity: 1; transform: none; } 34%, 100% { opacity: 0; transform: translateY(-100%); } }
.hp-chip { position: absolute; top: 44px; right: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: var(--on-dark); font-size: 13px; padding: 7px 12px; border-radius: 999px; animation: float 4s ease-in-out infinite; }
.hp-chip b { color: #ff8a73; }
.dashes rect { fill: #3a414d; }
.dashes { animation: road .7s linear infinite; }
@keyframes road { to { transform: translateX(-90px); } }
.wheel { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(-360deg); } }
.car { animation: bob .5s ease-in-out infinite alternate; }
@keyframes bob { to { transform: translateY(1.5px); } }
.beam { animation: beam 3s ease-in-out infinite; }
@keyframes beam { 0%, 100% { opacity: .5; } 50% { opacity: .95; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .dashes, .wheel, .car, .beam, .hp-chip { animation: none; }
  .route-words b { animation: none; opacity: 0; } .route-words b:first-child { opacity: 1; }
}

/* ---------- Обычные страницы ---------- */
.hero { padding: 40px 0 8px; }
.hero h1 { font-size: clamp(30px, 4.6vw, 48px); line-height: 1.08; margin: 0 0 14px; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 720px; margin: 0 0 18px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.badges li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }

.grid2 { display: grid; grid-template-columns: 1.1fr 1fr; gap: 24px; align-items: start; margin: 32px 0; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.card h2 { margin-top: 0; font-size: 24px; }
#calc, #quiz { box-shadow: var(--shadow); scroll-margin-top: 84px; }

form label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafaf8; color: var(--ink); transition: border-color .15s, background .15s; }
input:hover, select:hover { border-color: #d2d2ca; }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; background: #fff; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row3 { grid-template-columns: 1fr 1fr; } }
#calc.no-ice .ice-only { opacity: .45; pointer-events: none; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px; padding: 15px 22px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; background: var(--ink); color: #fff; margin-top: 18px; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: linear-gradient(180deg, #ef5a41 0%, var(--accent) 55%, var(--accent-2) 100%); color: var(--accent-ink); box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 24px -8px rgba(229,70,46,.6); }
.btn-accent:hover { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 30px -8px rgba(229,70,46,.7); }
.btn-ghost-dark { background: rgba(255,255,255,.06); color: var(--on-dark); border: 1px solid rgba(255,255,255,.16); }
.btn-ghost-dark:hover { background: rgba(255,255,255,.12); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); }

.breakdown { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 16px; font-variant-numeric: tabular-nums; }
.breakdown td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.breakdown td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.breakdown tr.sum td { font-weight: 800; border-bottom: 0; font-size: 19px; padding-top: 14px; }
.ok { background: var(--ok-bg); color: var(--ok); padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.bad { color: var(--bad); }
.bad-box, .warn { background: var(--bad-bg); color: var(--bad); padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.quiz-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--muted); }
.quiz-head b { color: var(--ink); }
.progress { height: 6px; background: #eeeee9; border-radius: 99px; overflow: hidden; margin: 10px 0 16px; }
#quiz-progress { height: 100%; width: 20%; background: linear-gradient(90deg, #ef5a41, var(--accent-2)); transition: width .3s; }
.step h3 { margin: 4px 0 12px; font-size: 21px; }
.opts { display: grid; gap: 8px; }
.opts label { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 16px; font-weight: 500; cursor: pointer; background: #fafaf8; transition: border-color .15s, background .15s; }
.opts label:hover { border-color: #d2d2ca; }
.opts input { width: auto; accent-color: var(--accent); }
.opts label:has(input:checked) { border-color: var(--accent); background: #fff4f1; }
.consents label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; font-weight: 400; line-height: 1.45; margin: 8px 0; }
.consents input { width: auto; margin-top: 2px; accent-color: var(--accent); }
.nav-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.hp { position: absolute; left: -5000px; }

.section { margin: 64px 0; }
.section h2 { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.12; margin: 0 0 20px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .cards3 { grid-template-columns: 1fr; } }
.cards3 .card { transition: transform .2s, box-shadow .2s; }
.cards3 .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.cards3 .card h3 { margin: 0 0 10px; font-size: 22px; }
.cards3 .card a { font-weight: 700; color: var(--accent); text-decoration: none; }
.steps-list { counter-reset: s; list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 700px) { .steps-list { grid-template-columns: 1fr; } }
.steps-list li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 20px 70px; position: relative; box-shadow: var(--shadow-sm); }
.steps-list li::before { content: "0" counter(s); position: absolute; left: 20px; top: 18px; font-weight: 800; font-size: 22px; color: var(--accent); letter-spacing: -.02em; }

article.prose { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 44px); margin: 24px 0; box-shadow: var(--shadow-sm); }
article.prose h1 { font-size: clamp(28px, 4vw, 42px); line-height: 1.1; margin-top: 0; }
article.prose h2 { font-size: 26px; margin-top: 36px; }
article.prose table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; font-variant-numeric: tabular-nums; }
article.prose th { background: #f7f7f4; font-weight: 700; }
article.prose th, article.prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 20px; margin: 10px 0; box-shadow: var(--shadow-sm); }
details summary { font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; transition: transform .2s; }
details[open] summary::after { transform: rotate(45deg); }

footer.bottom { margin-top: 72px; padding: 36px 0 48px; background: var(--dark); color: var(--on-dark-muted); font-size: 14px; }
footer.bottom a { color: var(--on-dark); text-decoration: none; }
footer.bottom a:hover { color: var(--accent); }
footer.bottom .links { display: flex; gap: 10px 22px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- Флаги и реальные цены ---------- */
.flag { width: 30px; height: 20px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(14,17,22,.12); flex: none; }
.flag-h { display: flex; align-items: center; gap: 12px; }
.ex-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 14px; }
@media (max-width: 1000px) { .ex-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .ex-grid { grid-template-columns: 1fr; } }
.ex-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; }
.ex-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.ex-top { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.ex-date { margin-left: auto; font-weight: 500; }
.ex-card h3 { font-size: 19px; margin: 14px 0 2px; line-height: 1.2; }
.ex-card h3 span { color: var(--muted); font-weight: 600; }
.ex-spec { margin: 0; font-size: 14px; color: var(--muted); }
.ex-price { margin: 14px 0 0; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ex-note { margin: 0; font-size: 12px; color: var(--muted); }

/* ---------- Кадр/видео машины ---------- */
.stage { position: relative; margin-top: 6px; }
.car-media { display: block; width: 100%; height: auto; aspect-ratio: 1024 / 572; object-fit: cover;
  /* растворяем кадр во всех четырёх краях: две линейные маски, пересечение */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%), linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 72%, transparent 100%), linear-gradient(to right, transparent 0, #000 16%, #000 84%, transparent 100%);
          mask-composite: intersect; }
.stage .hp-chip { top: 10px; right: 10px; }

