/* ============================================================
   LABORATORIOS ABARLY — base.css
   Tokens, reset, tipografía y utilidades base.
   ============================================================ */

:root {
  /* Paleta institucional */
  --color-bg-deep: #0A1A35;
  --color-bg-darker: #050810;
  --color-bg-mid: #0E2244;
  --color-bg-light: #142B52;
  --color-cyan-glow: #1B4D7A;
  --color-cyan-bright: #4A8BB8;
  --color-cyan-electric: #6EC1E4;
  --color-text-primary: #FFFFFF;
  --color-text-secondary: rgba(255, 255, 255, 0.78);
  --color-text-muted: rgba(255, 255, 255, 0.55);
  --color-text-faint: rgba(255, 255, 255, 0.35);
  --color-border-soft: rgba(255, 255, 255, 0.08);
  --color-border-mid: rgba(255, 255, 255, 0.14);
  --color-border-strong: rgba(255, 255, 255, 0.22);
  --color-accent-six: #2BA8B8;
  --color-accent-six-glow: #34D4E8;
  --color-accent-den3: #E87722;
  --color-den3-blue: #1B3A6B;
  --color-whatsapp: #25D366;

  /* Gradients reutilizables */
  --gradient-text-hero: linear-gradient(180deg, #FFFFFF 0%, #B8CCDB 100%);
  --gradient-cyan-glow: radial-gradient(circle at 75% 50%, rgba(74, 139, 184, 0.35) 0%, transparent 60%);
  --gradient-border-glow: linear-gradient(135deg, rgba(74, 139, 184, 0.4) 0%, transparent 100%);

  /* Tipografía */
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Inter", system-ui, sans-serif;

  /* Espaciado */
  --section-padding-y: clamp(5rem, 10vw, 9rem);
  --section-padding-x: clamp(1.5rem, 5vw, 5rem);
  --container-max: 1440px;

  /* Easings */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Capas */
  --z-base: 1;
  --z-section: 2;
  --z-navbar: 100;
  --z-overlay-mobile: 200;
  --z-floating: 300;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg-deep);
  color: var(--color-text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font-family: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ============================================================
   Selección
   ============================================================ */
::selection {
  background: rgba(74, 139, 184, 0.4);
  color: var(--color-text-primary);
}

/* ============================================================
   Scrollbar (webkit)
   ============================================================ */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-bg-darker);
}
::-webkit-scrollbar-thumb {
  background: var(--color-cyan-glow);
  border-radius: 4px;
  border: 2px solid var(--color-bg-darker);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-cyan-bright);
}

/* ============================================================
   SKIP LINK
   ============================================================ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: var(--z-floating);
  background: var(--color-text-primary);
  color: var(--color-bg-deep);
  padding: 0.75rem 1.25rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 2px solid var(--color-cyan-bright);
  outline-offset: 2px;
}

/* ============================================================
   UTILIDADES DE SECCIÓN
   ============================================================ */
.section {
  position: relative;
  padding: var(--section-padding-y) var(--section-padding-x);
}
.section__container {
  max-width: var(--container-max);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.section__header {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section__header--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin: 0 0 1.25rem;
}
.section__eyebrow::before {
  content: "";
  display: inline-block;
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, var(--color-cyan-bright), transparent);
}
.section__header--center .section__eyebrow {
  justify-content: center;
}
.section__title {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 1.25rem;
  color: var(--color-text-primary);
  text-wrap: pretty;
}
.section__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-cyan-electric) 0%, var(--color-cyan-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section__subtitle {
  font-size: clamp(1rem, 1.4vw, 1.125rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--color-text-secondary);
  max-width: 56ch;
  margin: 0;
}
.section__header--center .section__subtitle { margin-left: auto; margin-right: auto; }

/* ============================================================
   DECORACIONES GLOBALES — orbes radiales que viven detrás
   de las secciones para dar profundidad ambiental.
   ============================================================ */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(60px);
  opacity: 0.4;
  z-index: 0;
}
.orb--cyan {
  background: radial-gradient(circle, var(--color-cyan-bright) 0%, transparent 70%);
}
.orb--small { width: 280px; height: 280px; }
.orb--medium { width: 480px; height: 480px; }
.orb--large { width: 720px; height: 720px; }

/* ============================================================
   ANIMACIÓN BASE — scroll reveal
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out-expo),
              transform 0.8s var(--ease-out-expo);
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal--left {
  transform: translateX(-30px);
}
.reveal--left.is-visible {
  transform: translateX(0);
}
.reveal--right {
  transform: translateX(30px);
}
.reveal--right.is-visible {
  transform: translateX(0);
}
.reveal--scale {
  transform: scale(0.92);
}
.reveal--scale.is-visible {
  transform: scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal--left,
  .reveal--right,
  .reveal--scale {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================================
   LÍNEA DECORATIVA — separadores entre secciones
   ============================================================ */
.section-divider {
  position: relative;
  height: 1px;
  margin: 0 auto;
  max-width: var(--container-max);
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(74, 139, 184, 0.4) 50%,
    transparent 100%);
}
