/* B auto / bauto.mn: one stylesheet, mobile first */
:root {
  --snow: #F4F7F9;
  --ink: #13202F;
  --slate: #536273;
  --line: #D3DEE6;
  --petrol: #0B6F78;
  --petrol-dk: #085A61;
  --error: #A8322D;
  --white: #FFFFFF;
  --display: "Unbounded", system-ui, sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: min(1120px, 100% - 40px);
  --sec: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--snow); color: var(--ink); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
a { color: var(--petrol); text-underline-offset: .18em; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1, h2 { font-family: var(--display); letter-spacing: -.02em; }
h2 { font-size: 26px; line-height: 1.1; }
h3 { font-size: 18px; line-height: 1.35; }
p { margin: 0; }
ul { margin: 0; padding: 0; }
:focus-visible { outline: 3px solid var(--petrol); outline-offset: 3px; }
.wrap { width: var(--wrap); margin-inline: auto; }
section[hidden], [hidden] { display: none !important; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  font: 600 17px/1 var(--body); color: var(--white); background: var(--petrol);
  border: 0; border-radius: 6px; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--petrol-dk); }
.btn:disabled { opacity: .7; cursor: progress; }
.text-link { font-weight: 500; }

/* Header */
.top { display: flex; justify-content: space-between; align-items: center; min-height: 64px; }
.logo { font: 800 20px/1 var(--display); color: var(--ink); text-decoration: none; letter-spacing: -.03em; padding: 12px 0; }
.top-phone { font-weight: 600; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; padding: 12px 0; }
.top-phone:hover { color: var(--petrol); }

