/* ============================================================
   CHAPTER 1 – Reading Room & Study Space
   Premium Minimal Landing Page – Compiled CSS
   ============================================================ */

/* ── 1. CUSTOM PROPERTIES / DESIGN TOKENS ─────────────────── */
:root {
  --navy-900: #111A2E;
  --navy-800: #17243D;
  --navy-700: #1F2D46;
  --navy-600: #28395A;

  --ivory: #FAF8F3;
  --ivory-50: #F4F1E9;

  --charcoal: #151515;
  --text-mid: #3A3A3A;
  --text-muted: #7A7A7A;

  --gold: #B99452;
  --gold-lt: #D4B07A;

  --white: #FFFFFF;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── 2. RESET ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--ivory);
  color: var(--charcoal);
  font-family: 'DM Sans', 'Inter', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
button, input { font-family: inherit; border: none; outline: none; cursor: pointer; }

/* ── 3. TYPOGRAPHY SCALE ──────────────────────────────────── */
.serif { font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif; }

.display-xl {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(3rem, 7vw, 6.5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.02em;
}

.display-lg {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4.75rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.display-md {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 3.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
}

.display-sm {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.2;
}

.eyebrow {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}

.body-lg {
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  line-height: 1.78;
  color: var(--text-mid);
}

.body-md {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.caption {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── 4. LAYOUT ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 4rem);
}

.container--narrow { max-width: 860px; }
.container--wide   { max-width: 1440px; }

.section { padding-block: clamp(5rem, 10vw, 10rem); }
.section--dark    { background-color: var(--navy-900); color: var(--ivory); }
.section--navy    { background-color: var(--navy-800); }
.section--ivory   { background-color: var(--ivory-50); }

.gold-line {
  display: block;
  width: 48px;
  height: 1px;
  background-color: var(--gold);
  margin-block: 1.5rem;
}
.gold-line--center { margin-inline: auto; }

/* ── 5. BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 2.1rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transition: all 0.35s var(--ease-std);
  cursor: pointer;
  white-space: nowrap;
  min-touch-target: 44px;
}

.btn--primary {
  background-color: var(--navy-900);
  color: var(--ivory);
  border: 1px solid var(--navy-900);
}
.btn--primary:hover {
  background-color: var(--navy-700);
  border-color: var(--navy-700);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(17, 26, 46, 0.22);
}

.btn--gold {
  background-color: var(--gold);
  color: var(--navy-900);
  border: 1px solid var(--gold);
}
.btn--gold:hover {
  background-color: var(--gold-lt);
  border-color: var(--gold-lt);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(185, 148, 82, 0.3);
}

.btn--outline {
  background-color: transparent;
  color: var(--ivory);
  border: 1px solid rgba(250, 248, 243, 0.35);
}
.btn--outline:hover {
  background-color: rgba(250, 248, 243, 0.09);
  border-color: rgba(250, 248, 243, 0.6);
}

.btn--outline-dark {
  background-color: transparent;
  color: var(--charcoal);
  border: 1px solid rgba(21, 21, 21, 0.25);
}
.btn--outline-dark:hover {
  background-color: var(--navy-900);
  color: var(--ivory);
  border-color: var(--navy-900);
}

.btn--lg {
  padding: 1.1rem 2.75rem;
  font-size: 0.73rem;
}

/* ── 6. NAVIGATION ────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-block: 1.5rem;
  transition: background 0.45s var(--ease-std), padding 0.4s var(--ease-std), box-shadow 0.4s;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity 0.3s;
}
.nav__logo:hover { opacity: 0.8; }

.nav__logo-img {
  height: 54px;
  width: auto;
  /* Logo has ivory bg — use mix-blend-mode to show on dark hero, normal on light nav */
  mix-blend-mode: screen;
  filter: brightness(1.1) contrast(1.05);
  transition: filter 0.45s var(--ease-std), mix-blend-mode 0.45s, opacity 0.45s;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.78);
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--gold); }

.nav__cta { flex-shrink: 0; }

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  padding: 4px;
  background: transparent;
  border: none;
}
.nav__hamburger span {
  display: block;
  height: 1.5px;
  background-color: var(--ivory);
  border-radius: 2px;
  transition: all 0.35s var(--ease-out);
  transform-origin: center;
  will-change: transform;
}

/* Scrolled nav state */
.nav.is-scrolled {
  background-color: rgba(250, 248, 243, 0.97);
  box-shadow: 0 1px 0 rgba(21, 21, 21, 0.08);
  padding-block: 1rem;
  backdrop-filter: blur(16px);
}
.nav.is-scrolled .nav__logo-img {
  mix-blend-mode: normal;
  filter: none;
}
.nav.is-scrolled .nav__links a { color: var(--charcoal); }
.nav.is-scrolled .nav__links a:hover { color: var(--gold); }
.nav.is-scrolled .nav__hamburger span { background-color: var(--charcoal); }
.nav.is-scrolled .btn--outline {
  color: var(--charcoal);
  border-color: rgba(21, 21, 21, 0.28);
}
.nav.is-scrolled .btn--outline:hover {
  background-color: var(--navy-900);
  color: var(--ivory);
  border-color: var(--navy-900);
}

