/* ==========================================================================
   1. Design Tokens & CSS Variables
   ========================================================================== */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --gradient: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   2. Reset & Structural Defaults
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   3. Typography & UI Elements
   ========================================================================== */
h1, h2, h3 {
    color: var(--secondary);
    font-weight: 800;
    line-height: 1.2;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 600;
    border-radius: var(--radius);
    text-decoration: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--bg-white);
}

.btn-secondary:hover {
    opacity: 0.9;
}

.btn-outline {
    border: 2px solid #e2e8f0;
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--bg-light);
    border-color: #cbd5e1;
}

.btn-light {
    background-color: var(--bg-white);
    color: var(--primary);
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* ==========================================================================
   4. Component Sections Layouts
   ========================================================================== */

/* Navbar Navigation */
.header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f1f5f9;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    color: var(--secondary);
    text-decoration: none;
}

.logo a span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

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

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

/* Hero Section Component */
.hero-section {
    padding: 80px 0;
    background: radial-gradient(100% 100% at 50% 0%, rgba(79, 70, 229, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* Built-in Dashboard CSS Mockup Graphic */
.hero-image-wrapper {
    position: relative;
}

.hero-dashboard-mock {
    width: 100%;
    height: 320px;
    background-color: var(--secondary);
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    display: flex;
    overflow: hidden;
}

.mock-sidebar {
    width: 60px;
    background-color: #1e293b;
    height: 100%;
}

.mock-content {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mock-chart {
    height: 120px;
    background: var(--gradient);
    opacity: 0.2;
    border-radius: 6px;
}

.mock-row {
    height: 16px;
    background-color: #334155;
    border-radius: 4px;
    width: 80%;
}
.mock-row:last-child {
    width: 50%;
}

/* Features Component CSS */
.features-section {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px auto;
}

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

.section-header p {
    color: var(--text-muted);
    font-size: 18px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-card {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.04);
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
}

.feature-card p {
    color: var(--text-muted);
}

/* Call To Action Banner styling */
.cta-section {
    padding: 80px 0;
}

.cta-wrapper {
    background: var(--gradient);
    border-radius: calc(var(--radius) * 2);
    padding: 60px;
    text-align: center;
    color: var(--bg-white);
}

.cta-wrapper h2 {
    color: var(--bg-white);
    font-size: 36px;
    margin-bottom: 16px;
}

.cta-wrapper p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Footer layout */
.footer {
    padding: 40px 0;
    border-top: 1px solid #f1f5f9;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ==========================================================================
   5. Responsive Adaptive Styles (Mobile First fallback)
   ========================================================================== */
@media (max-width: 768px) {
    .navbar {
        height: auto;
        padding: 20px 24px;
        flex-direction: column;
        gap: 16px;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 16px;
        width: 100%;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 32px;
    }

    .hero-content h1 {
        font-size: 36px;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
    }
    
    .cta-wrapper {
        padding: 40px 20px;
    }
}