/* S1 Hero */
.hero { padding-top: 24px; }
.hero h1 { font-size: 44px; line-height: 1; font-weight: 800; letter-spacing: -.04em; }
.lead { margin-top: 16px; max-width: 34ch; color: var(--slate); font-size: 18px; line-height: 1.5; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: 24px; }
.hero-actions .text-link { padding: 12px 0; }
.hero-media { position: relative; margin: 32px -20px 0; aspect-ratio: 16 / 7; display: grid; place-items: end center; overflow: hidden; }
.hero-media .car { width: 96%; margin-bottom: -2px; }
.hero-media:has(.hero-photo) { aspect-ratio: 4 / 3; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ground { height: 1px; background: var(--line); }

/* S2 Range */
.range { padding-block: var(--sec); }
.range-big { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.big-num { font: 800 64px/1 var(--display); letter-spacing: -.04em; color: var(--petrol); font-variant-numeric: tabular-nums; }
.big-unit { font: 600 24px/1 var(--display); color: var(--petrol); }
.big-cap { flex-basis: 100%; margin-top: 8px; color: var(--slate); font-size: 15px; }

.ruler { position: relative; height: 168px; margin: 24px 0 0; }
.places { list-style: none; position: absolute; inset: 0; }
.places li {
  position: absolute; left: calc(var(--km) / 520 * 100%);
  display: flex; flex-direction: column; font-size: 14px; line-height: 1.25; white-space: nowrap;
  transform: translateX(-50%); text-align: center;
}
.places li b { font-weight: 600; }
.places li span { color: var(--slate); font-variant-numeric: tabular-nums; }
.places li::after { content: ""; position: absolute; left: 50%; width: 1px; background: var(--ink); }
.places .up { bottom: calc(50% + 20px); }
.places .up::after { top: 100%; height: 22px; }
.places .down { top: calc(50% + 20px); }
.places .down::after { bottom: 100%; height: 22px; }
.places .ar { transform: translateX(calc(-100% + 10px)); text-align: right; }
.places .ar::after { left: calc(100% - 10px); }
.road { position: absolute; left: 0; right: 0; top: calc(50% - 6px); height: 12px; background: var(--line); border-radius: 2px; overflow: hidden; }
.charge { display: block; height: 100%; width: 100%; background: var(--petrol); border-radius: 2px; transform-origin: left center; }
.js-anim .charge { transform: scaleX(0); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.js-anim.in .charge { transform: scaleX(1); }
.ruler-start, .ruler-end { position: absolute; top: calc(50% + 14px); font: 600 14px/1 var(--display); padding-top: 6px; }
.ruler-start { left: 0; }
.ruler-end { right: 0; color: var(--petrol); }
.note { margin-top: 12px; max-width: 60ch; font-size: 14px; color: var(--slate); }

.specs { display: grid; grid-template-columns: 1fr 1fr; margin: 40px 0 0; border-top: 1px solid var(--line); }
.specs div { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); }
.specs div:nth-child(odd) { border-right: 1px solid var(--line); }
.specs div:nth-child(even) { padding-left: 16px; }
.specs dt { font-size: 14px; color: var(--slate); }
.specs dd { margin: 4px 0 0; font: 600 19px/1.2 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.specs dd.sub { font: 400 14px/1.35 var(--body); color: var(--slate); letter-spacing: 0; }
.disclaimer { margin-top: 16px; font-size: 14px; color: var(--slate); max-width: 70ch; }
.disclaimer .text-link { display: table; margin-top: 12px; padding: 4px 0; font-size: 15px; }

/* Gallery (optional) */
.gallery { padding-bottom: var(--sec); }
.gallery-track { display: grid; grid-auto-flow: column; grid-auto-columns: 84%; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; overscroll-behavior-x: contain; }
.gallery figure { margin: 0; scroll-snap-align: start; }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; background: var(--line); }
.gallery figcaption { margin-top: 8px; font-size: 14px; color: var(--slate); }

/* S3 EV ownership */
.ev { padding-block: var(--sec); border-top: 1px solid var(--line); }
.points { margin-top: 24px; }
.point { padding: 24px 0; border-bottom: 1px solid var(--line); }
.point:last-child { border-bottom: 0; padding-bottom: 0; }
.point p { margin-top: 8px; max-width: 60ch; }
.point .cost { font-weight: 600; }

/* S4 Trims: ink band */
.trims { background: var(--ink); color: var(--snow); padding-block: var(--sec); }
.trims :focus-visible { outline-color: var(--snow); }
.trims a { color: var(--snow); }
.shared-lead { margin-top: 16px; color: var(--line); max-width: 60ch; }
.shared, .plus { list-style: none; }
.shared { margin-top: 12px; display: grid; gap: 8px; }
.shared li, .plus li { position: relative; padding-left: 20px; }
.shared li::before, .plus li::before { content: ""; position: absolute; left: 0; top: .72em; width: 10px; height: 2px; background: #7FC4CB; }
.trim-cols { margin-top: 40px; display: grid; }
.trim { padding: 24px 0; border-top: 1px solid rgba(211,222,230,.35); }
.trim h3 { font: 600 24px/1.1 var(--display); letter-spacing: -.02em; }
.price { margin-top: 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.equip { margin-top: 12px; color: var(--line); }
.plus { margin-top: 8px; display: grid; gap: 6px; font-size: 16px; }
.trim-link { display: inline-block; margin-top: 16px; padding: 10px 0; font-weight: 600; }
.trims-foot { padding-top: 24px; border-top: 1px solid rgba(211,222,230,.35); }

/* S5 FAQ + contact */
.contact { padding-block: var(--sec); }
.contact-grid { display: grid; gap: 64px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq h2 { margin-bottom: 16px; }
.faq summary {
  list-style: none; cursor: pointer; min-height: 56px; padding: 14px 40px 14px 0; position: relative;
  font-weight: 600; font-size: 17px; display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 14px; height: 2px; background: var(--ink); }
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: none; }
.faq details p { padding: 0 0 20px; max-width: 60ch; color: var(--ink); }

.form-lead { margin-top: 12px; color: var(--slate); }
#leadForm { margin-top: 24px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 15px; font-weight: 500; }
.field input, .field select {
  width: 100%; min-height: 48px; padding: 0 14px; font: 400 17px/1.2 var(--body); color: var(--ink);
  background: var(--white); border: 1.5px solid var(--slate); border-radius: 6px; appearance: none;
}
.field select {
  padding-right: 36px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
}
.field input::placeholder { color: #7A8896; }
.field input:focus, .field select:focus { outline: none; border-color: var(--petrol); box-shadow: 0 0 0 3px rgba(11,111,120,.35); }
.field input[aria-invalid="true"] { border-color: var(--error); }
.field-err { font-size: 14px; color: var(--error); }
.field-err:empty { display: none; }
.field-row { display: grid; gap: 16px; }
#leadForm .btn { width: 100%; margin-top: 4px; }
.form-err { font-size: 15px; color: var(--error); }
.form-err:empty, .form-done:empty { display: none; }
.form-done { margin-top: 24px; padding: 20px 0; border-top: 2px solid var(--petrol); font: 600 18px/1.4 var(--body); color: var(--petrol); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; font-size: 15px; color: var(--slate); }
.foot-grid { display: grid; gap: 24px; }
.foot strong { color: var(--ink); font-weight: 600; }
.foot-note { margin-top: 12px; font-size: 14px; max-width: 60ch; }
.foot-links { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; }
.foot-links a { color: var(--ink); font-weight: 500; padding: 10px 0; }

/* Mobile call bar: appears after the hero */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; height: 56px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--petrol); color: var(--white); font-weight: 600; text-decoration: none;
  transform: translateY(100%); visibility: hidden; transition: transform .2s ease, visibility .2s;
}
.callbar span { font-weight: 400; font-variant-numeric: tabular-nums; }
.callbar.show { transform: none; visibility: visible; }
.callbar:focus-visible { outline-color: var(--ink); outline-offset: -6px; }
body.has-callbar { padding-bottom: 56px; }

@media (min-width: 560px) {
  .field-row { grid-template-columns: 1fr 1fr; }
  .gallery-track { grid-auto-columns: 46%; }
}

@media (min-width: 900px) {
  :root { --sec: 96px; }
  body { font-size: 18px; }
  h2 { font-size: 36px; }
  .callbar { display: none; }
  body.has-callbar { padding-bottom: 0; }

  .hero { padding-top: 32px; }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: end; gap: 24px; }
  .hero-text { padding-bottom: 72px; }
  .hero h1 { font-size: clamp(64px, 7.4vw, 104px); }
  .lead { font-size: 20px; max-width: 30ch; }
  .hero-actions { margin-top: 32px; }
  .hero-media { margin: 0 calc((100vw - min(1120px, 100vw - 40px)) / -2) 0 0; aspect-ratio: 16 / 9; }
  .hero-media:has(.hero-photo) { aspect-ratio: 16 / 10; }
  .hero-photo { border-radius: 4px 0 0 0; }
  .hero-media .car { width: 96%; justify-self: start; margin-left: 2%; }

  .big-num { font-size: 96px; }
  .big-unit { font-size: 32px; }
  .big-cap { flex-basis: auto; margin: 0 0 0 12px; font-size: 16px; }
  .ruler { height: 180px; margin-top: 32px; }
  .places li { font-size: 15px; }
  .places .ar { transform: translateX(-50%); text-align: center; }
  .places .ar::after { left: 50%; }
  .ruler-start, .ruler-end { font-size: 15px; }

  .specs { grid-template-columns: repeat(6, 1fr); border-bottom: 1px solid var(--line); }
  .specs div { padding: 20px 16px; border-bottom: 0; border-right: 1px solid var(--line); }
  .specs div:nth-child(even) { padding-left: 16px; }
  .specs div:first-child { padding-left: 0; }
  .specs div:last-child { border-right: 0; }
  .specs dd { font-size: 22px; }

  .gallery-track { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; }
  .gallery-track figure:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .gallery-track figure:first-child:nth-last-child(odd) img { aspect-ratio: 21 / 9; }

  .points { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; margin-top: 40px; }
  .point { padding: 32px 0; }
  .point:nth-last-child(2) { border-bottom: 0; }
  .point:last-child { padding-bottom: 32px; }

  .shared { grid-template-columns: repeat(3, 1fr); column-gap: 32px; }
  .trim-cols { grid-template-columns: 1fr 1fr; margin-top: 48px; border-top: 1px solid rgba(211,222,230,.35); }
  .trim { border-top: 0; padding: 32px 48px 32px 0; }
  .trim + .trim { border-left: 1px solid rgba(211,222,230,.35); padding: 32px 0 32px 48px; }
  .trim h3 { font-size: 30px; }

  .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 80px; align-items: start; }
  .foot-grid { grid-template-columns: 1fr auto; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js-anim .charge { transform: none; transition: none; }
  .callbar { transition: none; }
}

/* Хэрэглэгчийн өгсөн цагаан дэвсгэртэй зураг: бүтэн машиныг харуулж, цагааныг дэвсгэртэй уусгана */
.hero-media:has(.hero-photo) { aspect-ratio: 3 / 2; }
.hero-photo { object-fit: contain; border-radius: 0 !important; background: transparent; }
.hero-media:has(.hero-photo) svg, .hero-media:has(.hero-photo) .car, .hero-media:has(.hero-photo)::before, .hero-media:has(.hero-photo)::after { display: none; }

/* Charging map */
.charge-map { padding-block: 56px; border-top: 1px solid var(--line); }
.cm-lead { margin-top: 12px; color: var(--slate); max-width: 52ch; }
.cm-count { margin-top: 16px; font-size: 15px; color: var(--slate); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.cm-count b { color: var(--ink); font-variant-numeric: tabular-nums; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-left: 8px; }
.lg-dc { background: #0B6F78; } .lg-ac { background: #3F86B0; }
.cm-map { margin-top: 16px; height: 480px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #E9EEF2; z-index: 0; }
.cm-map .leaflet-popup-content { font: 400 14px/1.45 var(--body); color: var(--ink); }
.cm-map .leaflet-popup-content a { color: var(--petrol); font-weight: 600; }
.charge-map .note { margin-top: 12px; }
@media (min-width: 900px) {
  .charge-map { padding-block: 96px; }
  .cm-map { height: 560px; }
}
