/* ============================================================================
   DOZA AUTO GROUP — Luxury FX layer
   Cinematic intro, ambient background, lighting sweeps, scroll reveals,
   card hover physics, cursor polish. All transform/opacity — GPU friendly.
   ============================================================================ */

/* ============================================================================
   1. CINEMATIC INTRO — garage door → logo → lights → ignition → spin → reveal
   ============================================================================ */
html.lux-skip #lux-intro { display: none; }

#lux-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #04070c;
  overflow: hidden;
  perspective: 1100px;
}
#lux-intro.li-done {
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
body.lux-intro-active { overflow: hidden; }

/* --- The garage interior (camera rig — scale = camera push) --- */
.li-room {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.94);
  will-change: transform;
}
#lux-intro.p-inside .li-room {
  transform: scale(1.04);
  transition: transform 2.6s cubic-bezier(0.25, 0.1, 0.2, 1);
}
#lux-intro.p-zoom .li-room {
  transform: scale(1.3);
  transition: transform 0.9s cubic-bezier(0.5, 0, 0.3, 1);
}

/* ambient interior glow that comes alive as the door opens */
.li-room::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 42%, rgba(217, 178, 106, 0.10), transparent 65%),
    radial-gradient(ellipse 90% 40% at 50% 100%, rgba(239, 231, 214, 0.05), transparent 70%);
  opacity: 0;
  transition: opacity 1.8s ease;
}
#lux-intro.p-door .li-room::before { opacity: 1; }

/* concrete floor + reflection line */
.li-floor {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 26%;
  background: linear-gradient(180deg, rgba(217, 178, 106, 0.05), rgba(0, 0, 0, 0.5));
  border-top: 1px solid rgba(239, 231, 214, 0.07);
  opacity: 0;
  transition: opacity 1.6s ease 0.4s;
}
#lux-intro.p-door .li-floor { opacity: 1; }

/* --- Floating metallic logo --- */
.li-logo-wrap {
  position: relative;
  width: min(560px, 74vw);
  transform-style: preserve-3d;
  animation: li-float 5s ease-in-out infinite;
  will-change: transform;
}
.li-logo-spin {
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
}
#lux-intro.p-spin .li-logo-spin {
  transform: rotateY(360deg);
  transition: transform 1.05s cubic-bezier(0.42, 0.05, 0.25, 1);
}
.li-logo { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 50px rgba(0, 0, 0, 0.65)); }

/* moving gold light reflection, masked to the logo artwork itself */
.li-logo-shine {
  position: absolute;
  inset: 0;
  -webkit-mask-image: url('/assets/doza-logo-navy.svg');
  mask-image: url('/assets/doza-logo-navy.svg');
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255, 244, 214, 0.55) 46%,
    rgba(232, 198, 133, 0.75) 50%,
    rgba(255, 244, 214, 0.55) 54%,
    transparent 70%);
  background-size: 280% 100%;
  background-position: 120% 0;
  opacity: 0.5;
  animation: li-shine 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes li-shine {
  0%, 15%  { background-position: 120% 0; }
  55%, 100% { background-position: -60% 0; }
}
@keyframes li-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* ignition vibration */
#lux-intro.p-ignite .li-logo-wrap { animation: li-shake 0.55s linear, li-float 5s ease-in-out 0.55s infinite; }
@keyframes li-shake {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(1.2px, -0.8px); }
  30% { transform: translate(-1.1px, 0.9px); }
  45% { transform: translate(1px, 0.6px); }
  60% { transform: translate(-0.9px, -0.7px); }
  75% { transform: translate(0.7px, 0.5px); }
  90% { transform: translate(-0.5px, -0.3px); }
}

/* --- Head/tail lights on the logo car --- */
.li-headlight, .li-taillight {
  position: absolute;
  width: 3%;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.3);
  pointer-events: none;
}
/* the car illustration sits in the top band of the logo — nose points LEFT */
.li-headlight { left: 8%; top: 16.8%; background: #fff8ea; }
/* taillight is a bar matching the logo's rear light strip, not a dot */
.li-taillight {
  right: 8%;
  top: 14.3%;
  width: 5.5%;
  height: 2.2%;
  aspect-ratio: auto;
  border-radius: 999px;
  background: #ff3b3b;
}
#lux-intro.p-head .li-headlight {
  opacity: 1;
  transform: scale(1);
  box-shadow:
    0 0 10px 4px rgba(255, 248, 234, 0.9),
    0 0 34px 14px rgba(255, 240, 200, 0.55),
    0 0 80px 30px rgba(255, 232, 178, 0.28);
  animation: li-flicker 0.45s ease-out;
}
#lux-intro.p-tail .li-taillight {
  opacity: 1;
  transform: scale(1);
  box-shadow:
    0 0 8px 3px rgba(255, 59, 59, 0.85),
    0 0 26px 10px rgba(255, 40, 40, 0.45),
    0 0 60px 22px rgba(255, 30, 30, 0.2);
  animation: li-flicker 0.45s ease-out;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
