/* --- Lenis Recommended CSS --- */
html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }

/* Hide scrollbar for mobile carousels */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */

    /* Ensure scroll padding works for center snapping */
    scroll-padding-left: 24px;
    scroll-padding-right: 24px;
}

/* --- Base Enhancements --- */
::selection { background: rgba(0, 212, 255, 0.3); color: #fff; }

/* --- Animations --- */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 212, 255, 0.1); }
    50% { box-shadow: 0 0 30px rgba(0, 212, 255, 0.3); }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-float { animation: float 6s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 3s ease-in-out infinite; }

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #00D4FF 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #fff, #00D4FF, #0055FF, #00D4FF, #fff);
    background-size: 400% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 6s ease infinite;
}

/* --- Magnetic Button --- */
.magnetic-btn { transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1); }

/* --- Grid Background --- */
.grid-bg {
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* --- Noise Texture --- */
.noise-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

/* --- 3D & Tilt --- */
.perspective-1000 { perspective: 1000px; }
.tilt-card { transition: transform 0.1s ease; transform-style: preserve-3d; }

/* --- Hover Line Effect --- */
.hover-line { position: relative; }
.hover-line::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #00D4FF;
    transition: width 0.3s ease;
}
.hover-line:hover::after { width: 100%; }

/* --- Cursor Glow --- */
.cursor-glow {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 70%);
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    mix-blend-mode: screen;
}

/* --- Phone Animations --- */

/* 1. Gentle Float */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* 2. Message Slide Up */
@keyframes slideUp {
    0% { opacity: 0; transform: translateY(15px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.animate-slide-up {
    animation: slideUp 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* 3. Simple Fade In */
@keyframes fadeIn {
    to { opacity: 1; }
}
.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* --- Interaction Sequence (Loop: 5s) --- */

/* 1. Card Press Effect */
@keyframes cardPress {
    0%, 35% { transform: scale(1); filter: brightness(1); }
    40% { transform: scale(0.96); filter: brightness(1.2); } /* Click Down */
    45% { transform: scale(0.96); filter: brightness(1.2); } /* Hold */
    50% { transform: scale(1); filter: brightness(1); } /* Release */
    100% { transform: scale(1); filter: brightness(1); }
}

.link-card-interaction {
    animation: cardPress 5s ease-in-out infinite;
    animation-delay: 1.5s;
    transform-origin: center;
}

/* 2. The Glowing Finger Tap (Circle) */
@keyframes touchTap {
    0%, 30% { opacity: 0; transform: scale(2); } /* Start large/invisible */
    35% { opacity: 1; transform: scale(1); } /* Touch hits screen */
    45% { opacity: 1; transform: scale(1); } /* Hold */
    50% { opacity: 0; transform: scale(0.8); } /* Lift off */
    100% { opacity: 0; }
}

.animate-touch-tap {
    animation: touchTap 5s ease-in-out infinite;
    animation-delay: 1.5s;
}

/* 3. The Ripple Effect Ring */
@keyframes touchRipple {
    0%, 35% { opacity: 0; transform: scale(1); }
    36% { opacity: 1; transform: scale(1); border-width: 2px; }
    50% { opacity: 0; transform: scale(2.5); border-width: 0px; }
    100% { opacity: 0; }
}

.animate-touch-ripple {
    animation: touchRipple 5s ease-out infinite;
    animation-delay: 1.5s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .grid-bg { background-size: 40px 40px; }
}

/* --- Simplified Logo Interaction --- */
.logo-hover-card {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.group:hover .logo-hover-card {
    transform: scale(1.05) rotate(-2deg);
    box-shadow: 0 10px 20px -5px rgba(0, 212, 255, 0.4);
}
