/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    min-height: 100%;
}

body {
    background: #050608;
    color: white;
    font-family: Georgia, "Times New Roman", serif;
}


/* ---------- Full-screen hero ---------- */

.hero {
    position: relative;

    width: 100%;
    height: 100vh;
    height: 100svh;

    overflow: hidden;

    background: #050608;
}


/* ---------- Background video ---------- */

.hero-video {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    /*
     * Important:
     * when the screen becomes narrow,
     * cropping stays anchored on the lighthouse.
     */
    object-position: left top;

    z-index: 0;
}


/* ---------- Darkening layer ---------- */

.overlay {
    position: absolute;
    inset: 0;

    /*
     * Keep lighthouse side visible.
     * Darken the right side for white text.
     */
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.00) 0%,
            rgba(0, 0, 0, 0.05) 30%,
            rgba(0, 0, 0, 0.22) 52%,
            rgba(0, 0, 0, 0.55) 76%,
            rgba(0, 0, 0, 0.72) 100%
        );

    z-index: 1;

    pointer-events: none;
}


/* ---------- Content ---------- */

.content {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    align-items: flex-end;

    padding:
        clamp(28px, 5vh, 64px)
        clamp(28px, 5vw, 90px)
        16px;
}


/* ---------- Title ---------- */

.title-block {
    text-align: right;

    max-width: 800px;

    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.9),
        0 0 20px rgba(0, 0, 0, 0.65);
}

h1 {
    margin: 0;

    font-family: "Jim Nightshade", cursive;

    font-size:
        clamp(4rem, 7vw, 8rem);

    font-weight: 400;

    line-height: 0.88;

    letter-spacing: 0.015em;
}

.tagline {
    margin: 10px 0 0;

    font-family: "Jim Nightshade", cursive;

    font-size:
        clamp(1.7rem, 2.5vw, 3rem);

    line-height: 1;

    letter-spacing: 0.02em;
}


/* ---------- Books ---------- */

.books {
    margin-top:
        clamp(60px, 15vh, 170px);

    text-align: right;

    font-size:
        clamp(1rem, 1.35vw, 1.4rem);

    line-height: 1.9;

    text-shadow:
        0 2px 7px rgba(0, 0, 0, 0.9);
}

.books p {
    margin: 0;
}

.books strong {
    font-weight: 600;
}

.books a {
    color: white;

    text-decoration: none;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.55);

    transition:
        opacity 150ms ease,
        border-color 150ms ease;
}

.books a:hover {
    opacity: 0.75;
    border-color: white;
}


/* ---------- Bottom-right AI note ---------- */

.credit {
    margin-top: auto;

    max-width: 650px;

    text-align: right;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 8px;

    line-height: 1.35;

    opacity: 0.65;

    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.95);
}


/* ---------- Phones ---------- */

@media (max-width: 700px) {

    /*
     * The video remains anchored to the upper-left.
     * The phone therefore sees the lighthouse instead
     * of the middle/right side of the original image.
     */
    .hero-video {
        object-position: left top;
    }

    /*
     * Stronger overlay on a phone because the text
     * may overlap more of the illustrated area.
     */
    .overlay {
        background:
            linear-gradient(
                90deg,
                rgba(0, 0, 0, 0.03) 0%,
                rgba(0, 0, 0, 0.18) 45%,
                rgba(0, 0, 0, 0.62) 100%
            ),
            linear-gradient(
                0deg,
                rgba(0, 0, 0, 0.55) 0%,
                rgba(0, 0, 0, 0.00) 55%
            );
    }

    .content {
        padding:
            24px
            18px
            10px;
    }

    .title-block {
        max-width: 78vw;
    }

    h1 {
        font-size:
            clamp(3rem, 14vw, 5rem);
    }

    .tagline {
        font-size:
            clamp(1.4rem, 6vw, 2rem);
    }

    .books {
        max-width: 78vw;

        margin-top:
            clamp(40px, 10vh, 80px);

        font-size:
            clamp(0.9rem, 4vw, 1.05rem);

        line-height: 1.65;
    }

    .credit {
        max-width: 82vw;
        font-size: 8px;
    }
}


/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {

    .hero-video {
        /*
         * Browser falls back to the dark page background.
         * We can improve this later with a dedicated
         * still-background fallback.
         */
    }
}
