/* =========================================================================
   CACTUS CONTAINERS — Cinematic / Immersive layer
   Depth · parallax · Ken Burns · scroll-linked motion · smooth transitions
   ========================================================================= */

/* ---------- HERO: Ken Burns drift + parallax depth ---------- */
.hero{isolation:isolate}
.hero-media{inset:-16% 0}                 /* oversize so parallax never reveals edges */
.hero-media img{
  width:100%;height:100%;object-fit:cover;
  animation:kenburns 26s ease-in-out infinite alternate;
  transform-origin:60% 40%;
}
@keyframes kenburns{
  0%{transform:scale(1.06) translate3d(0,0,0)}
  100%{transform:scale(1.16) translate3d(-2%,-2%,0)}
}

/* hero content cinematic load-in (staggered rise + soft blur clear) */
.hero-inner>*{animation:cineRise 1s var(--ease) backwards}
.hero-inner>*:nth-child(1){animation-delay:.10s}
.hero-inner>*:nth-child(2){animation-delay:.22s}
.hero-inner>*:nth-child(3){animation-delay:.34s}
.hero-inner>*:nth-child(4){animation-delay:.46s}
.hero-inner>*:nth-child(5){animation-delay:.58s}
@keyframes cineRise{
  from{opacity:0;transform:translate3d(0,32px,0);filter:blur(8px)}
  to{opacity:1;transform:none;filter:blur(0)}
}
.zip-card{animation:cineRise 1s var(--ease) .7s backwards}

/* ---------- Generic parallax elements ---------- */
[data-parallax]{will-change:transform}

