/* ============================================
   STOXTRENDS - Base Styles
   Variables, Reset, Typography
   ============================================ */

/* CSS Variables */
:root {
    /* Colors - Obsidian + Amber Theme */
    --bg-primary: #0B0E14;
    --bg-secondary: #0f1219;
    --bg-tertiary: #121826;
    --bg-card: rgba(18, 24, 38, 0.7);
    --bg-card-hover: rgba(18, 24, 38, 0.9);
    
    /* Accent Colors - Amber/Gold */
    --accent-primary: #F5B301;
    --accent-primary-glow: rgba(245, 179, 1, 0.3);
    --accent-secondary: #3A86FF;
    --accent-secondary-glow: rgba(58, 134, 255, 0.3);
    --accent-warning: #f59e0b;
    --accent-danger: #EF4444;
    --accent-success: #10b981;
    
    /* Text Colors */
    --text-primary: #F8FAFC;
    --text-secondary: #9CA3AF;
    --text-muted: #6b7280;
    --text-accent: #F5B301;
    
    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(245, 179, 1, 0.3);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #F5B301 0%, #D4950C 100%);
    --gradient-secondary: linear-gradient(135deg, #3A86FF 0%, #1d4ed8 100%);
    --gradient-dark: linear-gradient(180deg, #0B0E14 0%, #121826 100%);
    --gradient-glow: radial-gradient(ellipse at center, rgba(245, 179, 1, 0.15) 0%, transparent 70%);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(245, 179, 1, 0.2);
    --shadow-glow-blue: 0 0 40px rgba(58, 134, 255, 0.2);
    
    /* Typography */
    --font-heading: 'Sora', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-tooltip: 400;
    --z-max: 999;
}

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

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

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

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

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

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

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

a:hover {
    color: var(--text-primary);
}

ul, ol {
    list-style: none;
}

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

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

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

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

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

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

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 800px;
}

/* Section Spacing */
.section {
    padding: var(--space-4xl) 0;
    position: relative;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

.section-lg {
    padding: calc(var(--space-4xl) * 1.5) 0;
}

/* Text Utilities */
.text-center {
    text-align: center;
}

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

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

.text-accent {
    color: var(--accent-primary);
}

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

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

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

/* Highlight */
.highlight {
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: var(--accent-primary-glow);
    z-index: -1;
    transform: skewX(-5deg);
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive Breakpoints Reference:
   Mobile: < 640px
   Tablet: 640px - 1024px
   Desktop: > 1024px
*/

@media (max-width: 1024px) {
    :root {
        --space-4xl: 4rem;
    }
}

@media (max-width: 640px) {
    :root {
        --space-4xl: 3rem;
        --space-3xl: 2.5rem;
        --space-2xl: 2rem;
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}
