/* ===========================================================================
   Reset acotado + tipografía + primitivas
   =========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

/* halo de marca, detrás de todo */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: var(--grad-halo);
  pointer-events: none;
  z-index: 0;
}

img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: var(--blue-300); text-decoration: none; }
a:hover { color: var(--cyan-300); }
ul, ol { list-style: none; padding: 0; }
table { border-collapse: collapse; width: 100%; }

h1, h2, h3, h4 { font-weight: 640; letter-spacing: -.012em; line-height: 1.22; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }

:focus-visible {
  outline: 2px solid var(--cyan-400);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: rgba(34,211,238,.28); }

/* scrollbars discretas */
* { scrollbar-width: thin; scrollbar-color: rgba(120,165,235,.22) transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb {
  background: rgba(120,165,235,.22); border-radius: 99px;
  border: 2px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: rgba(120,165,235,.4); background-clip: content-box; }

/* Tamaño por defecto de todo icono. Sin esto un SVG sin width/height se estira
   hasta llenar su contenedor; los contextos que necesitan otro tamaño lo
   redefinen con más peso. */
.ico { width: 17px; height: 17px; flex: none; }

/* --- utilidades ---------------------------------------------------------- */
.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;
}
.row   { display: flex; align-items: center; gap: var(--sp-3); }
.row-b { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.col   { display: flex; flex-direction: column; gap: var(--sp-3); }
.wrap  { flex-wrap: wrap; }
.grow  { flex: 1 1 auto; min-width: 0; }
.mono  { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.tnum  { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.dim   { color: var(--ink-2); }
.tiny  { font-size: var(--fs-xs); }
.small { font-size: var(--fs-sm); }
.center{ text-align: center; }
.right { text-align: right; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap{ white-space: nowrap; }
.hide  { display: none !important; }

.eyebrow {
  font-size: var(--fs-xs); font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-4);
}

.grid { display: grid; gap: var(--sp-4); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
/* los hijos de un grid no deben empujar la columna */
.grid > * { min-width: 0; }

/* animaciones de entrada */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(255,92,113,.45); }
  70%  { box-shadow: 0 0 0 9px rgba(255,92,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,92,113,0); }
}
@keyframes shimmer { from { background-position: -420px 0; } to { background-position: 420px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.rise { animation: rise var(--dur) var(--ease) both; }
