/* =====================================================
   base.css — Reset, Cuerpo y Utilidades Globales
   ===================================================== */

/* ── Reset ─────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 100%; /* base 16px, escalamos con rem en tokens */
}

body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-base);     /* 18px base */
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  padding-bottom: env(safe-area-inset-bottom);
}

a    { text-decoration: none; color: inherit; }
img  { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: var(--font-body); }
strong { color: var(--white); font-weight: 600; }
em   { font-style: normal; color: var(--blue-l); }

/* Fondo con gradientes de ambiente */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(ellipse at 15% 85%, rgba(30,144,255,.055) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(124,92,252,.035) 0%, transparent 55%);
}

/* ── Layout ─────────────────────────────────────────── */
.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  position: relative;
  z-index: 1;
}

.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--bg-2);
  border-top:    1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ── Tipografía ─────────────────────────────────────── */

/* Overline — etiqueta pequeña sobre títulos */
.overline {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.overline::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--blue);
  opacity: 0.6;
  flex-shrink: 0;
}
.overline--c { justify-content: center; }
.overline--c::before { display: none; }

/* H2 — Títulos de sección */
.h2 {
  font-family: var(--font-display);
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: var(--lh-tight);
  margin-top: 1rem;
}

/* H3 — Títulos de card */
.h3 {
  font-family: var(--font-display);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: var(--lh-snug);
}

/* Párrafo body principal */
.body-t {
  font-size: var(--fs-md);
  color: var(--silver);
  line-height: var(--lh-loose);
  max-width: 58ch;
}

/* Párrafo secundario */
.small-t {
  font-size: var(--fs-base);
  color: var(--muted);
  line-height: var(--lh-base);
}

.text-center { text-align: center; }

/* ── Cabeceras de sección ───────────────────────────── */
.sec-head {
  margin-bottom: var(--space-lg);
}
.sec-head .body-t {
  margin-top: 1rem;
}

.sec-head--c {
  text-align: center;
  margin-bottom: var(--space-lg);
}
.sec-head--c .body-t {
  margin: 0.85rem auto 0;
}

.sec-head--row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: var(--space-lg);
}

/* ── Pills ──────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.9rem;
  border-radius: var(--r-full);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid;
}
.pill--blue   { background: var(--soft);              color: var(--blue-l); border-color: var(--line-b); }
.pill--green  { background: rgba(0,230,118,.08);      color: var(--green);  border-color: rgba(0,230,118,.22); }
.pill--violet { background: rgba(124,92,252,.1);      color: #C4B5FD;       border-color: rgba(124,92,252,.28); }
.pill--cyan   { background: var(--c-soft);            color: #7EEEFF;       border-color: var(--line-c); }
.pill--amber  { background: rgba(255,179,0,.08);      color: var(--amber);  border-color: rgba(255,179,0,.22); }

/* ── Animaciones base ───────────────────────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.pulse { animation: pulse-dot 2s ease-in-out infinite; }

/* ── Scroll Reveal ──────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.d1 { transition-delay: 0.05s !important; }
.d2 { transition-delay: 0.12s !important; }
.d3 { transition-delay: 0.20s !important; }
.d4 { transition-delay: 0.30s !important; }

/* ── Utilidades misceláneas ─────────────────────────── */
.muted  { color: var(--muted) !important; }
.green  { color: var(--green) !important; }
.blue-l { color: var(--blue-l) !important; }
