/* Osprey — base: reset, cabecera, geometria de fondo y firma. Los valores salen de los tokens del theme (theme.json), nunca de un literal. */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;           /* la geometria de fondo sale del viewport */
}

a { color: var(--cian-texto); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--acento);
  outline-offset: 3px;
  border-radius: 3px;
}

h1, h2, h3 {
  font-family: var(--fuente-titulo);
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

.env { max-width: var(--ancho); margin: 0 auto; padding: 0 var(--borde-pagina); }

/* ═══════════════════════════ cabecera ═══════════════════════════════ */

.cabecera { position: relative; z-index: 2; }
.cabecera .env {
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.marca {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
  color: var(--tinta);
  white-space: nowrap;
}
.marca b {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.marca span {
  font-size: 19px;
  font-weight: 400;
  color: var(--tinta-suave);
  letter-spacing: -.01em;
}

.navegacion { display: flex; gap: 46px; }
.navegacion a {
  font-size: 15px;
  font-weight: 400;
  color: var(--tinta-suave);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
.navegacion a:hover { color: var(--tinta); }

/* ═══════════════════════ geometria de fondo ═════════════════════════ */

/* Papel tecnico: arcos, ejes y nodos. Jamas compite con el contenido. */
.trama {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.trama svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.trama .linea { fill: none; stroke: var(--acento-linea); stroke-width: 1; }
.trama .nodo  { fill: var(--acento); opacity: .2; }
.trama .nodo-hueco { fill: none; stroke: var(--acento-linea); stroke-width: 1; }

/* ═══════════════════════════ firma ══════════════════════════════════ */

.firma {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 20px 40px;
}
.firma p {
  margin: 0 auto;
  max-width: none;
  font-size: 13px;
  color: var(--tinta-tenue);
}
.firma a { color: var(--cian-texto); text-decoration: none; }
.firma a:hover { text-decoration: underline; }

/* ═══════════════════════════════ pie ════════════════════════════════ */

.pie {
  position: relative; z-index: 1;
  margin-top: 80px; border-top: 1px solid var(--borde-tenue);
  padding: 30px 0 44px; font-size: 14px; color: var(--tinta-suave);
}
.pie.pegado { margin-top: 0; border-top: 0; }
.pie .env { display: flex; flex-wrap: wrap; gap: 12px 40px; justify-content: space-between; }
.pie p { margin: 0; max-width: 62ch; }

/* ══════════════════════════ responsive ══════════════════════════════ */

@media (max-width: 1024px) {
  .navegacion { gap: 30px; }
}

@media (max-width: 720px) {
  .cabecera .env { height: 72px; }
  .marca b { font-size: 23px; }
  .marca span { display: none; }
  /* En movil la navegacion pasa a una segunda linea, con todos sus enlaces:
     las secciones de la portada estan lejos y hay que poder saltar a ellas.
     Cada enlace tiene 44px de alto para el pulgar. */
  .cabecera .env { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 6px; row-gap: 2px; }
  .navegacion { width: 100%; justify-content: center; gap: 4px 14px; flex-wrap: wrap; }
  .navegacion a { font-size: 14px; padding: 12px 4px; }
  .trama { opacity: .5; }
}
