/* Base CSS - Resets, Tipografía con Clamp, Layouts Globales y Rendimiento */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-dark);
  color: var(--color-text-light);
  line-height: 1.5;
  overflow-x: hidden;
}

/* Reglas de Títulos con Clamp () Destacados y Proporcionales */
h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3 {
  font-family: var(--font-heading);
  font-size: clamp(1.85rem, 3.5vw, 2.75rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h4 {
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.25;
  font-weight: 600;
}

h5 {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 1.5vw, 1.6rem);
  line-height: 1.3;
}

h6 {
  font-family: var(--font-heading);
  font-size: clamp(1.05rem, 1.2vw, 1.3rem);
  line-height: 1.3;
}

/* Títulos centrados en celular */
@media (max-width: 767px) {
  h1, h2, h3, h4, h5, h6 {
    text-align: center;
  }
}

/* Regla Global de Párrafos: Justificados y máximo 20px */
p {
  font-size: clamp(17px, 1rem + 0.3vw, 20px);
  line-height: 1.45;
  text-align: justify;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Optimización de Rendimiento y Renderizado */
section, .container, .card, .content-block {
  content-visibility: auto;
  contain-intrinsic-size: 1px 800px;
}

/* Flex & Grid Containers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  width: 100%;
}

.flex-row-center {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

/* Skip link accesibilidad */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--color-orange);
  color: var(--color-text-dark);
  padding: 10px;
  z-index: 10000;
  transition: top 0.3s;
}

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