/* Galería index — formato grand cinematográfico */
.home-gallery--grand{
  padding:clamp(72px, 10vw, 128px) 0 clamp(88px, 12vw, 140px);
  overflow:clip;
}
.home-gallery__stage{
  position:relative;
  z-index:2;
  width:min(100%, 1520px);
  margin:0 auto;
  padding:0 clamp(14px, 3vw, 40px);
}
.home-gallery__head{
  max-width:760px;
  margin:0 0 clamp(20px, 3vw, 32px);
  text-align:left;
}
.home-gallery__ambient{
  position:absolute;
  inset:0;
  pointer-events:none;
  overflow:hidden;
}
.home-gallery__orb{
  position:absolute;
  border-radius:50%;
  filter:blur(80px);
  opacity:.6;
  animation:home-gallery-orb 16s ease-in-out infinite;
}
.home-gallery__orb--orange{
  width:min(55vw, 560px);
  height:min(55vw, 560px);
  top:4%;
  left:-12%;
  background:radial-gradient(circle, rgba(255,162,0,.5) 0%, transparent 68%);
}
.home-gallery__orb--cyan{
  width:min(48vw, 480px);
  height:min(48vw, 480px);
  right:-10%;
  top:28%;
  background:radial-gradient(circle, rgba(34,211,238,.32) 0%, transparent 70%);
  animation-delay:-5s;
}
.home-gallery__orb--violet{
  width:min(40vw, 400px);
  height:min(40vw, 400px);
  left:38%;
  bottom:-8%;
  background:radial-gradient(circle, rgba(168,85,247,.22) 0%, transparent 72%);
  animation-delay:-9s;
}
.home-gallery__grid-lines{
  position:absolute;
  inset:0;
  opacity:.28;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size:64px 64px;
  mask-image:radial-gradient(ellipse 90% 75% at 50% 35%, #000 15%, transparent 80%);
}
.home-gallery__kicker{
  display:inline-block;
  margin-bottom:10px;
  font-family:'Bebas Neue',sans-serif;
  font-size:clamp(1.35rem, 3vw, 1.85rem);
  font-weight:400;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--orange);
}
.home-gallery__title{
  margin:0;
  font-family:'Bebas Neue',sans-serif;
  font-size:clamp(2.4rem, 6.5vw, 4.8rem);
  line-height:.95;
  letter-spacing:.02em;
  color:#fff;
}
.home-gallery__lead{
  margin:18px 0 0;
  max-width:52ch;
  font-family:'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  font-size:clamp(1rem, 2vw, 1.2rem);
  line-height:1.55;
  color:rgba(255,255,255,.64);
}

.home-gallery__grid{
  display:grid;
  gap:clamp(14px, 2vw, 22px);
  margin-top:0;
  grid-auto-rows:minmax(220px, auto);
  perspective:1400px;
}
.home-gallery__item{
  margin:0;
  min-height:0;
  height:100%;
  opacity:0;
  transform:translateY(36px) scale(.96);
  transition:
    opacity .7s cubic-bezier(.22,1,.36,1),
    transform .7s cubic-bezier(.22,1,.36,1);
  transition-delay:calc(var(--gallery-i, 0) * 80ms);
}
.home-gallery.is-revealed .home-gallery__item{
  opacity:1;
  transform:translateY(0) scale(1);
}
.home-gallery__frame{
  position:relative;
  height:100%;
  min-height:220px;
  border-radius:clamp(18px, 2vw, 28px);
  overflow:hidden;
  background:#0e0e13;
  transform-style:preserve-3d;
  will-change:transform;
  box-shadow:
    0 24px 56px rgba(0,0,0,.48),
    0 0 0 1px rgba(255,255,255,.07);
  transition:
    transform .5s cubic-bezier(.22,1,.36,1),
    box-shadow .5s ease;
}
.home-gallery__frame::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  padding:2px;
  background:linear-gradient(135deg, rgba(255,162,0,.65), rgba(34,211,238,.4), rgba(168,85,247,.25));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  opacity:0;
  transition:opacity .45s ease;
  pointer-events:none;
  z-index:3;
}
.home-gallery__media{
  position:relative;
  width:100%;
  height:100%;
  min-height:inherit;
  overflow:hidden;
}
.home-gallery__media img{
  display:block;
  width:100%;
  height:100%;
  min-height:220px;
  object-fit:cover;
  aspect-ratio:4/3;
  transform:scale(1.04);
  transition:transform .8s cubic-bezier(.22,1,.36,1), filter .55s ease;
}
.home-gallery__item.is-hero .home-gallery__media img{
  aspect-ratio:16/9;
  min-height:min(56vh, 680px);
}
.home-gallery__item.is-tall .home-gallery__media img{
  aspect-ratio:3/4;
  min-height:320px;
}
.home-gallery__item.is-wide .home-gallery__media img{
  aspect-ratio:16/10;
  min-height:260px;
}
.home-gallery__shine,
.home-gallery__glare{
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:2;
}
.home-gallery__shine{
  background:linear-gradient(115deg, transparent 36%, rgba(255,255,255,.24) 50%, transparent 64%);
  transform:translateX(-140%) skewX(-14deg);
  transition:transform .9s cubic-bezier(.22,1,.36,1);
}
.home-gallery__glare{
  background:radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.22), transparent 44%);
  opacity:0;
  transition:opacity .35s ease;
}

