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

:root {
    --primary: #0F172A;
    --secondary: #1E293B;
    --accent: #3B82F6;
    --accent-light: #60A5FA;
    --text: #F1F5F9;
    --text-muted: #94A3B8;
    --gradient: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

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

/* Subtle background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Navigation */
nav {
    padding: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    border-color: var(--accent);
    color: var(--accent-light);
}

/* Hero Section */
.hero {
    padding: 7rem 0 5rem;
    text-align: center;
}

h1 {
    font-size: 3.75rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--text) 0%, var(--text-muted) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 0;
}

h2 {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text);
}

.steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    margin-top: 3.5rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.step {
    background: var(--secondary);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.step:hover::before {
    transform: scaleX(1);
}

.step:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.step p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.footer-section a {
    display: block;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-light);
}

.footer-bottom {
    text-align: start;
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Scroll animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.home-button {
    color: white;
    text-decoration: underline;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.2s; }
.step:nth-child(3) { animation-delay: 0.3s; }
.step:nth-child(4) { animation-delay: 0.4s; }

/* Subtle glow effect for emphasis */
.glow {
    position: relative;
}

.glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.step:hover .glow::after {
    opacity: 1;
}

/* ─── Tablet (≤ 768px) ─── */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 4.5rem 0 3rem;
    }

    h1 {
        font-size: 2.75rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .how-it-works {
        padding: 4rem 0;
    }

    h2 {
        font-size: 2rem;
    }

    /* Stack steps into a single column */
    .steps {
        grid-template-columns: 1fr;
        gap: 1.75rem;
        margin-top: 2.5rem;
    }

    .step {
        padding: 2rem;
    }

    /* Stack footer into a single column, centered */
    footer {
        margin-top: 3rem;
    }

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

    .footer-section a {
        display: block;
        text-align: center;
    }

    .footer-bottom {
        text-align: center;
    }
}

/* ─── Mobile (≤ 480px) ─── */
@media (max-width: 480px) {
    .container {
        padding: 0 1.25rem;
    }

    nav {
        padding: 1.25rem 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-link {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }

    .hero {
        padding: 3rem 0 2.5rem;
    }

    h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.7;
    }

    .how-it-works {
        padding: 3rem 0;
    }

    h2 {
        font-size: 1.75rem;
    }

    /* Stack cards into a single column */
    .steps {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        margin-top: 2rem;
    }

    .step {
        padding: 1.75rem;
    }

    .step-number {
        width: 42px;
        height: 42px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .step h3 {
        font-size: 1.25rem;
        margin-bottom: 0.6rem;
    }

    .step p {
        font-size: 0.95rem;
    }

    /* Footer stacks into a single column */
    footer {
        padding: 3rem 0 1.5rem;
        margin-top: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }
}