/* =====================================================================
   Roadster — front page (index.php). Builds on rs-site.css (black canvas).
   ===================================================================== */

/* ---------- Hero: film, no controls ---------- */
.rh-hero { position: relative; height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; background: #000; color: #fff; isolation: isolate; display: flex; flex-direction: column; justify-content: flex-end; }
.rh-stage { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.rh-poster { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; transition: opacity 1.4s ease; }
.rh-poster img { animation: rhPush 14s ease-out both; }
@keyframes rhPush { from { transform: scale(1.08); } to { transform: scale(1); } }
.rh-yt { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.rh-yt iframe { position: absolute; top: 50%; left: 50%; width: max(100%, 177.78vh); height: max(100%, 56.25vw); transform: translate(-50%, -50%) scale(1.2); border: 0; }
.rh-hero.is-yt .rh-yt { opacity: 1; }
.rh-hero.is-yt .rh-poster { opacity: 0; }
/* Soft floor so the small copy stays legible; the frame above stays clear for the car */
.rh-veil { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: -1; background: rgba(0,0,0,.3); -webkit-mask-image: linear-gradient(to top, #000 30%, transparent); mask-image: linear-gradient(to top, #000 30%, transparent); pointer-events: none; }

.rh-content { padding-bottom: 44px; }
@media (min-width: 1024px) { .rh-content { padding-bottom: 56px; } }
.rh-kicker { margin: 0 0 10px; font-size: 11.5px; font-weight: 500; letter-spacing: .28em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.rh-title { margin: 0; font-family: var(--rs-display); font-stretch: 125%; font-weight: 600; text-transform: uppercase; line-height: 1.02; letter-spacing: .01em; font-size: clamp(22px, 2.6vw, 38px); }
.rh-sub { margin: 10px 0 0; max-width: 420px; font-size: 14.5px; line-height: 1.55; color: rgba(255,255,255,.78); }
.rh-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.rh-cta .rs-btn { height: 42px; padding: 0 22px; }
@media (max-width: 479px) { .rh-cta .rs-btn { flex: 1 1 100%; } }
.rh-in { opacity: 0; transform: translateY(18px); animation: rhIn 1.1s var(--rs-ease) forwards; animation-delay: calc(.6s + var(--i, 0) * .12s); }
@keyframes rhIn { to { opacity: 1; transform: none; } }

/* ---------- Section heads ---------- */
.rh-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 40px; margin-bottom: 48px; }
@media (min-width: 1024px) { .rh-head { margin-bottom: 64px; } }

/* ---------- Full-bleed panels (headline top, spec row bottom) ---------- */
.rh-panel { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; isolation: isolate; background: #000; color: #fff; }
.rh-panel-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; }
.rh-panel-img img { transform: scale(1.08); transition: transform 3s var(--rs-ease); }
.rh-panel:has(.is-in) .rh-panel-img img { transform: none; }
.rh-panel-veil { position: absolute; inset: 0; z-index: -1; background: rgba(0,0,0,.25); }
.rh-panel-top { padding-top: calc(var(--rs-hdr-h) + 48px); text-align: center; }
.rh-panel-bottom { padding-bottom: 56px; display: flex; flex-direction: column; align-items: center; gap: 28px; }
@media (min-width: 1024px) { .rh-panel-bottom { flex-direction: row; justify-content: center; gap: 72px; padding-bottom: 64px; } }
.rh-stats { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); gap: 16px 36px; margin: 0; text-align: center; }
@media (min-width: 1024px) { .rh-stats { gap: 0 64px; } }
.rh-stats div { display: flex; flex-direction: column; }
.rh-stats dd { order: 1; margin: 0; font-family: var(--rs-display); font-stretch: 118%; font-weight: 500; font-size: clamp(24px, 3vw, 40px); line-height: 1; font-variant-numeric: tabular-nums; }
.rh-stats dd small { margin-left: 4px; font-family: var(--rs-text); font-stretch: 100%; font-size: .42em; font-weight: 500; color: rgba(255,255,255,.75); }
.rh-stats dt { order: 2; margin-top: 8px; font-size: 12.5px; color: rgba(255,255,255,.72); }
.rh-panel-cabin .rh-panel-img img { object-position: 50% 45%; }

/* ---------- Showroom ---------- */
.rh-car { display: grid; gap: 32px; align-items: center; }
.rh-car + .rh-car { margin-top: 96px; }
@media (min-width: 1024px) { .rh-car { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 64px; } .rh-car.is-flip .rh-car-img { order: 2; } }
.rh-car-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; }
.rh-car-img .rs-pic { width: 100%; height: 100%; }
.rh-car-img img { transition: transform 1.6s var(--rs-ease); }
.rh-car:hover .rh-car-img img { transform: scale(1.04); }
.rh-car-name { margin: 14px 0 0; font-family: var(--rs-display); font-stretch: 125%; font-weight: 600; text-transform: uppercase; font-size: clamp(32px, 4vw, 54px); line-height: .95; }
.rh-car-tag { margin: 14px 0 0; max-width: 420px; color: var(--rs-ink-2); font-size: 15px; }
.rh-car-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 28px 0 0; border-top: 1px solid var(--rs-line); }
.rh-car-specs div { padding: 18px 0 0; }
.rh-car-specs div + div { padding-left: 16px; border-left: 1px solid var(--rs-line); }
.rh-car-specs dt { font-size: 12px; color: var(--rs-ink-2); }
.rh-car-specs dd { margin: 6px 0 0; font-family: var(--rs-display); font-stretch: 112%; font-size: 24px; font-weight: 500; line-height: 1; }
.rh-car-specs dd small { margin-left: 3px; font-family: var(--rs-text); font-size: 12px; color: var(--rs-ink-2); }
.rh-car-price { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--rs-line); border-bottom: 1px solid var(--rs-line); }
.rh-car-price span { display: block; }
.rh-car-price b { display: block; margin-top: 4px; font-size: 15px; font-weight: 500; }
.rh-car-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.rh-car-cta .rs-btn { flex: 1 1 150px; }

/* ---------- Cinematic slider ---------- */
.rh-slider { padding: 88px 0 96px; background: #000; }
@media (min-width: 1024px) { .rh-slider { padding: 128px 0; } }
.rh-slider-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.rh-slider-nav { display: flex; gap: 8px; }
.rh-slider-nav button { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--rs-line-strong); border-radius: 50%; background: transparent; color: #fff; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.rh-slider-nav button:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.rh-slider-nav svg { width: 18px; height: 18px; }
.rh-slider-stage { position: relative; height: clamp(320px, 68vh, 720px); overflow: hidden; outline: none; background: #000; }
.rh-slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 1.2s ease; }
.rh-slide.is-on { opacity: 1; z-index: 1; }
.rh-slide .rs-pic { width: 100%; height: 100%; background: #000; }
.rh-slide img { transform: scale(1.1); transition: transform 7s linear; }
.rh-slide.is-on img { transform: scale(1); }
/* Close-up crops are shown at their native size on black, never stretched */
.rh-slide.is-native img { object-fit: scale-down; }
.rh-slider-index { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 16px; overflow-x: auto; scrollbar-width: none; }
.rh-slider-index::-webkit-scrollbar { display: none; }
.rh-slider-index button { width: 100%; padding: 0; border: 0; background: none; color: var(--rs-ink-3); text-align: left; cursor: pointer; font: inherit; transition: color .3s ease; }
.rh-slider-index .is-on button, .rh-slider-index button:hover { color: #fff; }
.rh-si-bar { display: block; height: 1px; background: var(--rs-line-strong); overflow: hidden; }
.rh-si-bar i { display: block; height: 100%; background: #fff; transform: scaleX(0); transform-origin: left; }
.rh-slider-index .is-done .rh-si-bar i { transform: scaleX(1); }
.rh-si-name { display: block; margin-top: 14px; font-size: 13px; font-weight: 500; letter-spacing: .04em; }
.rh-si-line { display: none; margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--rs-ink-2); }
@media (min-width: 1024px) { .rh-slider-index .is-on .rh-si-line { display: block; } }

/* ---------- Mosaic ---------- */
.rh-mosaic { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .rh-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
.rh-tile { position: relative; margin: 0; overflow: hidden; aspect-ratio: 1; background: #050505; }
.rh-tile.is-wide { grid-column: 1 / -1; aspect-ratio: 21 / 9; }
@media (min-width: 1024px) { .rh-tile.is-wide { grid-column: span 2; aspect-ratio: auto; } }
.rh-tile .rs-pic { width: 100%; height: 100%; }
.rh-tile img { transition: transform 1.6s var(--rs-ease); }
.rh-tile:hover img { transform: scale(1.05); }
.rh-tile figcaption { position: absolute; left: 18px; bottom: 16px; font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.85); text-shadow: 0 1px 12px rgba(0,0,0,.6); }

/* ---------- Investment ---------- */
.rh-projects { display: grid; gap: 24px; }
@media (min-width: 768px) { .rh-projects { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.rh-project { background: var(--rs-surface); }
.rh-project-img { aspect-ratio: 16 / 9; }
.rh-project-body { padding: 28px; display: grid; gap: 14px; justify-items: start; }
.rh-project-body .rs-small { margin: 0; }
.rh-project-facts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 0; padding-top: 14px; border-top: 1px solid var(--rs-line); }
.rh-project-facts dt { font-size: 12px; color: var(--rs-ink-2); }
.rh-project-facts dd { margin: 4px 0 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.rh-bar { width: 100%; height: 2px; background: var(--rs-line); }
.rh-bar i { display: block; height: 100%; background: #fff; }
.rh-invest-empty { display: grid; gap: 14px; justify-items: start; max-width: 640px; padding: 40px; background: var(--rs-surface); }
.rh-invest-empty p { margin: 0; }
.rh-invest-empty .rs-btn { margin-top: 8px; }

/* ---------- Tracking ---------- */
.rh-track-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.rh-track-form { display: flex; flex-wrap: wrap; gap: 10px; width: 100%; max-width: 620px; margin-top: 36px; }
.rh-track-form .rs-input { flex: 1 1 280px; height: 52px; letter-spacing: .04em; text-transform: uppercase; }
.rh-track-form .rs-input::placeholder { text-transform: none; letter-spacing: 0; }
.rh-track-form .rs-btn { height: 52px; flex: 1 1 180px; }
@media (min-width: 640px) { .rh-track-form .rs-btn { flex: 0 0 auto; } }
.rh-track-hint { margin: 16px 0 0; font-size: 12.5px; color: var(--rs-ink-3); }

/* ---------- Closing ---------- */
.rh-final { background: #000; border-top: 1px solid var(--rs-line); }
.rh-final-in { padding-top: 140px; padding-bottom: 140px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.rh-final .rh-cta { justify-content: center; margin-top: 36px; }

@media (prefers-reduced-motion: reduce) {
    .rh-in { animation: none; opacity: 1; transform: none; }
    .rh-poster img, .rh-slide img, .rh-panel-img img { animation: none; transition: none; transform: none; }
}
