/* 4.6.382 — fixed stage; home embed via #home-experience (pitch above, catalog below) */

html:has(body.ss-experience) {

    overflow-x: clip;

    overflow-y: visible;

}

body.ss-experience,

#home-experience,

#savetalk-entry {

    --xp-navy-0: #05080f;

    --xp-ink: #f8fafc;

    --xp-muted: rgba(248, 250, 252, 0.78);

    --xp-accent: #b7cdea;

    --xp-band: #5b7a99;

    --xp-hook: #dc2626;

    --xp-panel: #0b1220;

    --xp-panel-2: #111827;

    --xp-border: rgba(255,255,255,.1);

    --xp-nav-bg: rgba(5,8,15,.94);

}

body.ss-experience {

    margin: 0;

    background: var(--xp-navy-0);

    color: var(--xp-ink);

    /* clip ≠ hidden: does not create a body scrollport that kills position:sticky/fixed story */

    overflow-x: clip !important;

    overflow-y: visible !important;

}

body.ss-experience[data-theme="light"],

body[data-theme="light"] #home-experience,

body[data-theme="light"] #savetalk-entry {

    --xp-navy-0: #e8eef5;

    --xp-ink: #0f172a;

    --xp-muted: rgba(15, 23, 42, 0.72);

    --xp-accent: #1e3a5f;

    --xp-band: #5b7a99;

    --xp-hook: #b91c1c;

    --xp-panel: #ffffff;

    --xp-panel-2: #f8fafc;

    --xp-border: rgba(15,23,42,.12);

    --xp-nav-bg: rgba(248,250,252,.96);

}

/* SaveTalk doorway on the light shelf uses ink colors even when page is light */

#savetalk-entry {

    color: var(--xp-ink);

}

body.ss-experience .main-footer { margin-top: 0; }

#home-experience {

    position: relative;

    color: var(--xp-ink);

    background: var(--xp-navy-0);

}

#home-experience .xp-progress {

    top: 80px; /* below site nav (layout.css nav height) */

}

#experience {

    scroll-margin-top: 88px;

}

.xp-stage.is-pre-story,

.xp-progress.is-quiet,

.xp-chapters.is-quiet {

    opacity: 0 !important;

    pointer-events: none !important;

    visibility: hidden !important;

}

.xp-audience-line {

    margin: 0 auto 22px;

    max-width: 520px;

    font-size: 1.02rem;

    font-weight: 700;

    line-height: 1.45;

    color: var(--xp-ink);

}



.xp-build-badge {

    position: fixed; z-index: 80;

    left: 12px; bottom: 12px;

    background: #fbbf24; color: #111827;

    font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em;

    padding: 8px 12px; border-radius: 8px;

    box-shadow: 0 8px 24px rgba(0,0,0,.45);

    font-family: ui-monospace, Consolas, monospace;

    pointer-events: none;

}



.xp-nav {

    position: fixed; top: 0; left: 0; right: 0; z-index: 40;

    display: flex; align-items: center; justify-content: space-between;

    padding: 12px 4%;

    min-height: 56px;

    background: var(--xp-nav-bg);

    border-bottom: 1px solid var(--xp-border);

    box-sizing: border-box;

}

.xp-nav a { pointer-events: auto; }

.xp-nav-brand { display: flex; align-items: center; text-decoration: none; }

.xp-nav-links { display: flex; align-items: center; gap: 18px; }

.xp-nav-links a {

    color: var(--xp-muted); text-decoration: none;

    font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em;

    text-transform: uppercase;

}

.xp-nav-links a[aria-current="page"] { color: var(--xp-ink); }

.xp-theme-btn {

    background: transparent; border: none; font-size: 1.2rem;

    cursor: pointer; color: inherit; padding: 4px; line-height: 1;

}

.xp-nav-cta {

    background: #dbe7f7; color: #1b3a5f !important;

    border: 1px solid #b7cdea; border-radius: 999px;

    padding: 8px 14px !important; font-size: 0.7rem !important;

}



.xp-progress {

    position: fixed; top: 56px; left: 0; right: 0; height: 2px; z-index: 50;

    background: rgba(255,255,255,.08);

}

