/* frontend/styles/base.css
   Reset + tipografía global + estados de foco coherentes con la marca. */

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

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-tinta);
  background: var(--color-papel);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

/* Texto seleccionado en rojo Kaizen — firma de marca. */
::selection {
  background: var(--color-rojo-kaizen);
  color: var(--color-papel);
}

/* Scrollbar fina, alineada a la paleta (Webkit + Firefox). */
* { scrollbar-width: thin; scrollbar-color: var(--color-gris-linea) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: var(--color-gris-linea);
  border-radius: var(--radius-pill);
  border: 2px solid var(--color-papel);
}
*::-webkit-scrollbar-thumb:hover { background: var(--color-gris-nodo); }

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

a { color: var(--color-rojo-kaizen); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Focus visible global — anillo en rojo Kaizen, no se ve en click de mouse. */
:where(a, button, input, textarea, select, [tabindex]):focus { outline: none; }
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--color-rojo-kaizen);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Tipografía display + jerarquía. */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.01em; line-height: 1.1; margin: 0 0 var(--space-md); color: var(--color-tinta); }
h1 { font-size: var(--text-h1); letter-spacing: -0.01em; }
h2 { font-size: var(--text-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--text-xl); letter-spacing: -0.01em; }
h4 { font-size: var(--text-lg); }

p { margin: 0 0 var(--space-sm); }

/* Eyebrow: caption monoespaciada en mayúsculas. Firma editorial de Kaizen. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-eyebrow);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-rojo-kaizen);
  font-weight: 600;
}

/* Helpers de tipografía. */
.font-display { font-family: var(--font-display); }
.font-mono { font-family: var(--font-mono); }
.text-muted { color: var(--color-muted); }
.text-numeric { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Subrayado rojo signature (palabra acentuada). */
.accent-strike {
  background-image: linear-gradient(to right, var(--color-rojo-kaizen), var(--color-rojo-kaizen));
  background-repeat: no-repeat;
  background-size: 100% 0.18em;
  background-position: 0 88%;
  padding: 0 0.05em;
}

/* Reduced motion — respetá la preferencia del usuario. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