@keyframes li-flicker {
  0% { opacity: 0; }
  30% { opacity: 0.9; }
  45% { opacity: 0.25; }
  60% { opacity: 1; }
  75% { opacity: 0.6; }
  100% { opacity: 1; }
}
/* headlight beam cone — projects out to the left of the nose */
.li-beam {
  position: absolute;
  left: -28.5%;
  top: 14.3%;
  width: 36%;
  height: 9%;
  background: linear-gradient(270deg, rgba(255, 244, 214, 0.35), transparent 85%);
  clip-path: polygon(100% 40%, 100% 60%, 0 100%, 0 0);
  opacity: 0;
  filter: blur(2px);
  pointer-events: none;
}
#lux-intro.p-head .li-beam { opacity: 1; transition: opacity 0.5s ease 0.1s; }

/* --- The garage door --- */
.li-door {
  position: absolute;
  inset: 0;
  z-index: 6;
  background:
    repeating-linear-gradient(180deg,
      #131a24 0px, #1a2230 12px, #131a24 88px, #0b1119 92px, #0e141d 96px),
    #10161f;
  box-shadow: inset 0 -60px 120px rgba(0, 0, 0, 0.55);
  transform: translateY(0);
  will-change: transform;
}
/* subtle brushed-metal sheen on the door */
.li-door::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% 46%, rgba(217, 178, 106, 0.06), transparent 70%),
    linear-gradient(100deg, transparent 30%, rgba(239, 231, 214, 0.035) 50%, transparent 70%);
}
/* glowing light leak at the bottom edge of the door */
.li-door::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -3px;
  height: 7px;
  background: linear-gradient(90deg,
    transparent, rgba(232, 198, 133, 0.65) 18%,
    rgba(255, 248, 230, 0.95) 50%,
    rgba(232, 198, 133, 0.65) 82%, transparent);
  filter: blur(3px);
  opacity: 0.25;
  animation: li-leak 1.2s ease-in-out infinite alternate;
}
@keyframes li-leak { from { opacity: 0.2; } to { opacity: 0.6; } }

#lux-intro.p-door .li-door {
  transform: translateY(-102%);
  transition: transform 1.7s cubic-bezier(0.66, 0.03, 0.26, 1);
}

/* door frame stays behind after door lifts */
.li-doorframe {
  position: absolute;
  inset: 0;
  z-index: 7;
  border: 0 solid #05080d;
  border-left-width: clamp(8px, 3vw, 40px);
  border-right-width: clamp(8px, 3vw, 40px);
  border-top-width: clamp(6px, 2vw, 26px);
  box-shadow: inset 0 0 0 1px rgba(217, 178, 106, 0.12);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.8s ease;
}
#lux-intro.p-zoom .li-doorframe { opacity: 0; }

