/* Photography page only. Fixed UI reuses Home's positioning/typography
   (see home.css) but in white, since it now floats over photographs
   instead of a white background. Layout below is gallery-specific. */

/* Hide the native scrollbar chrome while keeping real scrolling
   (the .gallery-spacer's height) fully functional. */
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge/IE */
}
html::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge */
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: var(--page-padding);
  z-index: 50;
  pointer-events: none;
}

.site-header a {
  pointer-events: auto;
  color: #ffffff;
}

.logo {
  font-weight: 800;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.05;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.primary-nav ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2em;
  pointer-events: auto;
}

.primary-nav a {
  position: relative;
  font-weight: 700;
  font-size: clamp(0.85rem, 1vw, 1.05rem);
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 240ms ease;
}

.primary-nav a:hover::after,
.primary-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-footer-meta {
  position: fixed;
  bottom: var(--page-padding);
  right: var(--page-padding);
  left: auto;
  font-weight: 800;
  color: #ffffff;
  z-index: 50;
}

@media (min-width: 641px) {
  .site-header {
    padding-top: calc(var(--page-padding) * 0.5);
  }

  .logo {
    font-size: clamp(1.4rem, 1.96vw, 1.75rem);
  }

  .primary-nav a {
    font-size: clamp(1.02rem, 1.2vw, 1.26rem);
  }

  .site-footer-meta {
    font-size: 1.495rem;
    bottom: calc(var(--page-padding) * 0.35);
  }
}

@media (max-width: 640px) {
  .primary-nav ul {
    align-items: flex-end;
  }
}

.menu-toggle {
  display: none;
}

.mobile-menu {
  display: none;
}

@media (max-width: 500px) {
  .primary-nav {
    display: none;
  }

  .logo br {
    display: none;
  }

  .logo {
    font-size: 1.3rem;
  }

  .site-footer-meta {
    left: var(--page-padding);
    right: auto;
  }

  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 6px;
    width: 32px;
    height: 23px;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: auto;
  }

  .menu-toggle span {
    display: block;
    height: 3px;
    border-radius: 2px;
    background: #ffffff;
  }

  .mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    color: #b9b14c;
    padding: var(--page-padding);
    transform: translateX(100%);
    transition: transform 320ms ease;
  }

  .mobile-menu.is-open {
    transform: translateX(0);
  }

  .mobile-menu-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75em;
    border-bottom: 1px solid #b9b14c;
  }

  .mobile-menu-name {
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .mobile-menu-close {
    font-size: 1.75rem;
    line-height: 1;
    color: #b9b14c;
    cursor: pointer;
  }

  .mobile-menu-nav ul {
    display: flex;
    flex-direction: column;
  }

  .mobile-menu-nav li {
    border-bottom: 1px solid #b9b14c;
  }

  .mobile-menu-nav a {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.9em 0;
    font-weight: 800;
    font-size: 1.15rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #b9b14c;
  }

  .mobile-menu-nav a::before {
    content: "";
    width: 7px;
    height: 7px;
    background: #b9b14c;
    flex-shrink: 0;
  }

  .mobile-menu-brand {
    margin-top: auto;
    font-weight: 800;
    font-size: clamp(3.4375rem, 17.5vw, 4.375rem);
    line-height: 0.95;
    text-transform: uppercase;
    color: #b9b14c;
  }

  /* Glass lens hover (see .glass-lens below): approved on desktop,
     disabled here so phone never shows the magnifier loupe. */
  .glass-lens {
    display: none;
  }
}

/* Gallery: two independent, opposite-scrolling columns pinned to the
   viewport. Real page height comes from .gallery-spacer, sized in JS
   from the tallest column so the columns' own scroll can be tied to
   normal page scroll. */
.gallery {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  overflow: hidden;
  background: #0a0a0a;
}

.gallery-col {
  position: relative;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.gallery-col-track {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.gallery-col img {
  width: 100%;
  height: auto;
  display: block;
}

.gallery-spacer {
  height: 300vh;
}

/* Glass lens hover: a small circular "loupe" that follows the cursor
   and shows a softly magnified crop of the photograph beneath it. */
.glass-lens {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 40;
  opacity: 0;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 10px 34px rgba(0, 0, 0, 0.4),
    0 0 40px rgba(255, 255, 255, 0.08);
  transition: opacity 0.25s ease;
  will-change: transform, opacity;
}

.glass-lens-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.glass-lens::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 26%, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 45%),
    radial-gradient(circle at 72% 76%, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0) 55%);
  mix-blend-mode: overlay;
}

.glass-lens.is-visible {
  opacity: 1;
}

/* iPad and mobile: two horizontal rows instead of two vertical columns.
   .gallery stays pinned full-viewport as on desktop — only the axis
   each track moves along changes, still driven by normal vertical scroll. */
@media (max-width: 1024px) {
  .gallery {
    flex-direction: column;
    touch-action: pan-y;
  }

  .gallery-col {
    width: 100%;
    height: 50%;
  }

  .gallery-col-track {
    top: 0;
    left: 0;
    width: max-content;
    height: 100%;
    display: flex;
    flex-direction: row;
  }

  .gallery-col img {
    width: 100vw;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
  }
}
