/*
  Concierge Hero layout.
  Function: keeps the newer hero structure with one full-width image background.
*/

.hero-concierge { /* Function: creates the desktop home hero shell with one continuous background section. */
  --hero-card-glass-rgb: 30, 30, 30; /* Function: keeps the sell widget glass aligned with the existing dark card treatment. */
  --hero-card-shadow-rgb: 0, 0, 0; /* Function: keeps the sell widget shadow neutral on the new light surface. */
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 55%, #eff6ff 100%); /* Function: matches the grey-blue surface used by the homepage section below the hero. */
  color: #ffffff; /* Function: keeps the left-side hero headline readable over the blue-tinted image. */
  display: flex; /* Function: lets the inner content stretch to the hero height. */
  flex-direction: column; /* Function: keeps the hero content stack consistent with the existing layout. */
  font-family: var(--font-body); /* Function: keeps the hero typography on the site's body font stack. */
  isolation: isolate; /* Function: contains the clipped image and overlay blend inside the hero. */
  min-height: 680px; /* Function: keeps the desktop hero height from changing when Windows display scaling changes the CSS viewport. */
  overflow: visible; /* Function: lets vehicle suggestions and focus effects escape the hero if needed. */
  position: relative; /* Function: anchors the full-image background and content grid. */
  width: 100%; /* Function: spans the full viewport width. */
}

.hero-concierge__bg { /* Function: restores the homepage hero image as one full-width background section. */
  bottom: 0; /* Function: pins the image panel to the hero's lower edge. */
  clip-path: none; /* Function: keeps the full hero background uncut. */
  filter: none; /* Function: keeps the full hero background free of seam shadows. */
  left: 0; /* Function: anchors the full hero image to the left edge. */
  overflow: hidden; /* Function: clips the drifting image inside the hero bounds. */
  position: absolute; /* Function: layers the image panel behind the heading and widget. */
  right: 0; /* Function: stretches the hero image across the entire section. */
  top: 0; /* Function: pins the image panel to the hero's upper edge. */
  width: auto; /* Function: lets the left and right offsets define one full-width hero image. */
  -webkit-mask-image: none; /* Function: keeps the full hero image unmasked. */
  mask-image: none; /* Function: keeps the full hero image unmasked in standard browsers. */
  z-index: 1; /* Function: keeps the image above the light surface but below hero content. */
}

.hero-concierge__bg img { /* Function: fills the restored full-width hero background with subtle motion. */
  animation: hero-full-image-drift 14s ease-in-out infinite alternate; /* Function: keeps the subtle cinematic image movement without a split panel. */
  animation-play-state: paused; /* Function: lets motion-controller.js run the drift only while visible. */
  backface-visibility: hidden; /* Function: keeps the drifting image on a stable compositor layer. */
  contain: paint; /* Function: limits repaint work to the hero image layer. */
  display: block; /* Function: removes inline image gaps inside the absolute panel. */
  filter: none; /* Function: lets the overlay, not the image itself, provide the buy-page tint. */
  height: 100%; /* Function: makes the image fill the hero panel vertically. */
  object-fit: cover; /* Function: fills the full hero background without distortion. */
  object-position: center left; /* Function: keeps the left-side automotive composition behind the heading. */
  transform: scale(1.04); /* Function: starts the image with enough extra crop for drift. */
  transform-origin: center; /* Function: keeps the drift anchored while it scales. */
  width: 100%; /* Function: makes the image fill the hero panel horizontally. */
  will-change: auto; /* Function: avoids permanently promoting the full-bleed hero image. */
}

@keyframes hero-ken-burns {
  0%   { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.025) translate(-0.2%, -0.15%); }
}

@keyframes hero-full-image-drift { /* Function: animates the full-width homepage hero image with subtle drift. */
  from {
    transform: scale(1.06) translate3d(-1.2%, 0, 0); /* Function: starts the image with a slight leftward cinematic crop. */
  }

  to {
    transform: scale(1.1) translate3d(1.2%, -0.8%, 0); /* Function: ends the image drift with a subtle right and upward move. */
  }
}

