/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  /* Offset anchor links so fixed header never covers the target section */
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─── Custom scrollbar ───────────────────────────────────── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--warm-accent);
  border-radius: 999px;
  opacity: .55;
}
::-webkit-scrollbar-thumb:hover { opacity: 1; }
* { scrollbar-width: thin; scrollbar-color: var(--warm-accent) transparent; }

/* ─── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:          #f7f6f3;
  --surface:     #ffffff;
  --surface-2:   #ededea;
  --text:        #1a1a1a;
  --text-2:      #5a5a5a;
  --text-3:      #666666;
  --border:      #e2e1de;
  --accent:      #1a1a1a;
  --accent-fg:   #ffffff;
  --warm:        #c9b99a;
  --cool:        #97afc0;
  --warm-accent: #8f572e;   /* amber — hover highlights, progress bar, nav underline */
  --bg-glass:    rgba(247,246,243,0.90);

  --shadow-sm: 0 2px 12px rgba(0,0,0,.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,.10);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.16);
  --radius:    10px;
  --gap:       14px;
  --header-h:  66px;
  --ease:      cubic-bezier(.4,0,.2,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
}

[data-theme="dark"] {
  --bg:          #181818;
  --surface:     #222222;
  --surface-2:   #2c2c2c;
  --text:        #eeede8;
  --text-2:      #9a9a94;
  --text-3:      #b8b8b1;
  --border:      #383834;
  --accent:      #eeede8;
  --accent-fg:   #181818;
  --warm:        #c9b99a;
  --cool:        #7a94a8;
  --warm-accent: #d69a70;   /* slightly lighter amber in dark */
  --bg-glass:    rgba(24,24,24,0.90);

  --shadow-sm: 0 2px 12px rgba(0,0,0,.35);
  --shadow-md: 0 8px 32px rgba(0,0,0,.50);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.65);
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--text);
  transition: background .35s var(--ease), color .35s var(--ease);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: pageFade .45s var(--ease) both;
}
@keyframes pageFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-160%);
  transition: transform .2s var(--ease);
}
.skip-link:focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

/* ─── Scroll progress bar ────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--warm-accent);
  z-index: 500;
  pointer-events: none;
  transition: width .08s linear, opacity .3s;
  opacity: 0;
}
.scroll-progress.visible { opacity: 1; }
body.lightbox-open .scroll-progress { display: none !important; }

/* ─── Focus rings — keyboard only, no mouse ──────────────── */
:focus { outline: none; }

:focus-visible {
  outline: 2px solid var(--warm-accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.masonry-item:focus-visible {
  outline: 2px solid var(--warm-accent);
  outline-offset: -2px;
  border-radius: var(--radius);
}
.hero-cta:focus-visible,
.scroll-top:focus-visible {
  outline: 2px solid var(--warm-accent);
  outline-offset: 3px;
  border-radius: 999px;
}
.theme-toggle:focus-visible,
.menu-toggle:focus-visible {
  outline: 2px solid var(--warm-accent);
  outline-offset: 3px;
  border-radius: 999px;
}
.lb-close:focus-visible,
.lb-prev:focus-visible,
.lb-next:focus-visible {
  outline: 2px solid rgba(255,255,255,.65);
  outline-offset: 3px;
  border-radius: 50%;
}

/* ─── Header ─────────────────────────────────────────────── */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  background: transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  background: var(--bg-glass);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-color: var(--border);
}

.header-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 32px;
  padding-top: env(safe-area-inset-top, 0px);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: opacity .2s;
}
.logo:hover { opacity: .72; }
.logo-tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .92rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text);
}

/* On hero (always dark bg), header items are always white */
.header-over-hero .logo-tagline { color: rgba(255,255,255,.9); }
.header-over-hero .theme-toggle { color: rgba(255,255,255,.65); }
.header-over-hero .toggle-track { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.header-over-hero .toggle-thumb { background: rgba(255,255,255,.92); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.header-over-hero .menu-toggle { border-color: rgba(255,255,255,.2); }
.header-over-hero .menu-toggle span { background: rgba(255,255,255,.9); }
/* Nav is outside header — mirror hero state with .nav-over-hero (toggled by JS) */
.nav-over-hero .nav-link { color: rgba(255,255,255,.72); }
.nav-over-hero .nav-link:hover { color: #fff; }
/* Once scrolled — let theme tokens take over */
.header-over-hero.scrolled .logo-tagline { color: var(--text); }
.header-over-hero.scrolled .theme-toggle { color: var(--text-3); }
.header-over-hero.scrolled .toggle-track { background: var(--surface-2); border-color: var(--border); }
.header-over-hero.scrolled .toggle-thumb { background: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.header-over-hero.scrolled .menu-toggle { border-color: var(--border); }
.header-over-hero.scrolled .menu-toggle span { background: var(--text); }
.nav-scrolled .nav-link { color: var(--text-2); }
.nav-scrolled .nav-link:hover { color: var(--text); }

/* Nav now lives OUTSIDE <header> in the DOM to escape fixed + backdrop-filter
   containing-block issues. On desktop we position it inside the header bar visually. */
.nav {
  display: flex;
  gap: 30px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  padding-top: env(safe-area-inset-top, 0px);
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  align-items: center;
  justify-content: center;
  z-index: 201; /* above header (200) so links are clickable */
  pointer-events: none; /* let clicks pass through to header */
}
.nav .nav-link {
  pointer-events: auto; /* but links themselves are clickable */
}
.nav-link {
  appearance: none;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: .82rem;
  font-family: inherit;
  letter-spacing: .01em;
  color: var(--text-2);
  transition: color .2s;
  position: relative;
  padding: 0 0 3px;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1.5px;
  background: var(--warm-accent);
  border-radius: 999px;
  transition: width .3s var(--ease);
}
.nav-link:hover { color: var(--text); }
.nav-link:hover::after,
.nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--warm-accent); }

.nav-filter-panel {
  position: fixed;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 10px);
  left: 50%;
  width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, -8px);
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: 0 18px 50px rgba(0,0,0,.14);
  pointer-events: auto;
  z-index: 202;
  opacity: 0;
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  transition: opacity .2s var(--ease), transform .24s var(--ease);
}
.nav-filter-panel.open {
  opacity: 1;
  transform: translate(-50%, 0);
}