/* Hamburger open state */
.nav.is-open .nav__hamburger span:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav.is-open .nav__hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav.is-open .nav__hamburger span:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* Mobile nav overlay */
.nav-mobile {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: var(--navy-900);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease-out);
}
.nav-mobile.is-open {
  opacity: 1;
  pointer-events: all;
}

.nav-mobile__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}
.nav-mobile__links a {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.75rem;
  font-weight: 600;
  color: rgba(250, 248, 243, 0.85);
  letter-spacing: 0.02em;
  transition: color 0.25s, opacity 0.25s;
}
.nav-mobile__links a:hover { color: var(--gold); opacity: 1; }

.nav-mobile__contact {
  text-align: center;
}
.nav-mobile__contact .eyebrow { margin-bottom: 0.5rem; }
.nav-mobile__contact p {
  color: rgba(250, 248, 243, 0.5);
  font-size: 0.9rem;
}

/* ── 7. HERO ──────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(
      to right,
      rgba(17, 26, 46, 0.9) 0%,
      rgba(17, 26, 46, 0.68) 55%,
      rgba(17, 26, 46, 0.28) 100%
    ),
    linear-gradient(
      to top,
      rgba(17, 26, 46, 0.98) 0%,
      transparent 60%
    );
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: clamp(5rem, 10vw, 9rem);
  padding-top: 8rem;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  color: var(--gold);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.hero__eyebrow::before {
  content: '';
  display: block;
  width: 36px;
  height: 1px;
  background-color: var(--gold);
}

.hero__heading {
  color: var(--ivory);
  max-width: 660px;
  margin-bottom: 1.75rem;
}

.hero__sub {
  color: rgba(250, 248, 243, 0.68);
  max-width: 480px;
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  line-height: 1.75;
  margin-bottom: 2.5rem;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero__availability {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(250, 248, 243, 0.55);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero__availability::before {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #4ADE80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

.hero__scroll-indicator {
  position: absolute;
  bottom: 2.5rem;
  right: clamp(1.5rem, 4vw, 4rem);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(250, 248, 243, 0.35);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}
.hero__scroll-indicator::after {
  content: '';
  display: block;
  width: 1px;
  height: 56px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scroll-line 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.22); }
  50%       { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.08); }
}

@keyframes scroll-line {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  51%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ── 8. INTRO / ABOUT ─────────────────────────────────────── */
.intro__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(3rem, 6vw, 7rem);
  align-items: center;
}

.intro__content { max-width: 520px; }

.intro__stat-row {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(21, 21, 21, 0.08);
}

.intro__stat-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--navy-900);
  line-height: 1;
  margin-bottom: 0.2rem;
}

.intro__stat-label {
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.intro__image {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.intro__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.85s var(--ease-out);
}
.intro__image:hover img { transform: scale(1.035); }
.intro__image::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  border: 1px solid rgba(185, 148, 82, 0.18);
  pointer-events: none;
}

.intro__img-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  background-color: rgba(17, 26, 46, 0.88);
  backdrop-filter: blur(14px);
  padding: 0.875rem 1.25rem;
  border-radius: var(--r-md);
  border: 1px solid rgba(185, 148, 82, 0.22);
}
.intro__img-badge .caption { color: rgba(250, 248, 243, 0.55); margin-bottom: 0.15rem; }
.intro__img-badge p { color: var(--ivory); font-size: 0.85rem; font-weight: 500; }

/* ── 9. FEATURES ──────────────────────────────────────────── */
.features { background-color: var(--ivory-50); }

.features__header {
  text-align: center;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: clamp(3.5rem, 6vw, 6rem);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5px;
  background-color: rgba(21, 21, 21, 0.07);
  border: 1px solid rgba(21, 21, 21, 0.07);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.feature-item {
  background-color: var(--ivory);
  padding: 2.5rem;
  transition: background 0.38s var(--ease-std);
  min-height: 180px;
}
.feature-item:hover { background-color: var(--navy-900); }

.feature-item__icon {
  width: 36px;
  height: 36px;
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
}
.feature-item__icon svg {
  width: 26px;
  height: 26px;
  stroke: var(--navy-700);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.38s;
}
.feature-item:hover .feature-item__icon svg { stroke: var(--gold); }

.feature-item__num {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  color: var(--gold);
  margin-bottom: 0.4rem;
  transition: color 0.38s;
}

.feature-item__name {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  color: var(--charcoal);
  transition: color 0.38s;
}
.feature-item:hover .feature-item__name { color: var(--ivory); }

.feature-item__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color 0.38s;
}
.feature-item:hover .feature-item__desc { color: rgba(250, 248, 243, 0.5); }

