*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --dark: #0f172a;
    --dark-mid: #1e293b;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;
    --white: #ffffff;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .1), 0 1px 2px rgba(0, 0, 0, .06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ── NAV ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow .3s;
}

.nav.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--dark);
}

.logo-icon {
    width: 34px;
    height: 34px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 20px;
    height: 20px;
    fill: var(--white);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: .9rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: color .2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--primary);
    color: var(--white) !important;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .875rem;
    transition: background .2s, transform .15s;
}

.nav-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ── HERO ── */
.hero {
    padding: 160px 24px 100px;
    text-align: center;
    background: linear-gradient(180deg, var(--gray-50) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -200px;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37, 99, 235, .06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-inner {
    max-width: 780px;
    margin: 0 auto;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 28px;
    box-shadow: var(--shadow);
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.025em;
    color: var(--dark);
    margin-bottom: 20px;
}

.hero h1 span {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.2rem;
    color: var(--gray-600);
    max-width: 620px;
    margin: 0 auto 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all .2s;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(37, 99, 235, .35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, .4);
}

.btn-outline {
    background: var(--white);
    color: var(--gray-700);
    border: 1.5px solid var(--gray-300);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent);
    color: var(--dark);
    box-shadow: 0 4px 14px rgba(245, 158, 11, .3);
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
}

.hero-speed {
    font-size: .9rem;
    color: var(--gray-400);
    margin-bottom: 36px;
}

.hero-speed strong {
    color: var(--gray-600);
}

/* ── TRUST LINE ── */
.trust-bar {
    padding: 20px 24px;
    background: var(--dark);
    text-align: center;
}

.trust-bar p {
    font-size: .95rem;
    color: var(--gray-300);
    font-weight: 500;
    letter-spacing: .01em;
}

.trust-bar strong {
    color: var(--white);
}

/* ── FEATURES ── */
.features {
    padding: 100px 24px;
    background: var(--white);
}

.features-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-label {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 16px;
    letter-spacing: -.02em;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 560px;
    margin-bottom: 56px;
    line-height: 1.7;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    padding: 32px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    transition: all .3s;
    background: var(--white);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.feature-icon.blue   { background: #dbeafe; color: var(--primary); }
.feature-icon.green  { background: #d1fae5; color: #059669; }
.feature-icon.purple { background: #ede9fe; color: #7c3aed; }
.feature-icon.amber  { background: #fef3c7; color: #d97706; }
.feature-icon.red    { background: #fee2e2; color: #dc2626; }
.feature-icon.teal   { background: #ccfbf1; color: #0d9488; }

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.feature-card p {
    font-size: .925rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ── HOW IT WORKS ── */
.how {
    padding: 100px 24px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.how-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 56px;
    text-align: center;
}

.step {
    position: relative;
}

.step-num {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 6px;
}

.step p {
    font-size: .85rem;
    color: var(--gray-600);
    line-height: 1.5;
}

/* ── COMPATIBILITY ── */
.compat {
    padding: 48px 24px;
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.compat-inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.compat p {
    font-size: .95rem;
    color: var(--gray-600);
    margin-bottom: 24px;
    font-weight: 500;
}

.compat-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.compat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--gray-700);
}

.compat-item svg {
    width: 28px;
    height: 28px;
}

/* ── CTA / SIGNUP SECTION ── */
.cta-section {
    padding: 100px 24px;
    background: var(--gray-50);
}

.cta-inner {
    max-width: 580px;
    margin: 0 auto;
    text-align: center;
}

.cta-inner .section-title {
    margin-bottom: 12px;
}

.cta-desc {
    font-size: 1.05rem;
    color: var(--gray-600);
    margin-bottom: 40px;
    line-height: 1.7;
}

.signup-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .925rem;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group .input-error {
    border-color: var(--danger);
}

.form-group .error-text {
    font-size: .78rem;
    color: var(--danger);
    margin-top: 4px;
    display: none;
}

.form-group .error-text.show {
    display: block;
}

.mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mode-option {
    position: relative;
}

.mode-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.mode-option label {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all .2s;
    margin-bottom: 0;
}

.mode-option label .mode-title {
    font-weight: 600;
    font-size: .9rem;
    color: var(--dark);
}

.mode-option label .mode-desc {
    font-weight: 400;
    font-size: .78rem;
    color: var(--gray-500);
    margin-top: 2px;
}

.mode-option input:checked + label {
    border-color: var(--primary);
    background: rgba(37, 99, 235, .04);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.form-submit {
    margin-top: 8px;
}

.form-submit .btn {
    width: 100%;
    justify-content: center;
    padding: 15px 28px;
    font-size: 1.05rem;
}

.form-microcopy {
    text-align: center;
    margin-top: 14px;
    font-size: .82rem;
    color: var(--gray-400);
}

.form-trust {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    font-size: .82rem;
    color: var(--gray-500);
    line-height: 1.5;
}

/* ── FOOTER ── */
.footer {
    padding: 48px 24px;
    background: var(--dark);
    color: var(--gray-400);
    text-align: center;
    font-size: .875rem;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-links {
    display: flex;
    gap: 24px;
    list-style: none;
}

.footer-links a {
    color: var(--gray-400);
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--white);
}

/* ── ALERT MESSAGES ── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: .9rem;
    margin-bottom: 20px;
    display: none;
}

.alert.show {
    display: block;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ── LOADING SPINNER ── */
.btn .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}

.btn.loading .spinner {
    display: block;
}

.btn.loading .btn-text {
    opacity: .6;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── AUTH PAGES ── */
.auth-page {
    padding: 120px 24px 80px;
    min-height: 100vh;
    background: var(--gray-50);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-size: .95rem;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 4px;
}

.auth-form {
    margin-top: 28px;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-footer-text {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
    font-size: .875rem;
    color: var(--gray-500);
}

.auth-footer-text a {
    color: var(--primary);
    font-weight: 600;
}

.auth-footer-text a:hover {
    text-decoration: underline;
}

.auth-icon-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dbeafe;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.auth-icon-circle.success {
    background: #d1fae5;
    color: #059669;
}

.auth-icon-circle.error {
    background: #fee2e2;
    color: #dc2626;
}

/* ── PASSWORD INPUT ── */
.input-password-wrap {
    position: relative;
}

.input-password-wrap input {
    width: 100%;
    padding: 11px 44px 11px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .925rem;
    font-family: inherit;
    color: var(--gray-900);
    background: var(--white);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.input-password-wrap input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.input-password-wrap input::placeholder {
    color: var(--gray-400);
}

.pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pw-toggle:hover {
    color: var(--gray-600);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hero {
        padding: 130px 20px 70px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-sub {
        font-size: 1.05rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .steps {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .mode-options {
        grid-template-columns: 1fr;
    }

    .signup-form {
        padding: 28px 20px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 16px;
    }

    .compat-logos {
        gap: 24px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .steps {
        grid-template-columns: 1fr;
    }
}