.location-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(42vh, 280px);
  overflow: auto;
  padding: 3px;
}

.location-filter-option {
  appearance: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  font: inherit;
  font-size: .82rem;
  line-height: 1;
  min-height: 38px;
  padding: 0 14px;
  outline: 2px solid transparent;
  outline-offset: 2px;
  transition: background .2s, border-color .2s, color .2s, outline-color .2s;
}

.location-filter-option:hover,
.location-filter-option:focus-visible {
  border-color: var(--warm-accent);
  outline-color: var(--warm-accent);
  color: var(--text);
}

.location-filter-option.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

.location-filter-status {
  color: var(--text-3);
  font-size: .84rem;
  padding: 4px 2px;
}


.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

/* ─── Theme toggle — pill slider ─────────────────────────── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: none;
  border: none;
  padding: 6px 2px;
  min-height: 44px; /* iOS touch-target minimum */
  color: var(--text-3);
  border-radius: 999px;
  transition: color .2s;
}
.theme-toggle:hover { color: var(--text-2); }

.toggle-track {
  width: 40px; height: 22px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background .3s, border-color .3s;
}
.toggle-thumb {
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--text);
  top: 2px; left: 2px;
  transition: transform .35s var(--ease-spring), background .3s;
  box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
[data-theme="dark"] .toggle-thumb { transform: translateX(18px); }

.toggle-icon {
  width: 14px; height: 14px;
  flex-shrink: 0;
  transition: opacity .25s;
}
/* Active icon bright, inactive dimmed */
.icon-sun  { opacity: 1; }
.icon-moon { opacity: .35; }
[data-theme="dark"] .icon-sun  { opacity: .35; }
[data-theme="dark"] .icon-moon { opacity: 1; }

/* Hidden on desktop — only shown inside the mobile overlay */
.nav-close { display: none; }

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 10px;
  transition: border-color .2s;
}
.menu-toggle span {
  display: block;
  width: 100%; height: 1.5px;
  background: var(--text);
  transition: transform .45s cubic-bezier(.76,0,.24,1), opacity .22s ease, background .2s;
  transform-origin: center;
}
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--header-h) + env(safe-area-inset-top,0px) + 60px) 32px 120px;
  overflow: hidden;
}

/* Parallax bg container — oversized so movement never shows edge */
.hero-bg {
  position: absolute;
  inset: -25% 0;
  pointer-events: none;
  will-change: transform;
  /* Placeholder colour shown on first visit before the hero photo loads */
  background: #1a1714;
}

/* Full-bleed hero photo */
.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
/* Hide broken-image icon if src is empty (no hero set yet) */
.hero-photo:not([src]), .hero-photo[src=""] { opacity: 0; }

/* Dark gradient overlay — ensures text is always legible */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.28) 38%,
    rgba(0,0,0,.32) 65%,
    rgba(0,0,0,.62) 100%
  );
}

/* Depth orbs sit on top of photo */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: 2;
  mix-blend-mode: screen;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--warm) 0%, transparent 70%);
  opacity: .18;
  top: 0; right: -8%;
}
.hero-orb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--cool) 0%, transparent 70%);
  opacity: .14;
  bottom: 5%; left: -5%;
}
.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: .5;
}

/* Hero text — always light since we're on a dark photo */
.hero-content {
  position: relative;
  z-index: 4;
  will-change: transform;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-eyebrow {
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(242,238,230,.6);
  margin-bottom: 22px;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  animation: fadeUp .75s var(--ease) both;
}
.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2.8rem, 7vw, 6rem);
  font-weight: 400;
  line-height: 1.07;
  letter-spacing: -.03em;
  max-width: 840px;
  margin-bottom: 26px;
  color: #f5f2ec;
  text-shadow: 0 2px 24px rgba(0,0,0,.55), 0 1px 6px rgba(0,0,0,.35);
  animation: fadeUp .75s .1s var(--ease) both;
}
.hero-title em {
  font-style: italic;
  color: rgba(242,238,230,.68);
}
.hero-sub {
  font-size: clamp(.9rem, 2vw, 1.08rem);
  font-weight: 300;
  color: rgba(242,238,230,.72);
  max-width: 460px;
  line-height: 1.75;
  margin-bottom: 52px;
  text-shadow: 0 1px 10px rgba(0,0,0,.35);
  animation: fadeUp .75s .2s var(--ease) both;
}

