/* ═══════════════════════════════════════════════════════════════
   FAY REN PHOTO GALLERY — style.css  (shared across all pages)
   Fonts: Aboreto · Baskervville · Bad Script
   Breakpoint: < 1024 px = mobile/tablet  |  ≥ 1024 px = desktop
   ═══════════════════════════════════════════════════════════════ */

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

:root {
  /* Palette */
  --clr-bg:         #f8f7f5;
  --clr-nav-bg:     #fcfaf7; 
  --clr-surface:    #ffffffef;
  --clr-text:       #181818;
  --clr-muted:      #868686;
  --clr-subtle:     #e8e4de;
  --clr-accent:     #222222;
  --clr-light:      #ffffff;
  --clr-dark:       #0d0d0d;
  --clr-card-hover: rgba(8,8,8,0.56);

  /* Typography */
  --font-title: 'Aboreto', cursive;
  --font-body:  'Baskervville', serif;
  --font-quote: 'Bad Script', cursive;

  /* Layout */
  --nav-h:       76px;   /* desktop top-nav height */
  --mob-h:       58px;   /* mobile header height   */
  --sidebar-w:   320px;
  --transition:  0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.65;
}

img   { display: block; max-width: 100%; }
a     { text-decoration: none; color: inherit; }
button{ cursor: pointer; border: none; background: none; font-family: inherit; }
ul    { list-style: none; }

/* ═══════════════════════════════════════════════════════════════
   DESKTOP TOP NAV  (≥ 1024 px)
   Large, typographically prominent, no background blur
   ═══════════════════════════════════════════════════════════════ */
.desktop-nav {
  display: none;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: fixed;
    inset: 0 0 auto 0;
    height: var(--nav-h);
    background: rgba(248, 247, 245, 0.72);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232, 228, 222, 0.6);
    padding: 0 56px;
    z-index: 500;
  }

  /* Every non-home page gets top padding so content clears the fixed bar */
  body.interior { padding-top: var(--nav-h); }
}

/* Logo (left side) */
.desktop-nav .logo {
  height: 44px;
  width: auto;
  mix-blend-mode: multiply;
}

/* Right-side link list */
.desktop-nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
}

/* Primary nav link text */
.desktop-link {
  font-family: var(--font-title);
  font-size: 0.88rem;
  letter-spacing: 0.28em;
  color: var(--clr-text);
  position: relative;
  padding-bottom: 3px;
  transition: color var(--transition);
  white-space: nowrap;
}

/* Animated underline */
.desktop-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--clr-text);
  transition: width var(--transition);
}
.desktop-link:hover::after       { width: 100%; }
.desktop-link.is-current::after  { width: 100%; background: var(--clr-muted); }
.desktop-link.is-current         { color: var(--clr-muted); pointer-events: none; }
/* Galleries link on sub-gallery pages */
.desktop-link.is-parent::after   { width: 100%; background: var(--clr-muted); }
.desktop-link.is-parent          { color: var(--clr-muted); }

/* Thin divider */
.desktop-nav-divider {
  color: var(--clr-subtle);
  font-size: 1.1rem;
  user-select: none;
}

/* GALLERIES dropdown */
.desktop-dropdown { position: relative; }

.dropdown-caret {
  font-size: 0.65rem;
  opacity: 0.65;
  margin-left: 5px;
  vertical-align: middle;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 5px;
  border-radius: 2px;
  transition: opacity var(--transition), background var(--transition), transform var(--transition);
}
.dropdown-caret:hover { opacity: 1; background: rgba(0,0,0,0.06); }
.desktop-dropdown.dropdown-open .dropdown-caret { transform: rotate(180deg); opacity: 1; }

