/* Urban Worldwide — fleet pages: model gallery with cut-out vehicles floating on the page (same look as the home Lineup).
   Works with the existing [data-gal] script in site.js: .on = current model (drives in), .was = previous (drives out). */
.p-gal.gal-free{background:transparent;border-color:transparent;box-shadow:none;border-radius:0;overflow:visible;aspect-ratio:5/4;container-type:inline-size}
.gal-free .gal-v{-webkit-mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent);mask-image:linear-gradient(90deg,transparent,#000 6%,#000 94%,transparent)}
.gal-free .gal-s{overflow:visible;transition:none!important}
.gal-free .gal-s.was{opacity:1;z-index:1}

/* floor: cobalt glow and a horizon line where the tyres meet the page */
.gal-free::before{content:"";position:absolute;left:-4%;right:-4%;bottom:6%;height:34%;z-index:0;pointer-events:none;background:radial-gradient(ellipse 50% 46% at 50% 55%,rgba(77,147,212,.42),rgba(44,116,182,.14) 45%,transparent 72%)}
.gal-free::after{content:"";position:absolute;left:2%;right:2%;bottom:24%;height:1px;z-index:0;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(139,187,232,.55) 30%,rgba(240,207,154,.6) 50%,rgba(139,187,232,.55) 70%,transparent)}

/* model name set large behind the vehicle */
.gal-mark{position:absolute;left:50%;top:6%;z-index:0;transform:translateX(-50%);white-space:nowrap;font-family:var(--display);font-weight:200;line-height:1;letter-spacing:.06em;color:rgba(139,187,232,.05);-webkit-text-stroke:1px rgba(139,187,232,.22);pointer-events:none;font-size:min(17cqw,calc(92cqw / var(--n,8)))}
.gal-s.on .gal-mark{animation:gf-mark 1.4s cubic-bezier(.22,.68,.28,1) both}
.gal-s.was .gal-mark{opacity:0;transition:opacity .4s}
@keyframes gf-mark{from{opacity:0;letter-spacing:.22em}to{opacity:1;letter-spacing:.06em}}

/* the vehicle: 2:1 cut-out standing on the horizon line, with reflection and contact shadow */
.gal-car{position:absolute;left:0;right:0;bottom:24%;aspect-ratio:2/1;z-index:1}
.gal-free .gal-s img{object-fit:contain;transform:none!important;transition:none}
.gal-body{position:absolute;inset:0;z-index:2}
.gal-body img{position:absolute;inset:0;width:100%;height:100%;filter:drop-shadow(0 18px 24px rgba(0,0,0,.55))}
.gal-free .gal-refl{position:absolute;left:0;top:100%;width:100%;height:100%;transform:scaleY(-1)!important;opacity:.2;filter:blur(1.5px);-webkit-mask-image:linear-gradient(to bottom,transparent 62%,#000 100%);mask-image:linear-gradient(to bottom,transparent 62%,#000 100%)}
.gal-car::after{content:"";position:absolute;left:4%;right:2%;bottom:-3%;height:12%;z-index:1;background:radial-gradient(closest-side,rgba(0,0,0,.85),transparent);pointer-events:none}

/* headlights flare once the vehicle stops, then a light sweep runs over the paint only */
.gal-hl{position:absolute;width:0;height:0;z-index:4;pointer-events:none}
.gal-hl::before,.gal-hl::after{content:"";position:absolute;left:0;top:0;transform:translate(-50%,-50%) scale(.2);opacity:0;border-radius:50%;mix-blend-mode:screen}
.gal-hl::before{width:90px;height:44px;background:radial-gradient(closest-side,rgba(255,255,255,.95),rgba(205,225,255,.5) 35%,rgba(140,180,255,0))}
.gal-hl::after{width:420px;height:10px;background:radial-gradient(closest-side,rgba(220,235,255,.7),rgba(140,180,255,0))}
.gal-s.on .gal-hl::before{animation:gf-flare 1.6s cubic-bezier(.22,.68,.28,1) 1s forwards}
.gal-s.on .gal-hl::after{animation:gf-streak 1.6s cubic-bezier(.22,.68,.28,1) 1s forwards}
@keyframes gf-flare{0%{opacity:0;transform:translate(-50%,-50%) scale(.2)}18%{opacity:1;transform:translate(-50%,-50%) scale(1.15)}26%{opacity:.25}36%{opacity:1;transform:translate(-50%,-50%) scale(1)}100%{opacity:.75;transform:translate(-50%,-50%) scale(.85)}}
@keyframes gf-streak{0%{opacity:0;transform:translate(-50%,-50%) scaleX(.1)}36%{opacity:.9;transform:translate(-50%,-50%) scaleX(1)}100%{opacity:.35;transform:translate(-50%,-50%) scaleX(.7)}}
.gal-sweep{position:absolute;inset:0;z-index:3;pointer-events:none;mix-blend-mode:overlay;background:linear-gradient(105deg,transparent 38%,rgba(255,244,226,.85) 50%,transparent 62%) no-repeat;background-size:260% 100%;background-position:130% 0;-webkit-mask-image:var(--m);mask-image:var(--m);-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
.gal-s.on .gal-sweep{animation:gf-sweep 2.4s cubic-bezier(.45,0,.2,1) 1.9s both}
@keyframes gf-sweep{from{background-position:130% 0}to{background-position:-30% 0}}

/* drive in from the right, out to the left */
.gal-s.on .gal-car{animation:gf-in 1.35s cubic-bezier(.16,.84,.3,1) both}
.gal-s.was .gal-car{animation:gf-out .85s cubic-bezier(.55,0,.85,.35) both}
@keyframes gf-in{0%{transform:translateX(42%);opacity:0;filter:blur(7px) brightness(.35)}45%{opacity:1}70%{filter:blur(0) brightness(1)}100%{transform:none;opacity:1;filter:none}}
@keyframes gf-out{to{transform:translateX(-48%);opacity:0;filter:blur(7px) brightness(.4)}}

/* caption, arrows and dots sit under the vehicle */
.gal-free .gal-s figcaption{left:7%;bottom:0;background:transparent;border:0;padding:0;backdrop-filter:none;-webkit-backdrop-filter:none}
.gal-free .gal-s figcaption b{font-size:24px;font-weight:300}
.gal-free .gal-s.was figcaption{opacity:0}
.gal-free .gal-dots{right:7%;bottom:6px}
.gal-free .gal-a{top:auto;bottom:-6px;margin:0}
.gal-free .gal-a.prev{left:auto;right:calc(7% + 150px)}
.gal-free .gal-a.next{right:calc(7% + 96px)}
@media (max-width:900px){.p-gal.gal-free{aspect-ratio:4/3}}
/* phone: arrows and dots move to their own row under the caption so they never cover the model name */
@media (max-width:760px){.p-gal.gal-free{margin-bottom:64px}.gal-free .gal-a{bottom:-60px}.gal-free .gal-a.prev{right:auto;left:7%}.gal-free .gal-a.next{right:auto;left:calc(7% + 54px)}.gal-free .gal-dots{bottom:-44px}}
@media (prefers-reduced-motion:reduce){.gal-s.on .gal-car,.gal-s.was .gal-car,.gal-s.on .gal-mark,.gal-s.on .gal-sweep{animation:none!important}.gal-s.on .gal-hl::before,.gal-s.on .gal-hl::after{animation:none;opacity:.7;transform:translate(-50%,-50%)}}
/* breathing room: tyres sit a fixed 16px above the horizon line, on every vehicle */
.gal-car{bottom:calc(24% + 16px)}