/* --- Dust particles caught in the light --- */
.li-dust { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.li-dust span {
  position: absolute;
  bottom: -2%;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(239, 231, 214, 0.65);
  opacity: 0;
}
#lux-intro.p-door .li-dust span {
  animation: li-dust-rise var(--dur, 4s) ease-out var(--delay, 0s) infinite;
}
@keyframes li-dust-rise {
  0%   { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  12%  { opacity: var(--o, 0.5); }
  100% { transform: translateY(-72vh) translateX(var(--drift, 20px)) scale(0.4); opacity: 0; }
}

/* --- Skip + sound hint --- */
.li-skip {
  position: absolute;
  right: 28px;
  bottom: 24px;
  z-index: 20;
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(239, 231, 214, 0.5);
  border: 1px solid rgba(239, 231, 214, 0.18);
  padding: 10px 18px;
  border-radius: 2px;
  background: rgba(4, 7, 12, 0.4);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.li-skip:hover { color: #EFE7D6; border-color: rgba(217, 178, 106, 0.6); }

/* ============================================================================
   2. POST-INTRO HERO ENTRANCE — staggered reveal
   ============================================================================ */
body.lux-intro-active .topbar,
body.lux-intro-active .nav,
body.lux-intro-active .hero-eyebrow,
body.lux-intro-active .hero-title,
body.lux-intro-active .hero-sub,
body.lux-intro-active .hero-actions,
body.lux-intro-active .hero-stats,
body.lux-intro-active .hero-search { opacity: 0; }

body.lux-done .hero-eyebrow  { animation: luxUp 0.7s cubic-bezier(0.2, 0.65, 0.25, 1) 0.05s both; }
body.lux-done .hero-title    { animation: luxUp 0.85s cubic-bezier(0.2, 0.65, 0.25, 1) 0.18s both; }
body.lux-done .hero-sub      { animation: luxUp 0.75s cubic-bezier(0.2, 0.65, 0.25, 1) 0.38s both; }
body.lux-done .hero-actions  { animation: luxUp 0.7s cubic-bezier(0.2, 0.65, 0.25, 1) 0.54s both; }
body.lux-done .hero-stats    { animation: luxUp 0.7s cubic-bezier(0.2, 0.65, 0.25, 1) 0.7s both; }
body.lux-done .hero-search   { animation: luxSearchUp 0.8s cubic-bezier(0.2, 0.65, 0.25, 1) 0.86s both; }
body.lux-done .topbar        { animation: luxFade 0.6s ease 0.75s both; }
body.lux-done .nav           { animation: luxDown 0.65s cubic-bezier(0.2, 0.65, 0.25, 1) 0.62s both; }

@keyframes luxUp {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes luxDown {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes luxFade { from { opacity: 0; } to { opacity: 1; } }
/* hero-search keeps its structural translateY(40px) */
@keyframes luxSearchUp {
  from { opacity: 0; transform: translateY(72px); }
  to   { opacity: 1; transform: translateY(40px); }
}

/* ============================================================================
   3. AMBIENT ANIMATED BACKGROUND — drifting blueprint grid, gold particles
   ============================================================================ */
.lux-ambient {
  position: fixed;
  inset: -5%;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.lux-ambient::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(239, 231, 214, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239, 231, 214, 0.028) 1px, transparent 1px),
    linear-gradient(45deg, transparent 48%, rgba(217, 178, 106, 0.016) 49%, rgba(217, 178, 106, 0.016) 51%, transparent 52%);
  background-size: 90px 90px, 90px 90px, 240px 240px;
  animation: luxGridDrift 90s linear infinite;
}
.lux-ambient::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 18% 28%, rgba(217, 178, 106, 0.05), transparent 65%),
    radial-gradient(ellipse 50% 42% at 84% 72%, rgba(31, 60, 88, 0.5), transparent 65%);
  animation: luxAmbientPulse 16s ease-in-out infinite alternate;
}
@keyframes luxGridDrift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-90px, -90px, 0); }
}
@keyframes luxAmbientPulse {
  from { opacity: 0.55; transform: translate3d(0, 0, 0) scale(1); }
  to   { opacity: 1;    transform: translate3d(0, -14px, 0) scale(1.04); }
}
.lux-ambient i {
  position: absolute;
  bottom: -2%;
  border-radius: 50%;
  background: rgba(217, 178, 106, 0.5);
  box-shadow: 0 0 6px 1px rgba(217, 178, 106, 0.35);
  opacity: 0;
  animation: luxParticle var(--dur, 18s) linear var(--delay, 0s) infinite;
}
@keyframes luxParticle {
  0%   { transform: translate3d(0, 0, 0); opacity: 0; }
  8%   { opacity: var(--o, 0.35); }
  92%  { opacity: var(--o, 0.35); }
  100% { transform: translate3d(var(--drift, 30px), -108vh, 0); opacity: 0; }
}

/* ============================================================================
   4. LUXURY LIGHTING — gold sweeps on buttons, titles, nav
   ============================================================================ */
.btn-accent::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.28) 48%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.28) 52%,
    transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}
.btn-accent:hover::before {
  transform: translateX(130%);
  transition: transform 0.65s ease;
}
/* nav Browse Inventory: shimmer sweeps by itself every ~9 seconds */
.nav .btn-accent::before { animation: luxAutoShimmer 9s ease-in-out 3s infinite; }
@keyframes luxAutoShimmer {
  0%   { transform: translateX(-130%); }
  7%   { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}

.btn-ghost, .btn-ghost-sm { position: relative; overflow: hidden; }
.btn-ghost::before, .btn-ghost-sm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(217, 178, 106, 0.14) 50%,
    transparent 65%);
  transform: translateX(-130%);
  pointer-events: none;
}
.btn-ghost:hover::before, .btn-ghost-sm:hover::before {
  transform: translateX(130%);
  transition: transform 0.6s ease;
}

/* section heading light sweep when scrolled into view.
   Uses background-position (not transform + overflow:hidden) so italic
   display-font overhangs are never clipped. */