.desktop-dropdown-menu {
  position: absolute;
  top: calc(100% + 16px);
  right: 0;
  background: var(--clr-surface);
  border: 1px solid var(--clr-subtle);
  box-shadow: 0 12px 48px rgba(0,0,0,0.09);
  min-width: 200px;
  padding: 14px 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition);
  z-index: 600;
}
/* Click-to-open: controlled via JS .dropdown-open class */
.desktop-dropdown.dropdown-open .desktop-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
/* Keep focus-within for keyboard accessibility — only when no JS toggle is active */
.desktop-dropdown:not(.dropdown-open):focus-within .desktop-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.desktop-dropdown-item {
  display: block;
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  padding: 11px 28px;
  color: var(--clr-text);
  transition: background var(--transition), letter-spacing var(--transition);
}
.desktop-dropdown-item:hover        { background: #d6d0c8; letter-spacing: 0.3em; color: var(--clr-dark); }
.desktop-dropdown-item.is-current   { color: var(--clr-muted); pointer-events: none; }

/* ═══════════════════════════════════════════════════════════════
   MOBILE / TABLET HEADER  (< 1024 px)
   ═══════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0; z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 14px 20px;
  background: var(--clr-bg);
  border-bottom: 1px solid var(--clr-subtle);
  /* Required so the absolutely-positioned .page-heading centres against the full header */
  isolation: isolate;
}

.page-heading {
  font-family: var(--font-title);
  font-size: clamp(1.05rem, 4.5vw, 1.45rem);
  letter-spacing: 0.36em;
  font-weight: 400;
  text-align: center;
  color: var(--clr-dark);
  /* Truly centred relative to the full header width, not just the space between siblings */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  pointer-events: none;
}

.logo { height: 36px; width: auto; object-fit: contain; }

.menu-btn {
  font-size: 1.5rem;
  color: var(--clr-text);
  padding: 4px 8px;
  line-height: 1;
  transition: opacity var(--transition);
}
.menu-btn:hover { opacity: 0.5; }

/* Hide mobile header on desktop */
@media (min-width: 1024px) {
  .site-header { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR  (mobile/tablet only)
   ═══════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  max-width: 84vw;
  background: var(--clr-surface);
  z-index: 900;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 70px 44px 52px;
  transform: translateX(-100%);
  transition: transform var(--transition);
  box-shadow: 8px 0 40px rgba(0,0,0,0.12);
}
.sidebar.open { transform: translateX(0); }

@media (min-width: 1024px) {
  .sidebar,
  .sidebar-backdrop,
  .menu-btn { display: none !important; }
}

.sidebar-close {
  position: absolute;
  top: 20px; right: 20px;
  font-size: 1.3rem;
  color: var(--clr-text);
  padding: 6px;
  transition: opacity var(--transition), transform var(--transition);
}
.sidebar-close:hover { opacity: 0.45; transform: rotate(90deg); }

.sidebar-links { display: flex; flex-direction: column; }

.sidebar-section-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--clr-muted);
  text-transform: uppercase;
  margin-top: 24px;
  margin-bottom: 4px;
  padding-left: 2px;
  display: none; /* hidden on mobile */
}

@media (min-width: 600px) {
  .sidebar-section-label { display: block; }
}

/* Primary links: HOME · ABOUT · GALLERIES */
.sidebar-link--primary {
  font-family: var(--font-title);
  font-size: clamp(1.5rem, 6vw, 2rem);
  letter-spacing: 0.1em;
  display: block;
  padding: 10px 2px;
  color: var(--clr-text);
  position: relative;
  transition: color var(--transition), letter-spacing var(--transition);
}
.sidebar-link--primary::after {
  content: ''; position: absolute;
  left: 0; bottom: 5px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width var(--transition);
}
.sidebar-link--primary:hover::after,
.sidebar-link--primary:focus::after { width: 100%; }
.sidebar-link--primary:hover,
.sidebar-link--primary:focus { letter-spacing: 0.18em; outline: none; }

/* Sub-links: individual gallery pages */
.sidebar-link--sub {
  font-family: var(--font-title);
  font-size: clamp(0.82rem, 3vw, 1rem);
  letter-spacing: 0.2em;
  display: block;
  padding: 6px 2px 6px 20px;
  color: var(--clr-accent);
  position: relative;
  transition: color var(--transition), letter-spacing var(--transition);
}
.sidebar-link--sub::before {
  content: '–';
  position: absolute;
  left: 4px;
  opacity: 0.4;
  font-size: 0.75em;
}
.sidebar-link--sub::after {
  content: ''; position: absolute;
  left: 0; bottom: 2px;
  width: 0; height: 1px;
  background: currentColor;
  transition: width var(--transition);
}
.sidebar-link--sub:hover::after,
.sidebar-link--sub:focus::after { width: 100%; }
.sidebar-link--sub:hover,
.sidebar-link--sub:focus { letter-spacing: 0.28em; outline: none; }

