/* 
   StackMorph Design System 
   Theme: Sleek, Dim & Elegant (Muted Indigo + Deep Charcoal)
*/

:root {
    /* Colors - Elegant & Dim */
    --bg-main: #030712; /* Deepest Charcoal/Black */
    --bg-secondary: #0f172a; /* Slightly lighter for sections */
    
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.06);
    --card-hover-bg: rgba(255, 255, 255, 0.06);
    
    /* Muted, Sophisticated Accents */
    --primary: #6366f1; /* Soft Indigo */
    --primary-soft: rgba(99, 102, 241, 0.2);
    --accent: #a5b4fc; /* Pale Indigo/Lavender */
    
    --text-main: #f8fafc; /* Off-white, easier on eyes */
    --text-muted: #94a3b8; /* Cool Grey */
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);

    /* Typography */
    --font-main: 'Inter', sans-serif;
    
    /* Spacing & Radius */
    --container-width: 1200px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Native app feel */
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Subtle Background Glow */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(165, 180, 252, 0.05) 0%, transparent 40%);
    z-index: -1;
    pointer-events: none;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.02em; /* Tight, modern tracking */
}

h1 {
    font-size: 3.75rem;
    background: linear-gradient(to bottom right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; font-weight: 600; }

p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    font-weight: 400;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

/* Modern Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--text-main);
    color: var(--bg-main);
    border: 1px solid white;
}

.btn-primary:hover {
    background: #e2e8f0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.15);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Navbar */
.navbar {
    height: var(--header-height);
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(3, 7, 18, 0.8); /* Translucent dark */
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-main);
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-main);
    position: relative;
}

.hamburger::before, .hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--text-main);
    left: 0;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 6px; }

/* Hero Section */
.hero {
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 100px;
    text-align: center;
    position: relative;
}

.hero h1 {
    margin-bottom: 24px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero .subtitle {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Trust Bar */
.trust-bar {
    padding: 40px 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
    text-align: center;
}

.trust-bar p {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 24px;
}

.logos {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: opacity 0.3s;
}

.logos:hover { opacity: 0.8; }

.logos span {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
}

/* Cards Grid */
.grid-section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 70px;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 32px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.card:hover {
    background: var(--card-hover-bg);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.card-icon {
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--accent);
}

.card-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.card p {
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Stats/Outcomes Section */
.stats-section {
    padding: 80px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    background: linear-gradient(to bottom, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
}

.stat-item p {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Forms */
.form-container {
    max-width: 560px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 40px;
    border-radius: var(--radius-md);
    border: 1px solid var(--card-border);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(0, 0, 0, 0.4);
    box-shadow: 0 0 0 2px var(--primary-soft);
}

/* Footer */
.footer {
    background: var(--bg-main);
    padding: 80px 0 40px;
    border-top: 1px solid var(--card-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--text-main);
    margin-bottom: 20px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--text-main);
}

.footer-bottom {
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid var(--card-border);
    color: #64748b;
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3rem; }
    .container { padding: 0 32px; }
}

@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    
    /* Navbar Mobile Fixes */
    .navbar {
        background: rgba(3, 7, 18, 0.98); /* Almost opaque for visibility */
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        right: 0; /* Slide from right */
        left: auto;
        width: 70%; /* Drawer style */
        height: calc(100vh - var(--header-height));
        background: var(--bg-main);
        flex-direction: column;
        padding: 40px;
        gap: 30px;
        transform: translateX(100%); /* Hide to right */
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 998;
        border-left: 1px solid var(--card-border);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-actions .btn {
        display: none; 
    }
    
    .hero {
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: 60px;
    }

    .grid-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .container { padding: 0 20px; }
    
    .hero .subtitle {
        font-size: 1rem;
    }

    .logos {
        gap: 20px;
    }
    
    .logos span {
        font-size: 0.8rem;
    }

    .card {
        padding: 24px;
    }

    .form-container {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        width: 100%;
    }
    
    .hero-cta {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
}
