/* Portafolio. Usa inicio.css, pauta.css y contenido.css; agrega la pared de videos, la galería filtrable y el visor (pf-*). */

/* ── Portada: pared de videos que se mueve ── */
.pf-hero { position: relative; min-height: max(100svh, 680px); display: flex; align-items: center; padding: 130px 4vw 80px; overflow: hidden; isolation: isolate; background: #0A0A0A; }
.pf-pared { position: absolute; top: -10%; bottom: -10%; right: -2vw; width: 64%; z-index: -2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; transform: rotate(-8deg) scale(1.15); }
.pf-col { display: flex; flex-direction: column; gap: 14px; animation: pf-subir 38s linear infinite; }
.pf-col[data-pf-col="1"] { animation-name: pf-bajar; animation-duration: 44s; }
.pf-col:nth-child(3) { animation-duration: 34s; }
@keyframes pf-subir { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes pf-bajar { from { transform: translateY(-50%); } to { transform: translateY(0); } }
.pf-col video, .pf-col img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 16px; background: #151513; }
.pf-col img { aspect-ratio: 4 / 5; }
.pf-hero-velo { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #0A0A0A 30%, rgba(10,10,10,.72) 52%, rgba(10,10,10,.15) 100%), linear-gradient(0deg, #0A0A0A 0%, transparent 25%); }
.pf-hero-txt { max-width: 640px; }
.pf-h1 { margin: 0 0 22px; font: 900 clamp(54px, 8vw, 132px)/.92 'Playfair Display', serif; text-transform: uppercase; letter-spacing: -.02em; }
.pf-h1 em { color: #C9A84C; }
.pf-hero-txt > p { margin: 0 0 34px; max-width: 26em; font-size: 18px; line-height: 1.65; color: rgba(244,239,227,.75); }
.pf-hero .ce-rec b { letter-spacing: 3px; }

/* ── Galería filtrable ── */
.pf-galeria { padding: 110px 4vw 130px; background: #0A0A0A; }
.pf-filtros { position: sticky; top: 104px; z-index: 20; display: flex; flex-wrap: wrap; gap: 8px; width: fit-content; margin: 0 auto 50px; padding: 7px; border-radius: 999px;
  background: rgba(18,18,17,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(201,168,76,.25), 0 20px 40px rgba(0,0,0,.4); }
.pf-filtros button { padding: 11px 20px; border: 0; border-radius: 999px; background: none; color: rgba(244,239,227,.75); font: 600 14px 'DM Sans', sans-serif; cursor: pointer; transition: background .35s, color .35s; }
.pf-filtros button:hover { color: #F4EFE3; }
.pf-filtros button[aria-selected="true"] { background: #C9A84C; color: #0A0A0A; }
.pf-grid { columns: 4 260px; column-gap: 18px; }
.pf-item { position: relative; break-inside: avoid; margin: 0 0 18px; border-radius: 18px; overflow: hidden; background: #151513; cursor: zoom-in;
  transition: opacity .45s, transform .6s cubic-bezier(.2,.8,.2,1), filter .45s; animation: pf-aparece .8s cubic-bezier(.2,.8,.2,1) both; }
@keyframes pf-aparece { from { opacity: 0; transform: translateY(40px) scale(.96); } }
.pf-item img, .pf-item video { display: block; width: 100%; height: auto; transition: transform 1s cubic-bezier(.2,.7,.2,1); }
.pf-item video { aspect-ratio: 9 / 16; object-fit: cover; }
.pf-ancho video { aspect-ratio: 16 / 9; }
.pf-item .pf-arriba { aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.pf-item:hover img, .pf-item:hover video { transform: scale(1.05); }
.pf-item figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 14px; font-size: 13px; color: rgba(244,239,227,.75);
  background: linear-gradient(180deg, transparent, rgba(10,10,10,.92)); transform: translateY(100%); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.pf-item figcaption b { display: block; font: 700 18px 'Playfair Display', serif; color: #F4EFE3; }
.pf-item figcaption a { color: #C9A84C; }
.pf-item:hover figcaption, .pf-item:focus-within figcaption { transform: none; }
.pf-item[data-video]::after { content: ""; position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 50%; background: rgba(10,10,10,.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 5v14l11-7z' fill='%23F4EFE3'/%3E%3C/svg%3E") center/18px no-repeat;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .4s, background-color .4s; }
.pf-item[data-video]:hover::after { transform: scale(1.15); background-color: #C9A84C; }
.pf-oculto { display: none; }

/* ── Visor ── */
.pf-visor { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 60px 20px; background: rgba(5,5,5,.94); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: pf-fundido .35s ease; }
.pf-visor[hidden] { display: none; }
@keyframes pf-fundido { from { opacity: 0; } }
.pf-visor-in { max-width: min(1100px, 100%); max-height: 100%; animation: pf-zoom .5s cubic-bezier(.2,.8,.2,1); }
@keyframes pf-zoom { from { transform: scale(.9); opacity: 0; } }
.pf-visor-in img, .pf-visor-in video { display: block; max-width: 100%; max-height: calc(100svh - 120px); border-radius: 16px; margin: 0 auto; }
.pf-visor-in p { margin: 14px 0 0; text-align: center; font-size: 15px; color: rgba(244,239,227,.75); }
.pf-cerrar { position: absolute; right: 22px; top: 18px; width: 50px; height: 50px; border: 0; border-radius: 50%; background: #C9A84C; color: #0A0A0A; font-size: 30px; line-height: 1; cursor: pointer; }

/* ── Cierre ── */
.pf-cierre { padding: 130px 4vw; background: #C9A84C; color: #0A0A0A; text-align: center; }
.pf-cierre .ix-mega { max-width: 13em; margin: 0 auto 40px; }
.pf-cierre .ix-acciones { justify-content: center; }
.pf-cierre .ix-btn-oro { background: #0A0A0A; color: #F4EFE3; }
.pf-cierre .ix-btn-linea { color: #0A0A0A; box-shadow: inset 0 0 0 1px #0A0A0A; }
.pf .ce-reels-grid { max-width: 1100px; margin: 0 auto; }

@media (max-width: 980px) {
  .pf-pared { width: 130%; right: -15%; opacity: .45; }
  .pf-hero-velo { background: linear-gradient(0deg, #0A0A0A 10%, rgba(10,10,10,.55) 60%, rgba(10,10,10,.3)); }
  .pf-filtros { top: 76px; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; }
  .pf-filtros button { white-space: nowrap; padding: 10px 14px; font-size: 13px; }
  .pf-grid { columns: 2 150px; column-gap: 10px; }
  .pf-item { margin-bottom: 10px; border-radius: 12px; }
  .pf-item figcaption { transform: none; padding: 30px 10px 10px; font-size: 11.5px; }
  .pf-item figcaption b { font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 1px) {
  .pf-col, .pf-item, .pf-visor, .pf-visor-in { animation: none !important; }
}
