/* Gallery — reference: 09 - Gallery.png (805px mockup ≈ 1440px desktop, ×1.79) */

/* ---------- Hero: headline left, park photo top-right, scrapbook prints along the bottom ---------- */
.gal-hero { --media-w: 58%; --fade: 30%; }
.gal-hero__media { bottom: auto; height: 68%; }
.gal-hero__media img {
  object-position: 60% 60%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade)), linear-gradient(180deg, #000 72%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 0, #000 var(--fade)), linear-gradient(180deg, #000 72%, transparent 100%);
  mask-composite: intersect;
}
.gal-hero__inner { min-height: clamp(360px, 31vw, 470px); align-content: start; padding-block: clamp(1.6rem, 3.4vw, 3.4rem) 0; }
.gal-hero .hero__copy { max-width: 50%; }
.gal-hero .display { font-size: clamp(2.8rem, 1rem + 5.5vw, 6.1rem); line-height: .9; }
.gal-hero .hero__lede { font-size: clamp(1.15rem, .8rem + 1.2vw, 2.1rem); line-height: 1.18; max-width: none; }
.gal-hero__note { --tilt: -12deg; right: 2.6%; top: clamp(.6rem, 1.6vw, 1.6rem); font-size: clamp(1.3rem, .7rem + 1.5vw, 2.4rem); }

/* Collage strip (coordinates from the mockup: x / 805, y / 215 within the strip) */
.gal-collage { position: relative; z-index: 5; aspect-ratio: 805 / 215; margin-top: -7.6vw; }
.gal-collage > * { position: absolute; margin: 0; }
.gal-collage .print { padding: clamp(3px, .45vw, 7px); }
.gal-collage__castle { left: 0; top: 36%; width: 16.4%; height: 52%; z-index: 1; }
.gal-collage__castle img {
  width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 80%, transparent 100%), linear-gradient(90deg, transparent, #000 10%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 0, #000 30%, #000 80%, transparent 100%), linear-gradient(90deg, transparent, #000 10%);
  mask-composite: intersect;
}
.gal-collage__bw { left: 17.6%; top: 37%; width: 14.6%; height: 52%; z-index: 4; }
.gal-collage__cathedral { left: 29.4%; top: 3%; width: 26.6%; height: 90%; z-index: 3; }
.gal-collage__drummer { left: 56.6%; top: 33%; width: 11.6%; height: 64%; z-index: 4; }
.gal-collage__poppies { left: 67.6%; top: 58%; width: 14.6%; height: 28%; z-index: 2; }
.gal-collage__note {
  right: .6%; top: 42%; width: 17.6%; height: 60%; z-index: 4; transform: rotate(-7deg);
  background: var(--paper-tex) 0 0 / 300px, #fbfaf6; box-shadow: var(--shadow-print); padding: 6% 6% 0;
}
.gal-collage__thistle { position: absolute; right: -6%; bottom: 0; width: 46%; opacity: .55; }
.gal-collage__note .script { --tilt: -10deg; position: relative; font-size: clamp(.9rem, .3rem + 1.25vw, 1.9rem); line-height: .98; margin-top: 2%; }
.gal-hero__wave { z-index: 3 !important; }

/* ---------- Filter bar ---------- */
.gal-filter {
  position: relative; z-index: 6; margin-top: calc(var(--wave-h) * -.35);
  display: flex; align-items: center; gap: clamp(.8rem, 2vw, 2.2rem); flex-wrap: wrap;
  background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: clamp(.8rem, 1.4vw, 1.3rem) clamp(1rem, 3vw, 3rem);
  border: 1px solid rgb(0 42 102 / .06);
}
.gal-filter__title { margin: 0; color: var(--navy-700); }
.gal-filter__chips { display: flex; flex-wrap: wrap; gap: clamp(.4rem, 1vw, .9rem); }
.chip {
  min-height: 44px; padding: .45rem clamp(1rem, 1.6vw, 1.6rem); border-radius: 999px; border: 1.5px solid #a9c8e8; background: #fff;
  font-family: var(--font-ui); font-weight: 700; font-size: clamp(.86rem, .8rem + .2vw, 1rem); color: var(--navy-800);
  transition: background-color .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--navy-600); background: var(--sky-100); }
