/* ==========================================================================
   Redux Systems · base.css
   Variables, reset, tipografía y utilidades. Diseño mobile first.
   ========================================================================== */

@font-face {
  font-family: "Archivo Respaldo";
  src: local("Arial");
  size-adjust: 98.3%;
  ascent-override: 89.3%;
  descent-override: 21.4%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Archivo Titulo Respaldo";
  src: local("Arial Bold"), local("Arial");
  font-weight: 700 800;
  size-adjust: 121.5%;
  ascent-override: 72.3%;
  descent-override: 17.3%;
  line-gap-override: 0%;
}

:root {
  color-scheme: dark;

  /* Color */
  --noche: #070B1A;
  --noche-2: #0A1026;
  --superficie: #0E1530;
  --superficie-2: #141D40;
  --superficie-3: #1C2752;
  --borde: #25315F;
  --borde-fuerte: #3D4F92;
  --azul: #1B3FD1;
  --azul-hover: #2F55F0;
  --azul-claro: #8FA4FF;
  --cian: #3FD8F5;
  --cian-suave: rgba(63, 216, 245, 0.14);
  --texto: #E9EDFB;
  --texto-suave: #AEB9DA;
  --blanco: #FFFFFF;
  --exito: #5BE3A8;
  --aviso: #FFD479;
  --verde-wa: #25D366;

  /* Tipografía */
  --fuente: "Archivo", "Archivo Respaldo", "Segoe UI", Arial, sans-serif;
  --fuente-titulo: "Archivo", "Archivo Titulo Respaldo", "Segoe UI", Arial, sans-serif;
  --t-base: 1.0625rem;
  --t-sm: 0.9375rem;
  --t-xs: 0.8125rem;
  --t-h1: clamp(2.2rem, 1.55rem + 3vw, 3.75rem);
  --t-h2: clamp(1.85rem, 1.4rem + 2.1vw, 3rem);
  --t-h3: 1.25rem;

  /* Espacios */
  --e-1: 0.25rem;
  --e-2: 0.5rem;
  --e-3: 0.75rem;
  --e-4: 1rem;
  --e-5: 1.5rem;
  --e-6: 2rem;
  --e-7: 3rem;
  --e-8: 4rem;
  --seccion: clamp(3.75rem, 2.6rem + 5vw, 7rem);

  /* Radios */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-total: 999px;

  /* Sombras */
  --sombra-1: 0 8px 24px -12px rgba(0, 0, 0, 0.65);
  --sombra-2: 0 24px 60px -28px rgba(0, 0, 0, 0.85);
  --sombra-azul: 0 28px 80px -28px rgba(47, 85, 240, 0.7);

  /* Movimiento */
  --curva: cubic-bezier(0.22, 0.8, 0.26, 1);
  --rapido: 160ms;
  --medio: 320ms;
}

@media (min-width: 960px) {
  :root { --t-base: 1.125rem; --t-sm: 1rem; --t-h3: 1.35rem; }
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 5.25rem;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fuente);
  font-size: var(--t-base);
  line-height: 1.6;
  color: var(--texto);
  background: var(--noche);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* Gana a las clases que definen display en elementos que se ocultan con JS */
html [hidden][hidden] { display: none; }

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

h1, h2, h3, h4 {
  margin: 0;
  color: var(--blanco);
  font-family: var(--fuente-titulo);
  font-weight: 800;
  line-height: 1.08;
  text-wrap: balance;
}

h1 { font-size: var(--t-h1); font-stretch: 116%; letter-spacing: -0.032em; line-height: 1.02; }
h2 { font-size: var(--t-h2); font-stretch: 112%; letter-spacing: -0.028em; }
h3 { font-size: var(--t-h3); font-stretch: 104%; letter-spacing: -0.012em; line-height: 1.2; }

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--azul-claro); text-underline-offset: 0.18em; }
a:hover { color: var(--blanco); }

:focus-visible {
  outline: 3px solid var(--cian);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--azul); color: var(--blanco); }

/* Utilidades */
.envoltura {
  width: min(1180px, 100% - 2rem);
  margin-inline: auto;
}

@media (min-width: 768px) {
  .envoltura { width: min(1180px, 100% - 3.5rem); }
}

.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;
}

.saltar {
  position: absolute;
  top: var(--e-2);
  left: var(--e-2);
  z-index: 100;
  padding: var(--e-3) var(--e-4);
  background: var(--blanco);
  color: var(--noche);
  font-weight: 700;
  border-radius: var(--r-sm);
  transform: translateY(-200%);
}
.saltar:focus { transform: none; color: var(--noche); }

.nowrap { white-space: nowrap; }

/* Aparición al hacer scroll (solo si hay JS) */
.js .revelar {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 620ms var(--curva), transform 620ms var(--curva);
  transition-delay: calc(var(--retardo, 0) * 90ms);
}
.js .revelar.en-vista { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0ms !important;
  }
  .js .revelar { opacity: 1; transform: none; }
}
