.route-gallery{
  --gallery-gap:12px;
  --bg:#00000d;
  background:#00000d!important;
  background-image:none!important;
  background-attachment:scroll!important;
  color-scheme:dark;
}
html[data-theme] body.route-gallery{background:#00000d!important;}
.route-gallery .theme-toggle{display:none!important;}
.gallery-main{position:relative;z-index:1;padding-bottom:clamp(64px,10vw,140px);}
.gallery-hero{position:relative;width:min(1500px,calc(100% - 24px));margin:clamp(10px,2vw,24px) auto clamp(56px,8vw,112px);aspect-ratio:16/9;max-height:min(78svh,900px);overflow:hidden;border-radius:clamp(20px,3vw,40px);background:linear-gradient(145deg,#0f1020,#08070d);box-shadow:0 28px 80px rgba(0,0,0,.3);isolation:isolate;}
.gallery-hero::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(2,3,8,.05) 30%,rgba(2,3,8,.82) 100%);z-index:2;pointer-events:none;}
.gallery-hero-cover,.gallery-hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block;}
.gallery-hero-cover{z-index:0;}
.gallery-hero-video{z-index:1;opacity:1;transition:opacity .8s cubic-bezier(.2,.75,.2,1);background:#050509;}
.gallery-hero.is-finished .gallery-hero-video{opacity:0;pointer-events:none;}
.gallery-hero-copy{position:absolute;z-index:3;left:clamp(22px,5vw,72px);right:clamp(22px,5vw,72px);bottom:clamp(22px,5vw,64px);color:#fff;max-width:760px;}
.gallery-hero-copy .section-label{color:rgba(255,255,255,.72);}
.gallery-hero-copy h1{margin:.35rem 0 .6rem;font-size:clamp(2.2rem,6vw,5.8rem);line-height:.9;letter-spacing:-.055em;}
.gallery-hero-copy p{margin:0;max-width:610px;font-size:clamp(.98rem,1.6vw,1.18rem);color:rgba(255,255,255,.8);}
.gallery-empty-hero{display:grid;place-items:center;text-align:center;padding:30px;}
.gallery-empty-hero .gallery-hero-copy{position:relative;inset:auto;}
.gallery-sections{width:min(1500px,calc(100% - 24px));margin:0 auto;}
.gallery-section{margin:0 0 clamp(54px,8vw,110px);}
.gallery-divider{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.65fr);align-items:end;gap:28px;padding:0 2px clamp(22px,3vw,38px);border-bottom:1px solid color-mix(in srgb,var(--line,#ffffff20) 80%,transparent);margin-bottom:var(--gallery-gap);}
.gallery-divider h2{margin:0;font-size:clamp(2rem,4.8vw,4.7rem);letter-spacing:-.045em;line-height:.95;}
.gallery-divider p{margin:0;color:var(--muted,#a9a9b5);max-width:560px;justify-self:end;}
.gallery-masonry{column-count:4;column-gap:var(--gallery-gap);}
.gallery-card{display:inline-block;width:100%;margin:0 0 var(--gallery-gap);break-inside:avoid;position:relative;opacity:0;transform:translateY(14px);transition:opacity .5s ease,transform .65s cubic-bezier(.2,.75,.2,1);}
.gallery-card.is-visible{opacity:1;transform:none;}
.gallery-media-frame{position:relative;overflow:hidden;border-radius:clamp(12px,1.5vw,20px);background:#0d0d14;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);}
.gallery-media-frame img,.gallery-media-frame video{display:block;width:100%;height:auto;max-width:100%;background:#0b0b10;}
.gallery-media-frame img{cursor:zoom-in;transition:transform .7s cubic-bezier(.2,.7,.2,1),filter .3s ease;}
.gallery-media-frame:hover img{transform:scale(1.015);filter:saturate(1.04);}
.gallery-media-frame.is-video{display:block;aspect-ratio:auto!important;overflow:visible;background:transparent;box-shadow:none;}
.gallery-media-frame.is-video video{display:block;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important;object-position:center!important;background:#050509;border-radius:clamp(12px,1.5vw,20px);overflow:hidden;}
.gallery-video-title{padding:10px 3px 8px;}
.gallery-video-title strong{display:block;font-size:clamp(.95rem,1.25vw,1.12rem);letter-spacing:-.02em;}
.gallery-video-title small{display:block;margin-top:3px;color:var(--muted,#aaa);line-height:1.45;}
.gallery-lightbox[hidden]{display:none!important;}
.gallery-lightbox{position:fixed;inset:0;z-index:99999;background:rgba(3,3,7,.9);backdrop-filter:blur(14px);display:grid;place-items:center;padding:clamp(12px,3vw,38px);}
.gallery-lightbox-stage{max-width:min(94vw,1600px);max-height:90vh;display:grid;place-items:center;}
.gallery-lightbox-stage img,.gallery-lightbox-stage video{max-width:100%;max-height:90vh;border-radius:18px;box-shadow:0 30px 100px rgba(0,0,0,.55);}
.gallery-lightbox-close{position:fixed;top:max(16px,env(safe-area-inset-top));right:18px;width:44px;height:44px;border-radius:50%;border:1px solid rgba(255,255,255,.18);background:rgba(10,10,15,.72);color:#fff;font-size:25px;cursor:pointer;z-index:2;}
html.gallery-lightbox-open{overflow:hidden;}
@media(max-width:1050px){.gallery-masonry{column-count:3}.gallery-divider{grid-template-columns:1fr;gap:12px}.gallery-divider p{justify-self:start}}
@media(max-width:680px){.route-gallery{--gallery-gap:8px}.gallery-hero,.gallery-sections{width:calc(100% - 16px)}.gallery-hero{margin-top:8px;border-radius:18px;aspect-ratio:16/10;max-height:58svh}.gallery-hero-copy{left:18px;right:18px;bottom:18px}.gallery-hero-copy p{font-size:.9rem}.gallery-masonry{column-count:2}.gallery-media-frame{border-radius:11px}.gallery-media-frame.is-video video{border-radius:11px}.gallery-divider{padding-bottom:16px}.gallery-section{margin-bottom:50px}.gallery-video-title{padding:7px 2px 6px}.gallery-video-title small{display:none}}

/* Horizontal gallery videos: keep their real 16:9 presence instead of squeezing them into one masonry column. */
.gallery-card.is-video-card{column-span:all;display:block;width:min(100%,1180px);margin:0 auto clamp(26px,4vw,58px);break-inside:avoid;}
.gallery-card.is-video-card .gallery-video-title{max-width:1180px;margin:0 auto;}
.gallery-card.is-video-card .gallery-media-frame.is-video{width:100%;aspect-ratio:16 / 9!important;overflow:hidden!important;background:#050509;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05);border-radius:clamp(14px,1.8vw,22px);}
.gallery-card.is-video-card .gallery-media-frame.is-video video{width:100%!important;height:100%!important;aspect-ratio:16 / 9!important;object-fit:contain!important;object-position:center!important;border-radius:inherit!important;background:#050509;}
@media(max-width:680px){
  .gallery-card.is-video-card{column-span:all;width:100%;margin-bottom:18px;}
  .gallery-card.is-video-card .gallery-media-frame.is-video{aspect-ratio:16 / 9!important;border-radius:12px;}
}

@media(prefers-reduced-motion:reduce){.gallery-card{opacity:1;transform:none;transition:none}.gallery-hero-video{display:none}.gallery-media-frame img{transition:none}}

/* Lightweight non-destructive media finish: no grain, glow or flashing overlays. */
.gallery-media-frame img,
.gallery-media-frame video,
.gallery-hero-cover,
.gallery-hero-video{
  filter:contrast(1.035) saturate(1.025) brightness(.992);
  backface-visibility:hidden;
}
@media(max-width:680px){
  .gallery-media-frame img,.gallery-media-frame video,.gallery-hero-cover,.gallery-hero-video{filter:contrast(1.025) saturate(1.02) brightness(.995);}
}


/* ===== Gallery editorial titles + isolated image viewer ===== */
.gallery-divider{
  position:relative;
  grid-template-columns:minmax(0,1.15fr) minmax(260px,.7fr);
  padding:clamp(18px,2.4vw,30px) 0 clamp(24px,3vw,38px);
  margin-bottom:clamp(12px,1.8vw,22px);
  border-bottom:0;
}
.gallery-divider::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:clamp(52px,7vw,104px);
  height:2px;
  border-radius:99px;
  background:linear-gradient(90deg,var(--primary,#8999ff),var(--teal,#57d8cf));
}
.gallery-divider h2{
  max-width:900px;
  font-size:clamp(2.15rem,4.7vw,4.9rem);
  font-weight:650;
  line-height:.94;
  letter-spacing:-.052em;
  text-wrap:balance;
}
.gallery-divider p{
  max-width:580px;
  padding-bottom:.35rem;
  font-size:clamp(.94rem,1.2vw,1.08rem);
  line-height:1.62;
  color:color-mix(in srgb,var(--muted,#a9a9b5) 88%,#fff 12%);
  text-wrap:pretty;
}

.gallery-video-title{
  display:flex;
  align-items:flex-start;
  gap:clamp(12px,1.4vw,18px);
  width:min(100%,1180px);
  margin:0 auto clamp(12px,1.6vw,18px);
  padding:0 clamp(2px,.4vw,6px);
}
.gallery-title-accent{
  flex:0 0 auto;
  width:3px;
  height:clamp(38px,4vw,52px);
  margin-top:2px;
  border-radius:99px;
  background:linear-gradient(180deg,var(--primary,#8999ff),var(--teal,#57d8cf));
  box-shadow:0 0 22px color-mix(in srgb,var(--primary,#8999ff) 24%,transparent);
}
.gallery-title-copy{min-width:0;max-width:820px;}
.gallery-video-title strong{
  display:block;
  margin:0;
  font-size:clamp(1.12rem,1.8vw,1.55rem);
  line-height:1.12;
  letter-spacing:-.035em;
  font-weight:650;
  color:var(--text,#fff);
  text-wrap:balance;
}
.gallery-video-title small{
  display:block;
  margin-top:clamp(5px,.6vw,8px);
  max-width:760px;
  font-size:clamp(.88rem,1.05vw,1rem);
  line-height:1.55;
  color:var(--muted,#a9a9b5);
  text-wrap:pretty;
}

.gallery-image-link{
  position:relative;
  display:block;
  overflow:hidden;
  border-radius:inherit;
  color:inherit;
  text-decoration:none;
  isolation:isolate;
}
.gallery-image-caption{
  position:absolute;
  z-index:7;
  left:0;
  right:0;
  bottom:0;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:clamp(28px,5vw,64px) clamp(12px,1.5vw,20px) clamp(12px,1.5vw,18px);
  background:linear-gradient(180deg,transparent,rgba(5,6,11,.18) 22%,rgba(5,6,11,.86) 100%);
  color:#fff;
  pointer-events:none;
  transform:translateY(8px);
  opacity:.9;
  transition:opacity .25s ease,transform .35s cubic-bezier(.2,.75,.2,1);
}
.gallery-image-caption strong{
  font-size:clamp(.88rem,1.05vw,1.04rem);
  line-height:1.18;
  letter-spacing:-.02em;
  font-weight:650;
  text-shadow:0 2px 14px rgba(0,0,0,.4);
}
.gallery-image-caption small{
  font-size:clamp(.72rem,.86vw,.86rem);
  line-height:1.38;
  color:rgba(255,255,255,.76);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.gallery-image-link:hover .gallery-image-caption,
.gallery-image-link:focus-visible .gallery-image-caption{opacity:1;transform:none;}

/* Public gallery viewer styles. */
.yrv-gallery-viewer[hidden]{display:none!important;}
.yrv-gallery-viewer{
  position:fixed;
  inset:0;
  z-index:100500;
  display:grid;
  grid-template-columns:minmax(44px,72px) minmax(0,1fr) minmax(44px,72px);
  align-items:center;
  gap:clamp(8px,1.6vw,22px);
  width:100vw;
  height:100vh;
  height:100dvh;
  padding:clamp(14px,2.4vw,34px);
  overflow:hidden;
  background:rgba(3,4,8,.94);
  backdrop-filter:blur(18px) saturate(.82);
  -webkit-backdrop-filter:blur(18px) saturate(.82);
  opacity:0;
  transition:opacity .18s ease;
}
.yrv-gallery-viewer.is-open{opacity:1;}
.yrv-gallery-viewer-content{
  min-width:0;
  width:min(100%,1720px);
  max-height:calc(100dvh - 32px);
  margin:auto;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:clamp(10px,1.4vw,16px);
}
.yrv-gallery-viewer-stage{
  position:relative;
  display:grid;
  place-items:center;
  width:100%;
  min-height:80px;
  max-height:calc(100dvh - 150px);
}
.yrv-gallery-viewer-stage.is-loading::before{
  content:"";
  width:30px;
  height:30px;
  border:2px solid rgba(255,255,255,.2);
  border-top-color:rgba(255,255,255,.82);
  border-radius:50%;
  animation:yrvGallerySpin .7s linear infinite;
}
.yrv-gallery-viewer-stage.is-loading .yrv-gallery-viewer-image{opacity:0;}
@keyframes yrvGallerySpin{to{transform:rotate(360deg)}}
.yrv-gallery-viewer-image{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:calc(100dvh - 150px)!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:auto!important;
  border-radius:clamp(10px,1.3vw,18px);
  box-shadow:0 32px 110px rgba(0,0,0,.58);
  background:#07080d;
  opacity:1;
  transition:opacity .18s ease;
}
.yrv-gallery-viewer-caption{
  width:min(100%,980px);
  padding:0 4px;
  text-align:center;
}
.yrv-gallery-viewer-caption strong{
  display:block;
  font-size:clamp(1rem,1.6vw,1.35rem);
  line-height:1.18;
  letter-spacing:-.025em;
  color:#fff;
}
.yrv-gallery-viewer-caption span{
  display:block;
  margin-top:5px;
  font-size:clamp(.82rem,1vw,.95rem);
  line-height:1.5;
  color:rgba(255,255,255,.65);
}
.yrv-gallery-viewer-counter{
  min-height:18px;
  font-size:.76rem;
  letter-spacing:.08em;
  color:rgba(255,255,255,.44);
}
.yrv-gallery-viewer-close,
.yrv-gallery-viewer-nav{
  appearance:none;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(15,17,25,.7);
  color:#fff;
  box-shadow:0 12px 35px rgba(0,0,0,.24);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}
.yrv-gallery-viewer-close:hover,
.yrv-gallery-viewer-nav:hover{background:rgba(28,31,44,.9);border-color:rgba(255,255,255,.28);}
.yrv-gallery-viewer-close{
  position:fixed;
  top:max(14px,env(safe-area-inset-top));
  right:max(14px,env(safe-area-inset-right));
  z-index:2;
  width:46px;
  height:46px;
  display:grid;
  place-items:center;
  padding:0 0 3px;
  border-radius:50%;
  font-size:28px;
  line-height:1;
}
.yrv-gallery-viewer-nav{
  width:clamp(44px,4.5vw,58px);
  height:clamp(52px,6vw,72px);
  display:grid;
  place-items:center;
  padding:0 0 5px;
  border-radius:999px;
  font-size:clamp(28px,3.2vw,42px);
  line-height:1;
}
.yrv-gallery-viewer-nav.is-prev{justify-self:end;}
.yrv-gallery-viewer-nav.is-next{justify-self:start;}
.yrv-gallery-viewer-nav:active{transform:scale(.96);}
html.yrv-gallery-viewer-open,
body.yrv-gallery-viewer-open{overflow:hidden!important;overscroll-behavior:none;}

@media(max-width:1050px){
  .gallery-divider{grid-template-columns:1fr;gap:12px;}
  .gallery-divider p{justify-self:start;padding-bottom:0;}
}
@media(max-width:680px){
  .gallery-divider{padding-top:16px;padding-bottom:20px;margin-bottom:10px;}
  .gallery-divider::before{width:56px;}
  .gallery-divider h2{font-size:clamp(1.85rem,9vw,3.2rem);}
  .gallery-divider p{font-size:.88rem;line-height:1.52;}
  .gallery-video-title{gap:10px;margin-bottom:10px;padding:0 2px;}
  .gallery-title-accent{width:2px;height:36px;}
  .gallery-video-title strong{font-size:1rem;}
  .gallery-video-title small{display:block;font-size:.8rem;line-height:1.42;margin-top:4px;}
  .gallery-image-caption{padding:26px 9px 9px;transform:none;opacity:1;}
  .gallery-image-caption strong{font-size:.76rem;}
  .gallery-image-caption small{font-size:.66rem;-webkit-line-clamp:1;}

  .yrv-gallery-viewer{
    grid-template-columns:1fr;
    padding:max(58px,env(safe-area-inset-top)) 10px max(14px,env(safe-area-inset-bottom));
  }
  .yrv-gallery-viewer-content{max-height:calc(100dvh - 74px);gap:8px;}
  .yrv-gallery-viewer-stage{max-height:calc(100dvh - 150px);}
  .yrv-gallery-viewer-image{max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 150px)!important;border-radius:10px;}
  .yrv-gallery-viewer-nav{
    position:fixed;
    top:50%;
    z-index:2;
    width:42px;
    height:52px;
    transform:translateY(-50%);
    background:rgba(9,11,17,.66);
  }
  .yrv-gallery-viewer-nav:active{transform:translateY(-50%) scale(.96);}
  .yrv-gallery-viewer-nav.is-prev{left:8px;}
  .yrv-gallery-viewer-nav.is-next{right:8px;}
  .yrv-gallery-viewer-caption{padding:0 12px;}
  .yrv-gallery-viewer-caption span{font-size:.8rem;}
  .yrv-gallery-viewer-counter{font-size:.7rem;}
}

@media(prefers-reduced-motion:reduce){
  .yrv-gallery-viewer,.yrv-gallery-viewer-image,.gallery-image-caption{transition:none;}
}

/* ===== Gallery editorial refinement: centered copy + original photo edges ===== */
.gallery-divider{
  display:block;
  width:min(980px,calc(100% - clamp(36px,8vw,120px)));
  margin:0 auto clamp(22px,3vw,38px);
  padding:clamp(24px,3.4vw,46px) 0 clamp(18px,2.4vw,30px);
}
.gallery-divider::before{
  left:0;
  width:clamp(48px,6vw,78px);
}
.gallery-divider h2{
  max-width:860px;
  margin:0;
  font-size:clamp(2.15rem,4.4vw,4.65rem);
  line-height:.96;
  text-wrap:balance;
}
.gallery-divider p{
  max-width:720px;
  margin:clamp(14px,1.8vw,22px) 0 0;
  padding:0;
  justify-self:auto;
  font-size:clamp(.96rem,1.15vw,1.08rem);
  line-height:1.68;
  text-wrap:pretty;
}

/* Photos keep their original straight edges instead of a forced card radius. */
.gallery-card:not(.is-video-card) .gallery-media-frame,
.gallery-card:not(.is-video-card) .gallery-image-link,
.gallery-card:not(.is-video-card) .gallery-media-frame img{
  border-radius:0!important;
}
.gallery-card:not(.is-video-card) .gallery-media-frame{
  overflow:hidden;
}
.gallery-card:not(.is-video-card) .gallery-media-frame::before,
.gallery-card:not(.is-video-card) .gallery-media-frame::after{
  border-radius:0!important;
}
.yrv-gallery-viewer-image{
  border-radius:0!important;
}

@media(max-width:680px){
  .gallery-divider{
    width:calc(100% - 24px);
    margin:0 auto 18px;
    padding:24px 0 18px;
  }
  .gallery-divider h2{
    font-size:clamp(1.9rem,8.8vw,3.15rem);
  }
  .gallery-divider p{
    max-width:34rem;
    margin-top:12px;
    font-size:.9rem;
    line-height:1.58;
  }
}

/* ===== Gallery polish: square hero, soft edge fade, tighter rhythm, light reveals ===== */
.gallery-main{
  padding-bottom:clamp(40px,6vw,82px);
}
.gallery-hero{
  margin:clamp(8px,1.5vw,18px) auto clamp(34px,5vw,68px);
  border-radius:0!important;
  box-shadow:none;
  background:var(--bg,#08070d);
}
.gallery-hero-cover,
.gallery-hero-video{
  border-radius:0!important;
  /* Keep the original rectangular media while gently dissolving all four edges. */
  -webkit-mask-image:
    linear-gradient(90deg,transparent 0%,#000 2.6%,#000 97.4%,transparent 100%),
    linear-gradient(180deg,transparent 0%,#000 3.4%,#000 96.6%,transparent 100%);
  -webkit-mask-composite:source-in;
  mask-image:
    linear-gradient(90deg,transparent 0%,#000 2.6%,#000 97.4%,transparent 100%),
    linear-gradient(180deg,transparent 0%,#000 3.4%,#000 96.6%,transparent 100%);
  mask-composite:intersect;
}
/* Visual fallback for browsers with partial mask support. */
.gallery-hero::after{
  background:
    linear-gradient(90deg,var(--bg,#08070d) 0,transparent 5%,transparent 95%,var(--bg,#08070d) 100%),
    linear-gradient(180deg,var(--bg,#08070d) 0,transparent 6%,transparent 88%,rgba(2,3,8,.82) 100%);
}

.gallery-section{
  margin-bottom:clamp(34px,5.5vw,72px);
}
.gallery-divider{
  margin-bottom:clamp(16px,2.2vw,28px);
  padding-top:clamp(18px,2.5vw,34px);
  padding-bottom:clamp(14px,1.9vw,22px);
}
.gallery-card.is-video-card{
  margin-bottom:clamp(20px,3vw,38px);
}

/* Professional diagonal reveals: pieces briefly travel rightward into their final slot. */
.gallery-card[data-gallery-reveal]{
  opacity:0;
  transition:opacity .52s ease,transform .72s cubic-bezier(.22,.72,.22,1);
  will-change:opacity,transform;
  transform-origin:50% 55%;
}
.gallery-masonry .gallery-card:nth-child(4n+1)[data-gallery-reveal]{transform:translate3d(-22px,18px,0) scale(.994);}
.gallery-masonry .gallery-card:nth-child(4n+2)[data-gallery-reveal]{transform:translate3d(-15px,11px,0) scale(.996);}
.gallery-masonry .gallery-card:nth-child(4n+3)[data-gallery-reveal]{transform:translate3d(-26px,9px,0) scale(.993);}
.gallery-masonry .gallery-card:nth-child(4n)[data-gallery-reveal]{transform:translate3d(-17px,21px,0) scale(.995);}
.gallery-card[data-gallery-reveal].is-visible{
  opacity:1;
  transform:translate3d(0,0,0) scale(1)!important;
  will-change:auto;
}
.gallery-divider[data-gallery-reveal]{
  opacity:0;
  transform:translate3d(-18px,0,0);
  transition:opacity .5s ease,transform .7s cubic-bezier(.22,.72,.22,1);
}
.gallery-divider[data-gallery-reveal].is-visible{opacity:1;transform:none;}

@media(max-width:680px){
  .gallery-main{padding-bottom:34px;}
  .gallery-hero{
    margin-top:6px;
    margin-bottom:28px;
    border-radius:0!important;
  }
  .gallery-hero-cover,
  .gallery-hero-video{
    -webkit-mask-image:
      linear-gradient(90deg,transparent 0%,#000 3.5%,#000 96.5%,transparent 100%),
      linear-gradient(180deg,transparent 0%,#000 3%,#000 97%,transparent 100%);
    mask-image:
      linear-gradient(90deg,transparent 0%,#000 3.5%,#000 96.5%,transparent 100%),
      linear-gradient(180deg,transparent 0%,#000 3%,#000 97%,transparent 100%);
  }
  .gallery-section{margin-bottom:34px;}
  .gallery-divider{
    margin-bottom:12px;
    padding-top:18px;
    padding-bottom:13px;
  }
  .gallery-card.is-video-card{margin-bottom:16px;}
  /* Short diagonal travel on touch screens so it never fights vertical scrolling. */
  .gallery-masonry .gallery-card:nth-child(4n+1)[data-gallery-reveal]{transform:translate3d(-10px,8px,0) scale(.997);}
  .gallery-masonry .gallery-card:nth-child(4n+2)[data-gallery-reveal]{transform:translate3d(-7px,6px,0) scale(.998);}
  .gallery-masonry .gallery-card:nth-child(4n+3)[data-gallery-reveal]{transform:translate3d(-11px,4px,0) scale(.997);}
  .gallery-masonry .gallery-card:nth-child(4n)[data-gallery-reveal]{transform:translate3d(-8px,9px,0) scale(.998);}
}

@media(prefers-reduced-motion:reduce){
  .gallery-card[data-gallery-reveal],
  .gallery-divider[data-gallery-reveal]{
    opacity:1!important;
    transform:none!important;
    transition:none!important;
  }
}

/* ===== Hero media integration: transparent video first, cover only after it ends ===== */
.gallery-hero{
  background:#00000d!important;
}
.gallery-hero-cover,
.gallery-hero-video{
  filter:none!important;
  -webkit-filter:none!important;
  mix-blend-mode:normal!important;
}
/* Cover is normal when there is no intro video. */
.gallery-hero-cover{
  opacity:.91!important;
  visibility:visible;
  transition:opacity .62s cubic-bezier(.22,.72,.22,1),visibility 0s linear 0s;
}
/* When an intro exists, never let the transparent video reveal the cover underneath. */
.gallery-hero:has(.gallery-hero-video):not(.is-finished) .gallery-hero-cover{
  opacity:0!important;
  visibility:hidden;
  transition:opacity .28s ease,visibility 0s linear .28s;
}
.gallery-hero:has(.gallery-hero-video).is-finished .gallery-hero-cover{
  opacity:.91!important;
  visibility:visible;
  transition:opacity .68s cubic-bezier(.22,.72,.22,1),visibility 0s linear 0s;
}
/* About 10% transparency lets #00000d integrate with the intro without washing it out. */
.gallery-hero-video{
  opacity:.90!important;
  transition:opacity .62s cubic-bezier(.22,.72,.22,1)!important;
}
.gallery-hero.is-finished .gallery-hero-video{
  opacity:0!important;
  pointer-events:none;
}
/* Only a soft edge integration layer: no brightness, contrast, glow or texture filters. */
.gallery-hero::after{
  background:
    linear-gradient(90deg,#00000d 0,rgba(0,0,13,.06) 5%,rgba(0,0,13,.06) 95%,#00000d 100%),
    linear-gradient(180deg,#00000d 0,rgba(0,0,13,.025) 6%,rgba(0,0,13,.025) 90%,rgba(0,0,13,.28) 100%)!important;
}

@media(max-width:680px){
  .gallery-hero:has(.gallery-hero-video).is-finished .gallery-hero-cover{opacity:.92!important;}
  .gallery-hero-video{opacity:.90!important;}
  .gallery-hero.is-finished .gallery-hero-video{opacity:0!important;}
}
