/* De gsm-rondleiding op de home (14 nov 2026, Lars: "zoals FleetRabbit, je ziet letterlijk wat er gebeurt in de app").
   Een gsm in 3D blijft staan terwijl je scrolt. Hij draait zich om (achterkant met het Pinflo-logo), schuift van links
   naar rechts en toont per boodschap één echt scherm van de app. Aan de
   andere kant staat telkens de uitleg, met een lijntje naar de gsm. De kop van de sectie staat mee in het beeld. assets/js/gsmTour.js bouwt de gsm en stuurt alles met het scrollen.
   Zonder JavaScript of met "minder beweging" staan de stappen gewoon onder elkaar, met hun scherm. */

/* ---------- Zonder beweging: de stappen onder elkaar ---------- */
.px-scenes { display: grid; gap: clamp(40px, 6vh, 72px); max-width: 980px; margin: 0 auto; padding-inline: var(--hx-gutter); }
.px-scene { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); align-items: center; }
.px-scene-shot { width: 100%; height: auto; border-radius: 26px; border: 1px solid var(--hx-line-strong); background: #fff; }
.px-scene-step { margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; color: var(--hx-muted); }
.px-scene-copy h3 {
    margin: 0 0 12px; font-family: var(--font-display); font-weight: 600; color: var(--hx-ink);
    font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2.1rem); line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance;
}
.px-scene-copy h3 span { color: var(--hx-orange); }
.px-scene-copy p:not(.px-scene-step) { margin: 0 0 18px; font-size: 16px; line-height: 1.6; color: var(--hx-ink-2); max-width: 44ch; }
@media (max-width: 640px) {
    .px-scene { grid-template-columns: minmax(0, 1fr); }
    .px-scene-shot { width: min(240px, 70%); margin: 0 auto; }
}

/* ---------- Met beweging: een podium dat blijft staan ---------- */
.px-live .px-scenes { display: none; }
.px-live .px-stage { position: relative; height: var(--px-stage-h, 600vh); }
/* De kop staat mee in het beeld, met de gsm er meteen onder; ze gaat weg terwijl de gsm zich omdraait. */
.hx-section.px-live { padding-top: clamp(12px, 3vh, 36px); }
.px-intro {
    position: absolute; left: 0; right: 0; top: calc(var(--header-h, 72px) + clamp(8px, 2vh, 24px)); z-index: 2;
    padding-inline: var(--hx-gutter); opacity: calc(1 - var(--gone, 0)); transform: translateY(calc(var(--gone, 0) * -36px));
    pointer-events: none;
}
.px-intro .hx-head { margin-bottom: 0; }
.px-viewport {
    position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
    padding-top: var(--header-h, 72px); box-sizing: border-box;
    perspective: 1900px; perspective-origin: 50% 45%;
    --pw: clamp(210px, calc((100svh - var(--header-h, 72px) - 110px) / 2.2), 300px);
    --pb: calc(var(--pw) * 0.036);
    --sw: calc(var(--pw) - 2 * var(--pb));
    --sbar: calc(var(--sw) * 0.1);
    --sh: calc(var(--sw) * 2.164 + var(--sbar));
    --ph: calc(var(--sh) + 2 * var(--pb));
    --depth: calc(var(--pw) * -0.003);
}
.px-anchor { position: absolute; left: 50%; top: calc(50% + var(--header-h, 72px) / 2 + var(--px-yoff, 0px)); width: 0; height: 0; transform-style: preserve-3d; }

