/**
 * @file base.css
 * @description Reset moderno, tipografía base y utilidades universales
 * @copyright 2026 Custom AI Solutions Lab SL. All Rights Reserved.
 */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--rl-bone);
  color: var(--rl-carbon);
}

body {
  font-family: var(--font-sans);
  background-color: var(--rl-bone);
  color: var(--rl-carbon);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Selección de texto sobria */
::selection {
  background: var(--rl-carbon);
  color: var(--rl-white);
}

/* Accesibilidad: foco visible sin outline tosco */
:focus-visible {
  outline: 2px solid var(--rl-carbon);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

/* Tipografía */
h1, h2, h3, h4, h5, h6 {
  color: var(--rl-carbon);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

p {
  color: var(--rl-carbon-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
}

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

/* Contenedor centralizado Rootline */
.rootline-container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 768px) {
  .rootline-container {
    padding: 0 2.5rem;
  }
}

/* Botones estilo píldora Rootline */
.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-pill-primary {
  background-color: var(--rl-carbon);
  color: var(--rl-white);
  border: 1px solid var(--rl-carbon);
}

.btn-pill-primary:hover {
  background-color: #262626;
  border-color: #262626;
  transform: translateY(-1px);
}

.btn-pill-secondary {
  background-color: var(--rl-white);
  color: var(--rl-carbon);
  border: 1px solid var(--rl-light-gray);
}

.btn-pill-secondary:hover {
  background-color: var(--rl-bone-warm);
  border-color: #d8d8d8;
  transform: translateY(-1px);
}

/* Badge de Kicker / Categoría */
.kicker-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--rl-carbon-muted);
  margin-bottom: var(--space-4);
}

.kicker-badge .kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--rl-emerald);
}

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