/* Experience chapter (Concept B): human experience becomes reputation. Driven by --p (0..1) from xp.js; transforms, opacity and one clip-path only. */
/* Experience concepts: shared chapter shell. Everything is driven by --p (0..1) from xp.js; transforms and opacity only (B also animates one clip-path). */
.xp { --run: 150svh; --p: 0; --ph: min(84svh, 52rem); --pw: calc(var(--ph) * 0.4603); --cx: 66%;
  position: relative; height: calc(100svh + var(--run)); background: var(--ink-950); color: #f8f3fb; }
.xp-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; perspective: 1600px; contain: paint; }
.xp-glow { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(52% 58% at var(--cx) 52%, #8e7cff30, transparent 70%), radial-gradient(40% 46% at 10% 96%, #ff8fb11f, transparent 72%); }
#experience.xp { scroll-margin-top: calc(-1 * (var(--header-height) + 1rem)); } /* land exactly on the pinned chapter, not above it */
.xp-anchor { position: absolute; left: 0; top: 62%; width: 1px; height: 1px; pointer-events: none; }
.xp-note { position: absolute; z-index: 5; margin: 0; left: var(--page-gutter); bottom: max(1.1rem, 2.4svh); font-size: 0.6875rem; letter-spacing: 0.02em; color: #c4bcd0; text-shadow: 0 1px 10px #07070bd9; }
.xp-g { background: var(--gradient-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.xp-h, .xp-type { margin: 0; font-family: var(--font-display); font-weight: 330; letter-spacing: -0.058em; line-height: 0.98; text-shadow: 0 2px 28px #07070bcc; }
.xp-l { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.xp-l > i { display: block; font-style: normal; }
.xp-line { margin: 0; max-width: 25rem; font-size: clamp(1.05rem, 1.25vw, 1.3rem); line-height: 1.5; color: #e4dded; text-shadow: 0 1px 16px #07070bd9; }
.xp-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }
.xp-cta .register-control { background: #fbf8fd; color: #07070b; border-color: transparent; }
.xp-cta small { font-size: 0.8125rem; color: #d3cadf; }
@media (max-width: 56rem) { .xp { --ph: min(52svh, 30rem); --cx: 50%; } }

/* ============ B · Human experience → reputation ============ */
.xp-b { --run: 150svh;
  --t0: 1;     --e0: calc(var(--t0) * var(--t0) * (3 - 2 * var(--t0)));   /* photograph arrives */
  --t1: clamp(0, (var(--p) - 0.08) / 0.34, 1);  --e1: calc(var(--t1) * var(--t1) * (3 - 2 * var(--t1)));   /* the moment becomes a phone */
  --t2: clamp(0, (var(--p) - 0.08) / 0.2, 1);   --e2: calc(var(--t2) * var(--t2) * (3 - 2 * var(--t2)));   /* headline 1 leaves */
  --t3: clamp(0, (var(--p) - 0.42) / 0.14, 1);  --e3: calc(var(--t3) * var(--t3) * (3 - 2 * var(--t3)));   /* photo -> real review screen */
  --t4: clamp(0, (var(--p) - 0.40) / 0.2, 1);  --e4: calc(var(--t4) * var(--t4) * (3 - 2 * var(--t4)));   /* headline 2 arrives */
  --t5: clamp(0, (var(--p) - 0.60) / 0.2, 1);   --e5: calc(var(--t5) * var(--t5) * (3 - 2 * var(--t5)));   /* reviews slide in */
  --t6: clamp(0, (var(--p) - 0.78) / 0.15, 1);  --e6: calc(var(--t6) * var(--t6) * (3 - 2 * var(--t6)));   /* call to action */ }
.xp-b .xp-win { position: absolute; inset: 0; z-index: 0; opacity: var(--e0);
  clip-path: inset(calc(var(--e1) * (50% - var(--ph) / 2 + 1svh)) calc(var(--e1) * (100% - var(--cx) - var(--pw) / 2)) calc(var(--e1) * (50% - var(--ph) / 2 - 1svh)) calc(var(--e1) * (var(--cx) - var(--pw) / 2)) round calc(var(--e1) * var(--pw) * 0.15)); }
.xp-b .xp-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 62% center; transform-origin: 57% 62%;
  transform: translate3d(calc(var(--e1) * (var(--cx) - 62%) * 0.0), 0, 0) scale(calc(1.04 + (1 - var(--e0)) * 0.06 + var(--e1) * 0.5)); filter: contrast(1.05) saturate(1.08) brightness(1.02); will-change: transform; }
.xp-b .xp-shade { position: absolute; inset: 0; background: linear-gradient(90deg, #07070bb3 0%, #07070b66 36%, transparent 70%), linear-gradient(180deg, #07070b55 0%, transparent 24%, transparent 62%, #07070bcc 100%); opacity: calc(1 - var(--e1)); }
.xp-b .xp-phonebox { position: absolute; left: calc(var(--cx) - var(--pw) / 2); top: calc(50% - var(--ph) / 2 + 1svh); width: var(--pw); height: var(--ph); }
.xp-b .xp-phonebox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.xp-b .xp-s1 { opacity: var(--e3); }
.xp-b .xp-s2 { opacity: clamp(0, (var(--e5) - 0.28) * 2.6, 1); translate: 0 calc((1 - var(--e5)) * 4%); }
.xp-b .xp-bezel { --dw: var(--pw); position: absolute; z-index: 2; left: calc(var(--cx) - var(--pw) / 2); top: calc(50% - var(--ph) / 2 + 1svh); width: var(--pw); height: var(--ph); border-radius: calc(var(--pw) * 0.15); pointer-events: none;
  box-shadow: 0 0 0 calc(var(--dw) * 0.022) #17151f, 0 0 0 calc(var(--dw) * 0.026) #3a3748, 0 calc(var(--dw) * 0.1) calc(var(--dw) * 0.28) #000000a6, 0 0 calc(var(--dw) * 0.5) #8e7cff40; opacity: clamp(0, (var(--e1) - 0.82) * 5.5, 1); }
.xp-b .xp-bezel::after { content: ""; position: absolute; top: 1.6%; left: 50%; width: 27%; height: 2.6%; translate: -50% 0; border-radius: 99px; background: #000; opacity: var(--e3); }
.xp-b .xp-copy { position: absolute; z-index: 3; left: var(--page-gutter); top: 0; bottom: 0; width: min(40rem, 42vw); display: grid; padding-top: 4rem; }
.xp-b .xp-copy > * { grid-area: 1 / 1; }
.xp-b .xp-h { font-size: clamp(2.9rem, 5.3vw, 5.7rem); }
.xp-b .xp-h1 { align-self: end; margin-bottom: 11svh; opacity: calc(var(--e0) - var(--e2)); translate: 0 calc(var(--e2) * -6svh); }
.xp-b .xp-pair { align-self: center; display: grid; gap: 1.6rem; opacity: var(--e4); }
.xp-b .xp-h2 .xp-l > i { translate: 0 calc((1 - clamp(0, var(--e4) * 1.9 - var(--k) * 0.35, 1)) * 105%); }
.xp-b .xp-pair .xp-line { opacity: var(--e5); translate: 0 calc((1 - var(--e5)) * 1.2rem); }
.xp-b .xp-pair .xp-cta { opacity: var(--e6); translate: 0 calc((1 - var(--e6)) * 1rem); }
@media (max-width: 56rem) {
  .xp-b { --run: 125svh; }
  .xp-b .xp-phonebox, .xp-b .xp-bezel { top: calc(5.2rem + 1svh); }
  .xp-b .xp-win { clip-path: inset(calc(var(--e1) * (5.2rem + 1svh)) calc(var(--e1) * (50% - var(--pw) / 2)) calc(var(--e1) * (100% - 5.2rem - 1svh - var(--ph))) calc(var(--e1) * (50% - var(--pw) / 2)) round calc(var(--e1) * var(--pw) * 0.15)); }
  .xp-b .xp-copy { left: 0; right: 0; width: auto; top: auto; bottom: 0; height: 40svh; padding: 0 var(--page-gutter) 3.2rem; align-content: end; }
  .xp-b .xp-h { font-size: clamp(2.4rem, 11vw, 3.6rem); }
  .xp-b .xp-h1 { margin-bottom: 0; align-self: end; }
  .xp-b .xp-pair { align-self: end; gap: 0.9rem; } .xp-b .xp-line { font-size: 0.98rem; max-width: 22rem; }
  .xp-b .xp-cta { margin-top: 0.6rem; } .xp-b .xp-note { bottom: 1rem; }
}

/* ============ Continuity with the Living Hero ============
   In the live hero the pinned canvas stays behind the chapter: no second photograph. The stage is transparent; a dark frame (box-shadow around a phone-shaped hole)
   shrinks from beyond the viewport to the phone, so the hero's last frame becomes the phone window, then the real screens fade in over it. Transform only. */
.xp-hole { display: none; }
/* Fallback when lh.css / lh.js are not the matching release: no hold, the hero leaves normally, the chapter uses its own photograph. */
:root.xp-solo { --lh-hold: 0px; }
/* Without the pinned hero (reduced data / no canvas) the chapter uses its own photograph, present from the first frame; a soft top edge lets it meet the still hero without a seam. The file is only requested in this mode (xp.js). */
@media (prefers-reduced-motion: no-preference) { :root.lh-off .xp-photo, :root.xp-solo .xp-photo { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 22%); mask-image: linear-gradient(180deg, transparent 0, #000 22%); } }
@media (prefers-reduced-motion: no-preference) {
  :root:not(.lh-off):not(.xp-solo) .reputation-journey { display: flow-root; }
  :root:not(.lh-off):not(.xp-solo) #experience.xp { margin-top: calc(-1 * var(--lh-hold)); background: transparent; }
  :root:not(.lh-off):not(.xp-solo) .xp-photo, :root:not(.lh-off):not(.xp-solo) .xp-shade { display: none; }
  :root:not(.lh-off):not(.xp-solo) .xp-hole { display: block; position: absolute; z-index: 1; pointer-events: none; left: calc(var(--cx) - var(--pw) / 2); top: calc(50% - var(--ph) / 2 + 1svh); width: var(--pw); height: var(--ph);
    border-radius: calc(var(--pw) * 0.15); box-shadow: 0 0 0 100vmax var(--ink-950); transform-origin: 50% 50%; transform: scale(calc(1 + (var(--k0, 8) - 1) * (1 - var(--e1)))); }
  /* a soft local scrim for the first headline only; it fades with the headline and has no top edge */
  :root:not(.lh-off):not(.xp-solo) .xp-glow::after { content: ""; position: absolute; inset: 0; opacity: calc(1 - var(--e2)); background: radial-gradient(ellipse 60% 52% at 16% 100%, #040409c4 0%, #04040980 46%, transparent 76%); }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 56rem) {
  :root:not(.lh-off):not(.xp-solo) .xp-hole { top: calc(5.2rem + 1svh); }
}

/* ============ reduced motion: the finished composition, stacked and still ============ */
@media (prefers-reduced-motion: reduce) {
  .xp { height: auto; }
  .xp-stage { position: relative; height: 100svh; min-height: 40rem; }
  .xp-b .xp-h1 { display: none; }
}