.home-gallery__item.is-hero .home-gallery__frame{
  min-height:min(56vh, 680px);
  box-shadow:
    0 32px 72px rgba(0,0,0,.55),
    0 0 0 1px rgba(255,162,0,.22),
    0 0 64px rgba(255,162,0,.14);
}
.home-gallery__item:hover .home-gallery__frame,
.home-gallery__item:focus-within .home-gallery__frame,
.home-gallery__item.is-tilted .home-gallery__frame{
  box-shadow:
    0 36px 80px rgba(0,0,0,.58),
    0 0 0 1px rgba(255,162,0,.4),
    0 0 52px rgba(255,162,0,.24);
}
.home-gallery__item:hover .home-gallery__frame::before,
.home-gallery__item:focus-within .home-gallery__frame::before,
.home-gallery__item.is-tilted .home-gallery__frame::before{opacity:1;}
.home-gallery__item:hover .home-gallery__media img,
.home-gallery__item:focus-within .home-gallery__media img,
.home-gallery__item.is-tilted .home-gallery__media img{
  transform:scale(1.12);
  filter:saturate(1.1) contrast(1.05);
}
.home-gallery__item:hover .home-gallery__shine,
.home-gallery__item:focus-within .home-gallery__shine,
.home-gallery__item.is-tilted .home-gallery__shine{transform:translateX(140%) skewX(-14deg);}
.home-gallery__item:hover .home-gallery__glare,
.home-gallery__item:focus-within .home-gallery__glare,
.home-gallery__item.is-tilted .home-gallery__glare{opacity:1;}

@keyframes home-gallery-orb{
  0%,100%{transform:translate(0, 0) scale(1);}
  50%{transform:translate(24px, -16px) scale(1.08);}
}

/* Bento grand por cantidad de fotos */
.home-gallery__grid--n5{
  grid-template-columns:repeat(12, 1fr);
  grid-auto-rows:minmax(200px, auto);
}
.home-gallery__grid--n5 .home-gallery__item.is-hero{grid-column:1/span 8;grid-row:1/span 3;min-height:min(58vh, 700px);}
.home-gallery__grid--n5 .home-gallery__item:nth-child(2){grid-column:9/span 4;grid-row:1/span 2;}
.home-gallery__grid--n5 .home-gallery__item:nth-child(3){grid-column:9/span 4;}
.home-gallery__grid--n5 .home-gallery__item:nth-child(4){grid-column:1/span 6;}
.home-gallery__grid--n5 .home-gallery__item:nth-child(5){grid-column:7/span 6;}

.home-gallery__grid--n6{
  grid-template-columns:repeat(12, 1fr);
}
.home-gallery__grid--n6 .home-gallery__item.is-hero{grid-column:1/span 7;grid-row:1/span 2;min-height:min(52vh, 620px);}
.home-gallery__grid--n6 .home-gallery__item:nth-child(2){grid-column:8/span 5;}
.home-gallery__grid--n6 .home-gallery__item:nth-child(3){grid-column:8/span 5;}
.home-gallery__grid--n6 .home-gallery__item:nth-child(4){grid-column:1/span 4;}
.home-gallery__grid--n6 .home-gallery__item:nth-child(5){grid-column:5/span 4;}
.home-gallery__grid--n6 .home-gallery__item:nth-child(6){grid-column:9/span 4;}

.home-gallery__grid--n7{
  grid-template-columns:repeat(12, 1fr);
}
.home-gallery__grid--n7 .home-gallery__item.is-hero{grid-column:1/span 8;grid-row:1/span 3;min-height:min(58vh, 700px);}
.home-gallery__grid--n7 .home-gallery__item:nth-child(2){grid-column:9/span 4;grid-row:1/span 2;}
.home-gallery__grid--n7 .home-gallery__item:nth-child(3){grid-column:9/span 4;}
.home-gallery__grid--n7 .home-gallery__item:nth-child(4){grid-column:1/span 4;}
.home-gallery__grid--n7 .home-gallery__item:nth-child(5){grid-column:5/span 4;}
.home-gallery__grid--n7 .home-gallery__item:nth-child(6){grid-column:9/span 4;}
.home-gallery__grid--n7 .home-gallery__item:nth-child(7){grid-column:1/span 12;}