/* ── 10. GALLERY ──────────────────────────────────────────── */
.gallery__header {
  max-width: 560px;
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.gallery__layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 1rem;
  min-height: 600px;
}
.gallery__layout .gallery__item:nth-child(1) {
  grid-row: 1 / 3;
}

.gallery__item {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
}
.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.85s var(--ease-out);
}
.gallery__item:hover img { transform: scale(1.04); }

.gallery__item--main { min-height: 580px; }
.gallery__item--sm   { min-height: 270px; }

.gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(17, 26, 46, 0.65), transparent);
}
.gallery__caption p {
  color: rgba(250, 248, 243, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

.gallery__strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}
.gallery__strip .gallery__item { min-height: 200px; }

/* ── 11. MEMBERSHIP ───────────────────────────────────────── */
.membership { background-color: var(--ivory-50); }

.membership__header {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.membership__card-wrap {
  max-width: 1080px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: stretch;
}

.membership__card--featured {
  border: 1px solid rgba(185, 148, 82, 0.45);
  box-shadow: 0 32px 80px rgba(17, 26, 46, 0.28), 0 0 0 1px rgba(185, 148, 82, 0.35);
}

.membership__badge--gold {
  background-color: rgba(185, 148, 82, 0.18);
  border-color: rgba(185, 148, 82, 0.5);
  color: var(--gold);
}

@media (max-width: 768px) {
  .membership__card-wrap {
    grid-template-columns: 1fr;
    max-width: 520px;
  }
}

.membership__card {
  background-color: var(--navy-900);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(17, 26, 46, 0.24), 0 0 0 1px rgba(185, 148, 82, 0.14);
}

.membership__card-top {
  padding: 2.75rem 2.75rem 2rem;
  border-bottom: 1px solid rgba(185, 148, 82, 0.1);
  text-align: center;
}

.membership__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: rgba(185, 148, 82, 0.1);
  border: 1px solid rgba(185, 148, 82, 0.24);
  color: var(--gold-lt);
  padding: 0.35rem 0.9rem;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
}

.membership__price-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
  margin-bottom: 0.4rem;
}

.membership__currency {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--gold);
  margin-top: 0.6rem;
}

.membership__amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 5.5rem;
  font-weight: 700;
  color: var(--ivory);
  line-height: 1;
}

.membership__label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.38);
  margin-top: 0.4rem;
}

.membership__hours {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
  color: rgba(250, 248, 243, 0.45);
  font-size: 0.82rem;
}
.membership__hours svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

.gold-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
  opacity: 0.28;
  margin-block: 1.5rem;
}

.membership__card-body {
  padding: 2rem 2.75rem 2.75rem;
}

.membership__includes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
  margin-bottom: 2.25rem;
}

.membership__feature {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: rgba(250, 248, 243, 0.72);
}
.membership__feature svg {
  width: 15px;
  height: 15px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2.2;
  flex-shrink: 0;
}

.membership__cta {
  width: 100%;
  justify-content: center;
  padding-block: 1.1rem;
  font-size: 0.73rem;
}

.membership__microcopy {
  text-align: center;
  margin-top: 1rem;
  color: rgba(250, 248, 243, 0.3);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
}

/* ── 12. EXPERIENCE (DARK) ────────────────────────────────── */
.experience__inner {
  text-align: center;
  max-width: 700px;
  margin-inline: auto;
  margin-bottom: clamp(4rem, 6vw, 6rem);
}

.experience__pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background-color: rgba(250, 248, 243, 0.06);
}

.experience__pillar {
  padding: 3rem 2.5rem;
  text-align: center;
  transition: background 0.35s;
}
.experience__pillar:hover { background-color: rgba(250, 248, 243, 0.03); }

.experience__pillar-line {
  width: 36px;
  height: 1px;
  background-color: var(--gold);
  margin: 0 auto 2rem;
}

.experience__pillar-name {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.875rem;
}

.experience__pillar-desc {
  font-size: 0.9rem;
  color: rgba(250, 248, 243, 0.48);
  line-height: 1.7;
}

/* ── 13. AUDIENCE ─────────────────────────────────────────── */
.audience__header {
  text-align: center;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: clamp(3rem, 5vw, 5rem);
}

.audience__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.audience__card {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  cursor: pointer;
}

