/* The landing page (spec 012): one square slideshow on the left that stays in view while the page scrolls, and
   all of the text (the headline, then every section) in one column on the right that scrolls normally; below
   768 px one column with the square first and not pinned. Nothing is laid over a picture. Every selector
   starts with .public-site (a unit test enforces it). */

.public-site .landing-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 768px) {
    .public-site .landing-split {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 6vw;
    }

    /* the pinned square: it rides along with the scroll, and never grows taller than the window */
    .public-site .landing-media {
        position: sticky;
        top: 1.5rem;
        align-self: start;
    }

    .public-site .landing-media .pub-square {
        width: min(100%, calc(100vh - 3rem));
    }

    /* the headline block is as tall as the square, so its text is centred beside it, as in the reference */
    .public-site .landing-intro {
        min-height: calc((min(100vw, 1600px) - 2 * var(--pub-gutter) - 6vw) / 2);
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
}

/* the text column: about 34rem, vertically centred next to the square */
.public-site .landing-text {
    max-width: var(--pub-col);
    padding-bottom: 1rem;
}

.public-site .landing-hero {
    padding-top: 1.5rem;
}

.public-site .landing-hero h1 {
    font-size: clamp(2.25rem, 4.2vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    letter-spacing: 0.005em;
    margin: 0 0 1.5rem;
    overflow-wrap: break-word;
}

.public-site .landing-hero .lead {
    font-family: var(--pub-font-body);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.7;
    margin: 0 0 2rem;
}

/* base.html's inline rule centres .action-buttons on a desktop; here the button sits at the text's edge */
.public-site .landing-text .action-buttons {
    display: flex;
    justify-content: flex-start;
}

.public-site .landing-cta {
    min-width: 12rem;
    padding-inline: 2rem;
}

/* the rows below the hero */
.public-site .landing-row {
    margin-top: clamp(3.5rem, 8vw, 8rem);
}

.public-site .landing-row .landing-text h2 {
    font-size: clamp(1.75rem, 2.6vw, 2.75rem);
    margin: 0 0 1rem !important; /* the shared markup carries Bootstrap's mt-4, which is !important */
}

.public-site .landing-row .landing-text p,
.public-site .landing-row .landing-text li {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.public-site .landing-row .landing-text ul {
    padding-left: 1.25rem;
    margin-bottom: 0;
}

.public-site .landing-row .landing-text .action-buttons {
    margin-top: 1.5rem !important; /* mt-3 in the markup is !important */
    margin-bottom: 0 !important;
}

.public-site .landing-bottom {
    padding-bottom: 2rem;
}

/* the slideshow fills the hero's square: photos stacked, the active one visible (a crossfade) */
.public-site .pub-square .slideshow {
    position: absolute;
    inset: 0;
}

.public-site .pub-square .slideshow img {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.public-site .pub-square .slideshow img.is-active {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .public-site .pub-square .slideshow img {
        transition: none;
    }
}