.xp-progress i {

    display: block; height: 100%; width: 0%;

    background: linear-gradient(90deg, #b7cdea, #60a5fa, #34d399);

}



.xp-chapters {

    position: fixed; right: 14px; top: 50%; transform: translateY(-50%);

    z-index: 35; display: flex; flex-direction: column; gap: 10px;

}

.xp-chapter {

    width: 8px; height: 8px; border-radius: 50%;

    border: 1px solid rgba(255,255,255,.35);

    background: transparent; padding: 0; cursor: pointer;

}

.xp-chapter.is-on { background: #fff; border-color: #fff; transform: scale(1.35); }

@media (max-width: 700px) { .xp-chapters { display: none; } }



/* Story spacer: stage is fixed (out of flow); track alone creates scroll length */

.xp-story {

    position: relative;

    z-index: 1;

}



.xp-stage {

    position: fixed;

    top: 0; left: 0; right: 0;

    height: 100vh; height: 100dvh;

    z-index: 2;

    display: flex;

    flex-direction: column;

    box-sizing: border-box;

    padding: 72px 4% 48px;

    overflow: hidden;

    background: var(--xp-navy-0);

    transition: opacity .35s ease;

}

body.ss-experience[data-theme="light"] .xp-plates,

body[data-theme="light"] #home-experience .xp-plates {

    border-color: rgba(15,23,42,.12);

    box-shadow: 0 18px 48px rgba(15,23,42,.12);

}

/* Only when finale enters — never mid-story (that was the black void with dots still moving) */

.xp-stage.is-finale-cover {

    opacity: 0;

    pointer-events: none;

    visibility: hidden;

}



/*

 * PHOTO FIELD (story plates) — locked 16:9; size from photo proportion.

 * 4.6.387: NO vh/dvh/vw in width — Ctrl+/- zoom-out grows the layout viewport, so

 * dvh-based caps made the 3D photo LARGER while px text shrank (inverted zoom).

 * Cap in px like the home carousel (920). Stage may letterbox; zoom must match page.

 */

.xp-plates {

    position: relative;

    width: min(100%, 920px);

    max-width: 920px;

    margin: 0 auto;

    aspect-ratio: 16 / 9;

    height: auto !important;

    max-height: none !important;

    flex: 0 0 auto;

    border-radius: 16px;

    overflow: hidden;

    border: 1px solid rgba(183,205,247,.16);

    box-shadow: 0 24px 64px rgba(0,0,0,.45);

    background: #070b14;

    --scope-x: 50%;

    --scope-y: 58%;

}



/* Scrub chip removed from photo — scene names live only in .xp-title below. */

.xp-device-scrub {

    display: none !important;

}

@media (max-width: 900px) {

    .xp-plates {

        width: min(100%, 920px);

        max-width: 920px;

    }

}



/* Voice sits ON the photo — never under the nav */

.xp-sound {

    position: absolute;

    top: 14px; right: 14px;

    z-index: 6;

    pointer-events: auto;

    background: #fbbf24; color: #111827;

    border: 1px solid #f59e0b; border-radius: 999px;

    padding: 9px 14px;

    font-size: 0.7rem; font-weight: 900; letter-spacing: 0.06em;

    text-transform: uppercase; cursor: pointer; font-family: inherit;

    box-shadow: 0 8px 24px rgba(251,191,36,.35);

}

.xp-sound[aria-pressed="true"] {

    background: #dbe7f7; border-color: #b7cdea; box-shadow: none;

}

@media (max-width: 900px) {

    .xp-sound { top: 10px; right: 10px; padding: 8px 12px; font-size: 0.64rem; }

}



.xp-plate {

    position: absolute; inset: 0;

    margin: 0; opacity: 0;

    transition: opacity 0.65s ease;

    pointer-events: none;

}

.xp-plate.is-on {

    opacity: 1;

    pointer-events: auto;

    cursor: pointer;

}

.xp-plate.is-on:focus-visible {

    outline: 2px solid #6ee7b7;

    outline-offset: -4px;

}

.xp-plate img {

    width: 100%;

    height: 100%;

    object-fit: contain; /* full 16:9 hub — no top/bottom crop */

    object-position: center center;

    display: block;

    pointer-events: none;

    background: #070b14;

}



.xp-plate-shade {

    position: absolute; inset: 0; pointer-events: none;

    background: linear-gradient(180deg, transparent 55%, rgba(5,8,15,.35) 100%);

}



/* Equalizer bars — pinned to device (phone/tablet) via --scope-x / --scope-y */

.xp-scope {

    position: absolute;

    left: var(--scope-x, 50%);

    top: var(--scope-y, 58%);

    transform: translate(-50%, -50%);

    z-index: 5;

    width: min(18%, 112px);

    pointer-events: none;

    opacity: 0;

    transition: opacity .2s ease, left .35s ease, top .35s ease;

    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.75));

}

.xp-stage.is-scope-live .xp-scope { opacity: 1; }

.xp-stage.is-finale-cover .xp-scope { opacity: 0 !important; }

