/* Global styles and animations */
body {
    scroll-behavior: smooth;
}

#scroll-progress-bar {
    width: 0%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
    transition: width 0.1s ease-out;
}

@keyframes gradient-text {
  0%, 100% {
    background-size: 200% 200%;
    background-position: left center;
  }
  50% {
    background-size: 200% 200%;
    background-position: right center;
  }
}

.animate-gradient-text {
  animation: gradient-text 5s ease infinite;
}

@keyframes subtle-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

.animate-subtle-pulse {
  animation: subtle-pulse 4s infinite ease-in-out;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

/* Typing effect */
#typing-effect {
    border-right: 0.15em solid var(--brand-accent);
    animation: typing-blink-caret .75s step-end infinite;
}

@keyframes typing-blink-caret {
  from, to { border-color: transparent }
  50% { border-color: #00A9FF; }
}


/* Background grid pattern from HeroSection */
.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.dark .bg-grid-pattern {
   background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
}

/* Why us background */
.why-us-bg {
    background-image: radial-gradient(circle at top left, rgba(0, 169, 255, 0.05), transparent 30%), radial-gradient(circle at bottom right, rgba(147, 51, 234, 0.05), transparent 30%);
}
.dark .why-us-bg {
    background-image: radial-gradient(circle at top left, rgba(0, 169, 255, 0.1), transparent 40%), radial-gradient(circle at bottom right, rgba(147, 51, 234, 0.1), transparent 40%);
}


/* Scroll animation utility */
.fade-in-up-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.645, 0.045, 0.355, 1), transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.fade-in-up-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Service Card Tilt Effect */
.tilt-container {
    perspective: 1000px;
}
.service-card {
    transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
    transform-style: preserve-3d;
}

.glow-border {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 0.75rem; /* 12px */
    padding: 2px;
    background: linear-gradient(45deg, #00A9FF, #9333ea);
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
}

/* Floating Label Form */
.form-group .form-label {
    transform-origin: top left;
    transition: transform 0.3s ease, color 0.3s ease;
}
.form-group.is-focused .form-label,
.form-group.is-filled .form-label {
    transform: translateY(-1.5rem) scale(0.85);
    color: #00A9FF;
}

.dark .form-group.is-focused .form-label {
     color: #00A9FF;
}

/* --- ENHANCEMENTS --- */

/* Hero CTA Float */
@keyframes cta-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.cta-float {
    animation: cta-float 4s ease-in-out infinite;
}

/* Mouse-based Parallax Blobs */
.parallax-layer {
    transition: transform 0.2s cubic-bezier(0, 0, 0.2, 1);
}


/* Why Us Card Glow Effect */
.why-us-card-glow {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 169, 255, 0.15) 0%, rgba(0, 169, 255, 0) 70%);
    border-radius: 50%;
    transition: opacity 0.3s ease-out;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, -50%);
    z-index: -1;
}
.why-us-card:hover .why-us-card-glow {
    opacity: 1;
}
.dark .why-us-card-glow {
    background: radial-gradient(circle, rgba(0, 169, 255, 0.25) 0%, rgba(0, 169, 255, 0) 70%);
}


/* Testimonials Background Pattern */
#testimonials {
    position: relative;
    z-index: 1;
}
#testimonials::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(circle, #e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    z-index: -1;
}
.dark #testimonials::before {
    background-image: radial-gradient(circle, #3a3a3a 1px, transparent 1px);
}

/* FAQ Active State */
.faq-toggle {
    transition: background-color 0.3s ease-in-out;
}
.faq-toggle[aria-expanded="true"] {
    background-color: rgba(0, 169, 255, 0.05);
}
.dark .faq-toggle[aria-expanded="true"] {
    background-color: rgba(0, 169, 255, 0.1);
}

/* CTA Button Shine Effect */
.cta-button-shine {
    position: relative;
    overflow: hidden;
}
.cta-button-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 20%;
    height: 200%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(25deg);
    opacity: 0;
    transition: left 0.8s cubic-bezier(0.2, 1, 0.3, 1);
}
.cta-button-shine:hover::after {
    opacity: 1;
    left: 140%;
}

/* Services Page Specific Styles */
.service-feature-item:nth-child(even) .service-feature-content {
    order: 1;
}

@media (min-width: 1024px) {
    .service-feature-item:nth-child(even) .service-feature-image {
        order: 2;
    }
}

.service-feature-image-container {
    perspective: 1500px;
}
.service-feature-image-container img {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.service-feature-image-container:hover img {
    transform: scale(1.05) rotateY(5deg) rotateX(-5deg);
}
.service-feature-item:nth-child(even) .service-feature-image-container:hover img {
    transform: scale(1.05) rotateY(-5deg) rotateX(-5deg);
}

/* Our Process Section */
.process-step {
    position: relative;
}
@media (min-width: 768px) {
    .process-step:not(:last-child)::after {
        content: '';
        position: absolute;
        left: 50%;
        top: 2rem; /* Center of the circle */
        width: calc(100% - 4rem);
        height: 2px;
        background-color: #e5e7eb; /* light gray */
        transform: translateX(2rem);
        z-index: -1;
    }
    .dark .process-step:not(:last-child)::after {
        background-color: #374151; /* dark gray */
    }
}


/* --- PORTFOLIO STYLES --- */

/* Portfolio Hub Card */
.portfolio-hub-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.portfolio-hub-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(0, 169, 255, 0.2), 0 8px 10px -6px rgba(0, 169, 255, 0.1);
}
.portfolio-hub-card .icon-container {
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.portfolio-hub-card:hover .icon-container {
    transform: scale(1.1);
    background-color: rgba(0, 169, 255, 0.15);
}

/* Portfolio App Card */
.app-card .app-icon {
    transition: transform 0.3s ease;
}
.app-card:hover .app-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* SEO Case Study Card */
.seo-card {
    border-left: 4px solid #00A9FF;
}
.seo-card .result-metric {
    font-size: 2.5rem;
    line-height: 1;
}

/* === WORLD-CLASS WEBSITE PORTFOLIO STYLES === */
.project-card-premium {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    position: relative;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}
.dark .project-card-premium {
     box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05), 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -2px rgb(0 0 0 / 0.2);
}

.project-card-premium:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.dark .project-card-premium:hover {
    box-shadow: 0 0 0 1px rgba(0, 169, 255, 0.5), 0 20px 25px -5px rgba(0, 169, 255, 0.1), 0 8px 10px -6px rgba(0, 169, 255, 0.1);
}

.tech-tag {
    @apply text-xs font-semibold bg-brand-accent/10 text-brand-accent dark:bg-brand-accent/20 dark:text-brand-accent py-1 px-3 rounded-full;
}

.premium-cta-button {
    @apply mt-auto inline-flex items-center justify-center gap-x-2 bg-brand-accent text-white font-bold py-3 px-6 rounded-full text-center transition-all duration-300 transform hover:scale-105 hover:bg-brand-accent-dark focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-accent dark:focus:ring-offset-brand-dark;
}