/* CTA: cream/white pill — inverted since hero is always dark */
@keyframes ctaPulse {
  0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 0 0 rgba(245,242,236,.3); }
  50%       { box-shadow: 0 8px 32px rgba(0,0,0,.35), 0 0 0 10px rgba(245,242,236,0); }
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 38px;
  background: rgba(245,242,236,.94);
  color: #1a1a1a;
  font-size: .88rem;
  font-weight: 500;
  letter-spacing: .02em;
  border-radius: 999px;
  transition: background .2s, transform .25s var(--ease-spring), box-shadow .25s;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  animation: fadeUp .75s .3s var(--ease) both, ctaPulse 3.2s 1.5s ease-in-out infinite;
}
.hero-cta:hover {
  background: #fff;
  transform: translateY(-2px);
  box-shadow: 0 16px 48px rgba(0,0,0,.45);
}

.scroll-hint {
  position: absolute;
  bottom: 32px;
  bottom: max(32px, calc(env(safe-area-inset-bottom,0px) + 16px));
  left: 50%;
  transform: translateX(-50%);
  color: rgba(242,238,230,.4);
  animation: bob 2.6s ease-in-out infinite;
  z-index: 4;
}
@keyframes bob {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(8px); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Section divider ────────────────────────────────────── */
.section-divider {
  width: 120px;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--warm-accent), transparent);
  opacity: .45;
  margin: 0 auto;
}

/* ─── Shared layout ─────────────────────────────────────── */
.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 32px;
}
.section-eyebrow {
  display: block;
  font-size: .7rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--warm-accent);
  margin-bottom: 14px;
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.section-header > div { display: flex; flex-direction: column; }
.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -.022em;
}
/* ─── Gallery ─────────────────────────────────────────────── */
.gallery-section {
  padding: 100px 0 130px;
  background:
    radial-gradient(circle at 18% 8%, rgba(143,87,46,.075), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
  box-shadow: inset 0 40px 80px rgba(0,0,0,.03);
  content-visibility: auto;
  contain-intrinsic-size: 900px;
}
[data-theme="dark"] .gallery-section {
  background:
    radial-gradient(circle at 18% 8%, rgba(214,154,112,.12), transparent 28%),
    linear-gradient(180deg, var(--bg) 0%, #1c1b1a 100%);
}
.gallery-filter-state {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 5px 5px 5px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.gallery-filter-state span {
  font-size: .74rem;
  letter-spacing: .02em;
}
.gallery-filter-state button,
.gallery-empty-action {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  min-height: 30px;
  padding: 0 12px;
  transition: transform .2s var(--ease-spring), background .2s, opacity .2s;
}
.gallery-filter-state button:hover,
.gallery-empty-action:hover {
  transform: translateY(-1px);
  opacity: .9;
}

/* ─── Masonry (JS-driven shortest-column-first layout) ──────── */
.masonry {
  position: relative;       /* JS sets position:absolute on each child     */
  width: 100%;
  min-height: 200px;        /* prevents collapse before first layout pass  */
  transition: opacity .26s var(--ease), transform .3s var(--ease), filter .3s var(--ease);
  /* CSS columns as pre-JS fallback (removed once JS runs first rAF) */
  columns: 3;
  column-gap: var(--gap);
}
.masonry.fading {
  opacity: 0;
  transform: translateY(8px);
  filter: blur(4px);
}
.masonry.filtering { pointer-events: none; }

.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-2);
  cursor: pointer;
  position: relative;
  list-style: none;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .55s var(--ease), transform .55s var(--ease), box-shadow .3s, outline-color .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Prevent iOS long-press from showing copy/select text popup */
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  /* Subtle inner ring for depth */
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.05), 0 10px 30px rgba(0,0,0,.08);
  contain: layout paint style;
}
.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  pointer-events: none;
  opacity: .6;
  z-index: 2;
}
.masonry-item.visible { opacity: 1; transform: none; }
@media (hover: hover) {
  .masonry-item.visible:hover {
    box-shadow: 0 26px 64px rgba(0,0,0,.2), 0 0 0 1px rgba(143,87,46,.16), inset 0 0 0 1px rgba(255,255,255,.08);
    transform: translateY(-5px);
  }
}

/* ── Image wrapper — holds aspect-ratio so masonry knows height before load */
.photo-img-wrap {
  width: 100%;
  overflow: hidden;
  background: var(--surface-2);
  position: relative;
}

/* ── Blur-up loading ─────────────────────────────────────────
   A tiny blurred version of the image loads first (nearly instant),
   then the full-resolution image fades in sharp.
*/
.photo-img {
  width: 100%;
  height: auto;
  display: block;
  opacity: 0;
  transition: transform .6s var(--ease), opacity .5s var(--ease), filter .5s var(--ease);
}
.photo-img.blur-up {
  opacity: 1;               /* tiny placeholder is visible immediately */
  filter: blur(10px);
  transform: scale(1.04);   /* scale hides the blurred edges */
}
.photo-img.loaded {
  opacity: 1;
  filter: none;
  transform: none;
}
@media (hover: hover) {
  .masonry-item:hover .photo-img.loaded { transform: scale(1.04); }
}

