/**
 * VSCG Design System
 * Modern, sophisticated, AI-expert positioning
 * World-class UX with native-like behavior
 */

/* ============================================
   CSS VARIABLES - Design Tokens
   ============================================ */
:root {
    /* Primary Colors */
    --primary-navy: #0A0A0A;
    /* VSCG Gold Refresh */
    --primary-gold: #e5c168; /* Luxury Gold Light */
    --accent-gold: #c19141;  /* Luxury Gold Mid */
    --accent-amber: #986c3c; /* Luxury Gold Deep */
    --gold-600: #b28433;
    --gold-700: #986c3c;
    --gold-800: #574d39;
    --gold-contrast: #33383d;
    
    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;
    --black: #000000;
    
    /* Dark Backgrounds */
    --dark-900: #000000;
    --dark-800: #0A0A0A;
    --dark-700: #1A1A1A;
    --dark-600: #4A4A4A;
    
    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #e5c168 0%, #c19141 50%, #986c3c 100%);
    --gradient-gold: linear-gradient(135deg, #986c3c 0%, #c19141 50%, #e5c168 100%);
    --gradient-ai: linear-gradient(135deg, #e5c168 0%, #c19141 33%, #986c3c 66%, #b28433 100%);
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
    
    /* Font Sizes */
    --text-xs: 0.75rem;      /* 12px */
    --text-sm: 0.875rem;     /* 14px */
    --text-base: 1rem;       /* 16px */
    --text-lg: 1.125rem;     /* 18px */
    --text-xl: 1.25rem;      /* 20px */
    --text-2xl: 1.5rem;      /* 24px */
    --text-3xl: 1.875rem;    /* 30px */
    --text-4xl: 2.25rem;     /* 36px */
    --text-5xl: 3rem;        /* 48px */
    --text-6xl: 3.75rem;     /* 60px */
    
    /* Font Weights */
    --font-light: 300;
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    /* Spacing (8px grid) */
    --space-1: 0.5rem;   /* 8px */
    --space-2: 1rem;     /* 16px */
    --space-3: 1.5rem;   /* 24px */
    --space-4: 2rem;     /* 32px */
    --space-5: 2.5rem;   /* 40px */
    --space-6: 3rem;     /* 48px */
    --space-8: 4rem;     /* 64px */
    --space-10: 5rem;    /* 80px */
    --space-12: 6rem;    /* 96px */
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-gold: 0 8px 25px rgba(240, 185, 11, 0.3);
    --shadow-teal: 0 8px 25px rgba(0, 198, 183, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-Index Scale */
    --z-base: 0;
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    line-height: 1.6;
    color: var(--white);
    background: var(--dark-900);
    overflow-x: hidden;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-bold);
    line-height: 1.2;
    margin-bottom: var(--space-2);
    color: var(--white);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
    margin-bottom: var(--space-2);
    color: var(--gray-300);
}

a {
    color: var(--primary-gold);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-gold);
}

/* Text Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-ai {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--primary-gold) 50%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

/* ============================================
   GLASS MORPHISM
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(240, 185, 11, 0.2);
    border-radius: var(--radius-xl);
    transition: all var(--transition-slow);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
    border-color: rgba(240, 185, 11, 0.4);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: 0.75rem 1.5rem;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
    white-space: nowrap;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--accent-gold) 100%);
    color: var(--dark-900);
    border: none;
    box-shadow: 0 4px 12px rgba(240, 185, 11, 0.3);
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-gold) 0%, var(--primary-gold) 100%);
    box-shadow: 0 6px 20px rgba(240, 185, 11, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--primary-gold);
}

.btn-secondary:hover {
    background: var(--primary-gold);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-300);
    border: 1px solid var(--gray-600);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: var(--text-sm);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: var(--text-lg);
}

.btn-icon {
    padding: 0.75rem;
    aspect-ratio: 1;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--dark-800);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    transition: all var(--transition-slow);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-stat {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(240, 185, 11, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    text-align: center;
    transition: all var(--transition-slow);
}

.card-stat:hover {
    transform: translateY(-6px);
    border-color: rgba(240, 185, 11, 0.5);
    box-shadow: var(--shadow-gold);
}

.card-stat-value {
    font-size: var(--text-5xl);
    font-weight: var(--font-bold);
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: var(--space-1);
}

.card-stat-label {
    font-size: var(--text-sm);
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   FORMS
   ============================================ */
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: var(--text-base);
    font-family: var(--font-primary);
    color: var(--white);
    background: var(--dark-800);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.1);
}

.form-control::placeholder {
    color: var(--gray-500);
}

.form-label {
    display: block;
    margin-bottom: var(--space-1);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--gray-300);
}

.form-group {
    margin-bottom: var(--space-3);
}

/* Floating Labels */
.form-floating {
    position: relative;
}

.form-floating .form-control {
    padding: 1.25rem 1rem 0.5rem;
}

.form-floating label {
    position: absolute;
    top: 0;
    left: 1rem;
    padding: 1rem 0 0;
    pointer-events: none;
    transition: all var(--transition-base);
    color: var(--gray-500);
}

.form-floating .form-control:focus ~ label,
.form-floating .form-control:not(:placeholder-shown) ~ label {
    transform: translateY(-0.5rem) scale(0.85);
    color: var(--primary-gold);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 0.375rem 0.875rem;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.badge-primary {
    background: rgba(240, 185, 11, 0.15);
    color: var(--primary-gold);
    border: 1px solid rgba(240, 185, 11, 0.3);
}

.badge-secondary {
    background: rgba(255, 215, 0, 0.15);
    color: var(--accent-gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--error);
    border: 1px solid var(--error);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    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 float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

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

.animate-fade-in {
    animation: fadeIn var(--transition-slow) ease-out;
}

.animate-slide-in-left {
    animation: slideInLeft var(--transition-slow) ease-out;
}

.animate-slide-in-right {
    animation: slideInRight var(--transition-slow) ease-out;
}

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

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

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent-gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--space-4);
}

.section {
    padding: var(--space-10) 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }

/* Brand intro/logo helpers */
.brand-intro {
    text-align: center;
    margin-bottom: var(--space-2);
}

.brand-logo {
    height: 180px;
    width: auto;
    display: inline-block;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    :root {
        --text-5xl: 2.25rem;
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
    }
    
    .container {
        padding: 0 var(--space-2);
    }
    
    .section {
        padding: var(--space-6) 0;
    }
}

/* ============================================
   NATIVE-LIKE BEHAVIOR (PWA)
   ============================================ */
/* Remove tap highlight on mobile */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Smooth scrolling for iOS */
body {
    -webkit-overflow-scrolling: touch;
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
    body {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
}

/* Pull-to-refresh prevention */
body {
    overscroll-behavior-y: contain;
}

/* Native-like transitions */
.page-transition {
    animation: fadeIn 0.2s ease-out;
}

/* iOS-style momentum scrolling */
.scroll-smooth {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}
