/* ==========================
   SHARED LAYOUT SYSTEM
========================== */

.section {
    padding: var(--section-spacing) 0;
}

.section--tight {
    padding: var(--section-spacing-sm) 0;
}

/* For any section whose content starts at the very top of the page (Archive,
   404, homepage's hero, etc.) — the header is `position: fixed` at ~100px
   tall, so content needs at least that much clearance or it sits underneath
   it (and the header can intercept clicks meant for it). Uses a small fixed
   gap (1.5rem) on top of that, not the full --section-spacing (up to 5rem)
   — that was clearing the header just fine but left an oversized gap before
   the heading. */
.section--below-header {
    padding-top: calc(100px + 1.5rem);
}

.section__inner {
    width: min(100%, var(--content-width));
    margin-inline: auto;
    padding-inline: clamp(1rem, 4vw, 3rem);
}

.section__inner--wide {
    width: min(100%, var(--content-width-wide));
}

.section__header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    max-width: 760px;
}

.section__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    width: fit-content;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: var(--color-secondary);
    color: var(--color-accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section__title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.15;
}

.section__text {
    font-size: 1rem;
    color: var(--color-text-light);
}

.layout-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.layout-grid > .span-12 { grid-column: span 12; }
.layout-grid > .span-8 { grid-column: span 8; }
.layout-grid > .span-6 { grid-column: span 6; }
.layout-grid > .span-4 { grid-column: span 4; }
.layout-grid > .span-3 { grid-column: span 3; }

.surface-card {
    background: var(--color-surface);
    border: var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 1.5rem;
}

.surface-card--interactive {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.surface-card--interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.component-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

.component-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-left: 1rem;
    color: var(--color-text-light);
}
@media (max-width: 768px) {
    .layout-grid > .span-8,
    .layout-grid > .span-6,
    .layout-grid > .span-4,
    .layout-grid > .span-3 {
        grid-column: span 12;
    }
    .section--below-header {
        padding-top: calc(50px + 1.5rem);
    }
}
