/* ==========================================================================
   Home page sections: hero, title bands, foundation, goals, team, contact.
   ========================================================================== */

.section {
    padding-block: var(--space-section);
}

/* Main receives focus from the skip link; no outline on the whole region. */
main:focus {
    outline: none;
}

/* ---------- Charcoal title band (fixed-colour surface, both themes) ---------- */

.band {
    padding-block: clamp(2.25rem, 1.75rem + 2.2vw, 3.75rem);
    background: var(--color-band-bg);
    color: var(--color-band-text);
    text-align: center;
}

.band__title {
    color: var(--color-band-text);
    font-size: var(--text-h2);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.band__subtitle {
    margin-top: var(--space-2xs);
    color: var(--color-band-muted);
    font-size: clamp(1rem, 0.9rem + 0.55vw, 1.4rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.band :focus-visible {
    outline-color: var(--color-photo-focus);
}

/* ---------- Shared light-grey panel ---------- */

.panel {
    padding: clamp(1.25rem, 0.75rem + 2.5vw, 3rem);
    background: var(--color-surface-alt);
    border-radius: var(--radius-sm);
}

.panel__title {
    margin-bottom: var(--space-xl);
    font-family: var(--font-serif);
    font-size: var(--text-h3);
    font-weight: 700;
}

.panel__title::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin-top: var(--space-sm);
    background: var(--color-accent);
}

/* ---------- Hero (#home): photograph with a dark overlay ---------- */

.hero {
    position: relative;
    display: grid;
    align-items: center;
    min-height: clamp(32rem, calc(100svh - var(--header-height)), 50rem);
    overflow: hidden;
    background: var(--color-photo-fallback);
    color: var(--color-photo-text);
    isolation: isolate;
}

.hero__image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 47% 45%;
}

/* Dark overlay keeps white text readable whatever the theme. */
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--overlay-hero);
}

.hero__content {
    padding-block: var(--space-2xl);
    text-align: center;
}

.hero__title {
    color: var(--color-photo-text);
    font-weight: 400;
    text-shadow: var(--shadow-on-photo-lg);
}

.hero__verse {
    max-width: 44rem;
    margin: var(--space-lg) auto 0;
}

.hero__verse p {
    font-size: clamp(1.15rem, 1rem + 0.9vw, 1.75rem);
    font-style: italic;
    line-height: 1.45;
    text-shadow: var(--shadow-on-photo-sm);
}

.hero__verse footer {
    margin-top: var(--space-xs);
    color: var(--color-photo-muted);
    font-size: var(--text-sm);
    font-weight: 700;
    letter-spacing: var(--tracking-caps);
    text-transform: uppercase;
}

.hero__verse cite {
    font-style: normal;
}

.hero__intro {
    max-width: 40rem;
    margin: var(--space-lg) auto 0;
    color: var(--color-photo-muted);
    font-size: var(--text-lg);
    font-weight: 300;
    text-shadow: var(--shadow-on-photo-sm);
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.hero .button--outline {
    color: var(--color-photo-text);
}

.hero .button--outline:hover {
    background: var(--color-photo-hover);
    color: var(--color-photo-text);
}

.hero :focus-visible {
    outline-color: var(--color-photo-focus);
}

/* ---------- Our Foundation ---------- */

.foundation__layout {
    display: grid;
    gap: var(--space-xl);
}

.foundation__figure img,
.goals__figure img,
.contact__figure img {
    width: 100%;
    border-radius: var(--radius-sm);
}

.foundation__story {
    display: grid;
    gap: var(--space-2xl);
    max-width: var(--width-reading);
}

.story-block h3 {
    margin-bottom: var(--space-sm);
    font-size: var(--text-h3);
    font-weight: 500;
}

/* Long-form reading text uses the serif, as on the existing site. */
.story-block p,
.goals__lede p:last-child {
    font-family: var(--font-serif);
    font-size: 1.125rem;
    line-height: 1.75;
}

@media (min-width: 60rem) {
    .foundation__layout {
        grid-template-columns: minmax(0, var(--width-reading)) minmax(0, 1fr);
        gap: var(--space-2xl) clamp(3rem, 5vw, 5rem);
        align-items: start;
    }

    .foundation__figure {
        grid-column: 2;
        grid-row: 1;
        position: sticky;
        top: calc(var(--header-height) + var(--space-xl));
    }

    .foundation__story {
        grid-column: 1;
        grid-row: 1;
    }
}

/* Mission statement panel */
.mission {
    margin-top: var(--space-section);
}

.mission__list {
    display: grid;
    gap: var(--space-xl);
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: mission;
}

.mission__item {
    counter-increment: mission;
    max-width: var(--width-reading);
}

.mission__item::before {
    content: counter(mission, decimal-leading-zero);
    display: block;
    margin-bottom: var(--space-2xs);
    color: var(--color-accent-text);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
}

.mission__belief {
    margin-bottom: var(--space-sm);
    color: var(--color-heading);
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.4;
}

@media (min-width: 64rem) {
    .mission__list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(2rem, 3vw, 3rem);
    }
}

/* ---------- Our Goals (TEAM) ---------- */