.audience__card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.audience__card-img {
  position: absolute;
  inset: 0;
  opacity: 0.38;
  transition: opacity 0.55s, transform 0.75s var(--ease-out);
  z-index: 1;
}
.audience__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(50%);
}
.audience__card:hover .audience__card-img {
  opacity: 0.55;
  transform: scale(1.06);
}

.audience__card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.75rem;
  background: linear-gradient(to top, rgba(17, 26, 46, 0.92) 0%, transparent 100%);
  z-index: 2;
}

.audience__card-label {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.audience__card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ivory);
  line-height: 1.15;
  margin-bottom: 0.6rem;
}

.audience__card-desc {
  font-size: 0.82rem;
  color: rgba(250, 248, 243, 0.58);
  line-height: 1.6;
}

.audience__card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  border: 1px solid rgba(185, 148, 82, 0.1);
  pointer-events: none;
  z-index: 3;
  transition: border-color 0.35s;
}
.audience__card:hover::after { border-color: rgba(185, 148, 82, 0.32); }

/* ── 14. LOCATION ─────────────────────────────────────────── */
.location { background-color: var(--ivory-50); }

.location__grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: center;
}

.location__content { max-width: 460px; }

.location__details {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.location__detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.location__detail-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(21, 21, 21, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.location__detail-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
}

.location__detail-label {
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.location__detail-value {
  font-size: 0.92rem;
  color: var(--charcoal);
  font-weight: 500;
}
.location__detail-value a { color: inherit; transition: color 0.25s; }
.location__detail-value a:hover { color: var(--gold); }

.location__map {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid rgba(21, 21, 21, 0.08);
  height: 440px;
  position: relative;
  background-color: #E4E0D6;
}
.location__map iframe {
  width: 100%;
  height: 100%;
  border: none;
  filter: grayscale(30%) sepia(10%);
}
.location__map::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--r-lg);
  border: 1px solid rgba(185, 148, 82, 0.14);
  pointer-events: none;
}