.section-title { position: relative; }
.section-title::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(105deg,
    transparent 38%,
    rgba(232, 198, 133, 0.22) 49%,
    rgba(255, 248, 230, 0.3) 50%,
    rgba(232, 198, 133, 0.22) 51%,
    transparent 62%);
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-position: 145% 0;
  pointer-events: none;
}
.lux-in .section-title::after {
  background-position: -45% 0;
  transition: background-position 1.1s ease 0.35s;
}

/* Gradient text (background-clip: text) doesn't paint the overhang of the
   last italic glyph on each line, which visually cuts the letter off.
   Pad each line fragment so the paint box covers the slant. */
.fin-hero-h1 .accent,
.hero-title-accent,
.finance-banner-title .accent {
  padding-right: 0.12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ============================================================================
   5. SCROLL REVEALS — varied per section
   ============================================================================ */
.lux-r {
  opacity: 0;
  transition:
    opacity 0.75s cubic-bezier(0.2, 0.65, 0.25, 1) var(--rd, 0s),
    transform 0.75s cubic-bezier(0.2, 0.65, 0.25, 1) var(--rd, 0s);
  will-change: transform, opacity;
}
.lux-r.lux-fx-up    { transform: translateY(34px); }
.lux-r.lux-fx-scale { transform: translateY(14px) scale(0.955); }
.lux-r.lux-fx-left  { transform: translateX(-44px); }
.lux-r.lux-fx-right { transform: translateX(44px); }
.lux-r.lux-fx-fade  { transform: none; }
.lux-r.lux-in {
  opacity: 1;
  transform: translateY(0) translateX(0) scale(1);
}

/* ============================================================================
   6. INVENTORY CARD HOVER — lift, glow, reflection, price glow
   ============================================================================ */
@media (hover: hover) and (pointer: fine) {
  .vcard {
    transition:
      transform 0.4s cubic-bezier(0.2, 0.65, 0.25, 1),
      box-shadow 0.4s cubic-bezier(0.2, 0.65, 0.25, 1),
      border-color 0.4s ease;
  }
  .vcard:hover {
    border-color: rgba(217, 178, 106, 0.55);
    transform: translateY(-8px);
    box-shadow:
      0 22px 44px rgba(0, 0, 0, 0.4),
      0 0 0 1px rgba(217, 178, 106, 0.25),
      0 0 32px var(--accent-glow);
  }
  /* image gets a gentle 3D tilt (driven by JS pointer position) */
  .vcard-photo .photo-slot {
    transition: transform 0.35s cubic-bezier(0.2, 0.65, 0.25, 1), filter 0.25s ease;
    transform: perspective(700px) rotateX(var(--tx, 0deg)) rotateY(var(--ty, 0deg)) scale(var(--ts, 1));
  }
  /* reflection sweeping across the vehicle image */
  .vcard-photo::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(105deg,
      transparent 38%,
      rgba(255, 255, 255, 0.32) 49%,
      rgba(255, 255, 255, 0.5) 50%,
      rgba(255, 255, 255, 0.32) 51%,
      transparent 62%);
    transform: translateX(-130%) skewX(-6deg);
    pointer-events: none;
  }
  .vcard:hover .vcard-photo::after {
    transform: translateX(130%) skewX(-6deg);
    transition: transform 0.8s ease 0.05s;
  }
  /* price glows gold */
  .vcard .vcard-price { transition: color 0.3s ease, text-shadow 0.3s ease; }
  .vcard:hover .vcard-price {
    color: var(--accent-bright);
    text-shadow: 0 0 22px var(--accent-glow);
  }
  /* CTA lights up, arrow shifts right */
  .vcard:hover .btn-ghost-sm {
    color: var(--accent-bright);
    border-color: rgba(217, 178, 106, 0.55);
    background: rgba(217, 178, 106, 0.08);
  }
  .vcard:hover .btn-ghost-sm .arrow { transform: translateX(4px); }
}

/* ============================================================================
   MOBILE — burger menu + no-horizontal-scroll guarantees
   ============================================================================ */
/* Safety net: nothing may create sideways page scroll. `clip` (not `hidden`)
   so the sticky nav keeps working. */
html { overflow-x: clip; }

.nav-burger { display: none; }
.nav-mobile-panel { display: none; }

