/**
 * Craig Scientific LLC - Landing Page Custom Styles
 * Supplemental to Tailwind CSS
 */

/* Smooth scrolling - but not too smooth on mobile */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    html {
        scroll-behavior: auto; /* Disable smooth scroll on mobile to prevent weird UX */
    }
}

/* Prevent horizontal overflow */
body {
    overflow-x: hidden;
    max-width: 100vw;
    /* Prevent momentum scrolling issues on mobile */
    -webkit-overflow-scrolling: touch;
}

*, *::before, *::after {
    box-sizing: border-box;
}

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(6, 182, 212, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(6, 182, 212, 0.6);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Pipeline animation container */
#pipeline-animation {
    position: relative;
}

/* Card hover effects - professional and subtle */
.bg-gradient-to-br {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bg-gradient-to-br:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Feature card specific hover */
section#how-it-works .bg-gradient-to-br:hover {
    transform: translateY(-6px) scale(1.02);
}

/* Phase card hover effects */
.phase-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.phase-card:hover {
    transform: translateX(8px);
}

/* Smooth transitions for all interactive elements */
a, button {
    transition: all 0.2s ease-in-out;
}

/* CTA Button enhancements */
a.bg-craig-teal, button.bg-craig-teal {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a.bg-craig-teal:hover, button.bg-craig-teal:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(6, 182, 212, 0.5);
}

a.bg-craig-teal:active, button.bg-craig-teal:active {
    transform: translateY(0);
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Custom scrollbar (webkit browsers) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    .no-print {
        display: none;
    }
}

/* Scroll indicator improvements for mobile */
section > div > a[href^="#"] {
    /* Larger touch target on mobile */
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

@media (max-width: 768px) {
    section > div > a[href^="#"] {
        /* Even larger touch target on mobile */
        min-width: 56px;
        min-height: 56px;
        padding: 16px;
    }

    section > div > a[href^="#"] svg {
        width: 32px;
        height: 32px;
    }
}

/* Accessibility: Focus visible */
*:focus-visible {
    outline: 2px solid #06b6d4;
    outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
