/* ============================================================
   FX INTERACTIVE LAYER (2026-07-02) - additive only.
   Hover interactivity pass: card tilt, magnetic CTAs, marquee
   pause, gallery zoom, animated plan switch, smooth accordions,
   360 spin component. Pairs with fx-interactive.js.
   Guards: hover-capable pointers only where relevant;
   prefers-reduced-motion disables all of it.
   ============================================================ */

/* --- Marquees pause on hover (igstrip already pauses via figma-site.css) --- */
@media (hover:hover) and (pointer:fine){
  .social__marquee:hover .mq-track,
  .social__reviews:hover .mq-track,
  .foot__marquee:hover .foot__marquee-track{animation-play-state:paused;}
}

/* --- Card tilt (JS drives transform; CSS drives the spring-back) --- */
.fx-tilt{transition:transform .55s cubic-bezier(.19,.84,.27,1), box-shadow .55s ease;}
.fx-tilt.fx-tilting{transition:transform .09s linear, box-shadow .4s ease;will-change:transform;}

/* --- Magnetic CTA pills --- */
.fx-mag{transition:transform .4s cubic-bezier(.19,.84,.27,1);}
.fx-mag.fx-maging{transition:transform .07s linear;}

/* --- Buy box: animated plan-tier switch --- */
.popt{transition:transform .32s cubic-bezier(.2,.8,.25,1), box-shadow .32s ease,
      border-color .32s ease, background-color .32s ease;}
.popt.is-active{transform:translateY(-2px);}
.popt .popt__save{transition:transform .32s cubic-bezier(.2,.8,.25,1);}
.popt.is-active .popt__save{transform:scale(1.06);}

/* --- PDP gallery hover zoom --- */
.pdp-gal__main.fx-zoom{overflow:hidden;}
.pdp-gal__main.fx-zoom img{transition:transform .35s cubic-bezier(.2,.8,.25,1);}
@media (hover:hover) and (pointer:fine){
  .pdp-gal__main.fx-zoom{cursor:zoom-in;}
}

/* --- 360 spin component --- */
[data-spin360]{position:relative;cursor:pointer;}
[data-spin360] video{display:block;width:100%;height:100%;object-fit:cover;}
/* PDP dose viewer: the spin video is a framed rounded card inside the grey
   panel (the still it replaced was a transparent cutout, so it needs its own
   treatment): keep the absolute inset+padding from .dose__pstill, round the
   corners, soften the shadow, cover-fit the blush studio footage. */
#s-dose .dose__pcard[data-spin360] video.dose__pstill{
  inset:clamp(18px,3.5vw,34px);
  width:auto;height:auto;padding:0;
  object-fit:cover;border-radius:18px;
  filter:drop-shadow(0 24px 40px rgba(2,14,40,.26));
}
#s-dose .dose__pcard[data-spin360] .fx-spinhint{left:clamp(26px,4.5vw,44px);bottom:clamp(26px,4.5vw,44px);}
[data-spin360] .fx-spinhint{
  position:absolute;left:12px;bottom:12px;z-index:2;pointer-events:none;
  background:rgba(22,24,26,.65);color:#CEFBFF;
  font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;
  padding:6px 12px;border-radius:999px;transition:opacity .25s ease;
}
[data-spin360].fx-playing .fx-spinhint{opacity:0;}

/* --- Accordion polish (motion handled by fx-interactive.js WAAPI) --- */
details.ac > summary{transition:opacity .2s ease;}
details.ac > summary:hover{opacity:.72;}

/* --- Spin enlarge modal (click the pouch to view it big) --- */
.fx-spinmodal{position:fixed;inset:0;z-index:12000;display:none;align-items:center;justify-content:center;
  background:rgba(8,12,18,.72);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);padding:20px;}
.fx-spinmodal.open{display:flex;}
.fx-spinmodal__panel{position:relative;max-width:min(92vw,640px);width:100%;}
.fx-spinmodal__panel video{display:block;width:100%;max-height:86vh;object-fit:contain;border-radius:22px;background:#e9dcd8;cursor:pointer;}
.fx-spinmodal__close{position:absolute;top:-12px;right:-12px;width:42px;height:42px;border-radius:50%;border:0;
  background:#CEFBFF;color:#16181a;font-size:24px;line-height:1;cursor:pointer;z-index:2;
  box-shadow:0 8px 24px rgba(8,12,18,.35);}
.fx-spinmodal__hint{position:absolute;left:50%;transform:translateX(-50%);bottom:14px;pointer-events:none;
  background:rgba(22,24,26,.65);color:#CEFBFF;font-size:11px;font-weight:600;letter-spacing:.08em;
  text-transform:uppercase;padding:6px 12px;border-radius:999px;}

/* Mobile: the dose spin reads too small; make it as tall as the text card below it.
   !important needed: the PDP inline mobile rule sets min-height:300px!important. */
@media(max-width:860px){
  #s-dose .dose__pcard[data-spin360]{min-height:min(112vw,520px) !important;}
  #s-dose .dose__pcard[data-spin360] video.dose__pstill{inset:10px;}
}

/* --- Homepage story section, mobile polish (Joakim 2026-07-02) ---
   1) The circular stir-video peeking out behind the glass cutout read as a
      layering mistake; mobile shows the clean glass only.
   2) Beats reveal as you scroll (armed by JS only, so no-JS stays visible). */
#s-cup .s2m__vessel{display:none !important;}
.fx-s2m-armed #s-cup .s2m__beat{opacity:0;transform:translateY(26px);
  transition:opacity .6s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.2,.7,.2,1);}
.fx-s2m-armed #s-cup .s2m__beat.fx-in{opacity:1;transform:none;}
@media (prefers-reduced-motion:reduce){
  .fx-s2m-armed #s-cup .s2m__beat{opacity:1 !important;transform:none !important;transition:none !important;}
}

/* --- Kill switch --- */
@media (prefers-reduced-motion:reduce){
  .fx-tilt,.fx-mag{transition:none !important;transform:none !important;}
  .popt,.popt .popt__save{transition:none !important;transform:none !important;}
  .pdp-gal__main.fx-zoom img{transition:none !important;transform:none !important;}
}
