/* 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;
}

/* Logged-out hero band: a compact "what is this" affordance above the feed,
   shown only to anonymous visitors who haven't dismissed it. */

.hero-band {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: clamp(0.9rem, 2.5vw, 1.4rem) clamp(1rem, 3vw, 1.75rem);
}

.hero-band-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-right: 1.5rem;
}

.hero-band-pitch {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.45;
}

.hero-band-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.hero-band-signin {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
}

.hero-band-input {
    min-width: 0;
    width: 16rem;
    max-width: 100%;
    padding: 0.5rem 0.7rem;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    font: inherit;
}

.hero-band-input:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
    outline-offset: 1px;
}

.hero-band-about {
    color: var(--color-subtle);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.hero-band-about:hover {
    color: var(--color-text);
}

.hero-band-dismiss {
    position: absolute;
    top: 0.4rem;
    right: 0.5rem;
}

.hero-dismiss {
    appearance: none;
    padding: 0.1rem 0.45rem;
    color: var(--color-subtle);
    background: transparent;
    border: 1px solid transparent;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.hero-dismiss:hover {
    color: var(--color-text);
    border-color: var(--color-border);
}

.hero-dismiss:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-primary) 25%, transparent);
    outline-offset: 1px;
}

.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;
    }

    .hero-band-signin {
        width: 100%;
    }

    .hero-band-input {
        width: 100%;
        flex: 1;
    }
}
