/* ============================================================
   MAIN.CSS
   Reset moderno + elementos base + utilidades reutilizables.
   Este archivo NO contiene estilos de ninguna sección específica.
   Cada sección tiene su propio archivo:
   navbar.css, hero.css, addon.css, community.css, footer.css.
   ============================================================ */

/* ---------- Reset moderno ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-width: thin;
  scrollbar-color: var(--color-green-dark) var(--color-bg-secondary);
  /* Aplica a todos los enlaces de ancla del sitio (Navbar, indicador
     flotante de addons.html, etc.) — un solo sistema global en vez de
     que cada página implemente el suyo. prefers-reduced-motion (más
     abajo) ya lo desactiva cuando corresponde. */
  scroll-behavior: smooth;
}

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

body {
  background-color: var(--color-bg-primary);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}

/* ---------- Tipografía general ---------- */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  color: var(--color-text-primary);
}

p {
  color: var(--color-text-secondary);
  line-height: var(--lh-relaxed);
}

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

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

/* ---------- Botones base ---------- */

button {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  appearance: none;
}

/* ---------- Imágenes y video ---------- */

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

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

ul,
ol {
  list-style: none;
}

/* ---------- Contenedores ---------- */

.container {
  width: 100%;
  max-width: var(--max-width-container);
  margin-inline: auto;
  padding-inline: var(--space-sm);
}

/* ---------- Scrollbar personalizada (WebKit) ---------- */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background-color: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
  background-color: var(--color-green-dark);
  border-radius: var(--radius-button);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-green);
}

/* ---------- Selección de texto ---------- */

::selection {
  background-color: var(--color-green);
  color: var(--color-bg-primary);
}

/* ---------- Utilidades reutilizables ---------- */

.eyebrow {
  color: var(--color-green);
  font-family: var(--font-body);
  font-weight: var(--fw-medium);
  font-size: var(--fs-sm);
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Foco visible (accesibilidad) ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-green-hover);
  outline-offset: 3px;
  border-radius: var(--radius-button);
}

/* ---------- Reducción de movimiento ---------- */

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