/* Signature moments, one per page, built on the kit's pinned scene (.scrub[data-scrub] > .stage, --p/--a/--b).
   Static first (JS off, reduced motion: a plain readable section); the scroll-linked version only under html.motion.
   Owner: PRODUCTS. */

.p-burst .stage, .p-hub .stage, .p-glide .stage, .p-spot .stage, .p-stand .stage, .p-shut .stage { background: radial-gradient(52% 42% at 50% 62%, rgba(0, 167, 149, .3), rgba(0, 167, 149, 0) 72%), var(--night); }
:is(.p-burst, .p-spot, .p-stand, .p-shut) > .stage { padding-block: var(--section-y); }
.motion :is(.p-burst, .p-spot, .p-stand, .p-shut, .p-hub, .p-glide) > .stage { padding-block: 0; }

/* ======================= IDMS: deal tiles burst out of the monitor ======================= */
.p-burst .stage { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: clamp(28px, 5vh, 56px); }
.p-burst__copy { position: relative; z-index: 3; display: grid; justify-items: center; gap: 16px; text-align: center; }
.p-burst__t { font: 700 clamp(2.2rem, 5.6vw, 4.6rem)/1.02 var(--font-display); letter-spacing: -.035em; max-width: 15ch; }
.p-burst__text { color: var(--soft); font-size: var(--text-lead); }
.p-burst__text p { margin: 0; }
.p-burst__pic { position: relative; width: min(540px, 66vw, 62vh); container-type: inline-size; --t: 1; }
.p-burst__mon { position: relative; z-index: 1; }
.p-burst__tile { position: absolute; z-index: 2; left: 50%; top: 46%; width: 34%; filter: drop-shadow(0 0 22px rgba(0, 216, 193, .45)) drop-shadow(0 14px 18px rgba(0, 0, 0, .55));
    transform: translate(calc(-50% + var(--x) * var(--t)), calc(-50% + var(--y) * var(--t))) rotate(calc(var(--r) * var(--t))) scale(calc(.3 + var(--t) * .7));
    opacity: clamp(0, calc(var(--t) * 3), 1); animation: kit-bob 5s ease-in-out var(--w, 0s) infinite; }
.p-burst__tile--1 { --x: -62cqw; --y: -30cqw; --r: -8deg; --w: -1s; }
.p-burst__tile--2 { --x: 62cqw; --y: -26cqw; --r: 7deg; --w: -2.4s; }
.p-burst__tile--3 { --x: -58cqw; --y: 22cqw; --r: 6deg; --w: -3.1s; }
.p-burst__tile--4 { --x: 60cqw; --y: 26cqw; --r: -6deg; --w: -.4s; }
.motion .p-burst__pic { --t: var(--b); }
.motion .p-burst__mon { transform: translateY(calc((1 - var(--a)) * 24%)) scale(calc(.8 + var(--a) * .2)); }
.motion .p-burst__copy { transform: translateY(calc((1 - var(--a)) * 20px)); }


/* ======================= Leads Center: three screens flow into one hub ======================= */
.p-hub, .p-glide { --stage-h: max(600px, min(100svh, 960px)); }
/* pinned heroes: a smaller h1 so the pictures fit in the first screen */
:is(.p-hub, .p-glide) .p-hero__t { font-size: clamp(2.4rem, 6vw, 5.2rem); max-width: none; }
.p-hub .stage { display: flex; flex-direction: column; align-items: center; padding: calc(var(--p-top) + clamp(24px, 4vw, 56px)) 0 var(--section-y); }
.motion .p-hub > .stage { justify-content: flex-start; padding-top: calc(var(--p-top) + clamp(16px, 3vh, 40px)); }
.p-hub__copy { position: relative; z-index: 4; display: grid; justify-items: center; gap: 18px; text-align: center; }
.p-hub__pic { position: relative; width: min(580px, 64vw, max(280px, calc((100svh - 440px) * 1.7))); aspect-ratio: 939 / 547; margin-top: clamp(36px, 6vh, 72px); --t: 0; }
.motion .p-hub__pic { --t: var(--p); }
.p-hub__s { position: absolute; inset: 0; margin: 0; transform-origin: 50% 100%;
    transform: translate(calc(var(--fx) * (1 - var(--t)) + var(--sx) * var(--t)), calc(var(--fy) * (1 - var(--t)) + var(--sy) * var(--t))) rotate(calc(var(--fr) * (1 - var(--t)) + var(--sr) * var(--t))) scale(calc(var(--fs) * (1 - var(--t)) + var(--ss) * var(--t))); }