/* Shimmer skeleton — shown behind the image wrapper until loaded */
.masonry-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg,
      transparent 24%,
      var(--surface) 50%,
      transparent 76%
    ),
    radial-gradient(circle at 28% 24%, rgba(143,87,46,.12), transparent 34%),
    var(--surface-2);
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  transition: opacity .4s;
  z-index: 0;
}
.masonry-item.img-loaded::before { opacity: 0; pointer-events: none; animation: none; }
@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Hover overlay */
.masonry-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 12%, rgba(255,255,255,.16), transparent 24%),
    linear-gradient(to top,
    rgba(18,10,2,.86) 0%,
    rgba(18,10,2,.28) 54%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity .35s var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px 18px;
  color: #fff;
  z-index: 1;
}
@media (hover: hover) {
  .masonry-item:hover .masonry-overlay { opacity: 1; }
}
/* Touch peek — show overlay while finger is pressed on mobile */
@media (hover: none) {
  .masonry-item.touch-peek .masonry-overlay { opacity: 1; }
  .masonry-item.touch-peek .photo-img.loaded { transform: scale(1.04); }

  /* Instant press feedback — item dims and shrinks slightly on tap */
  .masonry-item.visible:active {
    transform: scale(.975);
    opacity: .82;
    transition: transform .09s ease, opacity .09s ease;
  }
  /* Hero CTA: tactile press state */
  .hero-cta:active {
    transform: scale(.96);
    transition: transform .09s ease;
  }
}

.overlay-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: .97rem;
  font-weight: 400;
  line-height: 1.25;
}
.overlay-title[hidden] { display: none; }
/* Small location tag below the photo title in the hover overlay */
.overlay-location {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .64rem;
  color: rgba(255,255,255,.5);
  letter-spacing: .04em;
  margin-top: 5px;
  line-height: 1;
}
.overlay-location svg { flex-shrink: 0; opacity: .75; }

/* Location line in the lightbox side panel */
.lb-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .72rem;
  color: #666;
  letter-spacing: .03em;
  margin-bottom: 18px;
  margin-top: -8px;   /* tuck it closer to the title */
}
.lb-location::before {
  content: '';
  display: inline-block;
  width: 10px; height: 10px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

.overlay-expand {
  position: absolute;
  top: 12px; right: 12px;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.28);
  border: 1px solid rgba(255,255,255,.42);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 13px;
  opacity: 0;
  transition: opacity .3s, transform .3s var(--ease-spring);
  transform: scale(.8);
}
@media (hover: hover) {
  .masonry-item:hover .overlay-expand { opacity: 1; transform: scale(1); }
}

.gallery-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-3);
  font-size: .88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.gallery-empty span {
  display: block;
}
.gallery-empty-action {
  min-height: 38px;
  padding: 0 18px;
}
.gallery-empty::before {
  content: '';
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23a8a09a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='3'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* ─── Lightbox ─────────────────────────────────────────────── */
.lb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(8,8,8,.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.lb-backdrop.active { opacity: 1; pointer-events: all; }

.lightbox {
  position: fixed;
  inset: 0;
  padding:
    max(20px, env(safe-area-inset-top,20px))
    max(20px, env(safe-area-inset-right,20px))
    max(20px, env(safe-area-inset-bottom,20px))
    max(20px, env(safe-area-inset-left,20px));
  z-index: 301;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transform: scale(.97) translateY(8px);
  transition: opacity .28s var(--ease), transform .38s cubic-bezier(.2,.8,.2,1);
}
.lightbox.active { opacity: 1; transform: none; pointer-events: all; }
.lightbox[hidden] { display: none !important; }

.lb-content {
  display: flex;
  max-width: 1200px;
  width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
  position: relative;
  z-index: 1;
}

.lb-image-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  position: relative;
  min-height: 260px;
  overflow: visible;
}

/* Full-screen blurred photo backdrop — ambient colour fill */
.lb-bg-img {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Higher brightness + saturation so the photo's colour bleeds through visibly.
     The blur smears it into a soft wash; scale(1.12) hides the blurred fringe edge. */
  filter: blur(64px) brightness(0.42) saturate(2.4);
  transform: scale(1.12);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.lb-bg-img.ready { opacity: 1; }

/* Vignette — radial gradient that darkens the outer edges so the
   coloured glow frames the photo without competing with it */
.lightbox::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(
    ellipse 82% 72% at 50% 48%,
    transparent 5%,
    rgba(0,0,0,.55) 100%
  );
  z-index: 0;
  pointer-events: none;
}
.lb-img {
  max-width: 100%;
  max-height: 88vh;
  max-height: 88dvh;
  object-fit: contain;
  display: block;
  transition: opacity .26s var(--ease), filter .24s var(--ease), transform .34s cubic-bezier(.2,.8,.2,1);
  cursor: zoom-in;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  -webkit-touch-callout: none;
  position: relative;
  z-index: 1;
  border-radius: 6px;
  filter: drop-shadow(0 12px 48px rgba(0,0,0,.7));
}
.lb-img:not([src]), .lb-img[src=""] { opacity: 0; }
.lb-img.loading {
  opacity: .42;
  filter: blur(2px) saturate(.9) drop-shadow(0 12px 48px rgba(0,0,0,.7));
}
.lb-image-wrap.photo-transitioning .lb-img {
  will-change: opacity, transform;
}

.lb-spinner {
  position: absolute;
  width: 30px; height: 30px;
  border: 2px solid rgba(255,255,255,.12);
  border-top-color: rgba(255,255,255,.6);
  border-radius: 50%;
  animation: spin .75s linear infinite;
  opacity: 1; transition: opacity .2s;
  z-index: 2;
}
.lb-spinner.hidden { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

.lb-panel { display: none; }
.lb-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}
.lb-counter { font-size: .7rem; color: #555; }
.lb-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -.01em;
  margin-bottom: 16px;
}
.lb-title[hidden] { display: none; }
.lb-desc {
  font-size: .84rem;
  line-height: 1.78;
  color: #9a9896;
  flex: 1;
  margin-bottom: 24px;
}
.lb-date {
  font-size: .7rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #555;
  padding-top: 20px;
  border-top: 1px solid #2e2e2e;
}

.lb-close, .lb-prev, .lb-next {
  position: fixed;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.16);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  box-shadow: 0 12px 36px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background .2s, border-color .2s, opacity .2s, transform .2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  min-width: 44px; min-height: 44px;
}
.lb-close:active,
.lb-prev:active,
.lb-next:active {
  transform: scale(.94);
}
.lb-prev:active,
.lb-next:active {
  transform: translateY(-50%) scale(.94);
}
.lb-prev:disabled,
.lb-next:disabled {
  opacity: 0;
  pointer-events: none;
}
.lb-close {
  top: max(16px, env(safe-area-inset-top,16px));
  right: max(16px, env(safe-area-inset-right,16px));
  width: 44px; height: 44px;
  z-index: 2; /* must be above .lb-content (z-index:1) on mobile */
}
.lb-prev, .lb-next {
  top: 50%; width: 56px; height: 56px;
  transform: translateY(-50%);
}
.lb-prev { left: max(12px, env(safe-area-inset-left,12px)); }
.lb-next { right: max(12px, env(safe-area-inset-right,12px)); }
.lb-close:hover { background: rgba(255,255,255,.2); }
.lb-prev:hover  {
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 20px rgba(255,255,255,.08);
  transform: translateY(-50%) translateX(-2px);
}
.lb-next:hover  {
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 20px rgba(255,255,255,.08);
  transform: translateY(-50%) translateX(2px);
}

