@charset "UTF-8";


html:has(.gallery-page) {
  animation: none;
  background-color: var(--black);
}


.galhead {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 4vw, 48px);
  min-height: calc(52svh - 56px);
  padding: clamp(96px, 12vh, 160px) var(--gutter) calc(clamp(28px, 4vw, 48px) - 16px);
}

.galhead__logo {
  width: 160px;
  margin: 0;
  line-height: 0;
}

.galhead__logo img { width: 100%; height: auto; }

.galhead__logo a {
  display: block;
  opacity: 0.92;
  transition: opacity 0.6s ease;
}

.galhead__logo a:hover,
.galhead__logo a:focus-visible { opacity: 1; }

.galindex {
  position: sticky;
  top: 0;
  z-index: 5;
  padding: 16px var(--gutter);
  background-color: var(--black);
}

.galindex__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(20px, 3vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.34em;
}

.galindex__list li { position: relative; }

.galindex__list li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(clamp(20px, 3vw, 40px) / -2);
  width: 1px;
  height: 1em;
  translate: 0 -50%;
  background-color: var(--paper);
  opacity: 0.22;
}

.galindex__list a {
  display: block;
  padding-bottom: 6px;
  opacity: 0.8;
  border-bottom: 1px solid transparent;
  transition: opacity 0.6s ease, border-color 0.6s ease;
}

.galindex__list a:hover,
.galindex__list a:focus-visible {
  opacity: 1;
  border-bottom-color: var(--akatsuki);
}


.gal {
  scroll-margin-top: 72px;
  padding-top: clamp(64px, 10vh, 132px);
}

.gal__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 clamp(16px, 2.4vw, 32px);
  padding: 0 var(--gutter) clamp(20px, 3vh, 32px);
}

.gal__rule {
  flex: 0 0 auto;
  width: clamp(28px, 5vw, 72px);
  height: 1px;
  translate: 0 -0.34em;
  background-color: var(--akatsuki);
  opacity: 0.85;
}

.gal__title {
  margin: 0;
  font-size: clamp(15px, 1.5vw, 18px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.4em;
}

.gal__note {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.22em;
  opacity: 0.8;
}


.gal__grid {
  --gal-row: clamp(200px, 21vw, 460px);
  position: relative;
  display: flex;
  flex-wrap: wrap;
  background-color: var(--sumi-light);
}

.gal__item {
  position: relative;
  margin: 0;
  min-width: 0;
  overflow: hidden;
  flex: var(--ar) 1 calc(var(--ar) * var(--gal-row));
}

.gal__item img,
.gal__item picture {
  display: block;
  width: 100%;
  height: auto;
}

.gal__grid.is-packed .gal__item {
  position: absolute;
  top: 0;
  left: 0;
  flex: none;
}

.gal__grid.is-packed .gal__item picture,
.gal__grid.is-packed .gal__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (prefers-reduced-motion: no-preference) {
  .gal-anim .gal__grid {
    opacity: 0;
    transition: opacity 1.4s ease;
  }
  .gal-anim .gal__grid.is-seen { opacity: 1; }
}


.gal__item { cursor: zoom-in; }

.gal__item:focus-visible {
  z-index: 1;
  outline: 1px solid var(--akatsuki);
  outline-offset: -1px;
}

html.lightbox-open { overflow: hidden; }

html.lightbox-open .totop {
  opacity: 0;
  visibility: hidden;
  transition: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background-color: rgba(0, 0, 0, 0.97);
}

.lightbox[hidden] { display: none; }

.lightbox__figure {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 2vh, 20px);
}

.lightbox__stage {
  position: relative;
  line-height: 0;
  max-width: 100%;
  overflow: clip;
}

.lightbox__photo {
  overflow: hidden;
}

.lightbox__img {
  display: block;
  max-width: 100%;
  max-height: 82svh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.lightbox__edge {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  opacity: 0;
  pointer-events: none;
}

.lightbox__edge--left {
  left: 0;
  border-right: 1px solid var(--akatsuki);
}

.lightbox__edge--right {
  left: 50%;
  border-left: 1px solid var(--akatsuki);
}

.lightbox__caption {
  margin: 0;
  max-width: 60ch;
  font-size: 13px;
  line-height: 1.9;
  letter-spacing: 0.16em;
  text-align: center;
  color: var(--paper);
  opacity: 0.8;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  color: var(--paper);
  cursor: pointer;
  opacity: 0.66;
  transition: opacity 0.4s ease;
}

.lightbox__close svg,
.lightbox__prev svg,
.lightbox__next svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.75));
}

