/* =============================================================
   LAYOUT.CSS — Container · Sections · Grid · Page structure
   Responsabilidad: Estructura de página, contenedores y grids.
   NO contiene colores ni estilos visuales de componentes.
   ============================================================= */

/* ── 1. CONTENEDORES ────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

.container--narrow {
  max-width: var(--container-narrow);
}

/* ── 2. SECCIONES BASE ──────────────────────────────────────── */
.section {
  padding-block: var(--space-24);
}

.section--sm  { padding-block: var(--space-12); }
.section--lg  { padding-block: var(--space-32); }
.section--alt { background-color: var(--color-surface); }

.section__header {
  text-align: center;
  margin-bottom: var(--space-16);
}

.section__eyebrow {
  display: inline-block;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  font-weight: var(--font-medium);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-4);
}

.section__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-inline: auto;
  line-height: var(--leading-loose);
}

/* ── 3. GRID SYSTEM ─────────────────────────────────────────── */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.grid--auto-fill {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── 4. FLEX UTILITIES ──────────────────────────────────────── */
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.flex-center  { align-items: center; justify-content: center; }
.flex-between { align-items: center; justify-content: space-between; }
.gap-2  { gap: var(--space-2); }
.gap-4  { gap: var(--space-4); }
.gap-6  { gap: var(--space-6); }
.gap-8  { gap: var(--space-8); }

/* ── 5. HERO ────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: var(--z-base);
}

.hero__content {
  position: relative;
  z-index: var(--z-raised);
  text-align: center;
  padding-inline: var(--space-6);
}

/* ── 6. TWO-COLUMN SPLIT ────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

.split--reverse { direction: rtl; }
.split--reverse > * { direction: ltr; }

/* ── 7. STICKY NAV PLACEHOLDER ──────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-nav);
  height: 72px;
}

/* Offset for fixed nav */
.nav-offset {
  padding-top: 72px;
}

/* ── 8. UTILITY SPACING ─────────────────────────────────────── */
.mt-auto { margin-top: auto; }
.mx-auto { margin-inline: auto; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
