/* ekaitz.es — ELEMENTOS COMUNES: cabecera, menú del móvil y pie.
   Única fuente de estos estilos (norma de Ekaitz, 09-10: lo que se repite en varias páginas
   vive en un solo sitio). El HTML está en elementos/ y lo vuelca en todas las páginas
   herramientas/elementos.py, que lanza el despliegue antes de subir.
   Lo usan todas las páginas de la web y también /palmira/, que tiene sus propios estilos:
   por eso aquí no se depende de .pliego ni de variables de tipografía, solo de los colores
   (--papel, --tinta, --tinta-suave, --hilo, --hilo-fino, --granate), que define cada página. */

@font-face {
  font-family: "Noto Serif";
  src: url("/assets/fonts/notoserif-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- modo oscuro: la web tiene el suyo (tinta) ----------
   El modo nocturno de Brave y el oscurecido automático de Chrome y Samsung Internet invierten
   a ojo las webs que no declaran un modo oscuro propio: la tarjeta crema salía oscura (12-10).
   La etiqueta color-scheme de elementos/cabeza.html dice que la web tiene claro y oscuro; aquí
   se pide que no se oscurezca nunca: en papel se ve papel y en tinta, la tinta diseñada. */
:root { color-scheme: only light; }
:root[data-tema="tinta"] { color-scheme: dark; }

.cabecera-int, .pie-int {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: clamp(1.25rem, 4vw, 3rem);
  padding-right: clamp(1.25rem, 4vw, 3rem);
}

/* ---------- cabecera ---------- */

.cabecera {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--papel) 88%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--hilo-fino);
}
.cabecera-int {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 0.3rem; /* el aire lo ponen los enlaces, de 44 px de alto */
  padding-bottom: 0.3rem;
}
.marca { display: block; padding: 12px 0; color: var(--tinta); } /* área táctil 44 px */
.marca svg { display: block; height: 20px; width: auto; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-family: "Noto Serif", Georgia, serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  display: inline-block;
  padding: 0.75rem 0; /* área táctil 44 px */
  text-transform: uppercase;
  text-decoration: none;
  color: var(--tinta-suave);
  transition: color 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--granate); }

.toggle-tema {
  appearance: none;
  border: 1px solid var(--hilo);
  background: transparent;
  color: var(--tinta);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}
.toggle-tema:hover { border-color: var(--granate); transform: rotate(180deg); }
.toggle-tema svg { width: 14px; height: 14px; }
.toggle-tema::before { content: ""; position: absolute; inset: -7px; } /* área táctil 44 px sin cambiar el dibujo */
.toggle-texto { display: none; }

/* ---------- menú del móvil: tres rayas que despliegan las páginas, contacto y el tema ---------- */

.menu-boton {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--tinta);
  width: 44px;
  height: 44px;
  margin-right: -10px;
  place-items: center;
  cursor: pointer;
}
.menu-boton svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.menu-boton .ico-cerrar, .menu-boton[aria-expanded="true"] .ico-menu { display: none; }
.menu-boton[aria-expanded="true"] .ico-cerrar { display: block; }

@media (max-width: 720px) {
  .menu-boton { display: grid; }
  .cabecera .nav { display: none; }
  .cabecera .nav.abierta {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 0.4rem clamp(1.25rem, 4vw, 3rem) 1rem;
    background: var(--papel);
    border-bottom: 1px solid var(--hilo);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }
  .cabecera .nav.abierta a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0;
    font-size: 0.8rem;
    border-bottom: 1px solid var(--hilo-fino);
  }
  .cabecera .nav.abierta .toggle-tema {
    width: auto;
    height: 48px;
    border: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: flex-start;
    font: 600 0.8rem/1 "Noto Serif", Georgia, serif;
    letter-spacing: 0.17em;
    text-transform: uppercase;
    color: var(--tinta-suave);
  }
  .cabecera .nav.abierta .toggle-tema:hover { transform: none; color: var(--granate); }
  .cabecera .nav.abierta .toggle-tema::before { display: none; }
  .cabecera .nav.abierta .toggle-texto { display: inline; }
}

/* ---------- pie: franja fina invertida, a todo el ancho ----------
   Oscura en papel y clara en tinta (se invierten papel y tinta). Mide la mitad que la
   cabecera (unos 27 px). Contenido alineado con el de la web: lo legal a la izquierda
   (aviso legal y, si algún día hay, cookies) y el copyright a la derecha. */

.pie { background: var(--tinta); color: var(--papel); }
.pie-int {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  flex-wrap: wrap;
  min-height: 27px;
  font-family: "Noto Serif", Georgia, serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}
.pie-legal { display: flex; gap: 1.6rem; }
.pie a { color: inherit; text-decoration: none; display: inline-block; padding: 0.35rem 0; } /* 27 px de alto: supera los 24 de la norma */
.pie a:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.pie-copy { margin: 0; padding: 0.35rem 0; }
.pie a:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