@media (max-width: 1024px) {
  /* replace the old horizontal scrolling link strip with a burger dropdown */
  .nav-links { display: none !important; }

  .nav-burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 10px;
    margin-left: 4px;
    border: 1px solid var(--border-strong);
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--chrome-light);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
  }
  /* burger morphs into an X while open */
  .nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-open .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-open .nav-burger { border-color: var(--accent); }

  .nav-inner { justify-content: space-between; }
  .nav-cta { margin-left: auto; }

  .nav-open .nav-mobile-panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: rgba(12, 31, 54, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border-strong);
    padding: 10px 20px 20px;
    animation: luxDown 0.25s ease both;
  }
  .nav-mobile-link {
    padding: 14px 4px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mute);
    border-bottom: 1px solid var(--border);
  }
  .nav-mobile-link.is-active { color: var(--accent); }
  .nav-mobile-link:active { color: var(--text); }
  .nav-mobile-cta { margin-top: 16px; }
}

@media (max-width: 760px) {
  /* side-entrance reveals park content off-screen before they play,
     which reads as sideways scroll on phones — use vertical motion instead */
  .lux-r.lux-fx-left, .lux-r.lux-fx-right { transform: translateY(30px); }

  /* stat strips are wider than a phone — let them wrap */
  .hero-stats, .fin-hero-stats { flex-wrap: wrap; row-gap: 14px; }
  .hero-stats .vsep, .fin-hero-stats .vsep { display: none; }
  .topbar-inner { flex-wrap: wrap; }

  /* keep the phone number visible in the compact bar */
  .nav-phone span { display: none; }

  /* Grid blowout guard: a grid child wider than the screen (like the finance
     stepper) forces its whole column wide, dragging every card with it.
     min-width:0 lets tracks shrink to the viewport. */
  .fin-grid > *, .contact-grid > *, .detail-grid > *, .about-grid > *,
  .inv-body > *, .finance-banner-inner > *, .detail-headline > * { min-width: 0; }

  /* finance application: stepper becomes a 2×2 grid instead of one long row */
  .fin-stepper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
    margin-bottom: 32px;
  }
  .fin-step { padding-bottom: 10px; gap: 10px; }
  .fin-step-num { width: 28px; height: 28px; font-size: 12px; }
  .fin-step-label { font-size: 10px; letter-spacing: 0.12em; white-space: nowrap; }

  /* tighter card padding so fields get the width */
  .fin-form-wrap { padding: 24px 18px; }
  .fin-form h3 { font-size: 30px; }

  /* calculator: legend + disclaimer wrap instead of running off the card */
  .calc-result-legend { flex-wrap: wrap; gap: 4px 14px; }
  .calc-disc { white-space: normal; }
  .seg { flex-wrap: wrap; }
  .seg button { flex: 1 1 30%; }

  /* review step: one column so long values never collide */
  .review-grid { grid-template-columns: 1fr; }
}

/* ============================================================================
   7. NAV MICRO-ANIMATIONS
   ============================================================================ */
.nav-logo img { transition: transform 0.35s cubic-bezier(0.2, 0.65, 0.25, 1); }
.nav-logo:hover img { transform: rotate(-2deg) scale(1.03); }

.nav-phone svg { animation: luxPhonePulse 3.2s ease-in-out infinite; transform-origin: center; }
@keyframes luxPhonePulse {
  0%, 84%, 100% { transform: scale(1); opacity: 1; }
  90% { transform: scale(1.18); opacity: 0.85; }
  96% { transform: scale(1); opacity: 1; }
}

.lang-toggle button { transition: color 0.3s ease, background 0.3s ease, transform 0.2s ease; }
.lang-toggle button:active { transform: scale(0.92); }

.nav-link::before {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; right: 50%;
  height: 1px;
  background: var(--accent);
  transition: left 0.28s ease, right 0.28s ease;
}
.nav-link:hover::before { left: 14px; right: 14px; }

/* ============================================================================
   8. CTA BUTTON FEEL — elevation, gradient shift, press
   ============================================================================ */
.btn-accent {
  transition: transform 0.22s cubic-bezier(0.2, 0.65, 0.25, 1), box-shadow 0.22s ease, background 0.3s ease;
}
.btn-accent:hover {
  transform: translateY(-2px) scale(1.015);
  background: linear-gradient(160deg, var(--accent-bright), var(--accent));
}
.btn-accent:active { transform: translateY(1px) scale(0.99); transition-duration: 0.08s; }
.hero-search-btn:hover { transform: none; }

/* ============================================================================
   9. CURSOR POLISH — gold steering wheel that follows the cursor,
   enlarges over interactive elements, turns as you move
   ============================================================================ */
