/* =========================================================
   Jota Palacios — estilos globales
   Colores tomados del logo (assets/marca/logo.png)
   ========================================================= */

:root {
  /* Marca */
  --azul-profundo: #101b69;   /* tipografía del logo */
  --azul-indigo:   #3c43a1;   /* símbolo */
  --amarillo:      #ffdd15;   /* acentos del símbolo */

  /* Derivados */
  --tinta:         #1a1d33;
  --texto-suave:   #4a4f6a;
  --linea:         #e3e4ef;
  --fondo:         #ffffff;
  --fondo-alt:     #f5f5fb;
  --indigo-claro:  #ecedf8;

  /* Tipografía */
  --fuente-titulos: "Playfair Display", Georgia, "Times New Roman", serif;
  --fuente-texto:   "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Medidas */
  --ancho: 1120px;
  --gutter: 16px;
  --radio: 14px;
  --sombra: 0 10px 30px rgba(16, 27, 105, .08);
}

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

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

body {
  margin: 0;
  background: var(--fondo);
  color: var(--tinta);
  font-family: var(--fuente-texto);
  font-size: 1.0625rem;
  line-height: 1.7;
}

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

a { color: var(--azul-indigo); text-underline-offset: 3px; }
a:hover { color: var(--azul-profundo); }

:focus-visible { outline: 3px solid var(--amarillo); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--fuente-titulos);
  font-weight: 700;
  color: var(--azul-profundo);
  line-height: 1.12;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4rem); font-weight: 900; }
h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
h3 { font-size: 1.45rem; }
p  { margin: 0 0 1em; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 var(--gutter); }

.saltar {
  position: absolute; left: -9999px; top: 0;
  background: var(--azul-profundo); color: #fff; padding: .6em 1em; z-index: 100;
}
.saltar:focus { left: 1rem; top: 1rem; }

/* Etiqueta pequeña sobre los títulos */
.antetitulo {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--azul-indigo); margin-bottom: 1rem;
}
.antetitulo::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%;
  background: var(--amarillo); box-shadow: 6px 0 0 var(--azul-indigo);
  margin-right: 6px;
}

/* ---------- Botones ---------- */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.4em; border-radius: 999px;
  font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--azul-profundo);
  transition: background .2s, color .2s, transform .2s;
}
.boton:hover { transform: translateY(-1px); }
.boton-primario { background: var(--azul-profundo); color: #fff; }
.boton-primario:hover { background: var(--azul-indigo); border-color: var(--azul-indigo); color: #fff; }
.boton-secundario { background: transparent; color: var(--azul-profundo); }
.boton-secundario:hover { background: var(--amarillo); color: var(--azul-profundo); border-color: var(--azul-profundo); }

/* ---------- Encabezado ---------- */
.encabezado {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--linea);
}
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }
.marca img { height: 44px; width: auto; }

.menu-boton {
  display: none; background: none; border: 0; padding: 10px; cursor: pointer;
  color: var(--azul-profundo);
}
.menu-boton span { display: block; width: 26px; height: 3px; background: currentColor; margin: 5px 0; border-radius: 2px; transition: transform .2s, opacity .2s; }

.navegacion ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.6rem; }
.navegacion a {
  text-decoration: none; color: var(--tinta); font-weight: 600; font-size: 1rem;
  padding: .3em 0; border-bottom: 3px solid transparent;
}
.navegacion a:hover, .navegacion a[aria-current="page"] { color: var(--azul-profundo); border-bottom-color: var(--amarillo); }

