/* ───────── LIVE RENDERS: the 3D images react to the visitor ─────────
   Every render gets a .live-layer that shares the image's scale / parallax / tilt, so the
   orange-glass glow and light reflection stay locked onto the objects in the picture.
   Only transform, opacity and CSS variables are animated. */

/* scale variable now lives on the container so the image and its layer stay in sync */
.rv-img,.feat .art,.phero-art,.cta-band .art,.track-img,.svc-img,.post .cover,.cmp-img,.auth-art{--sc:1.14}
.rv-img.in,.feat.in .art,.phero-art.in,.cta-band.in .art,.track.in .track-img,.cmp-img,.auth-art{--sc:1.06}
.feat:hover .art,.track:hover .track-img,.post:hover .cover,.svc-card:hover .svc-img,.cmp-col:hover .cmp-img{--sc:1.11}
.svc-card:hover .svc-img img,.cmp-col:hover .cmp-img img{--sc:1.11}
.cmp-img img,.auth-art>img{scale:var(--sc);transition:scale 1.6s var(--expo)}

.live{isolation:isolate}
.live>img,.live .live-layer{transform:perspective(1000px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))}
.live-layer{position:absolute;inset:0;pointer-events:none;z-index:1;scale:var(--sc,1.06);translate:0 var(--par,0px);transition:scale 1.6s var(--expo)}
.hero-art .live-layer{z-index:2;scale:1;translate:none;transform:scale(1.06) translate(var(--px,0),var(--py,0));transition:transform 1.2s var(--ease)}
.hero-art.live>img{transform:scale(1.06) translate(var(--px,0),var(--py,0))}

/* orange-glass glow: soft light that breathes, brighter when the pointer is near */
.lg{position:absolute;width:var(--gs,26%);aspect-ratio:1;translate:-50% -50%;border-radius:50%;
  background:radial-gradient(closest-side,rgba(255,150,70,.75),rgba(255,107,26,.32) 45%,rgba(255,107,26,0) 75%);
  mix-blend-mode:screen;opacity:.35;will-change:opacity,transform;animation:lgPulse 3.4s ease-in-out infinite;animation-delay:var(--gd,0s)}
@keyframes lgPulse{0%,100%{opacity:.28;transform:scale(.92)}50%{opacity:.62;transform:scale(1.06)}}
.live.hot .lg{animation-duration:1.8s}
.live.hot .lg{opacity:.75}

/* reflection that follows the pointer (and drifts slowly on its own) */
.ls{position:absolute;inset:-20%;background:radial-gradient(28% 34% at var(--lx,30%) var(--ly,20%),rgba(255,255,255,.55),rgba(255,255,255,0) 70%);
  mix-blend-mode:soft-light;opacity:.55;transition:opacity .5s ease}
.live.hot .ls{opacity:1}
/* diagonal light sweep every few seconds — like sun moving across glass */
.lw{position:absolute;inset:0;overflow:hidden}
.lw::before{content:"";position:absolute;top:-30%;bottom:-30%;width:28%;left:-40%;
  background:linear-gradient(100deg,rgba(255,255,255,0),rgba(255,255,255,.28) 45%,rgba(255,255,255,0));
  mix-blend-mode:soft-light;transform:translate3d(0,0,0) rotate(8deg);animation:lwSweep 7s cubic-bezier(.6,0,.3,1) infinite;animation-delay:var(--wd,1s)}
@keyframes lwSweep{0%{transform:translate3d(0,0,0) rotate(8deg)}35%,100%{transform:translate3d(620%,0,0) rotate(8deg)}}

/* click ripple from the glass object */
.lr{position:absolute;width:12%;aspect-ratio:1;translate:-50% -50%;border-radius:50%;border:2px solid rgba(255,255,255,.85);
  box-shadow:0 0 24px rgba(255,107,26,.55);opacity:0;pointer-events:none;animation:lrOut .9s var(--expo) forwards}
@keyframes lrOut{0%{opacity:.9;transform:scale(.4)}100%{opacity:0;transform:scale(2.6)}}