.p-hub__s--0 { --fx: -66%; --fy: 10%; --fr: -9deg; --fs: .84; --sx: -4%; --sy: -9%; --sr: -2deg; --ss: .92; z-index: 1; }
.p-hub__s--1 { --fx: 0%; --fy: 0%; --fr: 0deg; --fs: 1; --sx: 0%; --sy: 0%; --sr: 0deg; --ss: 1; z-index: 3; }
.p-hub__s--2 { --fx: 66%; --fy: 10%; --fr: 9deg; --fs: .84; --sx: 4%; --sy: 9%; --sr: 2deg; --ss: .92; z-index: 2; }
.p-hub__ring { position: absolute; z-index: 0; left: 50%; top: 50%; width: 46%; aspect-ratio: 1; translate: -50% -50%; --v: var(--t); }
.p-hub__ring b { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--mint); opacity: 0; animation: kit-ripple 3s ease-out infinite; }
.p-hub__ring b:nth-child(2) { animation-delay: -1s; }
.p-hub__ring b:nth-child(3) { animation-delay: -2s; }

/* ======================= Website: tablet and phone glide in beside the laptop (used in the "rise" scene, products/home-b.css sets --t) ======================= */
.p-glide__lap { position: relative; z-index: 1; transform: scale(calc(.9 + var(--t) * .1)); transform-origin: 50% 100%; }
.p-glide__tab { position: absolute; z-index: 2; width: 34%; left: -11%; bottom: -3%; transform: translateX(calc((1 - var(--t)) * -80%)) rotate(calc((1 - var(--t)) * -10deg)); opacity: calc(.4 + var(--t) * .6); }
.p-glide__phone { position: absolute; z-index: 3; width: 14%; right: -5%; bottom: -6%; transform: translateX(calc((1 - var(--t)) * 150%)) rotate(calc((1 - var(--t)) * 12deg)); opacity: calc(.4 + var(--t) * .6); }

/* ======================= Marketing Tools: four tools light up around the chat phone ======================= */
.p-spot .stage { display: flex; flex-direction: column; justify-content: center; gap: clamp(24px, 5vh, 56px); }
.p-spot__hd { text-align: center; }
.p-spot__t { font: 700 clamp(2rem, 5.2vw, 4.2rem)/1.04 var(--font-display); letter-spacing: -.035em; }
.p-spot__sub { margin-top: 12px; font: 500 var(--text-eyebrow)/1.4 var(--font-display); letter-spacing: .32em; text-transform: uppercase; color: var(--mint) !important; }
.p-spot__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, min(36vw, 360px, 46vh)) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; width: 100%; max-width: calc(var(--container) + 40px); margin-inline: auto; }
.p-spot__col { display: grid; gap: clamp(28px, 6vh, 64px); }
.p-spot__col:first-child { text-align: right; justify-items: end; }
.p-spot__f { display: grid; gap: 8px; justify-items: inherit; max-width: 40ch; --dx: 40px; }
.p-spot__col:first-child .p-spot__f { --dx: -40px; }
.p-spot__ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgba(0, 216, 193, .12); box-shadow: 0 0 0 1px rgba(0, 216, 193, .4), 0 0 30px rgba(0, 216, 193, .2); color: var(--mint); font-size: 24px; }
.p-spot__ic svg { height: 1em; }
.p-spot__ft { font: 600 clamp(1.2rem, 2vw, 1.6rem)/1.2 var(--font-display); color: var(--ink); }
.p-spot__fx { color: var(--soft); line-height: 1.55; }
.p-spot__ft p, .p-spot__fx p { margin: 0; }
.p-spot__pic img { display: block; width: 100%; height: auto; }
.motion .p-spot__f { --on: clamp(0, calc(var(--p) * 5.4 - var(--i) * 1.15 - .25), 1); opacity: calc(.2 + var(--on) * .8); transform: translateX(calc((1 - var(--on)) * var(--dx))); }
.motion .p-spot__pic img { transform: rotateY(calc((var(--p) - .5) * 36deg)) scale(calc(.94 + var(--p) * .06)); }

