/* =========================================================
   CENTUAL PREMIUM - 01 BASE
   Reset, Variables, y Fundamentos
   ========================================================= */

/* ========================================
   RESET MODERNO
   ======================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

/* ========================================
   VARIABLES CSS - Sistema de Diseño CENTUAL
   ======================================== */
:root {
  /* Colores Base CENTUAL */
  --centual-primary: #1B1464;
  --centual-primary-dark: #130E46;
  --centual-secondary: #4b71a1;
  --centual-accent: #2d5a8c;
  --centual-ink: #000;
  --centual-bg: #fff;
  --centual-muted: #4A4A6A;
  --centual-subtle: #F0F0F5;

  /* Colores Funcionales */
  --text-primary: #000;
  --text-secondary: #4A4A6A;
  --text-on-dark: #fff;
  --border-light: rgba(0, 0, 0, 0.08);
  --border-medium: rgba(0, 0, 0, 0.15);

  /* Sombras */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.2);

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-blur: 12px;

  /* Espaciado (sistema 8px) */
  --space-xs: 0.5rem;   /* 8px */
  --space-sm: 1rem;     /* 16px */
  --space-md: 1.5rem;   /* 24px */
  --space-lg: 2rem;     /* 32px */
  --space-xl: 3rem;     /* 48px */
  --space-2xl: 4rem;    /* 64px */
  --space-3xl: 6rem;    /* 96px */
  --space-4xl: 8rem;    /* 128px */

  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-xl: 2rem;
  --radius-full: 9999px;

  /* Transiciones */
  --transition-fast: 0.15s;
  --transition-base: 0.3s;
  --transition-slow: 0.5s;
  --transition-slower: 0.8s;

  /* Easing Functions */
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);

  /* Z-index layers */
  --z-base: 1;
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* Breakpoints (para referencia, no usables directamente en CSS) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ========================================
   SMOOTH SCROLL (Lenis)
   ======================================== */
html.lenis {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Contenedores */
.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.container-fluid {
  width: 100%;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

/* Secciones Full */
.section-full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

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

/* Display */
.hidden {
  display: none !important;
}

/* Performance hints */
.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

/* ========================================
   ACCESIBILIDAD - FOCUS STATES
   ======================================== */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--centual-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ========================================
   SELECTION
   ======================================== */
::selection {
  background-color: var(--centual-primary);
  color: white;
}

::-moz-selection {
  background-color: var(--centual-primary);
  color: white;
}

/* ========================================
   SCROLLBAR CUSTOM (Webkit)
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--centual-subtle);
}

::-webkit-scrollbar-thumb {
  background: var(--centual-muted);
  border-radius: var(--radius-full);
  transition: background var(--transition-base) var(--ease-out);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--centual-primary);
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  img {
    max-width: 100% !important;
  }

  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }

  h2,
  h3 {
    page-break-after: avoid;
  }
}
