/* Cuba Despierta · Personajes (views/personajes.php). Se carga solo en /descubre-cuba/personajes.
   Estética de periódico antiguo: papel de prensa, filetes dobles, cabecera grande y foto con trama de imprenta.
   Animaciones: la cabecera se «estampa» y la noticia se «imprime» de arriba abajo (data-reveal de motion.js). */
.jz { --news: #f3efe4; --ink-news: #1a1a1a; --rule: #1a1a1a; }

/* ---------- 1. Portada del diario ---------- */
.jp { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem) clamp(3.5rem, 3rem + 3vw, 6rem); background: #e9e4d8; }
.jp-cur { color: var(--ink); font-weight: 700; }
.jp-sheet { position: relative; margin-top: 1.2rem; padding: clamp(1.2rem, 1rem + 2vw, 2.6rem); background: var(--news); color: var(--ink-news); box-shadow: 0 30px 60px -40px rgba(0,0,0,.55), 0 0 0 1px #d6cfbd; }
/* Textura de papel muy suave */
.jp-sheet::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.6), transparent 40%), radial-gradient(circle at 85% 80%, rgba(160,140,100,.12), transparent 45%); }
.jp-top { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--rule); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.jp-mast { position: relative; display: flex; flex-direction: column; align-items: center; padding: 1.2rem 0 1rem; text-align: center; }
.jp-mast-k { font-family: var(--serif); font-style: italic; font-size: clamp(1.1rem, .9rem + .8vw, 1.6rem); }
.jp-mast-t { margin-top: .2rem; font-family: var(--serif); font-weight: 700; font-size: clamp(3.2rem, 1rem + 8.5vw, 8.4rem); line-height: .9; letter-spacing: -.02em; text-transform: uppercase; }
html.js .jp-mast-t[data-anim] { animation: jz-stamp 1.1s cubic-bezier(.2, .8, .2, 1) .35s both; }
@keyframes jz-stamp { 0% { opacity: 0; transform: scale(1.18); filter: blur(6px); } 60% { opacity: 1; filter: blur(0); } 75% { transform: scale(.98); } 100% { transform: none; } }
.jp-date { position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem 1rem; padding: .55rem 0; border-block: 3px double var(--rule); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.jp-lema { position: relative; margin: 1rem auto 0; max-width: 46rem; font-family: var(--serif); font-style: italic; font-size: clamp(1.05rem, .95rem + .4vw, 1.3rem); line-height: 1.45; text-align: center; color: #3a3a3a; }
/* Noticia principal: se «imprime» de arriba abajo al aparecer. El recorte va en el contenido, no en el bloque
   observado: si el propio bloque estuviera recortado del todo, el observador de motion.js no lo «vería» nunca. */
.jp-lead { position: relative; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--rule); }
html.js .jp-lead[data-reveal] { opacity: 1; transform: none; }
html.js .jp-lead[data-reveal] .jp-lead-in { clip-path: inset(0 0 100% 0); transition: clip-path 1.6s cubic-bezier(.4, 0, .2, 1); }
html.js .jp-lead[data-reveal].is-in .jp-lead-in { clip-path: inset(0 0 0 0); }
.jp-lead-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.6rem; color: inherit; text-decoration: none; }
@media (min-width: 900px) { .jp-lead-in { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.4rem; } }
.jp-lead-in:focus-visible { outline: 2px solid var(--brand); outline-offset: 6px; }
/* Foto con trama de imprenta (puntos) en blanco y negro; recupera el color al pasar el ratón */
.jp-photo { position: relative; display: block; overflow: hidden; border: 1px solid var(--rule); }
.jp-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: grayscale(1) contrast(1.25) brightness(1.05); transition: filter .8s var(--ease-out), transform 1.2s var(--ease-out); }
.jp-photo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle, rgba(0,0,0,.35) 30%, transparent 32%) 0 0 / 4px 4px; mix-blend-mode: multiply; opacity: .55; transition: opacity .8s; }
.jp-lead-in:hover .jp-photo img { filter: grayscale(.2) contrast(1.05); transform: scale(1.03); }
.jp-lead-in:hover .jp-photo::after { opacity: 0; }
.jp-story { display: flex; flex-direction: column; gap: .9rem; }
.jp-kick { font-size: 11px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: var(--brand-dark); }
.jp-h { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 1.4rem + 2.2vw, 3.4rem); line-height: 1; letter-spacing: -.015em; transition: color .3s; }
.jp-lead-in:hover .jp-h { color: var(--brand-dark); }
.jp-deck { font-family: var(--serif); font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); line-height: 1.5; color: #2c2c2c; }
.jp-deck::first-letter { float: left; margin: .05em .12em 0 0; font-size: 3.4em; line-height: .8; font-weight: 700; color: var(--brand-dark); }
.jp-by { padding-top: .7rem; border-top: 1px solid #c9c1ad; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #5a5a5a; }
.jp-go { display: inline-flex; align-items: center; gap: .4rem; font-size: 11.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand-dark); }
.jp-go svg { transition: transform .45s var(--ease-out); }
.jp-lead-in:hover .jp-go svg, .jp-ad-box:hover .jp-go svg { transform: translateX(5px); }
.jp-empty { margin-top: 2rem; padding: 2rem; border: 1px dashed #b9b19d; text-align: center; font-family: var(--serif); font-style: italic; }

/* Columnas inferiores: más personajes, breves y clasificados, separadas por filetes */
.jp-cols { position: relative; margin-top: 2.4rem; padding-top: 1.6rem; border-top: 3px double var(--rule); display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem; }
@media (min-width: 900px) {
  .jp-cols { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0; }
  .jp-cols > * { padding: 0 1.6rem; }
  .jp-cols > *:first-child { padding-left: 0; }
  .jp-cols > *:last-child { padding-right: 0; border-left: 1px solid var(--rule); }
  .jp-more { grid-column: 1 / -1; padding: 0 0 1.6rem !important; margin-bottom: 1.6rem; border-bottom: 1px solid var(--rule); }
}
.jp-sec { margin-bottom: 1rem; font-size: 12px; font-weight: 900; letter-spacing: .24em; text-transform: uppercase; }
.jp-sec::after { content: ''; display: block; width: 40px; height: 3px; margin-top: .5rem; background: var(--brand); }
.jp-more ul, .jp-breves ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.2rem; }
.jp-more ul { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (min-width: 640px) { .jp-breves ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.6rem; } }
.jp-more a, .jp-breves a { display: flex; flex-direction: column; gap: .35rem; padding-bottom: 1rem; border-bottom: 1px solid #cfc7b3; color: inherit; text-decoration: none; }
.jp-mt, .jp-bt { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; line-height: 1.1; transition: color .3s; }
.jp-md, .jp-bd { font-family: var(--serif); font-size: 15px; line-height: 1.5; color: #3a3a3a; }
.jp-bc { font-size: 10.5px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; color: var(--brand-dark); }
.jp-more a:hover .jp-mt, .jp-breves a:hover .jp-bt { color: var(--brand-dark); }
.jp-more a:focus-visible, .jp-breves a:focus-visible, .jp-ad-box:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
/* Anuncio clasificado con marco doble */
.jp-ad-box { display: flex; flex-direction: column; gap: .6rem; padding: 1.4rem 1.2rem; border: 3px double var(--rule); color: inherit; text-decoration: none; text-align: center; transition: background-color .3s, transform .4s var(--ease-out); }
.jp-ad-box:hover { background: #fffaf0; transform: rotate(-.6deg); }
.jp-ad-h { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 1.6rem + 1.2vw, 2.8rem); line-height: .9; text-transform: uppercase; }
.jp-ad-t { font-family: var(--serif); font-style: italic; font-size: 1.3rem; color: var(--brand-dark); }
.jp-ad-d { font-family: var(--serif); font-size: 15px; line-height: 1.5; color: #3a3a3a; }
.jp-ad-box .jp-go { align-self: center; }

/* ---------- 2. Sigue descubriendo ---------- */
.jx { padding-block: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.jx ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; }
@media (min-width: 560px) { .jx ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .jx ul { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .jx ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.jx a { display: flex; align-items: center; gap: .9rem; height: 100%; padding: 1rem 1.1rem; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color .3s, transform .5s var(--ease-out); }
.jx-ico { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; background: var(--soft); color: var(--brand-dark); transition: background-color .35s, color .35s, transform .5s var(--ease-out); }
.jx-txt { display: flex; flex: 1; flex-direction: column; gap: .15rem; min-width: 0; }
.jx-n { font-size: 14.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.jx-c { font-size: 12px; color: var(--muted); }
.jx a > svg { color: var(--brand); transition: transform .45s var(--ease-out); }
.jx a:hover { border-color: var(--ink); transform: translateY(-3px); }
.jx a:hover .jx-ico { background: var(--brand); color: #fff; transform: rotate(-8deg); }
.jx a:hover > svg { transform: translateX(5px); }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html.js .jp-mast-t[data-anim] { animation: none; }
  html.js .jp-lead[data-reveal] .jp-lead-in { clip-path: none; transition: none; }
  .jp-photo img, .jp-photo::after, .jp-ad-box, .jx a { transition: none; }
}

/* ---------- Archivo (views/_cat_archivo.php): recortes de periódico ---------- */
.arc.is-personajes { --arc-card: var(--news); --arc-ink: var(--ink-news); --arc-accent: var(--ink-news); --arc-line: var(--rule); --arc-img-filter: grayscale(1) contrast(1.1); --arc-t-font: var(--serif); --arc-t-weight: 700; --arc-t-size: 1.1rem; }
.arc.is-personajes .arc-card { border-width: 3px 1px 1px; }
