/* ===== DESIGN TOKENS ===== */
:root {
    --bg: #0a0a0f;
    --bg-raised: #12121a;
    --bg-card: #181824;
    --bg-card-hover: #1e1e2e;
    --surface: #22223a;
    --border: #2a2a40;
    --border-hover: #3a3a55;
    --text: #e8e8ed;
    --text-muted: #8888a0;
    --text-dim: #55556a;
    --accent: #00e5cc;
    --accent-glow: rgba(0, 229, 204, 0.15);
    --accent-dim: #00b3a0;
    --amber: #ffb84d;
    --red: #ff5a5a;
    --green: #4ade80;
    --radius: 10px;
    --radius-lg: 16px;
    --font-display: 'Outfit', sans-serif;
    --font-body: 'DM Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

/* ===== NOISE TEXTURE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes scanline {
    0% { top: -4px; }
    100% { top: 100%; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===== NAV ===== */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 1.3rem;
    letter-spacing: 0.04em;
    color: var(--text);
}

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

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

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.5rem;
    font-size: 0.9rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-accent {
    background: var(--accent);
    color: var(--bg);
    box-shadow: 0 0 20px var(--accent-glow);
}

.btn-accent:hover {
    background: #33edd9;
    box-shadow: 0 0 30px rgba(0, 229, 204, 0.3);
    transform: translateY(-1px);
}

.btn-accent:disabled {
    background: var(--surface);
    color: var(--text-dim);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.btn-ghost:hover {
    color: var(--text);
    border-color: var(--border-hover);
    background: var(--bg-raised);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.btn-lg {
    padding: 0.85rem 2rem;
    font-size: 1rem;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    padding: 6rem 2rem 5rem;
    max-width: 800px;
    margin: 0 auto;
}

.hero > * {
    animation: fadeUp 0.7s ease both;
}

.hero-badge {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent);
    background: var(--accent-glow);
    border: 1px solid rgba(0, 229, 204, 0.2);
    padding: 0.4rem 1rem;
    border-radius: 100px;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.hero-title-accent {
    background: linear-gradient(135deg, var(--accent) 0%, var(--amber) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 1.5rem 2rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 480px;
    margin: 0 auto;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.stat-num {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-dim);
    letter-spacing: 0.02em;
}

.stat-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* ===== FEATURES ===== */
.features {
    padding: 5rem 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.features-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    font-family: var(--font-display);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    transition: all 0.3s ease;
    animation: fadeUp 0.6s ease both;
}

.feature-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.feature-icon-wrap {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-glow);
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.feature-icon {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.feature-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ===== HOW IT WORKS / PIPELINE ===== */
.how-it-works {
    padding: 3rem 2rem 6rem;
    max-width: 700px;
    margin: 0 auto;
}

.pipeline {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.pipeline-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.25s;
}

.pipeline-step:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
}

.step-num {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--accent);
    line-height: 1;
    min-width: 40px;
    padding-top: 2px;
}

.step-content h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.88rem;
    color: var(--text-muted);
}

.pipeline-connector {
    width: 2px;
    height: 20px;
    background: var(--border);
    margin-left: 2.7rem;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* ===== FORM PAGES (LOGIN / REGISTER) ===== */
.form-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.form-container {
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    animation: fadeUp 0.5s ease both;
}

.form-container h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
}

.form-group {
    margin-bottom: 1.25rem;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.95rem;
    font-family: var(--font-body);
    transition: border-color 0.2s;
}

.form-group input::placeholder {
    color: var(--text-dim);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-submit {
    width: 100%;
    margin-top: 0.5rem;
}

.error-message {
    background: rgba(255, 90, 90, 0.1);
    border: 1px solid rgba(255, 90, 90, 0.2);
    color: var(--red);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.success-message {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.2);
    color: var(--green);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ===== LOADING SPINNER ===== */
.loading {
    text-align: center;
    padding: 1.5rem;
    display: none;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 0.75rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav {
        padding: 1rem 1.25rem;
    }

    .hero {
        padding: 4rem 1.25rem 3rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .features, .how-it-works {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-lg {
        width: 100%;
    }
}
