/* Gallery page */
.gallery-page{
  --font-display:"Playfair Display", Georgia, serif;
  --font-body:"DM Sans", system-ui, -apple-system, sans-serif;
}
.gallery-page .brand,
.gallery-page .site-footer .brand{
  font-family:var(--font-display);
}

.gallery-hero{
  position:relative;
  overflow:hidden;
  min-height:calc(100vh - 90px);
  padding:120px 6vw 100px;
  background:
    radial-gradient(circle at top left,rgba(168,192,160,.42),rgba(168,192,160,0) 36%),
    linear-gradient(135deg,rgba(255,250,243,.94),rgba(220,229,212,.82));
}
.gallery-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(0deg,rgba(245,240,232,.88),rgba(245,240,232,0)),
    url("assets/hero-canopy.webp") center/cover;
  opacity:.12;
  transform:scale(1.04);
}
.gallery-hero::after{
  content:"";
  position:absolute;
  right:-8rem;
  bottom:-10rem;
  width:24rem;
  height:24rem;
  border-radius:50%;
  background:radial-gradient(circle,rgba(61,90,54,.18),rgba(61,90,54,0) 72%);
  filter:blur(12px);
}
.gallery-hero .container{
  position:relative;
  z-index:1;
  max-width:none;
  padding:0;
}
.gallery-hero__grid{
  display:grid;
  grid-template-columns:.9fr 1.1fr;
  gap:72px;
  align-items:center;
}
.gallery-hero__content{
  max-width:620px;
  position:relative;
  z-index:2;
}
.gallery-hero__content h1{
  font-size:clamp(64px,7vw,120px);
  line-height:.92;
  letter-spacing:-.055em;
  margin:0 0 28px;
  max-width:12ch;
}
.gallery-hero__content .lead{
  max-width:620px;
  line-height:1.8;
  font-size:18px;
  margin:0;
}
.gallery-hero__media{
  position:relative;
  height:620px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.gallery-hero__stack{
  position:relative;
  width:100%;
  height:100%;
}
.gallery-hero__frame{
  margin:0;
  overflow:hidden;
  border-radius:1.75rem;
  border:1px solid rgba(255,255,255,.55);
  background:rgba(255,255,255,.38);
  box-shadow:0 28px 60px rgba(31,42,28,.12);
}
.gallery-hero__frame img{
  width:100%;
  height:100%;
  object-fit:cover;
}
.gallery-hero__frame--main{
  width:82%;
  height:560px;
  margin-left:auto;
  border-radius:34px;
  box-shadow:0 30px 90px rgba(0,0,0,.16);
}
.gallery-hero__frame--accent{
  position:absolute;
  left:0;
  bottom:40px;
  width:260px;
  height:190px;
  border-radius:28px;
  border:6px solid #f5efe5;
  box-shadow:0 24px 70px rgba(0,0,0,.18);
}
@media (max-width:900px){
  .gallery-hero{
    min-height:auto;
    padding:90px 24px 70px;
  }
  .gallery-hero .container{
    padding:0;
  }
  .gallery-hero__grid{
    grid-template-columns:1fr;
    gap:48px;
  }
  .gallery-hero__content h1{
    font-size:clamp(48px,15vw,72px);
  }
  .gallery-hero__media{
    height:auto;
  }
  .gallery-hero__stack{
    min-height:auto;
    padding-bottom:2rem;
  }
  .gallery-hero__frame--main{
    width:100%;
    height:420px;
    max-width:none;
  }
  .gallery-hero__frame--accent{
    width:180px;
    height:135px;
    left:20px;
    bottom:-25px;
  }
}
@media (max-width:520px){
  .gallery-hero__frame--main{
    height:320px;
  }
  .gallery-hero__frame--accent{
    display:none;
  }
}

.gallery-section{
  padding-top:2rem;
}
.gallery-section__intro{
  display:grid;
  gap:1rem;
  margin-bottom:2.5rem;
}
.gallery-section__intro h2{
  font-size:clamp(48px,5vw,82px);
  line-height:.95;
  letter-spacing:-.045em;
  max-width:10ch;
}
.project-media-section{
  padding:120px 6vw 90px;
}
.project-media-header{
  width:100%;
  max-width:980px;
  margin:0 auto 70px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
}
.project-media-header .section-label{
  font-size:12px;
  letter-spacing:.32em;
  text-transform:uppercase;
  color:#8ea184;
  font-weight:500;
  margin-bottom:22px;
}
.project-media-header h2{
  font-size:clamp(48px,6vw,92px);
  line-height:.95;
  letter-spacing:-.04em;
  color:#1f2d1f;
  margin:0;
  max-width:900px;
  font-family:"Playfair Display", Georgia, serif;
  font-weight:400;
}
.project-media-header p{
  margin-top:28px;
  max-width:720px;
  font-size:18px;
  line-height:1.7;
  color:#53624f;
}
@media (max-width:768px){
  .project-media-header h2{
    font-size:52px;
  }
  .project-media-header p{
    font-size:16px;
  }
}

.gallery-filters{
  display:flex;
  flex-wrap:wrap;
  gap:.85rem;
}
.filter-btn{
  appearance:none;
  border:1px solid rgba(61,90,54,.14);
  background:rgba(255,255,255,.58);
  color:var(--foreground);
  border-radius:999px;
  padding:.8rem 1.15rem;
  font-size:.88rem;
  letter-spacing:.06em;
  text-transform:uppercase;
  cursor:pointer;
  transition:transform .25s ease,background .25s ease,border-color .25s ease,color .25s ease,box-shadow .25s ease;
  box-shadow:0 10px 30px rgba(31,42,28,.04);
}
.filter-btn:hover,
.filter-btn:focus-visible{
  transform:translateY(-2px);
  border-color:rgba(61,90,54,.35);
  outline:none;
}
.filter-btn.active{
  background:var(--primary);
  color:var(--cream);
  border-color:var(--primary);
  box-shadow:0 16px 34px rgba(61,90,54,.22);
}

.gallery-grid{
  column-count:1;
  column-gap:24px;
  max-width:1440px;
  margin:0 auto;
}
@media (min-width:641px){
  .gallery-grid{
    column-count:2;
  }
}
@media (min-width:1025px){
  .gallery-grid{
    column-count:3;
  }
}

.gallery-card{
  position:relative;
  break-inside:avoid;
  page-break-inside:avoid;
  display:inline-block;
  width:100%;
  margin:0 0 24px;
  overflow:hidden;
  border-radius:1.7rem;
  background:var(--card);
  border:1px solid rgba(61,90,54,.08);
  box-shadow:0 18px 46px rgba(31,42,28,.08);
  transition:transform .4s ease,box-shadow .4s ease,border-color .3s ease;
}
.gallery-card:hover{
  transform:translateY(-6px);
  box-shadow:0 26px 56px rgba(31,42,28,.14);
  border-color:rgba(61,90,54,.2);
}
.gallery-card__trigger{
  display:block;
  width:100%;
  height:100%;
  padding:0;
  border:0;
  background:none;
  color:inherit;
  cursor:pointer;
}
.gallery-card img{
  width:100%;
  height:auto;
  display:block;
  object-fit:cover;
  transition:transform 1.1s ease,filter .7s ease;
}
.gallery-card:hover img,
.gallery-card:focus-within img{
  transform:scale(1.08);
  filter:saturate(1.08);
}
.gallery-overlay{
  position:absolute;
  inset:auto 0 0 0;
  padding:1.4rem;
  display:flex;
  flex-direction:column;
  gap:.35rem;
  color:var(--cream);
  background:linear-gradient(to top,rgba(11,15,10,.82),rgba(11,15,10,.12));
}
.gallery-overlay__eyebrow{
  font-size:.72rem;
  letter-spacing:.24em;
  text-transform:uppercase;
  color:rgba(220,229,212,.9);
}
.gallery-overlay__title{
  font-family:var(--font-display);
  font-size:clamp(28px,2.5vw,42px);
  line-height:1.1;
  letter-spacing:-.035em;
  max-width:12ch;
}

.video-gallery-section{
  padding:90px 6vw;
  background:#f7f1e8;
}
.video-gallery-header{
  max-width:900px;
  margin:0 auto 56px;
  text-align:center;
}
.video-gallery-header h2{
  font-size:clamp(48px,5vw,82px);
  line-height:.95;
  letter-spacing:-.045em;
  max-width:850px;
  margin:18px auto 20px;
}
.video-gallery-header p{
  max-width:680px;
  margin:0 auto;
  font-size:18px;
  line-height:1.7;
  color:#5f6b5c;
}
.video-gallery-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:28px;
  max-width:1440px;
  margin:0 auto;
}
.video-card{
  position:relative;
  display:flex;
  flex-direction:column;
  gap:0;
  height:100%;
  padding:18px;
  border-radius:28px;
  border:1px solid rgba(45,70,45,.14);
  background:#fffaf2;
  box-shadow:0 24px 70px rgba(0,0,0,.08);
  transition:transform .35s ease,box-shadow .35s ease,border-color .35s ease;
}
.video-card:hover{
  transform:translateY(-5px);
  box-shadow:0 28px 78px rgba(0,0,0,.1);
  border-color:rgba(45,70,45,.2);
}
.video-card__tag{
  align-self:flex-start;
  padding:.45rem .7rem;
  border-radius:999px;
  background:rgba(168,192,160,.18);
  color:var(--sage-deep);
  font-size:.73rem;
  letter-spacing:.18em;
  text-transform:uppercase;
}
.video-card__media{
  position:relative;
  overflow:hidden;
  border-radius:20px;
}
.video-card video{
  width:100%;
  aspect-ratio:16 / 9;
  height:auto;
  object-fit:cover;
  border-radius:20px;
  display:block;
  background:#0e140d;
}
.video-card__overlay{
  position:absolute;
  inset:auto 0 0 0;
  display:flex;
  flex-direction:column;
  gap:.45rem;
  padding:1rem;
  color:var(--cream);
  background:linear-gradient(to top,rgba(6,10,6,.86),rgba(6,10,6,.08));
  pointer-events:none;
}
.video-card__overlay h3{
  font-family:var(--font-display);
  font-size:clamp(28px,2.5vw,42px);
  line-height:1.1;
  letter-spacing:-.035em;
}
.video-card__body{
  padding:18px 6px 4px;
}
.video-card__body p{
  margin:0;
  color:rgba(31,42,28,.72);
  font-size:.96rem;
  line-height:1.7;
}
@media (max-width:1024px){
  .video-gallery-grid{
    grid-template-columns:repeat(2,1fr);
  }
}
@media (max-width:640px){
  .video-gallery-grid{
    grid-template-columns:1fr;
  }
  .video-gallery-section{
    padding:70px 24px;
  }
}

