/* Maiktrack - Base: variables, reinicio, tipografia y estructura.
   Se conserva la identidad naranja sobre azul oscuro de la version anterior. */

:root {
  /* Alto de la cabecera pegajosa. Lo usan los avisos flotantes para
     colocarse debajo y no taparla. */
  --altura-cabecera: 68px;

  --primary: #FF6B00;
  --primary-dark: #E05E00;
  --primary-light: #FF8533;
  --primary-soft: rgba(255, 107, 0, 0.08);
  --secondary: #1A1A2E;
  --accent: #16213E;

  --success: #0E9F55;
  --warning: #B87503;
  --danger: #C62828;
  --info: #1668A8;

  --bg-primary: #FFFFFF;
  --bg-secondary: #F6F7F9;
  --bg-tertiary: #E9ECEF;
  --text-primary: #16192B;
  --text-secondary: #5A6273;
  --text-light: #8A91A0;
  --border: #DEE2E6;

  --shadow: 0 2px 8px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.14);

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;

  --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --ancho-max: 1180px;
}

[data-theme="dark"] {
  --primary-soft: rgba(255, 107, 0, 0.14);
  --success: #35D07F;
  --warning: #F0B429;
  --danger: #FF6B6B;
  --info: #4FB3F0;

  --bg-primary: #0D1117;
  --bg-secondary: #161B22;
  --bg-tertiary: #21262D;
  --text-primary: #F0F6FC;
  --text-secondary: #A6B0BF;
  --text-light: #6E7681;
  --border: #30363D;

  --shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
}

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

body,
h1, h2, h3, h4, p, figure, blockquote, dl, dd { margin: 0; }

ul[class], ol[class] { list-style: none; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }

/* Respeta a quien pide menos animacion en su sistema. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ------------------------------------------------------------------ */
/* Tipografia                                                          */
/* ------------------------------------------------------------------ */

h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
h3 { font-size: 1.2rem; }

.texto-apagado { color: var(--text-secondary); }
.texto-pequeno { font-size: 0.875rem; }
.texto-minimo { font-size: 0.8125rem; }

a { color: var(--primary); }
a:hover { color: var(--primary-dark); }

/* ------------------------------------------------------------------ */
/* Estructura                                                          */
/* ------------------------------------------------------------------ */

.contenedor {
  width: 100%;
  max-width: var(--ancho-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.seccion { padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.seccion--clara { background: var(--bg-primary); }

.rejilla { display: grid; gap: 20px; }
.rejilla--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.rejilla--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.rejilla--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

.fila { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.fila--fin { justify-content: flex-end; }
.fila--entre { justify-content: space-between; }

.apilado { display: grid; gap: 16px; }

/* Contenido visible solo para lectores de pantalla. */
.solo-lectores {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Enlace de salto, visible al tabular. */
.salto-contenido {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: top var(--transition);
}
.salto-contenido:focus { top: 12px; color: #fff; }

.oculto { display: none !important; }

/* Foco visible y coherente en todo el sitio. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