/* ======================= CRM: the laptop stands up and fills the view ======================= */
.p-stand .stage { display: flex; flex-direction: column-reverse; align-items: center; gap: clamp(40px, 6vw, 72px); }
.p-stand__copy { position: relative; z-index: 2; display: grid; justify-items: center; gap: 14px; text-align: center; }
.p-stand__t { font: 700 clamp(2.2rem, 5.6vw, 4.6rem)/1.02 var(--font-display); letter-spacing: -.035em; }
.p-stand__sub { font: 500 clamp(1.05rem, 1.8vw, 1.4rem)/1.3 var(--font-display); color: var(--mint) !important; }
.p-stand__text { max-width: 62ch; color: var(--soft); font-size: clamp(1rem, 1.25vw, 1.12rem); line-height: 1.6; }
.p-stand__text p { margin: 0; }
.p-stand__pic { width: min(960px, 88vw); perspective: 1400px; }
.motion .p-stand > .stage { display: block; }
.motion .p-stand__copy { padding-top: clamp(28px, 6vh, 64px); opacity: calc(1 - var(--b) * 2.6); transform: translateY(calc(var(--b) * -220px)); }
.motion .p-stand__pic { position: absolute; left: 50%; bottom: 3%; width: min(960px, 88vw, 128vh); translate: -50% 0; }
/* QA: was 72deg, the laptop was edge-on and invisible for the first part of the scene (an empty lower half) */
.motion .p-stand__pic > .p-dev { transform-origin: 50% 100%; transform: translateY(calc(var(--b) * -10%)) rotateX(calc((1 - var(--a)) * 60deg)) scale(calc(.56 + var(--a) * .12 + var(--b) * .32)); }

/* ======================= Design Studio: the canvas opens like a shutter ======================= */
.p-shut .stage { display: flex; flex-direction: column; align-items: center; }
.p-shut__lines { position: relative; z-index: 2; display: grid; justify-items: center; text-align: center; gap: 4px; }
.p-shut__ey { font: 500 var(--text-eyebrow)/1.4 var(--font-display); letter-spacing: .32em; text-transform: uppercase; color: var(--mint) !important; margin-bottom: 10px; }
.p-shut__t { font: 700 clamp(2.6rem, 9vw, 7.6rem)/.98 var(--font-display); letter-spacing: -.045em; }
.p-shut__t--b { color: var(--mint) !important; }
.p-shut__text { margin-top: 18px; max-width: 60ch; color: var(--soft); font-size: var(--text-lead); }
.p-shut__text p { margin: 0; }
.p-shut__win { position: relative; width: min(1100px, 90vw); margin-top: clamp(40px, 6vw, 72px); overflow: hidden; border-radius: 16px; box-shadow: 0 0 0 1px var(--line), var(--shot-shadow); }
.p-shut__win img { display: block; width: 100%; height: auto; }
.motion .p-shut > .stage { display: block; }
.motion .p-shut__lines { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(calc(-50% - var(--a) * 70vh)); opacity: clamp(0, calc(1 - var(--a) * 3), 1); }
.motion .p-shut__win { --o: clamp(0, calc((var(--a) - .25) * 1.34), 1); position: absolute; z-index: 3; left: 50%; top: 50%; margin: 0; width: min(1100px, 90vw, 150vh); translate: -50% -50%; clip-path: inset(calc((1 - var(--o)) * 49.6%) calc((1 - var(--o)) * 30%) round 16px); opacity: clamp(0, calc(var(--o) * 8), 1); }
.motion .p-shut__win img { transform: scale(calc(1.25 - var(--p) * .25)); }

/* ======================= phones ======================= */
@media (max-width: 760px) {
    .p-hub__pic { width: 84vw; }
    /* QA: on phones the hero copy and screens sat in the top half of the pinned stage with an empty lower half */
    .motion :is(.p-hub, .p-glide) > .stage { justify-content: center; padding-top: var(--p-top); }
    .p-glide__tab { width: 40%; left: -8%; }
    .p-glide__phone { width: 18%; right: -4%; }
    /* the four tools: one column, not pinned */
    .p-spot__grid { grid-template-columns: minmax(0, 1fr); }
    .p-spot__col:first-child { text-align: left; justify-items: start; }
    .p-spot__pic { width: min(320px, 76vw); margin-inline: auto; }
    .motion .p-spot { height: auto; }
    .motion .p-spot > .stage { position: relative; height: auto; padding-block: var(--section-y); }
    .motion .p-spot__f { opacity: 1; transform: none; }
    .motion .p-spot__pic img { transform: none; }
    .p-burst__pic { width: 64vw; }
    /* the laptop rises in the middle of the screen, clear of the phone bottom bar */
    .motion .p-stand__pic { bottom: auto; top: 50%; }
    .motion .p-stand__pic > .p-dev { transform-origin: 50% 50%; transform: translateY(calc(var(--b) * -40%)) rotateX(calc((1 - var(--a)) * 60deg)) scale(calc(.7 + var(--a) * .15 + var(--b) * .15)); }
}

/* ======================= reduced motion ======================= */
@media (prefers-reduced-motion: reduce) {
    .p-burst__tile, .p-hub__ring b { animation: none; }
}
