/* Give large titles room for ascenders and descenders on wrapped lines. */
body .page-intro h1 {
    line-height: .96;
    letter-spacing: -.055em;
    padding-block-end: .25em;
}

/* Keep the five Academics module page titles at one display size. */
.learning-module-page .page-intro h1 {
    font-size: clamp(5rem, 9vw, 9.5rem);
}

@media (prefers-reduced-motion: no-preference) {
    .page-intro :is(.page-breadcrumbs, h1) {
        animation: page-intro-enter var(--motion-reveal) var(--ease-reveal) backwards;
    }

    .page-intro h1 {
        animation-delay: 70ms;
    }

    @keyframes page-intro-enter {
        from { opacity: .8; transform: translate3d(0, .45rem, 0); }
        to { opacity: 1; transform: translate3d(0, 0, 0); }
    }
}

/* Shared mobile title spacing; desktop compositions remain page-owned. */
@media (max-width: 900px) {
    body .page-intro,
    .homepage .page-intro,
    .learning-module-content > .page-intro:first-child {
        min-height: 0;
        height: auto;
        margin-top: 0;
        padding-top: calc(var(--site-header-height, 64px) + var(--module-summary-height, 0px) + 1.5rem);
        padding-bottom: 1.5rem;
        row-gap: 1.5rem;
        justify-content: start;
        align-content: start;
        grid-template-rows: auto;
    }

    /* Keep a small breathing space below the fixed header on the alternate home. */
    .homepage .hero.page-intro { margin-top: 15px; }

    body .page-intro h1,
    .homepage .page-intro h1 {
        margin-block: 0;
        align-self: start;
    }

    .page-intro :is(.page-head__grid, .note-head__grid, .team-head__grid, .admission-head__grid,
        .activities-masthead__body, .workshops-hero__body, .press-hero__stage) {
        row-gap: 1.5rem;
        margin-block: 0;
    }

    .page-intro :is(.breadcrumbs, .page-breadcrumbs) { margin-bottom: 0; }
    .page-intro :is(.note-head__meta, .team-head__meta, .admission-head__meta) { margin-top: 1.5rem; }
    .page-intro :is(.gallery-hero__copy, .press-hero__story) { min-height: 0; gap: 1.5rem; }

    .page-intro .press-hero__story { justify-content: start; }
    .page-intro :is(.press-hero__kicker, .press-hero__story p) { margin-block: 0; }

    /* Artwork follows the title instead of reserving a fixed empty area. */
    body .hero.page-intro { grid-template-columns: minmax(0, 1fr); }
    body .hero.page-intro .hero-sketch {
        position: relative;
        inset: auto;
        width: min(100%, 380px);
        margin: 0;
        justify-self: end;
    }
}

@media (max-width: 640px) {
    .learning-module-page .page-intro h1 {
        font-size: clamp(3.2rem, 15vw, 4.7rem);
    }

    .page-intro .page-head__grid { grid-template-columns: minmax(0, 1fr); }
    .page-intro.page-head h1 { font-size: clamp(3.2rem, 15vw, 5.2rem); }
}
