/* =====================================================
   LOSTMAN - Advanced Hero Animations
   Laser Background, Beam Effects, Interactive Elements
   ===================================================== */

/* ===== Hero 3D Container ===== */
#hero-3d-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto; /* スマホでもタッチ可能に */
    touch-action: pan-y; /* 縦スクロールは許可、3D操作も可能 */
}

#hero-3d-container canvas {
    pointer-events: auto;
    touch-action: pan-y;
}

/* ===== Laser Background - Enhanced ===== */
.laser-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

/* Vertical laser beams */
.laser-beam {
    position: absolute;
    width: 2px;
    height: 200%;
    background: linear-gradient(180deg, 
        transparent 0%,
        rgba(99, 102, 241, 0.9) 15%,
        rgba(244, 114, 182, 1) 50%,
        rgba(99, 102, 241, 0.9) 85%,
        transparent 100%
    );
    animation: laser-scan 5s ease-in-out infinite;
    filter: blur(0.5px);
    box-shadow: 
        0 0 8px rgba(99, 102, 241, 0.8),
        0 0 15px rgba(244, 114, 182, 0.6);
}

.laser-beam:nth-child(1) { left: 8%; animation-delay: 0s; }
.laser-beam:nth-child(2) { left: 20%; animation-delay: 0.6s; }
.laser-beam:nth-child(3) { left: 35%; animation-delay: 1.2s; }
.laser-beam:nth-child(4) { left: 50%; animation-delay: 1.8s; }
.laser-beam:nth-child(5) { left: 65%; animation-delay: 2.4s; }
.laser-beam:nth-child(6) { left: 80%; animation-delay: 3s; }

@keyframes laser-scan {
    0% {
        transform: translateY(-100%);
        visibility: visible;
    }
    45% {
        transform: translateY(0%);
    }
    55% {
        transform: translateY(0%);
    }
    100% {
        transform: translateY(100%);
        visibility: visible;
    }
}

/* Horizontal laser sweeps */
.laser-sweep {
    position: absolute;
    width: 200%;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(0, 245, 255, 0.8) 15%,
        rgba(255, 0, 255, 1) 50%,
        rgba(0, 245, 255, 0.8) 85%,
        transparent 100%
    );
    animation: sweep-horizontal 8s ease-in-out infinite;
    filter: blur(0.8px);
    box-shadow: 
        0 0 12px rgba(0, 245, 255, 0.8),
        0 0 20px rgba(255, 0, 255, 0.5);
}

.laser-sweep:nth-child(7) { top: 15%; animation-delay: 0s; }
.laser-sweep:nth-child(8) { top: 35%; animation-delay: 1.5s; }
.laser-sweep:nth-child(9) { top: 55%; animation-delay: 3s; }
.laser-sweep:nth-child(10) { top: 75%; animation-delay: 4.5s; }

@keyframes sweep-horizontal {
    0% {
        transform: translateX(-100%);
        visibility: visible;
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
        visibility: visible;
    }
}

/* ===== Beam Animation Noodles - Enhanced ===== */
.beam-noodle-container {
    position: absolute;
    right: 8%;
    top: 50%;
    transform: translateY(-50%);
    width: 240px;
    height: 240px;
    z-index: 2;
}

/* Central beam circle with sonar */
.beam-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(244, 114, 182, 0.6);
    animation: beam-pulse 2.5s ease-in-out infinite;
}

.beam-circle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 65%;
    height: 65%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.6);
    animation: beam-pulse 2.5s ease-in-out infinite reverse;
}

.beam-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 35%;
    height: 35%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, 
        rgba(244, 114, 182, 0.9) 0%,
        rgba(99, 102, 241, 0.5) 50%,
        transparent 70%
    );
    animation: core-glow 1.8s ease-in-out infinite;
}

@keyframes beam-pulse {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.1); 
    }
}

@keyframes core-glow {
    0%, 100% { filter: blur(0px); }
    50% { filter: blur(8px); }
}

