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

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #dbeafe;
    --dark: #0f172a;
    --text: #475569;
    --text-light: #94a3b8;
    --light: #f8fafc;
    --white: #fff;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }

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

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

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon { font-size: 1.3rem; }

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

.nav-links a {
    color: var(--text);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

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

.nav-highlight {
    background: var(--primary) !important;
    color: var(--white) !important;
}

.nav-highlight:hover {
    background: var(--primary-dark) !important;
    color: var(--white) !important;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--dark);
    transition: all 0.3s;
}

/* ===== Hero ===== */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, #1e3a5f 100%);
    color: var(--white);
    padding: 80px 0;
}

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

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.75);
    margin-bottom: 32px;
    max-width: 500px;
    line-height: 1.7;
}

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

/* Login Card */
.login-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius);
    padding: 32px;
}

.login-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--white);
}

.login-card .form-group { margin-bottom: 16px; }

.login-card label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.login-card input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: var(--white);
    font-family: var(--font);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.login-card input:focus {
    border-color: var(--primary);
    background: rgba(255,255,255,0.15);
}

.login-card input::placeholder { color: rgba(255,255,255,0.4); }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

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

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

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

/* Hero button variants */
.hero .btn-outline {
    color: rgba(255,255,255,0.9);
    border-color: rgba(255,255,255,0.3);
}

.hero .btn-outline:hover {
    border-color: var(--white);
    color: var(--white);
}

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

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

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

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

.btn-full { width: 100%; }

/* ===== Sections ===== */
.section { padding: 80px 0; }
.section-alt { background: var(--light); }

.section-title {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
}

.section-sub {
    color: var(--text-light);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto 48px;
}

/* ===== Steps ===== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.step-card {
    text-align: center;
    padding: 40px 24px;
}

.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Features ===== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.feature-icon {
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.feature h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.feature p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* ===== Trade Section ===== */
.trade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.trade-content p {
    margin-bottom: 16px;
}

.trade-content .btn { margin-top: 12px; }

.trade-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ===== News ===== */
.news-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    max-height: 400px;
    overflow-y: auto;
}

.news-container h3,
.news-container h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
    margin-top: 16px;
}

.news-container p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 8px 0;
}

/* ===== CTA ===== */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 80px 0;
}

.cta h2 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 12px;
}

.cta p {
    color: rgba(255,255,255,0.8);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: var(--text-light);
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer h4 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer ul { display: flex; flex-direction: column; gap: 8px; }

.footer a {
    color: var(--text-light);
    font-size: 0.9rem;
}

.footer a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    font-size: 0.8rem;
    text-align: center;
    color: rgba(255,255,255,0.4);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero { padding: 60px 0; }

    .login-card { max-width: 400px; }

    .trade-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .features-grid { grid-template-columns: repeat(2, 1fr); }

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

@media (max-width: 640px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 64px; left: 0; right: 0; bottom: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
        border-top: 1px solid var(--border);
        z-index: 99;
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        display: block;
        padding: 12px 16px;
        font-size: 1rem;
    }

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

    .trade-stats { grid-template-columns: 1fr 1fr; }

    .footer-grid { grid-template-columns: 1fr; gap: 30px; }

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

    .section { padding: 60px 0; }
    .cta { padding: 60px 0; }
}

/* Toggle animation */
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
