/* Base: reset, tipografía del documento, foco y preferencias de movimiento.
   Parte de styles/ — se cargan en orden desde index.html. */

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

html {
  -webkit-text-size-adjust: 100%;
  /* Los enlaces internos los suaviza el navegador. No hay scroll suave por
     JS: se probó con Lenis y con trackpad iba siempre por detrás del dedo
     (ver el comentario en js/motion/index.js). */
  scroll-behavior: smooth;
}

/* Deja libre la barra fija al aterrizar en una sección. Antes esto lo hacía
   el `offset: -60` de Lenis. */
#fechas, #residente, #terraza, #archivo {
  scroll-margin-top: 3.75rem;
}

body {
  margin: 0;
  background: var(--noche);
  color: var(--hueso);
  font-family: var(--body);
  font-size: clamp(1rem, .95rem + .25vw, 1.125rem);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--oro); color: var(--noche); }

/* Los revelados sólo se ocultan si hay JS; sin JS el contenido se ve completo.
   La clase .js la pone un script inline en el <head>. */
.js [data-reveal] { opacity: 0; }

/* Menos movimiento: lo global vive aquí; lo que toca al cielo, en ambient.css. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}
