/* Página de proyecto (2026-11-06). Solo la enlazan las páginas de obra
   (blog.ts → paginaProyecto), así que cambiarla no toca el resto del sitio. */

/* Portada: la foto de la obra a pantalla, sin velo azul; el texto se apoya en
   un degradado solo en la franja inferior. */
.pj-hero { position: relative; min-height: min(78svh, 46rem); display: flex; align-items: flex-end; overflow: hidden; background: var(--azul-900); color: #fff; }
.pj-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pj-hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(10 24 48 / 0) 30%, rgb(10 24 48 / .6) 62%, rgb(10 24 48 / .9) 100%), linear-gradient(90deg, rgb(10 24 48 / .35), transparent 60%); }
.pj-hero__txt { position: relative; z-index: 1; padding-block: clamp(2rem, 1.5rem + 3vw, 3.5rem); }
.pj-hero__linea { display: inline-flex; align-items: center; gap: .6rem; font-size: var(--t-xs); font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 8px rgb(0 0 0 / .35); }
.pj-hero__linea::before { content: ''; width: 1.8rem; height: 3px; background: #94bdd5; }
.pj-hero h1 { margin: .5rem 0 0; max-width: 18ch; font-size: clamp(2.3rem, 1.4rem + 4.2vw, 5rem); line-height: .98; font-weight: 800; letter-spacing: -.035em; text-transform: uppercase; color: #fff; text-wrap: balance; }
.pj-hero__lead { margin: .9rem 0 0; max-width: 48ch; font-size: clamp(1.02rem, .95rem + .3vw, 1.2rem); line-height: 1.5; color: rgb(255 255 255 / .9); }
.pj-hero__acciones { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
.pj-btn-fotos { background: rgb(255 255 255 / .14); color: #fff; border: 1px solid rgb(255 255 255 / .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.pj-btn-fotos:hover { background: rgb(255 255 255 / .24); }

/* Historia + ficha */
.pj-historia { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 21rem); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; padding-block: clamp(2.8rem, 2rem + 3vw, 4.5rem); }
.pj-historia__txt { font-size: 1.0625rem; line-height: 1.75; color: var(--texto); max-width: 64ch; }
.pj-historia__txt > :first-child { margin-top: 0; }
.pj-historia__txt p, .pj-historia__txt li { font-size: 1.0625rem; line-height: 1.75; }
.pj-historia__txt h2 { font-size: clamp(1.35rem, 1.1rem + .9vw, 1.75rem); line-height: 1.2; letter-spacing: -.02em; color: var(--tinta); margin: 2rem 0 .6rem; }
.pj-historia__txt p:first-of-type { font-size: 1.18rem; line-height: 1.6; color: var(--tinta); }
.pj-ficha { position: sticky; top: calc(var(--alto-cab, 76px) + 1.2rem); display: grid; gap: 1rem; padding: 1.4rem; border: 1px solid var(--borde); border-radius: var(--r, 14px); background: var(--fondo-2); }
.pj-ficha dl { margin: 0; display: grid; gap: .9rem; }
.pj-ficha dl div { display: grid; gap: .15rem; padding-bottom: .9rem; border-bottom: 1px solid var(--linea); }
.pj-ficha dt { font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--azul, #132e6a); }
.pj-ficha dd { margin: 0; color: var(--tinta); line-height: 1.45; }
.pj-ficha blockquote { margin: 0; padding-left: .9rem; border-left: 3px solid var(--acento); }
.pj-ficha blockquote p { margin: 0; color: var(--tinta); font-size: 1.02rem; line-height: 1.5; }
.pj-ficha cite { display: block; margin-top: .4rem; font-size: .85rem; font-style: normal; color: var(--tenue); }
.pj-ficha__cta { margin: 0; font-weight: 600; color: var(--tinta); line-height: 1.4; }
.pj-ficha .btn { justify-content: center; }

/* Mosaico de la obra */
.pj-obra { padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem); background: var(--fondo-2); }
.pj-obra__cab { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
.pj-obra__cab h2 { margin: 0; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 800; letter-spacing: -.03em; text-transform: uppercase; color: var(--tinta); }
.pj-obra__cab span, .pj-obra__cab a { font-size: var(--t-sm); font-weight: 600; color: var(--suave); }
.pj-obra__cab a { display: inline-flex; align-items: center; gap: .35rem; color: var(--azul, #132e6a); text-decoration: none; }
.pj-obra__cab a svg { width: 1em; height: 1em; }
/* Columnas tipo «masonry»: cada foto completa, en su proporción, sin huecos
   aunque el número de fotos no cuadre. */
.pj-mosaico { list-style: none; margin: 0; padding: 0; columns: 3 16rem; column-gap: .7rem; }
.pj-t { break-inside: avoid; margin: 0 0 .7rem; }
.pj-t button { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-sm, 10px); overflow: hidden; background: var(--linea); cursor: zoom-in; }
.pj-t img { display: block; width: 100%; height: auto; transition: transform .5s var(--ease, ease); }
.pj-t button:hover img { transform: scale(1.04); }
.pj-t button:focus-visible { outline: 3px solid var(--acento); outline-offset: 2px; }

/* Más proyectos */
.pj-mas { padding-block: clamp(2.5rem, 2rem + 2.5vw, 4rem); }
.pj-mas__rejilla { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pj-mas__t { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: var(--r, 14px); overflow: hidden; color: #fff; text-decoration: none; background: var(--azul-900); }
.pj-mas__t img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease, ease); }
.pj-mas__t::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 45%, rgb(10 24 48 / .85)); }
.pj-mas__t span { position: absolute; left: 1rem; right: 1rem; bottom: .9rem; z-index: 1; display: flex; align-items: center; gap: .4rem; font-weight: 800; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.15; }
.pj-mas__t span svg { width: 1em; height: 1em; flex: none; }
.pj-mas__t:hover img { transform: scale(1.05); }

/* Visor */
.pj-visor { width: 100vw; max-width: 100vw; height: 100svh; max-height: 100svh; margin: 0; padding: 0; border: 0; background: rgb(6 14 30 / .96); color: #fff; }
.pj-visor[open] { display: grid; place-items: center; }
.pj-visor::backdrop { background: rgb(6 14 30 / .9); }
.pj-visor img { max-width: min(92vw, 1600px); max-height: 84svh; width: auto; height: auto; object-fit: contain; border-radius: 6px; }
.pj-visor__n { position: absolute; left: 50%; bottom: 1.2rem; transform: translateX(-50%); margin: 0; font-size: .9rem; font-variant-numeric: tabular-nums; color: rgb(255 255 255 / .8); }
.pj-visor button { position: absolute; display: grid; place-items: center; width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: rgb(255 255 255 / .12); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.pj-visor button:hover { background: rgb(255 255 255 / .24); }
.pj-visor__x { top: 1rem; right: 1rem; }
.pj-visor__ir--ant { left: 1rem; top: 50%; transform: translateY(-50%); }
.pj-visor__ir--sig { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 900px) {
  .pj-historia { grid-template-columns: minmax(0, 1fr); }
  .pj-ficha { position: static; }
  .pj-mosaico { columns: 2; column-gap: .5rem; }
  .pj-t { margin-bottom: .5rem; }
  .pj-mas__rejilla { grid-template-columns: minmax(0, 1fr); }
  .pj-mas__t { aspect-ratio: 16 / 9; }
}
@media (max-width: 600px) {
  .pj-hero { min-height: 74svh; }
  .pj-hero__acciones .btn { flex: 1 1 100%; justify-content: center; }
  .pj-visor__ir { top: auto; bottom: .6rem; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .pj-t img, .pj-mas__t img { transition: none; } }
