/* Browse foundation layout. */

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

.product-shell {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.product-header {
    display: grid;
    align-content: start;
    gap: 0.6rem;
    padding-block: 0.25rem 0;
}

.product-kicker,
.eyebrow {
    color: var(--color-primary);
}

.product-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
}

.product-header h1,
.foundation-hero h2,
.state-card h2 {
    margin: 0;
    color: var(--color-emphasis);
    letter-spacing: -0.03em;
}

.product-header h1 {
    font-size: clamp(2rem, 5vw, 3.75rem);
    line-height: 0.95;
}

.product-lede {
    max-width: 44rem;
    margin: 0.7rem 0 0;
    color: var(--color-subtle);
    font-size: clamp(1rem, 2vw, 1.18rem);
}

.product-nav {
    justify-content: flex-end;
    align-items: center;
}

.product-nav a:not(.button) {
    color: var(--color-subtle);
    font-weight: 600;
    padding: 0.45rem 0;
}

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

.blueprint-axis,
.blueprint-dimension {
    position: absolute;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--color-primary);
}

.blueprint-axis-x { right: 0.75rem; bottom: 0.75rem; }
.blueprint-axis-y { left: 0.75rem; top: 0.75rem; }
.blueprint-dimension { left: 0.75rem; bottom: 0.75rem; }

.browse-controls {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
}

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

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

.state-card {
    display: grid;
    align-content: start;
    gap: 0.75rem;
    min-height: 11rem;
    padding: 1rem;
}

.state-card p {
    margin: 0;
    color: var(--color-subtle);
}

.error-state {
    border-color: color-mix(in srgb, var(--color-error) 55%, var(--color-border));
}

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

    .product-header-row {
        display: grid;
        align-items: start;
    }

    .product-nav {
        justify-content: flex-start;
    }

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