#lux-cursor {
  position: fixed;
  left: 0; top: 0;
  width: 36px; height: 36px;
  margin: -18px 0 0 -18px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  will-change: transform;
}
#lux-cursor .lux-wheel {
  display: block;
  width: 100%;
  height: 100%;
  will-change: transform; /* JS rotates this as the cursor moves (steering) */
}
#lux-cursor svg {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.22s ease;
  filter: drop-shadow(0 0 6px rgba(217, 178, 106, 0.35));
}
#lux-cursor.on { opacity: 0.85; }
#lux-cursor.grow svg { transform: scale(1.45); }
@media (hover: none), (pointer: coarse) { #lux-cursor { display: none; } }

/* magnetic buttons get their transform from JS */
.btn-accent.lux-magnet { transition: transform 0.18s ease-out; }

/* ============================================================================
   HERO SEARCH FIX + VEHICLE REQUEST FORM
   ============================================================================ */
/* The search widget intentionally straddles the hero's bottom edge by 40px,
   but the hero's overflow:hidden was clipping the overhang. All hero
   decorations are inset:0 absolutes, so visible overflow is safe. */
.hero { overflow: visible; }

.hero-search-tabs .tab-request {
  margin-left: auto;
  color: var(--accent);
  border-color: rgba(217, 178, 106, 0.35);
}
.hero-search-tabs .tab-request:hover { color: var(--accent-bright); }
.hero-search-tabs .tab-request.is-active { color: var(--accent-bright); }

.hs-request {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px;
}
.hsr-field { display: flex; flex-direction: column; min-width: 0; }
.hsr-field label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.hsr-field input,
.hsr-field textarea {
  width: 100%;
  min-width: 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 12px;
  font-size: 14px;
  border-radius: 2px;
  outline: none;
  transition: border-color 0.2s ease;
}
.hsr-field input:focus,
.hsr-field textarea:focus { border-color: var(--accent); }
.hsr-field textarea { resize: vertical; min-height: 64px; }
.hsr-notes { grid-column: 1 / -1; }
.hsr-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.hsr-hint {
  font-size: 12px;
  color: var(--text-mute);
  letter-spacing: 0.02em;
}
.hsr-success {
  background: var(--surface);
  border: 1px solid rgba(217, 178, 106, 0.4);
  padding: 36px 28px;
  text-align: center;
}
.hsr-success h3 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  margin: 0 0 8px;
  color: var(--accent-bright);
}
.hsr-success p { margin: 0; color: var(--text-mute); font-size: 14px; }

@media (max-width: 760px) {
  .hs-request { grid-template-columns: 1fr 1fr; }
  .hero-search-tabs { flex-wrap: wrap; }
  .hero-search-tabs .tab-request { margin-left: 0; }
  .hero-search-tabs .tab { padding: 10px 14px; font-size: 11px; }
}
@media (max-width: 480px) {
  .hs-request { grid-template-columns: 1fr; padding: 16px; }
  .hsr-actions { flex-direction: column; align-items: stretch; }
  .hsr-actions .btn-accent { justify-content: center; }
}

/* ============================================================================
   EMPTY STOCK — animated "inventory incoming" scene
   ============================================================================ */
.empty-stock {
  text-align: center;
  padding: 56px 24px 64px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}
