/* ========================================
   Animations CSS
   ======================================== */

/* Fade In Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation for Cards */
.workflow-card,
.pricing-card,
.note-item,
.timeline-item,
.vocaduet-card,
.music-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 0.6s ease forwards;
}

.workflow-card:nth-child(1) { animation-delay: 0.1s; }
.workflow-card:nth-child(2) { animation-delay: 0.2s; }
.workflow-card:nth-child(3) { animation-delay: 0.3s; }
.workflow-card:nth-child(4) { animation-delay: 0.4s; }

.pricing-card:nth-child(1) { animation-delay: 0.1s; }
.pricing-card:nth-child(2) { animation-delay: 0.15s; }
.pricing-card:nth-child(3) { animation-delay: 0.2s; }
.pricing-card:nth-child(4) { animation-delay: 0.25s; }
.pricing-card:nth-child(5) { animation-delay: 0.3s; }
.pricing-card:nth-child(6) { animation-delay: 0.35s; }

.note-item:nth-child(1) { animation-delay: 0.05s; }
.note-item:nth-child(2) { animation-delay: 0.1s; }
.note-item:nth-child(3) { animation-delay: 0.15s; }
.note-item:nth-child(4) { animation-delay: 0.2s; }
.note-item:nth-child(5) { animation-delay: 0.25s; }
.note-item:nth-child(6) { animation-delay: 0.3s; }
.note-item:nth-child(7) { animation-delay: 0.35s; }
.note-item:nth-child(8) { animation-delay: 0.4s; }
.note-item:nth-child(9) { animation-delay: 0.45s; }
.note-item:nth-child(10) { animation-delay: 0.5s; }
.note-item:nth-child(11) { animation-delay: 0.55s; }
.note-item:nth-child(12) { animation-delay: 0.6s; }

/* Hero Animation */
.hero-title {
    animation: fadeInScale 1s ease forwards;
}

.hero-description {
    animation: fadeIn 1s ease 0.2s forwards;
    opacity: 0;
}

.hero-buttons {
    animation: fadeIn 1s ease 0.4s forwards;
    opacity: 0;
}

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

.hero-image {
    animation: float 6s ease-in-out infinite;
}

/* Glow Pulse Animation */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.6);
    }
}

.btn-primary {
    animation: glowPulse 2s ease-in-out infinite;
}

/* Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.hero-title-main,
.section-title,
.page-title {
    background-size: 200% auto;
    animation: shimmer 8s linear infinite;
}

/* Page Transition */
@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageEnter 0.5s ease;
}

/* Particle Animation */
@keyframes particleFloat {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-20px) translateX(10px);
    }
    50% {
        transform: translateY(-40px) translateX(-10px);
    }
    75% {
        transform: translateY(-20px) translateX(5px);
    }
}

/* Glass Reflection Effect */
@keyframes glassReflection {
    0% {
        transform: translateX(-100%) skewX(-20deg);
    }
    100% {
        transform: translateX(200%) skewX(-20deg);
    }
}

/* Loading States */
@keyframes skeletonLoading {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, var(--color-glass) 25%, rgba(255, 255, 255, 0.05) 50%, var(--color-glass) 75%);
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
}

/* Rotate on Hover */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Border Animation */
@keyframes borderGlow {
    0%, 100% {
        border-color: var(--color-glass-border);
    }
    50% {
        border-color: var(--color-primary);
    }
}

.animate-border {
    animation: borderGlow 3s ease-in-out infinite;
}

/* Text Glow */
@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(0, 217, 255, 0.8);
    }
}

.workflow-number {
    animation: textGlow 2s ease-in-out infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 20px; /* 位置が低すぎたら 40px に戻してください */
    left: 50%;
    transform: translateX(-50%); /* 再度これを使いますが、JS対策を施します */
    
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* テキストと線の間隔 */
    opacity: 0.6;
    z-index: 10;
    pointer-events: none; /* ボタンの邪魔をしないように */
}

/* Smooth Page Load */
.section {
    opacity: 0;
    animation: fadeIn 0.8s ease forwards;
}

.section:nth-child(1) { animation-delay: 0s; }
.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }
.section:nth-child(6) { animation-delay: 0.5s; }

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
