/* ==========================================================================
   BASE.CSS — Variables, Reset, Tipografía y Estilos Globales
   Don Andrés Corporativo
   ========================================================================== */

/* --------------------------------------------------------------------------
   Google Fonts
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --------------------------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   -------------------------------------------------------------------------- */
:root {
  /* Colores corporativos */
  --color-primary: #C00000;
  --color-primary-dark: #9B0000;
  --color-primary-light: #E63333;
  --color-black: #000000;
  --color-white: #FFFFFF;
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;

  /* Tipografía */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Escala tipográfica */
  --text-xs: 0.75rem;
  /* 12px */
  --text-sm: 0.875rem;
  /* 14px */
  --text-base: 1rem;
  /* 16px */
  --text-lg: 1.125rem;
  /* 18px */
  --text-xl: 1.25rem;
  /* 20px */
  --text-2xl: 1.5rem;
  /* 24px */
  --text-3xl: 1.875rem;
  /* 30px */
  --text-4xl: 2.25rem;
  /* 36px */
  --text-5xl: 3rem;
  /* 48px */
  --text-6xl: 3.75rem;
  /* 60px */

  /* Pesos tipográficos */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* Alturas de línea */
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  /* Espaciado */
  --space-xs: 0.25rem;
  /* 4px */
  --space-sm: 0.5rem;
  /* 8px */
  --space-md: 1rem;
  /* 16px */
  --space-lg: 1.5rem;
  /* 24px */
  --space-xl: 2rem;
  /* 32px */
  --space-2xl: 3rem;
  /* 48px */
  --space-3xl: 4rem;
  /* 64px */
  --space-4xl: 6rem;
  /* 96px */
  --space-5xl: 8rem;
  /* 128px */

  /* Bordes */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-header: 0 2px 16px rgba(0, 0, 0, 0.12);

  /* Transiciones */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
  --transition-carousel: 600ms cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 500;

  /* Ancho máximo del contenedor */
  --container-max: 1200px;
  --container-narrow: 900px;
  --container-wide: 1400px;

  /* Header */
  --header-height: 80px;
}

/* --------------------------------------------------------------------------
   Reset Moderno
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  font-weight: var(--font-regular);
  line-height: var(--leading-normal);
  color: var(--color-gray-800);
  background-color: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Tipografía Base
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--color-gray-900);
}

h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-lg);
}

h3 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-md);
}

h4 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

h5 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-sm);
}

h6 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
  color: var(--color-gray-600);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary-dark);
}

a:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

/* --------------------------------------------------------------------------
   Clases Utilitarias
   -------------------------------------------------------------------------- */

/* Screen Reader Only */
.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;
}

/* Contenedor */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* Texto */
.text-center {
  text-align: center;
}

.text-primary {
  color: var(--color-primary);
}

.text-white {
  color: var(--color-white);
}

/* Sección espaciado */
.section {
  padding-top: var(--space-4xl);
  padding-bottom: var(--space-4xl);
}

.section--sm {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.section--alt {
  background-color: var(--color-gray-50);
}

/* Subtítulo de sección */
.section__subtitle {
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.section__title {
  font-size: var(--text-4xl);
  margin-bottom: var(--space-md);
}

.section__description {
  font-size: var(--text-lg);
  color: var(--color-gray-500);
  max-width: 640px;
}

.section__header {
  margin-bottom: var(--space-3xl);
}

.section__header--center {
  text-align: center;
}

.section__header--center .section__description {
  margin-left: auto;
  margin-right: auto;
}

/* Animación de revelación al scroll */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Separador decorativo */
.divider {
  width: 60px;
  height: 3px;
  background-color: var(--color-primary);
  border: none;
  margin-bottom: var(--space-xl);
}

.divider--center {
  margin-left: auto;
  margin-right: auto;
}

/* Animación de carga */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}