.gallery-hero {
  position: relative;
  height: calc(100vh - var(--header-height));
  height: calc(100svh - var(--header-height));
  min-height: 620px;
  overflow: hidden;
  color: #f5f5f2;
  background: #08090b;
  isolation: isolate;
}

.gallery-hero-stage {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background:
    radial-gradient(60% 58% at 50% 47%, rgb(255 255 255 / 3.5%), transparent 72%),
    #08090b;
  isolation: isolate;
}

.gallery-hero-stage::after {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  content: "";
  opacity: .22;
  background-image: linear-gradient(115deg, rgb(255 255 255 / 2.5%), transparent 24%, transparent 76%, rgb(255 255 255 / 1.8%));
  mix-blend-mode: screen;
}

.gallery-hero-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 480ms ease;
  pointer-events: none;
}

.gallery-hero-canvas--back { z-index: 1; }
.gallery-hero-canvas--front { z-index: 3; }

.gallery-hero.is-gallery-ready .gallery-hero-canvas {
  opacity: 1;
}

.hero .gallery-hero-title {
  position: absolute;
  inset: auto;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  gap: .06em;
  width: min(88vw, 1280px);
  color: #f5f5f2;
  font-size: clamp(48px, 5.9vw, 100px);
  font-weight: 450;
  line-height: 1.02;
  letter-spacing: -.03em;
  text-align: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.gallery-hero-title span,
.gallery-hero-title strong {
  display: block;
  white-space: nowrap;
}

.gallery-hero-title span {
  color: #81868f;
  font-weight: inherit;
}

.gallery-hero-title strong {
  color: #f7f7f4;
  font-weight: inherit;
}

.gallery-hero-bottomline {
  position: absolute;
  left: 50%;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--max-width));
  padding-inline: var(--page-gutter);
  font-family: "Inter", "Alimama FangYuan", sans-serif;
  font-size: 13px;
  font-weight: 520;
  line-height: 1.35;
  letter-spacing: .055em;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.gallery-hero-bottomline {
  bottom: clamp(22px, 4.4vh, 48px);
  color: #c5c8cd;
}

.gallery-hero-bottomline p {
  max-width: 38em;
}

.gallery-hero-bottomline a {
  display: inline-flex;
  gap: .75em;
  align-items: center;
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 999px;
  color: #f5f5f2;
  background: rgb(255 255 255 / 8%);
  letter-spacing: .02em;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.gallery-hero-bottomline a .pixel-arrow {
  flex: none;
  width: 18px;
  height: 18px;
}

.gallery-hero-bottomline a:is(:hover, :focus-visible) .pixel-arrow svg {
  transform: translateX(3px);
}

.gallery-hero-bottomline a:hover,
.gallery-hero-bottomline a:focus-visible {
  border-color: rgb(255 255 255 / 44%);
  background: rgb(255 255 255 / 10%);
  transform: translateY(-2px);
}

.gallery-hero-bottomline a:focus-visible {
  outline: 2px solid #4d7dff;
  outline-offset: 3px;
}

.gallery-hero-fallback {
  --fallback-radius: min(31vw, 34vh);
  --fallback-tile: clamp(92px, 11.5vw, 178px);
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 1;
  transition: opacity 360ms ease;
  pointer-events: none;
}

.gallery-hero.is-gallery-ready .gallery-hero-fallback {
  opacity: 0;
}

.gallery-hero-fallback img {
  --angle: calc(var(--item) * 30deg + 24deg);
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--fallback-tile);
  aspect-ratio: 1;
  max-width: none;
  object-fit: cover;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 16%;
  filter: saturate(.72) brightness(.72);
  transform: translate(-50%, -50%) rotate(var(--angle)) translateX(var(--fallback-radius)) rotate(90deg);
}

.gallery-hero-fallback img:nth-child(1) { --item: 0; }
.gallery-hero-fallback img:nth-child(2) { --item: 1; }
.gallery-hero-fallback img:nth-child(3) { --item: 2; }
.gallery-hero-fallback img:nth-child(4) { --item: 3; }
.gallery-hero-fallback img:nth-child(5) { --item: 4; }
.gallery-hero-fallback img:nth-child(6) { --item: 5; }
.gallery-hero-fallback img:nth-child(7) { --item: 6; }
.gallery-hero-fallback img:nth-child(8) { --item: 7; }
.gallery-hero-fallback img:nth-child(9) { --item: 8; }
.gallery-hero-fallback img:nth-child(10) { --item: 9; }
.gallery-hero-fallback img:nth-child(11) { --item: 10; }
.gallery-hero-fallback img:nth-child(12) { --item: 11; }

@media (max-width: 760px) {
  .gallery-hero {
    min-height: 0;
  }

  .hero .gallery-hero-title {
    width: calc(100% - 28px);
    gap: .08em;
    font-size: clamp(27px, 7.7vw, 36px);
    line-height: 1.06;
    letter-spacing: -.025em;
  }

  .gallery-hero-bottomline {
    font-size: 12px;
  }

  .gallery-hero-bottomline {
    bottom: 18px;
    gap: 12px;
    align-items: flex-end;
  }

  .gallery-hero-bottomline p {
    max-width: 17em;
    color: #b9bdc5;
    line-height: 1.5;
    letter-spacing: 0;
  }

  .gallery-hero-bottomline a {
    flex: none;
    min-height: 44px;
    padding-inline: 14px;
    font-size: 12px;
    white-space: nowrap;
  }

  .gallery-hero-fallback {
    --fallback-radius: min(38vw, 26vh);
    --fallback-tile: clamp(68px, 23vw, 96px);
  }

  .gallery-hero-fallback img {
    border-radius: 14%;
  }

}

@media (max-width: 360px) {
  .hero .gallery-hero-title {
    font-size: 26px;
  }

  .gallery-hero-bottomline p {
    max-width: 14em;
  }

  .gallery-hero-bottomline a {
    padding-inline: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-hero-canvas,
  .gallery-hero-fallback,
  .gallery-hero-bottomline a {
    transition: none;
  }
}