/* Function: applies the buy-page image overlay treatment to the homepage hero image panel. */
.hero-concierge__overlay {
  -webkit-backdrop-filter: blur(2.8px) saturate(1.14); /* Function: adds the same frosted softness used on the buy hero image. */
  backdrop-filter: blur(2.8px) saturate(1.14); /* Function: keeps the vehicle image diffused without hiding it. */
  background: /* Function: restores the original homepage gradient depth while keeping the buy-page blue image tint. */
    linear-gradient(to bottom, transparent 60%, #0A2463 100%), /* Function: seamless fade into the overlap wrapper color below. */
    linear-gradient(to right, rgba(0, 0, 0, 0.35) 0%, rgba(255, 255, 255, 0.1) 100%), /* Function: brings back the old lateral highlight across the hero image. */
    linear-gradient(90deg, rgba(5, 22, 58, 0.78) 0%, rgba(10, 42, 103, 0.66) 42%, rgba(18, 74, 171, 0.44) 72%, rgba(30, 104, 216, 0.28) 100%), /* Function: restores the original navy-to-blue homepage overlay sweep. */
    radial-gradient(circle at 72% 48%, rgba(35, 113, 224, 0.34) 0%, rgba(11, 47, 116, 0.42) 50%, rgba(5, 22, 58, 0.52) 100%), /* Function: restores the original soft blue focus glow over the vehicle image. */
    linear-gradient(to top, rgba(5, 22, 58, 0.36) 0%, rgba(11, 47, 116, 0.12) 48%, transparent 100%), /* Function: restores the original bottom-to-top depth fade. */
    linear-gradient(135deg, rgba(7, 24, 65, 0.54) 0%, rgba(20, 57, 129, 0.34) 48%, rgba(95, 163, 225, 0.2) 100%); /* Function: keeps the buy-page blue cinematic tint over the image. */
  inset: 0; /* Function: covers the full clipped image panel. */
  position: absolute; /* Function: pins the overlay above the hero image. */
}

.hero-concierge__container {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center; /* Function: centers the desktop hero content vertically. */
  align-items: center; /* Function: keeps the desktop copy and form vertically centered. */
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 460px);
  gap: clamp(2rem, 5vw, 5rem);
  width: min(100%, 1220px);
  margin: 0 auto;
  padding: 112px 24px 140px; /* Function: uses fixed desktop rails so OS display scaling cannot alter the hero-to-card gap through viewport units. */
  flex: 1;
}

.hero-concierge__content {
  position: relative;
  z-index: 3;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  animation: fade-slide-up 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-concierge__content--animated {
  align-items: flex-start;
  text-align: left;
}

/* ─── Trust Badge Chip ─── */
.hero-trust-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  animation: fade-slide-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.hero-trust-chip__star {
  color: #FBB649;
  font-size: 0.95rem;
}

.hero-trust-chip__dot {
  color: rgba(255, 255, 255, 0.4);
  margin: 0 0.1rem;
}

.hero-concierge__image,
.hero-concierge__image::before {
  display: none;
}

.hero-react-widget {
  --hero-widget-card-radius: 14px; /* Function: matches the visible compact offer-card corner radius. */
  -webkit-backdrop-filter: none; /* Function: removes transparency blur so the widget renders as a solid card. */
  backdrop-filter: none; /* Function: prevents the hero image from showing through the widget. */
  background: #e8eef7; /* Function: uses an opaque blue-gray surface that sits naturally on the navy hero. */
  border: 1px solid #d6e0ec; /* Function: keeps the solid panel defined without the harsh pure-white edge. */
  border-radius: var(--hero-widget-card-radius); /* Function: matches the shared offer-card radius token. */
  box-shadow: 0 16px 34px -24px rgba(5, 22, 58, 0.48); /* Function: gives the blue-gray card subtle separation from the hero. */
  color: #071841; /* Function: switches the widget text colour to readable navy on the light glass skin. */
  justify-self: end;
  padding: clamp(0.95rem, 1.35vw, 1.05rem); /* Function: keeps padding tight while giving the larger widget enough edge breathing room. */
  width: min(100%, 500px); /* Function: restores a stronger hero presence without returning to heavy padding. */
  max-width: 500px; /* Function: lets the widget fill the right hero area more confidently. */
  position: relative;
  z-index: 10;
  will-change: transform, opacity;
  animation: hero-widget-slide-in-right 0.72s cubic-bezier(0.16, 1, 0.3, 1) 0.18s both; /* Function: moves the widget in without fading the opaque card. */
}

/* Function: disables the previous glass highlight so the card matches the site's flatter panel language. */
.hero-react-widget::before {
  border: 1px solid #ffffff; /* Function: creates a subtle inner rim on the solid card surface. */
  border-radius: inherit; /* Function: follows the widget corner geometry exactly. */
  content: ""; /* Function: keeps the pseudo-element harmless if older browser caches still expect it. */
  display: none; /* Function: removes the decorative inner rim for a cleaner solid card. */
  inset: 3px; /* Function: keeps the highlight tucked inside the outer border. */
  pointer-events: none; /* Function: preserves all form interactions. */
  position: absolute; /* Function: layers the highlight above the widget background. */
  z-index: 0; /* Function: keeps the highlight below the form controls. */
}

/* ─── Widget Label ─── */
.hero-widget-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.6rem;
  padding-left: 0.25rem;
}