.lightbox__close:hover,
.lightbox__close:focus-visible,
.lightbox__prev:hover,
.lightbox__prev:focus-visible,
.lightbox__next:hover,
.lightbox__next:focus-visible { opacity: 1; }

.lightbox__close { top: 10px; right: 10px; }

.lightbox__prev,
.lightbox__next {
  top: 50%;
  translate: 0 -50%;
}

.lightbox__prev { left: 10px; }
.lightbox__next { right: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .lightbox {
    opacity: 0;
    transition: opacity 0.4s ease;
  }

  .lightbox.is-open {
    opacity: 1;
    transition: opacity 0.6s ease;
  }

  @keyframes lb-seam-draw {
    from { scale: 1 0; }
    to   { scale: 1 1; }
  }
  @keyframes lb-seam-left {
    from { translate: 0 0; }
    to   { translate: -100% 0; }
  }
  @keyframes lb-seam-right {
    from { translate: 0 0; }
    to   { translate: 100% 0; }
  }
  @keyframes lb-seam-show {
    0%, 80% { opacity: 1; }
    100%    { opacity: 0; }
  }
  @keyframes lb-slit {
    from { clip-path: inset(0 50% 0 50%); }
    to   { clip-path: inset(0 0 0 0); }
  }
  @keyframes lb-shut {
    from { clip-path: inset(0 0 0 0); }
    to   { clip-path: inset(0 50% 0 50%); }
  }
  @keyframes lb-settle {
    from { scale: 1.14; }
    to   { scale: 1; }
  }
  @keyframes lb-ui {
    from { opacity: 0; }
    to   { opacity: 0.66; }
  }
  @keyframes lb-caption {
    from { opacity: 0; translate: 0 6px; }
    to   { opacity: 0.8; translate: 0 0; }
  }

  .lightbox__photo {
    clip-path: inset(0 50% 0 50%);
  }

  .lightbox.is-revealed .lightbox__photo {
    animation: lb-slit 0.7s var(--ease-door) 0.55s both;
  }

  .lightbox.is-revealed .lightbox__photo .lightbox__img {
    animation: lb-settle 0.7s var(--ease-door) 0.55s both;
  }

  .lightbox.is-closing .lightbox__photo {
    animation: lb-shut 0.4s var(--ease-door) both;
  }

  .lightbox.is-revealed .lightbox__edge {
    transform-origin: 50% 0;
    animation:
      lb-seam-show 1.25s linear 0s both,
      lb-seam-draw 0.35s cubic-bezier(0.65, 0, 0.2, 1) 0.2s both,
      lb-seam-left 0.7s var(--ease-door) 0.55s both;
  }
  .lightbox.is-revealed .lightbox__edge--right {
    animation-name: lb-seam-show, lb-seam-draw, lb-seam-right;
  }

  .lightbox__caption { transition: opacity 0.4s ease; }

  .lightbox:not(.is-revealed) .lightbox__caption,
  .lightbox:not(.is-revealed) .lightbox__close,
  .lightbox:not(.is-revealed) .lightbox__prev,
  .lightbox:not(.is-revealed) .lightbox__next { opacity: 0; }

  .lightbox.is-revealed .lightbox__close,
  .lightbox.is-revealed .lightbox__prev,
  .lightbox.is-revealed .lightbox__next {
    animation: lb-ui 0.6s ease 1.05s backwards;
  }

  .lightbox.is-revealed .lightbox__caption {
    animation: lb-caption 0.7s ease 1.05s backwards;
  }

  .lightbox__img { transition: opacity 0.5s ease; }
  .lightbox.is-loading .lightbox__img { opacity: 0; transition: none; }
}


@media (max-width: 900px) {
  .gal__grid { --gal-row: 34vw; }
}

@media (max-width: 560px) {
  .gal__grid { --gal-row: 62vw; }
}

@media (max-width: 767px) {
  .galhead { min-height: calc(46svh - 56px); padding-bottom: 8px; }
  .galhead__logo { width: 120px; }
  .galindex__list { font-size: 13px; letter-spacing: 0.28em; gap: 18px; }
  .galindex__list li:not(:last-child)::after { right: -9px; }
  .gal { padding-top: clamp(48px, 8vh, 80px); }
  .gal__head { gap: 6px clamp(14px, 3vw, 24px); }
  .gal__note { font-size: 12px; letter-spacing: 0.18em; }
}