.es-scene {
  position: relative;
  width: min(380px, 82%);
  margin: 0 auto 18px;
}
.es-car {
  position: relative;
  animation: esBob 2.8s ease-in-out infinite;
  will-change: transform;
}
.es-car img { width: 100%; height: auto; display: block; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.5)); }
.es-headlight {
  position: absolute;
  left: 8%; top: 16.8%;
  width: 3%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff8ea;
  box-shadow:
    0 0 8px 3px rgba(255, 248, 234, 0.9),
    0 0 26px 10px rgba(255, 240, 200, 0.5),
    0 0 60px 22px rgba(255, 232, 178, 0.25);
  animation: esFlicker 5s ease-in-out infinite;
}
.es-taillight {
  position: absolute;
  right: 8%; top: 14.3%;
  width: 5.5%; height: 2.2%;
  border-radius: 999px;
  background: #ff3b3b;
  box-shadow:
    0 0 8px 3px rgba(255, 59, 59, 0.8),
    0 0 24px 9px rgba(255, 40, 40, 0.4);
}
.es-beam {
  position: absolute;
  left: -26%; top: 12%;
  width: 32%; height: 9%;
  background: linear-gradient(270deg, rgba(255, 244, 214, 0.32), transparent 85%);
  clip-path: polygon(100% 40%, 100% 60%, 0 100%, 0 0);
  filter: blur(2px);
  pointer-events: none;
}
.es-speed { position: absolute; inset: 0; pointer-events: none; }
.es-speed i {
  position: absolute;
  right: -8%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(270deg, transparent, rgba(217, 178, 106, 0.55));
  animation: esSpeed 1.5s linear infinite;
  opacity: 0;
}
.es-speed i:nth-child(1) { top: 10%; width: 24%; animation-delay: 0s; }
.es-speed i:nth-child(2) { top: 17%; width: 16%; animation-delay: 0.55s; }
.es-speed i:nth-child(3) { top: 24%; width: 12%; animation-delay: 1s; }
.es-road {
  position: relative;
  height: 3px;
  margin-top: 3%;
  overflow: hidden;
  /* dashes fade in/out at the ends instead of getting chopped mid-dash */
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
/* A double-width strip slid by transform (GPU) — dashes glide across fully
   formed, never "growing" into view at the edge. One 68px pattern period per
   loop = a perfectly seamless cycle. */
.es-road::before {
  content: '';
  position: absolute;
  top: 0;
  left: -68px;
  width: calc(200% + 68px);
  height: 100%;
  background: repeating-linear-gradient(90deg,
    var(--accent-dark) 0 34px, transparent 34px 68px);
  opacity: 0.55;
  animation: esRoad 1s linear infinite;
  will-change: transform;
}
@keyframes esBob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-5px) rotate(-0.4deg); }
}
@keyframes esRoad { to { transform: translateX(68px); } }
@keyframes esSpeed {
  0%   { transform: translateX(0); opacity: 0; }
  15%  { opacity: 0.8; }
  100% { transform: translateX(70%); opacity: 0; }
}
@keyframes esFlicker {
  0%, 88%, 100% { opacity: 1; }
  92% { opacity: 0.55; }
  95% { opacity: 1; }
  97% { opacity: 0.75; }
}
.es-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 48px);
  font-weight: 400;
  color: var(--text);
  margin: 10px 0 12px;
  line-height: 1.05;
}
.es-sub {
  max-width: 520px;
  margin: 0 auto 26px;
  color: var(--text-mute);
  font-size: 15px;
  line-height: 1.6;
}
.es-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  .es-car, .es-road::before, .es-speed i, .es-headlight { animation: none; }
  .es-speed { display: none; }
}

/* ============================================================================
   10. STAT COUNT-UP polish
   ============================================================================ */
.fbs-num { font-variant-numeric: tabular-nums; }

/* subtle living gradient behind the finance banner */
.finance-banner { position: relative; overflow: hidden; }
.finance-banner::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(ellipse 40% 50% at 30% 40%, rgba(217, 178, 106, 0.07), transparent 65%);
  animation: luxAmbientPulse 12s ease-in-out infinite alternate;
  pointer-events: none;
}

/* ============================================================================
   ADMIN — inventory manager (hidden /admin route)
   ============================================================================ */
.admin-wrap {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 80px;
}
.admin-loading {
  padding: 80px 20px;
  text-align: center;
  color: var(--text-mute);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.admin-error {
  background: rgba(226, 75, 74, 0.1);
  border: 1px solid rgba(226, 75, 74, 0.45);
  color: #f09595;
  padding: 12px 14px;
  font-size: 13px;
  margin: 12px 0;
}

.admin-login {
  max-width: 420px;
  margin: 8vh auto 0;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}
.admin-login-logo { width: 180px; margin: 0 auto 24px; display: block; }
.admin-login h1 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  margin: 0 0 6px;
  text-align: center;
  color: var(--text);
}
.admin-login p { text-align: center; color: var(--text-mute); font-size: 13px; margin: 0 0 26px; }
.admin-login .field { margin-bottom: 16px; }
.admin-login input { width: 100%; }

.admin-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 24px;
  background: rgba(12, 31, 54, 0.9);
  border-bottom: 1px solid var(--border-strong);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}
.admin-header img { height: 44px; width: auto; }
.admin-header-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--text);
  flex: 1;
}
.admin-header-actions { display: flex; gap: 10px; }

.admin-list, .admin-editor { max-width: 1100px; margin: 28px auto 0; padding: 0 20px; }

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.admin-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.admin-filter {
  padding: 8px 14px;
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--text-mute);
  border: 1px solid var(--border);
  background: var(--surface);
}
.admin-filter.is-active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }

