/* "What do you work on?" vehicle carousel (float-hero.js).
   Sits on the site's own background and uses the site's type and colours
   (style.css variables) so it reads as part of the page.
   Everything is prefixed fh- so it can't collide with style.css. */
.vehicles { padding-bottom: clamp(40px, 5vw, 70px); }
.vehicles .wrap { text-align: center; }
.vehicles .say { margin-left: auto; margin-right: auto; }

.fh {
  --stage: #2a0b57;
  --glow: #9b4dff;
  position: relative;
  height: min(78vh, 760px);
  min-height: 600px;
  margin-top: clamp(8px, 2vw, 24px);
  overflow: hidden;
}

/* a soft glow in the vehicle's colour, fading into the page; no hard edges */
.fh-glow { position: absolute; left: 50%; top: 52%; width: min(90vw, 1100px); height: 100%; transform: translate(-50%, -50%); pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 38%, transparent), transparent); opacity: .7; transition: background 1s; }

.fh-head { position: absolute; top: 0; left: 0; right: 0; z-index: 5; text-align: center; padding: 0 var(--gutter); }
.fh-name { font-family: var(--head); font-weight: 700; font-size: clamp(1.7rem, 3.2vw, 2.5rem); letter-spacing: -0.03em; line-height: 1.06; color: var(--white); }
.fh-line { color: var(--soft); font-size: 1.05rem; max-width: 44ch; margin: 6px auto 0; line-height: 1.45; transition: opacity .3s; }
.fh.co-on .fh-line { opacity: .35; }

/* stage: two glowing pads and a light beam */
.fh-pad { position: absolute; left: 50%; transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(ellipse at 50% 35%, #4a4d52, #141517 72%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 30px rgba(0,0,0,.5); }
.fh-pad::after { content: ""; position: absolute; inset: 0 6%; border-radius: 50%; background: radial-gradient(closest-side, var(--glow), transparent); opacity: .9; }
.fh-pad.top { top: 20%; width: min(24vw, 240px); height: min(2.6vw, 26px); }
.fh-pad.bot { top: 84%; width: min(40vw, 440px); height: min(4vw, 42px); }
.fh-beam { position: absolute; left: 50%; top: 21.5%; height: 63%; width: min(36vw, 400px); transform: translateX(-50%); pointer-events: none; opacity: .5;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--glow) 30%, transparent), transparent 32%, transparent 66%, color-mix(in srgb, var(--glow) 34%, transparent));
  clip-path: polygon(30% 0, 70% 0, 100% 100%, 0 100%); }
/* contact shadow on the bottom pad; shrinks as the vehicle rises */
.fh-shadow { position: absolute; left: 50%; top: 82.5%; width: min(30vw, 340px); height: 26px; transform: translateX(-50%); border-radius: 50%; z-index: 2;
  background: radial-gradient(closest-side, rgba(0,0,0,.65), rgba(0,0,0,0)); animation: fh-shadow 5s ease-in-out infinite; pointer-events: none; }
@keyframes fh-shadow { 0%,100% { transform: translateX(-50%) scale(.78); opacity: .55; } 50% { transform: translateX(-50%) scale(1); opacity: .9; } }

.fh-ring { position: absolute; inset: 0; perspective: 1600px; touch-action: pan-y; }
.fh-slot { position: absolute; left: 50%; top: 52%; width: min(46vw, 560px); aspect-ratio: 5 / 3; transform-style: preserve-3d;
  margin: calc(min(46vw, 560px) * -.3) 0 0 calc(min(46vw, 560px) * -.5);
  transition: transform 1s cubic-bezier(.22,.8,.2,1), opacity 1s; cursor: pointer; }
.fh-slot.on { cursor: crosshair; }
/* Only transform and opacity move here, so the graphics card does the work.
   No filters or blend modes on anything that animates: that's what made it slow. */