/* Noodle beams connecting to circle */
.noodle-beam {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0) 0%,
        rgba(99, 102, 241, 0.9) 25%,
        rgba(244, 114, 182, 1) 50%,
        rgba(244, 114, 182, 0.9) 75%,
        rgba(99, 102, 241, 0) 100%
    );
    transform-origin: right center;
    animation: noodle-flow 4s ease-in-out infinite;
    filter: blur(0.5px);
    box-shadow: 
        0 0 6px rgba(99, 102, 241, 0.6),
        0 0 12px rgba(244, 114, 182, 0.4);
}

.noodle-beam:nth-child(1) {
    width: 180px;
    top: 15%;
    right: 100%;
    transform: rotate(-20deg);
    animation-delay: 0s;
}

.noodle-beam:nth-child(2) {
    width: 220px;
    top: 35%;
    right: 100%;
    transform: rotate(-8deg);
    animation-delay: 0.4s;
}

.noodle-beam:nth-child(3) {
    width: 250px;
    top: 50%;
    right: 100%;
    transform: rotate(0deg);
    animation-delay: 0.8s;
}

.noodle-beam:nth-child(4) {
    width: 220px;
    top: 65%;
    right: 100%;
    transform: rotate(8deg);
    animation-delay: 1.2s;
}

.noodle-beam:nth-child(5) {
    width: 180px;
    top: 85%;
    right: 100%;
    transform: rotate(20deg);
    animation-delay: 1.6s;
}

@keyframes noodle-flow {
    0% {
        visibility: visible;
        clip-path: inset(0 100% 0 0);
    }
    45% {
        clip-path: inset(0 0 0 0);
    }
    55% {
        clip-path: inset(0 0 0 0);
    }
    100% {
        visibility: visible;
        clip-path: inset(0 0 0 100%);
    }
}

/* Sonar rings decoration */
.sonar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid rgba(0, 245, 255, 0.4);
    animation: sonar-expand 4s ease-out infinite;
}

.sonar-ring:nth-child(1) { animation-delay: 0s; }
.sonar-ring:nth-child(2) { animation-delay: 1.3s; }
.sonar-ring:nth-child(3) { animation-delay: 2.6s; }

@keyframes sonar-expand {
    0% {
        transform: translate(-50%, -50%) scale(0.4);
    }
    100% {
        transform: translate(-50%, -50%) scale(2.5);
        visibility: visible;
    }
}

/* ===== Element Animations (fade-in, slide-in, blur-in) - Using 'both' ===== */
.anim-fade-in {
    animation: fadeInAnim 0.8s ease both;
}

.anim-slide-in-up {
    animation: slideInUpAnim 0.8s ease both;
}

.anim-slide-in-left {
    animation: slideInLeftAnim 0.8s ease both;
}

.anim-slide-in-right {
    animation: slideInRightAnim 0.8s ease both;
}

.anim-blur-in {
    animation: blurInAnim 0.8s ease both;
}

.anim-scale-in {
    animation: scaleInAnim 0.6s ease both;
}

/* Stagger delays */
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }
.anim-delay-5 { animation-delay: 0.5s; }
.anim-delay-6 { animation-delay: 0.6s; }
.anim-delay-7 { animation-delay: 0.7s; }
.anim-delay-8 { animation-delay: 0.8s; }

/* Keyframes using visibility instead of opacity:0 */
@keyframes fadeInAnim {
    from {
        visibility: hidden;
        transform: translateY(25px);
    }
    to {
        visibility: visible;
        transform: translateY(0);
    }
}

@keyframes slideInUpAnim {
    from {
        visibility: hidden;
        transform: translateY(60px);
    }
    to {
        visibility: visible;
        transform: translateY(0);
    }
}

@keyframes slideInLeftAnim {
    from {
        visibility: hidden;
        transform: translateX(-60px);
    }
    to {
        visibility: visible;
        transform: translateX(0);
    }
}

