/* ==========================================================================
   Graduaciones Vázquez 2026 — Base
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--cabecera-alto) + 1rem);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--f-texto);
  font-size: var(--t-base);
  line-height: var(--alto-texto);
  color: var(--texto);
  background: var(--fondo);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;   /* clip, no hidden: hidden crea contexto de scroll y
                         rompe position:sticky en los hijos */
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--e-4);
  font-family: var(--f-titulo);
  font-weight: var(--peso-negro);
  line-height: var(--alto-titulo);
  letter-spacing: -0.022em;
  color: var(--texto);
  text-wrap: balance;
}
h1 { font-size: var(--t-3xl); line-height: var(--alto-apretado); letter-spacing: -0.032em; }
h2 { font-size: var(--t-2xl); letter-spacing: -0.028em; }
h3 { font-size: var(--t-lg); font-weight: var(--peso-semi); }
h4 { font-size: var(--t-md); font-weight: var(--peso-semi); letter-spacing: -0.012em; }
h5, h6 { font-size: var(--t-base); font-weight: var(--peso-semi); letter-spacing: 0; }

p { margin: 0 0 var(--e-4); text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a { color: var(--acento); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

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

ul, ol { margin: 0 0 var(--e-4); padding-left: 1.35em; }
li { margin-bottom: var(--e-2); }
li:last-child { margin-bottom: 0; }

blockquote { margin: var(--e-6) 0; padding-left: var(--e-5); border-left: 3px solid var(--vino); }

hr { border: 0; border-top: 1px solid var(--linea); margin: var(--e-7) 0; }

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

table { width: 100%; border-collapse: collapse; }
th, td { padding: var(--e-3) var(--e-4); text-align: left; border-bottom: 1px solid var(--linea); }
th { font-weight: var(--peso-semi); font-family: var(--f-titulo); }

:focus-visible {
  outline: 3px solid var(--vino);
  outline-offset: 3px;
  border-radius: 3px;
}
.tono-oscuro :focus-visible, .tono-vino :focus-visible { outline-color: #FFFFFF; }

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

/* ---------- utilidades de estructura ---------- */
.contenedor { width: 100%; max-width: var(--ancho); margin-inline: auto; padding-inline: var(--canal); }
.contenedor--ancho { max-width: var(--ancho-max); }
.contenedor--angosto { max-width: 58rem; }

.seccion { padding-block: var(--seccion); }
.seccion--corta { padding-block: calc(var(--seccion) * .62); }

.medida { max-width: var(--medida); }

/* Solo para lectores de pantalla */
.oculto-visual {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.saltar {
  position: absolute; left: var(--e-4); top: -100px;
  z-index: 999; padding: var(--e-3) var(--e-5);
  background: var(--vino); color: #fff; border-radius: var(--r-md);
  font-weight: var(--peso-semi); text-decoration: none;
  transition: top var(--ms-rapido) var(--curva);
}
.saltar:focus { top: var(--e-4); }

/* ---------- encabezado de sección ---------- */
.gorro {
  display: inline-flex; align-items: center; gap: var(--e-2);
  font-family: var(--f-titulo);
  font-size: var(--t-xs); font-weight: var(--peso-semi);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--acento);
  margin-bottom: var(--e-4);
}
.gorro::before {
  content: ''; width: 1.75rem; height: 2px; flex: none;
  background: currentColor; border-radius: 2px;
}

.encabezado-seccion { max-width: 46rem; margin-bottom: var(--e-7); }
.encabezado-seccion--centro { margin-inline: auto; text-align: center; }
.encabezado-seccion--centro .gorro::before { display: none; }
.encabezado-seccion p {
  font-size: var(--t-md); color: var(--texto-2); line-height: 1.62;
  margin-top: var(--e-4);
}

/* Destello: el <em> del título va en vino con un subrayado suave.
   white-space: nowrap evita que el trazo se parta entre dos renglones. */
h1 em, h2 em, .destello {
  font-style: normal;
  color: var(--acento);
  position: relative;
  white-space: nowrap;
}
h1 em::after, h2 em::after, .destello::after {
  content: ''; position: absolute;
  left: -.04em; right: -.04em; bottom: .02em; height: .26em;
  background: currentColor; opacity: .16; border-radius: .1em;
  z-index: -1;
}

/* ---------- tipografía de artículo ---------- */
.articulo > * { max-width: 42rem; margin-inline: auto; }
.articulo > h2 { margin-top: var(--e-7); margin-bottom: var(--e-4); }
.articulo > h3 { margin-top: var(--e-6); }
.articulo > p, .articulo > ul, .articulo > ol { font-size: var(--t-md); color: var(--texto-2); }
.articulo > ul, .articulo > ol { margin-bottom: var(--e-5); }
.articulo li::marker { color: var(--acento); font-weight: var(--peso-semi); }
.articulo > blockquote {
  font-family: var(--f-acento); font-size: var(--t-lg); font-style: italic;
  color: var(--texto); line-height: 1.45;
}
.articulo > figure { max-width: 52rem; margin-block: var(--e-7); }
.articulo figcaption {
  font-size: var(--t-sm); color: var(--texto-3); margin-top: var(--e-3); text-align: center;
}