.gallery-media-item.is-hidden{
  display:none;
}

.lightbox{
  position:fixed;
  inset:0;
  z-index:120;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:2rem 1rem;
  background:rgba(7,11,7,.92);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .25s ease,visibility .25s ease;
}
.lightbox.active{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
.lightbox-figure{
  margin:0;
  max-width:min(92vw,78rem);
  max-height:88vh;
  display:grid;
  gap:1rem;
  justify-items:center;
}
.lightbox-image{
  max-width:100%;
  max-height:78vh;
  border-radius:1.5rem;
  box-shadow:0 26px 70px rgba(0,0,0,.45);
}
.lightbox-caption{
  color:rgba(245,240,232,.9);
  font-family:var(--font-display);
  font-size:1.1rem;
  text-align:center;
}
.lightbox-close,
.lightbox-nav{
  position:absolute;
  border:0;
  cursor:pointer;
  color:var(--cream);
  background:rgba(255,255,255,.08);
  backdrop-filter:blur(8px);
  transition:background .2s ease,transform .2s ease;
}
.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible{
  background:rgba(255,255,255,.16);
  transform:translateY(-1px);
  outline:none;
}
.lightbox-close{
  top:1.25rem;
  right:1.25rem;
  width:3rem;
  height:3rem;
  border-radius:999px;
  font-size:2rem;
  line-height:1;
}
.lightbox-nav{
  top:50%;
  transform:translateY(-50%);
  width:3.25rem;
  height:3.25rem;
  border-radius:999px;
  font-size:1.5rem;
}

/* Gallery wide-screen composition */
@media (min-width:1500px){
  .gallery-hero{
    padding:clamp(140px,8vw,220px) clamp(5rem,5vw,9rem) clamp(110px,6vw,180px);
  }

  .gallery-hero__grid{
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
    gap:clamp(80px,5vw,140px);
  }

  .gallery-hero__content,
  .gallery-hero__content .lead,
  .project-media-header,
  .project-media-header h2,
  .project-media-header p,
  .video-gallery-header,
  .video-gallery-header h2,
  .video-gallery-header p{
    max-width:100% !important;
  }

  .gallery-hero__content h1{
    max-width:16ch !important;
    font-size:clamp(96px,5.5vw,144px) !important;
  }

  .gallery-hero__content .lead,
  .project-media-header p,
  .video-gallery-header p{
    max-width:1100px !important;
    font-size:clamp(18px,1.1vw,24px) !important;
    line-height:1.65 !important;
  }

  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2{
    max-width:18ch !important;
    font-size:clamp(72px,5vw,112px) !important;
  }

  .gallery-grid,
  .video-gallery-grid{
    width:100%;
    max-width:none !important;
  }

  .gallery-grid{
    column-count:4;
    column-gap:32px;
  }

  .video-gallery-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:36px;
  }
}

