:root {
    --color-primary: #1a56db;
    --color-primary-dark: #1341a8;
    --color-primary-light: #e8f0fe;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-bg: #ffffff;
    --color-bg-alt: #f9fafb;
    --color-bg-dark: #111827;
    --color-border: #e5e7eb;
    --color-white: #ffffff;
    --radius: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px 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);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.nav-links a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

/* Main content */
.main-content {
    flex: 1;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.hero-text {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
    cursor: pointer;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.btn-outline {
    background: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

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

/* Sections */
.section {
    padding: 4rem 0;
}

.section-light {
    background: var(--color-bg);
}

.section-dark {
    background: var(--color-bg-dark);
    color: var(--color-white);
}

.section-dark .section-title {
    color: var(--color-white);
}

.section-title {
    font-size: 1.875rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-text);
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, transform 0.2s;
}

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

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.card p {
    color: var(--color-text-light);
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

/* Steps */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.step h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Footer */
.footer {
    background: var(--color-bg-dark);
    color: var(--color-text-light);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.875rem;
    margin-top: auto;
}

/* 404 / 500 */
.error-page {
    text-align: center;
    padding: 6rem 0;
}

.error-page h1 {
    font-size: 4rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.error-page .btn {
    margin-top: 1.5rem;
}

/* Wagtail admin override for login page */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--color-white);
        border-bottom: 1px solid var(--color-border);
        padding: 1rem;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .section {
        padding: 2.5rem 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }
}
