/* ==========================================================================
   Magic layer (public/js/magic.js): pointer light, hero lean, title shimmer, text rise,
   card shine, campaign sheen, moods circle reveal, smooth FAQ.
   Loops are compositor-only; everything is off under reduced motion.
   ========================================================================== */

/* ---------- Pointer light on dark sections (desktop) ---------- */
.mx-spot { position: absolute; z-index: 0; left: 0; top: 0; width: 680px; height: 680px; margin: -340px 0 0 -340px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, color-mix(in srgb, var(--mx-c, #a98bff) 22%, transparent), transparent 62%); opacity: 0; transition: opacity .6s ease; will-change: transform; }
.mx-lit .mx-spot { opacity: 1; }
.mx-host { position: relative; isolation: isolate; }
.mx-host > .container { position: relative; z-index: 1; }
.mx-host > .wall__copy { z-index: 2; }

/* ---------- Hero: device leans toward the pointer, title shimmers in once ---------- */
.ph__stage { transition: transform .8s var(--ease); transform-style: preserve-3d; }
.ph.mx-lean .ph__stage { transition-duration: .25s; }

/* ---------- Text rises in after its section arrives ---------- */
.mx-rise { opacity: 0; translate: 0 18px; transition: opacity .8s var(--ease), translate .9s var(--ease); transition-delay: var(--d, 0ms); }
.mx-rise.is-in { opacity: 1; translate: none; }

/* ---------- Cards: a light glint passes on hover ---------- */
.cg-card, .ob__card, .pura-flavor { position: relative; overflow: hidden; }
.cg-card::before, .ob__card::before { content: ""; position: absolute; z-index: 3; top: 0; bottom: 0; left: 0; width: 45%; pointer-events: none; background: linear-gradient(105deg, transparent 0%, rgb(255 255 255 / .22) 50%, transparent 100%); transform: translateX(-130%) skewX(-12deg); }
@media (hover: hover) and (pointer: fine) {
  .cg-card:hover::before, .ob__card:hover::before { transition: transform .9s cubic-bezier(.3, 0, .2, 1); transform: translateX(320%) skewX(-12deg); }
}

/* ---------- Campaign: a light sheen crosses each new slide ---------- */
.cs__slide::before { content: ""; position: absolute; z-index: 2; top: -10%; bottom: -10%; left: 0; width: 34%; pointer-events: none; background: linear-gradient(100deg, transparent 0%, rgb(255 255 255 / .16) 50%, transparent 100%); transform: translateX(-140%) skewX(-12deg); }
@media (prefers-reduced-motion: no-preference) {
  .cs__slide.is-on::before { animation: mxSheen 1.6s cubic-bezier(.3, 0, .2, 1) .35s 1 both; }
}
@keyframes mxSheen { from { transform: translateX(-140%) skewX(-12deg); } to { transform: translateX(420%) skewX(-12deg); } }

/* ---------- Moods: the new scene opens as a circle from the tab you pressed ---------- */
@media (prefers-reduced-motion: no-preference) {
  .md__bg.mx-open { z-index: 1; animation: mxCircle 1.1s cubic-bezier(.65, 0, .25, 1) both; }
}
@keyframes mxCircle { from { clip-path: circle(0% at var(--rx, 50%) var(--ry, 85%)); } to { clip-path: circle(150% at var(--rx, 50%) var(--ry, 85%)); } }

/* ---------- Flavor ticker: brighter word under the pointer ---------- */
.marquee__track span { transition: color .3s, -webkit-text-stroke-color .3s; }

/* ---------- FAQ answers slide open (Chrome/Edge 131+; others open instantly) ---------- */
@media (prefers-reduced-motion: no-preference) {
  :root { interpolate-size: allow-keywords; }
  .accordion details::details-content { height: 0; overflow: clip; transition: height .5s var(--ease), content-visibility .5s allow-discrete; }
  .accordion details[open]::details-content { height: auto; }
  .accordion details > div { opacity: 0; translate: 0 -6px; transition: opacity .4s ease .05s, translate .5s var(--ease); }
  .accordion details[open] > div { opacity: 1; translate: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mx-spot, .cs__slide::before { display: none; }
  .mx-rise { opacity: 1; translate: none; }
  .ph__stage { transform: none !important; }
}

/* Logo mark (views/partials/logo-mark.ejs) */
.logo { display: inline-flex; align-items: center; }
.logo__mark { display: block; width: auto; height: 46px; }
.logo--lg .logo__mark { height: 84px; }
@media (max-width: 899px) { .logo .logo__mark { height: 40px; } .logo--lg .logo__mark { height: 72px; } }

/* ==========================================================================
   Inside Mega PURA (anatomy): one screen, guided tour, focus zoom, scan line
   ========================================================================== */
@media (min-width: 960px) {
  .anat { padding-block: clamp(36px, 7svh, 96px); }
  .anat .section__title { font-size: clamp(36px, min(4.4vw, 7.6svh), 76px); }
  .anat .lead { margin-block: clamp(8px, 1.6svh, 18px); font-size: clamp(15px, min(1.3vw, 2.3svh), 19px); }
  .anat__stage { max-width: min(560px, calc((100svh - 130px) / 1.05), 34vw); }
  .anat__list { gap: 2px; }
  .anat__item { padding-block: clamp(5px, 1.1svh, 12px); }
  .anat__n { font-size: clamp(18px, 2.6svh, 22px); }
  .anat__copy .btn { margin-top: clamp(10px, 2svh, 22px) !important; }
}
/* only the selected part is labelled on the drawing */
.anat__dot .anat__tag, .anat__dot .anat__line { opacity: 0; transition: opacity .35s, transform .45s var(--ease); }
.anat__dot.is-active .anat__tag, .anat__dot.is-active .anat__line { opacity: 1; }
.anat__dot:not(.is-active) .anat__pin { transform: scale(.82); opacity: .75; }
.anat__dot:not(.is-active) .anat__pin::after { animation: none; opacity: 0; }
/* focus zoom toward the selected part */
.anat__model { transform-origin: var(--fx, 50%) var(--fy, 50%); transition: transform 1.1s var(--ease); }
.anat.is-focus .anat__model { transform: scale(1.07); }
/* tour progress on the active list item */
.anat__item { position: relative; overflow: hidden; }
.anat__item::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px; border-radius: 2px; background: rgb(var(--bp)); transform: scaleX(0); transform-origin: 0 50%; opacity: 0; }
.anat.is-touring .anat__item.is-active::after { opacity: .8; animation: anatProg var(--tour-ms, 4200ms) linear both; }
@keyframes anatProg { to { transform: scaleX(1); } }
/* blueprint scan line */
.anat__stage::after { content: ""; position: absolute; left: 4%; right: 4%; top: 0; height: 2px; pointer-events: none; background: linear-gradient(90deg, transparent, rgb(var(--bp) / .7), transparent); box-shadow: 0 0 18px rgb(var(--bp) / .6); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .anat__stage::after { animation: anatScan 6s cubic-bezier(.45, 0, .55, 1) infinite; }
  .anat__dev--pura { animation: hxFloatA 7s ease-in-out infinite; }
}
@keyframes anatScan { 0% { transform: translateY(0); opacity: 0; } 10% { opacity: 1; } 60% { transform: translateY(min(560px, 70svh)); opacity: 0; } 100% { opacity: 0; } }
@keyframes hxFloatA { 0%, 100% { translate: 0 0; } 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .anat.is-focus .anat__model { transform: none; } }
@media (min-width: 600px) { .anat__dot--r { --lw: 22px !important; } .anat__tag { font-size: 10px; } }

/* ==========================================================================
   Hero flavor picker: arrows + counter + timer, labelled dots, Explore link
   ========================================================================== */
.ph__nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.ph__namebox { position: relative; min-width: min(300px, 62vw); text-align: center; }
.ph__namebox .ph__name { margin: 0; }
.ph__count { margin: 6px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: rgb(255 255 255 / .55); font-variant-numeric: tabular-nums; }
.ph__count span { color: #fff; }
.ph__timer { display: block; width: 120px; height: 2px; margin: 10px auto 0; border-radius: 2px; background: rgb(255 255 255 / .15); overflow: hidden; }
.ph__timer i { display: block; height: 100%; background: var(--c); transform: scaleX(0); transform-origin: 0 50%; }
.ph__timer.is-timing i { animation: phTimer var(--ph-ms, 3600ms) linear both; }
@keyframes phTimer { to { transform: scaleX(1); } }
.ph__arrow { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .2); background: rgb(255 255 255 / .05); color: #fff; cursor: pointer; transition: background .25s, border-color .25s, color .25s; }
.ph__arrow:hover { background: #fff; color: #0b0b0d; border-color: #fff; }
.ph__arrow:focus-visible, .ph__dots button:focus-visible, .ph__explore:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* dots: bigger targets; the name shows on hover / keyboard focus */
.ph__dots { gap: 10px; max-width: 460px; }
.ph__dots button { position: relative; width: 28px; height: 28px; }
.ph__dots button::after { content: attr(data-name); position: absolute; left: 50%; bottom: calc(100% + 10px); translate: -50% 4px; padding: 5px 10px; border-radius: 8px; white-space: nowrap; font-size: 12px; font-weight: 600; color: #0b0b0d; background: #fff; opacity: 0; pointer-events: none; transition: opacity .15s, translate .15s; z-index: 5; }
.ph__dots button:hover::after, .ph__dots button:focus-visible::after { opacity: 1; translate: -50% 0; }
.ph__explore { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 10px 18px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .2); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: background .25s, color .25s, border-color .25s; }
.ph__explore:hover { background: #fff; color: #0b0b0d; border-color: #fff; }
.ph__explore svg { transition: translate .25s var(--ease); }
.ph__explore:hover svg { translate: 3px 0; }
@media (max-width: 899px) {
  .ph__dots { gap: 12px; max-width: 340px; }
  .ph__dots button { width: 30px; height: 30px; }
  .ph__dots button::after { display: none; }
  .ph__nav { gap: 10px; }
  .ph__namebox { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .ph__timer { display: none; } }

/* Hero: a soft ripple of the new flavor's color spreads behind the device */
.ph__ripple { position: absolute; left: 50%; top: 42%; z-index: 0; width: min(70%, 420px); aspect-ratio: 1; margin: 0; translate: -50% -50%; border-radius: 50%; border: 2px solid var(--c); background: radial-gradient(circle, transparent 55%, color-mix(in srgb, var(--c) 22%, transparent) 70%, transparent 72%); opacity: 0; pointer-events: none; will-change: scale, opacity; contain: strict; }
.ph__ripple.is-go { animation: phRipple 1.3s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes phRipple { from { scale: .35; opacity: .55; } to { scale: 1.6; opacity: 0; } }
.ph__dev { position: relative; z-index: 1; }