@media (max-width: 880px) {
  .menu-boton { display: block; }
  .navegacion {
    position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--linea);
    display: none;
  }
  .navegacion.abierta { display: block; }
  .navegacion ul { flex-direction: column; gap: 0; padding: .5rem var(--gutter) 1rem; }
  .navegacion a { display: block; padding: .8em 0; border-bottom: 1px solid var(--linea); }
  .menu-boton[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-boton[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-boton[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* ---------- Secciones ---------- */
.seccion { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.seccion-alt { background: var(--fondo-alt); }
.seccion-oscura { background: var(--azul-profundo); color: #e8e9f6; }
.seccion-oscura h2, .seccion-oscura h3 { color: #fff; }
.seccion-oscura .antetitulo { color: var(--amarillo); }
.seccion-oscura a { color: var(--amarillo); }

.cabecera-seccion { max-width: 720px; margin-bottom: 2.5rem; }
.cabecera-seccion p { color: var(--texto-suave); font-size: 1.2rem; }
.seccion-oscura .cabecera-seccion p { color: #c9cbe8; }

/* ---------- Portada (hero) ---------- */
.portada { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.portada .contenedor { display: grid; grid-template-columns: 1.25fr .75fr; gap: 3rem; align-items: center; }
.portada h1 span { display: block; font-size: .5em; color: var(--azul-indigo); margin-top: .35em; }
.portada .lema {
  font-size: clamp(1.25rem, 2.4vw, 1.55rem); line-height: 1.45; color: var(--tinta);
  max-width: 34ch; margin-bottom: 1.2rem;
}
.portada .bio { color: var(--texto-suave); max-width: 46ch; }
.acciones { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.portada-visual { position: relative; justify-self: center; width: min(100%, 380px); aspect-ratio: 1; }
.portada-visual .foto {
  position: absolute; inset: 8%;
  border-radius: 50%; overflow: hidden;
  background: var(--indigo-claro);
  display: grid; place-items: center;
  border: 6px solid #fff; box-shadow: var(--sombra);
}
.portada-visual .foto picture { display: block; width: 100%; height: 100%; }
.portada-visual .foto img:not(.marcador) { width: 100%; height: 100%; object-fit: cover; }
.portada-visual .foto .marcador { width: 46%; opacity: .9; }
.portada-visual::before, .portada-visual::after {
  content: ""; position: absolute; border-radius: 50%;
}
.portada-visual::before { width: 26%; height: 26%; background: var(--amarillo); top: 0; right: 4%; }
.portada-visual::after  { width: 16%; height: 16%; background: var(--azul-indigo); bottom: 6%; left: 0; }

@media (max-width: 820px) {
  .portada .contenedor { grid-template-columns: 1fr; gap: 2.5rem; }
  .portada-visual { order: -1; width: min(70%, 260px); }
}

/* ---------- La mirada ---------- */
.mirada blockquote {
  margin: 0; max-width: 860px;
  font-family: var(--fuente-titulos); font-size: clamp(1.5rem, 3.4vw, 2.2rem); line-height: 1.3;
  color: #fff;
}
.mirada blockquote::before {
  content: "“"; display: block; font-size: 4rem; line-height: .6; color: var(--amarillo); margin-bottom: .2em;
}
.mirada .firma { margin-top: 1.5rem; color: #c9cbe8; }

/* ---------- Tres movimientos ---------- */
.pasos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; counter-reset: paso; list-style: none; padding: 0; margin: 0; }
.paso {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.8rem 1.6rem; position: relative;
}
.paso::before {
  counter-increment: paso; content: counter(paso);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--azul-profundo); color: var(--amarillo);
  font-family: var(--fuente-titulos); font-size: 1.4rem; margin-bottom: 1rem;
}
.paso p { color: var(--texto-suave); margin: 0; }
.paso .pregunta { font-style: italic; color: var(--azul-indigo); margin-top: .8rem; }
@media (max-width: 820px) { .pasos { grid-template-columns: 1fr; } }

/* ---------- Tarjetas de proyecto ---------- */
.proyectos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.proyecto {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  overflow: hidden; box-shadow: var(--sombra);
}
.proyecto .imagen {
  aspect-ratio: 16 / 10; background: var(--indigo-claro);
  display: grid; place-items: center; position: relative; overflow: hidden;
}
.proyecto .imagen img:not(.marcador) { width: 100%; height: 100%; object-fit: cover; }
.proyecto .imagen .marcador { width: 22%; opacity: .55; }
.proyecto .imagen .pendiente {
  position: absolute; bottom: .6rem; left: .6rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: #fff; color: var(--texto-suave); padding: .25em .6em; border-radius: 999px;
}
.proyecto .cuerpo { padding: 1.5rem 1.5rem 1.7rem; display: flex; flex-direction: column; flex: 1; }
.proyecto .etiqueta { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--azul-indigo); margin-bottom: .4rem; }
.proyecto p { color: var(--texto-suave); font-size: 1.02rem; }
.cifras { list-style: none; padding: 0; margin: .2rem 0 1.2rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.cifras li {
  font-size: .85rem; font-weight: 600; color: var(--azul-profundo);
  background: var(--indigo-claro); padding: .3em .75em; border-radius: 999px;
}
.proyecto .enlace { margin-top: auto; font-weight: 700; text-decoration: none; }
.proyecto .enlace::after { content: " →"; }
@media (max-width: 960px) { .proyectos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .proyectos { grid-template-columns: 1fr; } }

/* ---------- Investigación destacada ---------- */
.destacado { display: grid; grid-template-columns: .9fr 1.1fr; gap: 3rem; align-items: center; }
.sello {
  background: var(--azul-profundo); color: #fff; border-radius: var(--radio);
  padding: 2.2rem; position: relative; overflow: hidden;
}
.sello::after {
  content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%;
  background: var(--amarillo); right: -40px; bottom: -40px; opacity: .95;
}
.sello .tipo { font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amarillo); font-weight: 700; }
.sello h3 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); margin: .6rem 0 .8rem; position: relative; z-index: 1; }
.sello p { color: #c9cbe8; font-size: 1rem; position: relative; z-index: 1; max-width: 32ch; }
.laureada {
  display: inline-block; margin-top: .6rem; position: relative; z-index: 1;
  background: var(--amarillo); color: var(--azul-profundo); font-weight: 700;
  padding: .3em .9em; border-radius: 999px; font-size: .9rem;
}
@media (max-width: 820px) { .destacado { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Qué hago ---------- */
.servicios { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 2.5rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.servicios li { padding: 1rem 0 1rem 2.2rem; border-bottom: 1px solid var(--linea); position: relative; }
.servicios li::before {
  content: ""; position: absolute; left: 0; top: 1.35rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--azul-indigo); box-shadow: inset 0 0 0 4px var(--indigo-claro);
}
.servicios strong { color: var(--azul-profundo); display: block; }
.servicios span { color: var(--texto-suave); font-size: 1rem; }
@media (max-width: 720px) { .servicios { grid-template-columns: 1fr; } }

.nota { color: var(--texto-suave); font-size: 1.02rem; }

/* ---------- Contacto ---------- */
.contacto-bloque { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: start; }
.canales { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.canales a {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.2rem; border-radius: var(--radio);
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .15);
  color: #fff; text-decoration: none; font-weight: 600;
}
.canales a:hover { background: rgba(255, 221, 21, .12); border-color: var(--amarillo); color: #fff; }
.canales small { color: #c9cbe8; font-weight: 400; }
@media (max-width: 820px) { .contacto-bloque { grid-template-columns: 1fr; gap: 2rem; } }

/* ---------- Pie ---------- */
.pie { background: #0b1350; color: #b9bce0; padding: 3rem 0 2rem; font-size: .98rem; }
.pie .contenedor { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; }
.pie h2 { font-family: var(--fuente-texto); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amarillo); font-weight: 700; margin-bottom: .8rem; }
.pie ul { list-style: none; padding: 0; margin: 0; }
.pie li { margin-bottom: .4rem; }
.pie a { color: #fff; text-decoration: none; }
.pie a:hover { color: var(--amarillo); }
.pie .logo-pie { width: 180px; margin-bottom: 1rem; }
.pie .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1.5rem; margin-top: 1rem; font-size: .88rem; }
@media (max-width: 720px) { .pie .contenedor { grid-template-columns: 1fr; } }

/* ---------- Aparición suave ---------- */
.js .revelar { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .revelar.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .revelar { opacity: 1; transform: none; transition: none; }
  .boton:hover { transform: none; }
}

/* =========================================================
   Áreas: Sociología + Cultura (conectadas) y Fotografía
   ========================================================= */
.portada .oficios {
  list-style: none; padding: 0; margin: 0 0 1.4rem;
  display: flex; flex-wrap: wrap; gap: .4rem .9rem;
  font-weight: 500; color: var(--azul-indigo);
}
.portada .oficios li { display: flex; align-items: center; gap: .9rem; }
.portada .oficios li + li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--amarillo); }

.areas { display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch; gap: 0; }
.area {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 2rem 1.8rem; box-shadow: var(--sombra); display: flex; flex-direction: column;
}
.area .organizacion {
  display: inline-flex; align-items: center; gap: .5rem; margin-bottom: 1rem;
  font-size: .85rem; font-weight: 700; color: var(--azul-profundo);
  background: var(--indigo-claro); padding: .35em .9em; border-radius: 999px; align-self: flex-start;
}
.area p { color: var(--texto-suave); }
.area ul.hitos { list-style: none; padding: 0; margin: .5rem 0 1.5rem; }
.area ul.hitos li { padding: .7rem 0; border-top: 1px solid var(--linea); font-size: 1rem; }
.area ul.hitos strong { color: var(--azul-profundo); display: block; }
.area ul.hitos span { color: var(--texto-suave); font-size: .95rem; }
.area .acciones { margin-top: auto; }

/* El puente entre sociología y cultura */
.puente { display: grid; place-items: center; padding: 0 1.2rem; position: relative; }
.puente::before {
  content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--azul-indigo) 0 8px, transparent 8px 14px);
}
.puente span {
  position: relative; width: 64px; height: 64px; border-radius: 50%;
  background: var(--amarillo); display: grid; place-items: center;
  box-shadow: 0 0 0 8px var(--fondo-alt);
}
.puente img { width: 38px; }
.nota-puente { max-width: 720px; margin: 2rem auto 0; text-align: center; color: var(--texto-suave); }

@media (max-width: 900px) {
  .areas { grid-template-columns: 1fr; }
  .puente { padding: 1rem 0; }
  .puente::before { top: 0; bottom: 0; left: 50%; right: auto; width: 3px; height: auto;
    background: repeating-linear-gradient(180deg, var(--azul-indigo) 0 8px, transparent 8px 14px); }
}

/* Marcador de foto pendiente (mientras llegan las fotos reales) */
.foto-pendiente {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 78% 22%, rgba(255, 221, 21, .55) 0 7%, transparent 7.5%),
    linear-gradient(135deg, #d9dae6, #eceef5);
}
.foto-pendiente::after {
  content: "Foto pendiente"; position: absolute; right: .7rem; bottom: .7rem;
  font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #6b6f8c; border: 1px solid #b9bbcf;
  padding: .2em .6em; border-radius: 999px;
}

/* ---------- Fotografía: estilo galería (referencia: vincentlaforet.com) ----------
   La imagen manda: fondo blanco, bordes rectos, interfaz mínima,
   nombres de series en mayúsculas espaciadas. */
.rotulo-galeria {
  font-family: var(--fuente-texto); font-weight: 500; text-transform: uppercase;
  letter-spacing: .18em; font-size: .82rem; color: var(--tinta);
}

.seccion-foto { background: #fff; border-top: 1px solid var(--linea); }
.seccion-foto .cita-foto { font-family: var(--fuente-titulos); font-style: italic; font-size: clamp(1.3rem, 2.6vw, 1.7rem); color: var(--azul-indigo); }

.mosaico { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 210px; gap: 6px; margin-bottom: 2.5rem; }
.mosaico a { position: relative; display: block; overflow: hidden; color: #fff; text-decoration: none; background: #eee; }
.mosaico a:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.mosaico a:nth-child(4) { grid-row: span 2; }
.mosaico img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease, opacity .3s; }
.mosaico a:hover img { transform: scale(1.03); }
.mosaico .rotulo {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 3rem 1rem .9rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  font-weight: 500; text-transform: uppercase; letter-spacing: .16em; font-size: .78rem;
}
.mosaico .rotulo strong { display: block; font-weight: 700; font-size: .9rem; }
.mosaico .rotulo small { opacity: .85; font-size: .72rem; }
.mosaico .foto-pendiente { position: absolute; inset: 0; }
@media (max-width: 820px) {
  .mosaico { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
  .mosaico a:nth-child(4) { grid-row: span 1; }
}

/* ---------- Páginas de fotografía ---------- */
.pagina-galeria .cabecera-pagina { text-align: center; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.pagina-galeria .cabecera-pagina .antetitulo { justify-content: center; }
.pagina-galeria .cabecera-pagina p.entrada { margin-left: auto; margin-right: auto; }
.cabecera-pagina { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); }
.cabecera-pagina p.entrada { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: var(--texto-suave); max-width: 60ch; }

/* Índice de series: una imagen grande por serie, nombre debajo */
.portafolio { display: grid; gap: clamp(3rem, 7vw, 5.5rem); padding-bottom: 6rem; max-width: 1100px; margin: 0 auto; }
.serie { text-decoration: none; color: inherit; display: block; text-align: center; }
.serie .portada-serie { aspect-ratio: 16 / 9; overflow: hidden; position: relative; margin-bottom: 1.2rem; background: #eee; }
.serie .portada-serie img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.serie:hover .portada-serie img { transform: scale(1.02); }
.serie .portada-serie .foto-pendiente { position: absolute; inset: 0; }
.serie h2 {
  font-family: var(--fuente-texto); font-weight: 700; text-transform: uppercase; letter-spacing: .2em;
  font-size: clamp(1rem, 2vw, 1.25rem); color: var(--tinta); margin: 0 0 .3rem;
}
.serie .datos { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; color: var(--texto-suave); margin: 0 0 .5rem; }
.serie p { color: var(--texto-suave); margin: 0 auto; max-width: 60ch; }
.serie:hover h2 { color: var(--azul-indigo); }

/* Lista compacta de series (estilo índice) */
.indice-series { list-style: none; padding: 0; margin: 0 0 3rem; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.8rem; }
.indice-series a { text-decoration: none; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 500; }
.indice-series a:hover, .indice-series a[aria-current="page"] { color: var(--azul-profundo); }

/* Página de una serie */
.ficha { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 2rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.ficha li { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; color: var(--texto-suave); }
.ficha li strong { color: var(--azul-profundo); font-weight: 700; }

.galeria { max-width: 1100px; margin: 0 auto; padding-bottom: 6rem; display: grid; gap: clamp(1.5rem, 4vw, 3rem); }
.galeria figure { margin: 0; }
.galeria figure.vertical { max-width: 720px; margin: 0 auto; width: 100%; }
.galeria button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.galeria img { width: 100%; }
.galeria .foto-pendiente { aspect-ratio: var(--proporcion, 3 / 2); }
.galeria figcaption { font-size: .9rem; color: var(--texto-suave); padding: .6rem 0 0; text-align: center; }

.navegacion-series { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--linea); padding: 2rem 0 4rem; }
.navegacion-series a { text-decoration: none; text-transform: uppercase; letter-spacing: .16em; font-size: .8rem; font-weight: 700; color: var(--azul-profundo); }

/* Visor (lightbox) */
.visor {
  position: fixed; inset: 0; z-index: 200; background: rgba(5, 6, 16, .96);
  display: none; align-items: center; justify-content: center; flex-direction: column; padding: 3.5rem 1rem 1rem;
}
.visor.abierto { display: flex; }
.visor img { max-width: 100%; max-height: calc(100vh - 9rem); object-fit: contain; }
.visor .pie-visor { color: #d8d9ea; font-size: .95rem; margin-top: .8rem; text-align: center; max-width: 70ch; }
.visor button {
  position: absolute; background: rgba(255, 255, 255, .08); color: #fff; border: 0; cursor: pointer;
  width: 48px; height: 48px; border-radius: 50%; font-size: 1.5rem; line-height: 1;
}
.visor button:hover { background: var(--amarillo); color: var(--azul-profundo); }
.visor .cerrar { top: 1rem; right: 1rem; }
.visor .anterior { left: 1rem; top: 50%; transform: translateY(-50%); }
.visor .siguiente { right: 1rem; top: 50%; transform: translateY(-50%); }

.mosaico picture, .serie .portada-serie picture, .galeria picture { display: block; width: 100%; height: 100%; }

/* ---------- Sobre mí ---------- */
.sobre { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.sobre .retrato { position: sticky; top: 96px; }
.sobre .retrato img { width: 100%; border-radius: var(--radio); box-shadow: var(--sombra); }
.sobre .retrato figcaption { font-size: .85rem; color: var(--texto-suave); margin-top: .6rem; }
.relato p { font-size: 1.12rem; }
.relato p:first-child::first-letter {
  font-family: var(--fuente-titulos); font-weight: 900; float: left;
  font-size: 3.6rem; line-height: .9; padding: .25rem .5rem 0 0; color: var(--azul-profundo);
}
.relato .remate { font-family: var(--fuente-titulos); font-size: 1.35rem; line-height: 1.4; color: var(--azul-profundo); border-left: 4px solid var(--amarillo); padding-left: 1rem; margin-top: 1.5rem; }
@media (max-width: 820px) {
  .sobre { grid-template-columns: 1fr; }
  .sobre .retrato { position: static; max-width: 320px; }
}

.hoy { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.hoy li { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.3rem; border-top: 4px solid var(--azul-indigo); }
.hoy li:last-child { border-top-color: var(--amarillo); }
.hoy .cargo { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--azul-indigo); }
.hoy strong { display: block; color: var(--azul-profundo); font-size: 1.08rem; margin: .3rem 0; line-height: 1.3; }
.hoy span { color: var(--texto-suave); font-size: .95rem; }
@media (max-width: 960px) { .hoy { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hoy { grid-template-columns: 1fr; } }

.etapas { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.etapas::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--linea); }
.etapas li { position: relative; padding: 2.2rem 1.2rem 0 0; }
.etapas li::before { content: ""; position: absolute; top: 2px; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--azul-indigo); box-shadow: 0 0 0 5px var(--fondo-alt); }
.etapas li:nth-child(3)::before { background: var(--amarillo); }
.etapas .anios { font-family: var(--fuente-titulos); font-weight: 700; color: var(--azul-profundo); font-size: 1.3rem; }
.etapas strong { display: block; margin: .2rem 0 .3rem; }
.etapas span { color: var(--texto-suave); font-size: .97rem; }
@media (max-width: 820px) {
  .etapas { grid-template-columns: 1fr; }
  .etapas::before { top: 0; bottom: 0; left: 9px; right: auto; width: 2px; height: auto; }
  .etapas li { padding: 0 0 1.8rem 2.5rem; }
}

/* ---------- Redes sociales (íconos lineales, unicolor: manual de marca) ---------- */
.redes { list-style: none; padding: 0; margin: 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.redes a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid currentColor; color: var(--azul-profundo);
  transition: background .2s, color .2s, border-color .2s;
}
.redes a:hover { background: var(--amarillo); color: var(--azul-profundo); border-color: var(--amarillo); }
.redes svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.portada .redes { margin-top: 1.4rem; }
.pie .redes { margin-top: 1rem; }
.pie .redes a, .seccion-oscura .redes a { color: #fff; }
.pie .redes a:hover, .seccion-oscura .redes a:hover { color: var(--azul-profundo); }
.canales svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.canales a span { display: inline-flex; align-items: center; gap: .7rem; }

/* ---------- Enlaces a los sitios que lidero ---------- */
.sitios { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; margin-top: 1rem; font-size: .95rem; color: var(--texto-suave); }
.sitios a { font-weight: 700; text-decoration: none; color: var(--azul-indigo); display: inline-flex; align-items: center; gap: .35rem; }
.sitios a::after { content: "↗"; font-size: .85em; }
.sitios a:hover { color: var(--azul-profundo); text-decoration: underline; }

/* ---------- Trayectoria (hoja de vida) ---------- */
.cifras-cv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0 0 2.5rem; }
.cifras-cv li { border-left: 4px solid var(--amarillo); padding: .2rem 0 .2rem 1rem; }
.cifras-cv strong { display: block; font-family: var(--fuente-titulos); font-size: 1.9rem; color: var(--azul-profundo); line-height: 1.1; }
.cifras-cv span { color: var(--texto-suave); font-size: .95rem; }
@media (max-width: 820px) { .cifras-cv { grid-template-columns: 1fr 1fr; } }

.indice-cv {
  position: sticky; top: 72px; z-index: 10; background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--linea); margin-bottom: 1rem;
}
.indice-cv ul { list-style: none; margin: 0; padding: .7rem 0; display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; }
.indice-cv ul::-webkit-scrollbar { display: none; }
.indice-cv a {
  white-space: nowrap; text-decoration: none; font-size: .88rem; font-weight: 600;
  color: var(--azul-profundo); background: var(--indigo-claro); padding: .45em .95em; border-radius: 999px; display: inline-block;
}
.indice-cv a:hover { background: var(--amarillo); }

.bloque-cv { padding: 2.5rem 0 1rem; scroll-margin-top: 130px; }
.bloque-cv h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); border-bottom: 2px solid var(--azul-profundo); padding-bottom: .5rem; margin-bottom: 0; }
.entradas { list-style: none; padding: 0; margin: 0; }
.entradas li { display: grid; grid-template-columns: 9.5rem 1fr; gap: 1.5rem; padding: 1.2rem 0; border-bottom: 1px solid var(--linea); }
.entradas .anios { font-weight: 700; color: var(--azul-indigo); font-variant-numeric: tabular-nums; font-size: .98rem; padding-top: .1rem; }
.entradas h3 { font-family: var(--fuente-texto); font-weight: 700; font-size: 1.08rem; color: var(--azul-profundo); margin: 0 0 .15rem; line-height: 1.35; }
.entradas .org { color: var(--tinta); font-weight: 500; margin: 0 0 .3rem; font-size: 1rem; }
.entradas p { color: var(--texto-suave); font-size: .98rem; margin: 0; }
.entradas .sello-cv { display: inline-block; background: var(--amarillo); color: var(--azul-profundo); font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; padding: .15em .6em; border-radius: 999px; margin-left: .4rem; vertical-align: middle; }
@media (max-width: 640px) { .entradas li { grid-template-columns: 1fr; gap: .2rem; } }

/* ---------- Sociología: tesis destacada ---------- */
.tesis {
  background: var(--azul-profundo); color: #dfe1f3; border-radius: var(--radio);
  padding: clamp(2rem, 5vw, 3.5rem); position: relative; overflow: hidden;
}
.tesis::before, .tesis::after { content: ""; position: absolute; border-radius: 50%; }
.tesis::before { width: 220px; height: 220px; background: var(--azul-indigo); right: -60px; top: -60px; opacity: .8; }
.tesis::after { width: 110px; height: 110px; background: var(--amarillo); right: 90px; top: 110px; }
.tesis > * { position: relative; z-index: 1; }
.tesis .tipo { color: var(--amarillo); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.tesis h2 { color: #fff; font-size: clamp(2.2rem, 5vw, 3.4rem); margin: .4rem 0 .4rem; max-width: 16ch; }
.tesis .subtitulo { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #c9cbe8; max-width: 48ch; }
.tesis .datos-tesis { list-style: none; padding: 0; margin: 1.6rem 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.tesis .datos-tesis li { border: 1px solid rgba(255,255,255,.25); border-radius: 999px; padding: .35em .9em; font-size: .9rem; }
.tesis .datos-tesis li.destacar { background: var(--amarillo); color: var(--azul-profundo); border-color: var(--amarillo); font-weight: 700; }
.tesis .pregunta-tesis { border-left: 4px solid var(--amarillo); padding-left: 1.1rem; margin: 1.5rem 0; max-width: 70ch; font-size: 1.05rem; color: #fff; }
.tesis .pregunta-tesis span { display: block; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amarillo); font-weight: 700; margin-bottom: .3rem; }
.tesis .boton-primario { background: var(--amarillo); color: var(--azul-profundo); border-color: var(--amarillo); }
.tesis .boton-primario:hover { background: #fff; border-color: #fff; color: var(--azul-profundo); }
.tesis .boton-secundario { color: #fff; border-color: #fff; }
@media (max-width: 640px) { .tesis::after { display: none; } .tesis::before { width: 140px; height: 140px; } }

.idea-central { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.idea-central .grande { font-family: var(--fuente-titulos); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; color: var(--azul-profundo); }
.idea-central .grande em { background: linear-gradient(transparent 62%, rgba(255, 221, 21, .7) 62%); font-style: normal; }
@media (max-width: 820px) { .idea-central { grid-template-columns: 1fr; } }

.hallazgos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.hallazgos li { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.5rem; }
.hallazgos strong { display: block; font-family: var(--fuente-titulos); font-size: clamp(2.2rem, 4vw, 2.8rem); color: var(--azul-indigo); line-height: 1; margin-bottom: .5rem; }
.hallazgos span { color: var(--tinta); font-size: 1rem; }
.hallazgos small { display: block; color: var(--texto-suave); font-size: .85rem; margin-top: .5rem; }
@media (max-width: 900px) { .hallazgos { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .hallazgos { grid-template-columns: 1fr; } }

.escalera { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 4px; max-width: 520px; }
.escalera li { display: flex; align-items: center; gap: .8rem; padding: .45rem .8rem; border-radius: 6px; background: var(--fondo-alt); color: var(--texto-suave); font-size: .92rem; }
.escalera li b { width: 1.6rem; color: var(--azul-indigo); }
.escalera li.aqui { background: var(--amarillo); color: var(--azul-profundo); font-weight: 600; }
.escalera li.aqui b { color: var(--azul-profundo); }

.condiciones { counter-reset: cond; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; list-style: none; padding: 0; margin: 0; }
.condiciones li { counter-increment: cond; background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); padding: 1.5rem 1.5rem 1.5rem 4.2rem; position: relative; }
.condiciones li::before { content: counter(cond); position: absolute; left: 1.3rem; top: 1.4rem; width: 36px; height: 36px; border-radius: 50%; background: var(--azul-profundo); color: var(--amarillo); display: grid; place-items: center; font-family: var(--fuente-titulos); font-weight: 700; }
.condiciones strong { display: block; color: var(--azul-profundo); margin-bottom: .3rem; }
.condiciones span { color: var(--texto-suave); font-size: 1rem; }
@media (max-width: 720px) { .condiciones { grid-template-columns: 1fr; } }

.autores { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0 0; }
.autores li { background: var(--indigo-claro); color: var(--azul-profundo); border-radius: 999px; padding: .3em .9em; font-size: .9rem; font-weight: 500; }

.puente-socialsps { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.lineas-sps { list-style: none; padding: 0; margin: 0; }
.lineas-sps li { padding: .9rem 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.lineas-sps strong { color: #fff; display: block; }
.lineas-sps span { color: #c9cbe8; font-size: .97rem; }
.observatorio { margin-top: 1.5rem; background: rgba(255, 221, 21, .1); border: 1px solid var(--amarillo); border-radius: var(--radio); padding: 1.3rem; }
.observatorio .tipo { color: var(--amarillo); font-weight: 700; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.observatorio strong { display: block; color: #fff; font-family: var(--fuente-titulos); font-size: 1.3rem; margin: .3rem 0; }
.seccion-oscura .boton-primario { background: var(--amarillo); color: var(--azul-profundo); border-color: var(--amarillo); }
.seccion-oscura .boton-primario:hover { background: #fff; border-color: #fff; color: var(--azul-profundo); }
.seccion-oscura .boton-secundario { color: #fff; border-color: #fff; }
@media (max-width: 820px) { .puente-socialsps { grid-template-columns: 1fr; } }

.cita-apa { background: var(--fondo-alt); border-left: 4px solid var(--azul-indigo); padding: 1rem 1.2rem; font-size: .98rem; color: var(--tinta); border-radius: 0 8px 8px 0; overflow-wrap: anywhere; }

/* ---------- Cultura ---------- */
.conexion { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.conexion .datos-org { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.conexion .datos-org li { background: var(--fondo-alt); border-radius: var(--radio); padding: 1rem 1.2rem; border-left: 4px solid var(--azul-indigo); }
.conexion .datos-org li:nth-child(2) { border-left-color: var(--amarillo); }
.conexion .datos-org strong { display: block; color: var(--azul-profundo); }
.conexion .datos-org span { color: var(--texto-suave); font-size: .97rem; }
@media (max-width: 820px) { .conexion { grid-template-columns: 1fr; } }

.voces-portada { display: grid; grid-template-columns: 1.15fr .85fr; gap: 0; background: var(--azul-profundo); border-radius: var(--radio); overflow: hidden; color: #dfe1f3; }
.voces-portada .foto-voces { min-height: 340px; }
.voces-portada .foto-voces picture, .voces-portada .foto-voces img { width: 100%; height: 100%; object-fit: cover; display: block; }
.voces-portada .texto { padding: clamp(1.8rem, 4vw, 2.8rem); }
.voces-portada .tipo { color: var(--amarillo); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .78rem; }
.voces-portada h2 { color: #fff; margin: .4rem 0 .6rem; }
.voces-portada .boton-primario { background: var(--amarillo); color: var(--azul-profundo); border-color: var(--amarillo); }
.voces-portada .boton-primario:hover { background: #fff; border-color: #fff; }
.voces-portada .boton-secundario { color: #fff; border-color: #fff; }
.voces-portada .cifras li { background: rgba(255,255,255,.1); color: #fff; }
@media (max-width: 860px) { .voces-portada { grid-template-columns: 1fr; } .voces-portada .foto-voces { min-height: 0; aspect-ratio: 4 / 3; } }

.literacidad-def { max-width: 760px; margin: 2.5rem auto 0; text-align: center; }
.literacidad-def p { font-size: 1.12rem; color: var(--texto-suave); }
.literacidad-def strong { color: var(--azul-profundo); }

.territorios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.territorio { background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; }
.territorio .fotos-territorio { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 3px; aspect-ratio: 4 / 3; }
.territorio .fotos-territorio figure { margin: 0; overflow: hidden; }
.territorio .fotos-territorio figure:first-child { grid-row: span 2; }
.territorio .fotos-territorio button { display: block; width: 100%; height: 100%; padding: 0; border: 0; cursor: zoom-in; background: #ddd; }
.territorio .fotos-territorio picture, .territorio .fotos-territorio img { width: 100%; height: 100%; object-fit: cover; display: block; }
.territorio .cuerpo { padding: 1.4rem; }
.territorio .lugar { font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--azul-indigo); }
.territorio h3 { margin: .3rem 0 .4rem; }
.territorio p { color: var(--texto-suave); font-size: .98rem; margin: 0 0 .8rem; }
.territorio .cifras { margin: 0; }
@media (max-width: 960px) { .territorios { grid-template-columns: 1fr; max-width: 560px; margin-left: auto; margin-right: auto; } }

.ficha-voces { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; margin-top: 2.5rem; }
.ficha-voces > div { background: var(--fondo-alt); border-radius: var(--radio); padding: 1.4rem 1.5rem; }
.ficha-voces h3 { font-size: 1.15rem; }
.ficha-voces ul { margin: 0; padding-left: 1.1rem; color: var(--texto-suave); }
.ficha-voces li { margin-bottom: .35rem; }
@media (max-width: 720px) { .ficha-voces { grid-template-columns: 1fr; } }

/* ---------- Logos de SocialSPS y Conexión Pacífico ---------- */
.logo-org { display: inline-block; margin-bottom: 1rem; line-height: 0; }
.logo-org img { height: 52px; width: auto; }
.logo-org.conexion-logo img { height: 34px; }
.logos-pie { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; gap: 1rem; }
.logos-pie a { display: inline-block; line-height: 0; opacity: .92; transition: opacity .2s; }
.logos-pie a:hover { opacity: 1; }
.logos-pie img { height: 40px; width: auto; }
.logos-pie .conexion-logo img { height: 26px; }
.titulo-logo { margin-bottom: 1rem; }
.titulo-logo img { height: 64px; width: auto; }
.conexion .logo-org img { height: 44px; }
@media (max-width: 560px) { .titulo-logo img { height: 52px; } .conexion .logo-org img { height: 34px; } }
.logos-pie a.conexion-logo, .seccion-oscura .logo-org.conexion-logo { background: #fff; padding: .55rem .75rem; border-radius: 8px; }

/* Menú: cambio de color visible al pasar el ratón (sugerencia de Fran) */
.navegacion a { transition: color .2s ease, border-color .2s ease; }
.navegacion a:hover { color: var(--azul-indigo); border-bottom-color: var(--amarillo); }
.navegacion a[aria-current="page"] { color: var(--azul-profundo); }
.pagina-oscura .navegacion a:hover { color: var(--amarillo); }

/* Pie: logo de Oí Marimbí (marrón) sobre placa blanca */
.logos-pie a.marimbi-logo { background: #fff; padding: .45rem .7rem; border-radius: 8px; }
.logos-pie .marimbi-logo img { height: 48px; }

/* ---------- Aviso de cookies ---------- */
.aviso-cookies {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 300;
  max-width: 560px; margin: 0 auto;
  background: #fff; color: var(--tinta); border: 1px solid var(--linea);
  border-top: 4px solid var(--amarillo); border-radius: var(--radio);
  box-shadow: 0 18px 50px rgba(16, 27, 105, .22); padding: 1.1rem 1.2rem;
}
.aviso-cookies p { font-size: .95rem; margin: 0 0 .9rem; }
.aviso-acciones { display: flex; gap: .6rem; justify-content: flex-end; flex-wrap: wrap; }
.aviso-acciones .boton { min-height: 42px; padding: .5em 1.1em; font-size: .95rem; }
.pie .legal a { color: #b9bce0; text-decoration: underline; text-underline-offset: 3px; }
.pie .legal a:hover { color: var(--amarillo); }

/* Texto legal */
.texto-legal { max-width: 760px; padding-bottom: 5rem; }
.texto-legal h2 { font-size: 1.4rem; margin-top: 2rem; }
.texto-legal p, .texto-legal li { color: var(--texto-suave); }

/* Texto y video bajo la galería de una serie (Arnoldo Palacios) */
.texto-serie { padding: 0 0 5rem; }
.texto-serie .estrecho { max-width: 760px; }
.texto-serie h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 1rem; }
.texto-serie p { color: var(--texto-suave); line-height: 1.75; }
.itinerancia { list-style: none; padding: 0; margin: 1.6rem 0; border-top: 1px solid var(--linea); }
.itinerancia li { padding: .7rem 0; border-bottom: 1px solid var(--linea); color: var(--tinta); }
.itinerancia strong { display: inline-block; min-width: 7.5rem; color: var(--azul-profundo); text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }
.video-serie { margin: 2.5rem 0; }
.video-serie video { width: 100%; height: auto; display: block; background: #000; }
.video-serie figcaption { font-size: .9rem; color: var(--texto-suave); padding-top: .6rem; text-align: center; }
.nota-serie { font-size: .92rem; border-left: 3px solid var(--amarillo); padding-left: 1rem; }
@media (max-width: 560px) { .itinerancia strong { display: block; min-width: 0; margin-bottom: .2rem; } }
