/* Singh Loan — homepage signature hero ("What are you financing?")
   Layered on top of site.css; applies only to .hero--scene and the facts band.
   Structure: .hero__stage (photo / WebGL + headline) above .hero__dock (asset picker). */

.hero--scene {
  --dock-bg: rgba(6, 13, 24, .86);
  --chip-line: rgba(245, 239, 227, .34);
  display: flex; flex-direction: column; align-items: stretch;
  min-height: 100svh; background: var(--navy-950);
}
.hero--scene::before { content: none; }
.hero--scene .scroll-cue { display: none; }

/* ---------- Stage ---------- */
.hero__stage { position: relative; isolation: isolate; flex: 1 1 auto; display: flex; align-items: flex-end; min-height: 0; }
.hero__stage .hero__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; background: var(--navy-950); }
.hero__stage .hero__media picture,
.hero__stage .hero__media img { width: 100%; height: 100%; }
.hero__stage .hero__media img {
  object-fit: cover; object-position: var(--focus, 74%) var(--focus-y, 55%);
  transform: none; animation: none; transition: opacity .32s var(--ease);
}
.hero__stage .hero__media.is-swapping img { opacity: 0; }
.hero__stage::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(6, 13, 24, .9) 0%, rgba(6, 13, 24, .58) 32%, rgba(6, 13, 24, 0) 60%),
    linear-gradient(0deg, var(--navy-950) 0%, rgba(6, 13, 24, 0) 14%),
    linear-gradient(180deg, rgba(6, 13, 24, .6) 0%, rgba(6, 13, 24, 0) 24%);
}

/* WebGL canvas fades in over the photograph; its first frame matches the CSS crop exactly. */
.scene-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .6s var(--ease-out); }
.hero--scene.gl-on .scene-canvas { opacity: 1; }

.hero--scene .hero__inner { padding: 124px 0 36px; }
.hero__copy { max-width: 860px; }
.hero--scene h1 { font-size: min(clamp(2.6rem, 1.4rem + 4vw, 5rem), 9.2vh); max-width: 17ch; }
.hero--scene .lede { margin: .9em 0 1.5em; max-width: 54ch; color: rgba(245, 239, 227, .9); }

/* ---------- Dock ---------- */
.hero__dock { position: relative; padding: 4px 0 clamp(28px, 4vh, 40px); }
.hero__dock::before { /* the light path lands here */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(226, 199, 143, .5) 30%, rgba(226, 199, 143, .15) 85%, transparent);
}

