/*
 * Landing polish: one vertical rhythm, readable display type, and the FAQ.
 * Loaded last on the home page so section spacing is decided in one place.
 */

:root {
    --section-y: clamp(64px, 6.5vw, 100px);
    --section-gap: clamp(36px, 4vw, 56px);
}

/* Display type: the old -0.085em tracking ate the space between words. */
.hero h1 {
    font-size: clamp(52px, 5.9vw, 86px);
    line-height: 1.02;
    letter-spacing: -.055em;
    word-spacing: .04em;
    margin: 26px 0 28px;
}

.display {
    letter-spacing: -.05em;
    word-spacing: .04em;
    line-height: .98;
}

/* Card titles, panels, and banners were tracked as tight as the hero. */
#top h3,
#top h4,
.event-image strong,
.forum-head h3 {
    letter-spacing: -.025em;
    word-spacing: .04em;
}

/* Hero: clear the floating header, keep the trust line in the flow. */
.hero {
    min-height: 0;
    padding-top: clamp(132px, 12vw, 168px);
    padding-bottom: clamp(56px, 6vw, 88px);
}

.hero-copy {
    padding-bottom: 0;
}

.hero-lead {
    max-width: 30em;
}

.hero-trust {
    margin-top: 44px;
}

/* One rhythm for every content section. */
.about-section,
.product-stage,
.community-section,
.events-section,
.members-section,
.voices-section,
.news-home,
.partner-section,
.faq-section {
    padding-top: var(--section-y);
    padding-bottom: var(--section-y);
}

/* The sticky story already carries its own breathing room. */
.product-stage {
    padding-bottom: calc(var(--section-y) * .5);
}

.community-section {
    padding-top: calc(var(--section-y) * .75);
}

/* Headings to content: the same distance everywhere. */
.about-grid,
.community-heading,
.events-heading {
    margin-top: 24px;
}

.members-heading h2 {
    margin-top: 24px;
}

.principles-grid,
.community-layout,
.event-rail-wrap,
.directory-preview {
    margin-top: var(--section-gap);
}

.principle-card h3 {
    margin-top: 28px;
}

/* Empty event state: one wide card instead of a lonely tile. */
.event-card-empty {
    width: min(1240px, calc(100vw - 48px));
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.event-card-empty .event-image {
    height: 240px;
}

.event-card-empty .event-info {
    padding: 0 56px 0 0;
}

.event-card-empty .event-arrow {
    right: 0;
    bottom: auto;
    top: 50%;
    transform: translateY(-50%);
}

/* Directory: spread whatever members exist across the row instead of
   leaving four empty columns on the right. */
.member-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Empty directory: centre the placeholders so the panel does not look broken. */
.member-grid.is-empty {
    display: flex;
    justify-content: center;
    gap: 48px;
}

.member-grid.is-empty .member-person {
    min-width: 160px;
}

/* Partnership: tighter stack between its own blocks. */
.partner-section > .section-intro {
    margin-bottom: 24px;
}

/* FAQ */
.faq-section {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(40px, 6vw, 96px);
    align-items: start;
}

.faq-intro {
    position: sticky;
    top: 132px;
}

.faq-intro .display {
    font-size: clamp(44px, 5vw, 72px);
    margin: 24px 0 22px;
}

.faq-intro p {
    max-width: 26em;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 26px;
}

.faq-list {
    border-top: 1px solid var(--line);
}

.faq-item {
    border-bottom: 1px solid var(--line);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 4px;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary h3 {
    margin: 0;
    font: 700 clamp(18px, 1.6vw, 21px)/1.3 Manrope, sans-serif;
    letter-spacing: -.02em;
    color: var(--ink);
}

.faq-item summary svg,
.faq-item summary i {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    color: var(--blue);
    transition: transform .25s ease;
}

.faq-item[open] summary svg,
.faq-item[open] summary i {
    transform: rotate(45deg);
}

.faq-item summary:focus-visible {
    outline: 2px solid var(--blue);
    outline-offset: 4px;
    border-radius: 8px;
}

.faq-item p {
    max-width: 38em;
    margin: -6px 0 0;
    padding: 0 4px 28px;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.75;
}

.faq-item p a {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: reduce) {
    .faq-item summary svg,
    .faq-item summary i {
        transition: none;
    }
}

@media (max-width: 900px) {
    .hero h1 {
        letter-spacing: -.045em;
    }

    .display {
        letter-spacing: -.04em;
    }

    .event-card-empty {
        width: min(420px, calc(100vw - 48px));
        display: block;
    }

    .event-card-empty .event-info {
        padding: 23px 4px;
    }

    .event-card-empty .event-arrow {
        top: auto;
        bottom: 27px;
        transform: none;
    }

    .member-grid.is-empty {
        gap: 12px;
    }

    .member-grid.is-empty .member-person {
        min-width: 0;
        flex: 1 1 0;
    }

    .faq-section {
        grid-template-columns: 1fr;
    }

    .faq-intro {
        position: static;
    }

    .faq-item summary {
        padding: 22px 2px;
    }
}
