/* All page introductions use the same measure, type roles, and spacing. */
body .site-shell { padding-top: 0; }
.lmc-migrated-index { margin-block: 0; }
.circulation-deck, main.methodology-page, main.contact-page { padding-top: 0; }
.page-masthead { width: calc(100vw - 2 * var(--masthead-inline-gutter)); max-width: none; margin: 0 calc(50% - 50vw + var(--masthead-inline-gutter)); padding: var(--masthead-top) 0 var(--masthead-bottom); }
.page-masthead :is(h1, h2).page-masthead__title,
.pitch-frame h1.page-masthead__title,
.pitch-login-card h1.page-masthead__title {
    display: grid;
    gap: var(--masthead-group-gap);
    margin: 0;
    font-family: var(--font-display);
    font-size: var(--masthead-size);
    font-weight: var(--masthead-weight);
    line-height: var(--masthead-leading);
    letter-spacing: var(--masthead-tracking);
    color: var(--color-text);
    text-align: left;
}
.page-masthead__group { display: block; max-width: 32ch; min-width: 0; }
.page-masthead__group:nth-child(2):not(:last-child) { justify-self: center; }
.page-masthead__group:last-child:not(:first-child) { justify-self: end; text-align: right; }
.page-masthead__line { display: block; overflow-wrap: anywhere; text-wrap: pretty; }
.page-masthead__line--soft { font-weight: var(--masthead-soft-weight); }
.page-masthead__prose { max-width: 65ch; margin-top: var(--masthead-prose-gap); font: 400 var(--masthead-prose-size)/1.65 var(--font-body); color: var(--color-muted); }
.page-masthead__prose p { margin: 0; }
.page-masthead__prose p + p { margin-top: var(--space-sm); }
.lmc-migrated-index .page-masthead__prose p { font-size: inherit; line-height: inherit; }
.contact-details { max-width: var(--masthead-width); margin: 0 auto; padding-bottom: var(--space-2xl); }
.album-page-links { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-lg); }
@media (max-width: 760px) {
    .page-masthead__group:nth-child(n) { justify-self: start; text-align: left; }
}

.pitch-frame h1.page-masthead__title { color: inherit; }

/* Decorative full-bleed atmosphere keeps the shared text measure and type scale. */
.page-masthead--image { position: relative; isolation: isolate; }
.page-masthead__background {
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    transform: translateX(-50%);
    overflow: hidden;
    pointer-events: none;
    background: var(--masthead-image-paper);
    -webkit-mask-image: linear-gradient(transparent, #000 var(--masthead-image-fade), #000 68%, transparent);
    mask-image: linear-gradient(transparent, #000 var(--masthead-image-fade), #000 68%, transparent);
}
.page-masthead__background img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 53%;
    opacity: var(--masthead-image-opacity);
    filter: blur(var(--masthead-image-blur));
    transform: scale(1.04);
    mix-blend-mode: multiply;
}
.page-masthead__background::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--masthead-image-veil), var(--masthead-image-veil-clear));
}
.page-masthead--document .page-masthead__background img { filter: grayscale(1) blur(var(--masthead-image-blur)); }
.page-masthead--gathering { --masthead-image-opacity: .64; }
@media (max-width: 760px) {
    .page-masthead--image { --masthead-image-veil: rgb(var(--palette-paper) / 0.88); --masthead-image-veil-clear: rgb(var(--palette-paper) / 0.58); }
    .page-masthead--gathering .page-masthead__background img { object-position: 43% center; }
}
@media print { .page-masthead__background { display: none; } }

/* Research keeps the document visible to the right of the declaration. */
.research-page .page-masthead--document {
    --masthead-image-opacity: .28;
    --masthead-image-blur: 2px;
}
.research-page .permanent-section { padding-top: var(--space-xl); }

/* The portrait sits between declarations while the heading stays real text. */
.page-masthead--portrait { padding-top: var(--space-lg); }
.page-masthead__composition { display: grid; grid-template-columns: minmax(0, 1fr); }
.page-masthead--portrait h1.page-masthead__title { display: contents; }
.page-masthead--portrait .page-masthead__group {
    position: relative;
    z-index: 1;
    grid-column: 1;
    font: var(--masthead-weight) var(--masthead-size)/var(--masthead-leading) var(--font-display);
    letter-spacing: var(--masthead-tracking);
}
.page-masthead--portrait .page-masthead__group:first-child { grid-row: 1; justify-self: start; }
.page-masthead--portrait .page-masthead__group:nth-child(2) { grid-row: 3; justify-self: end; text-align: right; }
.page-masthead--portrait .page-masthead__group:nth-child(3) { grid-row: 4; margin-top: var(--masthead-group-gap); }
.page-masthead__portrait {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
    width: min(68%, var(--masthead-portrait-width));
    margin: var(--space-md) 0;
}
.page-masthead__portrait img { display: block; width: 100%; height: auto; border-radius: var(--radius-card); }
.page-masthead__portrait figcaption { margin-top: var(--space-xs); font: 400 12px/1.5 var(--font-body); color: var(--color-muted); }
/* Keep the attribution accessible without interrupting the opening composition. */
.page-masthead__portrait figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 760px) {
    .page-masthead__composition { row-gap: var(--space-lg); }
    .page-masthead--portrait .page-masthead__group:nth-child(n) { justify-self: start; text-align: left; margin-top: 0; }
    .page-masthead__portrait { width: 100%; margin: 0; }
}

/* The next step follows the declarations, in the same shared measure. */
.page-masthead__actions {
    display: flex;
    justify-content: flex-start;
    margin-top: var(--space-xl);
}
body a.page-masthead__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    min-height: 48px;
    max-width: 100%;
    padding: 12px 24px;
    border: 1px solid var(--color-accent);
    border-radius: var(--radius-pill);
    background: var(--color-accent);
    color: var(--color-on-accent);
    font: 700 16px/1.4 var(--font-ui);
    letter-spacing: 0;
    text-align: center;
    text-decoration: none;
    transition: background var(--motion-fast), border-color var(--motion-fast);
}
body a.page-masthead__cta:hover {
    background: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: var(--color-on-accent);
}
body a.page-masthead__cta:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 4px;
}
.program-context {
    width: min(100%, var(--masthead-width), calc(100vw - 40px));
    margin: 0 auto var(--space-2xl);
}
.program-context p { color: var(--color-muted); }
@media (max-width: 760px) {
    .page-masthead__actions { margin-top: var(--space-lg); }
}
@media print { .page-masthead__actions { display: none; } }

/* Research projects pair each title with its description, without catalog codes. */
.research-page .permanent-section__row--with-description {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr);
}
@media (max-width: 760px) {
    .research-page .permanent-section__row--with-description { grid-template-columns: minmax(0, 1fr); }
}
