/* Define CSS variable for angle */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

html {
    scroll-behavior: smooth;
}
body {
    font-family: 'DM Sans', 'sans-serif'; /* Default body font */
    background-color: #F5F5F7; /* light-bg */
    color: #111;
}
.dark body {
    background-color: #05050A; /* dark-bg */
    color: #E5E7EB; /* Light gray text for dark mode */
}

/* --- Modern Card Style --- */
.modern-card {
    background: #FFFFFF; /* light mode default */
    border: 1px solid #E5E7EB;
    border-radius: 1.5rem; /* 24px */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}
.dark .modern-card {
    background: #0E0E13; /* dark-card */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}
.modern-card:hover {
    transform: translateY(-5px);
    border-color: #007BFF;
    box-shadow: 0 0 25px rgba(0, 123, 255, 0.3); /* Blue glow */
}

/* --- Glassmorphism Nav & Elements --- */
.glass-nav {
    background: rgba(255, 255, 255, 0.5); /* Lighter for more "glass" effect */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.dark .glass-nav {
    background: rgba(30, 30, 35, 0.5); /* Lighter dark bg for more blur */
    border: 1px solid rgba(255, 255, 255, 0.15); /* More visible border */
}

.glass-placeholder {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1.5rem; /* 24px */
}
.dark .glass-placeholder {
    background: rgba(30, 30, 35, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* --- Animated Theme Toggle --- */
.sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
    transition: all 0.3s ease-in-out;
}
.moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
    transition: all 0.3s ease-in-out;
}
.dark .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(-90deg);
}
.dark .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(0deg);
}

/* --- Scroll Animation --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(90deg, #007BFF, #4c9aff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- Animated Button Base --- */
.btn-animated {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease-in-out;
    border-radius: 9999px; /* rounded-full */
    border: 2px solid transparent; /* Crucial: transparent border */
}
.btn-animated::before { /* The gradient border */
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%; 
    height: 200%;
    z-index: -2; /* Behind the button content */
    transform: translate(-50%, -50%) rotate(var(--angle));
    animation: spin 4s linear infinite;
    background: conic-gradient(
        from var(--angle),
        transparent 20%, #007BFF, #4c9aff, transparent 80%
    );
}
.btn-animated::after { /* The solid bg color inside */
    content: '';
    position: absolute;
    top: 2px; /* This creates the border thickness */
    left: 2px;
    right: 2px;
    bottom: 2px;
    border-radius: 9999px; /* Match parent */
    z-index: -1; /* Above the gradient, behind content */
    transition: all 0.3s ease-in-out;
}

.btn-animated:hover::before {
    animation: spin 1s linear infinite; /* Faster on hover */
}

/* --- Primary Button (Blue) --- */
.btn-anim-primary::after {
    background: #007BFF; /* brand-blue */
}
.btn-anim-primary:hover::after {
    background: #0069D9; /* Darker blue on hover */
}

/* --- Secondary Button (Transparent) --- */
.btn-anim-secondary::after {
    background: #F5F5F7; /* light-bg */
}
.dark .btn-anim-secondary::after {
    background: #05050A; /* dark-bg */
}
.btn-anim-secondary:hover::after {
    background: #ebebeb; /* light-bg-hover */
}
.dark .btn-anim-secondary:hover::after {
    background: #0E0E13; /* dark-card-bg */
}

/* --- Nav CTA Button (Blue) --- */
.btn-anim-nav::before {
     background: conic-gradient(
        from var(--angle),
        transparent 20%, #FFFFFF, #4c9aff, transparent 80% /* Brighter glow */
    );
}
.btn-anim-nav::after {
    background: #007BFF; /* brand-blue */
}
.btn-anim-nav:hover::after {
     background: #0069D9; /* Darker blue on hover */
}

/* --- Abstract Hero BG --- */
.hero-bg-abstract {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Hide overflow from blurred elements */
    z-index: -10;
}
.hero-bg-abstract::before,
.hero-bg-abstract::after {
    content: '';
    position: absolute;
    background-color: rgba(0, 123, 255, 0.15); /* Brand blue with transparency */
    border-radius: 50%; /* Make them circular */
    filter: blur(100px); /* Heavy blur */
    opacity: 0.7;
    animation: float 10s ease-in-out infinite; /* Apply float animation */
}
.hero-bg-abstract::before {
    width: 400px;
    height: 400px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}
.hero-bg-abstract::after {
    width: 300px;
    height: 300px;
    bottom: 15%;
    right: 10%;
    animation-delay: 3s; /* Stagger animation */
    background-color: rgba(0, 123, 255, 0.1); /* Slightly different shade */
    filter: blur(80px);
}
.dark .hero-bg-abstract::before,
.dark .hero-bg-abstract::after {
    background-color: rgba(0, 123, 255, 0.1); /* Darker, more subtle for dark mode */
}

/* --- Custom Cursor --- */
.cursor-dot,
.cursor-outline {
    pointer-events: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    transition: all 0.1s ease-out;
    /* Use CSS var for color, fallback to brand-blue */
    --cursor-color: var(--brand-blue, #007BFF); 
}
.cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--cursor-color);
}
.cursor-outline {
    width: 30px;
    height: 30px;
    border: 2px solid var(--cursor-color);
    opacity: 0.5;
    transition: all 0.2s ease-out;
}
body {
    cursor: none; /* Hide default cursor */
}
/* Cursor hover state */
.cursor-dot.hover {
    transform: translate(-50%, -50%) scale(0.5);
    opacity: 0.5;
}
.cursor-outline.hover {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
}
/* Hide cursor on mobile */
@media (max-width: 768px) {
    .cursor-dot,
    .cursor-outline {
        display: none;
    }
    body {
        cursor: default; /* Restore default cursor */
    }
}

/* --- Query Input Animation (applied with animate-input-glow) --- */

/* --- Simple Loader for Query --- */
.query-loader {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #007BFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* --- Service Card (Vivasoft style) --- */
.service-card {
    /* Use modern-card styles as a base */
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 1.5rem; /* 24px */
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden; /* To contain the arrow */
}
.dark .service-card {
    background: #0E0E13; /* dark-card */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none;
}
.service-card:hover {
    transform: translateY(-5px) scale(1.02); /* Vivasoft hover */
    border-color: #007BFF;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.1);
}
.service-card-arrow {
    transition: transform 0.3s ease;
}
.service-card:hover .service-card-arrow {
    transform: translateX(4px) translateY(-4px); /* Arrow animation */
}

/* --- Custom Select (Contact Form) --- */
/* Base styles are applied via Tailwind in the HTML */
/* JS handles the animation logic */
.select-dropdown {
    /* Base styles via Tailwind */
    transform-origin: top;
    transition: all 0.2s ease-out;
    /* Add glass effect */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.dark .select-dropdown {
    background: rgba(30, 30, 35, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.select-option {
    /* Base styles via Tailwind */
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.2s ease-out;
}

@keyframes spin {
    0% { --angle: 0deg; }
    100% { --angle: 360deg; }
}

