/*
  Reset y estilos globales de elementos HTML. Nada específico de una
  sección vive acá — eso va en sections.css.
*/

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-black);
  color: var(--color-ivory);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

a {
  color: var(--color-purple-light);
  text-decoration: none;
}
a:hover {
  color: var(--color-ivory);
}

button {
  font-family: inherit;
}

::selection {
  background: var(--color-purple);
  color: #fff;
}

/* Foco visible y consistente para navegación por teclado en cualquier elemento interactivo */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-purple-light);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3, p {
  margin: 0;
}

/* ---- Keyframes compartidos entre componentes ---- */
@keyframes drawLine {
  from { stroke-dashoffset: 5200; }
  to   { stroke-dashoffset: 0; }
}

@keyframes floatUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroDrift {
  from { transform: scale(1.06) translate(0, 0); }
  to   { transform: scale(1.14) translate(-1.6%, -1.2%); }
}

/* Respeta la preferencia del sistema operativo: apaga toda animación/transición */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