.chip[aria-pressed="true"] { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.gal-filter { padding-right: clamp(1rem, 17vw, 260px); }
.gal-filter__deco { position: absolute; right: clamp(.6rem, 1.4vw, 1.4rem); top: 0; bottom: 0; width: clamp(150px, 15vw, 230px); pointer-events: none; }
.gal-filter__plane { position: absolute; left: 0; bottom: -18%; width: 62%; opacity: .55; transform: rotate(-24deg); }
.gal-filter__note { --tilt: -12deg; position: absolute; right: 0; top: 4%; font-size: clamp(.9rem, .6rem + .6vw, 1.3rem); white-space: nowrap; }

/* ---------- Album grid ---------- */
.gal-albums { padding-block: clamp(1.2rem, 2vw, 2rem) clamp(1.4rem, 2.4vw, 2.4rem); }
.gal-albums__count { font-family: var(--font-ui); font-size: .85rem; font-weight: 700; color: var(--slate); text-align: right; margin-bottom: .6rem; }
.gal-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(.7rem, 1.1vw, 1.1rem); }
.gal-album { grid-column: span 4; background: var(--paper-tex) 0 0 / 400px, #fff; }
.gal-album--sm { grid-column: span 3; }
.gal-album .card__media { --ratio: 1.85 / 1; margin: 3px 3px 0; border-radius: 8px 8px 2px 2px; }
.gal-album--sm .card__media { --ratio: 1.5 / 1; }
.gal-album .card__body { gap: .35rem; padding: clamp(.7rem, 1vw, 1rem) clamp(.9rem, 1.3vw, 1.3rem) clamp(.9rem, 1.2vw, 1.2rem); }
.gal-album .h-card { font-size: clamp(1.08rem, .8rem + .75vw, 1.6rem); }
.gal-album__open { text-decoration: none; background: none; border: 0; border-bottom: 1.5px solid #8fb5dd; padding: .25em 0 .3em; margin-top: auto; align-self: flex-start; font-size: .74rem; position: static !important; }
.gal-album__open::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.gal-album:focus-within { outline: 3px solid #2f7de1; outline-offset: 3px; }
.gal-album__open:focus-visible { outline: none; }
.gal-grid.is-filtered .gal-album { grid-column: span 4; }
.gal-grid.is-filtered .gal-album .card__media { --ratio: 1.7 / 1; }
.gal-albums__empty { font-family: var(--font-ui); text-align: center; padding: 2rem 0; }
.gal-albums__reset { background: none; border: 0; padding: 0; text-decoration: underline; font-weight: 700; color: var(--navy-700); }

/* Lightbox */
.gal-dialog .dialog__body { padding-right: 4rem; }
.gal-dialog .h-card { font-size: clamp(1.3rem, 1rem + 1vw, 1.9rem); }
.gal-dialog__text { color: var(--text-soft); max-width: 46em; }
.gal-dialog .eyebrow { margin-bottom: 0; }

/* ---------- Share the memory ---------- */
.gal-share {
  overflow: hidden;
  padding-block: clamp(2rem, 4vw, 3.6rem) clamp(5rem, 9vw, 8.5rem);
  background:
    radial-gradient(ellipse 50% 40% at 30% 15%, rgb(255 255 255 / .7), transparent 70%),
    linear-gradient(180deg, #b9ddf6 0%, #d9eefc 52%, #e9eedd 78%, #dfe3c4 100%);
}
.gal-share__land { left: 0; right: 0; bottom: 0; opacity: .5; }
.gal-share__land img { width: 100%; height: clamp(70px, 10vw, 150px); object-fit: cover; object-position: 50% 100%; }
.gal-share__plane { right: 6%; top: 4%; width: clamp(140px, 17vw, 260px); opacity: .7; transform: scaleX(-1) rotate(-6deg); }
.gal-share__thistle-l { top: 10%; }
.gal-share__thistle-r { top: 10%; }
.gal-share__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) auto; gap: 2rem; align-items: end; padding-inline: clamp(0rem, 4vw, 4rem); }
.gal-share__title { font-size: clamp(1.8rem, 1rem + 3.4vw, 4.2rem); }
.gal-share__text { font-size: clamp(1.05rem, .9rem + .55vw, 1.55rem); line-height: 1.3; color: var(--navy-800); margin-top: .5rem; }
.gal-share .socials { margin-bottom: .4rem; }

/* ---------- Dual CTA card ---------- */
.gal-cta {
  position: relative; z-index: 3; margin-top: clamp(-5.5rem, -6vw, -3rem); margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
  display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  padding-block: clamp(1.4rem, 2.4vw, 2.4rem);
}
.gal-cta__item { display: grid; grid-template-columns: auto 1fr; gap: clamp(1rem, 2vw, 2rem); padding-inline: clamp(1.2rem, 3.4vw, 3.4rem); align-items: start; }
.gal-cta__item + .gal-cta__item { border-left: 2px solid var(--line); }
.gal-cta__icon { width: clamp(48px, 2.6rem + 1.6vw, 76px); height: clamp(48px, 2.6rem + 1.6vw, 76px); color: var(--navy-800); }
.gal-cta .h-card { font-size: clamp(1.35rem, 1rem + 1.1vw, 2.05rem); margin-bottom: .35rem; }
.gal-cta p { color: var(--text-soft); font-size: clamp(.95rem, .9rem + .2vw, 1.12rem); line-height: 1.35; margin-bottom: 1.1rem; max-width: 34em; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .gal-filter__deco { display: none; }
  .gal-filter { padding-right: clamp(1rem, 3vw, 3rem); }
}
@media (max-width: 980px) {
  .gal-album, .gal-album--sm, .gal-grid.is-filtered .gal-album { grid-column: span 6; }
  .gal-album .card__media, .gal-album--sm .card__media { --ratio: 1.7 / 1; }
}
@media (max-width: 900px) {
  .gal-hero .hero__copy { max-width: none; }
  .gal-hero__inner { min-height: 0; padding-block: 2rem 1rem; }
  .gal-hero__media { height: clamp(220px, 50vw, 380px); }
  .gal-hero__media img { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 75%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 18%, #000 75%, transparent 100%); }
  .gal-collage { order: 3; margin-top: -12vw; }
  .gal-hero > .tartan-wave { order: 4; margin-top: calc(var(--wave-h) * -.6); }
  .gal-hero__note { display: none; }
  .gal-share__grid { grid-template-columns: 1fr; padding-inline: 0; }
}
@media (max-width: 760px) {
  .gal-collage { aspect-ratio: 805 / 330; margin-top: -16vw; }
  .gal-collage__castle, .gal-collage__poppies, .gal-collage__note { display: none; }
  .gal-collage__bw { left: 3%; top: 26%; width: 30%; height: 60%; }
  .gal-collage__cathedral { left: 30%; top: 6%; width: 44%; height: 82%; }
  .gal-collage__drummer { left: 73%; top: 22%; width: 24%; height: 68%; }
  .gal-filter { margin-top: .5rem; }
  .gal-cta { grid-template-columns: 1fr; margin-top: -3rem; }
  .gal-share__plane { top: auto; bottom: 18%; opacity: .35; }
  .gal-cta__item + .gal-cta__item { border-left: 0; border-top: 2px solid var(--line); padding-top: 1.4rem; margin-top: 1.4rem; }
}
@media (max-width: 560px) {
  .gal-album, .gal-album--sm, .gal-grid.is-filtered .gal-album { grid-column: 1 / -1; }
  .gal-filter__chips { gap: .45rem; }
  .chip { padding-inline: .9rem; }
  .gal-cta__item { grid-template-columns: 1fr; }
  .gal-cta .btn { white-space: normal; text-align: center; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .gal-hero .hero__copy { max-width: 64%; }
  .gal-hero .display { font-size: clamp(2.8rem, .6rem + 6vw, 5.6rem); }
  .gal-hero__inner { min-height: clamp(380px, 44vw, 470px); }
}
.gal-album[hidden] { display: none; }
.gal-dialog__media { background: #0b1a2e; min-height: 200px; }
.gal-dialog__media img:not([src]) { display: none; }
