/* Client gallery templates. Six compositions on one markup: 01 Editorial · 02 Minimal · 03 Cine (cinema) ·
   04 Álbum (album) · 05 Mosaico (modern) · 06 Clásica (classic). Photos are never cropped in the collection.
   Tabs, lightbox, favorites, downloads and share keep the same hooks in every template. */

/* ---------- tokens ---------- */
.films-body{--gallery-gap:16px;--gallery-width:1400px;--photo-size:260px;--gallery-bg:#fafaf8;--gallery-ink:#252525;--gx-k:1;--gx-side:clamp(16px,4vw,56px);--gx-display:var(--font-head);--gx-label:Archivo,sans-serif}
.spacing-compact{--gx-k:.45}.spacing-airy{--gx-k:1.7}

/* template signatures: the "neutral" palette is each template's own paper and ink */
.gallery-style-editorial.palette-neutral{--gallery-bg:#faf9f6;--gallery-ink:#1c1b19}
.gallery-style-minimal.palette-neutral{--gallery-bg:#f6f6f4;--gallery-ink:#2b2b2b}
.gallery-style-album.palette-neutral{--gallery-bg:#f4f0e8;--gallery-ink:#36312a}
.gallery-style-modern.palette-neutral{--gallery-bg:#ffffff;--gallery-ink:#141414}
.gallery-style-classic.palette-neutral{--gallery-bg:#f5f0e6;--gallery-ink:#3b342b}
.palette-ivory{--gallery-bg:#f4f0e7;--gallery-ink:#37332e}.palette-sand{--gallery-bg:#eae1d6;--gallery-ink:#44372d}.palette-sage{--gallery-bg:#e6eae3;--gallery-ink:#293b30}
body.films-dark{--gallery-bg:#191919;--gallery-ink:#eee}
.films-dark.palette-ivory{--gallery-bg:#25231f;--gallery-ink:#f4f0e7}.films-dark.palette-sand{--gallery-bg:#2f261f;--gallery-ink:#eae1d6}.films-dark.palette-sage{--gallery-bg:#1e2b23;--gallery-ink:#e6eae3}
.films-dark.gallery-style-editorial.palette-neutral{--gallery-bg:#141413;--gallery-ink:#eeeae3}
.films-dark.gallery-style-minimal.palette-neutral{--gallery-bg:#161616;--gallery-ink:#e9e9e6}
.films-dark.gallery-style-album.palette-neutral{--gallery-bg:#22201c;--gallery-ink:#ece5d8}
.films-dark.gallery-style-modern.palette-neutral{--gallery-bg:#101010;--gallery-ink:#f2f2f2}
.films-dark.gallery-style-classic.palette-neutral{--gallery-bg:#24211c;--gallery-ink:#f1eadc}
/* Cine is always dark; palettes tint its black */
body.gallery-style-cinema.palette-neutral{--gallery-bg:#0c0b0a;--gallery-ink:#ebe4d6}
body.gallery-style-cinema.palette-ivory{--gallery-bg:#14120f;--gallery-ink:#f4f0e7}
body.gallery-style-cinema.palette-sand{--gallery-bg:#1a140f;--gallery-ink:#eae1d6}
body.gallery-style-cinema.palette-sage{--gallery-bg:#0e1511;--gallery-ink:#e6eae3}

body.films-body{--gallery-muted:color-mix(in srgb,var(--gallery-ink) 58%,var(--gallery-bg));--gallery-line:color-mix(in srgb,var(--gallery-ink) 15%,transparent);background:var(--gallery-bg);color:var(--gallery-ink)}

/* typography per template; the Typography option replaces the display face everywhere */
.gallery-style-editorial{--gx-display:"Instrument Serif",Georgia,serif}
.gallery-style-minimal{--gx-display:Jost,Archivo,sans-serif;--gx-label:Jost,Archivo,sans-serif}
.gallery-style-cinema{--gx-display:"Archivo Narrow",Archivo,sans-serif;--gx-label:"Archivo Narrow",Archivo,sans-serif}
.gallery-style-album{--gx-display:"EB Garamond",Garamond,Georgia,serif;--gx-label:"EB Garamond",Garamond,Georgia,serif}
.gallery-style-modern{--gx-display:Archivo,sans-serif}
.gallery-style-classic{--gx-display:"Cormorant Garamond",Garamond,Georgia,serif}
body.font-serif{--gx-display:Georgia,"Times New Roman",serif}body.font-sans{--gx-display:Archivo,sans-serif}body.font-mono{--gx-display:"Roboto Mono",monospace}

/* ---------- shared chrome, recoloured by the tokens ---------- */
body.films-body .films-nav{background:color-mix(in srgb,var(--gallery-bg) 92%,transparent);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);color:var(--gallery-ink);border-color:var(--gallery-line)}
body.films-body .films-nav-title strong{color:var(--gallery-ink);font-family:var(--gx-display)}
body.films-body .films-nav-title span,body.films-body .films-tabs a{color:var(--gallery-muted)}
body.films-body .films-tabs a.is-active,body.films-body .films-tabs a:hover{color:var(--gallery-ink);border-bottom-color:var(--accent)}
body.films-body .films-nav-icons a,body.films-body .films-nav-icons button{color:var(--gallery-ink)}
body.films-body .films-set,body.films-body .films-footer{background:transparent;color:inherit}
body.films-body .films-footer,body.films-body .films-footer a{color:var(--gallery-muted);border-top-color:var(--gallery-line)}
body.films-body .films-note p,body.films-body .films-help{color:var(--gallery-muted)}
body.films-body .films-sign{color:var(--gallery-ink)}
body.films-body .films-set-head h2{color:var(--gallery-ink);font-family:var(--gx-display);font-weight:400}
body.films-body .films-set-head .eyebrow-wide{color:var(--gallery-muted);opacity:1}
body.films-body.films-all .films-set+.films-set{border-top-color:var(--gallery-line)}
body.films-body .films-ph img{background:color-mix(in srgb,var(--gallery-ink) 7%,var(--gallery-bg))}
.films-grid{gap:var(--gallery-gap);width:min(calc(100% - 2 * var(--gx-side)),var(--gallery-width));margin:0 auto}
.films-ph{flex-basis:calc(var(--r) * var(--photo-size))}
.films-grid-spacer{display:none}
.gx-index,.gx-pull{display:none}
.gx-cover h1{overflow-wrap:anywhere}
.films-hero-content h1{overflow-wrap:anywhere}

/* logo: ink version on paper, light version on dark paper or over photos */
.gx-logo{display:inline-block;line-height:0;opacity:.9;transition:opacity .3s;color:var(--gallery-ink)}.gx-logo:hover{opacity:1}
.gx-logo img{height:40px;width:auto;display:block}
.gx-logo-paper{display:none!important}
body.films-dark .gx-logo-ink{display:none!important}body.films-dark .gx-logo-paper{display:block!important}
/* A studio without its own logo shows the Javu mark; on dark surfaces it turns white instead of vanishing. */

.gx-eyebrow{font:500 .64rem/1.6 var(--gx-label);letter-spacing:.32em;text-transform:uppercase;margin:0}
.gx-meta{font:400 .68rem/1.8 var(--gx-label);letter-spacing:.18em;text-transform:uppercase;color:var(--gallery-muted);margin:0}
.gx-cover .films-scroll{animation:none;text-decoration:none;color:inherit}

/* motion: every template eases photos in differently (gallery.js adds .gx-reveal only without reduced motion) */
.gx-reveal .films-set .films-ph{opacity:0;transition:opacity .9s ease,transform .9s cubic-bezier(.2,.7,.2,1)}
body.gx-reveal .films-set .films-ph.is-in{opacity:1;transform:none}

/* =====================================================================================
   01 EDITORIAL: split cover, magazine rows, pull numbers in the margin
   ===================================================================================== */
.gallery-style-editorial{--gallery-width:1320px;--gallery-gap:calc(clamp(18px,3vw,44px) * var(--gx-k))}
.gallery-style-editorial.size-small{--gallery-width:1040px}.gallery-style-editorial.size-large{--gallery-width:1640px}
.gx-split{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);min-height:clamp(560px,92vh,940px);background:var(--gallery-bg);color:var(--gallery-ink)}
.gx-split-media{position:relative;overflow:hidden;background:color-mix(in srgb,var(--gallery-ink) 10%,var(--gallery-bg))}
.gx-split-media img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.gx-split-text{display:flex;flex-direction:column;justify-content:space-between;gap:48px;padding:clamp(28px,4.5vw,72px) clamp(24px,5.5vw,96px) clamp(24px,3.5vw,48px)}
.gx-split .films-hero-content{padding:0;text-align:left}
.gx-split .gx-eyebrow{color:var(--accent);margin-bottom:clamp(20px,2.6vw,36px)}
.gx-split h1{font-family:var(--gx-display);font-weight:400;font-size:clamp(3.2rem,6.4vw,7.2rem);line-height:.92;letter-spacing:-.02em;margin:0;color:var(--gallery-ink)}
.gx-split .gx-meta{margin-top:26px}
.gx-split-foot{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;padding-top:18px;border-top:1px solid var(--gallery-line);font:400 .6rem/1.6 var(--gx-label);letter-spacing:.22em;text-transform:uppercase;color:var(--gallery-muted)}
.gx-split .films-scroll{margin:0;font-size:inherit;opacity:1;color:var(--gallery-ink);white-space:nowrap}
.gallery-style-editorial .films-nav-title strong{font-size:1.35rem;letter-spacing:0;text-transform:none;font-weight:400}
.gallery-style-editorial .films-set[data-type="photo"]{padding:clamp(48px,7vw,110px) 0 40px}
.gallery-style-editorial .films-set-head{text-align:left;width:min(calc(100% - 2 * var(--gx-side)),var(--gallery-width));margin:0 auto;padding:0 0 clamp(40px,6vw,90px)!important}
.gallery-style-editorial .films-set-head h2{font-style:italic;font-size:clamp(2.2rem,4.4vw,4rem);letter-spacing:-.01em}
.gallery-style-editorial .films-set-head .eyebrow-wide{color:var(--accent);letter-spacing:.34em}
.gallery-style-editorial .gx-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:calc(clamp(56px,8.5vw,140px) * var(--gx-k))}
.gallery-style-editorial .gx-row{flex:none;position:relative;display:grid;grid-template-columns:repeat(12,minmax(0,1fr));column-gap:var(--gallery-gap);align-items:end}
.gallery-style-editorial .gx-row .films-ph{grid-row:1;min-width:0;aspect-ratio:var(--r)}
.gallery-style-editorial .gx-row--single .films-ph{grid-column:1 / span 10}
.gallery-style-editorial .gx-row--single.gx-side-right .films-ph{grid-column:3 / span 10}
.gallery-style-editorial .gx-row--single.is-portrait .films-ph{grid-column:2 / span 5}
.gallery-style-editorial .gx-row--single.is-portrait.gx-side-right .films-ph{grid-column:7 / span 5}
.gallery-style-editorial .gx-row--pair{align-items:start}
.gallery-style-editorial .gx-row--pair>.films-ph:nth-child(1){grid-column:1 / span 7}
.gallery-style-editorial .gx-row--pair>.films-ph:nth-child(2){grid-column:8 / span 5;margin-top:calc(clamp(48px,9vw,170px) * var(--gx-k))}
.gallery-style-editorial .gx-row--pair.is-flip>.films-ph:nth-child(1){grid-column:1 / span 5;margin-top:calc(clamp(48px,9vw,170px) * var(--gx-k))}
.gallery-style-editorial .gx-row--pair.is-flip>.films-ph:nth-child(2){grid-column:6 / span 7;margin-top:0}
.gallery-style-editorial .gx-row--pair>.is-v:nth-child(1){grid-column:2 / span 4}
.gallery-style-editorial .gx-row--pair>.is-v:nth-child(1)+.films-ph:not(.is-v){grid-column:6 / span 7}
.gallery-style-editorial .gx-row--pair>.films-ph:not(.is-v):nth-child(1)+.is-v{grid-column:9 / span 4}
.gallery-style-editorial .gx-row--pair>.is-v:nth-child(1)+.is-v{grid-column:8 / span 4}
.gallery-style-editorial .gx-row--pair.is-flip>.is-v:nth-child(1):has(+.is-v){grid-column:1 / span 4}
.gallery-style-editorial .gx-row--pair.is-flip>.is-v:nth-child(1)+.is-v{grid-column:7 / span 5}
.gallery-style-editorial .gx-pull{display:flex;flex-direction:column;gap:14px;grid-row:1;align-self:end;margin:0;color:var(--gallery-ink)}
.gallery-style-editorial .gx-pull b{font:400 clamp(4.5rem,11vw,10.5rem)/.8 var(--gx-display);letter-spacing:-.04em;color:color-mix(in srgb,var(--accent) 75%,var(--gallery-ink))}
.gallery-style-editorial .gx-pull span{font:400 .6rem/1.7 var(--gx-label);letter-spacing:.3em;text-transform:uppercase;color:var(--gallery-muted);max-width:22ch}
.gallery-style-editorial .gx-row--single.is-portrait .gx-pull{grid-column:8 / span 4}
.gallery-style-editorial .gx-row--single.is-portrait.gx-side-right .gx-pull{grid-column:2 / span 4;align-items:flex-end;text-align:right}
.gallery-style-editorial .gx-row--single:not(.is-portrait) .gx-pull{grid-column:11 / span 2;align-self:start;gap:10px}
.gallery-style-editorial .gx-row--single:not(.is-portrait).gx-side-right .gx-pull{grid-column:1 / span 2;align-items:flex-end;text-align:right}
.gallery-style-editorial .gx-row--single:not(.is-portrait) .gx-pull b{font-size:clamp(2.2rem,4vw,3.6rem)}
.gallery-style-editorial [data-fav-grid]{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));align-items:start}
.gx-reveal.gallery-style-editorial .films-set .films-ph{transform:translateY(40px);transition-duration:1.2s}

/* =====================================================================================
   02 MINIMAL: names and logo on calm paper, an even three-column grid with air
   ===================================================================================== */
.gallery-style-minimal{--gallery-width:1180px;--gallery-gap:calc(clamp(28px,4.4vw,72px) * var(--gx-k))}
.gallery-style-minimal.size-small{--gallery-width:1240px}.gallery-style-minimal.size-large{--gallery-width:1240px}
.gx-title{position:relative;display:flex;align-items:center;justify-content:center;min-height:clamp(440px,72vh,760px);padding:72px 16px;text-align:center;background:var(--gallery-bg);color:var(--gallery-ink)}
.gx-title .films-hero-content{padding:0;display:flex;flex-direction:column;align-items:center}
.gx-title .gx-logo{margin-bottom:clamp(40px,7vh,72px)}.gx-title .gx-logo img{height:46px}
.gx-title h1{font-family:var(--gx-display);font-weight:300;font-size:clamp(2.2rem,4.6vw,4.1rem);line-height:1.1;letter-spacing:.06em;margin:0;color:var(--gallery-ink)}
.gx-rule{display:block;width:56px;height:1px;background:color-mix(in srgb,var(--gallery-ink) 45%,transparent);margin:34px auto 26px}
.gx-title .gx-meta{letter-spacing:.32em}
.gx-title .films-scroll{position:absolute;left:50%;bottom:28px;transform:translateX(-50%);margin:0;font-size:1rem;opacity:.5}
.gallery-style-minimal .films-nav-inner{justify-content:center}
.gallery-style-minimal .films-nav-title strong{font-weight:300;letter-spacing:.14em}
.gallery-style-minimal .films-set[data-type="photo"]{padding:clamp(56px,8vw,120px) 0 60px}
.gallery-style-minimal .films-set-head{padding:0 16px clamp(40px,6vw,80px)!important}
.gallery-style-minimal .films-set-head h2{font-weight:300;letter-spacing:.08em;font-size:clamp(1.4rem,2.4vw,2rem)}
.gallery-style-minimal .films-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center}
.gallery-style-minimal.size-small .films-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.gallery-style-minimal.size-large .films-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.gallery-style-minimal .films-grid .films-ph{--cr:.8;aspect-ratio:var(--cr);display:flex;align-items:center;justify-content:center}
.gallery-style-minimal .films-ph a{width:calc(100% * min(1, var(--r) / var(--cr)))}
.gallery-style-minimal .films-ph img{width:100%;height:auto}
.gallery-style-minimal .films-heart{right:calc((100% - 100% * min(1, var(--r) / var(--cr))) / 2 + 10px);bottom:calc((100% - 100% * min(1, var(--cr) / var(--r))) / 2 + 10px)}
.gx-reveal.gallery-style-minimal .films-set .films-ph{transform:translateY(22px);transition-duration:1s}
.gx-reveal.gallery-style-minimal .films-set .films-ph:nth-child(3n+2){transition-delay:.08s}
.gx-reveal.gallery-style-minimal .films-set .films-ph:nth-child(3n){transition-delay:.16s}

/* =====================================================================================
   03 CINE: always dark, letterboxed title card, one full-screen frame at a time
   ===================================================================================== */
html:has(body.gallery-style-cinema){scroll-snap-type:y proximity}
.gallery-style-cinema{--gx-bar:clamp(44px,10vh,110px)}
.gx-cine{position:relative;height:100vh;height:100svh;min-height:520px;overflow:hidden;background:#000;color:#f3ede2;scroll-snap-align:start}
.gx-cine .films-hero-bg{position:absolute;left:0;right:0;top:var(--gx-bar);bottom:var(--gx-bar);width:100%;height:calc(100% - 2 * var(--gx-bar));object-fit:cover}
.gx-cine::after{content:"";position:absolute;left:0;right:0;top:var(--gx-bar);bottom:var(--gx-bar);background:radial-gradient(ellipse at center,rgba(0,0,0,.5) 0%,rgba(0,0,0,.28) 60%,rgba(0,0,0,.5) 100%);pointer-events:none}
.gx-cine-bar{position:absolute;left:0;right:0;z-index:2;height:var(--gx-bar);display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 var(--gx-side);font:500 .6rem/1 var(--gx-label);letter-spacing:.42em;text-transform:uppercase;color:rgba(243,237,226,.62)}
.gx-cine-top{top:0}.gx-cine-bottom{bottom:0}
.gx-cine-bar .gx-logo img{height:26px}
.gx-cine .films-hero-content{position:absolute;z-index:2;left:50%;top:50%;transform:translate(-50%,-50%);width:min(760px,calc(100% - 2 * var(--gx-side)));padding:26px 0 24px;text-align:center;border-top:1px solid rgba(243,237,226,.38);border-bottom:1px solid rgba(243,237,226,.38)}
.gx-cine .gx-eyebrow{color:rgba(243,237,226,.7);letter-spacing:.5em;padding-left:.5em}
.gx-cine h1{font-family:var(--gx-display);font-weight:500;font-size:clamp(1.7rem,3.6vw,3.4rem);line-height:1.12;letter-spacing:.26em;padding-left:.26em;text-transform:uppercase;margin:16px 0 0;color:#f6f1e7}
.gx-cine .gx-meta{color:rgba(243,237,226,.7);margin-top:14px}
.gx-cine .films-scroll{margin:0;font-size:.9rem;letter-spacing:0;color:rgba(243,237,226,.8)}
.gallery-style-cinema .films-nav{background:color-mix(in srgb,var(--gallery-bg) 72%,transparent)!important;border-bottom-color:transparent!important}
.gallery-style-cinema .films-nav-title{display:none}
.gallery-style-cinema .films-tabs a{font-family:var(--gx-label);letter-spacing:.3em}
.gallery-style-cinema .films-set[data-type="photo"]{padding:0}
.gallery-style-cinema .films-grid{display:block;width:100%;max-width:none;margin:0}
.gallery-style-cinema .films-grid .films-ph{position:relative;height:100vh;height:100svh;min-height:420px;padding:84px var(--gx-side) 48px;box-sizing:border-box;scroll-snap-align:start}
.gallery-style-cinema .films-ph a{display:block;width:100%;height:100%}
.gallery-style-cinema .films-ph img{width:100%;height:100%;aspect-ratio:auto;object-fit:contain;background:transparent!important}
.gallery-style-cinema .gx-index{display:block;position:absolute;left:var(--gx-side);bottom:16px;font:400 .62rem/1 "Roboto Mono",monospace;letter-spacing:.18em;color:var(--gallery-muted)}
.gallery-style-cinema .gx-index b{font-weight:400;color:var(--gallery-ink)}
.gallery-style-cinema .films-heart{right:var(--gx-side);bottom:8px;opacity:.85}
.gallery-style-cinema.films-all .films-set+.films-set{margin-top:0;padding-top:0;border-top:0}
.gallery-style-cinema .films-set-head{padding:22vh 16px 14vh!important;scroll-snap-align:start}
.gallery-style-cinema .films-set-head h2{font-weight:500;text-transform:uppercase;letter-spacing:.32em;font-size:clamp(1.3rem,2.6vw,2.2rem)}
.gallery-style-cinema .films-set-head .eyebrow-wide{font-family:"Roboto Mono",monospace;letter-spacing:.3em}
.gallery-style-cinema [data-fav-grid] .films-ph{height:80vh}
.gx-reveal.gallery-style-cinema .films-set .films-ph{transition:opacity 1.6s ease}

/* =====================================================================================
   04 ÁLBUM: a printed fine-art book. Title page, spreads, small-caps captions, folios
   ===================================================================================== */
.gallery-style-album{--gallery-width:1180px;--gx-page:clamp(12px,4vw,64px)}
.gallery-style-album.size-small{--gallery-width:960px}.gallery-style-album.size-large{--gallery-width:1440px}
.gx-book{position:relative;display:flex;justify-content:center;padding:clamp(40px,9vh,110px) var(--gx-side);background:var(--gallery-bg);color:var(--gallery-ink)}
.gx-book-page{width:min(560px,100%);min-height:clamp(480px,78vh,820px);display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:48px;text-align:center}
.gx-book .gx-logo img{height:34px}
.gx-book .films-hero-content{padding:0}
.gx-book .gx-eyebrow{font:400 1rem/1.4 var(--gx-label);font-variant-caps:all-small-caps;text-transform:none;letter-spacing:.22em;color:var(--gallery-muted)}
.gx-book h1{font-family:var(--gx-display);font-weight:400;font-size:clamp(2.4rem,5vw,4.3rem);line-height:1.08;letter-spacing:.005em;margin:22px 0 18px;color:var(--gallery-ink)}
.gx-book .gx-meta{font:italic 400 1.08rem/1.6 var(--gx-label);letter-spacing:.01em;text-transform:none}
.gx-book-credit{margin:0;font:400 .95rem/1.4 var(--gx-label);font-variant-caps:all-small-caps;letter-spacing:.2em;color:var(--gallery-muted)}
.gx-book .films-scroll{position:absolute;left:50%;bottom:24px;transform:translateX(-50%);margin:0;font-size:.9rem;opacity:.45}
.gallery-style-album .films-nav-title strong{font-family:var(--gx-display);text-transform:none;letter-spacing:.02em;font-size:1.15rem;font-weight:400}
.gallery-style-album .films-tabs a{font-family:var(--gx-label);font-variant-caps:all-small-caps;text-transform:none;font-size:.95rem;letter-spacing:.16em}
.gallery-style-album .films-set[data-type="photo"]{padding:clamp(64px,9vw,140px) 0 60px}
.gallery-style-album .films-set-head{padding:0 16px clamp(48px,7vw,100px)!important}
.gallery-style-album .films-set-head h2{font-size:clamp(1.6rem,3vw,2.4rem)}
.gallery-style-album .films-set-head .eyebrow-wide{font-family:var(--gx-label);font-variant-caps:all-small-caps;text-transform:none;font-size:.95rem;letter-spacing:.24em}
.gallery-style-album .gx-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:calc(clamp(72px,11vw,170px) * var(--gx-k))}
.gallery-style-album .gx-row{flex:none;display:grid;grid-template-columns:1fr 1fr;align-items:center;row-gap:clamp(20px,2.4vw,32px)}
.gallery-style-album .gx-row .films-ph{grid-row:1;min-width:0;justify-self:center;aspect-ratio:var(--r)}
.gallery-style-album .gx-row--pair .films-ph{width:calc(100% - 2 * var(--gx-page))}
.gallery-style-album .gx-row--pair .films-ph:nth-child(1){justify-self:end;margin-right:calc(var(--gx-page) / 2)}
.gallery-style-album .gx-row--pair .films-ph:nth-child(2){justify-self:start;margin-left:calc(var(--gx-page) / 2)}
.gallery-style-album .gx-row--pair:not(.is-portrait) .films-ph{width:calc(100% - 1.5 * var(--gx-page))}
.gallery-style-album .gx-row--single .films-ph{grid-column:1 / -1;width:min(80%,calc(76vh * var(--r)))}
.gallery-style-album .gx-row--single.is-portrait .films-ph{grid-column:2;width:min(calc(100% - 2 * var(--gx-page)),calc(76vh * var(--r)))}
.gallery-style-album .gx-caption{grid-column:1 / -1;grid-row:2;display:grid;grid-template-columns:1fr auto 1fr;align-items:baseline;gap:16px;margin:0;font:400 .95rem/1.4 var(--gx-label);font-variant-caps:all-small-caps;letter-spacing:.18em;color:var(--gallery-muted)}
.gallery-style-album .gx-caption::before{content:""}
.gallery-style-album .gx-folio{justify-self:end;font-variant-caps:normal;font-variant-numeric:oldstyle-nums;letter-spacing:.06em;font-size:.88rem;opacity:.8}
.gallery-style-album [data-fav-grid]{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));align-items:center}
.gx-reveal.gallery-style-album .films-set .films-ph{transition:opacity 1.1s ease}

/* =====================================================================================
   05 MOSAICO: compact header, a short cover band, tight masonry of every frame
   ===================================================================================== */
.gallery-style-modern{--gallery-width:1880px;--gallery-gap:calc(8px * var(--gx-k))}
.gx-mosaic-bar{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:64px;padding:12px var(--gx-side);background:var(--gallery-bg);color:var(--gallery-ink);border-bottom:1px solid var(--gallery-line)}
.gx-mosaic-bar .gx-logo img{height:30px}
.gx-mosaic-meta{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px 22px;margin:0;font:500 .6rem/1.5 var(--gx-label);letter-spacing:.18em;text-transform:uppercase;color:var(--gallery-muted)}
.gx-band{height:clamp(260px,45vh,480px)}
.gx-band .films-hero-content h1{font-family:var(--gx-display);font-weight:600;font-size:clamp(2.4rem,6vw,5.6rem);letter-spacing:-.045em;line-height:.95;margin:0}
.gx-band .films-meta{margin-top:.8rem}
.gx-band.films-hero--center .films-hero-content{padding-top:0}
.gx-band.films-hero--left .films-hero-content h1{font-size:clamp(2.4rem,6vw,5.6rem)}
.gallery-style-modern .films-nav-inner{width:min(100% - 2 * var(--gx-side),1880px);min-height:56px}
.gallery-style-modern .films-nav-title strong{font-weight:600;letter-spacing:-.01em;text-transform:none;font-size:1rem}
.gallery-style-modern .films-set[data-type="photo"]{padding:var(--gallery-gap) 0 40px}
.gallery-style-modern .films-set-head{text-align:left;padding:28px var(--gx-side) 18px!important;width:min(100%,1880px);margin:0 auto}
.gallery-style-modern .films-set-head h2{font-weight:600;letter-spacing:-.03em}
.gallery-style-modern .films-grid{--gx-cols:4;display:block;columns:var(--gx-cols);column-gap:var(--gallery-gap)}
.gallery-style-modern.size-small .films-grid{--gx-cols:5}.gallery-style-modern.size-large .films-grid{--gx-cols:3}
.gallery-style-modern .films-ph{break-inside:avoid;margin:0 0 var(--gallery-gap)}
/* gallery.js places each photo so the order reads left to right; the columns above are what shows without it */
.gallery-style-modern .films-grid.is-placed{columns:auto;position:relative}
.gallery-style-modern .films-grid.is-placed .films-ph{position:absolute;margin:0}
.gallery-style-modern .films-ph a{overflow:hidden}
.gallery-style-modern .films-ph img{transition:transform .6s cubic-bezier(.2,.7,.2,1)}
.gallery-style-modern .films-ph:hover img{transform:scale(1.03)}
.gx-reveal.gallery-style-modern .films-set .films-ph{transform:scale(.97);transition-duration:.6s}

/* =====================================================================================
   06 CLÁSICA: framed cover on ivory, italic serif, centred two-column grid
   ===================================================================================== */
.gallery-style-classic{--gallery-width:1100px;--gallery-gap:calc(clamp(22px,3.4vw,52px) * var(--gx-k))}
.gallery-style-classic.size-small{--gallery-width:860px}.gallery-style-classic.size-large{--gallery-width:1380px}
.gx-framed{display:flex;flex-direction:column;align-items:center;padding:clamp(26px,4vw,52px) var(--gx-side) clamp(48px,6vw,84px);text-align:center;background:var(--gallery-bg);color:var(--gallery-ink)}
.gx-framed .gx-logo{margin-bottom:clamp(22px,3vw,40px)}.gx-framed .gx-logo img{height:38px}
.gx-frame{position:relative;width:min(100%,1080px,calc((70vh - 30px) * 1.6));aspect-ratio:16 / 10;padding:clamp(10px,1.5vw,20px);background:color-mix(in srgb,#fff 45%,var(--gallery-bg));border:1px solid color-mix(in srgb,var(--gallery-ink) 32%,transparent);box-sizing:border-box}
.gx-frame img{position:static;display:block;width:100%;height:100%;object-fit:cover}
.gx-framed .films-hero-content{padding:clamp(30px,4vw,52px) 0 0}
.gx-framed .gx-eyebrow{color:var(--gallery-muted);letter-spacing:.42em}
.gx-framed h1{font-family:var(--gx-display);font-style:italic;font-weight:400;font-size:clamp(2.6rem,5.4vw,5rem);line-height:1.04;letter-spacing:.005em;margin:14px 0 0;color:var(--gallery-ink)}
.gx-framed .gx-meta{margin-top:12px;font-style:italic;text-transform:none;letter-spacing:.04em;font-size:.95rem;font-family:var(--gx-display)}
.gx-framed .films-scroll{display:inline-block;margin-top:26px;font-size:1rem;opacity:.5}
.gallery-style-classic .films-nav-inner{justify-content:center}
.gallery-style-classic .films-nav-title strong{font-style:italic;text-transform:none;letter-spacing:.01em;font-size:1.3rem;font-weight:400}
.gallery-style-classic .films-set[data-type="photo"]{padding:clamp(48px,7vw,100px) 0 50px}
.gallery-style-classic .films-set-head h2{font-style:italic;font-size:clamp(1.8rem,3.4vw,2.8rem)}
.gallery-style-classic .films-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:center}
.gallery-style-classic .films-grid .films-ph{--cr:1;aspect-ratio:var(--cr);padding:0 5%;box-sizing:border-box;display:flex;align-items:center;justify-content:center}
.gallery-style-classic .films-ph a{width:calc(100% * min(1, var(--r) / var(--cr)))}
.gallery-style-classic .films-ph img{width:100%;height:auto}
.gallery-style-classic .films-heart{right:calc((100% - 100% * min(1, var(--r) / var(--cr))) / 2 + 10px);bottom:calc((100% - 100% * min(1, var(--cr) / var(--r))) / 2 + 10px)}
.gx-reveal.gallery-style-classic .films-set .films-ph{transform:translateY(12px);transition-duration:1.1s}

/* ---------- tablet ---------- */
@media(max-width:1000px){
  .gallery-style-minimal .films-grid,.gallery-style-minimal.size-small .films-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gallery-style-modern .films-grid,.gallery-style-modern.size-small .films-grid{--gx-cols:3}
}
/* ---------- phones: 16px gutter, no sideways scroll ---------- */
@media(max-width:760px){
  .films-body{--gx-side:16px}
  .films-body .films-grid{width:calc(100% - 2 * var(--gx-side))}
  .gallery-style-cinema .films-grid{width:100%}
  .films-nav-inner{width:calc(100% - 2 * var(--gx-side))!important}
  .gx-split{grid-template-columns:1fr;min-height:0}
  .gx-split-media{aspect-ratio:4 / 5;max-height:72vh;width:100%}
  .gx-split-text{gap:36px;padding:28px 16px 22px}
  .gx-split .gx-logo img{height:30px}
  .gx-split h1{font-size:clamp(2.8rem,14vw,4.2rem)}
  .gallery-style-editorial .gx-grid{gap:calc(48px * var(--gx-k))}
  .gallery-style-editorial .gx-row{grid-template-columns:repeat(6,minmax(0,1fr));column-gap:12px}
  .gallery-style-editorial .gx-row .films-ph{grid-row:auto!important}
  .gallery-style-editorial .gx-row--single .films-ph,.gallery-style-editorial .gx-row--single.gx-side-right .films-ph{grid-column:1 / -1!important}
  .gallery-style-editorial .gx-row--single.is-portrait .films-ph{grid-column:1 / span 5!important}
  .gallery-style-editorial .gx-row--single.is-portrait.gx-side-right .films-ph{grid-column:2 / span 5!important}
  .gallery-style-editorial .gx-row--pair{row-gap:14px}
  .gallery-style-editorial .gx-row--pair>.films-ph:nth-child(1){grid-column:1 / -1!important;margin-top:0!important}
  .gallery-style-editorial .gx-row--pair>.films-ph:nth-child(2){grid-column:2 / -1!important;margin-top:0!important}
  .gallery-style-editorial .gx-row--pair>.is-v:nth-child(1){grid-column:1 / span 5!important}
  .gallery-style-editorial .gx-row--pair>.films-ph+.is-v{grid-column:3 / -1!important}
  .gallery-style-editorial .gx-pull{display:none!important}
  .gallery-style-editorial .gx-row--single.is-portrait .gx-pull{display:flex!important;grid-row:1!important;grid-column:6 / -1!important;align-self:start}
  .gallery-style-editorial .gx-row--single.is-portrait.gx-side-right .gx-pull{grid-column:1 / span 1!important}
  .gallery-style-editorial .gx-row--single.is-portrait .gx-pull b{font-size:2rem}
  .gallery-style-editorial .gx-row--single.is-portrait .gx-pull span{display:none}
  .gx-title{min-height:clamp(400px,70vh,640px)}
  .gx-title h1{font-size:clamp(2rem,9.5vw,3rem)}
  .gallery-style-minimal .films-grid,.gallery-style-minimal.size-small .films-grid,.gallery-style-minimal.size-large .films-grid{grid-template-columns:1fr;gap:calc(32px * var(--gx-k))}
  .gallery-style-minimal .films-grid .films-ph{aspect-ratio:auto}
  .gallery-style-minimal .films-ph a{width:100%}
  .gallery-style-minimal .films-heart{right:10px;bottom:10px}
  .gallery-style-cinema{--gx-bar:clamp(40px,9vh,72px)}
  .gx-cine h1{letter-spacing:.18em;padding-left:.18em;font-size:clamp(1.6rem,8vw,2.4rem)}
  .gx-cine-bar{letter-spacing:.28em}
  .gallery-style-cinema .films-grid .films-ph{padding:110px 0 40px}
  .gallery-style-cinema .gx-index{left:16px}
  .gx-book-page{min-height:clamp(440px,74vh,640px)}
  .gallery-style-album{--gx-page:10px}
  .gallery-style-album .gx-row--single .films-ph{width:100%}
  .gallery-style-album .gx-row--single.is-portrait .films-ph{grid-column:1 / -1;width:min(78%,calc(70vh * var(--r)))}
  .gallery-style-album .gx-row--pair .films-ph,.gallery-style-album .gx-row--pair:not(.is-portrait) .films-ph{width:calc(100% - 5px)}
  .gallery-style-album .gx-row--pair .films-ph:nth-child(1){margin-right:5px}.gallery-style-album .gx-row--pair .films-ph:nth-child(2){margin-left:5px}
  .gallery-style-album .gx-caption{font-size:.85rem;letter-spacing:.12em;gap:8px}
  .gx-mosaic-bar{min-height:52px;padding:10px 16px}.gx-mosaic-bar .gx-logo img{height:26px}
  .gx-mosaic-meta{gap:2px 12px;font-size:.52rem;letter-spacing:.14em}
  .gx-band{height:clamp(220px,40vh,320px)}
  .gallery-style-modern .films-grid,.gallery-style-modern.size-small .films-grid{--gx-cols:2}
  .gallery-style-modern.size-large .films-grid{--gx-cols:1}
  .gx-frame{width:100%;aspect-ratio:4 / 5}
  .gallery-style-classic .films-grid{grid-template-columns:1fr}
  .gallery-style-classic .films-grid .films-ph{aspect-ratio:auto}
  .gallery-style-classic .films-ph a{width:100%}
  .gallery-style-classic .films-heart{right:10px;bottom:10px}
}
@media(prefers-reduced-motion:reduce){.films-scroll{animation:none}.gx-reveal .films-set .films-ph{opacity:1!important;transform:none!important;transition:none!important}html:has(body.gallery-style-cinema){scroll-snap-type:none}}

/* ---------- public example switcher ---------- */
.showcase-bar{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 24px;background:#eeeae1;color:#252525;font:12px Archivo,sans-serif}.showcase-bar a{color:inherit;text-decoration:none;white-space:nowrap}.showcase-bar nav{display:flex;gap:18px;flex-wrap:wrap}.showcase-bar small{font-size:9px;opacity:.55;margin-right:2px}.showcase-bar a[aria-current]{text-decoration:underline;text-underline-offset:5px}
@media(max-width:760px){.showcase-bar{flex-wrap:wrap;padding:12px 16px}.showcase-bar span{font-size:9px}.showcase-bar nav{width:100%;gap:8px 14px}}
.showcase-embedded .films-hero,.showcase-embedded .gx-cover,.showcase-embedded .gx-mosaic-bar,.showcase-embedded .showcase-bar{display:none}

/* ?preview=1 renders the example without its top bar: the homepage showroom images are captured this way. */
.showcase-preview .showcase-bar{display:none}
