/* Experiences (see js/experience/stage.js): ONE continuous screen. The experience's own animation is a fixed, edge-to-edge layer behind the Studio chrome and stays mounted for as long
   as the person is on that experience. Its name, taglines and description (.xp-hero) are laid directly on the animation, and the real working screen sits on top in glass surfaces.
   No intro, no ENTER step, no card or panel holding the artwork. Always dark and cinematic (the artwork is light-on-black by design), in light mode as well. */
.xp-stage { position: fixed; inset: 0; z-index: 0; background: #000; overflow: hidden; pointer-events: none; opacity: 0; transition: opacity .6s ease; }
.xp-stage.xp-in { opacity: 1; }
.xp-stage.xp-out { opacity: 0; transition: opacity .3s ease; }
.xp-bg { position: absolute; inset: 0; background: #000; }
.xp-canvas, .xp-media { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.xp-media { object-fit: cover; object-position: center; }
.xp-overlay { pointer-events: none; }
@keyframes xp-drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.09) translate3d(-1.2%, -0.8%, 0); } }
.xp-drift { animation: xp-drift 26s ease-in-out infinite alternate; will-change: transform; }
.xp-still, .xp-reduced .xp-drift { animation: none; }

/* Legibility without a panel: a soft dark pool where the hero copy sits, and a steady falloff toward the lower part of the screen where the working interface scrolls over the artwork. */
.xp-scrim { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 80% 40% at 50% 24%, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .28) 55%, rgba(0, 0, 0, 0) 85%), linear-gradient(to bottom, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, .26) 38%, rgba(0, 0, 0, .52) 100%); }
.xp-stage[data-bg="video"] .xp-scrim, .xp-stage[data-bg="image"] .xp-scrim { background: radial-gradient(ellipse 84% 44% at 50% 24%, rgba(0, 0, 0, .74) 0%, rgba(0, 0, 0, .46) 55%, rgba(0, 0, 0, .1) 86%), linear-gradient(to bottom, rgba(0, 0, 0, .18) 0%, rgba(0, 0, 0, .40) 40%, rgba(0, 0, 0, .70) 100%); }

/* Engineering Genome plays the owner's footage itself, so its scrim is the lightest of all: a small soft pool behind the heading for legibility and a gentle falloff under the working interface. The footage is not tinted, filtered or dimmed beyond that. */
.xp-stage[data-xp="genome"] .xp-scrim { background: radial-gradient(ellipse 70% 30% at 50% 24%, rgba(0, 0, 0, .34) 0%, rgba(0, 0, 0, .16) 60%, rgba(0, 0, 0, 0) 90%), linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, .10) 40%, rgba(0, 0, 0, .34) 100%); }

/* the stage replaces the ambient wash while an experience is open; the Studio chrome and the screen sit above it */
html.xp-on body::before { display: none !important; }
html.xp-on .app-shell { position: relative; z-index: 1; }

/* the hero: name, taglines and description directly over the animation */
main.xp-main .xp-hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: clamp(8px, 1.4vh, 14px); box-sizing: border-box; min-height: min(40vh, 340px);
  padding: clamp(68px, 10vh, 100px) 0 clamp(18px, 3vh, 32px); text-shadow: 0 1px 28px rgba(0, 0, 0, .8), 0 0 2px rgba(0, 0, 0, .6); color: #f4f3ee; }
main.xp-main .xp-hero > * { margin: 0; max-width: min(46rem, 100%); }
.xp-hero .xp-num { font-size: .78rem; letter-spacing: .4em; text-indent: .4em; color: rgba(244, 243, 238, .66); }
.xp-hero .xp-cat { font-size: .78rem; letter-spacing: .32em; text-transform: uppercase; color: rgba(244, 243, 238, .78); }
.xp-hero .xp-name { font-family: var(--font-brand, 'Newsreader', serif); font-weight: 400 !important; font-size: clamp(1.7rem, 6.2vw, 3.4rem) !important; line-height: 1.12; letter-spacing: .2em; text-indent: .2em; text-transform: uppercase; color: #fbfaf6; text-wrap: balance; }
.xp-hero .xp-primary { font-family: var(--font-chat, 'Newsreader', serif); font-size: clamp(1.1rem, 3.3vw, 1.7rem); line-height: 1.35; color: #f4f3ee; text-wrap: balance; }
.xp-hero .xp-secondary { font-family: var(--font-chat, 'Newsreader', serif); font-style: italic; font-size: clamp(.98rem, 2.6vw, 1.3rem); line-height: 1.4; color: rgba(244, 243, 238, .88); text-wrap: balance; }
.xp-hero .xp-support { font-size: .88rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(244, 243, 238, .8); }
.xp-hero .xp-desc { font-size: clamp(.92rem, 2.2vw, 1.04rem); line-height: 1.6; color: rgba(244, 243, 238, .82); max-width: min(36rem, 100%); margin-top: 4px; text-wrap: pretty; }
@media (max-height: 560px) { main.xp-main .xp-hero { min-height: 0; padding-top: 64px; } .xp-hero .xp-desc, .xp-hero .xp-num { display: none; } }

/* the screen's own title block is not drawn a second time (the hero carries the visible name, as the h1); it stays for assistive tech and any actions in that row stay */
main.xp-main :is(.page-header-row > h2, h2.sh-title, .page-header-subtitle, .sh-sub) { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }   /* still in the page for assistive tech (an h2 under the hero's h1); not drawn twice */

/* the working interface: glass over the artwork (more transparent than on ordinary screens so the animation stays visible, still legible), and readable loose text */
html.xp-on main.xp-main { --gm-tint: rgba(var(--sv-card-rgb), .56); --gm-tint-strong: rgba(var(--sv-card-rgb), .80); --gm-blur: blur(20px) saturate(170%); }
html.xp-on main.xp-main :is(.section > h3, .section > h2, .hint, .cl-chips, .sh-hint) { text-shadow: 0 1px 14px rgba(0, 0, 0, .85); }

@media (prefers-reduced-motion: reduce) { .xp-stage, .xp-stage.xp-out { transition: none; } .xp-drift { animation: none; } }