/* ─── Nav backdrop (mobile) ──────────────────────────────── */
.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  background: rgba(0,0,0,.45);
  z-index: 198;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.nav-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ─── About ─────────────────────────────────────────────── */
.about-section {
  padding: 110px 0;
  background: var(--surface);
  content-visibility: auto;
  contain-intrinsic-size: 760px;
}
.about-inner {
  display: grid;
  grid-template-columns: minmax(220px, 380px) 1fr;
  gap: 88px;
  align-items: start;
}
.about-image-wrap {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  /* No fixed aspect-ratio — container fits the uploaded photo's natural shape */
  position: relative;
  /* Center the column if the grid gives it more space than the image needs */
  margin-inline: auto;
  width: 100%;
}
/* Warm photographic tint over the portrait */
.about-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(176,114,64,.1) 0%, transparent 55%);
  pointer-events: none;
  z-index: 1;
}
.about-img {
  width: 100%;
  height: auto;                  /* natural height — no cropping */
  display: block;
  object-fit: cover;
  object-position: center top;   /* keep face/subject in frame */
  contain: paint;
}
/* Don't show a broken-image icon when no portrait has been set yet */
.about-img:not([src]), .about-img[src=""] { visibility: hidden; }
.about-text { display: flex; flex-direction: column; gap: 18px; }
.about-text .section-title { margin-bottom: 4px; }
.about-text p { color: var(--text-2); line-height: 1.82; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  padding: 48px 0;
  padding-bottom: max(48px, calc(env(safe-area-inset-bottom,0px) + 24px));
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-copy {
  font-size: .76rem;
  color: var(--text-3);
}
.footer-email {
  justify-self: center;
  font-size: .76rem;
  color: var(--text-3);
  letter-spacing: .01em;
  transition: color .2s;
}
.footer-email:hover { color: var(--warm-accent); }

/* ─── Scroll to top ─────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: max(28px, calc(env(safe-area-inset-bottom,0px) + 16px));
  right: max(28px, env(safe-area-inset-right,28px));
  z-index: 150;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(.9);
  transition: opacity .3s, transform .35s var(--ease-spring), background .2s, box-shadow .2s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.scroll-top.visible { opacity: 1; pointer-events: all; transform: none; }
.scroll-top:hover {
  background: var(--warm-accent);
  color: #fff;
  border-color: var(--warm-accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(176,114,64,.3);
}

/* ─── One-shot scroll reveal (gallery cards, blog cards) ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible { opacity: 1; transform: none; }

/* ─── Continuous scroll-driven fade ─────────────────────── */
/* JS sets opacity / transform live on every scroll tick.
   Transitions smooth out the per-frame jumps. */
.reveal-scroll {
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  will-change: opacity, transform;
}
/* Mobile: opacity-only fade, shorter duration, no transform
   (reduces GPU compositing work on lower-power devices) */
@media (max-width: 768px) {
  .reveal-scroll {
    transition: opacity .3s var(--ease);
    will-change: opacity;
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-scroll {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ─── Reduced motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .scroll-hint { animation: none; }
  .hero-bg, .hero-content, .about-img { will-change: auto; }
}

/* ─── Tablet ≤ 1100px ────────────────────────────────────── */
@media (max-width: 1100px) {
  /* masonry column count is handled entirely by JS (getColumnCount) */
  .about-inner { grid-template-columns: 1fr; gap: 52px; }
  .about-image-wrap { max-width: 580px; }
}

/* ─── Mobile ≤ 768px ─────────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .header-inner { padding: 0 20px; padding-top: env(safe-area-inset-top,0px); }

  /* ── Full-screen overlay nav ──
     Nav is a SIBLING of <header> (not a child) so it lives in the root
     stacking context, completely independent of the header's backdrop-filter.
     This is what fixes the iOS bug where the nav was trapped inside the
     header's 66px height. */
  .nav {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    height: auto;
    background: #0e0d0b;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: env(safe-area-inset-top,0px) 0 env(safe-area-inset-bottom,0px);
    transform: translateY(-100%);
    z-index: 250; /* above header (200) */
    border-bottom: none;
    box-shadow: none;
    overflow: hidden;
    pointer-events: none;
    visibility: hidden;
    transition:
      transform   .65s cubic-bezier(.76,0,.24,1),
      visibility  0s   .65s;
  }
  .nav.open {
    transform: none;
    overflow: visible;
    pointer-events: auto;
    visibility: visible;
    transition:
      transform   .65s cubic-bezier(.76,0,.24,1),
      visibility  0s   0s;
  }

  /* Hamburger sits inside header (z-index:200) — already above the closed nav.
     No extra z-index needed now that nav is a sibling. */

  /* Overlay links — large editorial type */
  .nav-link {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.6rem, 6vw, 3rem);
    font-weight: 400;
    letter-spacing: -.01em;
    color: rgba(255,255,255,.55);
    padding: 12px 24px;
    width: auto;
    max-width: 100%;
    text-align: center;
    min-height: 0;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* start hidden — transitioned in when nav opens */
    opacity: 0;
    transform: translateY(20px);
    transition: color .25s ease;
  }
  .nav-link::after { display: none; }
  .nav-link:hover  { color: #fff; }
  .nav-link.active { color: rgba(255,255,255,.9); }

  /* Stagger nav items in via transition when nav opens.
     nth-child counts from 1; child 1 = .nav-close button. */
  .nav.open .nav-link {
    opacity: 1;
    transform: none;
    transition: color .25s ease,
                opacity .45s ease,
                transform .45s cubic-bezier(.4,0,.2,1);
  }
  .nav.open .nav-link:nth-child(2) { transition-delay: .14s; }
  .nav.open .nav-link:nth-child(3) { transition-delay: .22s; }
  .nav.open .nav-link:nth-child(5) { transition-delay: .30s; }
  .nav.open .nav-link:nth-child(6) { transition-delay: .38s; }
  /* Reset delay instantly when closing so links disappear with the panel */
  .nav:not(.open) .nav-link { transition-delay: 0s !important; }

  .nav-filter-panel {
    position: static;
    transform: translateY(8px);
    width: min(440px, calc(100vw - 40px));
    margin-top: 0;
    padding: 0 12px;
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.06);
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition:
      max-height .42s cubic-bezier(.4,0,.2,1),
      opacity .24s ease,
      transform .34s cubic-bezier(.4,0,.2,1),
      padding .34s cubic-bezier(.4,0,.2,1),
      margin .34s cubic-bezier(.4,0,.2,1);
  }

  .nav-filter-panel.open,
  .nav.open .nav-filter-panel:not([hidden]) {
    opacity: 1;
    transform: none;
    max-height: min(42dvh, 360px);
    margin-top: 10px;
    padding: 12px;
    transition-delay: 0s;
  }

  .location-filter-options {
    justify-content: center;
    max-height: 34dvh;
    padding: 2px;
  }

  .location-filter-option {
    min-height: 42px;
    border-color: rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.76);
  }

  .location-filter-option:hover,
  .location-filter-option:focus-visible {
    color: #fff;
    border-color: var(--warm-accent);
    outline-color: var(--warm-accent);
  }

  .location-filter-option.active {
    background: #f6efe6;
    border-color: #f6efe6;
    color: #16130f;
  }

  .location-filter-status {
    color: rgba(255,255,255,.58);
    text-align: center;
  }

  /* Header colours when overlay is open — force everything white */
  .header.nav-open .logo,
  .header.nav-open .logo-tagline,
  .header.nav-open .theme-toggle,
  .header.nav-open .theme-toggle svg { color: #fff !important; }
  .header.nav-open .toggle-track { border-color: rgba(255,255,255,.4) !important; }

  /* Nav overlay links are always light — the overlay bg is always dark */

  /* ── Close button inside the overlay ── */
  .nav-close {
    display: flex;
    position: absolute;
    top: max(24px, env(safe-area-inset-top, 24px));
    right: 24px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    color: rgba(255,255,255,.7);
    cursor: pointer;
    padding: 0;
    /* Hidden and non-interactive until nav is open */
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transition: background .2s, color .2s, transform .2s, opacity .2s, visibility 0s .2s;
  }
  .nav.open .nav-close {
    visibility: visible;
    pointer-events: auto;
    opacity: 1;
    transition: background .2s, color .2s, transform .2s, opacity .3s .35s, visibility 0s .35s;
  }
  .nav-close:hover { background: rgba(255,255,255,.15); color: #fff; transform: rotate(90deg); }

  .menu-toggle { display: flex; }
  /* Hide the hamburger when nav overlay is open — the .nav-close button
     inside the overlay handles closing, so showing both X's is redundant. */
  .menu-toggle.open { opacity: 0; pointer-events: none; }
  .nav-backdrop { display: none; } /* backdrop not needed — nav covers full screen */

  /* 16px base prevents iOS auto-zoom on any inputs; also improves readability */
  body { font-size: 16px; }

  .hero { padding-left: 20px; padding-right: 20px; }

  /* Tighter gallery top — desktop padding wastes phone screen space */
  .gallery-section { padding: 48px 0 72px; }

  .masonry-item {
    opacity: 0;
    transform: translateY(30px) scale(.985);
    transition:
      opacity .7s cubic-bezier(.4,0,.2,1),
      transform .7s cubic-bezier(.2,.8,.2,1),
      box-shadow .25s;
  }
  .masonry-item.visible {
    opacity: 1;
    transform: none;
  }

  /* Section header — stack neatly, remove redundant subtitle */
  .section-header { margin-bottom: 20px; flex-direction: column; align-items: flex-start; gap: 0; }
  .gallery-filter-state {
    margin-top: 14px;
    width: 100%;
    justify-content: space-between;
    border-radius: 8px;
    padding: 10px 10px 10px 13px;
  }
  .gallery-filter-state span {
    min-width: 0;
    font-size: .8rem;
    line-height: 1.35;
  }
  .gallery-filter-state button {
    flex-shrink: 0;
    min-height: 36px;
  }

  /* masonry column count handled by JS */

  /* Mobile lightbox — full screen, swipe-driven */
  .lightbox {
    align-items: center;
    padding: 0;
    touch-action: none;
  }
  .lb-content {
    flex-direction: column;
    max-height: 100dvh;
    height: 100dvh;
    border-radius: 0;
    position: fixed;
    inset: 0;
    width: 100%; max-width: 100%;
    background: transparent;
    overflow: hidden; /* clip photo during swipe slide */
  }
  .lb-image-wrap {
    min-height: 200px;
    flex: 1;
    overflow: hidden; /* contain translateX slide within the frame */
  }
  .lb-img { max-height: 90dvh; touch-action: none; }

  /* Hide side arrows on mobile — swipe left/right handles navigation */
  .lb-prev, .lb-next { display: none; }

  /* ── Caption overlay at bottom of mobile lightbox ── */
  .lb-panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 82px 20px max(22px, env(safe-area-inset-bottom, 22px));
    background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.42) 48%, transparent 100%);
    pointer-events: none; /* swipes pass through */
    z-index: 2;
  }
  .lb-panel .lb-title {
    order: 1;
    font-size: .98rem;
    font-weight: 500;
    color: #fff;
    margin: 0 0 5px;
    line-height: 1.35;
    text-shadow: 0 1px 6px rgba(0,0,0,.55);
  }
  .lb-panel .lb-meta {
    order: 2;
    margin: 0;
    gap: 6px;
  }
  .lb-panel .lb-counter { font-size: .66rem; color: rgba(255,255,255,.58); }
  .lb-panel .lb-location {
    order: 3;
    color: rgba(255,255,255,.68);
    font-size: .7rem;
    margin: 5px 0 0;
  }
  /* White pin icon for the dark overlay */
  .lb-panel .lb-location::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13S3 17 3 10a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E");
    opacity: .58;
  }
  .lb-panel .lb-desc,
  .lb-panel .lb-date { display: none; }

  .about-section { padding: 60px 0; }
  .about-inner { gap: 32px; }
  .about-image-wrap {
    max-width: 100%;
    /* Cap portrait height so it doesn't fill the entire phone screen */
    max-height: min(72vw, 340px);
  }
  /* Fill the capped height — object-position:top keeps face in frame */
  .about-img { width: 100%; height: 100%; object-fit: cover; }

  /* About body text — slightly larger for phone readability */
  .about-text p { font-size: .97rem; line-height: 1.78; }

  .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
  /* Footer email — large enough tap target, matches copyright size */
  .footer-email {
    display: inline-block;
    padding: 10px 0;
    font-size: .82rem;
  }

  .hero-orb-1 { width: 380px; height: 380px; }
  .hero-orb-2 { width: 300px; height: 300px; }

  /* Disable parallax layer promotion — parallax is off on mobile anyway */
  .hero-bg, .hero-content, .about-img { will-change: auto; }

  /* Reduce expensive blur filter on decorative orbs */
  .hero-orb { filter: blur(40px); }

  /* Strip the continuous pulse animation on touch devices — no hover interaction */
  .hero-cta { animation: fadeUp .75s .3s var(--ease) both; }
}

