/* ============================================
   PITCH DECK OVERLAY
   Investor pitch that plays before the map.
   Self-contained; does NOT touch map styling.
   ============================================ */

/* Kill any white flash: page background matches the slides' exact bg.
   Loaded after styles.css so this wins for the body background. */
html,
body {
    background-color: #0B1121;
}

/* Locks page scroll while the deck is visible (toggled by js/pitch-deck.js).
   Removes the stray scrollbar and the rubber-band edge that exposed a thin
   light line at the bottom on iPad Safari. */
html.pd-scroll-lock,
body.pd-scroll-lock {
    overflow: hidden;
    overscroll-behavior: none;
}

/* Full-screen gate that sits on top of the (already-mounted) app.
   Sized to the dynamic viewport (100dvh) so it reaches the true bottom edge
   on iPad Safari, where a fixed 100vh box leaves an uncovered sliver under
   the dynamic toolbar. 100vh is the fallback for older browsers. */
.pitch-deck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    z-index: 100000;
    background-color: #0B1121;
    opacity: 1;
    transition: opacity 500ms ease;
    /* Letterbox bars around contain-fit images are this exact color too. */
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* Crossfade-out state used when revealing the map (the finale). */
.pitch-deck.pd-hiding {
    opacity: 0;
}

/* Fully removed from layout / interaction once the reveal finishes. */
.pitch-deck.pd-gone {
    display: none;
}

/* Stage holds the stacked slide images. */
.pd-stage {
    position: absolute;
    inset: 0;
}

/* Every slide is stacked; only the active one is visible. Crossfade. */
.pd-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;        /* never crop the slide */
    background-color: #0B1121;  /* seamless letterbox fill */
    opacity: 0;
    transition: opacity 350ms ease;
    pointer-events: none;
}

.pd-slide.pd-active {
    opacity: 1;
}

/* Invisible tap zones: left half = back, right half = forward.
   They sit beneath the visible chrome so a tap on a button/skip
   never double-triggers a tap zone (only the topmost element gets the click). */
.pd-tapzone {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 1;
    background: transparent;
    cursor: pointer;
}

.pd-tap-left {
    left: 0;
}

.pd-tap-right {
    right: 0;
}

/* Bottom-right nav cluster — mirrors the map's bottom-right control area. */
.pd-nav {
    position: absolute;
    bottom: 24px;
    right: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Subtle, low-contrast slide counter near the arrows. */
.pd-counter {
    font-family: var(--font-family, 'Montserrat', sans-serif);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.35);
    font-variant-numeric: tabular-nums;
    user-select: none;
}

/* Chevron buttons — real buttons, keyboard-focusable, with aria-labels. */
.pd-arrow {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease;
    /* Optical centering for the chevron glyphs. */
    padding-bottom: 3px;
}

.pd-arrow:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.35);
}

.pd-arrow:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Hidden/disabled on slide 1 (nothing to go back to). */
.pd-arrow.pd-disabled {
    opacity: 0;
    pointer-events: none;
}

/* Subtle, low-contrast "Skip" link to jump straight to the map. */
.pd-skip {
    position: absolute;
    top: 22px;
    right: 26px;
    z-index: 10;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.30);
    font-family: var(--font-family, 'Montserrat', sans-serif);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 150ms ease;
}

.pd-skip:hover {
    color: rgba(255, 255, 255, 0.7);
}

.pd-skip:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 3px;
    border-radius: 3px;
}

/* iPad / smaller landscape: nudge chrome in a touch. */
@media (max-width: 900px) {
    .pd-nav {
        bottom: 18px;
        right: 18px;
    }

    .pd-arrow {
        width: 52px;
        height: 52px;
        font-size: 1.7rem;
    }
}
