/* The road on the line between every page's close and the footer: the real AOTC truck (dev\truck-cutout.ps1), side-on, driving
   both ways. The near lane runs left to right with the Trusted-by logos; the far lane, smaller and dimmer for depth, runs right to
   left with the As-seen-on logos. Each truck comes back with the next logo (assets/road.js). */
.road{--near:clamp(176px,19vw,290px);--far:clamp(112px,11.5vw,176px);position:relative;overflow:hidden;height:calc(var(--near) * .46 + var(--far) * .36 + 8px);margin-top:clamp(26px,4vw,48px);text-align:left;
  background:linear-gradient(180deg,transparent 0,rgba(96,104,122,.10) 46%,rgba(150,156,170,.13) 47%,rgba(72,74,84,.22) 100%)}
/* the line itself: where the page stops and the footer starts */
.road::after{content:"";position:absolute;left:0;right:0;bottom:0;height:3px;z-index:3;background:#e9e4da;box-shadow:0 -1px 10px rgba(233,228,218,.25)}
/* the far lane's edge */
.road::before{content:"";position:absolute;left:0;right:0;bottom:calc(var(--near) * .3);height:2px;z-index:0;opacity:.32;background:repeating-linear-gradient(90deg,#e9e4da 0 34px,transparent 34px 72px)}
.road-lane{position:absolute;left:0;right:0;top:0;bottom:0;pointer-events:none}
.road-far{z-index:1;bottom:calc(var(--near) * .3 + 2px);filter:brightness(.8) saturate(.9)}
.road-near{z-index:2;bottom:3px}

.rt{position:absolute;left:0;bottom:0;width:var(--w);aspect-ratio:660/303;will-change:transform;animation:rtDrive var(--t) linear infinite paused;animation-delay:calc(var(--t) * var(--i) / var(--n) * -1)}
.road.on .rt{animation-play-state:running}
.road-near .rt{--w:var(--near);--t:44s;--n:3;--from:calc(var(--w) * -1);--to:100vw}
.road-far .rt{--w:var(--far);--t:62s;--n:3;--from:100vw;--to:calc(var(--w) * -1)}
@keyframes rtDrive{from{transform:translate3d(var(--from),0,0)}to{transform:translate3d(var(--to),0,0)}}

/* the truck rides a touch above its wheels, the way a real one does */
.rt-body{position:absolute;inset:0;animation:rtRide 1.3s ease-in-out infinite alternate}
.rt:nth-child(2) .rt-body{animation-delay:-.5s}.rt:nth-child(3) .rt-body{animation-delay:-.9s}
@keyframes rtRide{to{transform:translateY(-.6px)}}
.rt-truck{display:block;width:100%;height:100%;filter:brightness(1.42) contrast(.96)}
.rt-wheel{position:absolute;width:10%;height:auto;aspect-ratio:1;filter:brightness(1.3);animation:rtSpin 1.5s linear infinite}
.rt-wheel.f{left:11.48%;top:75.74%}.rt-wheel.r{left:76.43%;top:76.73%}
@keyframes rtSpin{to{transform:rotate(-360deg)}}
/* a mirrored truck for the near lane: the cab leads to the right, and the wheels turn the other way */
.rt.flip .rt-truck{transform:scaleX(-1)}
.rt.flip .rt-wheel{animation-name:rtSpinF}
.rt.flip .rt-wheel.f{left:78.52%}.rt.flip .rt-wheel.r{left:13.57%}
@keyframes rtSpinF{to{transform:rotate(360deg)}}

/* the side screen: the logo on its own colour, with the LED grid and the light it throws */
.rt-scr{--c:#000;position:absolute;left:44.55%;top:5.45%;width:50.91%;height:59.41%;overflow:hidden;background:var(--c);box-shadow:0 0 calc(var(--w) * .1) calc(var(--w) * -.02) var(--c)}
.rt.flip .rt-scr{left:4.54%}
.rt-scr img{display:block;width:100%;height:100%;object-fit:contain;transition:opacity .2s}
.rt-scr.fill img{object-fit:cover}
.rt-scr.pad img{padding:9% 12%}
.rt-scr::after{content:"";position:absolute;inset:0;background:radial-gradient(circle,transparent 0 .55px,rgba(0,0,0,.3) .95px) 0 0/2.5px 2.5px,linear-gradient(115deg,rgba(255,255,255,.12),transparent 42%)}
/* the shadow under it, and the screen's colour on the road */
.rt-shade{position:absolute;left:3%;right:3%;bottom:-3%;height:9%;border-radius:50%;background:rgba(0,0,0,.65);filter:blur(5px)}
.rt-spill{position:absolute;left:40%;width:58%;bottom:-4%;height:12%;border-radius:50%;background:var(--c);opacity:.28;filter:blur(9px)}
.rt.flip .rt-spill{left:2%}

@media (max-width:760px){.road-near .rt,.road-far .rt{--n:2}.rt:nth-child(3){display:none}}
@media (prefers-reduced-motion:reduce){
  .rt,.rt-body,.rt-wheel{animation:none}
  .road-near .rt{left:calc(8% + (var(--i) * 34%))}.road-far .rt{left:calc(22% + (var(--i) * 34%))}
}

/* the sections above run straight into the road */
.hp-close,.pc{padding-bottom:0}
#seo-foot{border-top:0}