/* Function: gives the hero sell widget the same neutral frosted glass language as the bottom cards. */
.hero-react-widget .sf-banner-card {
  margin-bottom: 0;
  overflow: visible;
  color: #ffffff;
  background: linear-gradient(135deg, rgba(var(--hero-card-glass-rgb), 0.78), rgba(var(--hero-card-glass-rgb), 0.68));
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 22px 60px rgba(var(--hero-card-shadow-rgb), 0.34), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-react-widget .sf-banner-badge {
  position: static;
  align-self: center;
  max-width: 100%;
  text-align: center;
  color: #ffffff;
  background: rgba(var(--hero-card-glass-rgb), 0.54);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 14px 30px rgba(var(--hero-card-shadow-rgb), 0.24);
}

.hero-react-widget .sf-banner-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px;
  background: transparent;
}

/* Function: stacks the glass field group and its outside submit button as one hero form. */
.hero-unified-form {
  display: flex; /* Function: stacks the identifier controls and CTA in one predictable column. */
  flex-direction: column; /* Function: keeps the CTA directly below the input group. */
  gap: 10px; /* Function: tightens the CTA relationship to the fields. */
  position: relative; /* Function: keeps the form above the widget highlight layer. */
  z-index: 1; /* Function: ensures controls remain clickable above the decorative glass rim. */
}

/* ========================================
   Quick Links Widget (Right Side of Hero)
   ======================================== */
/* ========================================
   Quick Links Style Trade-in Form
   ======================================== */
.hero-unified-fields {
  display: flex; /* Function: stacks the segmented control, vehicle field, and postal field. */
  flex-direction: column; /* Function: preserves the screenshot-inspired vertical rhythm. */
  position: relative; /* Function: anchors autocomplete dropdowns to the field group. */
  z-index: 10; /* Function: keeps dropdowns above the glass highlight layer. */
  width: 100%; /* Function: lets controls fill the widget card evenly. */
  background: transparent; /* Function: lets the sell-page-style controls sit directly on the frosted widget card. */
  background-color: transparent; /* Function: removes the old inset field-panel fill behind the sell-page controls. */
  backdrop-filter: none; /* Function: leaves the blur effect to the outer widget card skin. */
  -webkit-backdrop-filter: none; /* Function: leaves the blur effect to the outer widget card skin in WebKit. */
  border: 0; /* Function: removes the old grouped field border so each sell-page input owns its own border. */
  border-radius: 0; /* Function: prevents a second rounded container around the sell-page pill controls. */
  gap: 8px; /* Function: reduces vertical dead space between compact controls. */
  overflow: visible; /* Function: lets autocomplete suggestions drop down outside the field group. */
  box-shadow: none; /* Function: removes the old inset panel shadow from behind the sell-page controls. */
}

.hero-unified-row {
  display: flex; /* Function: provides a stable row shell for each stacked widget control. */
  align-items: stretch; /* Function: makes each control use the full row height. */
  flex-direction: column; /* Function: keeps the widget fields vertically scannable. */
  width: 100%; /* Function: keeps rows aligned to the widget card edges. */
}

/* Function: gives the toggle a little more breathing room before the first vehicle input. */
.hero-unified-row:has(.sf-banner-toggle) {
  gap: 10px; /* Function: separates the segmented control from the first field inside the same row. */
  margin-bottom: 0; /* Function: keeps spacing after the first field controlled by the parent field stack. */
}

.hero-unified-divider {
  height: 1px;
  background: transparent; /* Function: hides the old divider because sell-page fields separate themselves with spacing and borders. */
  display: none; /* Function: removes the divider from the sell-page-style field skin. */
  margin: 0;
}

/* Function: gives the homepage Vehicle/VIN toggle the same card radius as the offer cards. */
.hero-unified-row .sf-banner-toggle {
  flex: 0 0 auto;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* Function: matches the sell-page two-option toggle track. */
  isolation: isolate; /* Function: keeps the selected pill below the button labels. */
  position: relative;
  width: 100%;
  border-radius: var(--hero-widget-card-radius);
  border: 1px solid #d1d5db !important; /* Function: aligns the toggle edge with finance form controls. */
  background: #dfe7f2 !important; /* Function: gives the segmented track enough contrast on the blue-gray card. */
  box-shadow: none !important; /* Function: keeps the segmented track flat. */
  padding: 3px;
  border-bottom: none !important;
  overflow: hidden;
}

.hero-unified-row .sf-banner-toggle::before {
  background: #ffffff; /* Function: keeps the active tab flat and consistent with other site controls. */
  border-radius: calc(var(--hero-widget-card-radius) - 3px); /* Function: keeps the active tab inset aligned to the offer-card corner scale. */
  bottom: 3px; /* Function: aligns the selected pill with the compact toggle padding. */
  box-shadow: none; /* Function: keeps the active tab flat instead of elevated. */
  content: ""; /* Function: creates the active-pill layer without extra markup. */
  display: block !important; /* Function: restores the sell-page active-pill layer over the old homepage override. */
  left: 3px; /* Function: aligns the selected pill with the compact toggle padding. */
  position: absolute; /* Function: lets the pill slide under either toggle button. */
  top: 3px; /* Function: aligns the selected pill with the compact toggle padding. */
  transform: translateX(0); /* Function: starts the selected pill under the Vehicle option. */
  transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.24s ease; /* Function: matches the sell-page toggle motion. */
  width: calc((100% - 6px) / 2); /* Function: sizes the selected pill to one half of the compact toggle track. */
  z-index: 0; /* Function: keeps the pill below the button labels. */
}

