*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #f2f1ec;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 1120px;
  margin: 0 auto;
  padding: 18px 22px 42px;
  overflow-x: hidden;
}

.site-header {
  margin-bottom: 22px;
  border-bottom: 1px solid #c7c6bf;
  padding-bottom: 14px;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  gap: 24px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 11px;
  line-height: 1.5;
}

.header-left {
  color: #666;
}

.header-center {
  text-align: center;
  color: #111;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.header-right {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
}

.header-right a {
  color: #444;
}

.header-right a:hover {
  color: #111;
}

.section-label,
.caption,
.footer {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  line-height: 1.6;
}

.section-label,
.footer {
  color: #666;
}

.archive-grid {
  display: grid;
  gap: 26px;
}

.item {
  position: relative;
}

.gallery {
  width: 100%;
  overflow: hidden;
  position: relative;
  cursor: none;
  touch-action: pan-y;
  user-select: none;
}

.gallery::after {
  content: "";
  position: absolute;
  left: var(--cursor-x, 50%);
  top: var(--cursor-y, 50%);
  width: 28px;
  height: 28px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 24px 24px;
}

.gallery.show-cursor::after {
  opacity: 1;
}

.gallery.cursor-left::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='15,6 8,12 15,18' fill='%23111' fill-opacity='0.4'/></svg>");
}

.gallery.cursor-right::after {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><polygon points='9,6 16,12 9,18' fill='%23111' fill-opacity='0.4'/></svg>");
}

.gallery.is-dragging::after {
  opacity: 0;
}

.gallery-track {
  display: flex;
  align-items: center;
  gap: 20px;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

.gallery .slide {
  flex: 0 0 100%;
  min-width: 100%;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.gallery .frame {
  width: 100%;
  min-height: 82.6vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.gallery .frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 82.6vh;
  margin: 0 auto;
  object-fit: contain;
  pointer-events: none;
}

.gallery .caption {
  position: static;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: min(100%, 860px);
  margin: 4px auto 0;
  text-align: left;
  align-items: flex-start;
  color: #111;
  text-shadow: none;
  pointer-events: none;
}

.caption .cap-title {
  font-weight: 600;
  color: #111;
}

.caption .cap-meta {
  font-weight: 400;
  opacity: 0.7;
  color: #111;
}

.info {
  margin-top: 28px;
  text-align: left;
}

.info p {
  margin: 8px 0 18px;
  max-width: 720px;
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
  line-height: 1.5;
  color: #111;
}

.contact-link {
  display: inline-block;
  margin-top: 4px;
}

.footer {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

@media (min-width: 900px) {
  .archive-grid {
    gap: 42px;
  }
}

@media (max-width: 700px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .header-center {
    text-align: left;
  }

  .header-right {
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 18px 14px 42px;
  }

  .gallery {
    cursor: auto;
  }

  .gallery::after {
    display: none;
  }

  .gallery-track {
    gap: 0;
  }

  .gallery .slide {
    flex: 0 0 100%;
    min-width: 100%;
    width: 100%;
  }

  .gallery .frame {
    width: 100%;
    min-height: auto;
    padding: 0 10px;
    display: flex;
    align-items: flex-end;
  }

  .gallery .frame img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 84vh;
    margin-bottom: 0;
  }

  .gallery .caption {
    width: 100%;
    margin-top: 2px;
    text-align: left;
    align-items: flex-start;
    font-size: 9px;
  }

  .archive-grid .item:last-child img {
    margin-bottom: 20px;
  }
}

@media (min-width: 481px) {
  .gallery {
    position: relative;
  }

  .gallery-track {
    position: relative;
  }

.gallery .slide {
  transition: opacity 0.06s linear;
}

  .gallery .slide:not(.is-active) {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
  }

  .gallery .slide.is-active {
    position: relative;
    opacity: 1;
    z-index: 2;
  }

  /* FLASH EFFECT (simple + reliable) */
@media (min-width: 481px) {
  .gallery {
    position: relative;
    overflow: hidden;
  }

  /* remove brightness animation completely */
  .gallery.flash .slide.is-active {
    animation: none;
  }

  .gallery .slide .frame {
    position: relative;
    overflow: hidden;
  }

  /* WHITE FLASH ONLY ON FRAME */
  .gallery .slide .frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #fff;
    opacity: 0;
    pointer-events: none;
    z-index: 3;
  }

  .gallery.flash .slide.is-active .frame::before {
    animation: flashWhite 0.10s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  @keyframes flashWhite {
    0% {
      opacity: 0.95;
    }
    40% {
      opacity: 0.35;
    }
    100% {
      opacity: 0;
    }
  }
}
