/* ==========================================================================
   ClickMedia Core Styles & Design System (2026)
   ========================================================================== */

/* 1. Imports & Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* 2. Theme Variables & Custom Properties */
:root {
    /* Fonts */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Transition Speeds */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);

    /* Border Radii */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Spacing Grid */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-xxl: 6rem;

    /* Dark Mode (Default) Colors */
    --bg-primary: #070a13;
    --bg-secondary: #0c1020;
    --bg-tertiary: #121832;
    --bg-glass: rgba(255, 255, 255, 0.02);
    --bg-glass-hover: rgba(255, 255, 255, 0.05);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Neon Accent Colors */
    --accent-purple: #8b5cf6;
    --accent-pink: #ec4899;
    --accent-cyan: #06b6d4;
    --accent-blue: #3b82f6;
    --accent-green: #10b981;
    
    --grad-primary: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --grad-cyan: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --grad-dark: linear-gradient(180deg, #070a13 0%, #0c1020 100%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 20px rgba(139, 92, 246, 0.25);
    --shadow-glow-cyan: 0 0 20px rgba(6, 182, 212, 0.25);
}

/* Light Mode Overrides */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --bg-glass: rgba(0, 0, 0, 0.015);
    --bg-glass-hover: rgba(0, 0, 0, 0.035);
    
    --border-color: rgba(0, 0, 0, 0.08);
    --border-color-hover: rgba(0, 0, 0, 0.15);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --grad-dark: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.08);
    --shadow-glow: 0 4px 20px rgba(139, 92, 246, 0.12);
    --shadow-glow-cyan: 0 4px 20px rgba(6, 182, 212, 0.12);
}

/* 3. Base Resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Heading Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
}

h1 { font-size: 2.75rem; letter-spacing: -0.03em; }
h2 { font-size: 2.25rem; letter-spacing: -0.02em; }
h3 { font-size: 1.75rem; letter-spacing: -0.01em; }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast), opacity var(--transition-fast);
}

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

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

/* 4. Common Utilities & Layouts */
.content-wrapper {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

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

@media (max-width: 768px) {
    .section-padding {
        padding: var(--space-xl) 0;
    }
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.85rem; }
    h3 { font-size: 1.45rem; }
}

/* Responsive Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-md); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Flex Alignments */
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.flex-column { display: flex; flex-direction: column; }

/* Gradient Text Effect */
.text-gradient {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

/* Ambient Mouse Glow Element */
.mouse-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, rgba(6, 182, 212, 0.03) 50%, rgba(0, 0, 0, 0) 70%);
    border-radius: var(--radius-full);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease;
    opacity: 0;
}

body:hover .mouse-glow {
    opacity: 1;
}

/* Background Ambient Orbs */
.orb {
    position: absolute;
    border-radius: var(--radius-full);
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

.orb-1 {
    top: 10%;
    left: -10%;
    width: 45vw;
    height: 45vw;
    background: rgba(139, 92, 246, 0.2);
}

.orb-2 {
    bottom: 20%;
    right: -10%;
    width: 40vw;
    height: 40vw;
    background: rgba(6, 182, 212, 0.15);
}

/* 5. Scroll Animations (Intersection Observer) */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Delay modifiers for sequential animations */
.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; }
