.gallery-main { background: var(--warm-ivory); overflow: hidden; }
.gallery-container { width: min(100%, var(--container-max)); margin-inline: auto; }
.gallery-eyebrow { display: inline-flex; color: var(--soft-gold); font-size: .72rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; margin-bottom: 20px; }
.gallery-hero { min-height: 100svh; position: relative; display: flex; align-items: center; padding: calc(92px + 52px) var(--gutter) 90px; isolation: isolate; background: var(--deep-forest); }
.gallery-hero__veil { position: absolute; inset: 0; z-index: -2; background: linear-gradient(90deg, rgba(30,39,25,.96) 8%, rgba(30,39,25,.78) 43%, rgba(30,39,25,.28) 100%), linear-gradient(0deg, rgba(30,39,25,.68), transparent 48%); }
.gallery-hero__content { width: min(100%, 850px); margin-inline: auto; }
.gallery-hero h1 { color: var(--warm-ivory); font-size: clamp(3rem, 8vw, 7.2rem); line-height: .98; max-width: 780px; }
.gallery-hero h1 em, .gallery-intro h2 em, .gallery-cta h2 em { color: var(--soft-gold); font-weight: 400; }
.gallery-hero p { color: rgba(244,232,220,.86); max-width: 510px; margin: 28px 0 34px; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.gallery-hero__scroll { position: absolute; bottom: 28px; left: var(--gutter); color: rgba(244,232,220,.7); font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; }
.gallery-hero__scroll span { color: var(--soft-gold); font-size: 1.1rem; margin-left: 8px; }
.gallery-floating { background: var(--deep-forest); padding: 0 var(--gutter) clamp(58px, 8vw, 100px); }
.gallery-marquee { display: flex; gap: 18px; width: max-content; animation: gallery-slide 56s linear infinite; }
.gallery-marquee--reverse { animation: gallery-slide-reverse 64s linear infinite; }
.gallery-marquee:hover { animation-play-state: paused; }
.gallery-marquee__item { width: clamp(170px, 23vw, 300px); aspect-ratio: 1.2; overflow: hidden; flex: none; border: 1px solid rgba(197,167,106,.34); }
.gallery-marquee__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gallery-marquee__item:hover img { transform: scale(1.08); }
.gallery-intro { padding: var(--section-pad) var(--gutter) 58px; }
.gallery-intro h2, .gallery-cta h2 { font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: 1.04; }
.gallery-intro p { max-width: 430px; color: var(--muted-grey); margin: 22px 0 38px; }
.gallery-filters { display: flex; flex-wrap: wrap; gap: 10px; }
.gallery-filter { color: var(--deep-forest); border: 1px solid rgba(30,39,25,.22); border-radius: 999px; padding: 10px 18px; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; transition: var(--transition-fast); }
.gallery-filter:hover, .gallery-filter.is-active { background: var(--deep-forest); color: var(--warm-ivory); border-color: var(--deep-forest); }
.gallery-collections { padding: 0 var(--gutter) var(--section-pad); }
.gallery-category { width: min(100%, var(--container-max)); margin: 0 auto 76px; }
.gallery-category[hidden] { display: none; }
.gallery-category__head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.gallery-category__head h3 { font-size: clamp(1.9rem, 4vw, 3rem); }
.gallery-category__head p { color: var(--muted-grey); font-size: .9rem; max-width: 350px; }
.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: 85px; gap: 14px; }
.gallery-card { position: relative; grid-column: span 3; grid-row: span 4; overflow: hidden; background: var(--sand); cursor: zoom-in; }
.gallery-card:nth-child(3n+1) { grid-column: span 5; grid-row: span 6; }
.gallery-card:nth-child(5n) { grid-column: span 4; grid-row: span 5; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1), filter .5s ease; }
.gallery-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30,39,25,.75), transparent 55%); opacity: 0; transition: opacity .35s ease; }
.gallery-card__label { position: absolute; z-index: 1; left: 18px; bottom: 16px; color: var(--warm-ivory); opacity: 0; transform: translateY(8px); transition: .35s ease; font-family: var(--font-subheading); font-size: 1rem; }
.gallery-card:hover img { transform: scale(1.06); filter: saturate(.82); } .gallery-card:hover::after, .gallery-card:hover .gallery-card__label { opacity: 1; } .gallery-card:hover .gallery-card__label { transform: translateY(0); }
.gallery-cta { padding: var(--section-pad) var(--gutter); background: linear-gradient(135deg, var(--deep-forest), var(--dark-olive)); }
.gallery-cta h2 { color: var(--warm-ivory); margin-bottom: 32px; }
@keyframes gallery-slide { to { transform: translateX(-50%); } }
@keyframes gallery-slide-reverse { from { transform: translateX(-50%); } to { transform: translateX(0); } }
@media (max-width: 700px) { .gallery-hero { min-height: 90svh; } .gallery-grid { grid-auto-rows: 75px; gap: 9px; } .gallery-card, .gallery-card:nth-child(3n+1), .gallery-card:nth-child(5n) { grid-column: span 6; grid-row: span 4; } .gallery-card:nth-child(4n+1) { grid-row: span 5; } .gallery-category__head { display: block; } .gallery-category__head p { margin-top: 8px; } }

