/* Scroll-triggered Animation (TECH:①) */
.scroll-reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.scroll-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delay */
.scroll-reveal:nth-child(1) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.5s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.6s; }

/* Slide in from left */
.slide-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.6s ease;
}

.slide-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Slide in from right */
.slide-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.6s ease;
}

.slide-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale animation */
.scale-in {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Micro Animations (TECH:⑨) */

/* Button hover effects */
.micro-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.micro-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.micro-btn:hover::before {
  left: 100%;
}

/* Link underline animation */
.link-underline {
  position: relative;
  text-decoration: none;
}

.link-underline::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.link-underline:hover::after {
  transform: scaleX(1);
}

/* Card lift animation */
.lift-card {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, box-shadow;
}

.lift-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* Icon spin animation */
.spin-icon {
  transition: transform 0.3s ease;
}

.spin-icon:hover {
  transform: rotate(360deg);
}

/* Pulse animation for important elements */
@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 165, 71, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(232, 165, 71, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(232, 165, 71, 0);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Bounce animation for CTAs */
@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    transform: translate3d(0,0,0);
  }
  40%, 43% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -8px, 0);
  }
  70% {
    animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
    transform: translate3d(0, -4px, 0);
  }
  90% {
    transform: translate3d(0, -2px, 0);
  }
}

.bounce:hover {
  animation: bounce 1s;
}

/* Image reveal animation */
.image-reveal {
  position: relative;
  overflow: hidden;
}

.image-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-main);
  transform: translateX(-100%);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 2;
}

.image-reveal.visible::before {
  transform: translateX(100%);
}

/* Text highlight animation */
.text-highlight {
  position: relative;
  display: inline-block;
}

.text-highlight::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
}

.text-highlight.visible::before {
  transform: scaleX(1);
}

/* Phone button special animation */
.phone-pulse {
  position: relative;
}

.phone-pulse::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  border: 2px solid var(--color-accent);
  border-radius: var(--radius);
  transform: translate(-50%, -50%);
  animation: phone-pulse 2s infinite;
}

@keyframes phone-pulse {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 0;
  }
}

/* Floating animation for decorative elements */
@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.float {
  animation: float 3s ease-in-out infinite;
}

/* Gradient text animation */
.gradient-text {
  background: linear-gradient(45deg, var(--color-main), var(--color-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Reveal animation for sections */
.section-reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Counter animation */
.counter {
  font-weight: 500;
  color: var(--color-accent);
}

/* Hover effects for interactive elements */
.interactive-icon {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.interactive-icon:hover {
  transform: scale(1.1) rotate(5deg);
  filter: brightness(1.2);
}

/* prefers-reduced-motion 対応 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .pulse, .bounce, .float, .gradient-text, .phone-pulse::after {
    animation: none !important;
  }
}