.admin-search {
  flex: 1;
  min-width: 220px;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  border-radius: 2px;
  outline: none;
}
.admin-search:focus { border-color: var(--accent); }
.admin-sort {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 12px;
  font-size: 13px;
  border-radius: 2px;
  outline: none;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 12px 16px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.admin-row-thumb { width: 92px; height: 60px; flex-shrink: 0; background: var(--surface-2); overflow: hidden; }
.admin-row-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-row-nophoto {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.1em;
  color: var(--text-dim); text-transform: uppercase;
}
.admin-row-main { flex: 1; min-width: 180px; }
.admin-row-title { color: var(--text); font-weight: 600; font-size: 15px; }
.admin-row-title span { color: var(--text-mute); font-weight: 400; font-size: 13px; margin-left: 6px; }
.admin-row-sub { color: var(--text-mute); font-size: 12px; margin-top: 3px; font-family: var(--font-mono); letter-spacing: 0.04em; }
.admin-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid;
  padding: 5px 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.admin-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-danger:hover { border-color: #e24b4a; color: #f09595; }

.admin-editor {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 26px;
}
.admin-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.admin-editor-head h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  margin: 0;
  color: var(--text);
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.admin-grid .field input, .admin-grid .field select { width: 100%; min-width: 0; }
.admin-grid .field select {
  background: var(--bg-1);
  border: 1px solid var(--border-strong);
  padding: 14px 16px;
  font-size: 15px;
  color: var(--text);
  outline: none;
}
.admin-span2 { grid-column: span 2; }
.admin-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 14px;
  padding-top: 22px;
  cursor: pointer;
}
.admin-check input { width: 18px; height: 18px; accent-color: var(--accent); }

.admin-photos { margin-bottom: 20px; }
.admin-photo-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; }
.admin-photo { width: 140px; position: relative; }
.admin-photo img { width: 140px; height: 92px; object-fit: cover; display: block; border: 1px solid var(--border-strong); }
.admin-photo-btns { display: flex; gap: 4px; margin-top: 4px; }
.admin-photo-btns button {
  flex: 1;
  padding: 4px 0;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 12px;
}
.admin-photo-btns button:hover { color: var(--text); border-color: var(--chrome-dark); }
.admin-photo-add {
  width: 140px; height: 92px;
  display: flex; align-items: center; justify-content: center;
  border: 1px dashed var(--border-strong);
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.admin-photo-add:hover { border-color: var(--accent); }
.admin-editor-foot { display: flex; justify-content: flex-end; gap: 12px; }

/* Sell-your-car photo uploader (customer-facing, reuses admin photo tiles) */
.sell-photos { margin-bottom: 8px; }
.sell-photo-hints { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sell-photo-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(217, 178, 106, 0.35);
  padding: 5px 10px;
  border-radius: 999px;
}
.sell-photo-note {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 10px;
}

/* Admin leads */
.admin-tabs { display: flex; gap: 4px; margin-right: 18px; }
.admin-tab {
  padding: 9px 18px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--border);
  background: transparent;
}
.admin-tab.is-active { color: var(--on-accent); background: var(--accent); border-color: var(--accent); }
.admin-lead-detail {
  width: 100%;
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px 20px;
}
.admin-lead-kv { font-size: 13px; color: var(--text); }
.admin-lead-kv b {
  display: block;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
  margin-bottom: 2px;
}
.admin-lead-msg { grid-column: 1 / -1; white-space: pre-wrap; }
.admin-lead-photos { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.admin-lead-photos a img {
  width: 130px; height: 86px; object-fit: cover; display: block;
  border: 1px solid var(--border-strong);
}
.admin-kind {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 2px;
  background: var(--surface-2);
  color: var(--text-mute);
  border: 1px solid var(--border);
  flex-shrink: 0;
}

@media (max-width: 900px) { .admin-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-span2 { grid-column: auto; }
  .admin-row-actions { width: 100%; }
}

/* ============================================================================
   REDUCED MOTION — everything off, content fully visible
   ============================================================================ */
@media (prefers-reduced-motion: reduce) {
  #lux-intro { display: none !important; }
  body.lux-intro-active { overflow: auto; }
  body.lux-intro-active .topbar,
  body.lux-intro-active .nav,
  body.lux-intro-active .hero-eyebrow,
  body.lux-intro-active .hero-title,
  body.lux-intro-active .hero-sub,
  body.lux-intro-active .hero-actions,
  body.lux-intro-active .hero-stats,
  body.lux-intro-active .hero-search { opacity: 1; }
  body.lux-done .topbar, body.lux-done .nav,
  body.lux-done .hero-eyebrow, body.lux-done .hero-title,
  body.lux-done .hero-sub, body.lux-done .hero-actions,
  body.lux-done .hero-stats, body.lux-done .hero-search { animation: none; }
  .lux-r { opacity: 1; transform: none; transition: none; }
  .lux-ambient, #lux-cursor { display: none; }
  .lux-ambient::before, .lux-ambient::after { animation: none; }
  .nav .btn-accent::before { animation: none; }
  .nav-phone svg { animation: none; }
  .section-title::after { display: none; }
  .vcard-photo .photo-slot { transform: none !important; }
}
