/* ============================================================
   LAYOUT — page shell, containers, grids, sections
   ============================================================ */

.page-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
}

.page-main {
    flex: 1;
    width: 100%;
}

/* --- Containers ------------------------------------------- */

.container {
    width: 100%;
    max-width: var(--content-max);
    margin-inline: auto;
    padding-inline: var(--page-gutter);
}

@media (min-width: 768px) {
    .container {
        padding-inline: var(--page-gutter-lg);
    }
}

/* --- Sections --------------------------------------------- */

.section {
    padding-block: var(--space-5);
}

@media (min-width: 768px) {
    .section {
        padding-block: var(--space-6);
    }

}

/* Tighter: the eyebrow, heading and lead belong together as one block, and
   `space-6` under it pushed the content that follows off the first screen. */
.section-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
    margin-bottom: var(--space-4);
}

.section-header h1,
.section-header h2 {
    margin: 0;
}

.section-header .lead {
    margin: 0;
}

.section-header .lead {
    max-width: 60ch;
}

.section-header-center {
    align-items: center;
    text-align: center;
}

/* --- Grids ------------------------------------------------- */

.grid {
    display: grid;
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .grid {
        gap: var(--space-5);
    }
}

.grid-auto-md {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.25rem), 1fr));
}

/* --- Stacks ------------------------------------------------ */

.stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
}

.row-center {
    justify-content: center;
}
