/* That Works - Master CSS Design System */

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

/* =================== CSS VARIABLES =================== */
:root {
    /* Colors - Light Mode */
    --primary-bg: #fefdfb;
    --secondary-bg: #f9f8f6;
    --accent-bg: #fffffe;
    --text-primary: #1a1a1a;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Accent Colors */
    --accent-color: #ff6b35;
    --accent-hover: #e55a2e;
    --secondary-accent: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    /* Borders & Shadows */
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    
    /* Gradients */
    --gradient: linear-gradient(135deg, #ff6b35 0%, #8b5cf6 100%);
    --warm-gradient: linear-gradient(135deg, #ff8a65 0%, #ffb74d 100%);
    --subtle-gradient: linear-gradient(135deg, rgba(255, 107, 53, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    
    /* 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;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* Colors - Dark Mode */
    --primary-bg: #0a0a0a;
    --secondary-bg: #111111;
    --accent-bg: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #6b7280;
    
    /* Borders & Shadows */
    --border-color: #333333;
    --border-light: #2a2a2a;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.6);
    
    /* Gradients stay the same - they look great on both */
    --subtle-gradient: linear-gradient(135deg, rgba(255, 107, 53, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

/* =================== TYPOGRAPHY =================== */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* Text Styles */
.text-large { font-size: 1.25rem; }
.text-small { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

.text-bold { font-weight: 700; }
.text-semibold { font-weight: 600; }
.text-medium { font-weight: 500; }

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

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

/* =================== LAYOUT UTILITIES =================== */
.container {
    max-width: 95vw;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-xl);
}

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

.section-lg {
    padding: 6rem 0;
}

/* Flexbox Utilities */
.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-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Grid Utilities */
.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

/* =================== COMPONENTS =================== */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 1rem;
    line-height: 1;
}

.btn-primary {
    background: var(--gradient);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    background: linear-gradient(135deg, #e55a2e 0%, #7c3aed 100%);
}

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

.btn-secondary:hover {
    border-color: var(--accent-color);
    background: rgba(255, 107, 53, 0.1);
}

.btn-outline {
    background: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background: var(--accent-color);
    color: white;
}

/* Button Sizes */
.btn-sm { padding: var(--space-sm) var(--space-md); font-size: 0.875rem; }
.btn-lg { padding: var(--space-lg) var(--space-2xl); font-size: 1.125rem; }

/* Cards */
.card {
    background: var(--accent-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-xl);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers content vertically */
    align-items: center;
    min-height: 400px; /* Increased height to accommodate hover content */
    max-height: 400px; /* Fixed height prevents displacement */
    text-align: center;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--gradient);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.card:hover::before {
    transform: scaleX(1);
}
.card:hover .card-content {
    transform: translateY(-25px);
    transition: transform 1s ease;
}
.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-xl);
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 1s ease;
}

.card-detail {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    right: var(--space-md);
    background: var(--subtle-gradient);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.card:hover .card-detail {
     opacity: 1;
    transform: translateY(0);
}
/* Agent Cards (Special Component) */
.agent-card {
    background: var(--accent-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.agent-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--subtle-gradient);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.agent-card:hover::before {
    opacity: 1;
}

.agent-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 25px 50px rgba(255, 107, 53, 0.15);
}

.agent-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--space-lg);
    position: relative;
    z-index: 1;
}

/* Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(254, 254, 254, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all var(--transition-normal);
}

[data-theme="dark"] header {
    background: rgba(10, 10, 10, 0.9);
}

/* Light mode header with warmth */
header {
    background: rgba(254, 253, 251, 0.9);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-normal);
}

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

/* Hero Sections */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 0 var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.06) 0%, transparent 70%);
    animation: heroGlow 6s ease-in-out infinite;
}

@keyframes heroGlow {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.05); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--space-md);
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
}

.hero-ctas {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* =================== RESPONSIVE DESIGN =================== */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-ctas {
        flex-direction: column;
        align-items: center;
    }
    
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: var(--space-2xl) 0;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .agent-card {
        padding: var(--space-lg);
    }
}
@media (max-width: 900px) {
    .grid-3 {
        grid-template-columns: 1fr !important;
    }
}

/* =================== UTILITY CLASSES =================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }

.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }

/* Dark Mode Toggle */
.theme-toggle {
    position: relative;
    width: 60px;
    height: 30px;
    background: var(--border-color);
    border-radius: 15px;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    outline: none;
}

.theme-toggle::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .theme-toggle {
    background: var(--secondary-accent);
}

[data-theme="dark"] .theme-toggle::before {
    transform: translateX(30px);
    background: var(--primary-bg);
}

.theme-toggle:hover {
    transform: scale(1.05);
}