/* ── 15. FINAL CTA ────────────────────────────────────────── */
.final-cta {
  background-color: var(--navy-900);
  text-align: center;
  padding-block: clamp(6rem, 12vw, 12rem);
  position: relative;
  overflow: hidden;
}
.final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(185, 148, 82, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(185, 148, 82, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.final-cta__content { position: relative; z-index: 1; }

.final-cta__heading {
  color: var(--ivory);
  margin-bottom: 1.25rem;
}

.final-cta__sub {
  color: rgba(250, 248, 243, 0.5);
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  max-width: 400px;
  margin-inline: auto;
  margin-bottom: 3rem;
  line-height: 1.7;
}

.final-cta__meta {
  margin-top: 1.5rem;
  color: rgba(250, 248, 243, 0.32);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}
.final-cta__meta::before,
.final-cta__meta::after {
  content: '';
  display: block;
  width: 32px;
  height: 1px;
  background-color: rgba(250, 248, 243, 0.18);
}

/* ── 16. FOOTER ───────────────────────────────────────────── */
.footer {
  background-color: #0D1525;
  padding-block: 4rem 2.5rem;
}

.footer__top {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(250, 248, 243, 0.06);
}

.footer__brand-logo {
  height: 54px;
  width: auto;
  opacity: 0.88;
  mix-blend-mode: screen;
  filter: brightness(1.05);
}

.footer__brand-desc {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: rgba(250, 248, 243, 0.42);
  line-height: 1.75;
  max-width: 280px;
}

.footer__col-title {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

.footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.footer__nav a {
  font-size: 0.88rem;
  color: rgba(250, 248, 243, 0.45);
  transition: color 0.25s;
}
.footer__nav a:hover { color: var(--ivory); }

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer__contact a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.88rem;
  color: rgba(250, 248, 243, 0.45);
  transition: color 0.25s;
}
.footer__contact a svg {
  width: 14px;
  height: 14px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}
.footer__contact a:hover { color: var(--ivory); }

.footer__bottom {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer__copyright {
  font-size: 0.78rem;
  color: rgba(250, 248, 243, 0.22);
}
.footer__open {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: rgba(250, 248, 243, 0.28);
  letter-spacing: 0.06em;
}
.footer__open::before {
  content: '';
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #4ADE80;
}

/* ── 17. SCROLL REVEAL (IntersectionObserver + CSS fallback) ── */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  transition-property: opacity, transform;
  transition-duration: 0.85s;
  transition-timing-function: var(--ease-out);
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal         { opacity: 0; transform: translateY(36px); }
  .reveal-left    { opacity: 0; transform: translateX(-32px); }
  .reveal-right   { opacity: 0; transform: translateX(32px); }
  .reveal-scale   { opacity: 0; transform: scale(0.96); }
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
  opacity: 1;
  transform: none;
}

.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }
.reveal--delay-4 { transition-delay: 0.32s; }
.reveal--delay-5 { transition-delay: 0.4s; }

/* CSS Scroll-driven animation for supporting browsers (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) and (animation-range: entry) {
    @keyframes fade-up-in {
      from { opacity: 0; translate: 0 30px; }
      to   { opacity: 1; translate: 0 0; }
    }

    .reveal {
      animation: fade-up-in linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
      opacity: 1;
      transform: none;
    }
  }
}

/* ── 18. UTILITIES ────────────────────────────────────────── */
.text-center  { text-align: center; }
.text-ivory   { color: var(--ivory); }
.text-gold    { color: var(--gold); }
.text-navy    { color: var(--navy-900); }
.text-muted   { color: var(--text-muted); }

.mb-xs { margin-bottom: 0.5rem; }
.mb-sm { margin-bottom: 0.875rem; }
.mb-md { margin-bottom: 1.5rem; }
.mb-lg { margin-bottom: 2.5rem; }
.mb-xl { margin-bottom: 4rem; }

.mt-sm { margin-top: 0.875rem; }
.mt-md { margin-top: 1.5rem; }
.mt-lg { margin-top: 2.5rem; }

/* ── 19. RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav__links { display: none; }
  .nav__cta   { display: none; }
  .nav__hamburger { display: flex; }

  .intro__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .intro__image {
    aspect-ratio: 4 / 3;
    order: -1;
  }
  .intro__content { max-width: 100%; }

  .audience__grid { grid-template-columns: repeat(2, 1fr); }

  .location__grid { grid-template-columns: 1fr; gap: 3rem; }
  .location__content { max-width: 100%; }

  .footer__top { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
  .hero__scroll-indicator { display: none; }

  .features__grid { grid-template-columns: 1fr 1fr; }

  .gallery__layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    min-height: auto;
  }
  .gallery__layout .gallery__item:nth-child(1) { grid-row: auto; }
  .gallery__item--main { min-height: 320px; }
  .gallery__item--sm   { min-height: 200px; }
  .gallery__strip { grid-template-columns: 1fr; }

  .membership__includes { grid-template-columns: 1fr; }

  .experience__pillars { grid-template-columns: 1fr; }

  .audience__grid { grid-template-columns: 1fr; }
  .audience__card { aspect-ratio: 4 / 3; }

  .footer__top { grid-template-columns: 1fr; gap: 2rem; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 0.75rem; }

  .intro__stat-row { gap: 2rem; }
}

@media (max-width: 480px) {
  .features__grid { grid-template-columns: 1fr; }
  .hero__actions  { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
  .gallery__strip { display: none; }
}

/* ── 20. WHATSAPP FLOATING BUTTON ─────────────────────────── */
.wa-float {
  /* Position */
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1100;

  /* Shape — collapsed to circle, expands to pill on hover */
  display: inline-flex;
  align-items: center;
  gap: 0;
  overflow: hidden;

  /* Sizing */
  height: 58px;
  width: 58px;
  border-radius: 100px;

  /* Color */
  background-color: #25D366;
  color: #fff;

  /* Shadow — elevated card feel */
  box-shadow:
    0 4px 20px rgba(37, 211, 102, 0.45),
    0 2px 8px rgba(0, 0, 0, 0.15);

  /* Transition */
  transition:
    width 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    gap 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    transform 0.3s ease;

  /* Remove default link underline */
  text-decoration: none;

  /* Prevent text select */
  user-select: none;
}

/* Hover — expand to pill */
.wa-float:hover {
  width: 170px;
  gap: 0.65rem;
  box-shadow:
    0 8px 32px rgba(37, 211, 102, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

/* Focus ring for accessibility */
.wa-float:focus-visible {
  outline: 3px solid #25D366;
  outline-offset: 3px;
}

/* ── Pulse ring ── */
.wa-float__pulse {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  background-color: #25D366;
  z-index: -1;
  animation: wa-pulse 2.5s ease-out infinite;
}

@keyframes wa-pulse {
  0%   { transform: scale(1);    opacity: 0.7; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { transform: scale(1.55); opacity: 0; }
}

/* Stop pulse on hover */
.wa-float:hover .wa-float__pulse {
  animation: none;
}

/* ── Icon ── */
.wa-float__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 58px;
  height: 58px;
}

.wa-float__icon svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.15));
}

/* ── Label ── */
.wa-float__label {
  font-family: 'DM Sans', 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;

  /* Hidden by default — revealed on hover */
  opacity: 0;
  transform: translateX(-6px);
  transition:
    opacity 0.3s ease 0.05s,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;

  /* Right padding inside pill */
  padding-right: 1.25rem;
}

.wa-float:hover .wa-float__label {
  opacity: 1;
  transform: translateX(0);
}

