.ryoku-hero-gallery {
  --ryoku-hero-bg: #f8f8f6;
  --ryoku-hero-grid-color: rgba(0, 0, 0, 0.06);
  --ryoku-hero-grid-size: 60px;
  --ryoku-hero-min-height: 520px;

  position: relative;
  width: 100%;
  height: 100vh;
  min-height: var(--ryoku-hero-min-height);
  overflow: hidden;
  background-color: var(--ryoku-hero-bg);
  background-image:
    linear-gradient(var(--ryoku-hero-grid-color) 1px, transparent 1px),
    linear-gradient(90deg, var(--ryoku-hero-grid-color) 1px, transparent 1px);
  background-size: var(--ryoku-hero-grid-size) var(--ryoku-hero-grid-size);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.ryoku-hero-gallery,
.ryoku-hero-gallery *,
.ryoku-hero-gallery *::before,
.ryoku-hero-gallery *::after {
  box-sizing: border-box;
}

.ryoku-hero-gallery__cards {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.ryoku-hero-gallery__card {
  position: absolute;
  z-index: 2;
  display: block;
  margin: 0;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.45);
  /* box-shadow: 0 2px 18px rgba(0, 0, 0, 0.10); */
}

.ryoku-hero-gallery .ryoku-hero-gallery__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  border: 0;
  object-fit: cover;
  opacity: 0;
  transform: scale(0);
  transition:
    transform var(--ryoku-image-transition-speed, 650ms) cubic-bezier(0.34, 1.45, 0.64, 1),
    opacity var(--ryoku-image-transition-speed, 650ms) ease;
}

.ryoku-hero-gallery .ryoku-hero-gallery__image.is-active {
  opacity: 1;
  transform: scale(1);
}

.ryoku-hero-gallery__gfx {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  animation: ryokuHeroGallerySpin 8s ease-in-out infinite;
  transform-origin: center center;
  will-change: transform;
}

.ryoku-hero-gallery--still .ryoku-hero-gallery__gfx {
  animation: none;
}

.ryoku-hero-gallery__gfx svg {
  display: block;
  width: 100%;
  height: 100%;
}

.ryoku-hero-gallery__gfx--green {
  left: 30%;
  top: 32%;
  width: 131px;
  height: 122px;
  animation-duration: 9s;
}

.ryoku-hero-gallery__gfx--pink {
  right: 25%;
  top: 26%;
  width: 141px;
  height: 127px;
  animation-duration: 7.5s;
  animation-delay: -3s;
}

.ryoku-hero-gallery__gfx--blue {
  left: -29px;
  top: 55%;
  width: 58px;
  height: 117px;
  animation-duration: 11s;
  animation-delay: -1.5s;
}

.ryoku-hero-gallery__gfx--purple {
  right: 2%;
  bottom: 2%;
  width: 148px;
  height: 70px;
  animation-duration: 8.5s;
  animation-delay: -5s;
}

@keyframes ryokuHeroGallerySpin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  33% {
    transform: rotate(120deg) scale(1.06);
  }

  66% {
    transform: rotate(240deg) scale(0.96);
  }

  100% {
    transform: rotate(360deg) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ryoku-hero-gallery__gfx {
    animation: none;
  }
}

@media (max-width: 1024px) {
  .ryoku-hero-gallery {
    --ryoku-hero-min-height: 620px;
  }

  .ryoku-hero-gallery__card:nth-child(1) {
    left: 3% !important;
    top: 8% !important;
    width: 25% !important;
    height: 30% !important;
  }

  .ryoku-hero-gallery__card:nth-child(2) {
    left: 34% !important;
    top: 5% !important;
    width: 22% !important;
    height: 18% !important;
  }

  .ryoku-hero-gallery__card:nth-child(3) {
    left: 61% !important;
    top: 8% !important;
    width: 34% !important;
    height: 22% !important;
  }

  .ryoku-hero-gallery__card:nth-child(4) {
    left: 68% !important;
    top: 36% !important;
    width: 27% !important;
    height: 36% !important;
  }

  .ryoku-hero-gallery__card:nth-child(5) {
    left: 35% !important;
    top: 32% !important;
    width: 24% !important;
    height: 22% !important;
  }

  .ryoku-hero-gallery__card:nth-child(6) {
    left: 3% !important;
    top: 48% !important;
    width: 31% !important;
    height: 36% !important;
  }

  .ryoku-hero-gallery__card:nth-child(7) {
    left: 37% !important;
    top: 62% !important;
    width: 27% !important;
    height: 28% !important;
  }

  .ryoku-hero-gallery__card:nth-child(8) {
    left: 67% !important;
    top: 77% !important;
    width: 26% !important;
    height: 17% !important;
  }
}

@media (max-width: 767px) {
  .ryoku-hero-gallery {
    --ryoku-hero-min-height: 680px;
  }

  .ryoku-hero-gallery__card:nth-child(1) {
    left: 4% !important;
    top: 5% !important;
    width: 40% !important;
    height: 22% !important;
  }

  .ryoku-hero-gallery__card:nth-child(2) {
    left: 51% !important;
    top: 8% !important;
    width: 40% !important;
    height: 16% !important;
  }

  .ryoku-hero-gallery__card:nth-child(3) {
    left: 13% !important;
    top: 31% !important;
    width: 74% !important;
    height: 17% !important;
  }

  .ryoku-hero-gallery__card:nth-child(4) {
    left: 56% !important;
    top: 52% !important;
    width: 36% !important;
    height: 30% !important;
  }

  .ryoku-hero-gallery__card:nth-child(5) {
    left: 6% !important;
    top: 53% !important;
    width: 42% !important;
    height: 17% !important;
  }

  .ryoku-hero-gallery__card:nth-child(6) {
    left: 5% !important;
    top: 75% !important;
    width: 43% !important;
    height: 20% !important;
  }

  .ryoku-hero-gallery__card:nth-child(7) {
    left: 52% !important;
    top: 84% !important;
    width: 38% !important;
    height: 13% !important;
  }

  .ryoku-hero-gallery__card:nth-child(8) {
    left: 52% !important;
    top: 71% !important;
    width: 38% !important;
    height: 10% !important;
  }

  .ryoku-hero-gallery__card--hide-mobile {
    display: none !important;
  }

  .ryoku-hero-gallery--mobile-compact .ryoku-hero-gallery__cards {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 20px 24px;
    width: 100%;
    height: 100%;
    padding: 36px;
  }

  .ryoku-hero-gallery--mobile-compact .ryoku-hero-gallery__card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    aspect-ratio: 1.34 / 1;
  }

  .ryoku-hero-gallery--mobile-compact .ryoku-hero-gallery__card:nth-child(3n) {
    aspect-ratio: 1 / 1.12;
  }

  .ryoku-hero-gallery--mobile-compact .ryoku-hero-gallery__card:nth-child(4n) {
    aspect-ratio: 1.65 / 1;
  }

  .ryoku-hero-gallery__gfx--green {
    left: 37%;
    top: 25%;
  }

  .ryoku-hero-gallery__gfx--pink {
    right: -10%;
    top: 35%;
  }

  .ryoku-hero-gallery__gfx--purple {
    right: -8%;
    bottom: 1%;
  }
}
