@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* Base Design Tokens */
:root {
    --font-headline: 'Geist', sans-serif;
    --font-body: 'Manrope', sans-serif;

    /* Light Theme Colors */
    --color-background: #fafaf8;
    --color-on-background: #1a1c1b;
    --color-surface: #ffffff;
    --color-surface-container: #eeeeec;
    --color-surface-container-low: #f4f4f2;
    --color-surface-container-high: #e8e8e6;
    --color-primary: #111111;
    --color-on-primary: #ffffff;
    --color-secondary: #7c572f;
    --color-secondary-container: #fdcb9a;
    --color-on-secondary-container: #78542c;
    --color-accent: #c89b6d;
    --color-border: rgba(0, 0, 0, 0.08);
    --color-outline: #747878;
    --color-error: #ba1a1a;
    --color-on-error: #ffffff;
    
    --shadow-ambient: 0 8px 32px rgba(0, 0, 0, 0.03);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.06);
    
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-bounce: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Theme Overrides */
html.dark {
    --color-background: #0f0f10;
    --color-on-background: #eeeeec;
    --color-surface: #1a1a1c;
    --color-surface-container: #242426;
    --color-surface-container-low: #1d1d1f;
    --color-surface-container-high: #2d2d30;
    --color-primary: #ffffff;
    --color-on-primary: #111111;
    --color-secondary: #ffdcbc;
    --color-secondary-container: #61401a;
    --color-on-secondary-container: #ffdcbc;
    --color-accent: #d4a373;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-outline: #8e9192;
    --color-error: #ffdad6;
    --color-on-error: #93000a;
    
    --shadow-ambient: 0 8px 32px rgba(0, 0, 0, 0.2);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.4);
}

/* Global Reset & Page transition base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--color-background);
    color: var(--color-on-background);
    font-family: var(--font-body);
    transition: background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1), color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(10px);
    animation: pageLoad 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--color-background);
}
::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-outline);
}

/* Animations */
@keyframes pageLoad {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

@keyframes pulseBorder {
    0%, 100% { border-color: var(--color-border); }
    50% { border-color: var(--color-accent); }
}

/* Scroll Animation classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delay modifiers for staggered load */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Interactive Hover States */
.interactive-btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}
.interactive-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease-out;
}
.interactive-btn:active::after {
    transform: translate(-50%, -50%) scale(1);
    transition: transform 0s;
}

/* Card Hover */
.premium-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    transition: var(--transition-smooth);
}
.premium-card:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-premium);
}

/* Glassmorphism Classes */
.glass-header {
    background: rgba(250, 250, 248, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}
html.dark .glass-header {
    background: rgba(15, 15, 16, 0.8);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--color-border);
}
html.dark .glass-panel {
    background: rgba(26, 26, 28, 0.85);
}

/* Image Hover Zoom */
.image-zoom-container {
    overflow: hidden;
    position: relative;
}
.image-zoom-container img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.image-zoom-container:hover img {
    transform: scale(1.05);
}

/* Custom form styles */
.input-minimal {
    border-bottom: 1px solid var(--color-border) !important;
    background: transparent !important;
    transition: var(--transition-smooth);
}
.input-minimal:focus {
    border-color: var(--color-primary) !important;
    box-shadow: none !important;
}

/* Custom Notification Toast */
.toast-notification {
    position: fixed;
    bottom: 24px;
    right: -320px;
    z-index: 1000;
    max-width: 300px;
    padding: 16px 20px;
    background: var(--color-surface);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-premium);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast-notification.active {
    right: 24px;
}
