/*
    Landing page
*/

.landing {
    position: relative;
    width: 100%;
    min-height: 100svh;
    overflow: hidden;
    background-color: #0a0a0a;
    color: var(--color-white);
    font-family: "ABC Monument Grotesk Greek", "General Sans", Helvetica, -apple-system, BlinkMacSystemFont, arial, sans-serif;
    font-weight: 500;
}

/* Slideshow */
.landing-slides {
    position: absolute;
    inset: 0;
}

.landing-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.landing-slide.is-active {
    opacity: 1;
}

.landing-slide .figure {
    position: absolute;
    inset: 0;
    margin: 0;
}

.landing-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.landing-slide img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
    display: block;
    filter: brightness(0.9) grayscale(1);
}

/* Background video — same treatment as the slides so the two are interchangeable */
.landing-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    /* Pinned to the large viewport rather than the container: mobile browsers
       grow and shrink the visible area as the address bar hides, and following
       that would make the video jump on every scroll. Overflow is clipped by
       .landing. */
    height: 100vh;
    height: 100lvh;
    object-fit: cover;
    display: block;
    /* Hidden until the wordmark is clicked and frames start arriving */
    opacity: 0;
    transition: opacity 400ms ease;
}

.landing.is-video-playing .landing-video {
    opacity: 1;
}

/* Full-bleed play surface, used when the wordmark is hidden and there is
   nothing else to click */
.landing-video-surface {
    position: absolute;
    inset: 0;
    z-index: 4;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    appearance: none;
}

/* Visible to screen readers only — announces what clicking the wordmark does */
.landing-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.landing-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* Wordmark */
.landing-wordmark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    width: 100%;
    text-align: center;
    font-weight: 700;
    font-size: clamp(56px, 13vw, 212px);
    line-height: 1;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: opacity 400ms ease;
}

/* The wordmark doubles as the video play/pause control */
.landing-wordmark-button {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    appearance: none;
    display: inline-block;
    transition: transform 150ms ease;
}

.landing-wordmark-button:hover,
.landing-wordmark-button:focus-visible {
    transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
    .landing-wordmark-button {
        transition: none;
    }
}

/* A large file can take a while to start — pulse so the click registers */
.landing.is-video-loading .landing-wordmark-button {
    animation: landing-pulse 1.2s ease-in-out infinite;
}

@keyframes landing-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
    .landing.is-video-loading .landing-wordmark-button {
        animation: none;
        opacity: 0.7;
    }
}

/* Once the video is running the wordmark gets out of the way — same 400ms as
   the video's fade in, so the two cross over */
.landing.is-video-playing .landing-wordmark {
    opacity: 0;
    pointer-events: none;
}

.landing.is-video-playing .landing-video-surface {
    display: none;
}

/* Description */
.landing-description {
    position: absolute;
    top: 0.75rem;
    left: 1.25rem;
    width: calc(100% - 2.5rem);
    max-width: 1100px;
    font-size: 14px;
    line-height: 1.4;
    z-index: 5;
}

.landing-description p {
    display: inline;
    margin: 0;
}

.landing-description-short--mobile {
    display: none;
}

.landing-description-full {
    display: none;
}

.landing-description-full p {
    margin-bottom: 1rem;
    display: block;
}

.landing-description.is-expanded {
    font-size: 20px;
}

.landing-description.is-expanded .landing-description-short {
    display: none;
}

.landing-description.is-expanded .landing-description-full {
    display: block;
}

/* Fullscreen blur backdrop behind the text, shown only while expanded */
.landing-description-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 200ms ease;
}

.landing-description.is-expanded .landing-description-backdrop {
    opacity: 1;
}

.landing-description-toggle {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
    transition: color 150ms ease;
    padding: 0;
}

.landing-description-toggle:hover,
.landing-description-toggle:focus-visible {
    color: rgba(255, 255, 255, 0.8);
}

/* Credits */
.landing-credits {
    position: absolute;
    bottom: 1rem;
    left: 1.25rem;
    right: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
    font-size: 14px;
    line-height: 1.4;
}

.landing-credits p {
    margin: 0;
}

.landing-credits u {
    text-underline-offset: 0.15em;
}

.landing-credits-financed {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 48rem) {
    .landing-wordmark {
        font-size: clamp(48px, 21vw, 80px);
    }

    .landing-description.is-expanded {
        font-size: 14px;
    }

    .landing-description-short--desktop {
        display: none;
    }

    .landing-description-short--mobile {
        display: block;
    }

    .landing-credits {
        display: none;
    }
}
