/* Live 3D hero (hero-3d.js): the canvas sits over the poster and under the shade and copy. */
.hero-canvas{position:absolute;inset:0;width:100%;height:100%;display:block;z-index:-3;opacity:0;transition:opacity .4s ease}
.hero-scene.is-live .hero-canvas{opacity:1}
.hero-scene.has-3d .hero-image{animation:none}
.hero-final{opacity:0;transition:opacity .6s ease}
.hero-final.is-shown{opacity:1}
/* colour grade of the whole scene, canvas and stills alike so the fallbacks keep matching (tuned with ?tune) */
.hero-scene{--grade-brightness:1.3;--grade-contrast:1;--grade-saturate:.92}
.hero-scene :is(.hero-image,.hero-canvas){filter:brightness(var(--grade-brightness)) contrast(var(--grade-contrast)) saturate(var(--grade-saturate))}
/* portrait screens see a narrow slice of the 16:9 frame: keep the car's front and headlights in it (the canvas follows) */
@media(max-width:540px){.hero-image{object-position:72% 50%}}
@media(orientation:portrait){.hero-fullscreen .hero-image{object-position:73% 50%}}
/* tall screens get the 9:16 stills (same query as index.html, hero-3d.js, hero-3d-scene.js): car and mural are centred across the frame, and a crop only ever takes the empty ceiling */
@media(max-aspect-ratio:5/6){
.hero-fullscreen .hero-image{object-position:50% 100%}
/* the shade keeps the copy readable and leaves the mural and the car in the clear: it ends where the mural starts and only fades the floor under the car */
.hero-fullscreen .hero-shade{--h1-end:calc(130px + 320px);--fade-a:67px;--fade-b:170px;--fade-c:240px;background:linear-gradient(180deg,rgba(24,19,19,.74) 0,rgba(24,19,19,.7) var(--h1-end),rgba(24,19,19,.62) calc(var(--h1-end) + var(--fade-a)),rgba(24,19,19,.36) calc(var(--h1-end) + var(--fade-b)),rgba(24,19,19,0) calc(var(--h1-end) + var(--fade-c))),linear-gradient(0deg,var(--bg) 0,rgba(24,19,19,.6) 6%,rgba(24,19,19,0) 13%)}
}
/* tall tablets: the copy moves up under the header, into the empty ceiling above the mural */
@media(max-aspect-ratio:5/6) and (min-width:541px){
.hero-fullscreen .header{--header-fade:12px}
.hero-fullscreen .hero-content{justify-content:flex-start;padding-top:max(96px,11vw)}
.hero-fullscreen .hero-marquee{min-width:96%;margin-top:20px}
.hero-fullscreen-actions{margin-top:22px}
}
@media(max-aspect-ratio:5/6) and (min-width:541px) and (max-width:1150px){
.hero-fullscreen .hero h1{font-size:min(65px,8.5vw)}
.hero-fullscreen .hero-shade{--h1-end:calc(max(96px,11vw) + min(250px,32.6vw))}
}
/* iPads: the screen is wider, so the emblem starts about where the heading ends (85.7vw above the bottom). The actions stack at the left of the mural, and the shade stops at the emblem, with a patch of its own behind the copy */
@media(min-aspect-ratio:7/10) and (max-aspect-ratio:5/6){
.hero-fullscreen .hero-shade{--mural:calc(100% - 85.7vw);background:linear-gradient(180deg,rgba(24,19,19,.74) 0,rgba(24,19,19,.6) calc(var(--mural) - 120px),rgba(24,19,19,.2) var(--mural),rgba(24,19,19,0) calc(var(--mural) + 90px)),radial-gradient(ellipse 52% 46% at 0 32%,rgba(24,19,19,.62) 0,rgba(24,19,19,.5) 55%,rgba(24,19,19,0) 100%),linear-gradient(0deg,var(--bg) 0,rgba(24,19,19,.6) 6%,rgba(24,19,19,0) 13%)}
}
@media(min-aspect-ratio:7/10) and (max-aspect-ratio:5/6) and (min-width:541px){
.hero-fullscreen-actions{flex-direction:column;align-items:flex-start;gap:14px}
}
/* the narrowest of these (foldables, small tablets): the car rises to the actions, so the scroll hint gives way */
@media(max-aspect-ratio:5/6) and (max-width:540px){
.hero-fullscreen .hero-shade{--h1-end:calc(100px + 51vw)}
}
/* phones with less height (browser bars showing): the mural and the car sit higher against the copy, so the copy tightens to end above them and the caption drops to just over the bottom bar */
@media(max-aspect-ratio:5/6) and (max-width:540px) and (min-aspect-ratio:1/2){
.hero-fullscreen .hero-content{padding-top:92px}
.hero-fullscreen .hero h1{font-size:11.5vw}
.hero-fullscreen .hero-marquee{margin-top:14px}
.hero-fullscreen .hero-shade{--h1-end:calc(92px + 45vw);--fade-b:150px;--fade-c:210px}
.hero-fullscreen .scene-caption{bottom:72px}
}
@media(max-aspect-ratio:5/6) and (max-width:540px) and (min-aspect-ratio:5/9){
.hero-fullscreen .header{--header-fade:12px}.hero-fullscreen .hero-content{padding-top:80px}
.hero-fullscreen .hero h1{font-size:10.5vw}
.hero-fullscreen .hero-marquee{margin-top:12px}
.hero-fullscreen .hero-shade{--h1-end:calc(80px + 41vw);--fade-a:56px;--fade-b:110px;--fade-c:170px}
}
/* the shortest phones: the first screen shows the car whole rather than the scroll hint */
@media(max-aspect-ratio:5/6) and (max-width:540px) and (max-height:700px){
.hero-fullscreen .hero-scene{min-height:540px}
}
@media print{.hero-canvas{display:none}}