.hero-unified-row .sf-banner-toggle--vin::before {
  transform: translateX(100%); /* Function: slides the selected pill under the VIN option like the sell-page widget. */
}

.hero-unified-row .sf-banner-toggle::after {
  display: none; /* Function: removes the old homepage underline so the sell-page selected pill is the only active state. */
}

.hero-unified-row .sf-banner-toggle button {
  flex: 1 1 0;
  white-space: nowrap;
  background: transparent !important;
  color: #64748b !important; /* Function: makes inactive tabs secondary but readable. */
  box-shadow: none !important;
  border-radius: calc(var(--hero-widget-card-radius) - 3px) !important;
  border: none !important;
  cursor: pointer; /* Function: preserves a clear interactive affordance. */
  font-family: var(--font-body); /* Function: keeps tab text aligned with the rest of the UI. */
  font-weight: 700;
  font-size: 0.95rem;
  height: 40px; /* Function: makes the segmented control feel substantial inside the wider widget. */
  letter-spacing: 0; /* Function: keeps segmented control labels crisp and readable. */
  padding: 0 18px !important;
  position: relative;
  transition: color 0.24s ease, transform 0.24s ease;
  z-index: 1;
}

.hero-unified-row .sf-banner-toggle button:hover {
  color: #334155 !important; /* Function: gives inactive tabs a subtle hover affordance. */
}

.hero-unified-row .sf-banner-toggle button:focus-visible {
  outline: 2px solid rgba(26, 55, 123, 0.45); /* Function: provides keyboard-visible focus inside the segmented control. */
  outline-offset: 2px; /* Function: separates the focus ring from the active-pill edge. */
}

