/* 
   EODD Studio Base Styles 
   Premium, Modern, Human-Centric UI
*/

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

:root {
    /* Color Palette */
    --primary: #4F46E5; /* Indigo */
    --primary-hover: #4338CA;
    --secondary: #10B981; /* Emerald */
    --success: #10B981;
    --danger: #EF4444; /* Red 500 */
    --accent: #F59E0B; /* Amber */
    --bg-color: #F8FAFC; /* Slate 50 */
    --surface: #FFFFFF;
    --text-main: #0F172A; /* Slate 900 */
    --text-muted: #475569; /* Slate 600 - High Contrast Accessibility Fix */
    --border-color: #E2E8F0;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Layout */
    --max-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
p { margin-bottom: 1rem; color: var(--text-muted); }
a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-hover); }

/* Layout Containers */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 4rem; /* Increased from 1.5rem for better breathing room on edges */
}

.section {
    padding: 5rem 0;
}

/* Header & Navigation */
.site-header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    color: white;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    background-color: var(--bg-color);
    border-color: var(--text-muted);
}
.btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Cards & Glassmorphism */
.card {
    background-color: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

/* Progress Tracker */
.progress-tracker {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.progress-tracker::-webkit-scrollbar {
    height: 6px;
}
.progress-tracker::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}
.progress-tracker::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}
.progress-step {
    flex: 1;
    flex-shrink: 0;
    min-width: 110px;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
a.progress-step:hover {
    background: #e2e8f0;
    color: var(--text-main);
}
a.progress-step.completed:hover {
    background: #d1fae5;
}
a.progress-step.active:hover {
    background: rgba(79, 70, 229, 0.15);
}
.progress-step.active {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary);
    border-color: rgba(79, 70, 229, 0.2);
}
.progress-step.completed {
    background: #ecfdf5;
    color: #10b981;
    border-color: #a7f3d0;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.9rem;
}
.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--surface);
    box-shadow: 0 1px 2px rgba(0,0,0,0.01) inset;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background-color: #fff;
}

/* Hero Section */
.hero {
    padding: 8rem 0 6rem;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGNpcmNsZSBjeD0iMiIgY3k9IjIiIHI9IjEiIGZpbGw9InJnYmEoNzksIDcwLCAyMjksIDAuMSkiLz48L3N2Zz4=');
    pointer-events: none;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, #9333ea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

/* Footer */
.site-footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

/* Dashboard Sidebar Layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}
.sidebar {
    width: 280px;
    background-color: var(--surface);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    flex-shrink: 0;
}
.main-content {
    flex-grow: 1;
    padding: 3rem 4rem;
    background-color: var(--bg-color);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Responsive Grid Utilities */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.split-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.even-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Mobile Responsiveness Rules */
@media (max-width: 768px) {
    .app-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
    }
    
    .sidebar nav {
        flex-direction: column !important;
        flex-wrap: nowrap;
        gap: 0.5rem !important;
    }
    
    .sidebar nav a {
        flex: 1 1 auto;
        font-size: 0.85rem;
        padding: 0.5rem;
        justify-content: center !important;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        padding: 0 1rem;
    }
    
    .stats-grid,
    .split-grid,
    .even-grid {
        grid-template-columns: 1fr !important;
    }
    
    .card {
        padding: 1.25rem;
    }
    
    /* Ensure form and flex headers wrap on tight screens */
    header {
        flex-wrap: wrap;
    }
    
    /* Make inputs not overflow */
    .form-control {
        max-width: 100%;
    }
    
    /* Adjust specific nested layout pieces that may overflow horizontally */
    [style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    /* Public Site Header & Navigation */
    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding-bottom: 0.5rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        gap: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }

    /* Disable Sticky Side Layouts on Mobile */
    .card[style*="position: sticky"] {
        position: relative !important;
        top: auto !important;
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    /* Flatten hardcoded 1fr 1fr grids */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}