.picker { border: 0; margin: 0; padding: 6px 0 0; min-width: 0; display: grid; gap: 18px; }
.picker__legend {
  float: left; width: 100%; padding: 22px 0 0; margin: 0 0 14px;
  font-family: var(--f-display); font-size: var(--step-2); font-weight: 400;
  font-variation-settings: "opsz" 48; color: var(--ivory); line-height: 1.15;
}
.picker__chips { display: flex; flex-wrap: wrap; gap: 8px; align-content: start; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.chip span {
  display: inline-flex; align-items: center; gap: .65em; min-height: 48px; padding: 0 18px 0 15px;
  border: 1px solid var(--chip-line); border-radius: 999px; background: var(--navy-850);
  color: var(--ivory); font-weight: 600; font-size: .95rem; line-height: 1.2; white-space: nowrap;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease);
}
.chip span::before {
  content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid currentColor; transition: background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.chip:hover span { border-color: var(--gold-2); }
.chip input:checked + span { background: var(--gold); border-color: var(--gold); color: var(--navy-900); }
.chip input:checked + span::before { background: currentColor; box-shadow: 0 0 0 3px rgba(10, 22, 40, .18); }
.chip input:focus-visible + span { outline: 2px solid var(--gold-2); outline-offset: 3px; }

/* Panels: CSS shows the chosen one even before (or without) JavaScript. */
.picker__panels { min-width: 0; }
.asset-panel {
  display: none; background: var(--navy-850); border: 1px solid rgba(226, 199, 143, .28); border-radius: 18px;
  padding: 18px 22px 20px; color: var(--ivory);
}
.asset-panel h2 { font-size: var(--step-2); font-weight: 400; margin-bottom: .35em; letter-spacing: -.01em; }
.asset-panel p { font-size: .95rem; line-height: 1.55; color: rgba(245, 239, 227, .88); margin: 0 0 .55em; }
.asset-panel__ready { border-top: 1px solid var(--line-light); padding-top: .6em; }
.asset-panel__ready b { color: var(--gold-2); font-weight: 700; }
.asset-panel__links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 12px; }
.asset-panel__links .btn { min-height: 48px; padding: .65em 1.2em; font-size: .92rem; }
.asset-panel__links .link-arrow { color: var(--gold-2); min-height: 44px; }
.asset-panel__links .link-arrow:hover { color: var(--ivory); }
.asset-panel.is-entering { animation: panel-in .4s var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.asset-panel[data-asset-panel="sleeper"] { display: block; }
.picker:has(input:checked) .asset-panel { display: none; }
.picker:has(input[value="sleeper"]:checked)   [data-asset-panel="sleeper"],
.picker:has(input[value="daycab"]:checked)    [data-asset-panel="daycab"],
.picker:has(input[value="reefer"]:checked)    [data-asset-panel="reefer"],
.picker:has(input[value="flatbed"]:checked)   [data-asset-panel="flatbed"],
.picker:has(input[value="equipment"]:checked) [data-asset-panel="equipment"],
.picker:has(input[value="medical"]:checked)   [data-asset-panel="medical"] { display: block; }
.asset-panel[hidden] { display: none !important; }
@supports not selector(:has(*)) { .asset-panel:not([hidden]) { display: block; } }

/* ---------- Motion control ---------- */
.motion-toggle {
  position: absolute; z-index: 3; right: var(--gutter); top: 108px;
  display: inline-flex; align-items: center; gap: .55em; min-height: 44px; padding: 0 16px 0 13px;
  border: 1px solid var(--chip-line); border-radius: 999px; background: var(--dock-bg); color: var(--ivory);
  font-size: .85rem; font-weight: 600;
}
.motion-toggle:hover { border-color: var(--gold-2); }
.motion-toggle svg { width: 14px; height: 14px; }
.motion-toggle .i-play { display: none; }
.motion-toggle.is-paused .i-play { display: block; }
.motion-toggle.is-paused .i-pause { display: none; }
.motion-toggle[hidden] { display: none; }

/* ---------- Facts band (moved from the hero, copy unchanged) ---------- */
.facts-band { padding-block: 0 24px; background: var(--navy-950); }
.facts-band .hero__facts { margin-top: 0; }
.facts-band .hero__facts li { color: rgba(245, 239, 227, .82); }

/* ---------- Wider screens: chips beside the panel ---------- */
@media (min-width: 900px) {
  .picker { grid-template-columns: minmax(0, 1fr) minmax(380px, 1.05fr); grid-template-rows: auto 1fr; column-gap: clamp(24px, 3vw, 48px); row-gap: 0; align-items: start; }
  .picker__legend { grid-column: 1; grid-row: 1; }
  .picker__chips { grid-column: 1; grid-row: 2; }
  .picker__panels { grid-column: 2; grid-row: 1 / span 2; padding-top: 18px; }
}
@media (min-width: 1280px) {
  .picker { grid-template-columns: minmax(0, 1fr) minmax(480px, 1.1fr); }
}

/* ---------- Phones & small tablets: photo on top, content beneath ---------- */
@media (max-width: 819px) {
  .hero--scene { display: block; min-height: 0; background: var(--navy-900); }
  .hero__stage { display: block; }
  .hero__stage .hero__media { position: relative; inset: auto; height: clamp(300px, 56svh, 520px); }
  .hero__stage::before {
    bottom: auto; height: clamp(300px, 56svh, 520px);
    background:
      linear-gradient(0deg, var(--navy-900) 0%, rgba(10, 22, 40, .72) 24%, rgba(10, 22, 40, 0) 54%),
      linear-gradient(180deg, rgba(6, 13, 24, .7) 0%, rgba(6, 13, 24, 0) 30%);
  }
  .hero--scene .hero__inner { padding: 0 0 8px; margin-top: clamp(-150px, -20svh, -90px); position: relative; }
  .hero--scene h1 { font-size: clamp(2.3rem, 1.5rem + 4.2vw, 3.3rem); max-width: 13ch; }
  .hero--scene .lede { font-size: 1rem; }
  .hero--scene .hero__actions .btn { flex: 1 1 220px; justify-content: center; }
  .hero__dock::before { display: none; }
  .picker { padding-top: 4px; }
  .picker__chips {
    flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    margin-inline: calc(-1 * var(--gutter)); padding: 4px var(--gutter) 8px; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent);
  }
  .picker__chips::-webkit-scrollbar { display: none; }
  .chip { scroll-snap-align: start; }
  .facts-band { background: var(--navy-900); }
  .motion-toggle { right: 12px; top: 92px; width: 44px; justify-content: center; padding: 0; }
  .motion-toggle [data-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 819px) and (max-height: 560px) { /* landscape phones */
  .hero__stage .hero__media, .hero__stage::before { height: 80svh; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__stage .hero__media img { transition: none; }
  .asset-panel.is-entering { animation: none; }
  .scene-canvas { transition: none; }
}
@media print {
  .scene-canvas, .motion-toggle, .picker__chips { display: none !important; }
}

/* QA: ?reducedmotion mirrors the prefers-reduced-motion presentation */
.qa-reduced [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; transition: none !important; }
.qa-reduced .split-words .w > span { transform: none !important; transition: none !important; }
.qa-reduced .hero__stage .hero__media img, .qa-reduced .scene-canvas { transition: none; }
.qa-reduced .asset-panel.is-entering { animation: none; }
.qa-reduced .marquee__track { animation: none; }

/* Keep the fixed "Let's talk" launcher (bottom-right, ~210px incl. offset) from covering panel links. */
@media (min-width: 1080px) {
  .hero__dock .wrap { padding-right: max(0px, 214px - max(var(--gutter), (100vw - var(--maxw)) / 2)); }
}

/* Phones: the enquiry launcher waits until the hero buttons scroll away, so it never covers them.
   The assistant itself stays reachable from each asset panel ("Ask our team"). */
@media (max-width: 819px) {
  .sl-chat-launch { transition: opacity .25s var(--ease), visibility .25s; }
  .hero-cta-visible .sl-chat-launch { opacity: 0; visibility: hidden; }
}
