/* ============================================================
   ALUMFER — Base & Reset
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-light);
  overflow-x: hidden;
}

/* ─── Tipografía base ────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: var(--tracking-tight);
  color: inherit;
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }
h5 { font-size: var(--text-md); }
h6 { font-size: var(--text-base); font-weight: 500; }

p { max-width: 65ch; }
p + p { margin-top: var(--space-4); }

a {
  color: var(--blue);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}
a:hover { color: var(--blue-light); }

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }

/* ─── Eyebrow / label ────────────────────────────────────── */
/* Elemento de identidad: texto pequeño en mayúscula con tracking ancho */
.eyebrow {
  display: block;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--blue-light);
  margin-bottom: var(--space-4);
}

.eyebrow--dark {
  color: var(--blue);
}

/* ─── Contenedor principal ───────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ─── Secciones ──────────────────────────────────────────── */
.section {
  padding-block-start: clamp(1.5rem, 3vw, 2.5rem);
  padding-block-end: var(--section-y);
}

.section--dark {
  background-color: var(--bg-dark);
  color: var(--text-on-dark);
}

.section--mid {
  background-color: var(--bg-mid);
  color: var(--text-on-dark);
}

.section--concrete {
  background-color: var(--concrete-light);
  color: var(--text-primary);
}

.section--light {
  background-color: var(--bg-light);
  color: var(--text-primary);
}

/* ─── Firma visual: regla azul ───────────────────────────── */
/* La barra vertical azul es el elemento de identidad recurrente */
.ruled {
  position: relative;
  padding-left: calc(var(--rule-width) + var(--space-5));
}

.ruled::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--rule-width);
  background-color: var(--rule);
  border-radius: 2px;
}

/* Variante: regla horizontal debajo del título de sección */
.section-header {
  margin-bottom: var(--space-12);
}

.section-header::after {
  content: '';
  display: block;
  width: 40px;
  height: var(--rule-width);
  background-color: var(--rule);
  border-radius: 2px;
  margin-top: var(--space-5);
}

/* ─── Accesibilidad ──────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
