/* ==========================================================================
   base.css — Reset mínimo y estilos globales
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--color-text);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--dur-hover) var(--ease-out);
}

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

a:focus-visible {
  outline: 2px solid var(--brand-blue);
  outline-offset: 3px;
}

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

/* Aparición sutil al hacer scroll.
   Solo se activa si hay JS (clase .js en <html>); sin JS todo se ve normal. */
.js .reveal {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition:
    opacity var(--dur-reveal) var(--ease-out),
    transform var(--dur-reveal) var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

/* Contenedor centrado reutilizable */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: var(--section-y) var(--gutter);
}

/* Etiqueta pequeña en mayúsculas */
.label {
  margin: 0 0 24px;
  font-size: var(--fs-label);
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-muted);
}

/* Etiqueta en azul ALGOLOCAL (texto) */
.label--blue {
  color: var(--brand-blue);
}

.label--red {
  color: var(--brand-red);
}

/* Etiqueta con un punto de color de marca antes del texto.
   Para verde y amarillo se usa el punto y no el texto: en letra tan pequeña
   no tienen contraste suficiente sobre blanco. */
.label--dot {
  display: flex;
  align-items: center;
  gap: 10px;
}

.label--dot::before {
  content: "";
  flex: none;
  width: var(--dot-size-sm);
  height: var(--dot-size-sm);
  border-radius: 50%;
  background: var(--label-dot, var(--brand-blue));
}

.label--dot-red { --label-dot: var(--brand-red); }
.label--dot-green { --label-dot: var(--brand-green); }
.label--dot-blue { --label-dot: var(--brand-blue); }
.label--dot-yellow { --label-dot: var(--brand-yellow); }

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
