/**
 * Hero Text Particle Animation
 * 光の粒子が集まって文字になるアニメーション
 */

/* 基本のフェードイン・スケールアニメーション */
@keyframes particleGather {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
        filter: blur(4px);
    }
    60% {
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        filter: blur(0);
    }
}

/* 粒子の背景パターン */
@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0);
        opacity: 0.3;
    }
    25% {
        transform: translate(10px, -10px);
        opacity: 0.5;
    }
    50% {
        transform: translate(-5px, -20px);
        opacity: 0.7;
    }
    75% {
        transform: translate(-15px, -10px);
        opacity: 0.5;
    }
}

/* メインのh1アニメーション */
.hero-text-animated {
    animation: particleGather 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
}

/* 各文字要素は遅延なしで同時に表示 */
.hero-text-animated .char {
    display: inline-block;
}

/* パーティクル背景 */
.hero-text-particles {
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(103, 232, 249, 0.8), transparent);
    border-radius: 50%;
    animation: particleFloat 3s ease-in-out infinite;
    opacity: 0;
}

/* ランダムな位置と遅延 */
.particle:nth-child(1) { left: 10%; top: 20%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; top: 40%; animation-delay: 0.2s; }
.particle:nth-child(3) { left: 30%; top: 10%; animation-delay: 0.4s; }
.particle:nth-child(4) { left: 40%; top: 60%; animation-delay: 0.6s; }
.particle:nth-child(5) { left: 50%; top: 30%; animation-delay: 0.8s; }
.particle:nth-child(6) { left: 60%; top: 50%; animation-delay: 1s; }
.particle:nth-child(7) { left: 70%; top: 20%; animation-delay: 1.2s; }
.particle:nth-child(8) { left: 80%; top: 70%; animation-delay: 1.4s; }
.particle:nth-child(9) { left: 90%; top: 40%; animation-delay: 1.6s; }
.particle:nth-child(10) { left: 15%; top: 80%; animation-delay: 1.8s; }
.particle:nth-child(11) { left: 25%; top: 55%; animation-delay: 2s; }
.particle:nth-child(12) { left: 35%; top: 75%; animation-delay: 2.2s; }
.particle:nth-child(13) { left: 45%; top: 15%; animation-delay: 2.4s; }
.particle:nth-child(14) { left: 55%; top: 85%; animation-delay: 2.6s; }
.particle:nth-child(15) { left: 65%; top: 35%; animation-delay: 2.8s; }
.particle:nth-child(16) { left: 75%; top: 65%; animation-delay: 3s; }
.particle:nth-child(17) { left: 85%; top: 25%; animation-delay: 3.2s; }
.particle:nth-child(18) { left: 95%; top: 55%; animation-delay: 3.4s; }
.particle:nth-child(19) { left: 5%; top: 45%; animation-delay: 3.6s; }
.particle:nth-child(20) { left: 12%; top: 65%; animation-delay: 3.8s; }

/* サブタイトルのアニメーション */
.hero-subtitle-animated {
    opacity: 0;
    animation: particleGather 1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s forwards;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
    .hero-text-animated {
        animation-duration: 1.2s;
    }

    .hero-text-animated .char {
        animation-duration: 0.6s;
    }

    .particle {
        width: 3px;
        height: 3px;
    }
}
