/* ---------- Página de proyecto ---------- */
.p-hero { position: relative; height: calc(100svh - var(--header)); min-height: 520px; overflow: hidden; background: var(--sumi); color: #fff; }
.p-hero-media { position: absolute; inset: 0; }
.p-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.js .p-hero-media { clip-path: inset(0 0 100% 0); }
.js .p-hero-media img { transform: scale(1.15); }
.p-hero.is-in .p-hero-media { clip-path: inset(0 0 0 0); transition: clip-path 1.4s var(--ease-in-out); }
.p-hero.is-in .p-hero-media img { transform: scale(1); transition: transform 2.4s var(--ease-out); }
.p-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,9,.25) 0%, rgba(10,10,9,0) 30%, rgba(10,10,9,.2) 55%, rgba(10,10,9,.85) 100%); pointer-events: none; }
.p-hero-inner { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding-bottom: clamp(32px, 7vh, 72px); }
.crumbs { display: flex; gap: 10px; font-size: 14px; color: rgba(255,255,255,.75); margin-bottom: 22px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.p-title { font-weight: 800; font-size: clamp(48px, 9vw, 150px); line-height: .9; letter-spacing: -.045em; }
.p-subtitle { margin-top: 18px; font-family: var(--serif); font-size: clamp(19px, 1.8vw, 24px); color: rgba(255,255,255,.88); }
.p-num {
  position: absolute; right: var(--gutter); top: 32px; z-index: 2;
  writing-mode: vertical-rl; font-family: var(--jp); font-size: 15px; letter-spacing: .3em; color: rgba(255,255,255,.8);
}
.p-num b { font-weight: 900; font-size: 44px; letter-spacing: 0; color: #fff; margin-bottom: 14px; }

.p-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.p-lead { font-family: var(--serif); font-size: clamp(26px, 2.8vw, 40px); line-height: 1.25; letter-spacing: -.01em; text-wrap: pretty; }
.p-text { margin-top: 28px; font-family: var(--serif); font-size: 18px; line-height: 1.6; color: var(--grafito); max-width: 60ch; }
.p-facts { border-top: 2px solid var(--tinta); }
.p-facts div { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--linea); font-size: 15px; }
.p-facts dt { color: var(--grafito); }
.p-facts dd { font-weight: 600; }
@media (max-width: 900px) { .p-intro { grid-template-columns: 1fr; } }

.p-film { border-radius: var(--radius-m); overflow: hidden; background: #000; aspect-ratio: 16 / 9; }
.p-film video { width: 100%; height: 100%; object-fit: cover; }

.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
  min-height: 42px; padding: 0 16px; border: 1px solid var(--linea); border-radius: 999px; background: transparent; cursor: pointer;
  font-size: 14px; font-weight: 500; transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform 160ms var(--ease-out);
}
.filters button:active { transform: scale(0.97); }
.filters button span { color: var(--grafito); margin-left: 4px; font-variant-numeric: tabular-nums; }
.filters button[aria-pressed="true"] { background: var(--tinta); color: var(--papel); border-color: var(--tinta); }
.filters button[aria-pressed="true"] span { color: rgba(236,234,229,.7); }
@media (hover: hover) { .filters button:hover { border-color: var(--tinta); } }

.gallery { columns: 3 320px; column-gap: 20px; }
.g-item { break-inside: avoid; margin: 0 0 20px; transition: opacity .2s ease; }
.g-item[hidden] { display: none; }
.g-btn { display: block; width: 100%; padding: 0; border: 0; background: var(--sumi); border-radius: var(--radius-m); overflow: hidden; cursor: pointer; }
.g-btn img { width: 100%; height: auto; transition: transform .9s var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .g-btn:hover img { transform: scale(1.035); } }
.g-item figcaption { margin-top: 10px; font-size: 14px; color: var(--grafito); }

/* Visor */
.viewer { position: fixed; inset: 0; z-index: 8000; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(12,12,11,.96); color: var(--sumi-texto); }
.viewer::backdrop { background: transparent; }
.viewer[open] { display: grid; grid-template-rows: auto 1fr auto; animation: viewerIn .26s var(--ease-out); }
@keyframes viewerIn { from { opacity: 0; } }
.viewer-top, .viewer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px var(--gutter); }
.viewer-count { font-variant-numeric: tabular-nums; font-size: 14px; color: var(--sumi-tenue); }
.viewer-caption { font-size: 15px; }
.viewer-stage { position: relative; min-height: 0; overflow: hidden; touch-action: pan-y; }
.viewer-stage img { position: absolute; top: 0; bottom: 0; left: var(--gutter); right: var(--gutter); width: calc(100% - 2 * var(--gutter)); height: 100%; object-fit: contain; transition: opacity .2s ease, filter .2s ease, transform .3s var(--ease-out); user-select: none; -webkit-user-drag: none; }
.viewer-stage img.is-swapping { opacity: 0; filter: blur(4px); }
.viewer-stage img.is-entering { transform: scale(.97); opacity: 0; }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--sumi-linea); background: transparent; color: var(--sumi-texto); cursor: pointer;
  transition: border-color .2s ease, transform 160ms var(--ease-out);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }
@media (hover: hover) { .icon-btn:hover { border-color: var(--sumi-texto); } }
.viewer-nav { display: flex; gap: 10px; }

/* Siguiente proyecto */
.next { display: block; position: relative; overflow: hidden; text-decoration: none; background: var(--sumi); color: #fff; min-height: 62vh; }
.next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; transform: scale(1.06); transition: transform 1.4s var(--ease-out), opacity .6s ease; }
@media (hover: hover) and (pointer: fine) { .next:hover img { transform: scale(1); opacity: .6; } }
.next-inner { position: relative; z-index: 1; min-height: 62vh; display: flex; flex-direction: column; justify-content: flex-end; padding-top: 80px; padding-bottom: clamp(40px, 8vh, 80px); }
.next-label { font-size: 15px; color: rgba(255,255,255,.75); margin-bottom: 14px; }
.next-title { font-weight: 800; font-size: clamp(44px, 8vw, 130px); line-height: .92; letter-spacing: -.045em; }
.next-sub { margin-top: 14px; font-family: var(--serif); font-size: 20px; color: rgba(255,255,255,.85); }


