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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8; 
}

/* Dark Mode Scrollbar */
html.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 5px;
}

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

/* Smooth transitions for dark mode */
body, html {
    transition: background-color 0.3s ease, color 0.3s ease;
    scroll-behavior: smooth;
}

/* Initial page opacity */
body {
    opacity: 1;
}

/* Theme toggle button transitions */
#theme-toggle-btn {
    transition: all 0.3s ease;
}

#theme-toggle-btn:hover {
    transform: rotate(20deg);
}

.sun-icon, .moon-icon {
    transition: transform 0.3s ease;
}

/* ===== ANIMATIONS ===== */

/* Basic Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

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

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(14, 165, 233, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(14, 165, 233, 0.8);
    }
}

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes zoomOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.3);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.3);
    }
    56% {
        transform: scale(1);
    }
    70% {
        transform: scale(1.3);
    }
    85% {
        transform: scale(1);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* ===== UTILITY CLASSES ===== */

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.animate-slide-in-down {
    animation: slideInDown 0.5s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce {
    animation: bounce 2s infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-zoom-in {
    animation: zoomIn 0.5s ease-out;
}

.animate-rotate-in {
    animation: rotateIn 0.6s ease-out;
}

.animate-heart-beat {
    animation: heartBeat 1.3s ease-in-out;
}

.animate-in {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* ===== HOVER EFFECTS ===== */

/* Smooth Hover Scale */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* Smooth Hover Lift */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Glow on Hover */
.hover-glow {
    transition: all 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.6);
}

/* Color Shift on Hover */
.hover-color-shift {
    transition: color 0.3s ease;
}

.hover-color-shift:hover {
    color: #0ea5e9;
}

/* Underline Animation */
.hover-underline {
    position: relative;
    text-decoration: none;
}

.hover-underline::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: #0ea5e9;
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-underline:hover::after {
    width: 100%;
}

/* Button Ripple Effect */
button, [class*="btn"] {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    animation: ripple 0.6s ease-out;
}

/* ===== CARD STYLES ===== */

[data-card], .card, article {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1), box-shadow 0.3s ease;
}

[data-card]:hover, .card:hover, article:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ===== GRADIENT ANIMATIONS ===== */

.gradient-text {
    background: linear-gradient(135deg, #0ea5e9, #10b981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s infinite;
    background-size: 200% 200%;
}

.gradient-bg {
    background: linear-gradient(-45deg, #0ea5e9, #10b981, #f59e0b, #ef4444);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ===== ICON STYLING: enforce single-color icons ===== */
:root {
    --icon-color: #000000; /* black for light theme */
}

html.dark {
    --icon-color: #ffffff; /* white for dark mode */
}

svg.icon {
    color: var(--icon-color) !important;
    fill: currentColor !important;
    stroke: currentColor !important;
    vector-effect: non-scaling-stroke;
}

/* ===== LOADING ANIMATIONS ===== */

.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(14, 165, 233, 0.1);
    border-top: 4px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* Dark mode skeleton */
html.dark .skeleton {
    background: linear-gradient(90deg, #404040 25%, #505050 50%, #404040 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ===== TYPEWRITER CURSOR ===== */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.typewriter-cursor {
    display: inline-block;
    animation: blink 0.8s step-end infinite;
    font-weight: 300;
    margin-left: 2px;
}

/* ===== COUNTER STAGGER ANIMATION ===== */
.counter {
    transition: color 0.3s ease;
}

/* ===== RESPONSIVE ANIMATIONS ===== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 768px) {
    /* Reduce animation complexity on mobile */
    .animate-parallax {
        animation: none;
    }

    /* Disable glow cursor on mobile */
    #glow-cursor {
        display: none !important;
    }

    /* Simpler hover effects on mobile */
    .hover-lift {
        transition: none;
    }

    .hover-lift:hover {
        transform: none;
    }
}

/* ===== DARK MODE TEXT COLORS ===== */

html.dark a {
    transition: color 0.2s ease;
}

html.dark button {
    transition: all 0.2s ease;
}

/* Smooth color transitions */
* {
    @apply transition-colors duration-300;
}

/* ===== UX PRO MAX: STAGGER REVEAL ===== */
[data-scroll-animate] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.55s ease-out, transform 0.55s ease-out;
    transition-delay: var(--stagger-delay, 0ms);
}

[data-scroll-animate].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== UX PRO MAX: HOVER LIFT ===== */
.hover-lift {
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease-out;
    will-change: transform;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(14, 165, 233, 0.12), 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ===== UX PRO MAX: WCAG FOCUS RINGS ===== */
/* Per UX Pro Max: focus states visible for keyboard nav, 3-4px rings */
:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 3px;
    border-radius: 4px;
}

a:focus-visible,
button:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 3px;
    border-radius: 6px;
}

html.dark :focus-visible {
    outline-color: #38bdf8;
}

/* ===== UX PRO MAX: AURORA HERO GLOW ===== */
@keyframes aurora-pulse {
    0%, 100% { opacity: 0.04; transform: scale(1); }
    50% { opacity: 0.08; transform: scale(1.05); }
}

.aurora-glow {
    animation: aurora-pulse 6s ease-in-out infinite;
}

/* ===== 1. HEADING UNDERLINE DRAW ===== */
.heading-underline {
    position: relative;
    display: inline-block;
}

.heading-underline::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #0ea5e9, #10b981);
    border-radius: 2px;
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.heading-underline.is-visible::after {
    width: 100%;
}

/* ===== 2. PARTNERS MARQUEE ===== */
.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee 28s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ===== 3. CTA GRADIENT SHIFT ===== */
@keyframes gradient-shift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.cta-gradient-animate {
    background-size: 300% 300%;
    animation: gradient-shift 8s ease infinite;
}

/* ===== 5. PAGE TRANSITION PROGRESS BAR ===== */
#page-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, #0ea5e9, #10b981);
    z-index: 99999;
    transition: width 0.25s ease-out, opacity 0.4s ease;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(14, 165, 233, 0.6);
}

/* ===== 6. HERO HEX GRID FLOAT ===== */
@keyframes hex-float {
    0%, 100% { transform: translateY(0px) rotate(0deg); opacity: 0.06; }
    33%       { transform: translateY(-12px) rotate(2deg); opacity: 0.10; }
    66%       { transform: translateY(6px) rotate(-1deg); opacity: 0.07; }
}

.hex-grid-bg {
    animation: hex-float 10s ease-in-out infinite;
}

/* ===== 7. CARD SHIMMER ===== */
@keyframes card-shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.card-shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(14, 165, 233, 0.06) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: card-shimmer 1.8s ease-out 1;
}

/* ===== UX PRO MAX: PREFERS-REDUCED-MOTION (full guard) ===== */
@media (prefers-reduced-motion: reduce) {
    [data-scroll-animate] {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hover-lift,
    .hover-lift:hover {
        transform: none;
        transition: none;
    }

    .aurora-glow,
    .animate-blob,
    .animate-aurora,
    .animate-bounce,
    .animate-shimmer-slide,
    .marquee-track,
    .cta-gradient-animate,
    .hex-grid-bg,
    .card-shimmer {
        animation: none !important;
    }

    .heading-underline::after {
        transition: none;
        width: 100%;
    }

    .typewriter-cursor {
        animation: none !important;
        opacity: 1;
    }
}