/* ── Tooltip (shown on mobile where hover isn't triggered) ── */
@media (hover: none) {
  .wa-float {
    /* On touch devices — always show pill slightly */
    width: 58px;
  }
  .wa-float__label {
    display: none;
  }
  .wa-float__pulse {
    animation: wa-pulse 2.5s ease-out infinite;
  }
}

/* ── Mobile positioning ── */
@media (max-width: 768px) {
  .wa-float {
    bottom: 1.5rem;
    right: 1.25rem;
    height: 54px;
    width: 54px;
  }
  .wa-float:hover {
    width: 160px;
  }
  .wa-float__icon {
    width: 54px;
    height: 54px;
  }
  .wa-float__icon svg {
    width: 27px;
    height: 27px;
  }
}


/* ══════════════════════════════════════════════════════════════
   GALLERY PREVIEW (homepage #space section)
══════════════════════════════════════════════════════════════ */

.gallery__preview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.gallery__preview-item {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 3 / 4;
  background-color: var(--navy-800);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.gallery__preview-item:hover,
.gallery__preview-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(17, 26, 46, 0.22);
  outline: none;
}
.gallery__preview-item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.gallery__preview-item--main {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.gallery__preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.85s var(--ease-out);
}
.gallery__preview-item:hover img {
  transform: scale(1.05);
}

.gallery__preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(17, 26, 46, 0.75) 0%,
    rgba(17, 26, 46, 0.1) 55%,
    transparent 100%
  );
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.38s var(--ease-std);
}
.gallery__preview-item:hover .gallery__preview-overlay,
.gallery__preview-item:focus-visible .gallery__preview-overlay {
  opacity: 1;
}

.gallery__preview-overlay p {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  color: rgba(250, 248, 243, 0.88);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
}

.gallery__zoom-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: rgba(250, 248, 243, 0.12);
  border: 1px solid rgba(250, 248, 243, 0.25);
  backdrop-filter: blur(8px);
  transition: background 0.3s, transform 0.3s var(--ease-out);
}
.gallery__preview-item:hover .gallery__zoom-icon {
  background-color: rgba(185, 148, 82, 0.2);
  border-color: var(--gold);
  transform: scale(1.1);
}
.gallery__zoom-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--ivory);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery__preview-cta {
  text-align: center;
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════
   LIGHTBOX
══════════════════════════════════════════════════════════════ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease-std);
}
.lightbox.is-open {
  opacity: 1;
  pointer-events: all;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(10, 14, 24, 0.94);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.lightbox__container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 2rem;
}

.lightbox__img-wrap {
  position: relative;
  max-width: min(90vw, 1100px);
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--r-md);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  display: block;
}
.lightbox__img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

.lightbox__loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__loader::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 2px solid rgba(250, 248, 243, 0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: lb-spin 0.75s linear infinite;
}
.lightbox__loader.is-hidden { display: none; }

@keyframes lb-spin {
  to { transform: rotate(360deg); }
}

.lightbox__close {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: rgba(250, 248, 243, 0.1);
  border: 1px solid rgba(250, 248, 243, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  backdrop-filter: blur(8px);
}
.lightbox__close:hover {
  background-color: rgba(250, 248, 243, 0.2);
  transform: scale(1.08);
}
.lightbox__close svg {
  width: 18px;
  height: 18px;
  stroke: var(--ivory);
  stroke-width: 2;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: rgba(250, 248, 243, 0.1);
  border: 1px solid rgba(250, 248, 243, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s, transform 0.25s;
  backdrop-filter: blur(8px);
}
.lightbox__nav:hover {
  background-color: rgba(185, 148, 82, 0.25);
  border-color: var(--gold);
}
.lightbox__nav--prev { left: 1.5rem; }
.lightbox__nav--next { right: 1.5rem; }
.lightbox__nav svg {
  width: 20px;
  height: 20px;
  stroke: var(--ivory);
  stroke-width: 2;
}

.lightbox__caption {
  position: absolute;
  bottom: 3rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250, 248, 243, 0.65);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-align: center;
  max-width: 560px;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lightbox__counter {
  position: absolute;
  top: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(250, 248, 243, 0.38);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ══════════════════════════════════════════════════════════════
   GALLERY PAGE (gallery.php)
══════════════════════════════════════════════════════════════ */

.gallery-page__hero {
  background-color: var(--navy-900);
  padding: 8rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.gallery-page__hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 15% 50%, rgba(185, 148, 82, 0.06) 0%, transparent 55%),
    radial-gradient(circle at 85% 30%, rgba(185, 148, 82, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.gallery-page__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(250, 248, 243, 0.38);
}
.gallery-page__breadcrumb a {
  color: rgba(250, 248, 243, 0.38);
  transition: color 0.25s;
}
.gallery-page__breadcrumb a:hover { color: var(--gold); }
.gallery-page__breadcrumb span[aria-current] { color: var(--gold); }

.gallery-page__title {
  color: var(--ivory);
  margin-bottom: 0.75rem;
}

.gallery-page__sub {
  color: rgba(250, 248, 243, 0.55);
  max-width: 480px;
  margin-bottom: 1.5rem;
}

.gallery-page__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(250, 248, 243, 0.3);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-page__section {
  padding-top: clamp(3rem, 6vw, 5rem);
}

.gallery-page__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.gallery-page__item {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background-color: var(--navy-800);
  transition-delay: var(--delay, 0s);
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out);
}
.gallery-page__item:hover,
.gallery-page__item:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(17, 26, 46, 0.2);
  outline: none;
}
.gallery-page__item:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}
.gallery-page__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.75s var(--ease-out);
}
.gallery-page__item:hover img { transform: scale(1.05); }

