/* Auris Reader - Sistema tipográfico
 *
 * Inter + escala modular 1.250 (Major Third).
 * Fuente de verdad: doc/imagen_corporativa/03_typography.md
 *
 * Headlines con tracking negativo (premium feel), body 1.65 line-height
 * para lectura cómoda (target del producto: lectores con fatiga visual).
 */

html {
  font-family: var(--font-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.65;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
}

/* ----- Headings ----- */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1, .h1 {
  font-size: var(--text-5xl);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

h2, .h2 {
  font-size: var(--text-4xl);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

h3, .h3 {
  font-size: var(--text-3xl);
  line-height: 1.2;
  font-weight: 600;
}

h4, .h4 {
  font-size: var(--text-2xl);
  line-height: 1.25;
  letter-spacing: -0.015em;
  font-weight: 600;
}

h5, .h5 {
  font-size: var(--text-xl);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h6, .h6 {
  font-size: var(--text-lg);
  line-height: 1.4;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ----- Body text ----- */

p {
  margin: 0 0 var(--space-4);
  line-height: 1.65;
}

p:last-child { margin-bottom: 0; }

.lead {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.5;
  font-weight: 400;
}

.eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: var(--space-3);
}

.caption {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.4;
}

.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent    { color: var(--accent); }

/* ----- Links ----- */

a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  text-decoration-thickness: 1px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--link-hover);
}

a:focus-visible {
  outline: 2px solid var(--color-yellow-brand);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* El <summary> de los acordeones FAQ (y cualquier <details> de las paginas
 * legales) no es <a> ni <button>, asi que no hereda el focus-visible de
 * arriba ni el de buttons.css. Mismo anillo amarillo de marca para que la
 * navegacion por teclado sea visible. */
summary:focus-visible {
  outline: 2px solid var(--color-yellow-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Links dentro de párrafos legítimos. Para botones, usar .btn que quita el subrayado. */

/* ----- Listas ----- */

ul, ol {
  padding-left: var(--space-6);
  margin: 0 0 var(--space-4);
}

li {
  margin-bottom: var(--space-2);
  line-height: 1.6;
}

/* ----- Código y citas ----- */

code, pre, kbd, samp {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  background: var(--bg-secondary);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  overflow-x: auto;
  line-height: 1.5;
}

pre code {
  background: transparent;
  padding: 0;
}

blockquote {
  margin: 0 0 var(--space-6);
  padding-left: var(--space-4);
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
  font-size: var(--text-lg);
  line-height: 1.5;
}

/* ----- Responsive tipografía ----- */

@media (max-width: 768px) {
  h1, .h1 { font-size: var(--text-4xl); }
  h2, .h2 { font-size: var(--text-3xl); }
  h3, .h3 { font-size: var(--text-2xl); }
  h4, .h4 { font-size: var(--text-xl); }
}

@media (max-width: 480px) {
  h1, .h1 { font-size: var(--text-3xl); }
  h2, .h2 { font-size: var(--text-2xl); }
}

/* ----- Accesibilidad: respeta prefers-reduced-motion ----- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
