/* ========================================
   高度なヒーローセクション - データフローエフェクト
   ======================================== */

/* データグリッドパターン */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    animation: gridPulse 4s ease-in-out infinite;
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* データフローパーティクル */
.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    z-index: 2;
    animation: particleFlow 8s ease-in-out infinite;
}

@keyframes particleFlow {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    25% { 
        transform: translate(20px, -20px) scale(1.1);
        opacity: 0.7;
    }
    50% { 
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.6;
    }
    75% { 
        transform: translate(20px, 20px) scale(1.05);
        opacity: 0.8;
    }
}

/* デジタルサーキットライン */
.hero-infographic {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 3;
}

/* 複数のフローライン */
.hero-infographic::before,
.hero-infographic::after {
    content: '';
    position: absolute;
    width: 2px;
    height: 200px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(6, 182, 212, 0.8) 50%,
        transparent 100%
    );
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.6);
}

.hero-infographic::before {
    top: -200px;
    left: 20%;
    animation: flowLineVertical 6s linear infinite;
}

.hero-infographic::after {
    top: -200px;
    left: 80%;
    animation: flowLineVertical 6s linear infinite 3s;
}

@keyframes flowLineVertical {
    0% {
        transform: translateY(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 200px));
        opacity: 0;
    }
}

/* 横方向のフローライン */
.hero-content::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(16, 185, 129, 0.8) 50%,
        transparent 100%
    );
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.6);
    top: 30%;
    left: -300px;
    animation: flowLineHorizontal 8s linear infinite;
}

@keyframes flowLineHorizontal {
    0% {
        transform: translateX(0);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        transform: translateX(calc(100vw + 300px));
        opacity: 0;
    }
}

/* データノードの追加 */
.hero-feature {
    position: relative;
}

.hero-feature::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(6, 182, 212, 0.05) 50%,
        transparent 100%
    );
    border-radius: 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.hero-feature:hover::before {
    opacity: 1;
    animation: nodePulse 1.5s ease-in-out infinite;
}

@keyframes nodePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* アイコンバッジの強化されたグロー */
.icon-badge-blue,
.icon-badge-emerald,
.icon-badge-cyan {
    position: relative;
    overflow: visible;
}

.icon-badge-blue::before,
.icon-badge-emerald::before,
.icon-badge-cyan::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.icon-badge-blue::before {
    background: radial-gradient(
        circle,
        rgba(59, 130, 246, 0.4) 0%,
        transparent 70%
    );
}

.icon-badge-emerald::before {
    background: radial-gradient(
        circle,
        rgba(16, 185, 129, 0.4) 0%,
        transparent 70%
    );
}

.icon-badge-cyan::before {
    background: radial-gradient(
        circle,
        rgba(6, 182, 212, 0.4) 0%,
        transparent 70%
    );
}

.icon-badge-blue:hover::before,
.icon-badge-emerald:hover::before,
.icon-badge-cyan:hover::before {
    opacity: 1;
    animation: iconGlow 2s ease-in-out infinite;
}

@keyframes iconGlow {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* CTAボタンのデータフロー効果 */
.btn-primary {
    position: relative;
    overflow: hidden;
}

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

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

/* スクロールインジケーターの強化 */
.scroll-indicator {
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 40px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        rgba(6, 182, 212, 0.6) 100%
    );
    animation: scrollLineExtend 2s ease-in-out infinite;
}

@keyframes scrollLineExtend {
    0%, 100% {
        height: 20px;
        opacity: 0.4;
    }
    50% {
        height: 50px;
        opacity: 1;
    }
}

/* データコネクションライン（特徴カード間） */
@media (min-width: 992px) {
    .hero-features {
        position: relative;
    }
    
    .hero-features::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 33.33%;
        width: 33.33%;
        height: 2px;
        background: linear-gradient(
            90deg,
            rgba(6, 182, 212, 0.3) 0%,
            rgba(16, 185, 129, 0.3) 50%,
            rgba(6, 182, 212, 0.3) 100%
        );
        animation: connectionPulse 3s ease-in-out infinite;
        z-index: -1;
    }
    
    @keyframes connectionPulse {
        0%, 100% {
            opacity: 0.3;
            transform: scaleX(0.95);
        }
        50% {
            opacity: 0.7;
            transform: scaleX(1);
        }
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .hero-bg::before {
        background-size: 30px 30px;
    }
    
    .hero-infographic::before,
    .hero-infographic::after {
        display: none;
    }
    
    .hero-content::before {
        width: 150px;
        animation-duration: 6s;
    }
}

/* パフォーマンス最適化 */
@media (prefers-reduced-motion: reduce) {
    .hero-bg::before,
    .hero-bg::after,
    .hero-infographic::before,
    .hero-infographic::after,
    .hero-content::before,
    .hero-feature::before,
    .icon-badge-blue::before,
    .icon-badge-emerald::before,
    .icon-badge-cyan::before,
    .btn-primary::before,
    .scroll-indicator::before,
    .hero-features::before {
        animation: none;
        transition: none;
    }
}
