@font-face {
  font-display: swap;
  font-family: "Hyperlegible Sans";
  font-style: normal;
  font-weight: 400;
  src: url("/assets/fonts/hyperlegible-sans/HyperlegibleSans-Regular.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Hyperlegible Sans";
  font-style: normal;
  font-weight: 700;
  src: url("/assets/fonts/hyperlegible-sans/HyperlegibleSans-Bold.woff2") format("woff2");
}

@font-face {
  font-display: swap;
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 400;
  src: url("/assets/fonts/source-serif-4/SourceSerif4-Regular.woff2") format("woff2");
}

:root {
  --ink: #151617;
  --paper: #f1f0ec;
  --white: #fffaf3;
  --clay: #9d563f;
  --clay-dark: #743b2e;
  --muted: #636769;
  --line: #d1d0cb;
  --font-head: "Hyperlegible Sans", Arial, "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 82px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--font-body);
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

img {
  display: block;
  width: 100%;
}

.topbar {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 12px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(255, 250, 243, 0.12);
  color: var(--white);
  background: #111;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
  font-family: var(--font-head);
}

.brand {
  display: grid;
  gap: 2px;
  color: var(--white);
  text-decoration: none;
}

.brand strong {
  font-size: 16px;
}

.brand span {
  color: rgba(255, 250, 243, 0.68);
  font-size: 12px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav a {
  color: rgba(255, 250, 243, 0.78);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav a[aria-current="page"] {
  color: var(--white);
}

.nav .contact-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 15px;
  border-radius: 8px;
  color: var(--white);
  background: var(--clay);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid rgba(255, 250, 243, 0.24);
  border-radius: 8px;
  color: var(--white);
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  background: currentColor;
}

main {
  padding-top: 74px;
}

.wrap {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.gallery-intro {
  position: relative;
  display: grid;
  min-height: clamp(25rem, 62svh, 31rem);
  align-items: end;
  overflow: hidden;
  padding: clamp(48px, 6vw, 72px) 0 clamp(42px, 5vw, 58px);
  color: #fffaf3;
  background: #171819;
}

.gallery-intro::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(10, 11, 12, 0.6);
  content: "";
}

.gallery-intro-media,
.gallery-intro-media picture,
.gallery-intro-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gallery-intro-media img {
  object-fit: cover;
  object-position: center;
}

.gallery-intro-content {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--clay);
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 780px;
  margin: 0 0 20px;
  font-family: var(--font-head);
  font-size: clamp(42px, 6vw, 68px);
  line-height: 1;
  letter-spacing: 0;
}

.gallery-intro p:last-child {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 250, 243, 0.88);
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
}

.filter-band {
  position: sticky;
  z-index: 30;
  top: 74px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  background: #f7f6f2;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-head);
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #b9b9b5;
  border-radius: 8px;
  color: #343638;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.filter-button[aria-pressed="true"] {
  border-color: var(--clay-dark);
  color: var(--white);
  background: var(--clay-dark);
}

.gallery-section {
  padding: clamp(36px, 5vw, 52px) 0 clamp(72px, 7vw, 96px);
}

.gallery-status {
  margin: 0 0 22px;
  color: var(--muted);
  font-family: var(--font-head);
  font-size: 13px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(21, 22, 23, 0.12);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(21, 22, 23, 0.06);
}

.gallery-item[hidden] {
  display: none;
}

.gallery-open {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #e1e3df;
  cursor: zoom-in;
}

.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}

.gallery-open:hover img {
  transform: scale(1.012);
}

.gallery-item figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 14px;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.gallery-item figcaption span {
  min-width: 0;
}

.gallery-item figcaption a {
  flex: 0 0 auto;
  color: var(--clay-dark);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.gallery-item figcaption a:hover {
  text-decoration: underline;
}

.gallery-open:focus-visible,
.filter-button:focus-visible,
.lightbox button:focus-visible,
.menu-toggle:focus-visible,
a:focus-visible {
  outline: 3px solid #d38b70;
  outline-offset: 3px;
}

.lightbox {
  width: min(1120px, calc(100% - 28px));
  max-width: none;
  height: min(88vh, 820px);
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--white);
  background: #111;
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.lightbox-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
}

.lightbox-media {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

.lightbox-image-frame {
  position: absolute;
  inset: 48px 64px 18px;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
}

.lightbox-image-frame picture {
  display: block;
  height: 100%;
}

.lightbox-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid rgba(255, 250, 243, 0.28);
  border-radius: 50%;
  color: var(--white);
  background: rgba(17, 17, 17, 0.82);
  font-family: Arial, sans-serif;
  font-size: 28px;
  cursor: pointer;
}

.lightbox-close {
  z-index: 2;
  top: 12px;
  right: 12px;
  font-size: 22px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 12px;
}

.lightbox-next {
  right: 12px;
}

.lightbox-caption {
  margin: 0;
  padding: 16px 22px 20px;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 700;
}

.footer {
  padding: 56px clamp(18px, 4vw, 56px) 24px;
  color: rgba(255, 250, 243, 0.7);
  background: #111;
  font-family: var(--font-head);
  font-size: 13px;
}

.footer-inner,
.footer-bottom {
  width: min(1060px, 100%);
  margin: 0 auto;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px;
  padding-bottom: 40px;
}

.footer-brand,
.footer-nav,
.footer-contact {
  display: grid;
  align-content: start;
  gap: 7px;
}

.footer-nav {
  justify-items: center;
}

.footer-contact {
  justify-items: end;
  text-align: right;
}

.footer strong {
  color: var(--white);
  font-size: 15px;
}

.footer a {
  color: rgba(255, 250, 243, 0.72);
  text-decoration: none;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 250, 243, 0.12);
}

.footer-legal {
  display: flex;
  gap: 18px;
}

@media (max-width: 820px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    flex-direction: column;
    gap: 0;
    padding: 10px 18px 18px;
    border-top: 1px solid rgba(255, 250, 243, 0.1);
    background: #111;
    box-shadow: 0 20px 34px rgba(0, 0, 0, 0.26);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-bottom: 1px solid rgba(255, 250, 243, 0.08);
  }

  .nav .contact-link {
    justify-content: center;
    margin-top: 10px;
    border-bottom: 0;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .footer-nav,
  .footer-contact {
    justify-items: center;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

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

@media (max-width: 520px) {
  .brand span {
    display: none;
  }

  .gallery-intro {
    padding-top: 46px;
  }

  .filter-band {
    top: 68px;
  }

  .filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .filter-button:first-child {
    grid-column: 1 / -1;
  }

  .lightbox {
    width: calc(100% - 16px);
    height: 86vh;
  }

  .lightbox-image-frame {
    inset: 52px 12px 16px;
  }

  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