/* Gallery sections are deliberately viewport-led, matching the project's editorial page rhythm. */
.gallery-hero, .gallery-floating, .gallery-intro, .gallery-category, .gallery-cta { min-height: 100svh; height: 100svh; overflow: hidden; }
.gallery-floating { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: clamp(18px, 3vw, 34px); }
.gallery-intro { display: flex; align-items: center; }
.gallery-category { padding-block: clamp(4px, 4vw, 2px); }
.gallery-category__head { flex: none; }
.gallery-grid { grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(6, minmax(0, 1fr)); grid-auto-rows: auto; height: calc(100% - 104px); }
.gallery-card, .gallery-card:nth-child(3n+1), .gallery-card:nth-child(5n) { grid-column: auto; grid-row: auto; }
.gallery-card:nth-child(1) { grid-column: 1 / 6; grid-row: 1 / 7; }
.gallery-card:nth-child(2) { grid-column: 6 / 10; grid-row: 1 / 4; }
.gallery-card:nth-child(3) { grid-column: 10 / 13; grid-row: 1 / 4; }
.gallery-card:nth-child(4) { grid-column: 6 / 9; grid-row: 4 / 7; }
.gallery-card:nth-child(5) { grid-column: 9 / 13; grid-row: 4 / 7; }
.gallery-cta { display: flex; align-items: center; }
@media (max-width: 700px) { .gallery-hero, .gallery-floating, .gallery-intro, .gallery-category, .gallery-cta { min-height: 100svh; height: 100svh; } .gallery-category { padding-block: 0px; } .gallery-grid { height: calc(100% - 145px); grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(4, minmax(0, 1fr)); } .gallery-card:nth-child(1) { grid-column: 1 / 3; grid-row: 1 / 3; } .gallery-card:nth-child(2) { grid-column: 1 / 2; grid-row: 3 / 4; } .gallery-card:nth-child(3) { grid-column: 2 / 3; grid-row: 3 / 4; } .gallery-card:nth-child(4) { grid-column: 1 / 2; grid-row: 4 / 5; } .gallery-card:nth-child(5) { grid-column: 2 / 3; grid-row: 4 / 5; } }

/* Empty image hooks: replace each url("") independently when the final backgrounds are ready. */
.gallery-hero { --gallery-bg-desktop: url("./images/gallery-forest-background.png"); --gallery-bg-mobile: url("./images/gallery-forest-background.png"); background-image: linear-gradient(90deg, rgba(30,39,25,.96), rgba(30,39,25,.36)), var(--gallery-bg-desktop); background-size: cover; background-position: center; }
.gallery-floating { --gallery-bg-desktop: url(""); --gallery-bg-mobile: url(""); background-image: linear-gradient(rgba(30,39,25,.9), rgba(30,39,25,.9)), var(--gallery-bg-desktop); background-size: cover; background-position: center; }
.gallery-category { --gallery-bg-desktop: url(""); --gallery-bg-mobile: url(""); background-image: linear-gradient(rgba(244,232,220,.9), rgba(244,232,220,.9)), var(--gallery-bg-desktop); background-size: cover; background-position: center; }
.gallery-cta { --gallery-bg-desktop: url("./images/gallery-forest-background.png"); --gallery-bg-mobile: url("./images/gallery-forest-background.png"); background-image: linear-gradient(135deg, rgba(30,39,25,.96), rgba(47,70,55,.82)), var(--gallery-bg-desktop); background-size: cover; background-position: center; }
.gallery-hero__content { text-align: center; display: flex; flex-direction: column; align-items: center; }
.gallery-hero h1 { max-width: 680px; font-size: clamp(2.4rem, 6vw, 5.4rem); }
.gallery-hero p { margin-inline: auto; }
.gallery-category { margin-bottom: clamp(20px, 3vw, 36px); }
@media (max-width: 700px) { .gallery-hero, .gallery-floating, .gallery-category, .gallery-cta { background-image: linear-gradient(rgba(30,39,25,.9), rgba(30,39,25,.9)), var(--gallery-bg-mobile); } .gallery-category { background-image: linear-gradient(rgba(244,232,220,.9), rgba(244,232,220,.9)), var(--gallery-bg-mobile); } .gallery-hero h1 { font-size: clamp(2.2rem, 10vw, 3.6rem); } }

@media (max-width: 700px) {
  .gallery-floating {
    min-height: auto;
    height: auto;
    padding-block: 34px 42px;
    gap: 12px;
  }

  .gallery-marquee {
    gap: 10px;
  }

  .gallery-marquee__item {
    width: clamp(125px, 35vw, 180px);
  }

  .gallery-cta {
    text-align: center;
  }

  .gallery-cta .gallery-container {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}
