/* ===========================================================================
   Finzaria — Base: reset, tipografía, primitivas de layout y secciones.
   Depende de tokens.css (cárgalo antes).
   =========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,
svg {
  max-width: 100%;
  display: block;
}

/* ── Tipografía ── */
h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.5rem);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}
h3 {
  font-size: 1.2rem;
}
p {
  margin: 0 0 1rem;
  color: var(--ink-soft);
}
a {
  color: var(--blue-600);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
strong {
  font-weight: 700;
}
/* Cifras siempre en tipografía tabular (alinea montos). */
.num {
  font-family: var(--font-num);
  font-feature-settings: 'tnum';
}

/* ── Foco accesible (teclado) ── */
:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Skip link (accesibilidad) ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* ── Primitivas de layout ── */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.center {
  text-align: center;
}
.eyebrow {
  display: inline-block;
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: rgba(59, 107, 255, 0.09);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.lead {
  font-size: 1.18rem;
  color: var(--ink-soft);
  max-width: 640px;
}
.center .lead {
  margin-left: auto;
  margin-right: auto;
}
.tag-line {
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  margin-bottom: 10px;
}

/* ── Secciones ── */
section {
  padding: var(--space-section) 0;
}
.section-soft {
  background: var(--bg-soft);
}
.section-navy {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  color: #fff;
}
.section-navy h2,
.section-navy h3 {
  color: #fff;
}
.section-navy p {
  color: #c4d0e4;
}

/* ── Grids reutilizables ── */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

/* ── Utilidades mínimas (evitan estilos inline dispersos) ── */
.stack-sm > * + * {
  margin-top: 12px;
}
.mx-auto {
  margin-left: auto;
  margin-right: auto;
}
.measure {
  max-width: 720px;
}
.measure-sm {
  max-width: 640px;
}

/* ── Responsive base ── */
@media (max-width: 900px) {
  :root {
    --space-section: 60px;
  }
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }
}
