/* =====================================================================
   mediterraneum.eu — hoja única
   Editorial, blanco y negro, un acento azul mediterráneo oscuro.
   Sin sombras, sin degradados, sin fuentes externas.
   ===================================================================== */

:root {
  color-scheme: light dark;
  --tinta: #121212;
  --texto-2: #333;       /* entradillas y texto secundario */
  --gris: #555;          /* 7.4:1 sobre blanco */
  --filete: #c9c9c9;
  --papel: #fff;
  --acento: #0b3a5c;     /* azul mediterráneo oscuro, 11:1 sobre blanco */

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ancho: 68rem;
  --medida: 68ch;
}

/* Modo oscuro: automático según la preferencia del sistema (sin JS).
   Contrastes sobre #141414: tinta 15:1, gris 8:1, acento 10:1. */
@media (prefers-color-scheme: dark) {
  :root {
    --tinta: #e8e6e3;
    --texto-2: #cfccc8;
    --gris: #a9a6a1;
    --filete: #3b3b3b;
    --papel: #141414;
    --acento: #8cc4ec;   /* azul mediterráneo claro */
  }
}

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

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

body {
  margin: 0;
  background: var(--papel);
  color: var(--tinta);
  font: 1.125rem/1.6 var(--serif);
  font-kerning: normal;
}

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

a { color: var(--acento); text-underline-offset: 0.15em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; }

/* ---------- Saltar al contenido ---------- */
.saltar {
  position: absolute; left: -9999px; top: 0;
  background: var(--tinta); color: var(--papel); padding: 0.5rem 1rem;
  font-family: var(--sans);
}
.saltar:focus { left: 1rem; }

/* ---------- Cabecera / mancheta ---------- */
.cabecera, main, .pie {
  width: min(var(--ancho), 100% - 2rem);
  margin: 0 auto;
}

.cabecera { text-align: center; padding-top: 0.75rem; }

.mancheta {
  margin: 0.25rem 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  padding: 0.5rem 0 0.6rem;
}
.mancheta a { color: var(--tinta); text-decoration: none; }

.menu {
  border-top: 1px solid var(--tinta); border-bottom: 3px double var(--tinta);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0 1.75rem; position: relative;
}
.menu ul, .pie ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.75rem;
}
.menu ul { padding: 0.6rem 0; }
.menu a {
  font: 600 0.8125rem/1.4 var(--sans);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--tinta); text-decoration: none;
}
.menu a:hover, .menu a[aria-current="page"] { color: var(--acento); text-decoration: underline; }

.idiomas {
  margin: 0; padding: 0 0 0.6rem;
  font: 600 0.8125rem/1.4 var(--sans); letter-spacing: 0.1em;
}
.idiomas a { color: var(--tinta); }
.idiomas .actual { color: var(--gris); }
.idiomas .sep { color: var(--filete); margin: 0 0.35em; }
@media (min-width: 48em) {
  .idiomas { position: absolute; right: 0; top: 50%; transform: translateY(-50%); padding: 0; }
}

main { padding-top: 2.5rem; padding-bottom: 3rem; }

/* ---------- Piezas comunes ---------- */
.seccion {
  font: 600 0.8125rem/1.4 var(--sans);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--acento);
  border-top: 1px solid var(--tinta);
  padding-top: 0.5rem;
  margin: 0 0 1.5rem;
}

.antetitulo {
  margin: 0 0 0.5rem;
  font: 600 0.75rem/1.4 var(--sans);
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--acento);
}
.antetitulo a { text-decoration: none; }

.entradilla { color: var(--tinta); font-size: 1.125rem; margin: 0 0 0.75rem; }

.meta {
  margin: 0;
  font: 0.8125rem/1.4 var(--sans);
  color: var(--gris);
}

.pieza h2 a, .pieza h3 a, .destacado h3 a { color: var(--tinta); text-decoration: none; }
.pieza h2 a:hover, .pieza h3 a:hover, .destacado h3 a:hover { color: var(--acento); text-decoration: underline; }

