/* bp-event-landing — landing-base.css
 * Cross-template chrome: smooth scroll, header (both states), video modal,
 * body reset. Per-template tokens live in event-types/<key>/base.css.
 */

html { scroll-behavior: smooth; }

body.bp-event-landing {
    margin: 0;
    padding: 0;
}
body.bp-event-landing.bp-modal-open {
    overflow: hidden;
}

/* WP admin bar tolerance — landing pages still display the bar to logged-in users. */
body.bp-event-landing.admin-bar .bpel-header { top: 32px; }
@media (max-width: 782px) {
    body.bp-event-landing.admin-bar .bpel-header { top: 46px; }
}

/* === Header — A: integrated (transparent over hero) === */
.bpel-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 2.5rem;
    background: transparent;
    transition: top 300ms ease, left 300ms ease, right 300ms ease,
                padding 300ms ease, background 300ms ease,
                backdrop-filter 300ms ease, border-radius 300ms ease,
                max-width 300ms ease, transform 300ms ease,
                box-shadow 300ms ease;
}

.bpel-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    position: relative;
}

.bpel-header-logo { display: inline-flex; }
.bpel-header-logo img {
    height: 48px;
    width: auto;
    display: block;
}

.bpel-header-burger {
    display: none;
    background: transparent;
    border: 0;
    padding: 0.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.bpel-header-burger img {
    display: block;
    height: 24px;
    width: 24px;
}

.bpel-header-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bpel-header-nav a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
    white-space: nowrap;
}

.bpel-header-nav a:hover { color: #ffffff; }

.bpel-header-nav a.is-active {
    border-color: #ffffff;
    color: #ffffff;
}

/* === Header — B: floating glass pill (after Hero) === */
.bpel-header.is-floating {
    top: 1rem;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    max-width: calc(100% - 2rem);
    padding: 0.5rem 1.25rem;
    background: rgba(51, 51, 51, 0.30);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 9999px;
    box-shadow:
        0 1px 8px 0 rgba(0, 0, 0, 0.10),
        0 0 2px 0 rgba(0, 0, 0, 0.10),
        inset 0 0 16px 0 rgba(242, 242, 242, 0.40),
        inset 0 0 1px 1px rgba(153, 153, 153, 0.50),
        inset 0 0 1px 1px rgba(255, 255, 255, 0.15),
        inset -1px -1px 1px 0.5px rgba(255, 255, 255, 0.75),
        inset 1px 1px 1px 0.5px rgba(255, 255, 255, 0.75);
}

.bpel-header.is-floating .bpel-header-inner {
    gap: 1.5rem;
    max-width: none;
}
.bpel-header.is-floating .bpel-header-logo img { height: 32px; }
.bpel-header.is-floating .bpel-header-nav { gap: 0.25rem; }
.bpel-header.is-floating .bpel-header-nav a {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
}

/* === Mobile === */
@media (max-width: 767px) {
    .bpel-header {
        padding: 1rem 1.25rem;
        background: rgba(4, 31, 95, 0.80);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    }
    .bpel-header-logo img { height: 36px; }

    .bpel-header-burger { display: inline-flex; }

    /* On mobile, disable the floating-pill morph — keep header as a static bar with bg. */
    .bpel-header.is-floating {
        top: 0;
        left: 0;
        right: 0;
        transform: none;
        max-width: none;
        width: auto;
        padding: 1rem 1.25rem;
        border-radius: 0;
        background: rgba(4, 31, 95, 0.80);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
    }
    .bpel-header.is-floating .bpel-header-inner { gap: 0; max-width: none; }
    .bpel-header.is-floating .bpel-header-logo img { height: 36px; }

    .bpel-header-nav {
        position: absolute;
        top: calc(100% + 0.75rem);
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #ffffff;
        border-radius: 16px;
        padding: 0.25rem 0;
        min-width: 220px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.20);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
    }
    .bpel-header-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        transition: opacity 200ms ease, transform 200ms ease, visibility 0s;
    }

    .bpel-header-nav a {
        position: relative;
        color: #1a1a1a;
        padding: 0.95rem 1.5rem;
        border: 0;
        border-radius: 0;
        font-size: 1rem;
        font-weight: 400;
        text-align: left;
    }
    .bpel-header-nav a:hover { color: #000000; background: #f7f7f7; }
    .bpel-header-nav a.is-active { color: #E01C24; font-weight: 500; }

    /* Inset separator between adjacent items — does not collide with panel border-radius. */
    .bpel-header-nav a + a::before {
        content: '';
        position: absolute;
        top: 0;
        left: 1.25rem;
        right: 1.25rem;
        height: 1px;
        background: #eeeeee;
    }
}

/* === Reveal-on-scroll — generic pattern. Toggled by initSectionReveal() in landing.js. === */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}
[data-reveal].is-revealed {
    opacity: 1;
    transform: translateY(0);
}
[data-reveal][data-reveal-delay="1"] { transition-delay: 100ms; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 200ms; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 300ms; }
[data-reveal][data-reveal-delay="4"] { transition-delay: 400ms; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* === Video modal === */
.bp-video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bp-video-modal[hidden] { display: none; }

.bp-video-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.bp-video-modal-frame {
    position: relative;
    width: 90%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
}

.bp-video-modal-iframe-wrap {
    width: 100%;
    height: 100%;
    background: #000;
}

.bp-video-modal-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.bp-video-modal-close {
    position: absolute;
    top: -3rem;
    right: 0;
    background: transparent;
    border: 0;
    color: #ffffff;
    font-size: 2.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
}
.bp-video-modal-close:hover { color: #E01C24; }

/* Section base */
.bp-section {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.bp-section-placeholder,
.bp-hero-placeholder {
    padding: 4rem 2rem;
    color: rgba(255,255,255,0.4);
    text-align: center;
    border: 1px dashed rgba(255,255,255,0.15);
    margin: 1rem 2rem;
    border-radius: 8px;
    font-style: italic;
}
