/* ============================================================
   Выкуп Авто 26 — стили темы (перенос секций из Astro).
   Токены/база/утилиты — в global.css. Здесь: шапка, подвал,
   мессенджеры, герой. Остальные секции добавляются по мере переноса.
   ============================================================ */

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 80; width: 100%; background: rgba(10,10,11,.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.07); transition: background .35s, border-color .35s, backdrop-filter .35s; }
.site-header.is-scrolled { background: rgba(10,10,11,.92); border-bottom-color: rgba(255,255,255,.1); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); }
.hdr-inner { display: flex; align-items: center; gap: 24px; padding-top: 18px; padding-bottom: 18px; transition: padding .35s ease; }
.site-header.is-scrolled .hdr-inner { padding-top: 11px; padding-bottom: 11px; }
.hdr-logo { display: flex; align-items: center; flex-shrink: 0; }
.hdr-logo img { height: 42px; width: auto; transition: height .35s ease; }
.site-header.is-scrolled .hdr-logo img { height: 34px; }
.hdr-nav { display: flex; align-items: center; gap: 22px; margin-left: 4px; }
.nav-link, .nav-trigger { position: relative; font-size: 14px; font-weight: 500; color: var(--nav-dim); letter-spacing: .01em; padding: 6px 0; transition: color .2s; white-space: nowrap; }
.nav-link:hover, .nav-trigger:hover, .nav-item:hover .nav-trigger { color: #fff; }
.nav-link.active, .nav-trigger.active { color: #fff; font-weight: 600; }
.nav-link.active::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px; background: var(--red); }
.nav-item { position: relative; }
.nav-trigger { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; font-family: inherit; }
.nav-trigger .chev { width: 14px; height: 14px; transition: transform .25s; }
.nav-item:hover .nav-trigger .chev, .nav-item[data-open] .nav-trigger .chev { transform: rotate(180deg); }
.nav-dd { position: absolute; top: 100%; left: 0; margin-top: 12px; display: none; background: rgba(13,13,17,.98); border: 1px solid var(--line-2); border-radius: 5px; padding: 12px; min-width: 248px; box-shadow: 0 26px 56px -18px rgba(0,0,0,.85); z-index: 95; }
.nav-item[data-open] .nav-dd { display: block; }
/* Десктоп: дропдаун открывается по наведению (и по фокусу с клавиатуры). */
@media (hover: hover) and (min-width: 1081px) {
  .nav-item:hover > .nav-dd, .nav-item:focus-within > .nav-dd { display: block; }
  /* мостик через зазор margin-top, чтобы курсор не «терял» меню */
  .nav-dd::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
}
.dd-link { display: block; padding: 10px 12px; font-size: 14px; font-weight: 600; color: var(--text-dim); border-radius: 3px; white-space: nowrap; transition: background .15s, color .15s; }
.dd-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-dd--cities { min-width: 580px; left: 50%; transform: translateX(-50%); }
.dd-cities-head { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--text-faint); padding: 4px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.dd-cities { display: grid; grid-template-columns: repeat(3,1fr); gap: 2px 12px; }
.dd-city { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 3px; transition: background .15s; }
.dd-city:hover { background: rgba(255,255,255,.05); }
.dd-city-main { font-size: 14px; font-weight: 600; color: var(--text-dim); transition: color .15s; }
.dd-city:hover .dd-city-main { color: #fff; }
.dd-city-dtp { font-size: 10px; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: .08em; transition: color .15s; flex-shrink: 0; }
.dd-city-dtp:hover { color: var(--red); }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.hdr-phone { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.hdr-phone-top { display: flex; align-items: center; gap: 8px; }
.hdr-phone .num { font-size: 18px; font-weight: 800; color: #fff; letter-spacing: .01em; }
.hdr-247 { font-size: 11px; font-weight: 800; color: #fff; background: var(--red); border-radius: 4px; padding: 2px 6px; letter-spacing: .04em; line-height: 1.3; }
.hdr-phone .lbl { font-size: 11px; font-weight: 600; color: var(--red); text-transform: uppercase; letter-spacing: .18em; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; background: transparent; border: 1px solid rgba(255,255,255,.18); border-radius: 2px; cursor: pointer; padding: 0 11px; }
.nav-toggle span { display: block; height: 2px; background: #fff; transition: transform .25s, opacity .25s; }

@media (max-width: 1080px) {
  .nav-toggle { display: flex; }
  .hdr-nav { position: absolute; top: 100%; left: 0; right: 0; margin-left: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 20px 18px; max-height: calc(100vh - 70px); overflow-y: auto; background: rgba(10,10,11,.98); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); border-bottom: 1px solid var(--line); display: none; }
  .site-header[data-open] .hdr-nav { display: flex; }
  .nav-link { width: 100%; padding: 13px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-link.active::after { display: none; }
  .nav-trigger { width: 100%; justify-content: space-between; padding: 13px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .nav-dd, .nav-dd--cities { position: static; display: none; min-width: 0; margin-top: 0; padding: 4px 0 10px 12px; border: none; border-radius: 0; background: transparent; box-shadow: none; left: auto; transform: none; }
  .nav-item[data-open] .nav-dd { display: block; }
  .dd-cities { grid-template-columns: 1fr 1fr; }
  .dd-link { padding: 10px 6px; }
}
@media (max-width: 560px) {
  .hdr-phone { display: none; }
  .hdr-inner { gap: 14px; }
  .dd-cities { grid-template-columns: 1fr; }
}

/* ---------- Подвал ---------- */
.site-footer { margin-top: 100px; border-top: 1px solid var(--line); padding: 70px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand img { height: 48px; width: auto; }
.footer-brand p { color: var(--text-muted); font-size: 14px; margin-top: 20px; line-height: 1.6; max-width: 280px; }
.footer-col h4 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em; color: var(--text-faint); }
.footer-links { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.footer-links a { font-size: 15px; color: var(--text-dim); transition: color .2s; }
.footer-links a:hover { color: var(--red); }
.footer-contacts { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.footer-contacts .phone { font-size: 22px; font-weight: 800; font-style: italic; color: #fff; }
.footer-contacts .wa { font-size: 15px; color: var(--red); font-weight: 600; }
.footer-contacts a { font-size: 15px; color: var(--text-dim); }
.footer-contacts span { font-size: 15px; color: var(--text-muted); line-height: 1.5; }
.footer-bottom { margin-top: 50px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-bottom span { font-size: 13px; color: var(--text-faint); }
.footer-dev { color: var(--text-muted); transition: color .2s; }
.footer-dev:hover { color: var(--red); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Плавающие мессенджеры ---------- */
.msg-dock { position: fixed; right: 20px; bottom: 22px; z-index: 90; display: flex; flex-direction: column; gap: 14px; }
.msg-btn { position: relative; width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 10px 26px -8px rgba(0,0,0,.6); transition: transform .2s ease; }
.msg-btn svg { width: 28px; height: 28px; display: block; }
.msg-wa { background: #25D366; }
.msg-viber { background: #7360F2; }
.msg-max { background: #fff; }
.msg-max img { width: 34px; height: 34px; display: block; }
.msg-btn:hover { transform: scale(1.08); }
.msg-wa::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25D366; animation: msgPulse 2.4s ease-out infinite; }
@keyframes msgPulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
@media (max-width: 560px) { .msg-dock { right: 14px; bottom: 16px; gap: 12px; } .msg-btn { width: 50px; height: 50px; } .msg-btn svg { width: 25px; height: 25px; } .msg-max img { width: 30px; height: 30px; } }
@media (prefers-reduced-motion: reduce) { .msg-wa::before { animation: none; opacity: 0; } }

/* ---------- Герой ---------- */
.hero { position: relative; min-height: calc(100svh - var(--header-h)); display: flex; flex-direction: column; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero-media { position: absolute; inset: 0 0 0 38%; z-index: 1; overflow: hidden; }
.hero-media-zoom { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-veil { position: absolute; inset: 0; background: linear-gradient(90deg,#0A0A0B 8%,rgba(10,10,11,.78) 32%,rgba(10,10,11,.15) 72%,rgba(10,10,11,.5) 100%); }
.hero-glow { position: absolute; right: 8%; bottom: 14%; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(var(--red-rgb),.32), transparent 65%); filter: blur(20px); animation: vaGlow 5s ease-in-out infinite; pointer-events: none; }
.hero-inner { position: relative; z-index: 2; width: 100%; flex: 1; display: flex; align-items: center; padding-top: 40px; padding-bottom: 40px; }
.hero-content { max-width: 680px; }
.hero-kicker { display: flex; align-items: center; gap: 12px; }
.hero-kicker .bar { width: 34px; height: 2px; background: var(--red); }
.hero-kicker span:last-child { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .24em; color: #fff; }
.hero-title { font-weight: 900; font-style: italic; text-transform: uppercase; font-size: clamp(64px,9vw,140px); line-height: .86; letter-spacing: -.02em; margin: 22px 0 0; }
.hero-lead { font-size: clamp(20px,2.2vw,28px); font-weight: 500; color: var(--text-dim); margin: 26px 0 0; max-width: 540px; line-height: 1.25; }
.hero-lead .accent { color: var(--red); font-weight: 800; font-style: italic; }
.accent { color: var(--red); }
.hero-chips { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.chip { background: var(--surface-2); border: 1px solid rgba(255,255,255,.12); color: #fff; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 15px; letter-spacing: .01em; padding: 12px 26px 12px 18px; clip-path: polygon(0 0,100% 0,calc(100% - 12px) 100%,0 100%); }
.chip--red { background: var(--red); border-color: var(--red); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 38px; }
.hero-stats { position: relative; z-index: 3; width: 100%; margin-top: auto; border-top: 1px solid var(--line); background: linear-gradient(0deg, rgba(10,10,11,.9), transparent); }
.hero-stats-inner { display: flex; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; }
.stat { flex: 1; min-width: 160px; padding: 0 30px; }
.stat:first-child { padding-left: 0; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-num { font-size: 42px; font-weight: 900; font-style: italic; line-height: 1; }
.stat-unit { font-size: 24px; margin-left: 4px; }
.stat-lbl { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .12em; margin-top: 4px; }
@media (max-width: 900px) {
  .hero-media { inset: 0; opacity: .55; }
  .hero-veil { background: linear-gradient(180deg, rgba(10,10,11,.65), rgba(10,10,11,.92)); }
  .hero { min-height: auto; }
  .hero-inner { padding-top: 30px; padding-bottom: 50px; }
}
@media (max-width: 560px) {
  .stat { flex: 1 1 50%; min-width: 0; padding: 12px 16px; }
  .stat:first-child { padding-left: 16px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: none; }
}

/* ---------- Мобильные доработки ---------- */
/* Заголовок/лид героя и кнопки на узких экранах */
@media (max-width: 600px) {
  .hero-title { font-size: clamp(40px, 13.5vw, 76px); }
  .hero-lead { font-size: 17px; line-height: 1.35; }
  .hero-chips .chip { font-size: 13px; padding: 10px 22px 10px 15px; }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 12px; }
  .hero-actions .btn { width: 100%; }
}

/* Нижняя панель действий — только на телефонах/планшетах */
.mobile-bar { display: none; }
@media (max-width: 768px) {
  .mobile-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 92;
    display: flex; gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    background: rgba(10,10,11,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line-2);
  }
  .mbar-btn {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 50px; border-radius: 3px; font-weight: 800; font-style: italic;
    text-transform: uppercase; font-size: 14px; letter-spacing: .02em; white-space: nowrap;
  }
  .mbar-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
  .mbar-call { background: var(--surface-2); color: #fff; border: 1px solid rgba(255,255,255,.18); }
  .mbar-cta { background: var(--red); color: #fff; box-shadow: 0 10px 26px -10px rgba(var(--red-rgb),.8); }
  /* запас снизу, чтобы панель не перекрывала контент/подвал */
  body { padding-bottom: 70px; }
  /* поднимаем мессенджеры над панелью */
  .msg-dock { bottom: 82px; }
}

/* ---------- Согласие на cookie ---------- */
.cookie {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 95;
  max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  background: rgba(18,18,21,.98); border: 1px solid var(--line-2); border-radius: 8px;
  padding: 16px 20px; box-shadow: 0 26px 64px -18px rgba(0,0,0,.85);
  transform: translateY(160%); transition: transform .5s cubic-bezier(.2,.7,.2,1);
}
.cookie.is-on { transform: none; }
/* пока баннер открыт — прячем плавающие мессенджеры, чтобы не перекрывались */
body.va-cookie .msg-dock { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility .3s; }
.cookie p { font-size: 13.5px; line-height: 1.5; color: var(--text-dim); margin: 0; }
.cookie a { color: var(--red); font-weight: 600; }
.cookie .btn { flex-shrink: 0; }
@media (max-width: 768px) {
  .cookie { flex-direction: column; align-items: stretch; bottom: 82px; left: 12px; right: 12px; padding: 16px; gap: 14px; }
  .cookie .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .cookie { transition: none; }
}

/* ============================================================
   Доработки v2 (мобайл, бегущая строка, рендер, посадочные)
   ============================================================ */

/* Шапка: бургер не сжимается; на планшете/мобиле прячем CTA-кнопку */
.nav-toggle { flex-shrink: 0; }
@media (max-width: 1080px) {
  .hdr-actions .btn--red { display: none; }
  .hdr-actions { gap: 12px; }
}

/* Бегущая строка городов */
.cstrip { position: relative; overflow: hidden; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--surface-2), #0c0c0f); }
.cstrip-track { display: flex; align-items: center; width: max-content; animation: vaMarquee 48s linear infinite; will-change: transform; padding: 13px 0; }
.cstrip:hover .cstrip-track { animation-play-state: paused; }
.cstrip-item { display: inline-flex; align-items: center; font-weight: 800; font-style: italic; text-transform: uppercase; font-size: 15px; letter-spacing: .02em; color: #fff; white-space: nowrap; transition: color .2s; }
.cstrip-item:hover { color: var(--red); }
.cstrip-sep { margin: 0 16px; color: var(--red); font-size: 11px; }
@media (max-width: 560px) { .cstrip-item { font-size: 13.5px; } .cstrip-sep { margin: 0 12px; } .cstrip-track { animation-duration: 34s; } }
@media (prefers-reduced-motion: reduce) { .cstrip { overflow-x: auto; } .cstrip-track { animation: none; } }

/* Реалистичный рендер в секции оценки (фолбэк до загрузки 3D / на мобиле) */
.ci-car-img { display: block; width: 100%; max-width: 540px; height: auto; aspect-ratio: 4 / 3; object-fit: cover; margin: 0 auto; border-radius: 8px; border: 1px solid var(--line-2); filter: drop-shadow(0 30px 60px rgba(0,0,0,.5)); transition: opacity .6s ease; }
.ci-stage.is-3d .ci-car-img { opacity: 0; }

/* Нижняя панель: скрыта, выезжает снизу после 2 секций */
@media (max-width: 768px) {
  .mobile-bar { transform: translateY(125%); transition: transform .45s cubic-bezier(.2,.7,.2,1); }
  .mobile-bar.is-on { transform: none; }
}