@media (min-width:2200px){
  .gallery-hero__content h1{
    max-width:18ch !important;
    font-size:clamp(118px,4.6vw,168px) !important;
  }

  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2{
    max-width:22ch !important;
    font-size:clamp(96px,4.2vw,148px) !important;
  }

  .gallery-hero__content .lead,
  .project-media-header p,
  .video-gallery-header p{
    max-width:1280px !important;
    font-size:24px !important;
  }

  .gallery-grid{
    column-count:5;
  }
}
.lightbox-prev{left:1.25rem}
.lightbox-next{right:1.25rem}

@media (max-width:1024px){
  .gallery-grid{
    column-count:2;
  }
}
@media (max-width:640px){
  .gallery-grid{
    column-count:1;
    column-gap:20px;
  }
  .gallery-card{
    margin-bottom:20px;
  }
}
@media (max-width:760px){
  .gallery-overlay__title{
    font-size:1.2rem;
  }
  .lightbox-nav{
    display:none;
  }
}

/* Gallery client-ready polish */
.gallery-hero,
.project-media-section,
.video-gallery-section{
  background:#f6f1e9 !important;
}

.gallery-hero{
  min-height:auto !important;
  padding:clamp(120px,10vw,190px) var(--container-pad, clamp(20px,4.5vw,88px)) clamp(72px,7vw,120px) !important;
}