/* State classes */
.sidebar-link.is-current  { color: var(--clr-muted) !important; pointer-events: none; }
.sidebar-link.is-current::after { display: none; }
.sidebar-link.is-active   { color: var(--clr-dark) !important; font-weight: 700; }

.sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 800;
  opacity: 0; pointer-events: none;
  transition: opacity var(--transition);
}
.sidebar-backdrop.visible { opacity: 1; pointer-events: auto; }

/* ═══════════════════════════════════════════════════════════════
   PAGE FADE-IN (shared)
   ═══════════════════════════════════════════════════════════════ */
.page-wrap {
  animation: pageFadeIn 0.45s ease both;
}
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════
   HOME PAGE
   ═══════════════════════════════════════════════════════════════ */
.home-root {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-bg-slider { position: absolute; inset: 0; z-index: 0; }
.bg-layer {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: opacity 1.2s ease;
}

.home-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(
    155deg,
    rgba(0,0,0,0.4) 0%,
    rgba(0,0,0,0.15) 50%,
    rgba(0,0,0,0.55) 100%
  );
}

.home-content {
  position: relative; z-index: 2;
  text-align: center;
  color: var(--clr-light);
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
}

.home-title {
  font-family: var(--font-title);
  font-size: clamp(3rem, 12vw, 6rem);
  letter-spacing: 0.22em;
  font-weight: 400;
  text-shadow: 0 2px 28px rgba(0,0,0,0.45);
}

.home-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.72rem, 2.8vw, 1rem);
  letter-spacing: 0.4em;
  opacity: 0.9;
  margin-bottom: 18px;
}

.enter-btn {
  font-family: var(--font-body);
  font-size: 0.82rem;
  letter-spacing: 0.35em;
  border: 1px solid rgba(255,255,255,0.82);
  color: var(--clr-light);
  background: rgba(255,255,255,0.13);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 12px 32px;
  margin-top: 8px;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform 0.2s ease;
}
.enter-btn:hover,
.enter-btn:focus {
  background: var(--clr-dark);
  color: var(--clr-light);
  border-color: var(--clr-dark);
  transform: scale(1.04);
  outline: none;
}
.enter-btn:active { transform: scale(0.97); }

/* Bottom-right utility: Contact */
.home-util {
  position: absolute;
  bottom: 26px; right: 26px;
  z-index: 3;
  display: flex; flex-direction: column;
  align-items: flex-end; gap: 10px;
}

.home-util-btn {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.13);
  border: 1px solid rgba(255,255,255,0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--clr-light);
  border-radius: 3px;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
}
.home-util-btn:hover {
  background: rgba(255,255,255,0.24);
  border-color: rgba(255,255,255,0.6);
  transform: translateY(-2px);
}

.home-util-icon { font-size: 1rem; line-height: 1; }
.home-util-label { font-size: 0.74rem; letter-spacing: 0.1em; }

/* ═══════════════════════════════════════════════════════════════
   GALLERIES PAGE 
   ═══════════════════════════════════════════════════════════════ */
.gallery-nav {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: calc(100vh - var(--mob-h));
}

@media (min-width: 1024px) {
  .gallery-nav { min-height: calc(100vh - var(--nav-h)); }
}

.gallery-card {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  min-height: 110px;
}

.gallery-card-img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(1);
  transform: scale(1.08);
  transition: transform 0.65s ease, filter 0.42s ease;
}

.gallery-card-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  /* NO gradient — clean solid overlay */
  background: rgba(0,0,0,0.18);
  transition: background var(--transition);
}

.gallery-card-label {
  font-family: var(--font-title);
  font-size: clamp(0.82rem, 2.8vw, 1.1rem);
  letter-spacing: 0.3em;
  color: var(--clr-light);
  text-shadow: 0 1px 8px rgba(0,0,0,0.4);
  transition: transform var(--transition);
}

.gallery-card-desc {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.68rem, 1.8vw, 0.84rem);
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.9);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
  margin-top: 8px;
}

