/*
  Cornelia Tulum — reseteo moderno y base del documento.
  Depende de tokens.css (debe cargarse después de él).
*/

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

* {
  margin: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--cor-tinta);
  color: var(--cor-papel);
  font-family: var(--fuente-cuerpo);
  font-size: var(--tipo-base);
  line-height: var(--linea-normal);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  font-family: var(--fuente-display);
  line-height: var(--linea-ajustada);
  font-weight: 600;
}

p {
  max-width: 65ch;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

input,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* `hidden` es una decisión del documento (JS la pone cuando un enlace no tiene destino real,
   p. ej. menu-pdf sin URL): ningún `display` de ningún componente debe poder ganarle, o el
   botón muerto se ve y queda publicado — ver INFORME-ui.md ronda 3. */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--cor-amarillo);
  outline-offset: 3px;
}

::selection {
  background: var(--cor-rosa);
  color: var(--cor-tinta);
}

/* El ancla no debe quedar tapada por la barra fija en ninguna sección */
section[id] {
  scroll-margin-top: var(--nav-alto);
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