.gallery-page__item--error {
  background: linear-gradient(160deg, var(--navy-700), var(--navy-900));
}
.gallery-page__item--error img { display: none; }

.gallery-page__empty {
  text-align: center;
  padding: 5rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Pagination */
.gallery-page__pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
}

.gallery-page__pg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  border: 1px solid rgba(21, 21, 21, 0.15);
  color: var(--charcoal);
  transition: background 0.25s, border-color 0.25s;
  text-decoration: none;
}
.gallery-page__pg-btn:hover {
  background-color: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--ivory);
}
.gallery-page__pg-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}
.gallery-page__pg-btn--disabled {
  opacity: 0.3;
  pointer-events: none;
  cursor: default;
}

.gallery-page__pg-numbers {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.gallery-page__pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--charcoal);
  text-decoration: none;
  border: 1px solid transparent;
  transition: background 0.25s, border-color 0.25s;
}
.gallery-page__pg-num:hover {
  background-color: var(--ivory-50);
  border-color: rgba(21, 21, 21, 0.12);
}
.gallery-page__pg-num--active {
  background-color: var(--navy-900);
  color: var(--ivory);
  border-color: var(--navy-900);
  pointer-events: none;
  font-weight: 600;
}
.gallery-page__pg-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.gallery-page__back {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid rgba(21, 21, 21, 0.07);
}

/* ── Responsive: gallery preview & page ───────────────────── */
@media (max-width: 1024px) {
  .gallery__preview-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery__preview-item--main {
    grid-column: span 2;
  }
  .gallery-page__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery__preview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }
  .gallery__preview-item--main {
    grid-column: span 2;
    aspect-ratio: 16 / 9;
  }
  .gallery-page__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .lightbox__nav--prev { left: 0.5rem; }
  .lightbox__nav--next { right: 0.5rem; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__caption { font-size: 0.75rem; bottom: 2rem; }
}

@media (max-width: 480px) {
  .gallery__preview-grid {
    grid-template-columns: 1fr;
  }
  .gallery__preview-item--main {
    grid-column: span 1;
  }
  .gallery-page__grid {
    grid-template-columns: 1fr;
  }
  .gallery-page__back {
    flex-direction: column;
  }
  .gallery-page__back .btn { width: 100%; }
}

/* ══════════════════════════════════════════════════════════════
   GALLERY PAGE v2 — Tab Filter Bar & View Toggle
══════════════════════════════════════════════════════════════ */

.gallery-page__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  padding-top: clamp(2rem, 4vw, 3rem);
}

/* Tab pills */
.gallery-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text-mid);
  background-color: var(--ivory-50);
  border: 1.5px solid rgba(21, 21, 21, 0.1);
  text-decoration: none;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
  white-space: nowrap;
}
.gallery-tab:hover {
  background-color: var(--navy-900);
  color: var(--ivory);
  border-color: var(--navy-900);
  /* No translateY — prevents micro layout shift on hover */
}
.gallery-tab.is-active {
  background-color: var(--navy-900);
  color: var(--ivory);
  border-color: var(--navy-900);
}
.gallery-tab__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 100px;
  background-color: rgba(250, 248, 243, 0.15);
  font-size: 0.65rem;
  font-weight: 600;
}
.gallery-tab.is-active .gallery-tab__count {
  background-color: rgba(250, 248, 243, 0.18);
}
.gallery-tab:not(.is-active) .gallery-tab__count {
  background-color: rgba(21, 21, 21, 0.08);
  color: var(--text-muted);
}

/* View toggle buttons */
.gallery-view-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--ivory-50);
  border: 1.5px solid rgba(21, 21, 21, 0.1);
  border-radius: var(--r-md);
  padding: 0.25rem;
  flex-shrink: 0;
}