.gallery-hero .container{
  width:min(100%,var(--container-max,1680px));
  max-width:var(--container-max,1680px);
  margin:0 auto;
  padding:0;
}

.gallery-hero__grid{
  gap:clamp(36px,5vw,84px) !important;
  align-items:center;
}

.gallery-hero__content{
  max-width:760px !important;
}

.gallery-hero__content h1,
.project-media-header h2,
.video-gallery-header h2,
.gallery-section__intro h2{
  font-family:var(--font-display) !important;
  font-weight:400 !important;
  letter-spacing:-.045em !important;
  text-wrap:balance;
  color:#172516;
}

.gallery-hero__content h1{
  max-width:12ch !important;
  font-size:clamp(50px,6vw,92px) !important;
  line-height:.92 !important;
}

.gallery-hero__content .lead,
.project-media-header p,
.video-gallery-header p{
  max-width:760px !important;
  font-size:clamp(17px,1.25vw,21px) !important;
  line-height:1.75 !important;
  color:#526150 !important;
}

.project-media-header,
.video-gallery-header,
.gallery-section__intro{
  width:min(100%,980px) !important;
  max-width:980px !important;
  margin-left:auto !important;
  margin-right:auto !important;
  text-align:center !important;
}

.project-media-header h2,
.video-gallery-header h2,
.gallery-section__intro h2{
  max-width:12.5ch !important;
  margin-left:auto !important;
  margin-right:auto !important;
  font-size:clamp(46px,5.8vw,92px) !important;
  line-height:.94 !important;
}

.gallery-hero__media{
  height:clamp(420px,42vw,680px) !important;
}

.gallery-hero__frame,
.gallery-card,
.video-card{
  border-radius:24px !important;
  border:1px solid rgba(61,90,54,.14) !important;
  box-shadow:0 18px 48px rgba(31,42,28,.07) !important;
}

.gallery-hero__frame--main{
  height:100% !important;
}

.gallery-grid,
.video-gallery-grid{
  width:min(100%,var(--container-max,1680px)) !important;
  max-width:var(--container-max,1680px) !important;
}

.gallery-grid{
  column-gap:clamp(18px,2vw,32px) !important;
}

.gallery-card{
  margin-bottom:clamp(18px,2vw,32px) !important;
}

.video-gallery-grid{
  gap:clamp(18px,2vw,32px) !important;
}