/* ─── Desktop lightbox: bottom photo caption ─────────────── */
@media (min-width: 769px) {
  .lb-content {
    width: fit-content;
    max-width: min(92vw, 1360px);
    align-items: center;
    justify-content: center;
    gap: 0;
  }
  .lb-image-wrap {
    flex: 0 1 auto;
    min-height: 0;
    overflow: hidden;
    border-radius: 6px;
    line-height: 0;
    box-shadow: 0 18px 70px rgba(0,0,0,.46);
  }
  .lb-img {
    max-width: min(92vw, 1360px);
    filter: none;
  }
  .lb-panel {
    display: flex;
    flex-direction: column;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    padding: 44px 18px 15px;
    background:
      linear-gradient(to top, rgba(3,3,3,.52), rgba(3,3,3,.22) 58%, transparent),
      rgba(10,9,8,.08);
    backdrop-filter: blur(14px) saturate(1.12);
    -webkit-backdrop-filter: blur(14px) saturate(1.12);
    border: 0;
    border-top: 1px solid rgba(255,255,255,.08);
    border-radius: 0 0 6px 6px;
    overflow: hidden;
    isolation: isolate;
    box-shadow: none;
    pointer-events: none;
    transition: opacity .22s var(--ease), transform .32s cubic-bezier(.2,.8,.2,1), box-shadow .32s var(--ease);
    transform-origin: center bottom;
  }
  .lightbox .lb-panel.meta-out {
    opacity: 0 !important;
    transform: translateY(10px) scale(.992) !important;
  }
  .lightbox .lb-panel[data-direction="prev"].meta-out {
    transform: translateY(10px) scale(.992) !important;
  }
  .lightbox .lb-panel.meta-in {
    animation: lbMetaIn .38s cubic-bezier(.2,.8,.2,1) both;
  }
  .lightbox .lb-panel[data-direction="prev"].meta-in {
    animation-name: lbMetaInPrev;
  }
  .lightbox .lb-panel.meta-in .lb-title,
  .lightbox .lb-panel.meta-in .lb-location {
    animation: lbMetaTextIn .44s cubic-bezier(.2,.8,.2,1) both;
  }
  .lightbox .lb-panel.meta-in .lb-location {
    animation-delay: .05s;
  }
  @keyframes lbMetaIn {
    from { opacity: 0; transform: translateY(12px) scale(.992); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes lbMetaInPrev {
    from { opacity: 0; transform: translateY(12px) scale(.992); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes lbMetaTextIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
  }
  .lb-panel::before {
    content: '';
    position: absolute;
    inset: -24px 0;
    background-image: var(--lb-panel-image);
    background-size: cover;
    background-position: center bottom;
    filter: blur(18px) saturate(1.25) brightness(.55);
    opacity: .24;
    transform: scale(1.08);
    z-index: -2;
    pointer-events: none;
  }
  .lb-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
      linear-gradient(to top, rgba(0,0,0,.42), rgba(0,0,0,.16) 64%, transparent);
    z-index: -1;
    pointer-events: none;
  }
  .lb-panel > * {
    position: relative;
    z-index: 1;
  }
  /* Panel is always on a dark backdrop — force light text regardless of page theme */
  .lb-panel .lb-title {
    color: rgba(255,255,255,.9);
    font-size: clamp(.86rem, 1vw, 1rem);
    line-height: 1.25;
    margin: 0 0 4px;
    text-shadow: 0 1px 8px rgba(0,0,0,.48);
  }
  .lb-panel .lb-location {
    color: rgba(255,255,255,.62);
    margin: 0;
    font-size: .68rem;
    line-height: 1.25;
  }
  .lb-panel .lb-desc,
  .lb-panel .lb-date {
    display: none;
  }
}

/* ─── Wide screens ≥ 1200px ──────────────────────────────── */
@media (min-width: 1200px) {
  .gallery-section { padding: 120px 0 160px; }
  .about-section   { padding: 140px 0; }
  .about-inner     { gap: 100px; grid-template-columns: minmax(260px, 420px) 1fr; }
  .section-header  { margin-bottom: 44px; }
}

/* ─── Small phones ≤ 480px ───────────────────────────────── */
@media (max-width: 480px) {
  /* masonry column count handled by JS (1 column below 500px) */
  .hero-title { font-size: 2.5rem; }
  /* Slightly smaller CTA pill so it fits without wrapping on narrow screens */
  .hero-cta { padding: 13px 26px; font-size: .84rem; gap: 8px; }
}

/* ═══════════════════════════════════════════════════════════
   PAGE INTRO — split-curtain reveal
   Two panels (top + bottom half) cover the page, brand name
   fades in, then panels split open to reveal the content.
   ═══════════════════════════════════════════════════════════ */
#pageIntro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: all;
}
#pageIntro.done {
  pointer-events: none;
  display: none;
}
.intro-panel {
  position: absolute;
  left: 0; right: 0;
  height: 50%;
  background: #0e0d0b;
  transition: transform .85s cubic-bezier(.76,0,.24,1);
}
.intro-top    { top: 0; }
.intro-bottom { bottom: 0; }

