/* Public-site visual system. Existing component hooks and admin styles stay intact. */
:root {
  --bg: #f5f3ef;
  --surface: #fcfbf8;
  --surface-2: #efede7;
  --text: #202323;
  --text-muted: #5d605e;
  --text-dim: #6b6d67;
  --border: rgba(47, 44, 36, .12);
  --border-strong: rgba(47, 44, 36, .25);
  --gold: #9a752f;
  --gold-hover: #cfb075;
  --gold-dim: rgba(185, 153, 96, .10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 16px 42px rgba(38, 32, 20, .07);
  --container: 1280px;
  --header-h: 88px;
}

body { font-weight: 500; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b38b43; outline-offset: 4px; }
button, a, input, textarea, select { touch-action: manipulation; }
[hidden] { display: none !important; }
.container { padding-inline: 32px; }
section { padding: 72px 0; }
h1, h2, h3 { text-wrap: balance; }
.section-head { max-width: 760px; margin-bottom: 30px; }
.section-head h2 { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.18; letter-spacing: -.04em; }
.section-head p { max-width: 660px; line-height: 1.65; }
.kicker { font-size: 11px; letter-spacing: .13em; }
.btn { min-height: 48px; border-radius: 8px; padding: 14px 24px; line-height: 1.35; text-align: center; }
.btn-primary { background: linear-gradient(115deg, #c6a56b, #b9985c); color: #171a1a; border-color: #c6a56b; }
.btn-primary:hover { background: #d0b47d; border-color: #d0b47d; }
.btn-outline:hover { background: var(--gold-dim); }
.btn-lg { min-height: 54px; padding: 16px 25px; }

/* Dark sections define their own text/border tokens for shared components. */
.site-header, .mobile-nav, .hero-main, .site-footer, .mobile-cta-bar, .cta-band, .lightbox, .video-modal, .review-card {
  --text: #f5f3ee;
  --text-muted: #babbb7;
  --text-dim: #a4a6a0;
  --gold: #d0b076;
  --border: rgba(255,255,255,.11);
  --border-strong: rgba(255,255,255,.26);
  --surface: #181c1d;
  --surface-2: #242829;
  color: var(--text);
}
.site-header { background: #15191a; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-header .container { gap: 20px; }
.brand img { width: 150px; height: auto; mix-blend-mode: screen; }
.main-nav { gap: 22px; }
.main-nav a { font-size: 13px; white-space: nowrap; position: relative; padding: 18px 0; }
.main-nav a.active { color: var(--gold); }
.main-nav a.active::after { content: ''; position: absolute; bottom: 6px; left: 0; width: 22px; height: 1px; background: var(--gold); }
.header-actions { gap: 8px; }
.header-phone { font-size: 14px; }
.header-hours { font-size: 10px; margin-top: 5px; }
.icon-link { flex-shrink: 0; width: 34px; height: 34px; }
.header-actions .icon-link { width: 30px; height: 30px; }
.icon-link[aria-label="Telegram"] { background: #279ccd; border-color: transparent; }
.icon-link[aria-label="WhatsApp"] { background: #248a51; border-color: transparent; }
.icon-link[aria-label="ВКонтакте"] { background: #276ac7; border-color: transparent; }
.icon-link[aria-label="MAX"] { background: #5854c9; border-color: transparent; }
.icon-link svg { fill: white; }
.icon-link:hover { filter: brightness(1.12); }
.burger { border: 0; border-radius: 6px; width: 44px; height: 44px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { top: 0; transform: rotate(45deg); }
.burger[aria-expanded="true"] span::after { top: 0; transform: rotate(-45deg); }
.mobile-nav { overflow-y: auto; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
.mobile-nav .icon-row a { padding: 0; width: 44px; height: 44px; }

/* Hero: real Mazda image first on mobile, alongside the message on desktop. */
.hero { padding: 0; background: var(--bg); overflow: clip; }
.hero-main { background: #15191a; }
.hero-layout { display: grid; grid-template-columns: .92fr 1.08fr; grid-template-rows: auto auto auto; column-gap: 28px; padding-top: 54px; padding-bottom: 44px; position: relative; }
.hero-heading { grid-column: 1; grid-row: 1; align-self: end; z-index: 1; }
.hero .kicker, .hero h1, .hero .hero-ctas { opacity: 1; transform: none; animation: none; }
.hero h1 { font-size: clamp(38px, 4vw, 58px); line-height: 1.08; letter-spacing: -.05em; margin-top: 16px; font-weight: 800; }
.hero .accent { color: #d0b076; }
.hero-photo { position: relative; grid-column: 2; grid-row: 1 / 4; min-width: 0; min-height: 480px; margin: -30px -32px -20px -20px; }
.hero-photo img { width: 100%; height: 100%; position: absolute; object-fit: cover; object-position: 50% 46%; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 96%, transparent); }
.hero-photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, #15191a 0%, transparent 18%, transparent 70%, #15191a 100%); }
.hero-saving { position: absolute; z-index: 1; bottom: 36px; left: 38px; padding: 14px 18px; border: 1px solid #c6a56b; border-radius: 12px; background: rgba(21,25,26,.85); backdrop-filter: blur(12px); font-size: 12px; line-height: 1.3; }
.hero-saving-value { display: block; color: #d6b779; font-size: 58px; font-weight: 800; line-height: 1.05; letter-spacing: -.05em; margin-bottom: 5px; }
.hero-saving-value small { font-size: 18px; letter-spacing: 0; font-weight: 500; }
.hero-saving-value > span { font-size: .62em; }
.hero-copy { grid-column: 1; grid-row: 2; z-index: 1; }
.hero-description { margin-top: 22px; color: #d3d4ce; font-size: 18px; max-width: 390px; line-height: 1.6; }
.hero-ctas { margin-top: 24px; gap: 12px; flex-wrap: nowrap; }
.hero-ctas .btn { font-size: 14px; flex: 1; gap: 18px; padding-inline: 16px; }
.hero-ctas .btn span { font-size: 22px; line-height: 1; }
.hero-details { grid-column: 1; grid-row: 3; margin-top: 30px; z-index: 1; }
.hero-facts { display: grid; grid-template-columns: repeat(3, 1fr); }
.hero-facts > div { display: grid; grid-template-columns: 26px 1fr; column-gap: 10px; padding-inline: 14px; border-left: 1px solid var(--border-strong); }
.hero-facts > div:first-child { border: 0; padding-left: 0; }
.hero-facts svg { width: 24px; height: 24px; grid-row: 1 / 3; align-self: center; fill: none; stroke: #c5a36a; stroke-width: 1.5; }
.hero-facts b { font-size: 14px; white-space: nowrap; }
.hero-facts span { font-size: 11px; color: var(--text-muted); }
.hero-countries { font-size: 11px; color: var(--text-muted); margin-top: 22px; letter-spacing: .02em; }
.hero-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; margin: 0; padding: 32px 0; border-bottom: 1px solid var(--border); }
.hero-stat { padding: 0 20px; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: transparent; }
.hero-stat:first-child { border: 0; padding-left: 0; }
.hero-stat b { font-size: 23px; color: var(--text); letter-spacing: -.03em; }
.hero-stat span { font-size: 11px; line-height: 1.55; margin-top: 8px; }

/* Original content and carousel behavior, with a lighter presentation. */
#reviews { padding-top: 54px; }
.reviews-grid { gap: 20px; padding: 0 0 12px; }
.review-card { flex-basis: calc((100% - 40px) / 3); aspect-ratio: 9 / 13; }
.review-card img { object-position: center; }
.review-card .overlay { padding: 35px 18px 18px; }
.review-card .tag { font-size: 10px; }
.review-card .note { color: #d1d1cc; }
.video-play-btn { color: white; width: 60px; height: 60px; background: rgba(16,20,20,.55); }
.reviews-nav, .featured-cars-nav { background: #fcfbf8; color: #76603a; border-color: #d5c6a9; }
.reviews-nav { top: -45px; }
.reviews-nav.prev { left: auto; right: 54px; }
.reviews-nav.next { right: 0; }
.reviews-nav[disabled], .featured-cars-nav[disabled] { opacity: .3; }
.featured-cars { margin-top: 48px; }
.bloggers-title { font-size: 28px; letter-spacing: -.035em; }
.featured-cars-grid { padding-inline: 0; }
.featured-cars-grid .car-card { min-width: 0; }
.car-card { border-radius: 12px; box-shadow: 0 3px 12px rgba(38,32,20,.025); }
.car-card .thumb { aspect-ratio: 4 / 3; }
.car-card .thumb .count { color: #fff; }
.car-card .body { padding: 22px; }
.car-card .price b { color: #252824; font-size: 25px; letter-spacing: -.04em; }
.featured-cars-grid .car-card .thumb { aspect-ratio: 16 / 10; }
.featured-cars-grid .car-card .body { padding: 18px 20px; }
.featured-cars-cta { justify-content: flex-end; margin-top: 14px; }
.about-grid { grid-template-columns: 1.35fr 1fr; gap: 48px; }
#about, #finance { background: #efede7; border-block: 1px solid var(--border); }
.about-title { font-size: 38px; letter-spacing: -.04em; }
.founder { width: 185px; }
.founder-photo { box-shadow: none; border: 0; }
.about-text p { font-size: 14px; line-height: 1.8; }
.feature-list { padding-top: 46px; gap: 14px; }
.feature-card { padding: 24px; background: rgba(255,255,255,.42); }
.feature-card .icon, .finance-card .icon { background: transparent; border-radius: 0; justify-content: flex-start; width: 36px; height: 36px; }
.feature-card .icon svg, .finance-card .icon svg { width: 30px; height: 30px; stroke: #a8874d; }
.feature-card p { line-height: 1.65; font-size: 13px; }
.feature-card h3 { line-height: 1.4; }
.path { margin-top: 48px; }
.path-title { font-size: 26px; letter-spacing: -.03em; }
.timeline-line { counter-reset: step; }
.timeline-line::before { background: #ded7ca; height: 1px; top: 22px; }
.timeline-line::after { content: ""; position: absolute; left: 10%; right: 10%; top: 22px; height: 2px; background: #bb9b60; transform: scaleX(var(--path-progress, 0)); transform-origin: left; pointer-events: none; }
.timeline-line .step-content { opacity: 1; transform: none; transition: none; }
@keyframes scroll-enter {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.scroll-enter { animation: scroll-enter 420ms ease-out var(--enter-delay, 0ms) backwards; }
.timeline-line .step { counter-increment: step; }
.timeline-line .step:not(:first-child)::before { display: none; }
.icon-timeline { width: 44px; height: 44px; background: #bb9b60; color: white; font-size: 19px; font-weight: 700; }
.icon-timeline::after { content: counter(step); position: static; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
.icon-timeline svg { display: none; }
.timeline-line .step h4 { line-height: 1.4; }
.timeline-line .step p { line-height: 1.6; font-size: 12px; }
.services-grid { gap: 14px; }
.services-grid .feature-card { padding: 22px; }
.finance-card { border-radius: 12px; padding: 30px; background: #faf9f6; }
.finance-card h3 { margin-bottom: 12px; }
.finance-list li { line-height: 1.6; }
.cta-band { background: #171c1d; padding: 40px; border-radius: 12px; gap: 24px; }
.cta-band h2 { font-size: 29px; line-height: 1.2; }
.cta-band p { font-size: 14px; line-height: 1.6; }
.office-card { position: relative; padding: 26px; background: transparent; }
.office-card::before { content: ''; width: 8px; height: 8px; background: #b9975e; border-radius: 50%; display: block; margin-bottom: 18px; }
.office-phone { color: #565b56; }
.contacts-bar { background: transparent; padding: 24px 0 0; border: 0; border-radius: 0; }
.site-footer { background: #15191a; padding: 48px 0 28px; }
.footer-brand img { width: 180px; height: auto; mix-blend-mode: screen; }
.footer-brand p { font-size: 12px; }
.footer-col h4 { color: #c8b28a; }
.footer-col a, .footer-col span { font-size: 13px; }
.footer-bottom { font-size: 11px; }
.mobile-cta-bar { background: rgba(21,25,26,.97); }
.mobile-cta-bar .btn { min-width: 0; min-height: 44px; padding: 12px 14px; font-size: 12px; }
.review-card:hover, .car-card:hover, .feature-card:hover, .finance-card:hover, .office-card:hover { box-shadow: var(--shadow); }

/* Catalog, application form and policy use the same public theme. */
.page-hero { background: #eeece5; padding: 48px 0; }
.page-hero h1 { font-size: clamp(34px, 4vw, 52px); letter-spacing: -.045em; }
.page-hero p { max-width: 720px; line-height: 1.7; }
.breadcrumbs { flex-wrap: wrap; }
.price-filter { padding: 24px; }
.price-filter-fields { width: 100%; }
.price-filter-field { flex: 1; min-width: 0; }
.price-filter .brand-field { order: -1; }
.price-filter-field input, .price-filter select { width: 100%; min-width: 0; min-height: 48px; background-color: #fff; font-size: 16px; }
.price-filter-count { white-space: normal; }
.cars-grid { padding-top: 32px; gap: 24px; }
.car-card .actions { flex-wrap: wrap; }
.car-card .actions .btn { white-space: normal; }
.prices-cta { padding-bottom: 64px; }
.calc-layout { gap: 64px; padding: 48px 0 72px; }
.form-card { box-shadow: var(--shadow); padding: 32px; }
.form-row input, .form-row textarea { background: #fff; font-size: 16px; }
.form-row label { color: var(--text); }
.calc-step .num { background: #bc9c61; color: #fff; border: 0; }
.calc-step p { line-height: 1.7; }
.policy-body { overflow-wrap: anywhere; }

@media (max-width: 1150px) {
  .main-nav { gap: 16px; }
  .header-actions .icon-link { display: none; }
  .hero-layout { column-gap: 22px; }
  .hero-ctas { flex-wrap: wrap; }
  .hero-facts > div { padding-inline: 9px; column-gap: 6px; }
}
@media (max-width: 980px) {
  :root { --header-h: 76px; }
  .main-nav { display: none; }
  .burger { display: flex; }
  .site-header .header-hours { display: block; }
  .site-header .header-phone { padding: 0; font-size: 14px; }
  .header-actions { gap: 16px; }
  .hero-layout { grid-template-columns: 1fr 1fr; padding-top: 36px; }
  .hero h1 { font-size: 40px; }
  .hero-photo { min-height: 430px; }
  .hero-facts > div { display: flex; flex-direction: column; gap: 4px; }
  .hero-saving { left: 24px; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 24px 0; }
  .hero-stat:nth-child(4) { border: 0; padding-left: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .feature-list { padding: 0; }
  .review-card { flex-basis: calc((100% - 20px) / 2); }
  .featured-cars-grid .car-card { flex-basis: calc((100% - 20px) / 2); max-width: none; }
  .services-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .finance-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
  .finance-card { padding: 24px; }
  .finance-actions .btn { width: 100%; }
  .offices-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
  .office-card { padding: 20px; }
  .office-address { font-size: 13px; }
  .calc-layout { grid-template-columns: 1fr; gap: 32px; }
  .calc-steps { display: grid; grid-template-columns: 1fr 1fr; }
  .calc-side .side-note { margin-top: 24px; }
}
@media (max-width: 768px) {
  .timeline-line { display: block; }
  .timeline-line::before { display: block; width: 1px; height: auto; top: 22px; bottom: 42px; left: 21px; right: auto; }
  .timeline-line::after { width: 2px; height: auto; top: 22px; bottom: 42px; left: 21px; right: auto; transform: scaleY(var(--path-progress, 0)); transform-origin: top; }
  .timeline-line .step { padding: 0; text-align: left; margin-bottom: 22px; }
  .timeline-line .step:last-child { margin-bottom: 0; }
  .step-content { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; }
  .icon-timeline { grid-row: 1 / 3; margin: 0; }
  .timeline-line .step h4 { align-self: end; }
}
@media (max-width: 720px) {
  :root { --header-h: 72px; }
  .container { padding-inline: 20px; }
  section { padding: 44px 0; }
  .site-header .container { gap: 10px; }
  .brand img { width: 120px; }
  .header-actions { gap: 6px; }
  .site-header .header-phone { font-size: 12px; }
  .header-hours { font-size: 9px; }
  .burger { width: 36px; }
  .hero { padding: 0; }
  .hero-layout { display: flex; flex-direction: column; padding: 24px 20px 20px; gap: 0; }
  .hero-heading { align-self: stretch; }
  .hero-heading .kicker { display: none; }
  .hero h1 { font-size: clamp(30px, 8vw, 40px); margin: 0; line-height: 1.08; letter-spacing: -.045em; text-wrap: initial; }
  .hero-photo { width: calc(100% + 40px); height: clamp(235px, 66vw, 360px); min-height: 0; margin: -2px -20px -8px; }
  .hero-photo img { object-fit: cover; object-position: 50% 43%; mask-image: none; }
  .hero-photo::after { background: linear-gradient(180deg, #15191a 0%, transparent 15%, transparent 78%, #15191a 100%); }
  .hero-saving { left: 20px; bottom: 16px; padding: 8px 12px; border-radius: 9px; font-size: 10px; }
  .hero-saving-value { font-size: 39px; margin-bottom: 2px; }
  .hero-saving-value small { font-size: 13px; }
  .hero-description { font-size: 14px; line-height: 1.5; margin-top: 8px; max-width: none; text-align: center; }
  .hero-ctas { margin-top: 16px; flex-direction: column; gap: 10px; }
  .hero-ctas .btn { min-height: 48px; padding: 12px 20px; font-size: 15px; }
  .hero-details { margin-top: 20px; }
  .hero-facts > div { align-items: center; text-align: center; padding: 0 8px; }
  .hero-facts > div:first-child { padding-left: 8px; }
  .hero-facts svg { width: 22px; height: 22px; }
  .hero-facts b { font-size: 13px; }
  .hero-facts span { display: none; }
  .hero-countries { text-align: center; font-size: 10px; line-height: 1.6; margin-top: 16px; }
  .hero-stats { grid-template-columns: 1fr 1fr; padding: 24px 0; gap: 12px; }
  .hero-stat, .hero-stat:first-child, .hero-stat:nth-child(4) { padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
  .hero-stat b { font-size: 22px; }
  .hero-stat span { font-size: 11px; margin-top: 6px; }
  #reviews { padding-top: 36px; }
  .section-head { margin-bottom: 24px; }
  .section-head h2 { font-size: 28px; line-height: 1.2; margin-top: 10px; }
  .section-head p { font-size: 14px; margin-top: 10px; }
  .reviews-grid { gap: 12px; }
  .review-card { flex-basis: 72%; aspect-ratio: 9 / 14; }
  .review-card .overlay { padding: 35px 14px 14px; }
  .reviews-nav { display: none; }
  .featured-cars { margin-top: 32px; }
  .bloggers-title { font-size: 24px; }
  .featured-cars-grid { gap: 12px; }
  .featured-cars-grid .car-card { flex-basis: 84%; max-width: 84%; min-width: 0; }
  .featured-cars-cta { justify-content: stretch; }
  .featured-cars-cta .btn { width: 100%; }
  .about-title { font-size: 32px; }
  .about-lead { flex-direction: row; gap: 16px; }
  .founder { width: 38%; }
  .founder figcaption b { margin-top: 8px; }
  .founder figcaption span { font-size: 11px; }
  .about-text { min-width: 0; }
  .about-text p { font-size: 13px; line-height: 1.7; }
  .feature-list { grid-template-columns: 1fr; gap: 10px; }
  .feature-card { padding: 18px; }
  .feature-list .feature-card { display: grid; grid-template-columns: 34px 1fr; column-gap: 14px; padding: 18px; }
  .feature-list .feature-card .icon { grid-row: 1 / 3; margin: 0; }
  .feature-card h3 { font-size: 15px; }
  .feature-card p { font-size: 12px; }
  .path { margin-top: 32px; }
  .path-title { font-size: 23px; line-height: 1.3; }

  /* Дополнительные услуги и Кредит/Trade-In — на мобильном горизонтальная
     карусель (свайп) вместо стопки карточек, как у отзывов/популярных
     моделей выше по странице. */
  .services-grid, .finance-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 4px 4px 14px;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }
  .services-grid::-webkit-scrollbar, .finance-grid::-webkit-scrollbar {
    display: none;
  }
  .services-grid .feature-card {
    flex: 0 0 78%;
    scroll-snap-align: start;
  }
  .finance-grid .finance-card {
    flex: 0 0 85%;
    scroll-snap-align: start;
  }
  .finance-card { padding: 24px; }
  .finance-card h3 { font-size: 22px; }
  .cta-band { padding: 26px; gap: 22px; }
  .cta-band h2 { font-size: 26px; }
  .cta-band .btn { width: 100%; white-space: normal; }
  .offices-grid { grid-template-columns: 1fr; }
  .office-card { padding: 20px 20px 20px 44px; }
  .office-card::before { position: absolute; top: 28px; left: 20px; }
  .office-card h3 { margin-bottom: 4px; }
  .office-address { font-size: 14px; }
  .office-phone { margin-top: 4px; }
  .contacts-bar { padding-top: 22px; }
  .contacts-socials { gap: 12px; }
  .contacts-phone { width: 100%; }
  .contacts-socials .btn { width: 100%; margin-top: 6px; }
  .site-footer { padding: 36px 0 calc(96px + env(safe-area-inset-bottom)); }
  .footer-cols { gap: 30px; flex-wrap: wrap; }
  .footer-top { gap: 28px; padding-bottom: 24px; }
  .footer-bottom { line-height: 1.6; }
  .mobile-cta-bar { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }
  .mobile-cta-bar .icon-link { width: 32px; height: 32px; }
  .page-hero { padding: 30px 0; }
  .page-hero h1 { font-size: 34px; }
  .page-hero p { font-size: 14px; }
  .price-filter { padding: 20px; margin-top: 24px; }
  .price-filter-fields { align-items: stretch; }
  .price-filter-reset { min-height: 48px; }
  .cars-grid { grid-template-columns: 1fr; padding-top: 24px; }
  .car-card .body { padding: 20px; }
  .calc-layout { padding: 30px 0 48px; }
  .calc-steps { display: flex; }
  .form-card { padding: 22px; }
  .form-row label { font-size: 14px; }
  .form-consent-checkbox { font-size: 12px; }
  .form-card .btn { white-space: normal; }
  .policy-body { padding: 28px 0 48px; }
  .lightbox { padding: 16px; }
  .lightbox-title { gap: 12px; font-size: 14px; }
  .lightbox-close { flex-shrink: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal, .timeline-line .step-content { opacity: 1; transform: none; }
}