@media (min-width:1500px){
  .gallery-hero__content h1{
    font-size:clamp(76px,4.6vw,112px) !important;
  }

  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2{
    font-size:clamp(70px,4.2vw,108px) !important;
  }

  .gallery-grid{
    column-count:4;
  }
}

@media (min-width:2200px){
  .gallery-grid{
    column-count:4;
  }
}

@media (max-width:1024px){
  .gallery-hero__grid,
  .video-gallery-grid{
    grid-template-columns:1fr !important;
  }

  .gallery-hero__content,
  .gallery-hero__content h1,
  .gallery-hero__content .lead{
    margin-left:auto;
    margin-right:auto;
    text-align:center;
  }
}

@media (max-width:720px){
  .gallery-hero{
    padding:96px 20px 64px !important;
  }

  .gallery-hero__content h1,
  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2{
    max-width:100% !important;
    font-size:clamp(38px,11vw,56px) !important;
    line-height:.98 !important;
  }

  .gallery-hero__media{
    height:auto !important;
  }
}

/* Gallery production refinement */
.gallery-hero,
.project-media-section,
.video-gallery-section{
  background:#f5f1ea !important;
}

.gallery-hero{
  padding:clamp(104px,9vw,156px) var(--pw-pad, clamp(20px,4vw,64px)) clamp(64px,6vw,96px) !important;
}

.gallery-hero .container,
.gallery-grid,
.video-gallery-grid{
  width:min(100%,var(--pw-container,1440px)) !important;
  max-width:var(--pw-container,1440px) !important;
}

.gallery-hero__grid{
  gap:clamp(32px,4vw,64px) !important;
}

.gallery-hero__content{
  max-width:720px !important;
}

.gallery-hero__content h1{
  max-width:12ch !important;
  font-size:clamp(42px,5.2vw,76px) !important;
  line-height:.98 !important;
  color:#142414 !important;
}

.project-media-header h2,
.video-gallery-header h2,
.gallery-section__intro h2{
  max-width:13ch !important;
  font-size:clamp(38px,4.4vw,64px) !important;
  line-height:1 !important;
  color:#142414 !important;
}

.gallery-hero__content .lead,
.project-media-header p,
.video-gallery-header p{
  max-width:720px !important;
  font-size:clamp(16px,1.15vw,19px) !important;
  line-height:1.65 !important;
  color:#4f604e !important;
}

.gallery-hero__media{
  height:auto !important;
}

.gallery-hero__stack{
  min-height:clamp(360px,36vw,560px) !important;
}

.gallery-hero__frame--main{
  height:100% !important;
  min-height:clamp(340px,34vw,540px) !important;
}

.gallery-hero__frame,
.gallery-card,
.video-card{
  border-radius:22px !important;
  border:1px solid rgba(52,86,48,.16) !important;
  box-shadow:0 12px 34px rgba(31,42,28,.055) !important;
}

.gallery-grid{
  column-gap:clamp(18px,2vw,28px) !important;
}

.gallery-card{
  margin-bottom:clamp(18px,2vw,28px) !important;
}

.video-gallery-grid{
  gap:clamp(18px,2vw,28px) !important;
}

.video-card__media,
.video-card video{
  aspect-ratio:16 / 9 !important;
}

.video-card__overlay h3,
.gallery-overlay__title{
  font-size:clamp(24px,2.1vw,38px) !important;
  line-height:1.08 !important;
}

@media (min-width:1500px){
  .gallery-hero__content h1{
    font-size:76px !important;
  }

  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2{
    font-size:64px !important;
  }

  .gallery-grid{
    column-count:4 !important;
  }
}

@media (max-width:1024px){
  .gallery-hero__grid,
  .video-gallery-grid{
    grid-template-columns:1fr !important;
  }

  .gallery-hero__content,
  .gallery-hero__content h1,
  .gallery-hero__content .lead{
    text-align:center !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }
}

@media (max-width:720px){
  .gallery-hero{
    padding:88px 20px 52px !important;
  }

  .gallery-hero__content h1,
  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2{
    max-width:100% !important;
    font-size:clamp(34px,10vw,48px) !important;
    line-height:1.02 !important;
  }

  .gallery-grid{
    column-count:1 !important;
  }
}

/* Gallery media card correction */
.video-card{
  display:flex !important;
  flex-direction:column !important;
  padding:14px !important;
}

.video-card__media{
  border-radius:16px !important;
  overflow:hidden !important;
}

