/**
 * ページパーツで読み込むとSmoooothの設定画面で動作しなくなってしまうスタイルをまとめたCSS
 * フッターなどで読み込みます
 */

/**
 * header
 */
.header-nav__content {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-80px);

  &.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0px);
  }
}

/**
 * Dialog
 */
.dialog {
  & .dialog__content-wrapper {
    position: fixed;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
  }

  & .dialog__content {
    position: fixed;
    top: 10vh;
    left: 50%;
    transform: translateX(-50%);
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    z-index: 101;

    & img {
      display: none !important;
    }
  }

  & .dialog__layer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0 0 0 / 50%);
    z-index: 100;
  }

  &.open {
    & .dialog__content-wrapper {
      opacity: 1;
      pointer-events: auto;
    }

    & .dialog__content {
      & img {
        display: block !important;
      }
    }
  }
}

@keyframes pulse {
  0% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

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

.loading-spinner {
  position: fixed;
  background: var(--ink);
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition-property: opacity, visibility;
  transition-duration: 450ms;
  transition-timing-function: ease;

  & img {
    animation: pulse 3s ease-in-out infinite;
    width: 320px;
    max-width: 80vw;
  }

  & .spinner {
    animation: spin 3s linear infinite;
    width: 4rem;
    height: 4rem;
    border-radius: 9999px;
    border: 1px solid rgba(0 0 0 / 20%);
    border-top-color: var(--ink);
  }

  &.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
}

.page-hero .page-hero__marquee-container {
  overflow: hidden;
}
.home-hero .home-hero__marquee-text {
  overflow: hidden;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

@keyframes rotate-infinite {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes soft-bounce {
  0% {
    transform: translateY(0) scale(1, 1);
  }
  10% {
    transform: translateY(-20px) scale(0.98, 1.02); 
    animation-timing-function: ease-in;
  }
  20% {
    transform: translateY(0) scale(1.03, 0.97);
  }
  25% {
    transform: translateY(0) scale(0.99, 1.01);
  }
  30%, 100% {
    transform: translateY(0) scale(1, 1);
  }
}

@keyframes animal-swing {
  0% { transform: rotate(0deg); }

  5% { transform: rotate(15deg); animation-timing-function: ease-out; }
  15% { transform: rotate(-15deg); animation-timing-function: ease-in-out; }

  25% { transform: rotate(8deg); animation-timing-function: ease-out; }
  35% { transform: rotate(-8deg); animation-timing-function: ease-in-out; }

  45% { transform: rotate(3deg); animation-timing-function: ease-out; }
  55% { transform: rotate(-3deg); animation-timing-function: ease-in-out; }

  60%, 100% {
    transform: rotate(0deg);
  }
}

.fade-in {
  opacity: 0;
  pointer-events: none;
  &.active {
    &.bg-paint {
      pointer-events: auto;
      animation: splat-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
      will-change: transform, opacity;
      animation-delay: 0.2s;
    }
  }
}

@keyframes splat-in {
  0% {
    transform: scale(0) rotate(-10deg);
    opacity: 0;
  }
  70% {
    transform: scale(1.1) rotate(5deg);
    opacity: 1;
  }
  85% {
    transform: scale(0.95) rotate(-2deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.bound-item {
  animation: continuous-bound-loop 0.8s ease-in-out infinite;
  transform-origin: center bottom;
  will-change: transform;
  display: block;
}

@keyframes continuous-bound-loop {
  0%, 100% {
    transform: translateY(0) scale(1, 1);
    animation-timing-function: cubic-bezier(0.1, 0.9, 0.2, 1);
  }
  40% {
    transform: translateY(-25px) scale(0.95, 1.05);
    animation-timing-function: cubic-bezier(0.9, 0.1, 0.8, 0.2);
  }
  85% {
    transform: translateY(0) scale(1.1, 0.9);
  }
}

.swing-permanent {
  animation: permanent-swing 2s infinite;
  transform-origin: center center;
  will-change: transform;
  display: inline-block;
  &.delay-500 {
    animation-delay: 500ms;
  }
}

@keyframes permanent-swing {
  0% {
    transform: rotate(-1.5deg);
    animation-timing-function: ease-in-out;
  }
  50% {
    transform: rotate(1.5deg);
    animation-timing-function: ease-in-out;
  }
  100% {
    transform: rotate(-1.5deg);
  }
}

@keyframes permanent-swing--bubble {
  0% {
    transform: rotate(-1.5deg) translateX(-50%);
    animation-timing-function: ease-in-out;
  }
  50% {
    transform: rotate(1.5deg) translateX(-50%);
    animation-timing-function: ease-in-out;
  }
  100% {
    transform: rotate(-1.5deg) translateX(-50%);
  }
  @media (min-width: 768px) {
    0% {
      transform: rotate(-1.5deg);
      animation-timing-function: ease-in-out;
    }
    50% {
      transform: rotate(1.5deg);
      animation-timing-function: ease-in-out;
    }
    100% {
      transform: rotate(-1.5deg);
    }
  }
}








