@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base Styles */
body {
    font-family: 'Inter', sans-serif;
    color: #1f2937;
    line-height: 1.6;
}

/* Animations */
@keyframes letterSlideDown {
    from {
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
    }
    to {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
}

@keyframes pulseBeam {
    0% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(251, 191, 36, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(251, 191, 36, 0);
    }
}

@keyframes noodleFlow {
    0% {
        transform: translateX(-100%) translateY(-50%);
    }
    100% {
        transform: translateX(100%) translateY(50%);
    }
}

@keyframes sonar {
    0% {
        transform: scale(0.5);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes cardRotate1 {
    0%, 33% {
        transform: translateX(0) scale(1);
        z-index: 10;
        opacity: 1;
    }
    33.1%, 66% {
        transform: translateX(80%) scale(0.8);
        z-index: 5;
        opacity: 0.7;
    }
    66.1%, 100% {
        transform: translateX(-80%) scale(0.8);
        z-index: 5;
        opacity: 0.7;
    }
}

@keyframes cardRotate2 {
    0%, 33% {
        transform: translateX(80%) scale(0.8);
        z-index: 5;
        opacity: 0.7;
    }
    33.1%, 66% {
        transform: translateX(-80%) scale(0.8);
        z-index: 5;
        opacity: 0.7;
    }
    66.1%, 100% {
        transform: translateX(0) scale(1);
        z-index: 10;
        opacity: 1;
    }
}

@keyframes cardRotate3 {
    0%, 33% {
        transform: translateX(-80%) scale(0.8);
        z-index: 5;
        opacity: 0.7;
    }
    33.1%, 66% {
        transform: translateX(0) scale(1);
        z-index: 10;
        opacity: 1;
    }
    66.1%, 100% {
        transform: translateX(80%) scale(0.8);
        z-index: 5;
        opacity: 0.7;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility Classes */
.animate-letter-slide {
    display: inline-block;
    animation: letterSlideDown 1s both cubic-bezier(0.19, 1, 0.22, 1);
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.animate-fade-in {
    animation: fadeIn 1s both 0.5s;
}

.animate-pulse-beam {
    animation: pulseBeam 2s infinite;
}

.animate-pulse-beam:hover {
    animation: pulseBeam 1s infinite;
}

.animate-card-rotate-1 {
    animation: cardRotate1 15s infinite ease-in-out;
}

.animate-card-rotate-2 {
    animation: cardRotate2 15s infinite ease-in-out;
}

.animate-card-rotate-3 {
    animation: cardRotate3 15s infinite ease-in-out;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Component Styles */
.pill-button {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pill-button::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 9999px;
    border: 1px solid transparent;
    background: linear-gradient(90deg, #f59e0b, #ef4444) border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pill-button:hover::after {
    opacity: 1;
    animation: pulseBeam 1.5s infinite;
}

/* Decoration Elements */
.hero-decoration {
    pointer-events: none;
}

.noodle {
    position: absolute;
    background: linear-gradient(90deg, rgba(251, 191, 36, 0.2), rgba(239, 68, 68, 0.2));
    width: 150%;
    height: 2px;
    transform-origin: center;
    animation: noodleFlow 20s linear infinite;
}

.noodle-1 {
    top: 30%;
    left: 0;
    transform: rotate(15deg);
}

.noodle-2 {
    top: 60%;
    left: 0;
    transform: rotate(-10deg);
    animation-delay: 5s;
}

.sonar {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.3), transparent 70%);
    width: 200px;
    height: 200px;
    animation: sonar 3s infinite ease-out;
}

.sonar-1 {
    top: 20%;
    right: 10%;
    animation-delay: 1s;
}

/* Card Styles */
.card {
    position: absolute;
    transition: all 0.5s ease;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* Flashlight Effect */
.flashlight {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2), transparent 70%);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: 10;
    mix-blend-mode: overlay;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 4rem !important;
    }
    
    .card-rotator {
        height: 400px;
    }
    
    .animate-card-rotate-1,
    .animate-card-rotate-2,
    .animate-card-rotate-3 {
        animation: none;
        position: relative;
        margin-bottom: 2rem;
        transform: none !important;
        opacity: 1 !important;
    }
}