/* Updated color palette and typography to match reference design */

/* Custom Font Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Global Resets and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Bold gradient text effect for hero */
.gradient-hero-text {
    background: linear-gradient(135deg, 
        #a855f7 0%,    /* purple-500 */
        #ec4899 25%,   /* pink-500 */
        #f97316 50%,   /* orange-500 */
        #eab308 75%,   /* yellow-500 */
        #a855f7 100%   /* purple-500 */
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Grayscale image effects with color on hover */
.grayscale {
    filter: grayscale(100%) contrast(1.2);
    transition: filter 0.5s ease;
}

.grayscale:hover {
    filter: grayscale(0%) contrast(1);
}

/* Red tint effect for images */
.red-tint {
    filter: grayscale(100%) sepia(100%) hue-rotate(-50deg) saturate(600%);
    transition: filter 0.5s ease;
}

.red-tint:hover {
    filter: grayscale(0%) sepia(0%) hue-rotate(0deg) saturate(100%);
}

/* Flip card styles for interactive service cards */
.flip-card {
    perspective: 1000px;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-card-front,
.flip-card-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* Hand-drawn doodle animations */
.doodle-hand,
.doodle-circle,
.doodle-question,
.doodle-stick-figure {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.hero-doodle {
    animation: wiggle 4s ease-in-out infinite;
}

@keyframes wiggle {
    0%, 100% {
        transform: rotate(-3deg);
    }
    50% {
        transform: rotate(3deg);
    }
}

/* Cookie popup with backdrop blur */
.cookie-popup {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 2rem;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
    transition: bottom 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    z-index: 9999;
}

.cookie-popup.show {
    bottom: 0;
}

.cookie-popup-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

@media (max-width: 768px) {
    .cookie-popup-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Fade in animation for sections */
.fade-in-up {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #a855f7 0%, #ec4899 100%);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #9333ea 0%, #db2777 100%);
}

/* Enhanced button hover effects */
button,
a {
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

button:active,
a:active {
    transform: scale(0.95);
}

/* Card hover effects with 3D transforms */
.hover\:shadow-2xl {
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Image loading effect */
img {
    transition: opacity 0.4s ease, filter 0.5s ease, transform 0.5s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Mobile menu smooth animation */
#mobileMenu {
    transition: all 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-origin: top;
}

#mobileMenu.hidden {
    max-height: 0;
    opacity: 0;
    transform: scaleY(0);
}

#mobileMenu:not(.hidden) {
    max-height: 500px;
    opacity: 1;
    transform: scaleY(1);
}

/* Form input focus states with glow effect */
input:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.3);
}

/* Highlighted text boxes */
.bg-yellow-300,
.bg-purple-600,
.bg-orange-600 {
    display: inline-block;
    line-height: 1.4;
    padding: 0.1em 0.3em;
    border-radius: 0.2em;
    box-decoration-break: clone;
    -webkit-box-decoration-break: clone;
}

/* Team member hover effects */
.text-center.group img {
    transition: transform 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Section spacing adjustments */
section {
    position: relative;
}

/* Hero background pattern */
.bg-black::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Typography refinements */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

/* Glass morphism effect for contact form */
.bg-white\/10 {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Pulse animation for icons */
@keyframes pulse-soft {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.group:hover svg {
    animation: pulse-soft 2s ease-in-out infinite;
}

/* Shadow enhancements */
.shadow-2xl {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 0 15px rgba(168, 85, 247, 0.1);
}

/* Gradient backgrounds */
.bg-gradient-to-br {
    position: relative;
    overflow: hidden;
}

.bg-gradient-to-br::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: rotate-gradient 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate-gradient {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive typography scaling */
@media (max-width: 768px) {
    .text-6xl,
    .text-7xl,
    .text-8xl {
        font-size: 2.5rem !important;
        line-height: 1.1;
    }
    
    .text-4xl,
    .text-5xl {
        font-size: 2rem !important;
        line-height: 1.2;
    }
}

/* Link hover underline effect */
a:not(.block):not([class*="bg-"]) {
    position: relative;
}

a:not(.block):not([class*="bg-"])::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}

a:not(.block):not([class*="bg-"]):hover::after {
    width: 100%;
}

/* Card stacking effect on hover */
.hover\:-translate-y-2:hover {
    transform: translateY(-8px);
}

/* Performance optimization */
* {
    -webkit-tap-highlight-color: transparent;
}

img,
video {
    will-change: transform, filter;
}