/* hero: the printer prints this month's statement */
.tape-slot{position:absolute;overflow:hidden;pointer-events:none}
.tape-paper{position:absolute;left:0;right:0;bottom:0;background:linear-gradient(180deg,#fff 0%,#FBF9F6 100%);border-radius:3px 3px 0 0;
  box-shadow:0 -6px 18px rgba(120,90,60,.12),inset 0 -8px 10px rgba(160,140,120,.10);padding:9% 9% 14%;color:#2B2A28;
  font-family:var(--display);font-size:clamp(6.5px,.62vw,9px);line-height:1.35;transform:translate3d(0,102%,0)}
.tape-paper::before{content:"";position:absolute;left:0;right:0;top:-5px;height:6px;background:radial-gradient(circle at 4px 6px,#fff 3.6px,transparent 4px) 0 0/8px 6px repeat-x}
.tape-paper .tl{display:flex;justify-content:space-between;gap:4px;opacity:0;padding:1px 0}
.tape-paper .tl b{font-weight:600;font-variant-numeric:tabular-nums}
.tape-paper .tt{border-top:1px solid #2B2A28;margin-top:3px;padding-top:3px}
.tape-paper .tt b{color:#F25C05}
.tape-paper .tk{margin-top:4px;display:inline-block;background:#FF6B1A;color:#fff;border-radius:3px;padding:1px 4px;opacity:0;transform:scale(.6)}
.tape-paper .hd{font-size:.82em;letter-spacing:.14em;color:#9A968F;border-bottom:1px dashed #D6D1CA;padding-bottom:3px;margin-bottom:3px;opacity:0}
.printing .tape-paper{animation:paperUp 1.5s cubic-bezier(.3,.7,.2,1) forwards}
.printing .tape-paper .hd{animation:tlIn .3s ease .25s forwards}
.printing .tape-paper .tl:nth-of-type(2){animation:tlIn .3s ease .5s forwards}
.printing .tape-paper .tl:nth-of-type(3){animation:tlIn .3s ease .75s forwards}
.printing .tape-paper .tt{animation:tlIn .3s ease 1.05s forwards}
.printing .tape-paper .tk{animation:tkIn .4s cubic-bezier(.3,1.6,.5,1) 1.35s forwards}
@keyframes paperUp{to{transform:translate3d(0,0,0)}}
@keyframes tlIn{to{opacity:1}}
@keyframes tkIn{to{opacity:1;transform:scale(1)}}
.print-hit{position:absolute;cursor:pointer;pointer-events:auto;border-radius:18px;z-index:3;background:transparent;border:0;padding:0;margin:0;appearance:none;-webkit-appearance:none;-webkit-tap-highlight-color:transparent}
.print-hint{position:absolute;z-index:3;translate:-50% 0;white-space:nowrap;font-size:11px;font-weight:600;color:var(--ink);background:rgba(255,255,255,.88);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  padding:6px 10px;border-radius:999px;box-shadow:var(--shadow-1);opacity:0;transform:translateY(6px);transition:opacity .4s ease,transform .4s var(--expo);pointer-events:none}
.print-hint i{display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--orange);margin-right:6px;animation:lgPulse 1.6s ease-in-out infinite}
.hero-art.hint .print-hint,.hero-art.hot .print-hint{opacity:1;transform:none}
.hero-art{pointer-events:auto}

@media (prefers-reduced-motion:reduce){
  .lg,.lw::before,.print-hint i{animation:none}
  .live>img,.live .live-layer{transform:none}
  .printing .tape-paper{animation-duration:.01s}
}
/* receipt text scales with the paper width so it never wraps */
.tape-slot{container-type:inline-size}
.tape-paper{font-size:8.4cqi;white-space:nowrap}
.tape-paper .tl span{overflow:hidden;text-overflow:clip}
@media (max-width:900px){.hero-art .float-chip.c2{top:auto;bottom:26%;right:var(--gutter)}}

/* real rendered paper: second render revealed upward from the slot, feathered on every edge */
.print-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 45%;pointer-events:none;
  -webkit-mask-image:linear-gradient(90deg,transparent calc(var(--l,44%) - 4%),#000 var(--l,44%),#000 var(--r,67%),transparent calc(var(--r,67%) + 4%)),
                     linear-gradient(180deg,transparent calc(var(--t,40%) - 3%),#000 var(--t,40%),#000 calc(var(--slot,40%) - .4%),transparent var(--slot,40%));
  mask-image:linear-gradient(90deg,transparent calc(var(--l,44%) - 4%),#000 var(--l,44%),#000 var(--r,67%),transparent calc(var(--r,67%) + 4%)),
             linear-gradient(180deg,transparent calc(var(--t,40%) - 3%),#000 var(--t,40%),#000 calc(var(--slot,40%) - .4%),transparent var(--slot,40%));
  -webkit-mask-composite:source-in;mask-composite:intersect}
.hero-art .live-layer>.print-img{z-index:0}
.tape-slot{display:none}
@media (min-width:901px){.hero-art .float-chip.c2{top:38%;right:5%}}

/* hero video: real rendered printing clip over the still, fades in once it is playing */
.hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center 45%;opacity:0;transition:opacity .7s ease;pointer-events:none}
.hero-art.video-on .hero-video{opacity:1}
.hero-art.video-on .lg{opacity:0!important;animation:none}
/* hero is now the video's own first frame (9:16), framed so the paper top and the printer both show */
.hero-art img,.hero-art .print-img,.hero-video{object-position:center 40%}
@media (min-width:901px){.hero-art{width:51%}}
@media (max-width:900px){.hero-art{height:clamp(440px,128vw,720px)}}
@media (min-width:901px){.hero-art .float-chip.c1{left:6%;bottom:7%}}

/* ───────── HERO full-bleed (desktop): the scene covers the whole hero; a left→right fade keeps the text readable ───────── */
@media (min-width:901px){
  .hero{background:var(--bg)}
  /* soft, blurred continuation of the scene behind the text side */
  .hero::before{content:"";position:absolute;inset:-8%;z-index:0;background:url(/assets/img/3d/herov.jpg) 70% 40%/cover no-repeat;filter:blur(46px) saturate(1.05);transform:scale(1.12);pointer-events:none}
  .hero::after{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;
    background:linear-gradient(90deg,rgba(243,241,238,.97) 0%,rgba(243,241,238,.93) 30%,rgba(243,241,238,.62) 48%,rgba(243,241,238,.18) 66%,rgba(243,241,238,0) 80%)}
  .hero-grid{z-index:2}
  .hero-art{width:60%;-webkit-mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.35) 12%,#000 34%);mask-image:linear-gradient(90deg,transparent 0,rgba(0,0,0,.35) 12%,#000 34%)}
  .hero-art::before{display:none}
  .hero-art .float-chip.c1{left:36%;bottom:4%}
  .hero-art .print-hint{translate:-10% 0}
}
@media (min-width:901px) and (max-width:1240px){.hero-art .float-chip.c1{display:none}}
@media (min-width:901px){
  /* light veil under the menu so nav links stay readable over the scene */
  .hero-art::before{display:block;content:"";position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(180deg,rgba(243,241,238,.82) 0,rgba(243,241,238,.35) 9%,rgba(243,241,238,0) 18%)}
}
@media (min-width:1241px){
  .hero-art{width:52%}
  .hero-art img,.hero-art .print-img,.hero-video{object-position:center 50%}
  .hero-art .float-chip.c1{left:8%;bottom:auto;top:46%}
}
