/* Home (discovery browse) + the /foundation dev route. Pages sit inside the
   shell content region, so they flex to fill height instead of owning the
   viewport with `min-height: 100vh`. */

.browse-page {
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(0.75rem, 2vw, 1.75rem) clamp(1rem, 3vw, 2.5rem);
}

.browse-intro,
.foundation-intro {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.browse-intro h1,
.foundation-intro h1 {
    margin: 0;
    color: var(--color-emphasis);
    letter-spacing: -0.03em;
    font-size: clamp(2rem, 5vw, 3.25rem);
    line-height: 1;
}

.browse-feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.browse-results-grid,
.foundation-grid,
.state-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    scroll-margin-top: 1rem;
}

/* Foundation dev route */

.foundation-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(18rem, 0.95fr);
    gap: clamp(1rem, 3vw, 2rem);
    padding: clamp(1rem, 3vw, 1.5rem);
    scroll-margin-top: 1rem;
}

.foundation-hero h2 {
    margin: 0;
    color: var(--color-emphasis);
    letter-spacing: -0.03em;
}

.foundation-hero-copy {
    display: grid;
    align-content: center;
    gap: 0.9rem;
}

.foundation-hero-copy p {
    margin: 0;
    color: var(--color-subtle);
    max-width: 42rem;
}

.blueprint-preview {
    min-height: 18rem;
    border: 1px solid var(--color-border);
}

.blueprint-preview::before,
.blueprint-preview::after {
    content: "";
    position: absolute;
    inset: 18% 16%;
    border: 1px solid var(--color-primary);
}

.blueprint-preview::after {
    inset: 32% 26%;
    border-color: var(--color-action);
}

.foundation-card {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 820px) {
    .foundation-hero {
        grid-template-columns: 1fr;
    }

    .browse-results-grid,
    .foundation-grid,
    .state-grid {
        grid-template-columns: 1fr;
    }
}