/* ---------- De gsm ---------- */
.px-phone {
    position: absolute; left: calc(var(--pw) / -2); top: calc(var(--ph) / -2); width: var(--pw); height: var(--ph);
    transform-style: preserve-3d; will-change: transform;
}
.px-layer, .px-face { position: absolute; inset: 0; border-radius: calc(var(--pw) * 0.165); }
.px-layer {
    transform: translateZ(calc(var(--depth) * var(--i)));
    background: linear-gradient(90deg, #2b2a2c, #4a494c 18%, #1d1c1e 50%, #4a494c 82%, #2b2a2c);
}
/* De knoppen opzij, op de middelste laag: links actieknop en volume, rechts aan/uit. */
.px-layer.is-mid::before, .px-layer.is-mid::after { content: ''; position: absolute; width: 3px; border-radius: 2px; background: #3a393c; }
.px-layer.is-mid::before { left: -2.5px; top: 19%; height: 13%; box-shadow: 0 calc(var(--ph) * 0.17) 0 #3a393c; }
.px-layer.is-mid::after { right: -2.5px; top: 25%; height: 16%; }
.px-face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.px-front {
    background: #0a0a0b; padding: var(--pb); box-sizing: border-box;
    box-shadow: inset 0 0 0 1.5px #57565a, inset 0 0 0 3px #0a0a0b;
}
.px-back {
    transform: translateZ(calc(var(--depth) * 27)) rotateY(180deg);
    background: linear-gradient(160deg, #3b3a3d, #232225 55%, #2e2d30);
    box-shadow: inset 0 0 0 1.5px #57565a;
}
.px-back-logo { position: absolute; left: 50%; top: 52%; width: 30%; aspect-ratio: 1.4; transform: translate(-50%, -50%); background: url('/assets/images/logo/Logo-assistent-orange.svg') center / contain no-repeat; }
.px-back-cam {
    position: absolute; left: 7%; top: 3.5%; width: 44%; aspect-ratio: 1; border-radius: 26%;
    background: linear-gradient(145deg, #4a494c, #2c2b2e); box-shadow: inset 0 0 0 1px #5d5c60;
}
.px-back-cam i { position: absolute; width: 40%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #3d4250 0 16%, #0d0e12 30% 62%, #26252a 64%); box-shadow: 0 0 0 2px #1a191c; }
.px-back-cam i:nth-child(1) { left: 7%; top: 7%; }
.px-back-cam i:nth-child(2) { left: 7%; bottom: 7%; }
.px-back-cam i:nth-child(3) { right: 7%; top: 30%; }

/* ---------- Het scherm ---------- */
.px-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: calc(var(--pw) * 0.13); background: #fff; }
.px-status {
    position: absolute; left: 0; right: 0; top: 0; height: var(--sbar); z-index: 2;
    display: flex; align-items: center; justify-content: space-between; padding: 0 calc(var(--sw) * 0.085) 0 calc(var(--sw) * 0.1);
    font: 600 calc(var(--sw) * 0.047) / 1 -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif; color: #0a0a0b;
    background: var(--px-status-bg, #fff); transition: background-color 300ms ease;
}
.px-status-icons { display: flex; align-items: center; gap: calc(var(--sw) * 0.016); }
.px-signal { display: flex; align-items: flex-end; gap: 1.5px; height: calc(var(--sw) * 0.034); }
.px-signal i { width: 2.5px; border-radius: 1px; background: currentColor; }
.px-signal i:nth-child(1) { height: 35%; } .px-signal i:nth-child(2) { height: 55%; } .px-signal i:nth-child(3) { height: 78%; } .px-signal i:nth-child(4) { height: 100%; }
.px-battery { position: relative; width: calc(var(--sw) * 0.078); height: calc(var(--sw) * 0.037); border: 1.2px solid rgba(10, 10, 11, 0.45); border-radius: 3.5px; box-sizing: border-box; padding: 1.2px; }
.px-battery::before { content: ''; display: block; width: 78%; height: 100%; border-radius: 1.5px; background: currentColor; }
.px-battery::after { content: ''; position: absolute; right: -3.2px; top: 30%; width: 1.6px; height: 40%; border-radius: 0 1px 1px 0; background: rgba(10, 10, 11, 0.45); }
.px-island { position: absolute; left: 50%; top: calc(var(--sw) * 0.026); z-index: 3; width: calc(var(--sw) * 0.32); height: calc(var(--sw) * 0.092); transform: translateX(-50%); border-radius: 999px; background: #000; }
.px-frames { position: absolute; left: 0; right: 0; top: var(--sbar); bottom: 0; }
.px-frames img {
    position: absolute; left: 0; top: 0; width: 100%; height: auto; display: block;
    transform: translateX(100%); transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1), opacity 460ms ease;
}
.px-frames img.is-shown { transform: none; }
.px-frames img.is-before { transform: translateX(-30%); opacity: 0; }
.px-floor {
    position: absolute; left: 50%; width: calc(var(--pw) * 1.1); height: calc(var(--pw) * 0.12); margin-left: calc(var(--pw) * -0.55);
    top: calc(50% + var(--header-h, 72px) / 2 + var(--px-yoff, 0px) + var(--ph) / 2 + 18px);
    border-radius: 50%; background: radial-gradient(closest-side, rgba(15, 14, 13, 0.14), rgba(15, 14, 13, 0));
    pointer-events: none; will-change: transform, opacity;
}

/* ---------- De uitleg naast de gsm ---------- */
.px-callout {
    position: absolute; top: calc(50% + var(--header-h, 72px) / 2); width: min(360px, 28vw); margin: 0;
    opacity: 0; transform: translateY(calc(-50% + (1 - var(--show, 0)) * 16px)); opacity: var(--show, 0);
    pointer-events: none;
}
.px-callout.is-active { pointer-events: auto; }
.px-callout.is-left { left: max(var(--hx-gutter), calc(50% - 600px)); }
.px-callout.is-right { right: max(var(--hx-gutter), calc(50% - 600px)); }
.px-callout .px-scene-copy p:not(.px-scene-step) { font-size: 16.5px; }
.px-tether { position: absolute; top: 0.95em; width: clamp(40px, 8vw, 120px); height: 1px; background: var(--hx-line-strong); transform: scaleX(var(--show, 0)); }
.px-tether::after { content: ''; position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--hx-muted); }
.px-callout.is-left .px-tether { left: calc(100% + 28px); transform-origin: left; }
.px-callout.is-left .px-tether::after { right: -3px; }
.px-callout.is-right .px-tether { right: calc(100% + 28px); transform-origin: right; }
.px-callout.is-right .px-tether::after { left: -3px; }
.px-callout h3 { font-size: clamp(1.6rem, 1.1rem + 1.3vw, 2.3rem); }

/* Op een gsm: de gsm in het midden, de uitleg als kaartje onderaan. */
@media (max-width: 820px) {
    .px-viewport { --pw: clamp(160px, calc((100svh - var(--header-h, 64px) - 300px) / 2.2), 240px); --px-yoff: -112px; }
    .px-callout, .px-callout.is-left, .px-callout.is-right {
        left: 16px; right: 16px; width: auto; top: auto; bottom: 16px;
        transform: translateY(calc((1 - var(--show, 0)) * 16px));
        padding: 16px 18px; border-radius: 18px; background: rgba(255, 255, 255, 0.96); border: 1px solid var(--hx-line);
    }
    .px-callout h3 { font-size: 1.35rem; margin-bottom: 6px; }
    .px-callout .px-scene-copy p:not(.px-scene-step) { font-size: 15.5px; margin-bottom: 10px; }
    .px-callout .px-scene-step { margin-bottom: 6px; }
    .px-tether { display: none; }
}
