@font-face {
  font-family: "PPNeueMontrealMono";
  src: url("../src/fonts/ppneuemontreal-book.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Transition Curtain */
.transition-curtain {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
  height: 100svh;
  z-index: 10000;
  background: black;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
  transform: translateY(-100%);
}
.transition-curtain.active {
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.transition-curtain.reveal {
  transform: translateY(-100%);
  transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}
.curtain-hash {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.05) 0px,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 10px
  );
  opacity: 0;
  transition: opacity 0.2s ease;
}
.curtain-hash.active {
  opacity: 1;
}
.curtain-text {
  position: relative;
  z-index: 1;
  color: white;
  font-family: "PPNeueMontrealMono", monospace;
  font-size: 14px;
  letter-spacing: 0.2em;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}
.curtain-text.active {
  opacity: 1;
  transform: translateY(0);
}

html:has(.photography-page) {
  scrollbar-width: none;
}
html:has(.photography-page)::-webkit-scrollbar {
  display: none;
}
.photography-page {
  min-height: 100vh;
  background: #f0a400;
  font-family: Arial, Helvetica, sans-serif;
  scrollbar-width: none;
}
.photography-page::-webkit-scrollbar {
  display: none;
}
.photo-archive.wrap {
  max-width: none;
  padding-inline: 0;
}
.photo-cover.wrap {
  max-width: none;
  padding-inline: 0;
}
.photo-header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  mix-blend-mode: exclusion;
  pointer-events: none;
}
.photo-logo {
  display: block;
  width: min(260px, 42vw);
  height: auto;
  margin: 38px 0 0 58px;
  pointer-events: auto;
}
.photo-logo img {
  display: block;
  width: 100%;
  height: auto;
}
.photo-cover {
  position: relative;
  padding-top: 0;
}
.photo-cover-image {
  appearance: none;
  border: 0;
  padding: 0;
  display: block;
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 460px;
  overflow: hidden;
  background: #171715;
  color: #fff;
  isolation: isolate;
  cursor: zoom-in;
}
.photo-cover-image::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(0deg, rgba(12, 12, 14, 0.16), transparent 38%);
  content: "";
  pointer-events: none;
}
.photo-cover-image > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 48%;
}
.photo-scroll {
  position: absolute;
  z-index: 2;
  bottom: 28px;
  left: 50%;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  transform: translateX(-50%);
  mix-blend-mode: exclusion;
}
.photo-scroll:focus-visible,
.photo-cover-image:focus-visible,
.photo-frame:focus-visible {
  outline: 2px solid white;
  outline-offset: -3px;
}
.photo-scroll span {
  width: 31px;
  height: 31px;
  border-right: 5px solid #f0a400;
  border-bottom: 5px solid #f0a400;
  transform: translateY(-7px) rotate(45deg);
}
.photo-archive {
  padding-top: 15px;
  padding-bottom: 0;
}
.photography-page .photo-gallery-grid {
  --photo-row-height: clamp(150px, 22vw, 280px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 15px;
  width: 100%;
  background: #f0a400;
}
.photo-frame {
  position: relative;
  display: block;
  flex: 1 1 calc(var(--photo-row-height) * var(--photo-aspect-ratio, 1.333));
  flex-grow: var(--photo-grow, 1);
  width: auto;
  height: var(--photo-row-height);
  min-width: 0;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: #20201d;
  color: #fff;
  cursor: zoom-in;
  text-align: left;
}
.photo-frame img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: none;
}
.photo-frame span {
  display: none;
}
.photo-frame:hover img,
.photo-frame:focus-visible img {
  transform: none;
}
.photography-page .lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 3vw, 32px);
}
.photography-page .lightbox-modal[hidden] {
  display: none !important;
}
.photography-page .lightbox-counter {
  display: none;
}
.photography-page .lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: #121310;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  animation: none;
  cursor: zoom-out;
}
.photography-page .lightbox-dialog {
  position: relative;
  z-index: 2;
  max-width: 95vw;
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: none;
}
.photography-page .lightbox-close-btn {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  z-index: 10;
}
.photography-page .lightbox-close-btn:hover {
  background: transparent;
}
.photography-page .lightbox-close-btn .icon {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.photography-page .lightbox-nav-btn {
  position: fixed;
  visibility: hidden;
}
.photography-page .lightbox-stage {
  width: auto;
  height: auto;
  max-width: 90vw;
  max-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.photography-page .lightbox-image {
  max-width: 90vw;
  max-height: 84vh;
  width: auto;
  height: auto;
  min-width: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  cursor: zoom-out;
}
.photography-page .lightbox-footer {
  display: none;
}
@media (max-width: 800px) {
  .photo-logo {
    width: min(190px, 32vw);
    height: auto;
    margin: 24px 0 0 20px;
  }
  .photography-page .photo-gallery-grid {
    --photo-row-height: clamp(160px, 28vw, 230px);
  }
}
@media (max-width: 540px), (max-height: 540px) and (pointer: coarse) {
  .photography-page {
    margin: 0;
  }
  .photo-logo {
    width: clamp(100px, 32vw, 144px);
    margin: 12px 0 0 16px;
  }
  .photo-cover-image {
    min-height: 0;
    height: min(75vw, 70svh);
  }
  .photo-cover-image > img {
    object-position: center 74%;
  }
  .photo-cover-image::after {
    background: linear-gradient(180deg, rgb(12 12 14 / 60%), transparent 45%, transparent 72%, rgb(12 12 14 / 48%));
  }
  .photo-scroll {
    bottom: 8px;
    width: 48px;
    height: 48px;
    mix-blend-mode: normal;
  }
  .photo-scroll span {
    width: 16px;
    height: 16px;
    border-width: 3px;
    border-color: white;
    transform: translateY(-4px) rotate(45deg);
  }
  .photo-archive.wrap {
    padding: 10px 10px 20px;
  }
  .photography-page .photo-gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  .photo-frame {
    height: auto;
    aspect-ratio: 4 / 3;
  }
  .photo-frame img {
    position: absolute;
    inset: 0;
  }
  .photo-frame:first-child {
    grid-row: span 2;
    aspect-ratio: auto;
  }
  .photo-frame-feature {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
  }
  .photography-page .lightbox-modal {
    --lightbox-controls-space: calc(60px + max(env(safe-area-inset-top), env(safe-area-inset-bottom)));
    padding: 0;
  }
  .photography-page .lightbox-dialog,
  .photography-page .lightbox-stage,
  .photography-page .lightbox-image {
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 2 * var(--lightbox-controls-space));
  }
  .photography-page .lightbox-close-btn {
    top: max(8px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
  }
  .photography-page .lightbox-nav-btn {
    bottom: max(8px, env(safe-area-inset-bottom));
    display: inline-flex;
    width: 48px;
    height: 48px;
    justify-content: center;
    align-items: center;
    visibility: visible;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
    cursor: pointer;
  }
  .photography-page .lightbox-nav-btn.prev-btn {
    left: max(12px, env(safe-area-inset-left));
  }
  .photography-page .lightbox-nav-btn.next-btn {
    right: max(12px, env(safe-area-inset-right));
  }
  .photography-page .lightbox-nav-btn .icon {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-frame img {
    transition: none;
  }
}
