/* ==========================================================================
   ATLAS · sistema de diseño de la web pública
   Compartido por la landing (/), /terms y /privacy.
   - Tokens: neutros de la referencia (casi negro / gris Apple), azul de acción
     y la paleta de marca de ATLAS Comms (azul eléctrico, cian).
   - Piezas: contenedor, navegación negra translúcida con progreso de scroll,
     botones en píldora, eyebrows, revelado al hacer scroll y pie mínimo.
   Puntos de corte: ≥1240 escritorio amplio · 1024 portátil/tablet horizontal
     · 768 tablet vertical · 480 móvil.
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

:root {
  /* Neutros */
  --black: #050506;
  --near-black: #080b10;
  --ink: #1d1d1f;
  --ink-2: #2a2b30;
  --white: #ffffff;
  --surface: #ffffff;
  --bg: #f5f5f7;
  --bg-2: #eef0f4;
  --surface-blue: #edf2f8;
  --muted: #6e6e73;          /* 5.0:1 sobre --bg */
  --muted-2: #6e6e73;
  --muted-dark: #86868b;     /* segundo tono de titulares (texto grande) */
  --muted-light: #a1a1a6;    /* segundo tono sobre negro */
  --line: #e3e3e8;
  --line-2: rgba(0, 0, 0, .08);

  /* Acción y marca */
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --blue-600: #0066cc;       /* enlaces sobre claro: 5.6:1 */
  --blue-700: #004f9e;
  --blue-500: #3b82f6;
  --electric: #3b82f6;
  --cyan: #22d3ee;
  --cyan-300: #67e8f9;
  --cyan-400: #22d3ee;
  --cyan-700: #0e7490;
  --night: #050506;
  --night-line: rgba(255, 255, 255, .1);
  --grad-brand: linear-gradient(90deg, #0071e3 0%, #3b82f6 50%, #22d3ee 100%);
  --grad-text: linear-gradient(100deg, #1d4ed8 0%, #2563eb 45%, #0891b2 100%);

  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: var(--font-sans);

  --r-sm: 10px; --r-md: 14px; --r-lg: 20px; --r-xl: 30px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05), 0 1px 1px rgba(0, 0, 0, .03);
  --shadow-md: 0 14px 34px -16px rgba(15, 30, 60, .28), 0 2px 6px rgba(0, 0, 0, .04);
  --shadow-lg: 0 50px 100px -40px rgba(10, 30, 70, .45), 0 18px 40px -20px rgba(0, 0, 0, .18);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-in-out: cubic-bezier(.65, 0, .35, 1);

  --header-h: 62px;
  --content-width: 1240px;
  --wrap: var(--content-width);
  --gutter: clamp(22px, 4vw, 40px);
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: var(--blue-600); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-700); }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(0, 113, 227, .2); }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); position: relative; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted-dark); }

.skip {
  position: fixed; left: 12px; top: 10px; z-index: 200; padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--blue); color: #fff; font-weight: 600; font-size: 14px; text-decoration: none;
  transform: translateY(-180%); transition: transform .2s var(--ease-out);
}
.skip:focus { transform: none; color: #fff; }

/* ---------- Eyebrows ---------- */
.eyebrow { font-size: 12.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.eyebrow--dark { color: var(--muted-light); }

/* ---------- Botones ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 24px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; line-height: 1; white-space: nowrap; text-decoration: none;
  border: 1px solid transparent; transition: transform .25s var(--ease-out), background-color .2s, border-color .2s, color .2s, box-shadow .25s;
  -webkit-tap-highlight-color: transparent;
}
/* Reflejo horizontal muy sutil al pasar el cursor. */
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .22) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .7s var(--ease-out);
}
.btn:hover::after { transform: translateX(120%); }
.btn:hover { transform: scale(1.02); }
.btn:active { transform: scale(.98); }
.btn--primary { color: #fff; background: var(--blue); }
.btn--primary:hover { color: #fff; background: var(--blue-hover); box-shadow: 0 10px 26px -12px rgba(0, 113, 227, .7); }
.btn--outline { color: var(--ink); background: transparent; border-color: rgba(29, 29, 31, .32); }
.btn--outline:hover { color: var(--ink); border-color: rgba(29, 29, 31, .6); background: rgba(255, 255, 255, .6); }
.btn--outline::after { background: linear-gradient(100deg, transparent 30%, rgba(0, 113, 227, .08) 50%, transparent 70%); }
.btn--light { color: var(--ink); background: #fff; }
.btn--light:hover { color: var(--ink); background: #f2f2f4; }

/* ---------- Marca ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; flex: none; min-height: 44px; }
.brand:hover { color: #fff; }
.brand .mark { width: 30px; height: 30px; }
.brand .wordmark { height: 13px; width: auto; }

/* ---------- Navegación fija (negra translúcida) ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  background: rgba(8, 8, 10, .72);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header__bar { height: 100%; display: flex; align-items: center; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.site-nav a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  font-size: 13.5px; font-weight: 500; letter-spacing: -.005em; color: rgba(255, 255, 255, .72); text-decoration: none; transition: color .2s;
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: #fff; }
.site-nav a[aria-current="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 9px; height: 1px; background: rgba(255, 255, 255, .6); }
.site-header__actions { display: flex; align-items: center; gap: 10px; margin-left: 12px; }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 0 15px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600; letter-spacing: -.005em; white-space: nowrap; text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s, transform .2s var(--ease-out);
  position: relative;
}
/* Área táctil de 44 px aunque la píldora mida menos. */
.nav-btn::before { content: ""; position: absolute; inset: -5px -2px; }
.nav-btn:hover { transform: scale(1.03); }
.nav-btn--ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .26); background: transparent; }
.nav-btn--ghost:hover { color: #fff; border-color: rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .06); }
.nav-btn--primary { color: #fff; background: var(--blue); }
.nav-btn--primary:hover { color: #fff; background: var(--blue-hover); }
.site-header :focus-visible { outline-color: #fff; }
.scroll-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.scroll-progress span {
  display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(var(--progress, 0));
  background: var(--grad-brand);
}

/* ---------- Pie mínimo ---------- */
.site-footer { position: relative; z-index: 2; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 13px; }
.site-footer__inner { display: flex; flex-wrap: wrap; gap: 14px 32px; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 32px; }
.site-footer p { line-height: 1.7; }
.site-footer__brand { color: var(--ink); font-weight: 600; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); text-decoration: none; transition: color .2s; }
.footer-links a:hover, .footer-links a[aria-current="page"] { color: var(--blue-600); }

/* ---------- Revelado al hacer scroll (solo con JS) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(40px); transition: opacity .85s var(--ease-out), transform .85s var(--ease-out); transition-delay: var(--d, 0s); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive de las piezas compartidas ---------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-header__actions { margin-left: auto; }
}
@media (max-width: 480px) {
  .site-header__bar { gap: 12px; }
  .brand .mark { width: 26px; height: 26px; }
  .brand .wordmark { height: 11px; }
  .site-header__actions { gap: 8px; }
  .nav-btn { padding: 0 12px; font-size: 12.5px; }
}
@media (max-width: 359px) {
  .nav-btn--ghost { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
@media print {
  .site-header, .skip, .scroll-progress { display: none !important; }
}
