/* =========================================================================
   Mi Vínculo — Base
   Reset, tipografías auto-alojadas, elementos HTML y foco.
   Depende de tokens.css. Documentación: docs/sistema-diseno.md §2.3 y §4
   ========================================================================= */

/* -------------------------------------------------------------------------
   Tipografías (SIL OFL 1.1, licencias en assets/fuentes/)
   Variables: un solo archivo cubre todos los pesos del rango.
   ------------------------------------------------------------------------- */

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fuentes/figtree-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../assets/fuentes/figtree-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fuentes/fraunces-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/fuentes/fraunces-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------------------
   Reset
   ------------------------------------------------------------------------- */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Compensa la cabecera fija al saltar a un ancla */
  scroll-padding-top: 6rem;
}

body {
  min-height: 100vh;
  background-color: var(--mv-fondo);
  color: var(--mv-texto);
  font-family: var(--mv-fuente-ui);
  font-size: var(--mv-texto-base);
  line-height: var(--mv-interlinea-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

button {
  background: none;
  border: none;
  cursor: pointer;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

/* -------------------------------------------------------------------------
   Tipografía de elementos
   Fraunces solo en h1/h2 (y solo en tono cálido: el tono institucional
   reasigna --mv-fuente-titulo-activa a la familia de UI).
   ------------------------------------------------------------------------- */

h1,
h2 {
  font-family: var(--mv-fuente-titulo-activa);
  font-optical-sizing: auto;
  font-weight: var(--mv-peso-fuerte);
  line-height: var(--mv-interlinea-compacta);
  letter-spacing: var(--mv-espaciado-titulo);
  text-wrap: balance;
}

h3,
h4,
h5,
h6 {
  font-family: var(--mv-fuente-ui);
  font-weight: var(--mv-peso-semi);
  line-height: 1.3;
  text-wrap: balance;
}

h1 {
  font-size: var(--mv-texto-5xl);
}
h2 {
  font-size: var(--mv-texto-3xl);
}
h3 {
  font-size: var(--mv-texto-xl);
}
h4 {
  font-size: var(--mv-texto-base);
}

p {
  max-width: var(--mv-ancho-texto);
}

strong,
b {
  font-weight: var(--mv-peso-semi);
}

small {
  font-size: var(--mv-texto-2xs);
}

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

hr {
  border: none;
  border-top: 1px solid var(--mv-borde);
}

::selection {
  background-color: var(--mv-ambar-100);
  color: var(--mv-tinta-900);
}

/* -------------------------------------------------------------------------
   Foco — visible siempre. Prohibido `outline: none` sin sustituto.
   ------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--mv-foco);
  outline-offset: 2px;
  border-radius: var(--mv-radio-xs);
}

/* -------------------------------------------------------------------------
   Movimiento reducido
   ------------------------------------------------------------------------- */

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

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