/* Pitch layer structure: layout and behaviour only, no visual identity.
   Load AFTER the brand stylesheet. It reads these tokens; define them in the brand stylesheet (fallbacks shown):
   --pl-bg, --pl-card, --pl-ink, --pl-text, --pl-muted, --pl-line, --pl-accent, --pl-font-display, --pl-font-body,
   --pl-radius, --pl-border (e.g. 2.5px solid navy), --pl-shadow (e.g. 6px 6px 0 navy), --pl-header-h (e.g. 66px). */

/* visibility rules (non-negotiable) */
[hidden] { display: none !important; }
html.js .reveal { transform: translateY(16px); transition: transform .6s cubic-bezier(.2,.7,.2,1); }
html.js .reveal.in { transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { transform: none; transition: none; } }
[tabindex="-1"]:focus { outline: none; }

/* Idea page hero: a scrolling page, never a locked screen. The next section peeks in. */
[data-hero] { position: relative; min-height: calc(88vh - var(--pl-header-h, 66px)); min-height: calc(88svh - var(--pl-header-h, 66px)); }
.scroll-cue { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.scroll-cue::after { content: ""; width: 2px; height: 22px; background: currentColor; border-radius: 2px; animation: pl-cue 1.6s ease-in-out infinite; transform-origin: top; }
@keyframes pl-cue { 0% { transform: scaleY(0); opacity: 0; } 40% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1) translateY(10px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .scroll-cue::after { animation: none; } }

/* header lockup: company logo | candidate photo, no written name */
.pl-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.pl-lockup img { height: 28px; width: auto; display: block; }
.pl-lockup .pl-sep { width: 2px; height: 26px; background: currentColor; opacity: .5; }
.pl-lockup .pl-face { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* mid-page portrait CTA: the whole card is the link */
.meet-cta { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 20px 28px; align-items: center; text-decoration: none; color: inherit; }
.meet-cta__photo { width: clamp(96px, 14vw, 160px); aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
@media (max-width: 640px) { .meet-cta { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; } }

/* chapter nav */
[data-chapnav] { position: sticky; top: var(--pl-header-h, 66px); z-index: 40; background: var(--pl-bg, #fff); }
[data-chapnav] ol, [data-chapnav] ul { display: flex; gap: 6px; list-style: none; margin: 0; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
[data-chapnav] ol::-webkit-scrollbar, [data-chapnav] ul::-webkit-scrollbar { display: none; }
[data-chapnav] a { white-space: nowrap; text-decoration: none; }
html { scroll-padding-top: calc(var(--pl-header-h, 66px) + 64px); }

/* depth drawers */
details.math > summary { cursor: pointer; list-style: none; }
details.math > summary::-webkit-details-marker { display: none; }

/* artifact stage: in place, framed, auto-height */
.stage { margin: 28px 0 0; }
.stage__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.stage__chips [data-step] { cursor: pointer; }
.stage__frame { position: relative; height: 70vh; min-height: 320px; overflow: hidden; border: var(--pl-border, 2px solid currentColor); border-radius: var(--pl-radius, 20px); box-shadow: var(--pl-shadow, none); background: var(--pl-card, #fff); transition: height .3s ease; }
.stage__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; background: var(--pl-card, #fff); opacity: 0; transition: opacity .25s ease; }
.stage.is-live .stage__frame iframe { opacity: 1; }
.stage__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.stage.is-live .stage__poster { visibility: hidden; }
.stage.is-capped .stage__frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; pointer-events: none; background: linear-gradient(transparent, var(--pl-card, #fff)); }
.stage__frame--browser { padding-top: 34px; }
.stage__frame--browser::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 34px; border-bottom: var(--pl-border, 2px solid currentColor); background: radial-gradient(circle at 18px 17px, currentColor 4px, transparent 5px), radial-gradient(circle at 34px 17px, currentColor 4px, transparent 5px), radial-gradient(circle at 50px 17px, currentColor 4px, transparent 5px); opacity: .5; z-index: 2; }
.stage__frame--browser iframe, .stage__frame--browser .stage__poster { top: 34px; height: calc(100% - 34px); }
.stage__frame--phone { width: min(390px, 100%); margin: 0 auto; border-radius: 44px; padding: 14px; }
.stage__frame--phone iframe, .stage__frame--phone .stage__poster { inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); border-radius: 32px; }
.stage figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 12px; font-size: .9rem; }

/* film with cut toggle */
[data-film] video { width: 100%; aspect-ratio: 16 / 9; background: #000; display: block; }
[data-film].is-vertical video { aspect-ratio: 9 / 16; max-height: 80vh; width: auto; margin: 0 auto; }

/* source drawer and popovers */
.sources-drawer { position: fixed; inset: 0; z-index: 95; }
.sd-scrim { position: absolute; inset: 0; background: rgba(0,0,0,.35); opacity: 0; transition: opacity .2s; }
.sd-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(420px, 100%); background: var(--pl-bg, #fff); color: var(--pl-text, inherit); border-left: var(--pl-border, 2px solid currentColor); padding: calc(24px + env(safe-area-inset-top, 0px)) 24px 24px; transform: translateX(100%); transition: transform .22s ease; overflow: auto; }
.sources-drawer.open .sd-scrim { opacity: 1; }
.sources-drawer.open .sd-panel { transform: none; }
.sd-close { position: absolute; right: 16px; top: calc(14px + env(safe-area-inset-top, 0px)); width: 40px; height: 40px; border-radius: 50%; cursor: pointer; }
.sd-link { word-break: break-all; }
.pop-wrap { position: relative; display: inline; }
.pop { position: absolute; z-index: 30; left: 0; top: calc(100% + 10px); width: min(360px, 80vw); display: none; white-space: normal; text-align: left; }
.pop[data-open] { display: block; }
@media (prefers-reduced-motion: reduce) { .sd-panel, .sd-scrim, .stage__frame { transition: none; } }