.gallery-card:hover .gallery-card-img,
.gallery-card:focus .gallery-card-img,
.gallery-card.touch-hover .gallery-card-img {
  transform: scale(1.05);
  filter: blur(2.5px) brightness(0.62);
}
.gallery-card:hover .gallery-card-overlay,
.gallery-card:focus .gallery-card-overlay,
.gallery-card.touch-hover .gallery-card-overlay {
  background: #292929a1;
}
.gallery-card:hover .gallery-card-desc,
.gallery-card:focus .gallery-card-desc,
.gallery-card.touch-hover .gallery-card-desc { opacity: 1; transform: translateY(0); }
.gallery-card:hover .gallery-card-label,
.gallery-card:focus .gallery-card-label,
.gallery-card.touch-hover .gallery-card-label { transform: translateY(-5px); }
.gallery-card:focus { outline: 2px solid rgba(255,255,255,0.55); }

/* Tablet: 2-col */
@media (min-width: 600px) and (max-width: 1023px) {
  .gallery-nav { flex-direction: row; flex-wrap: wrap; }
  .gallery-card { flex: 0 0 50%; min-height: 160px; }
  .gallery-card:last-child { flex: 0 0 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   ABOUT PAGE
   ═══════════════════════════════════════════════════════════════ */
.about-wrap {
  background: var(--clr-bg);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

.about-content {
  flex: 1;
  display: flex; flex-direction: column;
  gap: 28px;
  padding: 40px 28px 52px;
  max-width: 700px; margin: 0 auto; width: 100%;
}

.about-top {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.about-name {
  font-family: var(--font-title);
  font-size: clamp(2rem, 9vw, 3.2rem);
  font-weight: 400;
  letter-spacing: 0.16em;
  line-height: 1.05;
}

.about-email {
  display: inline-block;
  margin-top: 18px;
  font-size: 1.4rem;
  opacity: 0.6;
  transition: opacity var(--transition), transform var(--transition);
}
.about-email:hover { opacity: 1; transform: scale(1.18); }

.about-photo-placeholder {
  flex-shrink: 0;
  width: 200px; height: 240px;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  border-radius: 1px;
  overflow: hidden;
}
.about-photo-placeholder span {
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-style: italic;
  color: rgba(255,255,255,0.88);
}

/* Horizontal rule accent */
.about-rule {
  border: none;
  border-top: 1px solid var(--clr-subtle);
  margin: 0;
}

.about-body p {
  font-family: var(--font-body);
  font-size: clamp(0.84rem, 2.2vw, 0.97rem);
  line-height: 1.82;
  color: var(--clr-text);
  margin-bottom: 16px;
  text-align: justify;
  text-align-last: left;
}

@media (min-width: 1024px) {
  .about-content { padding: 52px 56px 72px; max-width: 800px; }
  .about-photo-placeholder { width: 260px; height: 310px; }
}

/* ═══════════════════════════════════════════════════════════════
   INDIVIDUAL GALLERY PAGES 
   ═══════════════════════════════════════════════════════════════ */
.gallery-page-wrap {
  background: var(--clr-bg);
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* Subtitle strip below heading */
.gallery-subtitle-bar {
  background: var(--clr-surface);
  border-bottom: 1px solid var(--clr-subtle);
  padding: 10px 20px;
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  color: var(--clr-muted);
}

/* On desktop: scrolls with page normally.
   Has a stacking context so it paints above any scaled first-row image. */
@media (min-width: 1024px) {
  .gallery-subtitle-bar {
    position: relative;
    z-index: 10;
  }
}

/* Photo grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 1px;
  flex: 1;
}

@media (min-width: 540px)  { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
/* 800-1099px portrait: stay 4-col */
@media (min-width: 800px) and (max-width: 1099px) and (orientation: portrait)  { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
/* 800-1099px landscape: 5-col */
@media (min-width: 800px) and (max-width: 1099px) and (orientation: landscape) { .gallery-grid { grid-template-columns: repeat(5, 1fr); gap: 1px; padding: 1px; } }
@media (min-width: 1100px) { .gallery-grid { grid-template-columns: repeat(6, 1fr); } }

.photo-cell {
  position: relative;
  aspect-ratio: 2 / 3;   /* portrait on smallest 3-col screens */
  overflow: hidden;
  cursor: pointer;
  background: #c5bfb7;
}

/* Aspect ratio: portrait on mobile + iPad, square on desktop */
@media (min-width: 540px)  { .photo-cell { aspect-ratio: 3 / 4; } }   /* 4-col mobile/tablet portrait */
@media (min-width: 800px) and (max-width: 1099px) { .photo-cell { aspect-ratio: 3 / 4; } }
@media (min-width: 1100px) { .photo-cell { aspect-ratio: 1; } }        /* 6-col desktop: square */
.photo-cell img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.48s ease, filter 0.36s ease;
}
.photo-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-size: 0.6rem;
  color: rgba(255,255,255,0.9);
  gap: 3px; letter-spacing: 0.06em;
}
.photo-placeholder strong { font-size: 0.68rem; }

.photo-cell:hover img { transform: scale(1.07); filter: brightness(0.82); }
.photo-cell::after {
  content: ''; position: absolute; inset: 0;
  background: transparent;
  transition: background var(--transition);
  pointer-events: none;
}
.photo-cell:hover::after { background: rgba(0,0,0,0.07); }
.photo-cell:focus { outline: 2px solid var(--clr-accent); outline-offset: -2px; }

/* Desktop: pronounced hover scale */
@media (min-width: 1024px) {
  .photo-cell { overflow: visible; }   /* let image grow beyond cell box */
  .photo-cell img {
    transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease, box-shadow 0.55s ease;
    will-change: transform;
  }
  .photo-cell:hover img {
    transform: scale(1.10);
    filter: brightness(0.82);
    position: relative;
    z-index: 20;   /* above subtitle bar z-index:10 so first-row hover is fully visible */
    box-shadow: 0 6px 24px rgba(0,0,0,0.22);
  }
  /* overflow:visible so scaled cells bleed freely in all directions */
  .gallery-grid {
    overflow: visible;
  }
}

/* STUDY page: pro-photographer © bar */
.copyright-bar {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 22px;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  writing-mode: vertical-lr;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: var(--font-body);
  font-size: 0.5rem;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.08em;
  padding: 6px 0;
  z-index: 2;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════
   PAGE FOOTER QUOTE  (shared)
   ═══════════════════════════════════════════════════════════════ */
.page-quote {
  font-family: var(--font-quote);
  font-size: clamp(0.85rem, 2.5vw, 1.05rem);
  color: var(--clr-muted);
  text-align: center;
  padding: 22px 24px 32px;
  line-height: 1.6;
}
.page-quote span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.67rem;
  letter-spacing: 0.14em;
  margin-top: 5px;
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHTBOX  (shared)
   ═══════════════════════════════════════════════════════════════ */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(5,5,5,0.93);
  display: none; flex-direction: column;
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lightbox.open {
  display: flex;
  animation: lbIn 0.3s ease both;
}
@keyframes lbIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lightbox-close {
  position: absolute; top: 18px; right: 22px;
  font-size: 1.7rem; color: rgba(255,255,255,0.72);
  z-index: 10; padding: 6px;
  transition: color var(--transition), transform var(--transition);
}
.lightbox-close:hover { color: #fff; transform: rotate(90deg); }

.lightbox-inner {
  display: flex; flex-direction: column;
  align-items: center;
  max-width: 92vw; max-height: 86vh; gap: 18px;
}

.lightbox-img {
  max-width: 100%; max-height: 72vh;
  object-fit: contain;
  box-shadow: 0 10px 60px rgba(0,0,0,0.7);
  animation: imgIn 0.3s ease both;
}
@keyframes imgIn {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-meta { text-align: center; }
.lightbox-title {
  font-family: var(--font-body); font-style: italic;
  font-size: clamp(0.9rem, 2.5vw, 1.08rem);
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.05em; margin-bottom: 5px;
}
.lightbox-info {
  font-family: var(--font-body);
  font-size: 0.76rem; color: rgba(255,255,255,0.48);
  letter-spacing: 0.14em;
}

.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 50%;
  color: rgba(255,255,255,0.80);
  font-size: 1.4rem;
  padding: 0;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), transform 0.2s ease;
  z-index: 10;
  line-height: 1;
}
.lightbox-arrow:hover {
  background: rgba(255,255,255,0.22);
  border-color: rgba(255,255,255,0.55);
  color: #fff;
}
.lightbox-arrow:focus-visible {
  outline: 2px solid rgba(255,255,255,0.6);
  outline-offset: 3px;
}
.lightbox-prev { left: 16px; }
.lightbox-prev:hover { transform: translateY(-50%) translateX(-3px); }
.lightbox-next { right: 16px; }
.lightbox-next:hover { transform: translateY(-50%) translateX(3px); }

@media (min-width: 900px) {
  .lightbox-prev { left: 36px; }
  .lightbox-next { right: 36px; }
  .lightbox-arrow { width: 60px; height: 60px; font-size: 1.5rem; }
}

.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-body); font-size: 0.76rem;
  color: rgba(255,255,255,0.4); letter-spacing: 0.2em;
}

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.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;
}

/* Shimmer loading state */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
.photo-cell.loading {
  background: linear-gradient(90deg, #dbd6ce 25%, #eae5de 50%, #dbd6ce 75%);
  background-size: 1200px 100%;
  animation: shimmer 1.5s infinite linear;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ── GALLERIES PAGE: cards are now <a> links ─────────────────── */
a.gallery-card {
  display: flex;        /* preserve flex child behaviour */
  text-decoration: none;
  color: inherit;
}

/* ── DESKTOP NAV: extra prominence ──────────────────────────────
   Large font, generous spacing
   ─────────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .desktop-nav {
    height: 82px;
    padding: 0 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .desktop-nav .logo { height: 48px; }

  .desktop-nav-links {
    gap: 48px;
  }

  /* Bigger, more prominent link text */
  .desktop-link {
    font-size: 0.95rem;
    letter-spacing: 0.32em;
  }

  /* Thicker underline accent on hover */
  .desktop-link::after { height: 2px; }

  /* Dropdown items also slightly larger */
  .desktop-dropdown-item {
    font-size: 0.78rem;
    letter-spacing: 0.24em;
    padding: 12px 28px;
  }

  /* Keep body offset in sync with taller nav */
  :root { --nav-h: 82px; }
  body.interior { padding-top: 82px; }
}


/* ═══════════════════════════════════════════════════════════════
   GALLERY PAGE LOADER
   Fades out and is removed once all images have settled.
   ═══════════════════════════════════════════════════════════════ */
.gallery-loader {
  position: fixed;
  inset: 0;
  z-index: 400;                        /* below sidebar (900) and lightbox (1000) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: rgba(247, 244, 239, 0.72); /* --clr-bg at 72% — page stays visible beneath */
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: none;                /* page underneath stays interactive immediately */
  opacity: 1;
  transition: opacity 0.45s ease;
}

/* Fade-to-nothing, then JS removes the element */
.gallery-loader--done {
  opacity: 0;
}

/* Bold ring — noticeably dark against the bg */
.gallery-loader__ring {
  display: block;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(24, 24, 24, 0.12); 
  border-top-color: var(--clr-text);         
  border-radius: 50%;
  animation: loaderSpin 0.85s linear infinite;
}

@keyframes loaderSpin {
  to { transform: rotate(360deg); }
}

.gallery-loader__text {
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.32em;
  color: var(--clr-text);
  opacity: 0.55;
  text-transform: uppercase;
}

/* Reduced-motion: replace spin with pulse on the full ring */
@media (prefers-reduced-motion: reduce) {
  .gallery-loader__ring {
    border-color: var(--clr-text);
    animation: loaderPulse 1.4s ease-in-out infinite;
  }
}
@keyframes loaderPulse {
  0%, 100% { opacity: 0.2; }
  50%       { opacity: 0.8; }
}

.study-grid .photo-cell { position: relative; }

/* ═══════════════════════════════════════════════════════════════
   DESKTOP PAGE TITLE BANNER  (≥ 1024 px)
   Shown on individual gallery pages & about page below the nav.
   ═══════════════════════════════════════════════════════════════ */
.desktop-page-banner {
  display: none; /* hidden on mobile — .site-header handles it */
}

@media (min-width: 1024px) {
  .desktop-page-banner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 52px 64px 40px;
    background: var(--clr-bg);
    border-bottom: 1px solid var(--clr-subtle);
    text-align: center;
    gap: 10px;
  }

  .desktop-page-banner__title {
    font-family: var(--font-title);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 400;
    letter-spacing: 0.36em;
    color: var(--clr-text);
    line-height: 1;
  }

  .desktop-page-banner__rule {
    width: 48px;
    height: 1px;
    background: var(--clr-muted);
    border: none;
    margin: 4px auto 0;
  }
}
