/* PORTFOLIO (2026-10-08): the hidden photo & film page (/portfolio/ and /es/portafolio/). Same brand as the site:
   plum night, gold, ivory, Cinzel + Space Grotesk. Only opacity/transform animate, so the mosaic stays smooth on phones. */
@font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 400 500; font-display: swap; src: url('assets/fonts/cinzel-v26-latin.woff2') format('woff2'); }
@font-face { font-family: 'Space Grotesk'; font-style: normal; font-weight: 400 600; font-display: swap; src: url('assets/fonts/space-grotesk-v22-latin.woff2') format('woff2'); }

:root {
  --bg: #130F17; --panel: #1C1521; --gold: #E7B559; --terracotta: #C96A3E; --ivory: #F6EFE2; --ivory-muted: #C6BAAE;
  --display: 'Cinzel', 'Space Grotesk', serif; --text: 'Space Grotesk', system-ui, sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; background: var(--bg); }
body {
  min-height: 100vh; color: var(--ivory); font-family: var(--text); line-height: 1.55; -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(231, 181, 89, .16), transparent 62%),
    radial-gradient(900px 600px at -10% 20%, rgba(201, 106, 62, .10), transparent 60%),
    var(--bg);
}
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* header */
.pf-top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px clamp(16px, 4vw, 48px); background: linear-gradient(rgba(19, 15, 23, .92), rgba(19, 15, 23, .72) 70%, transparent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.pf-brand { font-family: var(--display); letter-spacing: .32em; font-size: 15px; text-decoration: none; }
.pf-top nav { display: flex; align-items: center; gap: 18px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.pf-top nav a { text-decoration: none; opacity: .82; transition: opacity .3s, color .3s; }
.pf-top nav a:hover, .pf-top nav a:focus-visible { opacity: 1; color: var(--gold); }
.pf-lang { border: 1px solid rgba(246, 239, 226, .45); border-radius: 999px; padding: 6px 11px; }

main { position: relative; z-index: 1; }

/* title */
.pf-hero { padding: clamp(56px, 11vw, 140px) clamp(16px, 4vw, 48px) 28px; max-width: 1180px; margin: 0 auto; }
.pf-eyebrow { color: var(--gold); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; }
.pf-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(46px, 10vw, 128px); line-height: .95; letter-spacing: .04em; margin: 14px 0 18px; }
.pf-hero h1 span { display: inline-block; }
.pf-lede { max-width: 620px; color: var(--ivory-muted); font-size: clamp(15px, 1.6vw, 18px); }

/* filters */
.pf-filters { position: sticky; top: 62px; z-index: 4; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding: 14px clamp(16px, 4vw, 48px); max-width: 1180px; margin: 0 auto; -webkit-mask-image: linear-gradient(90deg, #000 92%, transparent); mask-image: linear-gradient(90deg, #000 92%, transparent); }
.pf-filters::-webkit-scrollbar { display: none; }
.pf-chip { flex: none; font: 500 13px/1 var(--text); letter-spacing: .06em; color: var(--ivory); cursor: pointer;
  background: rgba(28, 21, 33, .72); border: 1px solid rgba(246, 239, 226, .22); border-radius: 999px; padding: 11px 16px;
  transition: background .35s var(--ease), border-color .35s, color .35s; }
.pf-chip small { font-size: 11px; opacity: .6; margin-left: 6px; }
.pf-chip:hover { border-color: rgba(231, 181, 89, .7); }
.pf-chip[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #1a1208; }
.pf-chip[aria-pressed="true"] small { opacity: .75; }

/* mosaic */
.pf-wrap { max-width: 1440px; margin: 0 auto; padding: 8px clamp(10px, 3vw, 40px) 40px; }
.pf-grid, .pf-videos { list-style: none; }
.pf-grid { columns: 3 300px; column-gap: clamp(8px, 1.2vw, 16px); }
.pf-item { break-inside: avoid; margin-bottom: clamp(8px, 1.2vw, 16px); }
.pf-item[hidden] { display: none; }
.pf-link { position: relative; display: block; overflow: hidden; border-radius: 6px; background: var(--panel); text-decoration: none; }
.pf-link img { width: 100%; transition: transform 1.1s var(--ease), filter .6s; }
.pf-cap { position: absolute; inset: auto 0 0 0; display: flex; flex-direction: column; gap: 2px; padding: 40px 14px 12px; font-size: 13px;
  background: linear-gradient(transparent, rgba(10, 7, 12, .82)); opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); }
.pf-cat { color: var(--gold); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; }
@media (hover: hover) {
  .pf-link:hover img, .pf-link:focus-visible img { transform: scale(1.045); }
  .pf-link:hover .pf-cap, .pf-link:focus-visible .pf-cap { opacity: 1; transform: none; }
}
@media (hover: none) { .pf-cap { opacity: 1; transform: none; padding-top: 28px; font-size: 12px; } }

/* reveal on scroll (only when JS runs; without it everything is simply visible) */
.js .pf-item { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .pf-item.is-in { opacity: 1; transform: none; }

/* videos */
.pf-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: clamp(10px, 1.5vw, 20px); }
.pf-videos[hidden] { display: none; }
.pf-play, .pf-video video { position: relative; display: block; width: 100%; aspect-ratio: 9 / 14; border: 0; border-radius: 6px; overflow: hidden; background: #000; cursor: pointer; }
.pf-play img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.pf-play:hover img { transform: scale(1.04); }
.pf-video video { object-fit: contain; cursor: auto; }
.pf-play-btn { position: absolute; left: 50%; top: 50%; width: 66px; height: 66px; margin: -33px 0 0 -33px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(19, 15, 23, .55); border: 1px solid rgba(231, 181, 89, .8);
  box-shadow: 0 0 40px rgba(231, 181, 89, .35); transition: transform .4s var(--ease), background .4s; }
.pf-play-btn svg { width: 24px; height: 24px; fill: var(--ivory); margin-left: 3px; }
.pf-play:hover .pf-play-btn, .pf-play:focus-visible .pf-play-btn { transform: scale(1.08); background: rgba(231, 181, 89, .25); }
.pf-video-title { margin-top: 10px; font-size: 14px; color: var(--ivory-muted); }

/* bottom */
.pf-end { text-align: center; padding: 50px 16px 90px; }
.pf-end h2 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4vw, 40px); margin-bottom: 18px; }
.pf-cta { display: inline-block; padding: 14px 26px; border-radius: 999px; background: var(--gold); color: #1a1208; text-decoration: none;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; transition: transform .35s var(--ease), box-shadow .35s; }
.pf-cta:hover, .pf-cta:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(231, 181, 89, .3); }
.pf-foot { margin-top: 26px; font-size: 12px; color: rgba(246, 239, 226, .5); letter-spacing: .08em; }

/* big view */
.pf-lb { width: 100vw; height: 100dvh; max-width: none; max-height: none; border: 0; padding: 0; background: rgba(8, 6, 10, .96); color: var(--ivory); overflow: hidden; }
.pf-lb::backdrop { background: rgba(8, 6, 10, .9); }
.pf-lb[open] { display: grid; grid-template-rows: auto 1fr auto; animation: pf-fade .35s var(--ease); }
@keyframes pf-fade { from { opacity: 0; } to { opacity: 1; } }
.pf-lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; font-size: 13px; letter-spacing: .12em; color: var(--ivory-muted); }
.pf-lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(8px, 6vw, 90px); touch-action: pan-y; }
.pf-lb-img { max-width: 100%; max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  transition: opacity .3s var(--ease), transform .3s var(--ease); user-select: none; -webkit-user-drag: none; }
.pf-lb-img.is-loading { opacity: .25; }
.pf-lb-cap { padding: 14px 16px 22px; text-align: center; font-size: 14px; color: var(--ivory-muted); min-height: 56px; }
.pf-lb button { font: inherit; color: var(--ivory); background: rgba(28, 21, 33, .7); border: 1px solid rgba(246, 239, 226, .25); border-radius: 999px; cursor: pointer; }
.pf-lb-close { width: 44px; height: 44px; font-size: 22px; line-height: 1; }
.pf-lb-nav { position: absolute; top: 50%; width: 52px; height: 52px; margin-top: -26px; font-size: 22px; transition: background .3s, border-color .3s; }
.pf-lb-nav:hover { border-color: var(--gold); background: rgba(231, 181, 89, .18); }
.pf-lb-prev { left: clamp(8px, 2vw, 24px); }
.pf-lb-next { right: clamp(8px, 2vw, 24px); }
@media (max-width: 640px) { .pf-lb-nav { display: none; } .pf-filters { top: 58px; } .pf-back { display: none; } .pf-top nav a[aria-label] { font-size: 18px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .pf-item { opacity: 1; transform: none; }
}
@media (max-width: 640px) { .pf-videos { grid-template-columns: repeat(2, 1fr); gap: 10px; } .pf-video-title { font-size: 12px; } .pf-play-btn { width: 52px; height: 52px; margin: -26px 0 0 -26px; } }

/* chapters: one trip or session each, so photos from the same place stay together */
.pf-group { margin-bottom: clamp(36px, 6vw, 72px); }
.pf-group[hidden] { display: none; }
.pf-group-title { display: flex; align-items: baseline; gap: 12px; margin: 0 4px 16px; font-family: var(--display); font-weight: 400;
  font-size: clamp(20px, 2.6vw, 30px); letter-spacing: .06em; color: var(--ivory); }
.pf-group-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(231, 181, 89, .5), transparent); transform: translateY(-6px); }
.pf-group-title small { font-family: var(--text); font-size: 12px; letter-spacing: .1em; color: var(--gold); }
