*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
  background: #111;
  color: #fff;
  -ms-overflow-style: none;
  scrollbar-width: none;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::-webkit-scrollbar {
  width: 0;
  height: 0;
}

img {
  display: block;
  max-width: 100%;
}

main {
  flex: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #111;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, opacity 0.3s ease;
  will-change: transform;
}

.site-header.is-hidden {
  transform: translateY(-100%);
  opacity: 0.7;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 6vw;
}

.site-logo {
  display: flex;
  align-items: center;
  height: 32px;
}

.site-logo__img {
  height: 100%;
  width: auto;
  max-width: 240px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.95rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

.site-nav a:hover {
  color: #fff;
}

.filters-toggle {
  padding: 8px 14px;
  background: #fff;
  border: none;
  color: #111;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filters-toggle img {
  width: 100%;
  height: auto;
  max-height: 20px;
  display: block;
}

.filters-toggle:hover {
  background: #2a2a2a;
}

.filters {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 6vw 16px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.4s ease-out, opacity 0.35s ease-out,
    padding 0.3s ease, border-color 0.25s ease;
}

.filters:not(.is-collapsed) {
  max-height: 140px;
  opacity: 1;
  overflow: visible;
  animation: filtersEnter 0.4s ease-out;
}

@keyframes filtersEnter {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filters.is-collapsed {
  padding-top: 0;
  padding-bottom: 0;
  border-top-color: transparent;
}

.filters__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.filters__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.filters__date-wrap {
  position: relative;
  min-width: 0;
  width: 100%;
  padding: 0;
  margin: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.filters__date-trigger {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 4px;
  font-size: 0.95rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: inherit;
  flex: 1;
  box-sizing: border-box;
}

.filters__date-trigger::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid rgba(255, 255, 255, 0.6);
  margin-left: 8px;
  transition: transform 0.2s ease;
}

.filters__date-wrap.is-open .filters__date-trigger::after {
  transform: rotate(180deg);
}

.filters__date-fields {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  min-width: 320px;
  height: auto;
  margin: 4px 0 0 0;
  padding: 1rem;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  flex-wrap: wrap;
  gap: 10px;
  z-index: 100;
  box-sizing: border-box;
}

.filters__date-wrap.is-open .filters__date-fields {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.filters__date-fields input {
  flex: 1 1 120px;
  min-width: 120px;
  padding: 8px 10px;
  font-size: 0.9rem;
  box-sizing: border-box;
}

.filters input,
.filters select {
  width: 100%;
  padding: 10px 12px;
  background: #161616;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 4px;
  font-size: 0.95rem;
  font-family: "Roboto", "Helvetica Neue", Arial, sans-serif;
}

.filters input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.gallery {
  position: relative;
  display: block;
  gap: 0;
  padding: 24px 16px 64px;
  max-width: none;
  margin: 0;
}

.card {
  background: #161616;
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: absolute;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  cursor: pointer;
}

.card.is-loaded {
  opacity: 1;
  transform: translateY(0);
}

.card.is-landscape {
  grid-column: span 2;
}

.card.is-landscape-wide {
  grid-column: span 2;
}

.card.is-portrait-tall .card__media {
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.card__media {
  width: 100%;
  height: auto;
}

.card__body {
  display: none;
}

.card__title {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
}

.card__description {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 999;
  padding: 0;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 2rem;
  background: transparent;
  color: #fff;
  border: none;
  cursor: pointer;
  z-index: 3;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.lightbox__content {
  display: inline-grid;
  grid-template-rows: 1fr auto;
  max-width: 100%;
  max-height: 100%;
  position: relative;
}

.lightbox__image {
  width: auto;
  height: auto;
  max-width: 100vw;
  max-height: calc(100vh - 72px);
  object-fit: contain;
  border-radius: 0;
  background: #0d0d0d;
}

.lightbox__meta {
  width: 100%;
  background: #fff;
  color: #111;
  padding: 12px 16px;
}

.lightbox__title {
  margin: 0 0 4px;
  font-size: 1rem;
}

.lightbox__description {
  margin: 0;
  color: rgba(17, 17, 17, 0.75);
}

.lightbox__nav {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.08s ease;
}

.lightbox__nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  padding: 0 10px;
}

.lightbox__nav-zone--prev {
  left: 0;
}

.lightbox__nav-zone--next {
  right: 0;
}

.lightbox__nav-zone:hover .lightbox__nav,
.lightbox__nav:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox__prev {
  transform: translateX(0);
}

.lightbox__next {
  transform: translateX(0);
}

.site-footer {
  background: #fff;
  color: #111;
  border-top: 1px solid #e3e3e3;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  padding: 22px 6vw;
}

.site-footer__col {
  padding: 0 18px;
  border-right: 1px solid #e3e3e3;
  min-height: 120px;
}

.site-footer__col:last-child {
  border-right: none;
}

.site-footer__col--right {
  position: relative;
}

.site-footer h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
}

.site-footer p {
  margin: 0 0 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  color: #111;
}

.site-footer__links {
  margin-bottom: 16px;
}

.site-footer__links a {
  color: #111;
  text-decoration: none;
}

.site-footer__links a:visited {
  color: #111;
}

.site-footer__links a:hover {
  text-decoration: underline;
}

.site-footer__copyright {
  font-size: 0.75rem;
  color: #555;
}

.site-footer__credit {
  font-size: 0.75rem;
  color: #555;
  text-align: right;
}

@media (max-width: 640px) {
  .site-footer__inner {
    grid-template-columns: 1fr;
    padding: 18px 6vw;
  }

  .site-footer__col {
    border-right: none;
    border-bottom: 1px solid #e3e3e3;
    padding: 12px 0;
  }

  .site-footer__col:last-child {
    border-bottom: none;
  }

  .site-footer__credit {
    text-align: left;
  }

  .lightbox__nav {
    width: 36px;
    height: 36px;
    font-size: 1.6rem;
  }
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: 1fr;
    padding: 24px 16px 64px;
  }

  .card.is-landscape {
    grid-column: span 1;
  }

  .card.is-landscape-wide {
    grid-column: span 1;
  }

  .site-header__inner {
    flex-direction: row;
    align-items: center;
    flex-wrap: nowrap;
    padding: 12px 4vw;
    gap: 12px;
  }

  .site-nav {
    flex: 1 1 auto;
    justify-content: center;
    gap: 4px;
    font-size: 0.8rem;
  }

  .filters-toggle {
    padding: 6px 10px;
  }

  .filters-toggle img {
    max-height: 22px;
  }

  .site-logo__img {
    max-width: 140px;
  }

  .site-logo {
    height: 28px;
  }

  .filters:not(.is-collapsed) {
    max-height: 200px;
  }

  .filters__row {
    grid-template-columns: 1fr;
  }
}
