/* The data readout belongs to the selected vehicle. */
:root { --vehicle-outline: #b6966b; }

.hero {
  --hero-selector-height: clamp(88px, 15dvh, 137px);
  display: grid;
  isolation: isolate;
  background: var(--ink);
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) var(--hero-selector-height);
  height: calc(100svh - var(--header-reserved-height, var(--header-full-height, 91px)));
  height: calc(100dvh - var(--header-reserved-height, var(--header-full-height, 91px)));
  min-height: 0;
  max-height: none;
}
.hero-layout { position: relative; min-height: 0; min-width: 0; isolation: isolate; container: hero / size; }
.hero-content { position: absolute; left: 0; top: 0; width: 35%; padding: min(55px, 8cqh) 0 0 4.5%; }
.hero h1 { font-size: min(clamp(76px, 6.6vw, 116px), 21cqh); margin: 0 0 min(28px, 4cqh); line-height: .9; }
.hero h1 > span { color: var(--sand-light); }
.hero-description { font-size: 13px; line-height: 1.85; color: #e0e5e8; }
.hero-content .text-link { margin-top: min(25px, 4cqh); font-size: 12px; }
.hero-showcase { position: absolute; left: 29%; right: 4.5%; top: 0; bottom: 0; display: grid; grid-template-columns: minmax(0, 1fr) 222px; gap: 16px; align-items: center; container: showcase / size; }
.vehicle-stage { position: relative; inset: auto; width: 100%; height: 100%; min-width: 0; }
.vehicle-image-wrap { inset: 0 0 0 -16%; height: auto; mask-image: none; }
.vehicle-image-wrap:focus-visible { outline-offset: -5px; }
#hero-model-link:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: .15em; }
.vehicle-image { width: 100%; height: 100%; object-fit: contain; filter: saturate(.84) contrast(1.04) brightness(.96); transition: opacity .55s ease, transform 1s cubic-bezier(.16,1,.3,1), clip-path .85s cubic-bezier(.65,0,.18,1); }
.vehicle-image.vehicle-image--reference { filter: none; }
.hero-specs { --terminal-font: Consolas, 'Courier New', monospace; position: relative; z-index: 4; width: 222px; min-height: 330px; border-left: 1px solid #aa8f7166; padding-left: 22px; color: #eaece8; transition: opacity .2s; }
.hero-specs.is-loading { opacity: .55; }
.hero-specs-heading { min-height: 88px; }
.hero-specs h2 { font-family: var(--display); font-size: 43px; font-weight: 700; line-height: 1; letter-spacing: .2px; min-height: 43px; }
.hero-specs[data-vehicle='qalqon2'] h2 { font-size: 35px; }
.hero-specs[data-vehicle='mbt'] h2 { font-size: 28px; padding-top: 5px; }
.hero-specs[data-vehicle='personnel-transport'] h2 { font-size: 29px; }
.hero-specs #hero-drive { margin-top: 9px; font-family: var(--terminal-font); font-size: 12px; color: #e3cfb6; letter-spacing: .08em; min-height: 20px; }
.hero-spec-note { color: var(--sand-light); font: 500 11px/1.3 var(--sans); }
.hero-specs-data { margin: 0 0 14px; }
.hero-specs-data > div { min-height: 62px; }
.hero-specs-data dt { font-family: var(--terminal-font); font-weight: 400; font-size: 11px; line-height: 1.5; letter-spacing: .04em; color: #d1dbe0; margin: 0 0 4px; text-transform: uppercase; }
.hero-specs-data dd { font-family: var(--terminal-font); font-size: 14px; line-height: 1.55; color: #dae0e2; margin: 0; min-height: 22px; overflow-wrap: normal; }
.type-line { position: relative; }
.type-line.typing::after { content: ''; display: inline-block; width: .45em; height: .8em; margin-left: 3px; background: var(--sand-light); opacity: .8; animation: terminal-cursor .5s steps(1) infinite; }
.hero-details-link { padding: 0; display: inline-flex; align-items: center; gap: 25px; font-size: 11px; color: #ced5d8; min-height: 28px; }
.hero-details-link > span { font-size: 21px; color: var(--sand-light); transition: transform .25s; }
.hero-details-link:hover > span { transform: translate(3px,-3px); }
.hero-bottom { position: relative; inset: auto; height: var(--hero-selector-height); width: 91%; min-width: 0; margin-inline: auto; display: block; border-top: 1px solid #ffffff1c; }
.selector-scroll-shell { position: relative; height: 100%; width: 100%; min-width: 0; }
.selector-scroll-shell::before, .selector-scroll-shell::after { content: ''; position: absolute; top: 2px; bottom: 10px; width: 24px; z-index: 3; pointer-events: none; opacity: 0; transition: opacity .25s; }
.selector-scroll-shell::before { left: -1px; background: linear-gradient(90deg,var(--ink),transparent); }
.selector-scroll-shell::after { right: -1px; background: linear-gradient(270deg,var(--ink),transparent); }
.selector-scroll-shell.scrollable:not(.at-start)::before, .selector-scroll-shell.scrollable:not(.at-end)::after { opacity: 1; }
.vehicle-selectors { height: 100%; width: 100%; display: flex; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-behavior: smooth; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: #aa8f7177 transparent; position: relative; }
.vehicle-selectors::-webkit-scrollbar { height: 3px; }
.vehicle-selectors::-webkit-scrollbar-thumb { background: #aa8f7180; border-radius: 3px; }
.vehicle-selectors.dragging { scroll-behavior: auto; scroll-snap-type: none; cursor: grabbing; }
.vehicle-selector { flex: 1 0 calc(100% / 7); min-width: 142px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; padding: 12px 8px; border: 0; scroll-snap-align: center; user-select: none; color: #c7d2d9; }
.vehicle-selector:last-child { border: 0; }
.vehicle-selector::after { height: 2px; }
.vehicle-selector svg { width: 112px; height: 51px; flex-shrink: 0; color: var(--vehicle-outline); }
.selector-label { margin: 0; text-align: center; font-size: 17px; letter-spacing: .3px; line-height: 1.1; display: block; color: #e0e5e8; }
.selector-label small { display: block; font-size: 9px; font-family: var(--sans); line-height: 1.2; font-weight: 400; color: #c7d2d9; margin: 5px 0 0; }
.vehicle-selector.active .selector-label { color: var(--paper); }
.vehicle-selector.active svg { color: var(--sand-light); }
.vehicle-selector:focus-visible { outline-offset: -5px; }
.vehicle-selectors.dragging .vehicle-selector { cursor: grabbing; }
@keyframes terminal-cursor { 0%,49% { opacity: .8; } 50%,100% { opacity: .1; } }

@media (min-width:1650px) {
  .hero-showcase { grid-template-columns: minmax(0,1fr) 260px; }
  .hero-specs { width: 260px; padding-left: 26px; }
  .hero-specs h2 { font-size: 48px; }
  .hero-specs-data dd { font-size: 16px; }
  .hero-specs-data dt { font-size: 12px; }
  .hero-specs-data > div { min-height: 68px; }
  .hero-specs { min-height: 350px; }
  .vehicle-selector { min-width: 158px; }
  .vehicle-selector svg { width: 124px; height: 56px; }
  .selector-label { font-size: 19px; }
}
@media (max-width:1100px) {
  .hero { --hero-selector-height: clamp(88px, 15dvh, 125px); }
  .hero-content { padding-top: min(43px, 8cqh); width: 38%; }
  .hero h1 { font-size: min(clamp(68px,7.1vw,82px), 21cqh); }
  .hero-description { font-size: 11px; max-width: 230px; }
  .hero-content .text-link { font-size: 11px; }
  .hero-showcase { left: 30%; right: 4.5%; grid-template-columns: minmax(0,1fr) 178px; gap: 12px; }
  .vehicle-image-wrap { inset: 0; }
  .hero-specs { width: 178px; padding-left: 16px; min-height: 320px; }
  .hero-specs h2 { font-size: 35px; }
  .hero-specs[data-vehicle='qalqon2'] h2 { font-size: 29px; }
  .hero-specs[data-vehicle='mbt'] h2 { font-size: 24px; }
  .hero-specs-data dd { font-size: 12px; }
  .hero-specs-data dt { font-size: 10px; }
  .hero-specs #hero-drive { font-size: 11px; }
  .hero-specs-heading { min-height: 84px; }
  .hero-specs-data > div { min-height: 62px; }
}
@media (max-width:800px) {
  .hero { --hero-selector-height: clamp(88px, 15dvh, 126px); }
  .hero-layout { display: grid; grid-template-rows: auto minmax(0, 1fr); }
  .hero-content { position: relative; inset: auto; width: 100%; padding: clamp(14px, 3dvh, 35px) 5% 12px; }
  .hero h1 { font-size: min(clamp(54px,10vw,80px), 7dvh); margin-bottom: min(22px, 2.4dvh); }
  .hero-description { font-size: 12px; }
  .hero-content .text-link { margin-top: 20px; }
  .hero-showcase { position: relative; inset: auto; min-height: 0; margin: 0 5% 8px 0; grid-template-columns: minmax(0,1fr) 195px; gap: 12px; }
  .vehicle-image-wrap { inset: 0; }
  .hero-specs { width: 195px; min-height: 315px; padding-left: 18px; }
  .hero-specs h2 { font-size: 35px; }
  .hero-specs-heading { min-height: 80px; }
  .hero-specs-data dd { font-size: 12px; }
  .hero-specs-data > div { min-height: 59px; }
  .vehicle-selector { min-width: 142px; }
}
@media (max-width:520px) {
  .hero { --hero-selector-height: clamp(88px, 15dvh, 116px); }
  .hero-content { padding: clamp(14px, 3dvh, 30px) 0 8px 5%; }
  .hero h1 { font-size: min(clamp(46px,14.3vw,66px), 7dvh); margin-bottom: min(18px, 2.4dvh); }
  .hero-description { font-size: 11px; line-height: 1.8; max-width: 270px; }
  .hero-content .text-link { font-size: 10px; margin-top: 14px; }
  .hero-content .arrow-disc { width: 25px; height: 25px; }
  .hero-showcase { inset: auto; margin: 0 5% 5px 0; grid-template-columns: minmax(0,1fr) 141px; gap: 2px; }
  .vehicle-image-wrap { inset: 0; mask-image: none; }
  .hero-specs { width: 141px; height: auto; min-height: 0; padding-left: 12px; }
  .hero-specs-heading { min-height: 66px; }
  .hero-specs h2 { font-size: 29px; min-height: 29px; }
  .hero-specs[data-vehicle='qalqon2'] h2 { font-size: 24px; }
  .hero-specs[data-vehicle='mbt'] h2 { font-size: 23px; padding-top: 0; line-height: .95; }
  .hero-specs #hero-drive { font-size: 10px; margin-top: 5px; min-height: 17px; }
  .hero-specs-data { margin-bottom: 7px; }
  .hero-specs-data > div { min-height: 53px; }
  .hero-specs-data dt { font-size: 9px; margin-bottom: 3px; }
  .hero-specs-data dd { font-size: 11px; line-height: 1.45; min-height: 17px; }
  .hero-specs[data-vehicle='mbt'] .hero-specs-heading { min-height: 74px; }
  .hero-specs[data-vehicle='mbt'] .hero-specs-data > div { min-height: 60px; }
  .hero-details-link { font-size: 10px; gap: 20px; }
  .hero-details-link > span { font-size: 18px; }
  .hero-bottom { width: 90%; }
  .vehicle-selector { min-width: 135px; padding: 10px 7px 13px; }
  .vehicle-selector svg { width: 108px; height: 47px; }
  .selector-label { font-size: 16px; }
  .selector-label small { font-size: 9px; margin-top: 5px; }
}

/* Fit shorter displays by reflowing and tightening content, rather than
   cropping the vehicle or pushing the selector rail below the fold. */
@container hero (max-height: 360px) {
  .hero-description { font-size: 10px; line-height: 1.6; }
  .hero-content .text-link { font-size: 10px; margin-top: min(14px, 4cqh); }
  .hero-content .arrow-disc { width: 24px; height: 24px; }
}
@container showcase (max-height: 360px) {
  .hero-specs { min-height: 0; height: auto; }
  .hero-specs-heading { min-height: 66px; }
  .hero-specs h2 { font-size: 30px; min-height: 30px; }
  .hero-specs[data-vehicle='qalqon2'] h2 { font-size: 25px; }
  .hero-specs[data-vehicle='mbt'] h2 { font-size: 23px; padding-top: 0; }
  .hero-specs-data > div { min-height: 50px; }
  .hero-specs-data dd { font-size: 11px; line-height: 1.45; }
  .hero-specs-data dt { font-size: 9px; }
  .hero-specs-data { margin-bottom: 7px; }
  .hero-specs[data-vehicle='mbt'] .hero-specs-heading { min-height: 70px; }
  .hero-specs[data-vehicle='mbt'] .hero-specs-data > div { min-height: 55px; }
}
@container showcase (max-height: 270px) {
  .hero-specs-heading, .hero-specs[data-vehicle='mbt'] .hero-specs-heading { min-height: 52px; }
  .hero-specs h2 { font-size: 25px; min-height: 25px; }
  .hero-specs[data-vehicle='qalqon2'] h2 { font-size: 21px; }
  .hero-specs[data-vehicle='mbt'] h2 { font-size: 20px; }
  .hero-specs #hero-drive { font-size: 9px; margin-top: 4px; min-height: 15px; }
  .hero-specs-data { display: grid; gap: 8px; margin: 0; }
  .hero-specs-data > div, .hero-specs[data-vehicle='mbt'] .hero-specs-data > div { min-height: 0; }
  .hero-specs-data dd { font-size: 10.5px; line-height: 1.4; min-height: 15px; }
  .hero-specs-data dt { font-size: 8.5px; margin-bottom: 2px; }
  .hero-details-link { display: none; }
}
@media (max-height:700px) {
  .vehicle-selector { padding: 8px 6px; gap: 4px; }
  .vehicle-selector svg { width: 100px; height: 38px; }
  .selector-label { font-size: 14px; }
  .selector-label small { font-size: 8px; margin-top: 3px; }
}
@media (max-width:800px) and (max-height:740px) {
  .hero-description { font-size: 10px; line-height: 1.6; }
  .hero-content .text-link { margin-top: 10px; }
}
@media (max-width:800px) and (max-height:620px) {
  .hero-content { padding: 12px 5% 6px; }
  .hero h1 { font-size: 6.5dvh; margin-bottom: 8px; }
  .hero-content .text-link { margin-top: 8px; }
}
@media (min-width:600px) and (max-width:800px) and (max-height:500px) {
  .hero-layout { display: block; }
  .hero-content { position: absolute; inset: 0 auto auto 0; width: 34%; }
  .hero h1 { font-size: min(36px, 20cqh); }
  .hero-showcase { position: absolute; inset: 0 3% 0 35%; margin: 0; grid-template-columns: minmax(0,1fr) 135px; gap: 6px; }
  .hero-specs { width: 135px; padding-left: 10px; }
}
@media (prefers-reduced-motion:reduce) {
  .vehicle-selectors { scroll-behavior: auto; }
  .type-line::after { display: none; }
}