.xp-scope-canvas {

    display: block;

    width: 100%;

    height: auto;

    background: rgba(15, 23, 42, 0.35);

    border: 1px solid rgba(255, 255, 255, 0.22);

    border-radius: 6px;

    box-shadow: none;

    padding: 3px 4px;

    box-sizing: border-box;

}

@media (max-width: 900px) {

    .xp-scope { width: min(28%, 96px); }

}



.xp-setup-band {

    position: absolute; left: 0; right: 0; bottom: 0;

    height: 8px;

    background: var(--xp-band, #5b7a99);

    opacity: 0;

    transition: opacity .35s, background .4s;

}

.xp-stage.is-adapt .xp-setup-band,

.xp-stage.is-speech .xp-setup-band { opacity: 1; }



/* 4.6.396 — setup pills (Dyad…Solo) removed: scroll-spy only, no action = distraction.

   Real setup filters stay in #xp-setup-doors above Experience. */

.xp-setup-rail,

.xp-stage.is-adapt .xp-setup-rail,

.xp-pill {

    display: none !important;

}



/* TEXT FIELD — separate from photo; never overlaps .xp-plates */

.xp-bottom {

    display: grid;

    grid-template-columns: minmax(0, 1.25fr) minmax(240px, 0.85fr);

    gap: 16px 28px;

    align-items: start;

    max-width: min(920px, 100%);

    width: 100%;

    margin: 16px auto 0;

    flex: 0 0 auto; /* 4.6.387: do not stretch into empty stage band on zoom */

    min-height: 0;

    overflow: visible;

    position: relative;

    z-index: 2;

}

@media (max-width: 900px) {

    .xp-bottom { grid-template-columns: 1fr; gap: 12px; margin-top: 12px; }

}



.xp-stage-copy {

    text-align: left;

    transition: opacity .3s ease;

    padding-right: 8px;

}

.xp-stage-copy.is-swap { opacity: 0; }

.xp-kicker {

    margin: 0 0 8px;

    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.2em;

    text-transform: uppercase; color: var(--xp-accent);

}

.xp-title {

    margin: 0 0 10px;

    font-size: clamp(1.55rem, 3.4vw, 2.45rem);

    font-weight: 900; letter-spacing: -0.02em; line-height: 1.12;

    color: var(--xp-ink);

}

.xp-body {

    margin: 0;

    max-width: 36rem;

    font-size: clamp(0.92rem, 1.5vw, 1.05rem);

    line-height: 1.6; color: var(--xp-muted); font-weight: 500;

}



.xp-caption {

    display: block;

    width: 100%;

    box-sizing: border-box;

    padding: 14px 16px;

    border-radius: 12px;

    background: var(--xp-panel);

    border: 1px solid rgba(183,205,247,.35);

    text-align: left;

    color: inherit; font: inherit;

    cursor: pointer;

    opacity: 0;

    pointer-events: none;

    transition: opacity .35s;

}

body.ss-experience[data-theme="light"] .xp-caption,

body[data-theme="light"] #home-experience .xp-caption {

    border-color: rgba(30,58,95,.2);

}

body.ss-experience[data-theme="light"] .xp-cap-line,

body[data-theme="light"] #home-experience .xp-cap-line { color: #0f172a; }

body.ss-experience[data-theme="light"] .xp-cap-dst,

body[data-theme="light"] #home-experience .xp-cap-dst { color: #065f46; }

.xp-caption:not([hidden]) {

    opacity: 1;

    pointer-events: auto;

}

.xp-cap-hint {

    display: block; margin: 0 0 8px;

    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.1em;

    text-transform: uppercase; color: #fbbf24;

}

