/* Intro video on `/` — fullscreen hero, then sign-in panel on same page (no redirect) */

.intro-layer {
    position: fixed;
    inset: 0;
    z-index: 2;
    background: #000;
    display: flex;
    flex-direction: column;
}

.intro-brand {
    display: none;
}

.intro-video {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
    object-fit: cover;
    object-position: center;
}

/* Portrait phones: show brand header, contain video so edges aren't cropped */
@media (max-width: 767.98px) and (orientation: portrait) {
    .intro-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        padding: calc(0.75rem + env(safe-area-inset-top, 0px)) 1rem 0.5rem;
        background: #000;
        color: #fff;
        font-size: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    .intro-video {
        object-fit: contain;
        object-position: center top;
    }
}

/* Landscape phones: video fills, no header needed */
@media (max-height: 500px) and (orientation: landscape) {
    .intro-brand {
        display: none;
    }

    .intro-video {
        object-fit: cover;
    }
}

/* Thin bottom bar — skip only; video autoplays muted (no full-screen prompt). */
.intro-chrome {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    margin: 0;
    padding: 1rem 1.25rem 1.35rem;
    text-align: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
}

.intro-skip-wrap {
    margin: 0;
}

.intro-skip {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: underline;
}

.intro-skip:hover,
.intro-skip:focus-visible {
    color: #fff;
}

/* Panel under intro — centered vertically when revealed */
.home-signin {
    position: relative;
    z-index: 1;
    box-sizing: border-box;
    width: 100%;
}

.home-signin--after-intro {
    position: fixed;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: clamp(1rem, 5vmin, 2.5rem);
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.35s ease,
        visibility 0.35s ease;
}

.home-signin--after-intro .auth-page-wrapper {
    width: 100%;
    max-width: 100%;
}

.home-entry--signin-visible .home-signin--after-intro {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.home-entry--signin-only .home-signin {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

/* Sign-in without intro overlay — never keep it hidden */
.home-signin:not(.home-signin--after-intro) {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.home-entry--signin-visible #intro-layer {
    display: none;
}
