/* Living hero-scene, ported from the design folder (pickup-scene.module.css).
   Every class is prefixed (ps-) and scoped so it cannot collide with the site stylesheet. */
.pickup-scene { --cycle: 14s; position: relative; width: 100%; min-width: 0; margin: 0; isolation: isolate; }
.ps-stage { position: relative; height: auto; min-height: 410px; aspect-ratio: 1.35; overflow: hidden; user-select: none; }
.ps-backdrop { position: absolute; inset: 6% 2% 12% 4%; background: #d8f293; border-radius: 48% 43% 37% 45%; transform: rotate(-7deg); }
.ps-bigType { position: absolute; left: 16%; top: 11%; font-family: var(--font-display), sans-serif; font-size: clamp(45px, 5.6vw, 84px); line-height: .95; letter-spacing: -4px; color: #183d2b; opacity: .17; transform: rotate(-7deg); }
.ps-serviceTag { position: absolute; left: 2%; top: 6%; background: #fff; color: #17392b; display: flex; align-items: center; gap: 9px; padding: 13px 17px; border-radius: 8px; font-size: 12px; font-weight: 800; letter-spacing: .8px; z-index: 5; transform: rotate(-5deg); box-shadow: 0 8px 25px #001d1820; }
.ps-serviceTag > span { width: 8px; height: 8px; background: #527a26; border-radius: 50%; }
.ps-truck { position: absolute; left: 2%; bottom: 7%; width: 97%; z-index: 3; animation: ps-drive var(--cycle) cubic-bezier(.42,0,.24,1) infinite both; will-change: transform; }
.ps-suspension { position: relative; isolation: isolate; aspect-ratio: 3 / 2; transform-origin: 65% 80%; animation: ps-suspension var(--cycle) ease-in-out infinite both; }
.ps-truckBase { position: relative; z-index: 1; display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 10px #0a27142c); }
.ps-truckForeground { position: absolute; inset: 0; z-index: 3; display: block; width: 100%; height: auto; pointer-events: none; clip-path: polygon(0% 33%, 5.5% 35%, 59.5% 43.5%, 61% 40.5%, 61% 0%, 100% 0%, 100% 100%, 0% 100%); }
/* Spin only the original metal rims, then restore perspective.
   Fixed tyres preserve their silhouette and lighting throughout the turn. */
.ps-wheel { position: absolute; z-index: 3; pointer-events: none; }
.ps-wheelPerspective { width: 100%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; mask-image: radial-gradient(circle, #000 67%, transparent 71%); transform: scaleY(var(--wheel-stretch)); transform-origin: 50% 0; }
.ps-wheelRotor { width: 100%; height: 100%; background-image: url('/assets/hero/avfallsbil.webp'); background-repeat: no-repeat; background-size: var(--wheel-size); background-position: var(--wheel-position); transform-origin: 50% 50%; animation: ps-wheelRoll var(--cycle) cubic-bezier(.42,0,.24,1) infinite both; will-change: transform; }
/* Coordinates are relative to the 1200 × 800 truck, not the viewport.
   The bottom centres settle at (29%,42%) and (46%,44%) inside the bed. */
.ps-cargo { position: absolute; width: 15%; left: 21.5%; top: 19.5%; z-index: 2; transform-origin: 50% 80%; animation: ps-loadOne var(--cycle) ease-in-out infinite both; will-change: transform, opacity; }
.ps-cargo img { display: block; width: 100%; height: auto; }
.ps-cargoTwo { width: 13%; left: 39.5%; top: 24.5%; animation-name: ps-loadTwo; }
.ps-doneBadge { position: absolute; right: 4%; bottom: 17%; z-index: 5; display: flex; align-items: center; gap: 9px; background: #fff; color: #183d2b; padding: 15px 19px; border-radius: 10px; font-size: 14px; font-weight: 800; box-shadow: 0 12px 30px #0a271425; animation: ps-done var(--cycle) ease infinite both; }
.ps-doneBadge > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #d8f293; font-size: 18px; }
.ps-caption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: -5px 3% 0; padding-top: 15px; border-top: 1px solid #ffffff32; color: #edf5e7; }
.ps-story { flex: 1 1 220px; min-width: 0; }
.ps-track { display: flex; gap: 6px; max-width: 210px; margin-bottom: 10px; }
.ps-track > i { flex: 1; height: 3px; overflow: hidden; border-radius: 2px; background: #ffffff26; }
.ps-track > i::after { content: ''; display: block; height: 100%; background: #d8f293; transform-origin: left; animation: ps-progressOne var(--cycle) linear infinite both; }
.ps-track > i:nth-child(2)::after { animation-name: ps-progressTwo; }
.ps-track > i:nth-child(3)::after { animation-name: ps-progressThree; }
.ps-steps { position: relative; min-height: 24px; font-size: 14px; font-weight: 600; }
.ps-steps > span { position: absolute; inset: 0 auto auto 0; display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ps-steps b { color: #d8f293; font-size: 12px; }
.ps-stepOne { animation: ps-stepOne var(--cycle) linear infinite both; }
.ps-stepTwo { animation: ps-stepTwo var(--cycle) linear infinite both; }
.ps-stepThree { animation: ps-stepThree var(--cycle) linear infinite both; }
.ps-staticCaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ps-controls { display: flex; gap: 6px; }
.ps-pause, .ps-replay { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; min-height: 44px; min-width: 44px; border: 1px solid #ffffff40; border-radius: 7px; background: #ffffff0b; color: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.ps-pause { min-width: 86px; }
.ps-replay { font-size: 24px; padding: 5px; }
.ps-pause:hover, .ps-replay:hover { background: #ffffff1c; }
.ps-pause:focus-visible, .ps-replay:focus-visible { outline: 3px solid #d8f293; outline-offset: 4px; }
.pickup-scene[data-paused='true'] *, .pickup-scene[data-paused='true'] *::after { animation-play-state: paused !important; }

/* All layers share one clock. The truck resets only while invisible.
   Cargo uses separate keyframes, not delays that drift into the next loop. */
@keyframes ps-drive {
  0%, 100% { transform: translateX(-9%); opacity: 1; }
  13% { transform: translateX(1%); opacity: 1; }
  17%, 59% { transform: translateX(0); opacity: 1; }
  62% { transform: translateX(-1%); opacity: 1; }
  78% { transform: translateX(116%); opacity: 1; }
  79% { transform: translateX(116%); opacity: 0; }
  80%, 88% { transform: translateX(-116%); opacity: 0; }
  90% { opacity: 1; }
}
@keyframes ps-suspension {
  0%, 12%, 17%, 31%, 37%, 45%, 51%, 59%, 69%, 100% { transform: translateY(0) rotate(0); }
  14% { transform: translateY(1px) rotate(.45deg); }
  33%, 47% { transform: translateY(3px) rotate(-.3deg); }
  35%, 49% { transform: translateY(-1px) rotate(.15deg); }
  64% { transform: translateY(-2px) rotate(-.5deg); }
}
@keyframes ps-wheelRoll {
  0%, 100% { transform: rotate(0deg); }
  13% { transform: rotate(80deg); }
  17%, 59% { transform: rotate(72deg); }
  62% { transform: rotate(64deg); }
  78%, 79% { transform: rotate(1000deg); }
  80%, 88% { transform: rotate(-856deg); }
}
@keyframes ps-loadOne {
  0%, 15%, 100% { transform: translate(-158%,190%) rotate(-7deg); opacity: 0; z-index: 4; }
  18%, 20% { transform: translate(-158%,190%) rotate(-7deg); opacity: 1; z-index: 4; }
  27% { transform: translate(-20%,-10%) rotate(5deg); opacity: 1; z-index: 4; }
  29% { z-index: 2; }
  32% { transform: translate(0,4%) rotate(0); opacity: 1; z-index: 2; }
  35%, 79% { transform: translate(0,0) rotate(0); opacity: 1; z-index: 2; }
  80%, 88% { transform: translate(0,0) rotate(0); opacity: 0; z-index: 2; }
  90% { transform: translate(-158%,190%) rotate(-7deg); opacity: 0; z-index: 4; }
}
@keyframes ps-loadTwo {
  0%, 15%, 100% { transform: translate(-195%,195%) rotate(6deg); opacity: 0; z-index: 4; }
  18%, 34% { transform: translate(-195%,195%) rotate(6deg); opacity: 1; z-index: 4; }
  41% { transform: translate(-18%,-12%) rotate(-5deg); opacity: 1; z-index: 4; }
  43% { z-index: 2; }
  46% { transform: translate(0,4%) rotate(0); opacity: 1; z-index: 2; }
  49%, 79% { transform: translate(0,0) rotate(0); opacity: 1; z-index: 2; }
  80%, 88% { transform: translate(0,0) rotate(0); opacity: 0; z-index: 2; }
  90% { transform: translate(-195%,195%) rotate(6deg); opacity: 0; z-index: 4; }
}
@keyframes ps-done {
  0%, 62% { opacity: 0; transform: translateY(16px) rotate(3deg) scale(.94); }
  69% { opacity: 1; transform: translateY(-3px) rotate(3deg) scale(1.02); }
  73%, 88% { opacity: 1; transform: translateY(0) rotate(3deg) scale(1); }
  93%, 100% { opacity: 0; transform: translateY(12px) rotate(3deg) scale(.97); }
}
@keyframes ps-stepOne { 0%, 16%, 92%, 100% { opacity: 1; } 18%, 90% { opacity: 0; } }
@keyframes ps-stepTwo { 0%, 16%, 62%, 100% { opacity: 0; } 18%, 60% { opacity: 1; } }
@keyframes ps-stepThree { 0%, 60%, 92%, 100% { opacity: 0; } 62%, 90% { opacity: 1; } }
@keyframes ps-progressOne { 0% { transform: scaleX(.12); opacity: 1; } 17%, 89% { transform: scaleX(1); opacity: 1; } 91% { transform: scaleX(1); opacity: 0; } 92% { transform: scaleX(0); opacity: 0; } 100% { transform: scaleX(.12); opacity: 1; } }
@keyframes ps-progressTwo { 0%, 17% { transform: scaleX(0); opacity: 1; } 61%, 89% { transform: scaleX(1); opacity: 1; } 91% { transform: scaleX(1); opacity: 0; } 92%, 100% { transform: scaleX(0); opacity: 1; } }
@keyframes ps-progressThree { 0%, 61% { transform: scaleX(0); opacity: 1; } 89% { transform: scaleX(1); opacity: 1; } 91% { transform: scaleX(1); opacity: 0; } 92%, 100% { transform: scaleX(0); opacity: 1; } }

@media (max-width: 1100px) {
  .ps-stage { height: 410px; min-height: 0; aspect-ratio: auto; }
  .ps-bigType { font-size: 65px; }
  .ps-serviceTag { font-size: 11px; padding: 11px 14px; }
  .ps-steps { font-size: 12px; }
  .ps-story { flex-basis: 210px; }
}
@media (max-width: 700px) {
  .ps-stage { height: auto; min-height: 0; aspect-ratio: 1.22; }
  .ps-bigType { font-size: clamp(50px,14vw,75px); letter-spacing: -3px; }
  .ps-backdrop { inset: 4% 1% 10% 3%; }
  .ps-serviceTag { top: 3%; left: 0; font-size: 10px; letter-spacing: .5px; padding: 10px 12px; }
  .ps-truck { width: 103%; left: -2%; bottom: 4%; }
  .ps-doneBadge { right: 1%; bottom: 15%; padding: 11px 12px; font-size: 12px; }
  .ps-caption { margin: 0; padding-top: 13px; column-gap: 8px; }
  .ps-story { flex-basis: 100%; }
  .ps-track { max-width: none; }
  .ps-steps { font-size: 13px; min-height: 25px; }
  .ps-controls { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .pickup-scene *, .pickup-scene *::after { animation: none !important; }
  .ps-truck { transform: none; }
  .ps-wheel { display: none; }
  .ps-cargo { transform: none; opacity: 1; z-index: 2; }
  .ps-doneBadge, .ps-story, .ps-controls { display: none; }
  .ps-staticCaption { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 14px; }
}