@keyframes slideInRightAnim {
    from {
        visibility: hidden;
        transform: translateX(60px);
    }
    to {
        visibility: visible;
        transform: translateX(0);
    }
}

@keyframes blurInAnim {
    from {
        visibility: hidden;
        filter: blur(25px);
        transform: scale(0.85);
    }
    to {
        visibility: visible;
        filter: blur(0);
        transform: scale(1);
    }
}

@keyframes scaleInAnim {
    from {
        visibility: hidden;
        transform: scale(0.7);
    }
    to {
        visibility: visible;
        transform: scale(1);
    }
}

/* ===== Social Proof Section - Enhanced ===== */
.social-proof {
    padding: 2.5rem 0;
    background: linear-gradient(135deg, 
        rgba(15, 23, 42, 0.9) 0%, 
        rgba(30, 41, 59, 0.85) 50%,
        rgba(15, 23, 42, 0.9) 100%
    );
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(99, 102, 241, 0.3);
    border-bottom: 1px solid rgba(99, 102, 241, 0.3);
    overflow: hidden;
    position: relative;
}

.social-proof::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(244, 114, 182, 0.15) 0%, transparent 50%);
    pointer-events: none;
}

.social-proof-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.proof-stats {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.proof-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    transition: transform 0.3s ease;
}

.proof-stat:hover {
    transform: translateY(-5px);
}

.proof-stat-value {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(99, 102, 241, 0.3);
}

.proof-stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Star rating */
.star-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stars {
    display: flex;
    gap: 0.3rem;
    color: #fbbf24;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.rating-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Logo Marquee Animation with Alpha Mask ===== */
.logo-marquee {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

.logo-marquee-track {
    display: flex;
    gap: 3rem;
    animation: marquee-scroll 35s linear infinite;
    width: max-content;
}

.logo-marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    white-space: nowrap;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.marquee-item:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.5);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.marquee-item iconify-icon {
    font-size: 1.4rem;
    color: var(--primary);
}

.marquee-item span {
    font-size: 0.95rem;
    color: #fff;
    font-weight: 500;
}

/* ===== CTA Button Beam Animation - Enhanced ===== */
.btn-beam {
    position: relative;
    overflow: visible;
}

.btn-beam::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(99, 102, 241, 0.9) 20%,
        rgba(244, 114, 182, 1) 50%,
        rgba(99, 102, 241, 0.9) 80%,
        transparent 100%
    );
    background-size: 300% 100%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    visibility: hidden;
    transition: visibility 0s;
}

.btn-beam:hover::before {
    visibility: visible;
    animation: beam-border 2s linear infinite;
}

@keyframes beam-border {
    0% {
        background-position: 300% 0;
    }
    100% {
        background-position: -300% 0;
    }
}

/* Pill button variant */
.btn-pill {
    border-radius: 9999px;
    padding: 1rem 2.5rem;
}

.btn-pill.btn-beam::before {
    border-radius: 9999px;
}

/* Secondary button with beam */
.btn-secondary-beam {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.5);
    color: var(--text-primary);
    backdrop-filter: blur(4px);
}

.btn-secondary-beam:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

/* ===== Hero Badge Icon Style ===== */
.hero-badge .badge-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
    vertical-align: -0.1em;
}

/* ===== Iconify Icon Styling ===== */
.slide-icon {
    display: block;
    margin: 0 auto 1rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.4));
}

.highlight-item iconify-icon {
    font-size: 1.6rem;
    color: var(--primary);
    flex-shrink: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .beam-noodle-container {
        display: none;
    }
    
    .proof-stats {
        gap: 2rem;
    }
    
    .proof-stat-value {
        font-size: 1.6rem;
    }
    
    .logo-marquee-track {
        gap: 2rem;
    }
    
    .laser-beam,
    .laser-sweep {
        filter: blur(1px);
    }
}

@media (max-width: 480px) {
    .proof-stats {
        gap: 1.5rem;
    }
    
    .marquee-item {
        padding: 0.5rem 1rem;
    }
}
