/* base.css */

/* uncomment, if color transition neet to change smoothly */
/* * {
    transition: background-color 2s cubic-bezier(0.4, 0, 0.2, 1),
                color 2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 2s cubic-bezier(0.4, 0, 0.2, 1);
} */

/* Base transitions */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

:root {
    /* Light theme (default) */
    --accent-color: #000000;      /* Pure black */
    --accent-dark: #1a1a1a;       /* Very dark gray */
    --accent-light: #f5f5f5;      /* Very light gray */
    --bg-color: #ffffff;          /* Pure white */
    --bg-color-rgb: 255, 255, 255;
    --text-color: #000000;        /* Pure black */
    --hover-color: #333333;       /* Dark gray */
    --border-color: #e5e5e5;      /* Light gray */
    --secondary-text: #666666;    /* Medium gray */
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

.text-muted {
    color: var(--secondary-text);
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    background-color: var(--bg-color);
}

h1, h2, h3 {
    font-weight: 700;
}

p {
    font-size: 1.1rem;
}

/* Animations */
.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

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

.animate-pulse-slow {
    animation: pulseSlow 2s infinite;
}

/* Navbar scroll animations */
nav.scroll-down {
    transform: translateY(-100%);
    transition: transform 0.3s ease-in-out;
}

nav.scroll-up {
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
}

/* Animation keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulseSlow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Card hover effects */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Button hover effects */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Hero section gradient */
.hero-gradient {
    position: relative;
}

.hero-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, var(--accent-light) 0%, transparent 60%);
    opacity: 0.1;
    pointer-events: none;
}

/* Accessibility Styles */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    padding: 8px;
    z-index: 100;
    background: var(--accent-color);
    color: var(--bg-color);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Enhanced focus styles for keyboard navigation */
.keyboard-nav *:focus {
    outline: 3px solid var(--accent-color) !important;
    outline-offset: 2px !important;
}

/* Ripple effect for buttons and links */
button, a {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.3;
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* High contrast mode improvements */
@media (forced-colors: active) {
    .button {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 1px solid currentColor;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-bounce {
        animation: none !important;
    }
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--accent-light);
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    width: 100%;;
    height: 3px;
    background: var(--accent-color);
    z-index: 9999;
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 0.1s ease;
}
