/**
 * RIDER TRIP MÉXICO - Estilos Base y Normalización
 */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--rt-white);
  color: var(--rt-gray-text);
  font-family: var(--rt-font);
  font-weight: var(--fw-regular);
  font-size: var(--fs-body);
  line-height: 1.65;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Skip link para accesibilidad WCAG */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--rt-red);
  color: var(--rt-white);
  padding: 12px 20px;
  z-index: 9999;
  font-weight: var(--fw-bold);
  border-radius: var(--rt-radius-sm);
  text-decoration: none;
  transition: top var(--rt-transition-fast);
}

.skip-link:focus {
  top: 20px;
  outline: 3px solid var(--rt-white);
}

/* Indicadores de foco accesibles */
:focus-visible {
  outline: 3px solid var(--rt-blue);
  outline-offset: 3px;
}

/* Jerarquía Tipográfica Editorial */
h1, .h1 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-black);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--rt-black);
  margin-top: 0;
  margin-bottom: 1.25rem;
}

h2, .h2 {
  font-size: var(--fs-h2);
  font-weight: var(--fw-extrabold);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--rt-black);
  margin-top: 0;
  margin-bottom: 1rem;
}

h3, .h3 {
  font-size: var(--fs-h3);
  font-weight: var(--fw-bold);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--rt-black);
  margin-top: 0;
  margin-bottom: 0.85rem;
}

h4, .h4 {
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  line-height: 1.35;
  color: var(--rt-black);
  margin-top: 0;
  margin-bottom: 0.75rem;
}

p {
  margin-top: 0;
  margin-bottom: 1.25rem;
  max-width: 68ch;
}

p.lead-editorial {
  font-size: var(--fs-lead);
  font-weight: var(--fw-medium);
  line-height: 1.6;
  color: var(--rt-gray-text);
  margin-bottom: 1.75rem;
}

a {
  color: var(--rt-blue);
  text-decoration: none;
  transition: color var(--rt-transition-fast);
}

a:hover {
  color: var(--rt-blue-hover);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Etiquetas y Números Editoriales */
.editorial-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-label);
  font-weight: var(--fw-black);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--rt-red);
  margin-bottom: 0.75rem;
}

.editorial-kicker::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 3px;
  background-color: var(--rt-red);
  border-radius: 2px;
}

.editorial-kicker-blue {
  color: var(--rt-blue);
}

.editorial-kicker-blue::before {
  background-color: var(--rt-blue);
}

.editorial-number {
  font-size: 3.5rem;
  font-weight: var(--fw-black);
  line-height: 1;
  color: rgba(215, 25, 32, 0.2);
  display: block;
  margin-bottom: -0.5rem;
}

/* Modos y fondos */
.bg-rt-black {
  background-color: var(--rt-black) !important;
  color: var(--rt-white);
}

.bg-rt-black h1,
.bg-rt-black h2,
.bg-rt-black h3,
.bg-rt-black h4 {
  color: var(--rt-white);
}

.bg-rt-dark {
  background-color: var(--rt-dark) !important;
  color: var(--rt-white);
}

.bg-rt-dark h1,
.bg-rt-dark h2,
.bg-rt-dark h3,
.bg-rt-dark h4 {
  color: var(--rt-white);
}

.bg-rt-gray {
  background-color: var(--rt-gray-light) !important;
}

.text-rt-red {
  color: var(--rt-red) !important;
}

.text-rt-blue {
  color: var(--rt-blue) !important;
}

.text-rt-muted {
  color: var(--rt-gray-muted) !important;
}

/* Utilidades de Ancho Máximo */
.max-w-600 {
  max-width: 600px;
  width: 100%;
}

.max-w-700 {
  max-width: 700px;
  width: 100%;
}

.max-w-800 {
  max-width: 800px;
  width: 100%;
}

/* Centrado consistente de párrafos */
.text-center p,
p.text-center {
  margin-left: auto;
  margin-right: auto;
}

/* Textura Cartográfica / Técnica */
.pattern-grid {
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

.bg-rt-black .pattern-grid,
.bg-rt-dark .pattern-grid {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}