/* ---------- Home ---------- */
.portada {
  max-width: 50rem;
  margin: 1rem auto 3.5rem;
  text-align: center;
}
.portada h1 {
  font-size: clamp(2.2rem, 6.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: 0.6em;
}
.subtitulo {
  font-size: 1.3125rem; line-height: 1.5; font-style: italic; color: var(--texto-2);
  max-width: var(--medida); margin: 0 auto;
}

/* Bloques de texto: etiqueta de sección a la izquierda en escritorio. */
.bloque { margin: 0 0 3rem; }
.bloque-texto { max-width: var(--medida); }
.bloque-texto > :last-child { margin-bottom: 0; }
@media (min-width: 60em) {
  .bloque { display: grid; grid-template-columns: 13rem minmax(0, 1fr); column-gap: 3rem; border-top: 1px solid var(--tinta); }
  .bloque > .seccion { border-top: 0; }
  .bloque-texto { padding-top: 0.5rem; }
}
.resalte { font-size: 1.3125rem; line-height: 1.5; margin: 0 0 1.75rem; }
.dos { display: grid; gap: 1.5rem; }
.dos h3 { font: 600 0.8125rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.75rem; }
@media (min-width: 48em) {
  .dos { grid-template-columns: 1fr 1fr; gap: 0; }
  .dos > :first-child { padding-right: 1.75rem; }
  .dos > :last-child { padding-left: 1.75rem; border-left: 1px solid var(--filete); }
}
.items { list-style: none; margin: 1rem 0 0; padding: 0; }
.items li { padding: 0.6rem 0; border-top: 1px solid var(--filete); font-size: 1.0625rem; }
.items li:first-child { border-top: 0; padding-top: 0; }
.pasos { list-style: none; margin: 0; padding: 0; counter-reset: paso; }
.pasos li { counter-increment: paso; position: relative; padding: 0.9rem 0 0.9rem 3.25rem; border-top: 1px solid var(--filete); }
.pasos li:first-child { border-top: 0; padding-top: 0; }
.pasos li::before {
  content: counter(paso);
  position: absolute; left: 0; top: 0.55rem;
  font: 400 2.25rem/1 var(--serif); color: var(--acento);
}
.pasos li:first-child::before { top: -0.35rem; }
.nota-mar { font-style: italic; color: var(--texto-2); border-left: 1px solid var(--tinta); padding-left: 1.25rem; margin-top: 1.5rem; }

.ultimos { margin-top: 3.5rem; }

.llamada {
  margin: 4rem auto 0; max-width: 44rem; text-align: center;
  padding: 2.25rem 0; border-top: 3px double var(--tinta); border-bottom: 1px solid var(--tinta);
}
.llamada h2 { font-size: clamp(1.75rem, 4vw, 2.25rem); font-weight: 400; }
.llamada p { margin: 0 0 1.25rem; font-size: 1.1875rem; }
.llamada p:last-child { margin: 0; }

.boton, .cuerpo .boton {
  display: inline-block;
  font: 600 0.875rem/1 var(--sans);
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--tinta); color: var(--papel);
  border: 1px solid var(--tinta); padding: 0.9rem 1.6rem;
  text-decoration: none;
}
.boton:hover { background: var(--acento); border-color: var(--acento); color: var(--papel); }

.destacado {
  padding-bottom: 2rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--tinta);
}
.destacado h3 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 22ch;
}
.destacado .entradilla { font-size: 1.3125rem; max-width: var(--medida); }

/* Rejilla: 1 columna en móvil, 2 en escritorio; aguanta 3 o 30 piezas. */
.rejilla { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; }
.rejilla > li { padding: 1.25rem 0; border-top: 1px solid var(--filete); }
.rejilla > li:first-child { border-top: 0; padding-top: 0; }
.pieza h3 { font-size: 1.5rem; }
.pieza .entradilla { font-size: 1.0625rem; color: var(--texto-2); }

@media (min-width: 48em) {
  .rejilla { grid-template-columns: 1fr 1fr; column-gap: 0; }
  .rejilla > li { padding: 1.5rem 2rem 1.5rem 0; }
  .rejilla > li:nth-child(even) { padding: 1.5rem 0 1.5rem 2rem; border-left: 1px solid var(--filete); }
  .rejilla > li:nth-child(-n+2) { border-top: 0; padding-top: 0; }
}

.todos {
  margin: 1.5rem 0 0; padding-top: 1rem;
  border-top: 1px solid var(--tinta);
  font: 600 0.875rem/1.4 var(--sans);
}


/* ---------- Blog ---------- */
.cabecera-pagina { max-width: var(--medida); margin: 0 auto 2rem; text-align: center; }
.cabecera-pagina h1 { font-size: clamp(2.25rem, 6vw, 3.25rem); font-weight: 400; }
.cabecera-pagina .entradilla { color: var(--gris); font-style: italic; }

.lista { list-style: none; margin: 0 auto; padding: 0; max-width: var(--medida); }
.lista > li { padding: 1.5rem 0; border-top: 1px solid var(--filete); }
.lista > li:first-child { border-top: 1px solid var(--tinta); }
.lista h2 { font-size: 1.75rem; margin-top: 0.35rem; }