.hero-unified-row .sf-banner-toggle button.active {
  color: var(--primary-color, #1a377b) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.hero-unified-row .sf-banner-identifier {
  flex: 0 0 auto;
  position: relative; /* Function: ensures autocomplete suggestions attach to the identifier input. */
  width: 100%;
}

.hero-unified-input {
  appearance: none; /* Function: normalizes native input chrome across browsers. */
  border-radius: var(--hero-widget-card-radius) !important;
  border: 1px solid #d1d5db !important; /* Function: matches the finance page input border. */
  background: #f8fafc !important; /* Function: softens fields so they do not look stark against the blue hero. */
  box-shadow: none !important; /* Function: keeps inputs flat like the existing form controls. */
  font: 600 16px/1.2 var(--font-body); /* Function: keeps homepage hero inputs above the iOS Safari focus-zoom threshold. */
  font-weight: 600;
  letter-spacing: 0; /* Function: keeps placeholders and typed text easy to scan. */
  color: #071841 !important;
  width: 100%;
  height: 52px;
  min-height: 52px;
  margin: 0;
  outline: none !important;
  padding: 0 0.95rem;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease; /* Function: makes focus and hover states feel responsive. */
}

.hero-unified-input:hover {
  border-color: rgba(148, 163, 184, 0.9) !important; /* Function: gives empty fields a subtle hover affordance. */
  box-shadow: none !important; /* Function: preserves the flat field language on hover. */
}

.hero-unified-input:focus {
  background: #ffffff !important;
  border-color: #FBB649 !important;
  box-shadow: 0 0 0 4px rgba(251, 182, 73, 0.18) !important; /* Function: creates an accessible focus ring using the DriveHaus accent. */
  transform: none; /* Function: keeps focused fields flat like the other page forms. */
}

.hero-unified-input::placeholder {
  color: #9ca3af; /* Function: matches the muted placeholder colour used by finance inputs. */
  font-weight: 400; /* Function: keeps placeholder text from reading like entered data. */
}

/* Function: out-ranks the shared sell-banner input skin so the homepage widget keeps the flatter finance-style fields. */
body.home .hero-react-widget .hero-unified-form .hero-unified-input {
  border-radius: var(--hero-widget-card-radius) !important; /* Function: matches homepage fields to the offer-card corner scale. */
  font: 600 16px/1.2 var(--font-body) !important; /* Function: keeps field text aligned while preventing iOS Safari focus zoom. */
  height: 52px !important; /* Function: restores a confident field height while keeping compact padding. */
  min-height: 52px !important; /* Function: prevents later mobile rules from shrinking the control. */
  padding: 0 0.95rem !important; /* Function: restores a compact horizontal inset. */
}

/* Function: keeps the stronger homepage field override from making placeholder text too heavy. */
body.home .hero-react-widget .hero-unified-form .hero-unified-input::placeholder {
  color: #9ca3af !important; /* Function: matches the muted placeholder colour used by finance inputs. */
  font-weight: 400 !important; /* Function: keeps placeholders visually secondary. */
}

/* Function: keeps every homepage hero input, including postal code, readable after shared sell-form styles load. */
.hero-react-widget .hero-unified-input {
  color: #071841 !important; /* Function: matches the postal code text color to the lighter glass card skin. */
  caret-color: #071841; /* Function: keeps the typing caret visible on the light homepage field. */
}

/* Function: keeps homepage hero placeholders soft against the grey glass field group. */
.hero-react-widget .hero-unified-input::placeholder {
  color: #9ca3af; /* Function: mirrors the finance page placeholder tone. */
}

/* Function: makes postal code and submit button rows three and four on desktop. */
.hero-unified-row .sf-postal-input {
  flex: 0 0 auto;
}

/* Function: keeps the primary submit button directly below, not inside, the glass field box. */
.hero-unified-form > .sf-banner-button {
  align-items: center; /* Function: vertically centers the CTA label. */
  background: #FBB649 !important; /* Function: matches the flat DriveHaus gold CTA used in the navbar and sell banner. */
  border: 0 !important; /* Function: lets the gradient and shadow define the button shape. */
  box-shadow: none !important; /* Function: keeps the CTA flat like the other primary buttons. */
  color: #1a1a1a !important;
  cursor: pointer; /* Function: keeps the primary action clearly clickable. */
  display: inline-flex; /* Function: supports centered icon/text alignment if an icon is added later. */
  flex: 0 0 auto;
  font-family: var(--font-body); /* Function: keeps the button typography consistent with the widget. */
  font-size: 0.95rem;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0; /* Function: keeps the CTA label crisp at compact sizes. */
  min-height: 52px;
  padding: 0 1.25rem;
  position: relative;
  text-align: center; /* Function: protects the label if the button wraps on narrow screens. */
  text-shadow: none; /* Function: removes decorative text effects from the flat button. */
  transition: background 0.2s ease, transform 0.16s ease; /* Function: mirrors the restrained feedback used by the shared CTA. */
  white-space: nowrap;
  width: 100%;
  border-radius: var(--hero-widget-card-radius);
  overflow: hidden;
}

.hero-unified-form > .sf-banner-button:hover {
  background: #f0a32f !important; /* Function: matches the darker flat hover state from the navbar CTA. */
  transform: none; /* Function: avoids the floating button effect the rest of the site does not use here. */
}

.hero-unified-form > .sf-banner-button:active {
  box-shadow: none !important; /* Function: keeps the pressed state flat. */
  transform: translateY(1px); /* Function: completes the tactile press interaction. */
}

.hero-unified-form > .sf-banner-button:focus-visible {
  outline: 3px solid rgba(26, 55, 123, 0.5); /* Function: gives keyboard users a visible focus target. */
  outline-offset: 3px; /* Function: separates the focus ring from the pill shadow. */
}

/* Shimmer sweep on the Sell CTA button */
.hero-unified-form > .sf-banner-button::before {
  animation: none; /* Function: removes the standalone shimmer treatment for consistency with other page buttons. */
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, 0.42) 50%, transparent 70%); /* Function: keeps the existing shimmer subtle on the refined CTA. */
  content: "";
  height: 100%;
  left: -100%;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 60%;
  display: none; /* Function: fully hides the shimmer layer for a flat CTA. */
}

@keyframes hero-shimmer {
  0%   { left: -100%; }
  20%  { left: 120%; }
  100% { left: 120%; }
}



.hero-concierge:has(.sf-suggestions) { /* Function: raises the hero stacking context only while the autocomplete dropdown is open. */
  z-index: 30; /* Function: places the open hero dropdown above the overlapping finder card below. */
}

.hero-react-widget:has(.sf-suggestions) { /* Function: raises the widget card above nearby hero content while suggestions are visible. */
  z-index: 40; /* Function: keeps the floating menu and its parent card in the top hero layer. */
}

.hero-react-widget .sf-banner-identifier .sf-suggestions {
  z-index: 1000; /* Function: keeps autocomplete options above the next homepage card and widget controls. */
  color: #0f172a; /* Function: keeps autocomplete text consistent with the light widget fields. */
  background: #ffffff; /* Function: makes the dropdown feel attached to the input on an opaque surface. */
  border-color: rgba(203, 213, 225, 0.9); /* Function: gives the dropdown a clean field-like edge. */
  border-radius: var(--hero-widget-card-radius); /* Function: keeps autocomplete corners aligned with the offer-card radius. */
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.68); /* Function: lifts suggestions above the glass card without visual heaviness. */
  scrollbar-color: rgba(148, 163, 184, 0.82) transparent;
  scrollbar-width: thin;
  top: calc(100% + 8px);
}