body.xp-voice-on .xp-cap-hint { color: #6ee7b7; }

.xp-cap-lang {

    display: block; margin: 0 0 2px;

    font-size: 0.58rem; font-weight: 800; letter-spacing: 0.14em;

    text-transform: uppercase; color: #93c5fd;

}

.xp-cap-lang-dst { margin-top: 8px; color: #6ee7b7; }

.xp-cap-line {

    display: block; margin: 0;

    font-size: 0.86rem; line-height: 1.45; font-weight: 600; color: #f1f5f9;

}

.xp-cap-dst { color: #d1fae5; font-weight: 500; }



.xp-scroll-hint {

    margin: 10px auto 0;

    text-align: center;

    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.18em;

    text-transform: uppercase; color: rgba(255,255,255,.45);

}

.xp-scroll-hint span {

    display: inline-block; width: 1px; height: 14px; margin-right: 8px;

    vertical-align: middle; background: rgba(255,255,255,.4);

}

.xp-stage.is-end .xp-scroll-hint { opacity: 0; }



.xp-track { position: relative; margin-top: 0; z-index: 0; }

/* One scene per viewport — fixed stage stays put while beats scroll underneath */

.xp-beat { height: 100vh; height: 100dvh; pointer-events: none; }



/* Finale rides ABOVE the fixed stage */

.xp-finale {

    position: relative;

    z-index: 3;

    padding: 72px 5% 96px;

    background: var(--xp-panel-2);

    text-align: center;

    border-top: 1px solid var(--xp-border);

    box-shadow: 0 -40px 80px rgba(5,8,15,.35);

}

.xp-finale-kicker {

    margin: 0 0 10px;

    font-size: 0.7rem; font-weight: 800; letter-spacing: 0.2em;

    text-transform: uppercase; color: var(--xp-muted);

}

.xp-finale h2 {

    margin: 0 0 12px;

    font-size: clamp(1.7rem, 3.2vw, 2.4rem); font-weight: 900; color: var(--xp-ink);

}

.xp-finale-lead {

    margin: 0 auto 28px; max-width: 520px;

    color: var(--xp-muted); line-height: 1.65; font-size: 1rem;

}

.xp-finale-actions {

    display: flex; flex-wrap: wrap; gap: 12px; justify-content: center;

    margin: 28px 0 40px;

}

.xp-btn-primary, .xp-btn-ghost {

    display: inline-block; text-decoration: none;

    padding: 14px 22px; border-radius: 999px;

    font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em;

    text-transform: uppercase;

}

.xp-btn-primary { background: #dbe7f7; color: #1b3a5f; border: 1px solid #b7cdea; }

.xp-btn-ghost {

    background: transparent; color: var(--xp-ink);

    border: 1px solid var(--xp-border);

}



/*

 * ZeroMesh — TWO SEPARATE fields (never one stacked strip):

 *   PHOTO (.xp-hook-media > .xp-hook-frame) = left, locked 16:9

 *   TEXT  (.xp-hook-body)                   = right, own height

 * Hub art is 960×540 (16:9). Do NOT put height:220px on the photo.

 */

.xp-hook {

    display: grid !important;

    grid-template-columns: minmax(280px, 1.2fr) minmax(240px, 1fr);

    grid-template-rows: auto auto;

    grid-template-areas:

        "photo text"

        "bar   bar";

    align-items: stretch;

    max-width: 960px;

    width: 100%;

    margin: 0 auto 22px;

    text-align: left;

    text-decoration: none;

    color: inherit;

    border-radius: 18px;

    overflow: visible;

    border: 1px solid rgba(220,38,38,.4);

    background: var(--xp-panel);

    box-shadow: 0 24px 64px rgba(220,38,38,.14);

    height: auto !important;

    max-height: none !important;

    box-sizing: border-box;

    flex-direction: unset !important; /* kill stale CDN flex column */

}

.xp-hook:hover {

    box-shadow: 0 28px 72px rgba(220,38,38,.22);

}



/* PHOTO FIELD — left column only (not the text) */

.xp-hook-media {

    grid-area: photo;

    display: block;

    width: 100%;

    height: auto !important;

    max-height: none !important;

    min-width: 0;

    min-height: 0;

    background: #070b14;

    border-radius: 17px 0 0 0;

    overflow: visible;

    flex: unset !important;

    position: relative;

}

/* 16:9 window — proportion of the photo, independent of text height */

.xp-hook-frame {

    position: relative;

    display: block;

    width: 100%;

    aspect-ratio: 16 / 9;

    height: auto !important;

    max-height: none !important;

    overflow: hidden;

    background: #0b1220;

    border-radius: 17px 0 0 0;

}

.xp-hook-frame img,

.xp-hook-media > img {

    position: absolute;

    inset: 0;

    width: 100%;

    height: 100%;

    object-fit: contain; /* full 16:9 art — no top/bottom crop */

    object-position: center center;

    display: block;

}



/* TEXT FIELD — right column only (not the photo) */

.xp-hook-body {

    grid-area: text;

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    justify-content: center;

    gap: 10px;

    padding: 22px 26px 20px;

    min-width: 0;

    width: auto;

    box-sizing: border-box;

    overflow: visible !important;

    height: auto !important;

    max-height: none !important;

}

.xp-hook-bar {

    grid-area: bar;

    height: 10px;

    width: 100%;

    background: var(--xp-hook);

    border-radius: 0 0 17px 17px;

}

.xp-hook-badge {

    align-self: flex-start;

    font-size: 0.62rem; font-weight: 900; letter-spacing: 0.12em;

    text-transform: uppercase;

    color: #450a0a;

    background: #fca5a5;

    padding: 5px 10px; border-radius: 999px;

}

.xp-hook-title {

    font-size: clamp(1.45rem, 2.8vw, 1.95rem);

    font-weight: 900; letter-spacing: -0.02em; color: var(--xp-ink);

    overflow-wrap: anywhere;

    word-break: break-word;

    max-width: 100%;

}

.xp-hook-name {

    font-size: 0.82rem; font-weight: 700; color: #f87171;

    overflow-wrap: anywhere;

    max-width: 100%;

}

.xp-hook-pitch {

    display: block;

    font-size: 0.95rem;

    line-height: 1.65;

    color: var(--xp-muted);

    width: 100%;

    max-width: 100%;

    white-space: normal !important;

    overflow: visible !important;

    overflow-wrap: anywhere;

    word-break: break-word;

}

.xp-hook-cta {

    display: inline-block;

    margin: 4px 0 0;

    font-size: 0.78rem; font-weight: 900; letter-spacing: 0.08em;

    text-transform: uppercase; color: #f87171;

    overflow-wrap: anywhere;

    line-height: 1.4;

}

@media (max-width: 720px) {

    .xp-hook {

        grid-template-columns: 1fr;

        grid-template-areas:

            "photo"

            "text"

            "bar";

    }

    .xp-hook-media,

    .xp-hook-frame {

        border-radius: 17px 17px 0 0;

    }

    .xp-hook-body {

        padding: 18px 18px 16px;

    }

}



/* Catalog doorway — quiet second beat under ZeroMesh (not a competing “floor”) */

.xp-banner {

    display: flex;

    flex-direction: row;

    align-items: stretch;

    gap: 0;

    max-width: 920px;

    width: 100%;

    margin: 0 auto;

    text-decoration: none;

    color: inherit;

    border-radius: 14px;

    overflow: visible;

    border: 1px solid var(--xp-border);

    background: var(--xp-panel);

    height: auto !important;

    max-height: none !important;

}

.xp-banner:hover { border-color: rgba(183,205,247,.45); }

.xp-banner-img {

    flex: 0 0 140px;

    width: 140px;

    min-height: 112px;

    object-fit: cover; object-position: center 35%;

    display: block;

    border-radius: 13px 0 0 13px;

    align-self: stretch;

}

.xp-banner-copy {

    flex: 1 1 auto;

    display: flex; flex-direction: column; justify-content: center;

    gap: 6px; padding: 18px 20px; text-align: left; min-width: 0;

    max-width: 100%;

    overflow: visible !important;

    height: auto !important;

}

.xp-banner-kicker {

    font-size: 0.6rem; font-weight: 800; letter-spacing: 0.16em;

    text-transform: uppercase; color: var(--xp-accent);

}

.xp-banner-title {

    font-size: 1rem; font-weight: 800; color: var(--xp-ink); line-height: 1.4;

    overflow-wrap: anywhere; word-break: break-word;

    white-space: normal;

}

.xp-banner-cta {

    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em;

    text-transform: uppercase; color: var(--xp-accent); margin-top: 2px;

    line-height: 1.4;

}

@media (max-width: 560px) {

    .xp-banner-img { flex-basis: 96px; width: 96px; }

}



.xp-setup-doors {

    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 12px; max-width: 1000px; margin: 0 auto;

}

@media (max-width: 800px) {

    .xp-setup-doors { grid-template-columns: repeat(2, minmax(0, 1fr)); }

}

.xp-door {

    display: block; text-decoration: none; text-align: left;

    padding: 16px 14px 12px; border-radius: 14px;

    background: var(--xp-panel);

    border: 1px solid var(--xp-border);

    border-bottom: 9px solid var(--door-accent, #5b7a99);

    color: var(--xp-ink);

    overflow: visible;

    min-width: 0;

}

.xp-door:hover { box-shadow: 0 10px 28px rgba(0,0,0,.25); }

.xp-door strong {

    display: block; font-size: 0.88rem; font-weight: 800; margin-bottom: 4px;

    overflow-wrap: anywhere; word-break: break-word;

}

.xp-door span {

    display: block; font-size: 0.72rem; color: var(--xp-muted); line-height: 1.4;

    overflow-wrap: anywhere; word-break: break-word;

    white-space: normal;

}



@media (prefers-reduced-motion: reduce) {

    .xp-stage { position: relative; height: auto; min-height: 100vh; left: auto; right: auto; }

    .xp-track { display: none; }

    .xp-scroll-hint, .xp-progress, .xp-chapters { display: none; }

    .xp-stage.is-finale-cover { opacity: 1; pointer-events: auto; visibility: visible; }

}