.goals__intro {
    display: grid;
    gap: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.goals__lede {
    max-width: var(--width-reading);
}

.goals__acrostic {
    display: flex;
    gap: var(--space-xs);
    margin-bottom: var(--space-lg);
}

.goals__acrostic span,
.goal__letter {
    display: inline-grid;
    place-items: center;
    flex: none;
    border-radius: var(--radius-sm);
    background: var(--color-accent);
    color: var(--color-on-accent);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1;
}

.goals__acrostic span {
    width: 3.25rem;
    height: 3.25rem;
    font-size: 1.75rem;
}

@media (min-width: 60rem) {
    .goals__intro {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        gap: clamp(3rem, 5vw, 5rem);
        align-items: center;
    }
}

.goal-list {
    display: grid;
    gap: 0 clamp(2rem, 4vw, 4rem);
    margin: 0;
    list-style: none;
}

.goal {
    min-width: 0;
    padding-block: var(--space-xl);
    border-bottom: var(--border-width) solid var(--color-border-strong);
}

.goal:first-child {
    padding-top: 0;
}

.goal:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.goal__title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.goal__letter {
    width: 3rem;
    height: 3rem;
    font-size: 1.625rem;
}

.goal__name {
    font-family: var(--font-serif);
    font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);
    font-weight: 700;
}

.goal__body {
    max-width: var(--width-reading);
}

.goal__qualities {
    display: grid;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: 0;
    list-style: none;
}

.goal__qualities li {
    position: relative;
    padding-left: var(--space-lg);
}

.goal__qualities li::before {
    content: "";
    position: absolute;
    top: 0.68em;
    left: 0;
    width: 0.45rem;
    height: 0.45rem;
    background: var(--color-accent);
}

.goal__qualities strong {
    color: var(--color-heading);
    font-style: italic;
}

/* Two columns: T E / A M, with row rules kept aligned. */
@media (min-width: 60rem) {
    .goal-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .goal:nth-child(-n + 2) {
        padding-top: 0;
    }

    .goal:nth-child(n + 3) {
        padding-bottom: 0;
        border-bottom: 0;
    }
}

/* ---------- Team ---------- */

.team__list {
    display: grid;
    gap: var(--space-2xl);
}

.profile {
    display: grid;
    gap: 0;
    align-items: stretch;
}

.profile__media {
    position: relative;
    max-width: 24rem;
    overflow: hidden;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.profile__photo {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 25%;
    background: var(--color-surface-alt);
}

/* Role and name overlaid on the portrait, as on the existing site. */
.profile__caption {
    position: absolute;
    inset: auto 0 0;
    padding: var(--space-2xl) var(--space-lg) var(--space-md);
    background: var(--overlay-caption);
    color: var(--color-photo-text);
}

.profile__role {
    color: var(--color-photo-muted);
    font-size: var(--text-sm);
    font-weight: 300;
    letter-spacing: 0.04em;
}

.profile__name {
    color: var(--color-photo-text);
    font-size: 1.5rem;
    font-weight: 700;
}

.profile__bio {
    max-width: 24rem;
    padding: var(--space-lg);
    background: var(--color-surface-alt);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.profile__ref {
    white-space: nowrap;
}

@media (min-width: 48rem) {
    .profile {
        grid-template-columns: minmax(0, 20rem) minmax(0, 1fr);
    }

    .profile__media {
        max-width: none;
        border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    }

    .profile__bio {
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: none;
        padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
        font-size: 1.0625rem;
    }

    .profile__bio p {
        max-width: var(--width-reading);
    }
}

/* ---------- Contact ---------- */

.contact__layout {
    display: grid;
    gap: var(--space-2xl);
}

.contact__lede {
    max-width: var(--width-reading);
    font-family: var(--font-serif);
    font-size: 1.1875rem;
    line-height: 1.7;
}

.contact__email-block {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
}

.contact__email-icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    color: var(--color-heading);
}

.contact__email {
    min-width: 0;
    font-size: clamp(1.15rem, 1rem + 0.7vw, 1.5rem);
    font-weight: 500;
    overflow-wrap: anywhere;
}

.contact__figure {
    display: none;
}

.contact-form {
    display: grid;
    gap: var(--space-lg);
    min-width: 0;
    padding: clamp(1.25rem, 1rem + 1.5vw, 2.25rem);
    background: var(--color-surface-alt);
    border-radius: var(--radius-sm);
}

/* The form only works with JavaScript; without it the email link is the contact path. */
.no-js .contact-form {
    display: none;
}

.contact-form__title {
    font-family: var(--font-serif);
    font-size: var(--text-h3);
    font-weight: 700;
}

.contact-form__note {
    margin-top: calc(-1 * var(--space-sm));
    color: var(--color-text-muted);
    font-size: var(--text-sm);
}

.contact-form__row {
    display: grid;
    gap: var(--space-lg);
}

.contact-form__status {
    font-weight: 500;
}

.contact-form__status:empty {
    display: none;
}

.contact-form__status[data-state="pending"] {
    color: var(--color-text-muted);
}

.contact-form__status[data-state="error"] {
    color: var(--color-error);
}

.contact-form__status[data-state="success"] {
    padding: var(--space-sm) var(--space-md);
    border-left: 3px solid var(--color-success);
    background: var(--color-surface);
    color: var(--color-text);
    font-weight: 400;
}

@media (min-width: 36rem) {
    .contact-form__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 60rem) {
    .contact__layout {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        gap: clamp(3rem, 5vw, 5rem);
        align-items: start;
    }

    .contact__figure {
        display: block;
        margin-top: var(--space-2xl);
    }
}
