:root {
  --bg: #080a0d;
  --panel: #090b0f;
  --text: #f7f8fa;
  --muted: #a7adb7;
  --soft: #d8dce3;
  --hairline: rgba(255,255,255,.13);
  --transition-ms: 700ms;
}

html, body, #app {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body {
  color: var(--text);
  font-family: Inter, Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
img { user-select: none; -webkit-user-drag: none; }

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

.slide-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.004);
  pointer-events: none;
  transition: opacity var(--transition-ms) ease, transform var(--transition-ms) ease;
  background: var(--bg);
}

.slide-layer.is-active {
  z-index: 2;
  opacity: 1;
  transform: scale(1);
}

/* PHOTO AREA ------------------------------------------------------------ */
.photo-shell {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 39%;
  overflow: hidden;
  background: #11151b;
}

.photo-backdrop {
  position: absolute;
  inset: -5%;
  background-position: center;
  background-size: cover;
  filter: blur(34px) brightness(.40) saturate(.78);
  opacity: .58;
  transform: scale(1.1);
}

.vehicle-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.008);
  transition: opacity 850ms ease, transform 7600ms linear;
  will-change: opacity, transform;
}

.vehicle-photo.is-visible {
  opacity: 1;
  transform: scale(1.025);
}

.photo-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8,10,13,.96) 0%, rgba(8,10,13,.64) 6%, rgba(8,10,13,.16) 18%, rgba(8,10,13,0) 34%),
    linear-gradient(0deg, rgba(7,8,10,.30) 0%, rgba(7,8,10,0) 22%);
}

