/* =============================================================
   MantizIS — Layout
   Containers, grids y estructura de secciones
   ============================================================= */

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

.container--narrow {
    max-width: 980px;
}

.container--wide {
    max-width: 1440px;
}

/* ============= Secciones ============= */

.section {
    padding-block: clamp(2rem, 4vw, 4rem);
    position: relative;
}

.section--tight {
    padding-block: clamp(1.25rem, 2.5vw, 2.5rem);
}

.section--cream {
    background: var(--surface-cream);
}

.section--stone {
    background: var(--surface-stone);
}

.section--dark {
    background: var(--surface-dark);
    color: white;
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
    color: white;
}

.section--dark p {
    color: rgba(255, 255, 255, 0.85);
}

/* Borde decorativo entre secciones */
.section--bordered-top {
    border-top: 1px solid var(--line);
}

/* ============= Header de sección ============= */

.section-header {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
    max-width: none;
}

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

.eyebrow {
    font-family: var(--font-mono);
    font-size: var(--fs-micro);
    font-weight: var(--fw-medium);
    letter-spacing: var(--ls-wider);
    text-transform: uppercase;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}

.eyebrow + h1,
.eyebrow + h2,
.eyebrow + h3,
.eyebrow + h4 {
    margin-top: var(--sp-2);
}

.section-header > h1,
.section-header > h2,
.section-header > h3,
.section-header > h4 {
    max-width: none;
    text-wrap: pretty;
}

.eyebrow::before {
    content: "";
    display: block;
    width: 24px;
    height: 1px;
    background: currentColor;
}

.section--dark .eyebrow {
    color: var(--brand-bright);
}

.section-intro {
    font-size: var(--fs-body-lg);
    color: var(--ink-mute);
    max-width: 60ch;
    line-height: var(--lh-relaxed);
}

.section--dark .section-intro {
    color: rgba(255, 255, 255, 0.7);
}

/* ============= Grids reutilizables ============= */

.grid {
    display: grid;
    gap: var(--sp-5);
}

.grid--2 {
    grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
}

.grid--3 {
    grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.grid--4 {
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.grid--asymmetric {
    grid-template-columns: 1fr;
    gap: var(--sp-7);
}

@media (min-width: 960px) {
    .grid--asymmetric {
        grid-template-columns: 1fr 1.4fr;
        gap: var(--sp-8);
        align-items: start;
    }
}

/* ============= Stack utility (espaciado vertical) ============= */

.stack > * + * {
    margin-top: var(--sp-4);
}

.stack-lg > * + * {
    margin-top: var(--sp-6);
}

.stack-xl > * + * {
    margin-top: var(--sp-8);
}