.video-card video{
  width:100% !important;
  height:auto !important;
  aspect-ratio:16 / 9 !important;
  object-fit:cover !important;
  border-radius:16px !important;
}

.video-card__overlay{
  display:flex !important;
  padding:16px !important;
  background:linear-gradient(to top,rgba(8,14,8,.82),rgba(8,14,8,.08)) !important;
}

.video-card__body{
  padding:20px 12px 8px !important;
}

.video-card__tag{
  display:inline-flex !important;
  width:max-content !important;
  max-width:100% !important;
  margin-bottom:14px !important;
  padding:.46rem .72rem !important;
  border-radius:999px !important;
  background:rgba(120,144,111,.13) !important;
  color:#78906f !important;
  font-size:11px !important;
  letter-spacing:.24em !important;
  line-height:1.2 !important;
  white-space:nowrap;
}

.video-card__body p{
  max-width:58ch !important;
  font-size:16px !important;
  line-height:1.65 !important;
  color:#4f604e !important;
}

.video-card__overlay h3{
  max-width:100% !important;
  font-size:clamp(22px,1.6vw,30px) !important;
  line-height:1.12 !important;
  letter-spacing:-.025em !important;
}

.gallery-overlay__title{
  max-width:100% !important;
  font-size:clamp(22px,1.6vw,30px) !important;
  line-height:1.12 !important;
  letter-spacing:-.025em !important;
}

@media (min-width:1025px){
  .video-gallery-grid{
    align-items:stretch !important;
  }

  .video-gallery-grid .video-card{
    min-height:430px !important;
  }
}

/* Stable responsive gallery grid */
.gallery-grid{
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  grid-auto-flow:dense !important;
  gap:clamp(18px,2vw,32px) !important;
  align-items:stretch !important;
  width:min(100%,var(--pw-container,1440px)) !important;
  max-width:var(--pw-container,1440px) !important;
  margin:0 auto !important;
  column-count:initial !important;
  column-gap:normal !important;
}

.gallery-card{
  position:relative !important;
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-height:260px !important;
  margin:0 !important;
  overflow:hidden !important;
  border-radius:28px !important;
  aspect-ratio:4 / 3 !important;
  break-inside:auto !important;
  page-break-inside:auto !important;
}

.gallery-card--tall{
  grid-row:span 2 !important;
  aspect-ratio:3 / 5 !important;
}

.gallery-card--wide,
.gallery-card--xl{
  grid-column:span 2 !important;
  aspect-ratio:16 / 7 !important;
}

.gallery-card--xl{
  grid-row:span 2 !important;
  aspect-ratio:16 / 12 !important;
}

.gallery-card__trigger{
  display:block !important;
  width:100% !important;
  height:100% !important;
}

.gallery-card img{
  width:100% !important;
  height:100% !important;
  object-fit:cover !important;
  display:block !important;
}

.gallery-overlay{
  max-width:100% !important;
  padding:clamp(16px,2vw,24px) !important;
  overflow:hidden !important;
}

.gallery-overlay__eyebrow,
.gallery-overlay__title{
  min-width:0 !important;
  max-width:100% !important;
}

.gallery-overlay__title{
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:unset !important;
  font-size:clamp(1.4rem,2.4vw,2.6rem) !important;
  line-height:1.05 !important;
}

.gallery-media-item.is-hidden{
  display:none !important;
}

@media (max-width:1024px){
  .gallery-grid{
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  }

  .gallery-card,
  .gallery-card--tall,
  .gallery-card--wide,
  .gallery-card--xl{
    grid-column:span 1 !important;
    grid-row:span 1 !important;
    aspect-ratio:4 / 3 !important;
  }
}

@media (max-width:640px){
  .gallery-grid{
    grid-template-columns:1fr !important;
  }

  .gallery-card,
  .gallery-card--tall,
  .gallery-card--wide,
  .gallery-card--xl{
    min-height:230px !important;
  }

  .gallery-overlay__title{
    font-size:clamp(1.25rem,7vw,1.65rem) !important;
  }
}

/* Single-line gallery heading refinement */
.gallery-hero__content,
.project-media-header,
.video-gallery-header,
.gallery-section__intro,
.gallery-card,
.video-card,
.video-card__body,
.video-card__overlay{
  min-width:0 !important;
}