/* ---------- Artículo y páginas: una columna, ~68 caracteres ---------- */
.articulo { max-width: var(--medida); margin: 0 auto; }
.articulo > header { text-align: center; margin-bottom: 2.25rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--tinta); }
.articulo h1 { font-size: clamp(2.1rem, 6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.01em; }
.articulo > header .entradilla { font-size: 1.3125rem; font-style: italic; color: var(--texto-2); }

.cuerpo { font-size: 1.1875rem; line-height: 1.65; }
.cuerpo > :first-child { margin-top: 0; }
.cuerpo p, .cuerpo ul, .cuerpo ol { margin: 0 0 1.1em; }
.cuerpo h2 { font-size: 1.5rem; margin: 2em 0 0.6em; }
.cuerpo h3 { font-size: 1.25rem; margin: 1.6em 0 0.5em; }
.cuerpo li { margin-bottom: 0.3em; }
.cuerpo blockquote {
  margin: 2em 0; padding: 1em 0;
  border-top: 1px solid var(--tinta); border-bottom: 1px solid var(--tinta);
  font-size: 1.4375rem; line-height: 1.4; font-style: italic; text-align: center;
}
.cuerpo blockquote p { margin: 0; }
.cuerpo code { font-size: 0.9em; }

.enlaces { font: 600 0.875rem/1.4 var(--sans); text-align: center; }
.enlaces span { margin: 0 0.5rem; color: var(--gris); }
.actualizacion { font: 0.875rem/1.4 var(--sans); color: var(--gris); margin-top: 2.5rem !important; }

.articulo > footer {
  margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--tinta);
  font: 600 0.875rem/1.4 var(--sans);
}

/* ---------- Contacto ---------- */
.contacto-email {
  font-family: var(--sans); margin: 2rem 0 0; padding: 1rem 0;
  border-top: 1px solid var(--tinta); border-bottom: 1px solid var(--filete);
}
.contacto-email span { display: block; font: 600 0.8125rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.4rem; }
.contacto-email a { font-size: 1.25rem; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Tablas (política de cookies) ---------- */
.cuerpo table { width: 100%; border-collapse: collapse; font: 0.875rem/1.4 var(--sans); margin: 1rem 0 1.5rem; display: block; overflow-x: auto; }
.cuerpo th, .cuerpo td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--filete); vertical-align: top; }
.cuerpo th { border-bottom: 1px solid var(--tinta); font-weight: 600; }

/* ---------- Banner de cookies ---------- */
.cookies {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  background: var(--papel); color: var(--tinta);
  border-top: 3px double var(--tinta);
  padding: 1rem max(1rem, calc((100% - var(--ancho)) / 2));
  font: 0.9375rem/1.5 var(--sans);
}
.cookies[hidden] { display: none; }
.cookies h2 { font: 600 0.8125rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 0.4rem; }
.cookies p { margin: 0 0 0.75rem; max-width: 52rem; }
.cookies-botones { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0 !important; }
/* Aceptar y Rechazar, con el mismo peso visual (lo exige la AEPD). */
.cookies button {
  font: 600 0.875rem/1 var(--sans);
  text-transform: uppercase; letter-spacing: 0.1em;
  background: var(--tinta); color: var(--papel);
  border: 1px solid var(--tinta); border-radius: 0;
  padding: 0.8rem 1.4rem; cursor: pointer; min-width: 9rem;
}
.cookies button:hover { background: var(--acento); border-color: var(--acento); }
.cookies button:focus-visible, button.enlace:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; }
/* Botón "Cookies" del pie, con aspecto de enlace. */
button.enlace {
  font: inherit; color: var(--tinta); background: none; border: 0; padding: 0;
  text-decoration: underline; cursor: pointer;
}

/* ---------- Pie ---------- */
.pie {
  border-top: 3px double var(--tinta);
  padding-top: 1.25rem; padding-bottom: 2.5rem;
  text-align: center;
  font: 0.8125rem/1.5 var(--sans);
  color: var(--gris);
}
.pie p { margin: 0 0 0.75rem; }
.pie-texto { max-width: 40rem; margin-left: auto !important; margin-right: auto !important; }
.pie ul { margin-bottom: 0.75rem; }
.pie a { color: var(--tinta); }

@media print {
  :root {
    --tinta: #000; --texto-2: #333; --gris: #555; --filete: #bbb;
    --papel: #fff; --acento: #000;
  }
  .menu, .saltar, .pie nav, .cookies { display: none; }
  body { font-size: 11pt; }
  a { color: inherit; }
}