#pageIntro.reveal .intro-top    { transform: translateY(-100%); }
#pageIntro.reveal .intro-bottom { transform: translateY(100%); }

.intro-wordmark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.intro-brand {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.2rem, 4vw, 2.2rem);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .6s ease, transform .6s ease;
}
#pageIntro.text-in .intro-brand {
  opacity: 1;
  transform: translateY(0);
}
#pageIntro.reveal .intro-brand {
  opacity: 0;
  transition: opacity .28s ease;
}

/* Hero content starts hidden and animates in after curtain opens */
.hero-content.intro-hold,
.hero-eyebrow.intro-hold,
.hero-title.intro-hold,
.hero-sub.intro-hold,
.hero-cta.intro-hold {
  animation: none !important;
  opacity: 0;
}

/* ═══════════════════════════════════════════════════════════
   INFINITE SCROLL
   ═══════════════════════════════════════════════════════════ */
#loadMoreSentinel {
  height: 1px;
  margin-top: 60px;
}
.load-more-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0 0;
}
.load-more-spinner::after {
  content: '';
  width: 28px; height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--warm-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  /* @keyframes spin is defined once above — no duplicate needed */
}

/* ═══════════════════════════════════════════════════════════
   GALLERY ERROR STATE
   ═══════════════════════════════════════════════════════════ */
.gallery-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 48px 20px;
  color: var(--text-3);
  font-size: .88rem;
}
.gallery-error svg { flex-shrink: 0; opacity: .55; }
.gallery-error p { margin: 0; }
.gallery-error button {
  background: none;
  border: none;
  padding: 0;
  color: var(--warm-accent);
  font-size: inherit;
  text-decoration: underline;
  cursor: pointer;
}
