:root {
  --gallery-bg: #f6f1e8;
  --gallery-ink: #152343;
  --gallery-muted: #61708f;
  --gallery-line: rgba(21, 35, 67, 0.12);
  --gallery-navy: #152d63;
  --gallery-soft: rgba(255, 255, 255, 0.8);
  --gallery-shadow: 0 24px 64px rgba(19, 40, 84, 0.15);
  --gallery-shadow-soft: 0 16px 36px rgba(19, 40, 84, 0.1);
  --gallery-max: 1360px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--gallery-ink);
  background:
    radial-gradient(circle at 14% 12%, rgba(90, 162, 255, 0.16), transparent 21%),
    radial-gradient(circle at 84% 8%, rgba(235, 188, 123, 0.16), transparent 18%),
    linear-gradient(180deg, #fffdfa 0%, #f6efe5 48%, #fefbf7 100%);
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: auto; }
button { font: inherit; color: inherit; }
section[id] { scroll-margin-top: 110px; }
.gallery-container,.gallery-topbar,.gallery-footer { width: min(calc(100% - 36px), var(--gallery-max)); margin-inline: auto; }
.gallery-topbar {
  position: sticky; top: 18px; z-index: 50; margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 24px; border-radius: 999px; border: 1px solid rgba(21, 35, 67, 0.12); background: rgba(255, 250, 243, 0.78);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); box-shadow: var(--gallery-shadow-soft);
}
.gallery-topbar.is-scrolled { background: rgba(255, 251, 246, 0.92); }
.gallery-brand,.gallery-nav-actions { display: inline-flex; align-items: center; gap: 14px; }
.gallery-brand-mark,.gallery-social-button {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; border: 1px solid rgba(21, 35, 67, 0.12);
  background: rgba(255, 255, 255, 0.72); box-shadow: var(--gallery-shadow-soft);
}
.gallery-brand-mark { padding: 7px; }
.gallery-brand-wordmark { width: clamp(132px, 11vw, 180px); }
.gallery-nav { display: inline-flex; gap: 24px; }
.gallery-nav a,.gallery-section-heading p,.gallery-hero-copy p,.showcase-caption small,.gallery-footer p,.gallery-lightbox figcaption p { color: var(--gallery-muted); }
.gallery-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 24px; border-radius: 999px; border: 1px solid rgba(21, 35, 67, 0.12);
  background: #214282; color: #fdfaf4; font-weight: 800; box-shadow: 0 14px 28px rgba(20, 43, 91, 0.16);
  transition: transform 0.26s ease, box-shadow 0.26s ease, background 0.26s ease;
}
.gallery-button:hover,.gallery-button:focus-visible,.gallery-social-button:hover,.gallery-social-button:focus-visible,.showcase-card:hover,.showcase-card:focus-visible,.filter-button:hover,.filter-button:focus-visible { transform: translateY(-2px); }
.gallery-button-ghost { background: rgba(255, 255, 255, 0.78); color: var(--gallery-navy); }
.gallery-social-button svg { width: 22px; height: 22px; fill: var(--gallery-navy); }
.gallery-main { padding-bottom: 80px; }
.gallery-eyebrow { margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.78rem; font-weight: 800; color: var(--gallery-navy); }
.gallery-hero { position: relative; min-height: 88svh; margin-top: -96px; padding-top: 114px; display: grid; align-items: end; overflow: clip; }
.gallery-hero-media,.gallery-hero-media img,.gallery-hero-overlay { position: absolute; inset: 0; }
.gallery-hero-media img { height: 100%; object-fit: cover; transform: scale(1.05); }
.gallery-hero-overlay { background: linear-gradient(180deg, rgba(8,16,30,.18) 0%, rgba(8,16,30,.62) 58%, rgba(8,16,30,.86) 100%), linear-gradient(90deg, rgba(8,16,30,.72) 0%, rgba(8,16,30,.28) 55%, rgba(8,16,30,.14) 100%); }
.gallery-hero-layout { position: relative; z-index: 1; padding-bottom: 76px; }
.gallery-hero-copy { max-width: 720px; }
.gallery-hero-copy h1,.gallery-section-heading h2 { margin: 0; font-family: "Sora", sans-serif; letter-spacing: -0.04em; }
.gallery-hero-copy h1 { color: #fff9f1; font-size: clamp(3rem, 6vw, 6rem); line-height: 0.96; }
.gallery-hero-copy p { max-width: 620px; font-size: 1.05rem; line-height: 1.8; color: rgba(247,241,231,.8); }
.showcase-section { padding-top: 100px; }
.gallery-section-heading { max-width: 760px; }
.gallery-section-heading h2 { font-size: clamp(2.2rem, 4vw, 4rem); line-height: 1.02; color: var(--gallery-navy); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.filter-button {
  min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(21, 35, 67, 0.12); background: rgba(255,255,255,.72); color: var(--gallery-navy);
  font-weight: 800; box-shadow: var(--gallery-shadow-soft); cursor: pointer; transition: transform .24s ease, box-shadow .24s ease, background .24s ease, color .24s ease;
}
.filter-button.is-active { background: #214282; color: #fffaf3; }
.showcase-grid { margin-top: 34px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 280px; gap: 22px; }
.showcase-card {
  position: relative; overflow: hidden; padding: 0; border: 1px solid var(--gallery-line); border-radius: 30px; background: rgba(255,255,255,.72); box-shadow: var(--gallery-shadow-soft);
  cursor: pointer; transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .22s ease;
}
.showcase-card img { height: 100%; object-fit: cover; transition: transform .5s ease; }
.showcase-card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 58%; background: linear-gradient(180deg, rgba(7,15,28,0), rgba(7,15,28,.82)); }
.showcase-card:hover img,.showcase-card:focus-visible img { transform: scale(1.06); }
.showcase-card:hover,.showcase-card:focus-visible { box-shadow: var(--gallery-shadow); border-color: rgba(33,66,130,.2); }
.showcase-card.is-filtered-out { opacity: 0; transform: scale(.96) translateY(10px); pointer-events: none; }
.showcase-caption { position: absolute; left: 20px; right: 20px; bottom: 18px; z-index: 1; }
.showcase-caption strong,.gallery-lightbox figcaption strong { display: block; color: #fffaf3; font-size: 1.1rem; }
.showcase-caption small { display: block; margin-top: 6px; color: rgba(255,246,233,.8); }
.showcase-card-large { grid-column: span 7; grid-row: span 2; }
.showcase-card-wide { grid-column: span 8; }
.showcase-card:not(.showcase-card-large):not(.showcase-card-wide) { grid-column: span 5; }
.gallery-footer { display: flex; justify-content: space-between; gap: 16px; padding: 0 0 32px; }
.gallery-lightbox { position: fixed; inset: 0; z-index: 80; }
.gallery-lightbox-close { position: absolute; top: 22px; right: 22px; z-index: 2; min-height: 46px; padding: 0 18px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(9,18,36,.54); color: #fff9f1; }
.gallery-lightbox-backdrop { position: absolute; inset: 0; background: rgba(6,12,24,.78); backdrop-filter: blur(12px); }
.gallery-lightbox-figure { position: relative; z-index: 1; width: min(calc(100% - 40px), 1080px); margin: 6vh auto 0; border-radius: 28px; overflow: hidden; background: rgba(18,28,52,.96); box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.gallery-lightbox-figure img { max-height: 72vh; object-fit: cover; }
.gallery-lightbox figcaption { padding: 20px 22px 24px; }
.reveal-up { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1); }
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 1180px) {
  .gallery-nav { display: none; }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 260px; }
  .showcase-card,.showcase-card-large,.showcase-card-wide,.showcase-card:not(.showcase-card-large):not(.showcase-card-wide) { grid-column: auto; grid-row: auto; }
}
@media (max-width: 820px) {
  .gallery-topbar { padding: 14px 18px; }
  .gallery-button-ghost { display: none; }
  .gallery-nav-actions { gap: 10px; }
  .filter-bar { gap: 10px; }
  .showcase-grid { grid-template-columns: 1fr; }
  .gallery-footer { flex-direction: column; }
  .gallery-lightbox-figure { width: min(calc(100% - 20px), 1080px); }
}