.fh-bob { width: 100%; height: 100%; transform-style: preserve-3d; will-change: transform; }
.fh-slot.on .fh-bob { animation: fh-bob 5s ease-in-out infinite; }
@keyframes fh-bob {
  0%,100% { transform: translateY(-10px) rotateY(-7deg) rotateX(2deg); }
  50% { transform: translateY(10px) rotateY(7deg) rotateX(-1deg); }
}
.fh-tilt { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.fh-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; -webkit-user-drag: none; user-select: none; }
.fh-co { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.fh-sheen { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center;
  background: radial-gradient(circle at var(--sx, 30%) var(--sy, 30%), rgba(255,255,255,.28), rgba(255,255,255,0) 36%); }
.fh-slot.on .fh-sheen { opacity: 1; }
/* while the labels are showing, the neighbours fade right back so nothing sits under the text */
.fh.co-on .fh-slot:not(.on) { opacity: .08 !important; }
/* scrolled out of view: stop everything */
.fh.paused *, .fh.paused *::before, .fh.paused *::after { animation-play-state: paused !important; }

/* callout lines to the parts I fix */
.fh .co { opacity: 0; transition: opacity .35s; }
.fh .co polyline { fill: none; stroke: #fff; stroke-width: calc(var(--u, 1) * 1.25px); stroke-dasharray: var(--len, 600); stroke-dashoffset: var(--len, 600); transition: stroke-dashoffset .5s cubic-bezier(.3,.7,.2,1); }
.fh .co circle { fill: #fff; r: calc(var(--u, 1) * 4.5px); }
.fh .co .ring2 { fill: none; stroke: var(--pink-hot); stroke-width: calc(var(--u, 1) * 1.5px); r: calc(var(--u, 1) * 11px); opacity: .8; }
.fh .co text { fill: #fff; font-family: var(--body); font-weight: 600; font-size: calc(var(--u, 1) * 14px);
  paint-order: stroke; stroke: rgba(11,10,16,.75); stroke-width: calc(var(--u, 1) * 4px); stroke-linejoin: round; }
.fh .show-co .co { opacity: .5; }
.fh .show-co .co polyline { stroke-dashoffset: 0; }
.fh .show-co .co.hot { opacity: 1; }
.fh .co.hot .ring2 { animation: fh-ping 1.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes fh-ping { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* arrows and the named picker, in the site's colours */
.fh-arrow { position: absolute; top: 52%; transform: translateY(-50%); width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; z-index: 6;
  background: rgba(255,255,255,.06); border: 1px solid var(--line-lit, rgba(255,255,255,.18)); color: var(--white); cursor: pointer; transition: background .2s, border-color .2s; }
.fh-arrow:hover { background: rgba(154,85,238,.25); border-color: var(--violet); }
.fh-arrow svg { width: 20px; height: 20px; }
.fh-arrow.prev { left: max(8px, 3vw); }
.fh-arrow.next { right: max(8px, 3vw); }
.fh-picks { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px; border-radius: 980px; z-index: 6;
  background: rgba(255,255,255,.04); border: 1px solid var(--line, rgba(255,255,255,.1)); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.fh-picks::-webkit-scrollbar { display: none; }
.fh-picks button { flex: none; min-height: 44px; padding: 0 18px; border-radius: 980px; color: var(--soft); font-family: var(--body); font-weight: 600; font-size: .95rem; cursor: pointer; transition: background .3s, color .3s; }
.fh-picks button:hover { color: var(--white); }
/* the selected button takes the colour of the vehicle on stage */
.fh-picks button { transition: background .5s, color .5s, box-shadow .5s; }
.fh-picks button[aria-current="true"] { color: var(--chip-ink, #fff); background: var(--glow); box-shadow: 0 0 22px -6px var(--glow); }

@media (max-width: 860px) {
  .fh { height: 560px; min-height: 0; }
  .fh-slot { width: 86vw; margin: -25.8vw 0 0 -43vw; top: 50%; }
  .fh-pad.top { top: 27%; width: 46vw; height: 5vw; }
  .fh-pad.bot { top: 73%; width: 66vw; height: 7vw; }
  .fh-shadow { top: 71.5%; width: 56vw; }
  .fh-beam { top: 28%; height: 45%; width: 64vw; }
  .fh-glow { width: 120vw; }
  .fh-arrow { top: auto; bottom: 8px; transform: none; width: 44px; height: 44px; }
  .fh-picks { bottom: 4px; max-width: calc(100% - 116px); }
}
@media (prefers-reduced-motion: reduce) {
  .fh *, .fh *::before, .fh *::after { animation: none !important; transition: none !important; }
}
