/* Custom CSS for Octopulse Website */

/* Animation Keyframes */
@keyframes pulseLine {
    0%, 100% {
        opacity: 0.4;
        stroke-dashoffset: 0;
    }
    50% {
        opacity: 0.8;
        stroke-dashoffset: 10;
    }
}

@keyframes blob {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation Classes */
.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

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

.animation-delay-200 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.animation-delay-400 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.animation-delay-600 {
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

.animation-delay-1500 {
    animation-delay: 1.5s;
    animation-fill-mode: both;
}

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Navigation Link Underline Effect */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF6B4A;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

/* Floating Icon Animation */
.floating-icon {
    position: absolute;
    pointer-events: none;
    opacity: 0;
    animation: floatIcon 8s infinite ease-in-out;
    transition: --escapeX 0.3s ease-out, --escapeY 0.3s ease-out;
}

@keyframes floatIcon {
    0% {
        transform: translate(
            calc(0px + var(--escapeX, 0px)), 
            calc(0px + var(--escapeY, 0px))
        ) rotate(0deg);
        opacity: 0;
    }
    15% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.3;
        transform: translate(
            calc(var(--moveX) * 0.5 + var(--escapeX, 0px)), 
            calc(var(--moveY) * 0.5 + var(--escapeY, 0px))
        ) rotate(180deg);
    }
    85% {
        opacity: 0.2;
    }
    100% {
        transform: translate(
            calc(var(--moveX) + var(--escapeX, 0px)), 
            calc(var(--moveY) + var(--escapeY, 0px))
        ) rotate(360deg);
        opacity: 0;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Spinner */
.spinner {
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #FF6B4A;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E85533;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    ring: 2px;
    ring-color: #FF6B4A;
    border-color: transparent;
}

/* Card Hover Effects */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button Hover Effects */
button, .button {
    transition: all 0.3s ease;
}

button:active, .button:active {
    transform: scale(0.98);
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
    }
    h2 {
        font-size: 2rem;
    }
}

/* Prevent flash of unstyled content */
body {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

/* Logo Pulse Animation */
.pulse-line {
    animation: pulseLine 2s ease-in-out infinite;
    stroke-dasharray: 4, 4;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.8));
}

/* Service Detail Transition */
#service-detail {
    transition: opacity 0.3s ease, background-color 0.3s ease;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.transition-all {
    transition: all 0.3s ease;
}