:is(
  .gallery-hero__content h1,
  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2
){
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:unset !important;
  line-height:.98 !important;
  letter-spacing:-.032em !important;
  margin-bottom:clamp(16px,2vw,24px) !important;
}

.gallery-hero__content h1{
  font-size:clamp(1.8rem,4.8vw,4.75rem) !important;
}

:is(.project-media-header h2,.video-gallery-header h2,.gallery-section__intro h2){
  font-size:clamp(1.65rem,4.2vw,4rem) !important;
}

:is(.video-card__overlay h3,.gallery-overlay__title){
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:unset !important;
  font-size:clamp(1.25rem,2.35vw,2rem) !important;
  line-height:1.05 !important;
  letter-spacing:-.024em !important;
}

.video-gallery-grid{
  align-items:stretch !important;
}

.video-card{
  height:100% !important;
}

.video-card__body{
  display:flex !important;
  flex-direction:column !important;
}

.video-card__body p{
  flex:1 1 auto;
}

@media (max-width:720px){
  :is(
    .gallery-hero__content h1,
    .project-media-header h2,
    .video-gallery-header h2,
    .gallery-section__intro h2
  ){
    font-size:clamp(1.35rem,8vw,2.25rem) !important;
    letter-spacing:-.018em !important;
  }

  :is(.video-card__overlay h3,.gallery-overlay__title){
    font-size:clamp(1.15rem,6vw,1.55rem) !important;
    letter-spacing:-.018em !important;
  }
}

/* No gallery text cutoff safeguard */
:is(
  .gallery-hero__content h1,
  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2,
  .video-card__overlay h3,
  .gallery-overlay__title
){
  white-space:normal !important;
  overflow:visible !important;
  text-overflow:unset !important;
  max-width:100% !important;
  width:auto !important;
  display:block !important;
}

.gallery-hero__content h1{
  font-size:clamp(2rem,5vw,4.75rem) !important;
  line-height:1.02 !important;
}

:is(.project-media-header h2,.video-gallery-header h2,.gallery-section__intro h2){
  font-size:clamp(2rem,4.6vw,4rem) !important;
  line-height:1.04 !important;
}

:is(.video-card__overlay h3,.gallery-overlay__title){
  font-size:clamp(1.35rem,2.2vw,2rem) !important;
  line-height:1.12 !important;
}

.gallery-overlay{
  overflow:visible !important;
}

@media (max-width:768px){
  .gallery-hero__content h1,
  .project-media-header h2,
  .video-gallery-header h2,
  .gallery-section__intro h2{
    font-size:clamp(2.1rem,10vw,4rem) !important;
    line-height:1.06 !important;
  }
}

/* Gallery image loading polish */
.gallery-card,
.gallery-hero__frame{
  background:
    linear-gradient(135deg,rgba(222,229,216,.95),rgba(247,242,234,.95)),
    #e8eadf !important;
}

.gallery-card img,
.gallery-hero__frame img{
  min-width:100% !important;
  min-height:100% !important;
  color:transparent !important;
  font-size:0 !important;
  object-fit:cover !important;
  object-position:center !important;
}

.gallery-card__trigger{
  background:inherit !important;
}

/* Gallery section alignment pass */
.gallery-filters{
  width:min(100%,var(--pw-container,1440px)) !important;
  max-width:var(--pw-container,1440px) !important;
  margin:0 auto !important;
  align-items:center;
}

.project-media-section{
  padding:clamp(24px,3vw,44px) var(--pw-pad, clamp(20px,4vw,64px)) clamp(84px,7vw,120px) !important;
}

.project-media-section .container{
  width:min(100%,var(--pw-container,1440px)) !important;
  max-width:var(--pw-container,1440px) !important;
  display:grid;
  gap:clamp(28px,3.5vw,48px);
}

.project-media-header{
  width:min(100%,860px) !important;
  max-width:860px !important;
  margin:0 auto !important;
  text-align:center !important;
}

.project-media-header .eyebrow{
  margin-bottom:18px !important;
}

.project-media-header h2{
  max-width:11.5ch !important;
  margin:0 auto !important;
  font-size:clamp(40px,4.8vw,64px) !important;
  line-height:1.02 !important;
  color:#142414 !important;
}

.project-media-header p{
  max-width:680px !important;
  margin:18px auto 0 !important;
}

@media (max-width:720px){
  .project-media-section{
    padding:32px 20px 72px !important;
  }

  .project-media-header h2{
    max-width:100% !important;
  }
}