/* BRAND ---------------------------------------------------------------- */
.brand-bar {
  position: absolute;
  top: 5.2vh;
  left: 4.2vw;
  right: 3.4vw;
  z-index: 5;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.brand-mark {
  width: min(15vw, 260px);
  height: min(7vh, 74px);
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left top;
}

.brand-logo.is-missing { display: none; }

.brand-fallback {
  display: none;
  align-items: baseline;
  gap: .48em;
  white-space: nowrap;
  color: #f5f6f8;
  font-weight: 850;
  letter-spacing: .18em;
}

.brand-logo.is-missing + .brand-fallback {
  display: flex;
}

.brand-fallback span,
.brand-fallback small {
  font-size: clamp(14px, 1.25vw, 23px);
  line-height: 1;
  letter-spacing: .18em;
}

.brand-fallback small {
  color: var(--muted);
  font-weight: 700;
}

.brand-meta {
  padding-top: .3vh;
  color: rgba(220,224,231,.62);
  font-size: clamp(11px, .88vw, 17px);
  font-weight: 700;
  letter-spacing: .22em;
}

/* VEHICLE INFORMATION --------------------------------------------------- */
.vehicle-panel {
  position: absolute;
  z-index: 6;
  left: 4.2vw;
  top: 17vh;
  bottom: 5.3vh;
  width: 31.8vw;
  max-width: 620px;
  min-width: 430px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 1.1vh;
  color: #c4cad3;
  font-size: clamp(13px, 1.18vw, 22px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .20em;
  text-transform: uppercase;
}

.vehicle-title {
  margin: 0;
  max-width: 100%;
  color: #fff;
  font-size: clamp(46px, 7.2vh, 78px);
  line-height: .94;
  letter-spacing: -.045em;
  font-weight: 850;
  text-wrap: balance;
  overflow-wrap: normal;
}

.vehicle-trim {
  margin-top: 1.25vh;
  max-width: 28ch;
  color: #b9c0ca;
  font-size: clamp(18px, 2.3vh, 27px);
  line-height: 1.18;
  font-weight: 600;
}

.vehicle-price {
  margin-top: 3.1vh;
  color: #fff;
  font-size: clamp(56px, 8.2vh, 92px);
  line-height: .92;
  letter-spacing: -.045em;
  font-weight: 900;
  white-space: nowrap;
}

.spec-row {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: .85vh .7vw;
  margin-top: 2.5vh;
  max-height: 14vh;
  overflow: hidden;
}

.spec-chip {
  min-width: 0;
  max-width: 100%;
  padding: .62em .9em;
  overflow: hidden;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: #e4e8ed;
  font-size: clamp(12px, 1.02vw, 18px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spec-chip:nth-child(4) {
  flex-basis: auto;
  max-width: 100%;
  font-size: clamp(11px, .9vw, 16px);
}

.cta-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.4vw;
  margin-top: auto;
  padding-top: 2.4vh;
  border-top: 1px solid rgba(255,255,255,.08);
}

.cta-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .7vh;
}

.cta-copy strong {
  color: #f5f6f8;
  font-size: clamp(13px, 1.05vw, 19px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .09em;
}

.cta-copy span {
  color: #939aa5;
  font-size: clamp(10px, .82vw, 15px);
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: .03em;
  white-space: nowrap;
}

.qr-block {
  flex: 0 0 auto;
  text-align: center;
}

.qr-code {
  width: clamp(78px, 6.2vw, 118px);
  height: clamp(78px, 6.2vw, 118px);
  padding: 6px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff;
}

.qr-code img,
.qr-code canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.qr-label {
  margin-top: 6px;
  color: #aeb4bd;
  font-size: clamp(8px, .58vw, 11px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: .14em;
}

/* PROMOS ---------------------------------------------------------------- */
.promo-panel {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 9vh 9vw;
  background:
    radial-gradient(circle at 78% 30%, rgba(150,25,31,.14), transparent 24%),
    radial-gradient(circle at 64% 66%, rgba(255,255,255,.035), transparent 30%),
    linear-gradient(120deg, #07080a 0%, #101319 62%, #090a0d 100%);
}

.promo-panel::after {
  content: '';
  position: absolute;
  right: 8vw;
  top: 14vh;
  width: min(28vw, 540px);
  height: min(28vw, 540px);
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 50%;
  box-shadow: 0 0 0 5vw rgba(255,255,255,.012), 0 0 0 10vw rgba(255,255,255,.008);
}

.promo-kicker {
  position: relative;
  z-index: 1;
  color: #c5cad2;
  font-size: clamp(13px, 1.05vw, 20px);
  font-weight: 800;
  letter-spacing: .25em;
}

.promo-title {
  position: relative;
  z-index: 1;
  margin-top: 2vh;
  max-width: 11ch;
  color: #fff;
  font-size: clamp(56px, 10vh, 108px);
  line-height: .92;
  letter-spacing: -.05em;
  font-weight: 900;
  text-wrap: balance;
}

.promo-subtitle {
  position: relative;
  z-index: 1;
  margin-top: 2.2vh;
  max-width: 34ch;
  color: #cbd0d7;
  font-size: clamp(18px, 2.4vh, 29px);
  line-height: 1.22;
  font-weight: 600;
}

.promo-footer {
  position: absolute;
  left: 9vw;
  bottom: 7vh;
  z-index: 1;
  color: #9299a4;
  font-size: clamp(12px, .95vw, 18px);
  font-weight: 700;
  letter-spacing: .08em;
}

.status-badge {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 100;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  background: rgba(0,0,0,.75);
  color: #d9dee7;
  font: 12px/1.2 monospace;
}

/* 16:9 TV safety -------------------------------------------------------- */
@media (min-aspect-ratio: 1.9/1) {
  .vehicle-panel { width: 30vw; max-width: 590px; }
  .photo-shell { left: 36.5%; }
  .vehicle-title { font-size: clamp(44px, 6.7vh, 72px); }
  .vehicle-price { font-size: clamp(54px, 7.7vh, 86px); }
}

@media (max-aspect-ratio: 1.35/1) {
  .photo-shell { inset: 0; }
  .photo-vignette {
    background: linear-gradient(0deg, rgba(7,8,10,.97) 0%, rgba(7,8,10,.76) 34%, rgba(7,8,10,.12) 68%);
  }
  .vehicle-panel {
    left: 5vw;
    right: 5vw;
    top: auto;
    bottom: 4vh;
    width: auto;
    min-width: 0;
    max-width: none;
    height: 48vh;
  }
  .brand-meta { display: none; }
  .vehicle-title { font-size: clamp(38px, 7vh, 66px); }
  .vehicle-price { font-size: clamp(44px, 8vh, 76px); }
  .cta-row { padding-top: 2vh; }
}

@media (prefers-reduced-motion: reduce) {
  .slide-layer { transition-duration: 250ms; transform: none !important; }
  .vehicle-photo { transition: opacity 350ms ease; transform: none !important; }
}