.home-gallery__grid--n8{
  grid-template-columns:repeat(12, 1fr);
}
.home-gallery__grid--n8 .home-gallery__item.is-hero{grid-column:1/span 8;grid-row:1/span 2;min-height:min(50vh, 580px);}
.home-gallery__grid--n8 .home-gallery__item:nth-child(2){grid-column:9/span 4;grid-row:1/span 2;}
.home-gallery__grid--n8 .home-gallery__item:nth-child(3){grid-column:1/span 4;}
.home-gallery__grid--n8 .home-gallery__item:nth-child(4){grid-column:5/span 4;}
.home-gallery__grid--n8 .home-gallery__item:nth-child(5){grid-column:9/span 4;}
.home-gallery__grid--n8 .home-gallery__item:nth-child(6){grid-column:1/span 3;}
.home-gallery__grid--n8 .home-gallery__item:nth-child(7){grid-column:4/span 3;}
.home-gallery__grid--n8 .home-gallery__item:nth-child(8){grid-column:7/span 6;}

.home-gallery__grid--n9{
  grid-template-columns:repeat(12, 1fr);
}
.home-gallery__grid--n9 .home-gallery__item.is-hero{grid-column:1/span 12;min-height:min(54vh, 640px);}
.home-gallery__grid--n9 .home-gallery__item:nth-child(2){grid-column:1/span 4;}
.home-gallery__grid--n9 .home-gallery__item:nth-child(3){grid-column:5/span 4;}
.home-gallery__grid--n9 .home-gallery__item:nth-child(4){grid-column:9/span 4;}
.home-gallery__grid--n9 .home-gallery__item:nth-child(5){grid-column:1/span 6;}
.home-gallery__grid--n9 .home-gallery__item:nth-child(6){grid-column:7/span 6;}
.home-gallery__grid--n9 .home-gallery__item:nth-child(7){grid-column:1/span 4;}
.home-gallery__grid--n9 .home-gallery__item:nth-child(8){grid-column:5/span 4;}
.home-gallery__grid--n9 .home-gallery__item:nth-child(9){grid-column:9/span 4;}

.home-gallery__grid--n10{
  grid-template-columns:repeat(12, 1fr);
}
.home-gallery__grid--n10 .home-gallery__item.is-hero{grid-column:1/span 7;grid-row:1/span 2;min-height:min(52vh, 600px);}
.home-gallery__grid--n10 .home-gallery__item:nth-child(2){grid-column:8/span 5;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(3){grid-column:8/span 5;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(4){grid-column:1/span 3;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(5){grid-column:4/span 3;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(6){grid-column:7/span 3;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(7){grid-column:10/span 3;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(8){grid-column:1/span 4;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(9){grid-column:5/span 4;}
.home-gallery__grid--n10 .home-gallery__item:nth-child(10){grid-column:9/span 4;}

@media (max-width:1024px){
  .home-gallery__grid--n5,
  .home-gallery__grid--n6,
  .home-gallery__grid--n7,
  .home-gallery__grid--n8,
  .home-gallery__grid--n9,
  .home-gallery__grid--n10{
    grid-template-columns:repeat(2, 1fr);
    grid-auto-rows:minmax(200px, auto);
  }
  .home-gallery__grid--n5 .home-gallery__item,
  .home-gallery__grid--n6 .home-gallery__item,
  .home-gallery__grid--n7 .home-gallery__item,
  .home-gallery__grid--n8 .home-gallery__item,
  .home-gallery__grid--n9 .home-gallery__item,
  .home-gallery__grid--n10 .home-gallery__item{
    grid-column:auto !important;
    grid-row:auto !important;
    min-height:0 !important;
  }
  .home-gallery__item.is-hero .home-gallery__frame,
  .home-gallery__item.is-hero .home-gallery__media img{
    min-height:min(44vh, 480px);
  }
}
@media (max-width:640px){
  .home-gallery--grand{padding:56px 0 72px;}
  .home-gallery__grid{
    grid-template-columns:1fr !important;
    gap:14px;
  }
  .home-gallery__grid--n5 .home-gallery__item,
  .home-gallery__grid--n6 .home-gallery__item,
  .home-gallery__grid--n7 .home-gallery__item,
  .home-gallery__grid--n8 .home-gallery__item,
  .home-gallery__grid--n9 .home-gallery__item,
  .home-gallery__grid--n10 .home-gallery__item{
    grid-column:1 / -1 !important;
  }
  .home-gallery__item.is-hero .home-gallery__frame,
  .home-gallery__item.is-hero .home-gallery__media img{
    min-height:min(38vh, 360px);
  }
  .home-gallery__item.is-tall .home-gallery__media img,
  .home-gallery__item.is-wide .home-gallery__media img{
    min-height:240px;
    aspect-ratio:4/3;
  }
}
@media (prefers-reduced-motion:reduce){
  .home-gallery__orb{animation:none;}
  .home-gallery__item{opacity:1;transform:none;transition:none;}
  .home-gallery__frame,
  .home-gallery__media img,
  .home-gallery__shine,
  .home-gallery__glare{transition:none;}
}
