/* ===================================
   Hero Section Background Effects
   =================================== */

/* Hero Section Base */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    background: #000;
    overflow: hidden;
}

/* グリッドアニメーション背景 */
.hero-grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 2s ease;
}

.hero-grid-bg.active {
    opacity: 1;
}

.grid-line {
    position: absolute;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.grid-line.horizontal {
    width: 100%;
    height: 1px;
    left: 0;
}

.grid-line.vertical {
    width: 1px;
    height: 100%;
    top: 0;
}

.grid-line.animate {
    background: rgba(102, 126, 234, 0.3);
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* フローティングパーティクル */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

/* 波エフェクト（下部） */
.hero-wave {
    position: absolute;
    bottom: -30px;
    left: 0;
    width: 100%;
    height: 150px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%23f5f5f5' fill-opacity='1' d='M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,133.3C672,117,768,107,864,122.7C960,139,1056,181,1152,186.7C1248,192,1344,160,1392,144L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease;
}

.hero-wave.active {
    opacity: 0.1;
}

/* グラデーションオーバーレイ */
.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center top, 
        rgba(102, 126, 234, 0.1) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity 3s ease;
}

.hero-gradient.active {
    opacity: 1;
}

/* 幾何学的図形 */
.geometric-shapes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.shape {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    pointer-events: none;
}

.shape.square {
    border-radius: 0;
    transform: rotate(45deg);
}

.shape.triangle {
    width: 0;
    height: 0;
    border-left: 20px solid transparent;
    border-right: 20px solid transparent;
    border-bottom: 35px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
}

/* Hero Content のz-index調整 */
.hero-content {
    position: relative;
    z-index: 10;
}

/* パルスエフェクト */
.pulse-circle {
    position: absolute;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    animation: pulse 4s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(3);
        opacity: 0;
    }
}

/* グリッチエフェクト（オプション） */
.hero-glitch {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.02);
    letter-spacing: 0.2em;
    pointer-events: none;
    z-index: 1;
}

.hero-glitch::before,
.hero-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-glitch::before {
    animation: glitch-1 0.5s infinite;
    color: rgba(102, 126, 234, 0.02);
    z-index: -1;
}

.hero-glitch::after {
    animation: glitch-2 0.5s infinite;
    color: rgba(255, 255, 255, 0.02);
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(2px, -2px);
    }
    40% {
        transform: translate(2px, 2px);
    }
    60% {
        transform: translate(-2px, -2px);
    }
    80% {
        transform: translate(-2px, 2px);
    }
}

/* モバイル対応 */
@media (max-width: 768px) {
    .hero-wave {
        height: 100px;
        bottom: -20px;
    }
    
    .hero-glitch {
        font-size: 6rem;
    }
}

@media (max-width: 480px) {
    .hero-glitch {
        font-size: 4rem;
    }
}