/* Function: gives the homepage dropdown a slim custom scrollbar inside the light menu. */
.hero-react-widget .sf-banner-identifier .sf-suggestions::-webkit-scrollbar {
  width: 10px; /* Function: prevents the browser default scrollbar from sticking out of the menu edge. */
}

/* Function: hides the default homepage scrollbar gutter. */
.hero-react-widget .sf-banner-identifier .sf-suggestions::-webkit-scrollbar-track {
  background: transparent; /* Function: keeps the light dropdown edge visually continuous. */
}

/* Function: insets the homepage dropdown scrollbar thumb into the light surface. */
.hero-react-widget .sf-banner-identifier .sf-suggestions::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.82); /* Function: provides contrast without becoming a bright white rail. */
  border: 3px solid #ffffff; /* Function: creates inner spacing that matches the light menu background. */
  border-radius: 999px; /* Function: keeps the scrollbar aligned with the rounded dropdown shape. */
}

/* Function: brightens the homepage scrollbar thumb on hover. */
.hero-react-widget .sf-banner-identifier .sf-suggestions::-webkit-scrollbar-thumb:hover {
  background: rgba(203, 213, 225, 0.92); /* Function: gives the custom scrollbar a subtle interactive state. */
}

.hero-react-widget .sf-banner-identifier .sf-suggestion-option {
  width: 100%;
  border: 0;
  background: transparent;
  color: #0f172a; /* Function: keeps suggestion rows legible on the light dropdown. */
  font: inherit;
  text-align: left;
  padding: 12px 18px;
}

.hero-react-widget .sf-banner-identifier .sf-suggestion-option:hover,
.hero-react-widget .sf-banner-identifier .sf-suggestion-option.active {
  background: rgba(251, 182, 73, 0.14); /* Function: uses the brand accent to highlight keyboard and hover selection. */
}

.hero-react-widget .sf-banner-identifier .sf-suggestion-title {
  color: #0f172a; /* Function: makes the vehicle title the strongest row text. */
  padding: 0;
}

.hero-react-widget .sf-banner-identifier .sf-suggestion-note {
  color: #475569; /* Function: keeps empty, loading, and helper states subdued but readable. */
  padding: 12px 18px;
}

.hero-react-widget .sf-banner-identifier .sf-suggestion-subtitle {
  color: #64748b; /* Function: distinguishes trims and metadata from the suggestion title. */
  padding: 0;
}

/* ─── VIN Decode Status Feedback ─── */
.hero-react-widget .sf-vin-status {
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 16px;
}

.hero-react-widget .sf-vin-loading {
  color: #1d4ed8; /* Function: shows VIN decoding progress in a recognizable blue state. */
}

.hero-react-widget .sf-vin-error {
  color: #b91c1c; /* Function: keeps VIN decode errors accessible on the light dropdown. */
}

.hero-react-widget .sf-vin-partial {
  color: #b45309; /* Function: marks partial VIN matches with a warm warning tone. */
}

.hero-react-widget .sf-vin-ready {
  color: #047857; /* Function: marks ready VIN states with a clear success tone. */
}

.hero-react-widget .sf-banner-identifier .sf-suggestion-option {
  cursor: pointer;
  transition: background 0.15s ease;
}

.hero-overlay__content {
  max-width: 620px;
  width: 100%;
  text-align: left;
  pointer-events: none;
  margin-bottom: 0.5rem;
}

.hero-overlay__line {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.98;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0;
  color: #fff;
  word-break: keep-all;
  overflow-wrap: normal;
}

.hero-overlay__line--small {
  font-weight: 700;
  font-size: clamp(0.85rem, 0.35vw + 0.78rem, 1.05rem);
  margin-bottom: 0.85rem;
  min-height: 1.4em;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.78);
}

#heroLine1 {
  margin-bottom: 0.3rem;
  position: relative;
  top: 0.1rem;
}

.hero-overlay__line--big {
  font-size: clamp(3.2rem, 5vw + 1rem, 4.7rem);
}

