.gallery-page { background: #f7fdff; }
.gallery-header { position: fixed; background: rgba(247,253,255,.78); border-bottom: 1px solid transparent; backdrop-filter: blur(16px); transition: background .3s, border-color .3s, box-shadow .3s; }
.gallery-header.is-scrolled { background: rgba(255,255,255,.94); border-color: var(--line); box-shadow: 0 8px 30px rgba(7,61,121,.08); }
.gallery-header .nav-gallery::after { content: "HERE"; }
.gallery-header .site-nav .is-current { color: var(--pink); }

.gallery-main { overflow: hidden; }
.gallery-hero { position: relative; min-height: 88svh; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(3rem, 8vw, 10rem); padding: 10rem var(--pad) 6rem; isolation: isolate; background: linear-gradient(145deg, #f2fcff 0%, #a8ebff 52%, #ffe2f3 100%); }
.gallery-hero::before { content: "GALLERY"; position: absolute; z-index: -2; left: -3vw; bottom: -3vw; color: rgba(255,255,255,.33); font-size: clamp(7rem, 22vw, 23rem); font-weight: 900; line-height: .78; letter-spacing: -.09em; }
.gallery-hero::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .16; background-image: radial-gradient(var(--navy) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 25%, black); }
.gallery-hero__copy { position: relative; z-index: 2; max-width: 920px; }
.gallery-hero__copy h1 { margin: 0 0 2rem; font-size: clamp(3.5rem, 7vw, 8.5rem); font-weight: 900; line-height: 1.07; letter-spacing: -.055em; }
.gallery-hero__copy h1 span { color: white; text-shadow: 4px 5px 0 var(--blue), 8px 9px 0 rgba(7,61,121,.12); }
.gallery-hero__copy > p:last-child { max-width: 620px; margin: 0; color: #225b86; font-size: clamp(.95rem, 1.25vw, 1.12rem); font-weight: 700; }
.gallery-hero__orb { position: absolute; z-index: -1; right: 8vw; top: 15vh; width: clamp(120px, 17vw, 260px); aspect-ratio: 1; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 24px rgba(255,255,255,.35), 0 25px 70px rgba(255,177,0,.24); }
.gallery-hero__keepsake { position: relative; z-index: 2; width: clamp(230px, 24vw, 350px); padding-top: 78px; transform: rotate(4deg); filter: drop-shadow(0 30px 30px rgba(7,61,121,.22)); animation: keepsake-float 5s ease-in-out infinite; }
.keepsake-ring { position: absolute; z-index: 3; left: 50%; top: 0; width: 88px; aspect-ratio: 1; border: 13px solid #ffc82f; border-radius: 50%; background: transparent; box-shadow: inset 3px 4px 4px rgba(112,63,0,.28), 2px 4px 0 #bd7d00, 0 0 0 4px rgba(255,255,255,.55); transform: translateX(-50%); }
.keepsake-ring::after { content: ""; position: absolute; right: -18px; bottom: 0; width: 34px; height: 19px; border: 4px solid rgba(238,250,255,.95); border-radius: 7px; background: rgba(199,238,249,.62); transform: rotate(42deg); }
.keepsake-link { position: absolute; z-index: 2; left: 50%; top: 66px; width: 52px; height: 46px; border: 7px solid rgba(235,249,255,.92); border-radius: 16px; background: rgba(184,232,246,.5); box-shadow: inset 0 0 12px white, 0 5px 12px rgba(7,61,121,.18); transform: translateX(-50%); }
.keepsake-acrylic { position: relative; padding: 19px 19px 24px; overflow: hidden; border: 3px solid rgba(255,255,255,.9); border-radius: 36px 36px 50px 50px; background: linear-gradient(145deg, rgba(255,255,255,.72), rgba(172,226,244,.3)); box-shadow: inset 0 0 0 5px rgba(192,235,247,.48), inset -12px -10px 24px rgba(29,123,172,.12), 0 0 0 2px rgba(7,61,121,.18); backdrop-filter: blur(5px); }
.keepsake-acrylic::before { content: ""; position: absolute; left: 50%; top: 10px; width: 24px; height: 14px; border: 2px solid rgba(7,61,121,.22); border-radius: 50%; background: rgba(245,253,255,.82); transform: translateX(-50%); }
.keepsake-acrylic__gloss { position: absolute; z-index: 3; inset: -30% 45% -20% -20%; background: linear-gradient(105deg, transparent 15%, rgba(255,255,255,.9) 42%, rgba(255,255,255,.18) 58%, transparent 74%); transform: translateX(-80%); animation: keepsake-shine 4.8s ease-in-out infinite; }
.keepsake-acrylic__photo { aspect-ratio: 4 / 5; margin-top: 14px; overflow: hidden; border: 3px solid rgba(255,255,255,.9); border-radius: 23px; background: var(--navy); box-shadow: 0 8px 22px rgba(7,61,121,.22); }
.keepsake-acrylic__photo img { width: 100%; height: 100%; object-fit: cover; }
.keepsake-acrylic__caption { display: flex; justify-content: space-between; align-items: end; gap: 1rem; padding: 16px 5px 0; color: var(--navy); }
.keepsake-acrylic__caption strong { font-size: .68rem; font-weight: 900; letter-spacing: .08em; }
.keepsake-acrylic__caption span { color: #4286aa; font-size: .42rem; font-weight: 900; letter-spacing: .08em; text-align: right; }
.keepsake-tag { position: absolute; right: -28px; bottom: 31px; z-index: 4; padding: .55rem .8rem; border: 2px solid var(--navy); border-radius: 99px; color: white; background: var(--pink); box-shadow: 4px 4px 0 var(--navy); font-size: .48rem; font-weight: 900; letter-spacing: .1em; transform: rotate(-7deg); }
@keyframes keepsake-float { 0%, 100% { transform: rotate(4deg) translateY(0); } 50% { transform: rotate(2deg) translateY(-12px); } }
@keyframes keepsake-shine { 0%, 55% { transform: translateX(-90%); } 82%, 100% { transform: translateX(250%); } }
.gallery-hero__scroll { position: absolute; left: var(--pad); bottom: 1.7rem; margin: 0; color: rgba(7,61,121,.65); font-size: .62rem; font-weight: 900; letter-spacing: .14em; }
.gallery-hero__scroll span { display: inline-block; margin-left: .65rem; color: var(--pink); animation: gallery-bounce 1.3s ease-in-out infinite; }
@keyframes gallery-bounce { 50% { transform: translateY(6px); } }

.gallery-archive { padding: 9rem var(--pad) 11rem; background: linear-gradient(180deg, #fff 0%, #eefbff 100%); }
.gallery-archive__header { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 3rem; margin-bottom: 4rem; }
.gallery-archive__header h2 { margin: 0; font-size: clamp(3rem, 6vw, 7rem); font-weight: 900; line-height: 1.1; letter-spacing: -.05em; }
.gallery-archive__header > p { margin: 0 0 .6rem; color: var(--blue); text-align: right; font-size: .7rem; font-weight: 900; line-height: 1.35; letter-spacing: .12em; }
.gallery-archive__header > p strong { display: block; color: var(--pink); font-size: 2.8rem; line-height: .95; letter-spacing: -.05em; }
.gallery-archive__header > p span { color: var(--muted); font-weight: 700; letter-spacing: .04em; }
.gallery-source { display: flex; align-items: center; gap: .6rem; margin: 0 0 2.5rem; padding-bottom: 1.25rem; border-bottom: 2px dashed var(--line); color: var(--muted); font-size: .57rem; font-weight: 900; letter-spacing: .12em; }
.gallery-source span { width: 8px; aspect-ratio: 1; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(86,207,70,.14); }
.gallery-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-flow: dense; align-items: start; gap: clamp(1.2rem, 2.2vw, 2.2rem); }
.gallery-card { --card-shadow: #8fe3f8; grid-column: span 4; position: relative; padding: 0 0 1.15rem; overflow: hidden; border: 2px solid rgba(7,61,121,.15); border-radius: 28px 28px 28px 10px; color: var(--navy); background: rgba(255,255,255,.95); box-shadow: 0 14px 35px rgba(7,61,121,.1), 7px 8px 0 var(--card-shadow); cursor: zoom-in; text-align: left; opacity: 0; transform: translateY(32px) scale(.98); transition: opacity .7s, transform .7s cubic-bezier(.16,1,.3,1), box-shadow .3s, border-color .3s; }
.gallery-card.is-visible { opacity: 1; transform: none; }
.gallery-card:hover { transform: translateY(-7px) rotate(-.35deg); border-color: rgba(7,61,121,.34); box-shadow: 0 24px 45px rgba(7,61,121,.14), 11px 13px 0 var(--card-shadow); }
.gallery-card:nth-child(3n+2) { --card-shadow: #ffd95c; }
.gallery-card:nth-child(3n) { --card-shadow: #ff9fd5; }
.gallery-card--hero { grid-column: span 8; }
.gallery-card--wide { grid-column: span 8; }
.gallery-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #dff7ff; }
.gallery-card--hero .gallery-card__media { aspect-ratio: 16 / 9; }
.gallery-card--wide .gallery-card__media { aspect-ratio: 16 / 8; }
.gallery-card--tall .gallery-card__media { aspect-ratio: 4 / 5; }
.gallery-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.24) 52%, transparent 64%); transform: translateX(-120%); transition: transform .8s ease; }
.gallery-card:hover .gallery-card__media::after { transform: translateX(120%); }
.gallery-card__media > img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s cubic-bezier(.16,1,.3,1), filter .5s; }
.gallery-card:hover .gallery-card__media > img { transform: scale(1.045); filter: saturate(1.08); }
.gallery-card__byline { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: .7rem; padding: 1rem 1.15rem .75rem; }
.gallery-card__avatar { width: 38px; aspect-ratio: 1; border: 2px solid #c7f1ff; border-radius: 50%; object-fit: cover; background: #eafaff; }
.gallery-card__author { min-width: 0; line-height: 1.25; }
.gallery-card__author strong, .gallery-card__author small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-card__author strong { font-size: .68rem; font-weight: 900; }
.gallery-card__author small { color: #56809c; font-size: .57rem; font-weight: 700; }
.gallery-card__byline time { color: #6d8ca1; font-size: .55rem; font-weight: 800; white-space: nowrap; }
.gallery-card__copy { display: block; padding: .1rem 1.15rem 0; }
.gallery-card__copy p { margin: 0; color: #355f7b; font-size: .72rem; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.gallery-status { margin: 2rem 0 0; color: var(--muted); text-align: center; font-size: .78rem; }
.gallery-status:empty { display: none; }

.gallery-future { position: relative; min-height: 78vh; display: grid; place-items: center; align-content: center; padding: 8rem var(--pad); overflow: hidden; color: white; background: linear-gradient(135deg, #7559f7, #168fd3 60%, #3bc8e9); text-align: center; }
.gallery-future::before { content: "✦"; position: absolute; left: 10%; top: 18%; color: var(--yellow); font-size: clamp(3rem, 7vw, 7rem); transform: rotate(-12deg); }
.gallery-future::after { content: "＋"; position: absolute; right: 9%; bottom: 17%; color: #ff91cf; font-size: clamp(4rem, 9vw, 9rem); font-weight: 900; transform: rotate(10deg); }
.gallery-future .eyebrow { color: #dff8ff; }
.gallery-future h2 { position: relative; z-index: 1; margin: 0 0 2rem; font-size: clamp(3rem, 6vw, 7rem); font-weight: 900; line-height: 1.25; text-shadow: 4px 5px 0 rgba(7,61,121,.28); }
.gallery-future > p:not(.eyebrow) { position: relative; z-index: 1; max-width: 650px; margin: 0 0 2.5rem; color: #edfbff; }
.gallery-future .primary-button { position: relative; z-index: 1; }

.gallery-lightbox { width: min(1100px, calc(100% - 2rem)); max-width: none; padding: 0; overflow: visible; border: 0; color: white; background: transparent; }
.gallery-lightbox::backdrop { background: rgba(3,24,54,.9); backdrop-filter: blur(10px); }
.gallery-lightbox figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; max-height: 90svh; margin: 0; overflow: hidden auto; border: 3px solid white; border-radius: 34px 34px 34px 10px; background: var(--navy); box-shadow: 14px 16px 0 var(--pink); }
.gallery-lightbox__stage { display: grid; place-items: center; min-height: 280px; height: min(68svh, 720px); overflow: hidden; background: #031d3e; }
.gallery-lightbox__stage > img { display: block; width: 100%; height: 100%; object-fit: contain; will-change: transform, opacity; }
.gallery-lightbox figcaption { display: grid; grid-template-columns: minmax(260px, .38fr) minmax(0, 1fr); align-items: center; gap: clamp(1.2rem, 3vw, 2.5rem); padding: clamp(1rem, 2vw, 1.6rem); background: linear-gradient(105deg, #0b4d8e, #073d79); }
.gallery-lightbox__byline { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: .8rem; min-width: 0; margin: 0; padding: 0; }
.gallery-lightbox__byline img { width: 46px; height: 46px; aspect-ratio: 1; flex: 0 0 46px; border: 2px solid white; border-radius: 50%; object-fit: cover; background: #dff8ff; }
.gallery-lightbox__byline p { min-width: 0; margin: 0; line-height: 1.25; }
.gallery-lightbox__byline strong, .gallery-lightbox__byline span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gallery-lightbox__byline strong { color: white; font-size: .7rem; }
.gallery-lightbox__byline span, .gallery-lightbox__byline time { color: #a8ebff; font-size: .58rem; font-weight: 700; }
.gallery-lightbox__byline time { white-space: nowrap; }
.gallery-lightbox figcaption > #lightbox-caption { min-width: 0; margin: 0; padding-left: clamp(1.2rem, 3vw, 2.5rem); border-left: 1px solid rgba(255,255,255,.2); color: #e1f8ff; font-size: .82rem; line-height: 1.75; overflow-wrap: anywhere; white-space: pre-wrap; }
.gallery-lightbox__close, .gallery-lightbox__nav { position: absolute; z-index: 2; display: grid; place-items: center; border: 2px solid white; border-radius: 50%; color: white; background: var(--navy); cursor: pointer; box-shadow: 4px 4px 0 var(--pink); }
.gallery-lightbox__close { right: -12px; top: -48px; width: 42px; height: 42px; font-size: 1.4rem; }
.gallery-lightbox__nav { top: min(34svh, 360px); width: 48px; height: 48px; font-size: 1.1rem; transform: translateY(-50%); }
.gallery-lightbox__nav--prev { left: -65px; }
.gallery-lightbox__nav--next { right: -65px; }

@media (max-width: 980px) {
  .gallery-hero { grid-template-columns: 1fr; }
  .gallery-hero__keepsake { position: absolute; right: 8vw; bottom: 4.5rem; width: 190px; opacity: .72; }
  .gallery-card, .gallery-card--tall { grid-column: span 6; }
  .gallery-card--hero, .gallery-card--wide { grid-column: span 12; }
  .gallery-lightbox__stage { height: min(60svh, 620px); }
  .gallery-lightbox figcaption { grid-template-columns: 1fr; gap: 1rem; }
  .gallery-lightbox figcaption > #lightbox-caption { padding: 1rem 0 0; border-top: 1px solid rgba(255,255,255,.2); border-left: 0; }
  .gallery-lightbox__nav--prev { left: .7rem; }
  .gallery-lightbox__nav--next { right: .7rem; }
}

@media (max-width: 680px) {
  .gallery-header { padding-top: .85rem; }
  .gallery-hero { min-height: 82svh; padding-top: 8rem; padding-bottom: 5rem; }
  .gallery-hero__copy h1 { font-size: clamp(3rem, 15vw, 5rem); line-height: 1.13; }
  .gallery-hero__copy > p:last-child br { display: none; }
  .gallery-hero__keepsake { right: -2.6rem; bottom: 2.4rem; width: 150px; padding-top: 50px; opacity: .34; }
  .keepsake-ring { width: 62px; border-width: 9px; }
  .keepsake-link { top: 43px; width: 40px; height: 35px; }
  .gallery-archive { padding-top: 6.5rem; padding-bottom: 7rem; }
  .gallery-archive__header { grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2.5rem; }
  .gallery-archive__header > p { text-align: left; }
  .gallery-archive__header > p strong { display: inline; margin-right: .4rem; font-size: 2rem; }
  .gallery-source { white-space: normal; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card, .gallery-card--hero, .gallery-card--wide, .gallery-card--tall { grid-column: 1; border-radius: 25px 25px 25px 8px; }
  .gallery-card--hero .gallery-card__media, .gallery-card--wide .gallery-card__media { aspect-ratio: 4 / 3; }
  .gallery-future { min-height: 75vh; padding-top: 7rem; padding-bottom: 7rem; }
  .gallery-future h2 { font-size: clamp(2.5rem, 11vw, 4rem); }
  .gallery-lightbox { width: calc(100% - 1rem); }
  .gallery-lightbox figure { border-radius: 23px 23px 23px 8px; box-shadow: 8px 9px 0 var(--pink); }
  .gallery-lightbox__stage { min-height: 220px; height: min(52svh, 480px); }
  .gallery-lightbox figcaption { padding: 1.15rem; }
  .gallery-lightbox__byline { grid-template-columns: 42px minmax(0, 1fr) auto; }
  .gallery-lightbox__byline img { width: 42px; height: 42px; flex-basis: 42px; }
  .gallery-lightbox__close { right: 0; }
  .gallery-lightbox__nav { top: min(26svh, 240px); width: 42px; height: 42px; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-hero__scroll span { animation: none; }
  .gallery-hero__keepsake, .keepsake-acrylic__gloss { animation: none; }
  .gallery-card { opacity: 1; transform: none; transition: none; }
}
