/* ==========================================================================
   BASE — tipografía, elementos y utilidades de layout
   ========================================================================== */

html {
  scroll-behavior: smooth;
}

/* Single-page: hero fills viewport, no top padding on main */
body.page-sp main {
  padding-top: 0;
}

/* Utility text colors for dark sections */
.text-white { color: var(--color-white); }
.text-dim   { color: rgba(255,255,255,0.55); }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body-lg);
  font-weight: 400;
  color: var(--color-black);
  background-color: var(--color-white);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.05;
  /* Archivo Black solo trae weight 400; sin esto el navegador
     le aplica negrita sintética y deforma los trazos. */
  font-synthesis: none;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 0.95;
}

h2 {
  font-size: var(--fs-h2);
  font-weight: 800;
  line-height: 1.1;
}

h3 {
  font-size: var(--fs-h3);
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  font-size: var(--fs-body-lg);
  line-height: 1.6;
}

strong {
  font-weight: 700;
}

a {
  transition: color var(--transition);
}

/* Texto secundario */
.text-muted {
  color: var(--color-gray);
}

/* Label técnico: mayúsculas, espaciado, gris */
.label-technical {
  display: block;
  font-family: var(--font-body);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-gray);
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

main {
  padding-top: var(--header-height);
}

.section {
  padding-top: var(--section-padding-y);
  padding-bottom: var(--section-padding-y);
  scroll-margin-top: var(--header-height);
}

.section--bordered {
  border-top: var(--border-thin);
}

.section--alt {
  background-color: var(--color-gray-light);
}

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

.section-header {
  margin-bottom: 28px;
}

.section-header .label-technical {
  margin-bottom: 12px;
}

.section-header h2 {
  max-width: 720px;
}

.section-intro {
  max-width: 640px;
  color: var(--color-gray);
  margin-top: 16px;
}

/* ==========================================================================
   ANIMACIONES
   ========================================================================== */

/* Fade-in + leve desplazamiento al entrar en viewport (ver js/reveal.js) */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 1.1s ease, transform 1.1s ease;
}

.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   UTILIDADES
   ========================================================================== */

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--color-red);
  color: var(--color-white);
  padding: 12px 24px;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* Foco visible para navegación por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}