/* Metallic gold gradient on the accent word */
.hero-overlay__line--gold {
  background: linear-gradient(135deg, #ffd96a 0%, #f0a830 40%, #ffd96a 70%, #c4882a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Fallback for browsers without background-clip */
  color: #f2c77d;
}

.hero-overlay__caret {
  display: inline-block;
  width: 0.5ch;
  margin-left: 2px;
  border-right: 2px solid #fff;
  animation: hero-caret-blink 0.96s steps(1) infinite;
}

.hero-concierge__subtitle {
  font-size: clamp(1rem, 1vw + 0.5rem, 1.2rem);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.6;
  margin: 1rem 0 0;
  max-width: 400px;
  letter-spacing: 0.01em;
}

.hero-concierge__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: var(--leading-heading);
  letter-spacing: var(--tracking-heading);
  margin: 0 0 1rem;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-action-buttons {
  display: none;
}

@keyframes hero-caret-blink {
  50% { border-color: transparent; }
}

@keyframes hero-slide-in-left {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes hero-slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes hero-widget-slide-in-right {
  from {
    opacity: 0;
    transform: translateX(30px); /* Function: starts the solid card slightly to the right. */
  }

  to {
    opacity: 1;
    transform: translateX(0); /* Function: settles the solid card into its final hero position. */
  }
}

.hero-overlay__line.animate-left {
  animation: hero-slide-in-left 0.64s ease-out forwards;
}

.hero-overlay__line.animate-right {
  animation: hero-slide-in-right 0.64s ease-out forwards;
}

@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .hero-concierge {
    background: #071841; /* Function: restores the original dark mobile base behind the full-image hero. */
    min-height: 100vh;
    min-height: 100svh;
    height: auto;
  }

  .hero-concierge__bg {
    clip-path: none; /* Function: removes the desktop diagonal split on mobile. */
    filter: none; /* Function: removes the desktop split seam shadow on mobile. */
    -webkit-mask-image: none; /* Function: restores the full mobile hero image without a desktop edge fade. */
    mask-image: none; /* Function: restores the full mobile hero image without a desktop edge fade. */
    right: 0; /* Function: restores the full-width mobile image panel. */
    width: auto; /* Function: lets left and right offsets define the mobile image width. */
  }

  .hero-concierge__bg img {
    animation: none; /* Function: keeps mobile hero imagery static for smoother input and scrolling. */
    object-position: 58% center;
    transform: scale(1.04) translate3d(0, 0, 0); /* Function: preserves the intended crop without continuous motion. */
    will-change: auto; /* Function: releases the mobile hero image layer. */
  }

  /* Function: keeps the mobile hero legible while preserving the current image. */
  .hero-concierge__overlay {
    -webkit-backdrop-filter: none; /* Function: prevents the desktop buy-page blur from fogging the mobile hero. */
    backdrop-filter: none; /* Function: preserves the existing mobile overlay clarity. */
    background: /* Function: softens the mobile-only left-to-right dark wash without changing desktop. */
      linear-gradient(to bottom, transparent 65%, #0A2463 100%), /* Function: seamless fade into the overlap wrapper color below. */
      linear-gradient(to right, rgba(0, 0, 0, 0.26) 0%, rgba(255, 255, 255, 0.08) 100%), /* Function: reduces the black-to-light lateral effect on small screens. */
      linear-gradient(180deg, rgba(5, 22, 58, 0.78) 0%, rgba(10, 42, 103, 0.68) 55%, rgba(5, 22, 58, 0.72) 100%), /* Function: preserves vertical text contrast over the mobile hero image. */
      linear-gradient(90deg, rgba(5, 22, 58, 0.66) 0%, rgba(30, 104, 216, 0.28) 100%); /* Function: trims the navy side sweep so the mobile hero reads less dark. */
  }

  .hero-concierge__container {
    display: grid;
    grid-template-columns: 1fr;
    justify-content: flex-start;
    align-content: center; /* Function: centers the mobile hero copy and form vertically in the visible hero. */
    padding-top: 112px; /* Function: keeps mobile navbar clearance independent from viewport-unit rounding. */
    padding-bottom: 96px; /* Function: keeps the mobile form-to-card gap fixed across Chrome display-scale settings. */
    gap: 1.25rem;
  }

  .hero-concierge__content {
    max-width: none;
  }

  .hero-react-widget {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.8rem; /* Function: keeps the compact blue-gray card from crowding the mobile hero. */
    flex: unset;
    justify-self: stretch;
  }

  .hero-widget-label {
    text-align: center;
  }

  .hero-trust-chip {
    align-self: center;
  }

  .hero-unified-row {
    flex-wrap: wrap;
  }

  .hero-unified-row .sf-banner-toggle {
    flex: 1 1 100%;
    width: 100%;
    margin: 0;
    border-radius: var(--hero-widget-card-radius); /* Function: keeps mobile segmented-control corners matched to the offer cards. */
  }

  .hero-unified-row .sf-banner-toggle button {
    flex: 1;
    justify-content: center;
  }

  .hero-unified-row .sf-banner-identifier {
    flex: 1 1 100%;
  }

  .hero-unified-row .sf-banner-toggle button {
    height: 40px; /* Function: keeps the mobile segmented control substantial like the desktop version. */
    padding: 0 12px !important;
    font-size: 0.95rem;
  }

  .hero-unified-input {
    height: 52px; /* Function: keeps mobile fields substantial while preserving compact padding. */
    min-height: 52px;
    padding: 0 0.95rem;
    font-size: 16px !important; /* Function: prevents mobile Safari from zooming when the hero widget fields receive focus. */
  }

  .hero-unified-form > .sf-banner-button {
    min-height: 52px;
    padding: 0 1.25rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 640px) {
  .hero-overlay__line--small {
    display: none;
    margin: 0;
    min-height: 0;
  }

  .hero-overlay__line--big {
    font-size: clamp(2.5rem, 11.5vw, 3.45rem); /* Function: keeps the mobile hero headline inside narrow Chrome viewports across platforms. */
    max-width: 100%; /* Function: prevents wide hero headline text from forcing horizontal clipping on phones. */
  }

  .hero-concierge__container {
    align-content: center; /* Function: keeps narrow mobile hero content vertically centered instead of bottom-pinned. */
    gap: clamp(1.8rem, 6.5vw, 2.35rem); /* Function: keeps the original mobile breathing room between the hero copy and sell widget. */
    padding-inline: 1rem; /* Function: keeps the mobile hero aligned with the existing page gutter. */
    padding-top: 112px; /* Function: restores navbar clearance without rem-based scaling drift on narrow phones. */
  }

  /* Function: lifts only the mobile headline block slightly while keeping the overall hero stack balanced. */
  .hero-concierge__content {
    transform: translateY(-0.35rem); /* Function: moves the mobile text up only slightly without pulling the form widget with it. */
  }

  /* Function: adds a final small mobile offset so the glass widget does not crowd the subtitle. */
  .hero-react-widget {
    margin-top: 0.65rem; /* Function: moves the mobile form widget down only slightly from the balanced hero stack. */
  }

  .hero-concierge__subtitle {
    font-size: 0.98rem;
    line-height: 1.55;
    max-width: 34ch;
  }

}

/* Function: keeps the iPhone form glass stable while allowing headline text animations to play. */
@media (max-width: 860px) {
  html.is-ios-webkit .hero-react-widget {
    animation: none !important;
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
  }

  html.is-ios-webkit .hero-concierge__bg img {
    animation: none !important;
  }

  html.is-ios-webkit .hero-unified-fields {
    background: transparent !important; /* Function: keeps iOS on the sell-page control skin without an extra field panel. */
    background-color: transparent !important; /* Function: removes the previous iOS field-panel fallback. */
    -webkit-backdrop-filter: none !important; /* Function: leaves iOS blur to the outer card skin. */
    backdrop-filter: none !important; /* Function: leaves iOS blur to the outer card skin. */
  }
}

/* Function: gives real iPhone viewports more space between the sell form card and the next home card. */
@media (max-width: 900px) {
  html.is-ios-webkit .home-overlap-wrapper {
    padding-top: 3rem !important;
  }

  html.is-ios-webkit .home-overlap-container {
    margin-bottom: -3rem !important;
    top: -3rem !important;
  }
}

/* Function: catches touch Safari on iPhone when the JavaScript class is unavailable. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 900px) and (hover: none) and (pointer: coarse) {
    .home-overlap-wrapper {
      padding-top: 3rem !important;
    }

    .home-overlap-container {
      margin-bottom: -3rem !important;
      top: -3rem !important;
    }
  }
}

/* Function: catches real touch phones when browser UA/class detection is unavailable. */
@media (max-width: 860px) and (hover: none) and (pointer: coarse) {
  .hero-unified-fields {
    background: transparent !important; /* Function: keeps touch phones on the sell-page control skin without an extra field panel. */
    background-color: transparent !important; /* Function: removes the previous touch-phone field-panel fallback. */
    -webkit-backdrop-filter: none !important; /* Function: leaves touch-phone blur to the outer card skin. */
    backdrop-filter: none !important; /* Function: leaves touch-phone blur to the outer card skin. */
  }
}

/* Function: mirrors the iPhone form stabilization for WebKit browsers that support this query. */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 860px) {
    .hero-react-widget {
      animation: none !important;
      opacity: 1 !important;
      transform: translate3d(0, 0, 0) !important;
    }

    .hero-concierge__bg img {
      animation: none !important;
    }

    .hero-unified-fields {
      -webkit-backdrop-filter: none !important; /* Function: keeps WebKit from adding a second blur behind the sell-page controls. */
      backdrop-filter: none !important; /* Function: keeps WebKit from adding a second blur behind the sell-page controls. */
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-concierge__content {
    animation: none;
  }

  .hero-concierge__bg img {
    animation: none;
  }

  .hero-overlay__line {
    opacity: 1;
  }

  .hero-overlay__caret {
    animation: none;
    border-right: none;
  }

  .hero-trust-chip {
    animation: none;
    opacity: 1;
  }

  .hero-react-widget {
    animation: none;
    opacity: 1;
  }

  .hero-unified-form > .sf-banner-button::before {
    animation: none;
  }
}