.gallery-view-btn {
  width: 36px;
  height: 36px;
  border-radius: calc(var(--r-md) - 2px);
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  color: var(--text-muted);
}
.gallery-view-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}
.gallery-view-btn.is-active {
  background-color: var(--navy-900);
  color: var(--ivory);
}
.gallery-view-btn:hover:not(.is-active) {
  background-color: rgba(21, 21, 21, 0.07);
  color: var(--charcoal);
}

/* Gallery page empty state */
.gallery-page__empty {
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}
.gallery-page__empty svg {
  width: 52px;
  height: 52px;
  stroke: rgba(21, 21, 21, 0.15);
  margin: 0 auto 1rem;
}
.gallery-page__empty p { font-size: 0.95rem; }

/* ── List view ────────────────────────────────────────────── */
.gallery-page__list-view {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 3rem;
}

.gallery-list-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 0.875rem;
  border-radius: var(--r-lg);
  background-color: var(--white);
  border: 1.5px solid rgba(21, 21, 21, 0.07);
  transition: box-shadow 0.3s, transform 0.3s;
}
.gallery-list-row:hover {
  box-shadow: 0 6px 24px rgba(17, 26, 46, 0.1);
  transform: translateX(3px);
}

.gallery-list-row__thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  flex-shrink: 0;
}
.gallery-list-row__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease-out);
}
.gallery-list-row__thumb:hover img { transform: scale(1.06); }
.gallery-list-row__thumb .gallery__preview-overlay { border-radius: var(--r-md); }

.gallery-list-row__info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.gallery-list-row__alt {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
}
.gallery-list-row__caption {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
}
.gallery-list-row__tab {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 100px;
  background-color: rgba(185, 148, 82, 0.1);
  border: 1px solid rgba(185, 148, 82, 0.22);
  color: var(--gold);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  width: fit-content;
  margin-top: 0.2rem;
}

/* Responsive tab bar */
@media (max-width: 768px) {
  .gallery-page__toolbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .gallery-view-toggle {
    align-self: flex-end;
  }
  .gallery-list-row {
    grid-template-columns: 80px 1fr;
    gap: 0.875rem;
  }
}

@media (max-width: 480px) {
  .gallery-tabs { gap: 0.35rem; }
  .gallery-tab { font-size: 0.7rem; padding: 0.4rem 0.85rem; }
}

/* ══════════════════════════════════════════════════════════════
   GALLERY PAGE — No-shake tabs + scrollable mobile tab bar
══════════════════════════════════════════════════════════════ */

/* Fix page shake: reserve stable height for grid area */
.gallery-page__section {
  padding-top: 0;
}

.gallery-page__grid,
.gallery-page__list-view {
  /* min-height prevents collapse that causes layout shift */
  min-height: 320px;
}

/* Prevent page-width shift from scrollbar appearing/disappearing */
html {
  scrollbar-gutter: stable;
}

/* Toolbar: don't let it wrap unpredictably */
.gallery-page__toolbar {
  align-items: center;
  flex-wrap: nowrap;
  gap: 1rem;
  /* Prevent any overflow from causing horizontal shift */
  overflow: hidden;
}

/* Scrollable tab bar wrapper */
.gallery-tabs-wrap {
  position: relative;
  flex: 1;
  min-width: 0; /* allow flex child to shrink */
  overflow: hidden;
}

.gallery-tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  /* Horizontal scroll on overflow, no wrap */
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  /* Hide scrollbar visually but keep functional */
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
  /* Padding so active pill border isn't clipped */
  padding-bottom: 4px;
  padding-top: 4px;
  /* Smooth momentum scroll on iOS */
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  /* Prevent layout shift by maintaining stable height */
  min-height: 48px;
}
.gallery-tabs::-webkit-scrollbar { display: none; } /* Chrome/Safari */

/* Each tab: fixed height so scroll doesn't cause vertical jump */
.gallery-tab {
  flex-shrink: 0;
  scroll-snap-align: start;
  height: 38px;
  /* Prevent transitions from causing layout shift */
  transform: translateZ(0);
  will-change: background-color, color;
}
/* Remove translateY on hover — that was causing micro-shift */
.gallery-tab:hover {
  transform: translateZ(0);
}

/* Right fade-edge to hint more tabs */
.gallery-tabs-wrap__fade-right {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 4px;
  width: 32px;
  background: linear-gradient(to right, transparent, var(--ivory));
  pointer-events: none;
}

/* On sections with ivory-50 background */
.gallery-page__section .gallery-tabs-wrap__fade-right {
  background: linear-gradient(to right, transparent, var(--ivory));
}

@media (max-width: 768px) {
  .gallery-page__toolbar {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
  }
  .gallery-tabs-wrap {
    flex: 1;
  }
  .gallery-view-toggle {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .gallery-tab {
    font-size: 0.72rem;
    padding: 0 0.85rem;
  }
}
