/* ==========================================================================
   BASE STYLES - Reset, Variables, Typography
   ========================================================================== */

/* CSS Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* CSS Variables */
:root {
    /* Colors - Sophisticated palette */
    --color-bg-primary: #0F172A;
    --color-bg-secondary: #1E293B;
    --color-bg-tertiary: #334155;
    
    --color-accent-green: #10B981;
    --color-accent-amber: #F59E0B;
    --color-accent-blue: #3B82F6;
    --color-accent-teal: #14B8A6;
    
    --color-text-primary: #F8FAFC;
    --color-text-secondary: #CBD5E1;
    --color-text-tertiary: #94A3B8;
    
    --color-border: #334155;
    --color-border-light: #475569;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
    --gradient-accent: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --gradient-subtle: linear-gradient(180deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    
    /* Typography */
    --font-display: 'Playfair Display', Georgia, serif;
    --font-heading: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(59, 130, 246, 0.3);
    
    /* Transitions */
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index */
    --z-cursor: 9999;
    --z-nav: 1000;
    --z-overlay: 999;
    --z-modal: 998;
}

/* Typography Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--color-text-secondary);
    font-size: 1.0625rem;
    line-height: 1.75;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-base);
}

ul, ol {
    list-style: none;
}

img, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
}

/* Selection */
::selection {
    background-color: var(--color-accent-blue);
    color: var(--color-bg-primary);
}

::-moz-selection {
    background-color: var(--color-accent-blue);
    color: var(--color-bg-primary);
}

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

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-bg-tertiary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-border-light);
}

/* Utility Classes */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-balance {
    text-wrap: balance;
}

/* Responsive Typography */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }
    
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
}
