/* Base: fuentes, paleta, reinicio y tipografía. La cargan todas las páginas. */

/* Fuentes (alojadas en la web; licencias OFL en assets/fonts) */

@font-face {
  font-family: "DynaPuff";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/dynapuff-400.woff2) format("woff2");
}

@font-face {
  font-family: "DynaPuff";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/dynapuff-500.woff2) format("woff2");
}

@font-face {
  font-family: "DynaPuff";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/dynapuff-600.woff2) format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/nunito-400.woff2) format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/nunito-700.woff2) format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/nunito-800.woff2) format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url(/assets/fonts/nunito-900.woff2) format("woff2");
}

@font-face {
  font-family: "Pixelify Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/pixelify-sans-400.woff2) format("woff2");
}

/* Paleta del estudio y letras. Los colores propios de cada dibujo viven junto a su dibujo. */

:root {
  --coffee: #3a2218;
  --cinnamon: #ac6345;
  --cream: #fff6e4;
  --milk: #fee9c3;
  --honey: #f4b942;
  --mint: #9bd8be;
  --pink: #f6a3b8;
  --lilac: #c7b5f0;
  --ink: #412b22;
  --ink-soft: #775644;
  --green: #365a4c;
  --clay: #823a2e;
  --display: "DynaPuff", "Arial Rounded MT Bold", sans-serif;
  --body: "Nunito", "Segoe UI", sans-serif;
  --pixel: "Pixelify Sans", monospace;
}

/* Reinicio */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  font: 16px/1.7 var(--body);
  color: var(--coffee);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

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

img {
  max-width: 100%;
  height: auto;
}

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

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

[hidden] {
  display: none !important;
}

/* Tipografía */

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1.16;
}

em {
  font-style: normal;
  color: var(--cinnamon);
}

/* Foco visible con teclado */

button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--cinnamon);
  outline-offset: 5px;
}

@media (max-width: 800px) {
  html {
    scroll-padding-top: 20px;
  }
}

/* Si el sistema pide menos movimiento, no hay animaciones. */

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

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