/* ---------- Cinematic full-bleed divider ---------- */
.cinema{
  position:relative;min-height:min(80vh,720px);display:grid;place-items:center;
  overflow:hidden;color:#fff;text-align:center;isolation:isolate;
}
.cinema-bg{
  position:absolute;inset:-7% 0;background-size:cover;background-position:center;
  z-index:-2;will-change:transform;
}
.cinema::after{
  content:"";position:absolute;inset:0;z-index:-1;
  background:
    radial-gradient(120% 90% at 50% 40%,rgba(13,18,20,.35),rgba(13,18,20,.82)),
    linear-gradient(to top,rgba(13,18,20,.9),rgba(13,18,20,.35));
}
.cinema-inner{position:relative;z-index:1;max-width:820px;padding:40px 24px}
.cinema-inner h2{
  font-size:clamp(34px,6vw,68px);font-weight:900;color:#fff;letter-spacing:-.03em;line-height:1.02;
}
.cinema-inner h2 em{font-style:normal;color:var(--sage-400)}
.cinema-inner p{color:rgba(255,255,255,.82);font-size:clamp(16px,1.8vw,20px);margin:20px auto 0;max-width:56ch}
.cinema-inner .cine-cta{margin-top:32px;display:flex;gap:14px;justify-content:center;flex-wrap:wrap}
.cinema-stats{display:flex;gap:44px;justify-content:center;flex-wrap:wrap;margin-top:40px;padding-top:28px;border-top:1px solid rgba(255,255,255,.16)}
.cinema-stats .cs b{font-family:var(--font-display);font-size:clamp(28px,3.4vw,40px);color:#fff;display:block;line-height:1}
.cinema-stats .cs span{font-size:13.5px;color:rgba(255,255,255,.62)}

/* ---------- Depth on the custom-build band ---------- */
.band{isolation:isolate}
.band-media{inset:-22% 0}

/* ---------- Upgraded cinematic reveals ---------- */
.reveal{transition:opacity 1s var(--ease),transform 1s var(--ease),filter 1s var(--ease)}
.reveal{filter:blur(6px)}
.reveal.in{filter:blur(0)}
.reveal-scale{opacity:0;transform:scale(.94);transition:opacity 1.1s var(--ease),transform 1.1s var(--ease)}
.reveal-scale.in{opacity:1;transform:none}
.reveal-left{opacity:0;transform:translateX(-40px);transition:all 1s var(--ease)}
.reveal-left.in{opacity:1;transform:none}
.reveal-right{opacity:0;transform:translateX(40px);transition:all 1s var(--ease)}
.reveal-right.in{opacity:1;transform:none}
/* stagger children of a group */
.stagger>*{opacity:0;transform:translateY(30px);transition:opacity .8s var(--ease),transform .8s var(--ease)}
.stagger.in>*{opacity:1;transform:none}
.stagger.in>*:nth-child(2){transition-delay:.08s}
.stagger.in>*:nth-child(3){transition-delay:.16s}
.stagger.in>*:nth-child(4){transition-delay:.24s}
.stagger.in>*:nth-child(5){transition-delay:.32s}
.stagger.in>*:nth-child(6){transition-delay:.40s}

/* ---------- Card image cinematic tilt/zoom on hover (subtle) ---------- */
.cat img,.prod .prod-media img{will-change:transform}
.cat{perspective:1000px}

/* ---------- Scroll cue on hero ---------- */
.scroll-cue{position:absolute;left:50%;bottom:104px;transform:translateX(-50%);z-index:3;
  display:flex;flex-direction:column;align-items:center;gap:7px;color:rgba(255,255,255,.65);
  font-size:11px;letter-spacing:.22em;text-transform:uppercase}
.scroll-cue .mouse{width:22px;height:34px;border:1.6px solid rgba(255,255,255,.5);border-radius:12px;position:relative}
.scroll-cue .mouse::after{content:"";position:absolute;top:6px;left:50%;transform:translateX(-50%);
  width:3px;height:6px;border-radius:3px;background:#fff;animation:wheel 1.7s var(--ease) infinite}
@keyframes wheel{0%{opacity:0;transform:translate(-50%,0)}30%{opacity:1}100%{opacity:0;transform:translate(-50%,10px)}}
@media(max-width:640px){.scroll-cue{display:none}}

/* ---------- Hero: cinematic media (photo now, video-ready) ---------- */
.hero{background:#0d1215;min-height:min(94vh,880px);display:flex;align-items:center}
.hero-media{position:absolute;inset:-9% 0;z-index:0}
.hero-img,.hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
/* The hero band is wider than 16:9, so cover crops top/bottom. Bias the crop
   downward so the forklift and containers sit in frame rather than sky/ground. */
.hero-video{object-position:center 42%}
.hero-img{animation:kenburns 30s ease-in-out infinite alternate;transform-origin:62% 45%}
.hero-video{opacity:0;transition:opacity 1.4s var(--ease)}
.hero-video.ready{opacity:1}

/* brand colour-grade tying the photo to the teal system */
.hero-grade{position:absolute;inset:0;z-index:1;pointer-events:none;mix-blend-mode:color;opacity:.30;
  background:linear-gradient(115deg,#223621 0%,#577656 55%,#2f5a86 100%)}

/* legibility scrim + cinematic vignette */
/* Scrim pulled well back so the footage reads through. The left band is the only
   heavy part — it exists purely to keep the white headline legible. Everything
   right of ~45% is nearly clear. */
.hero-scrim{position:absolute;inset:0;z-index:2;pointer-events:none;
  background:
    linear-gradient(90deg,rgba(9,14,16,.88) 0%,rgba(9,14,16,.62) 26%,rgba(9,14,16,.20) 48%,rgba(9,14,16,0) 72%),
    radial-gradient(130% 105% at 50% 50%,transparent 55%,rgba(6,10,12,.34) 100%),
    linear-gradient(to top,rgba(9,14,16,.55) 0%,transparent 26%)}

/* fine film grain */
.hero-grain{position:absolute;inset:0;z-index:3;pointer-events:none;opacity:.055;mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E")}

.hero>.container{position:relative;z-index:4;width:100%}
@media(max-width:900px){
  .hero-scrim{background:
    linear-gradient(180deg,rgba(9,14,16,.62) 0%,rgba(9,14,16,.88) 100%),
    radial-gradient(120% 100% at 50% 50%,transparent 40%,rgba(6,10,12,.6) 100%)}
}

/* ---------- 3D configurator (legacy, unused) ---------- */
.c3d-wrap{display:grid;grid-template-columns:1.65fr .95fr;gap:24px;margin-top:44px}
.c3d-stage{position:relative;min-height:520px;border-radius:var(--radius-lg);overflow:hidden;
  border:1px solid rgba(255,255,255,.09);
  background:radial-gradient(120% 120% at 50% 8%,#20272d 0%,#12161a 55%,#0c0f12 100%);
  cursor:grab;}
.c3d-stage:active{cursor:grabbing}
#c3d-canvas{width:100%;height:100%;display:block}
.c3d-hint{position:absolute;bottom:14px;left:0;right:0;text-align:center;pointer-events:none;
  color:rgba(255,255,255,.62);font-size:11px;letter-spacing:.18em;text-transform:uppercase}
.c3d-loading{position:absolute;inset:0;display:grid;place-items:center;color:rgba(255,255,255,.55);
  font-size:14px;letter-spacing:.04em}
.c3d-panel{background:rgba(255,255,255,.045);border:1px solid rgba(255,255,255,.1);
  border-radius:var(--radius-lg);padding:26px;display:flex;flex-direction:column;gap:20px}
.c3d-group>label{display:block;font-size:12px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:rgba(255,255,255,.5);margin-bottom:9px}
.c3d-seg{display:flex;gap:4px;background:rgba(255,255,255,.06);border-radius:11px;padding:4px}
.c3d-seg button{flex:1;padding:11px 10px;border:none;background:transparent;color:rgba(255,255,255,.7);
  border-radius:8px;cursor:pointer;font-family:inherit;font-weight:600;font-size:14.5px;transition:all .2s var(--ease)}
.c3d-seg button:hover{color:#fff}
.c3d-seg button.active{background:var(--sage-700);color:#fff;box-shadow:0 4px 12px -4px rgba(87, 118, 86,.6)}
.c3d-swatches{display:flex;gap:10px;flex-wrap:wrap}
.c3d-swatches button{width:40px;height:40px;border-radius:11px;border:2px solid rgba(255,255,255,.18);
  cursor:pointer;transition:transform .2s var(--ease),border-color .2s}
.c3d-swatches button:hover{transform:scale(1.08)}
.c3d-swatches button.active{border-color:#fff;box-shadow:0 0 0 3px rgba(255,255,255,.16)}
.c3d-spec{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px;
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.07);border-radius:14px}
.c3d-spec span{display:block;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:rgba(255,255,255,.58)}
.c3d-spec b{color:#fff;font-family:var(--font-display);font-size:18px}
@media(max-width:1024px){.c3d-wrap{grid-template-columns:1fr}.c3d-stage{min-height:420px}}

/* ---------- Respect reduced motion: kill all cinematic motion ---------- */
@media(prefers-reduced-motion:reduce){
  .hero-media img{animation:none;transform:scale(1.05)}
  .hero-inner>*,.zip-card{animation:none}
  [data-parallax]{transform:none!important}
  .reveal,.reveal-scale,.reveal-left,.reveal-right,.stagger>*{filter:none;transform:none;opacity:1;transition:none}
  .scroll-cue .mouse::after{animation:none}
}

/* ---------- Page hero with video (tack rooms, and any future page) ---------- */
.page-hero.has-video{position:relative;isolation:isolate;overflow:hidden;min-height:min(62vh,560px);display:flex;align-items:center}
.page-hero.has-video .hero-media{position:absolute;inset:-9% 0;z-index:0}
/* The container sits left-of-centre in this footage, right where the headline
   lands. Scale up slightly and push the frame right so the container clears the
   text and reads in the open space. */
.page-hero.has-video .hero-video{object-position:center 50%;transform:scale(1.28) translateX(13%)}
@media(max-width:900px){
  .page-hero.has-video .hero-video{transform:scale(1.2) translateX(6%)}
}
.page-hero.has-video .container{position:relative;z-index:4}
.page-hero.has-video .hero-grain{z-index:3}

/* ---- Pause control for the auto-playing hero (WCAG 2.2.2) ------------------
   Injected by cinematic.js only once the hero video actually starts, so it
   never appears on a page that is showing the static poster. Sits clear of the
   headline in the bottom-right of the hero band. */
.motion-toggle{
  position:absolute;right:18px;bottom:18px;z-index:6;
  width:42px;height:42px;display:grid;place-items:center;cursor:pointer;
  border-radius:100px;border:1px solid rgba(255,255,255,.34);
  background:rgba(9,14,16,.62);color:#fff;
  -webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);
  transition:background .2s var(--ease),border-color .2s var(--ease);
}
.motion-toggle:hover{background:rgba(9,14,16,.82);border-color:#fff}
.motion-toggle svg{width:17px;height:17px}
@media(max-width:640px){.motion-toggle{right:12px;bottom:12px;width:38px;height:38px}}

/* Freezing the video must also freeze the Ken Burns drift on the poster/photo
   underneath it, or "paused" still leaves the frame moving. */
.motion-paused .hero-img,
.motion-paused .hero-media img{animation-play-state:paused}

/* The scroll cue's wheel dot is also an infinite auto-starting animation, so it
   stops with the rest of the hero motion. */
.motion-paused .scroll-cue .mouse::after{animation-play-state:paused}
