/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --accent: #8b5cf6;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-light: linear-gradient(135deg, #818cf8, #a78bfa);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 2rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Account for fixed navbar */
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.25rem; }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
}

p {
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 6rem 1rem;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--gray);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.8;
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0); 
    }
    50% { 
        transform: translateY(-5px); 
    }
}

.fade-in { animation: fadeIn 1s ease; }
.fade-in-up { animation: fadeInUp 1s ease; }
.pulse { animation: pulse 2s infinite; }
.float { animation: float 3s ease-in-out infinite; }

.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }

/* ===== CASES POPUP ===== */
.cases-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2001; /* Above contact popup */
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.cases-popup.show {
    opacity: 1;
    visibility: visible;
}

.cases-popup .popup-content {
    position: relative;
    max-width: 900px;
    margin: 2rem auto;
    background: var(--dark-light);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

.cases-popup.show .popup-content {
    transform: translateY(0);
}

/* Header */
.cases-popup .popup-header {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cases-popup .popup-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
}

.cases-popup .popup-header h2 {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.cases-popup .popup-header p {
    color: var(--gray-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.2);
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: var(--light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.stat-description {
    color: var(--gray);
    font-size: 0.75rem;
}

/* Cases Grid */
.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.case-category {
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.case-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.category-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.category-header h3 {
    color: var(--light);
    font-size: 1.1rem;
    margin: 0;
}

.case-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.case-items li {
    color: var(--gray-light);
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    position: relative;
    padding-left: 1.5rem;
}

.case-items li:last-child {
    border-bottom: none;
}

.case-items li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: bold;
}

/* Case Examples */
.case-examples {
    padding: 0 2rem 2rem;
}

.case-examples h3 {
    color: var(--light);
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.3rem;
}

.examples-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.example {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.example:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
    border-color: var(--primary);
}

.example-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.example-content h4 {
    color: var(--light);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.example-content p {
    color: var(--gray);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

/* Footer */
.cases-popup .popup-footer {
    padding: 1.5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.cases-popup .popup-footer p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.contact-btn {
    padding: 0.75rem 2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    .cases-popup .popup-content {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .cases-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 1.5rem;
    }
    
    .example {
        flex-direction: column;
        text-align: center;
    }
    
    .example-icon {
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .case-category {
        padding: 1rem;
    }
}
