/* ==========================================================
   Bux Markets — main stylesheet
   Colors: navy #191c25 / #25283a, green #3cc88f, light #edf1f5
   ========================================================== */

:root {
    --navy-900: #12131c;
    --navy-800: #191c25;
    --navy-700: #25283a;
    --navy-600: #30344b;
    --green: #3cc88f;
    --green-dark: #2ea373;
    --green-soft: #e6f8f0;
    --text: #434f53;
    --text-muted: #6b7377;
    --light: #edf1f5;
    --white: #ffffff;
    --border: #e1e6ec;
    --radius: 14px;
    --shadow: 0 10px 30px rgba(25, 28, 37, .08);
    --container: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; transition: color .2s, background-color .2s, border-color .2s; }

h1, h2, h3, h4 { color: var(--navy-700); margin: 0 0 .5em; line-height: 1.2; }

p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 20px;
    padding: 11px 24px;
    border: 2px solid var(--green);
    border-radius: 35px;
    background: var(--green);
    color: var(--white);
    cursor: pointer;
    transition: .3s;
    white-space: nowrap;
}

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

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

.btn-lg { padding: 15px 38px; font-size: 15px; }

/* ---------- Ticker ---------- */
.ticker { background: var(--navy-800); min-height: 46px; }

/* ---------- Header / Navbar ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 1px 0 var(--border);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 78px;
}

.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.logo-mark { width: 40px; height: 40px; }

.logo-text {
    font-size: 22px;
    font-weight: 800;
    font-style: italic;
    letter-spacing: .02em;
    color: var(--navy-700);
}

.nav-menu { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }

.nav-item { position: relative; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--navy-700);
    background: none;
    border: 0;
    font-family: inherit;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active { color: var(--green); }

.nav-link .caret { width: 10px; height: 10px; transition: transform .2s; }

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 8px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: .2s;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.nav-item:hover .caret { transform: rotate(180deg); }

.dropdown a {
    display: block;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.dropdown a:hover, .dropdown a.active { background: var(--green-soft); color: var(--green-dark); }

.nav-actions { display: flex; gap: 10px; margin-left: 10px; }

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    background: none;
    color: var(--green);
    cursor: pointer;
    padding: 10px;
}

.nav-toggle span { display: block; height: 3px; margin: 5px 0; background: currentColor; border-radius: 2px; transition: .3s; }

.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile menu */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    padding: 10px 0 20px;
    max-height: calc(100vh - 78px);
    overflow-y: auto;
}

.mobile-nav.show { display: block; }

.mobile-nav .group-title {
    padding: 14px 24px 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.mobile-nav a.m-link {
    display: block;
    padding: 11px 24px;
    font-weight: 600;
    color: var(--navy-700);
}

.mobile-nav a.m-link:hover, .mobile-nav a.m-link.active { background: var(--green); color: var(--white); }

.mobile-nav .m-actions { display: flex; gap: 10px; padding: 16px 24px 0; }
.mobile-nav .m-actions .btn { flex: 1; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 130px 0 140px;
    text-align: center;
    color: var(--white);
    background:
        radial-gradient(circle at 15% 20%, rgba(60, 200, 143, .25), transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(60, 200, 143, .18), transparent 45%),
        linear-gradient(135deg, var(--navy-900), var(--navy-700));
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-chart {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 55%;
    opacity: .5;
    pointer-events: none;
}

.hero .container { position: relative; }

.hero-eyebrow {
    display: inline-block;
    padding: 6px 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(60, 200, 143, .5);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--green);
}

.hero h1 {
    font-size: clamp(34px, 5.5vw, 62px);
    font-weight: 800;
    color: var(--white);
    margin-bottom: 18px;
}

.hero h1 em { font-style: normal; color: var(--green); }

.hero p {
    max-width: 640px;
    margin: 0 auto 36px;
    font-size: clamp(16px, 2vw, 20px);
    color: rgba(255, 255, 255, .8);
}

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

.hero .btn-outline { color: var(--white); border-color: rgba(255, 255, 255, .5); }
.hero .btn-outline:hover { background: var(--white); color: var(--navy-700); border-color: var(--white); }

/* ---------- Page header (inner pages) ---------- */
.page-header {
    padding: 64px 0 56px;
    text-align: center;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 0%, rgba(60, 200, 143, .25), transparent 45%),
        linear-gradient(135deg, var(--navy-900), var(--navy-700));
}

.page-header h1 { color: var(--white); font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin: 0; }

.breadcrumb { margin-top: 10px; font-size: 14px; color: rgba(255, 255, 255, .6); }
.breadcrumb a:hover { color: var(--green); }

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

.section-title {
    text-align: center;
    font-size: clamp(26px, 3.4vw, 36px);
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    margin: 18px auto 0;
    border-radius: 2px;
    background: var(--green);
}

.section-sub { max-width: 640px; margin: 0 auto 50px; text-align: center; color: var(--text-muted); }

/* Cards grid */
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
    padding: 34px 30px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: transform .3s, box-shadow .3s;
}

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

.card-center { text-align: center; }

.card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    border-radius: 16px;
    background: var(--green-soft);
    color: var(--green-dark);
}

.card-icon svg { width: 28px; height: 28px; }

.card h3 { font-size: 19px; font-weight: 700; }

.card p { margin: 0; color: var(--text-muted); font-size: 15px; }

/* CTA band */
.cta-band {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 50px 56px;
    border-radius: 20px;
    color: var(--white);
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, .18), transparent 40%),
        linear-gradient(120deg, var(--green-dark), var(--green));
}

.cta-band h2 { color: var(--white); font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; margin: 0; }
.cta-band p { margin: 6px 0 0; font-size: 18px; font-style: italic; opacity: .9; }

.cta-band .btn { background: var(--white); color: var(--green-dark); border-color: var(--white); }
.cta-band .btn:hover { background: transparent; color: var(--white); }

/* Contact block */
.contact-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: 20px;
    background: var(--navy-700);
}

.contact-info {
    padding: 56px 50px;
    color: rgba(255, 255, 255, .8);
    background:
        radial-gradient(circle at 0% 100%, rgba(60, 200, 143, .3), transparent 50%),
        var(--navy-800);
}

.contact-info h2 { color: var(--white); font-size: 32px; font-weight: 800; }

.contact-list { list-style: none; margin: 30px 0 0; padding: 0; }

.contact-list li { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }

.contact-list .ci {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(60, 200, 143, .15);
    color: var(--green);
}

.contact-list .ci svg { width: 20px; height: 20px; }

.contact-list a:hover { color: var(--green); }

.contact-form { padding: 56px 50px; }

.contact-form h3 { color: var(--white); font-size: 24px; margin-bottom: 24px; }

.form-field { margin-bottom: 16px; }

.form-field input,
.form-field textarea {
    width: 100%;
    padding: 14px 18px;
    font-family: inherit;
    font-size: 15px;
    color: var(--white);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 10px;
    outline: none;
    transition: border-color .2s, background-color .2s;
}

.form-field input::placeholder,
.form-field textarea::placeholder { color: rgba(255, 255, 255, .5); }

.form-field input:focus,
.form-field textarea:focus { border-color: var(--green); background: rgba(255, 255, 255, .1); }

.form-field.error input,
.form-field.error textarea { border-color: #ff6b6b; }

.form-note { margin-top: 14px; font-size: 14px; min-height: 22px; }
.form-note.ok { color: var(--green); }
.form-note.err { color: #ff8a8a; }

/* ---------- Content pages ---------- */
.content-box {
    max-width: 900px;
    margin: 0 auto;
    padding: 46px 50px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.content-box p { font-size: 17px; }
.content-box h2 { font-size: 24px; margin-top: 1.4em; }
.content-box h2:first-child { margin-top: 0; }
.content-box ul { padding-left: 20px; margin: 0 0 1em; }
.content-box li { margin-bottom: 6px; }

.widget-box {
    padding: 16px;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.widget-box + .widget-title { margin-top: 70px; }

.widget-title {
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    padding-left: 14px;
    border-left: 4px solid var(--green);
}

.tradingview-widget-container { width: 100%; }

/* ---------- Tables ---------- */
.table-wrap {
    overflow-x: auto;
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.table th,
.table td {
    padding: 15px 18px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table tbody tr:nth-child(odd) { background: #f7f9fb; }
.table tbody tr:hover { background: var(--green-soft); }

.table tbody th {
    text-align: left;
    font-weight: 600;
    color: var(--navy-700);
    white-space: normal;
    min-width: 220px;
}

.table thead th {
    background: var(--navy-700);
    color: var(--white);
    font-weight: 600;
    border-bottom: 0;
}

.table thead th .tier { display: block; font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.table thead th .tier-price { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: var(--green); }

.table .check { color: var(--green); }
.table .check svg { width: 20px; height: 20px; display: inline-block; vertical-align: middle; }
.table .dash { color: #b8c0c6; }

/* Spreads table */
.spreads-table thead tr:first-child th { padding-top: 20px; padding-bottom: 18px; }
.spreads-table thead tr + tr th { background: var(--navy-600); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 10px 14px; }
.spreads-table thead tr:nth-child(3) th { background: #3a3e5a; color: rgba(255, 255, 255, .8); }
.spreads-table .sep { border-left: 2px solid var(--green); }
.spreads-table thead th.sep { border-left-color: rgba(60, 200, 143, .5); }
.spreads-table tbody td:first-child { text-align: left; font-weight: 700; color: var(--navy-700); position: sticky; left: 0; background: inherit; }
.spreads-table tbody tr { background: var(--white); }
.spreads-table tbody tr:nth-child(odd) { background: #f7f9fb; }
.spreads-table thead th.pair-col { text-align: left; vertical-align: middle; }

.table-note { margin-top: 18px; font-size: 14px; color: var(--text-muted); text-align: center; }

/* Account tier cards */
.tiers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 50px; }

.tier-card {
    position: relative;
    padding: 30px 24px;
    text-align: center;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: .3s;
}

.tier-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--green); }

.tier-card.featured { border: 2px solid var(--green); }

.tier-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--white);
    background: var(--green);
}

.tier-card h3 { font-size: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.tier-card .from { font-size: 13px; color: var(--text-muted); }

.tier-card .amount { font-size: 34px; font-weight: 800; color: var(--navy-700); margin: 4px 0 20px; }

.tier-card .btn { width: 100%; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-700); color: rgba(255, 255, 255, .7); padding-top: 70px; font-size: 15px; }

.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr; gap: 30px; padding-bottom: 50px; }

.footer-brand .logo-text { color: var(--white); }

.footer-brand p { margin-top: 18px; font-size: 14px; }

.footer-col h4 {
    color: var(--white);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 18px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }

.footer-col li { margin-bottom: 10px; }

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

.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 3px; color: var(--green); }

.footer-risk {
    padding: 26px 0;
    border-top: 1px solid rgba(255, 255, 255, .1);
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
    color: rgba(255, 255, 255, .55);
}

.footer-risk strong { color: rgba(255, 255, 255, .8); }

.footer-bottom {
    padding: 20px 0;
    background: var(--navy-800);
    font-size: 13px;
    color: rgba(255, 255, 255, .5);
}

.footer-bottom .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Back to top */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(60, 200, 143, .4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: .3s;
}

.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top svg { width: 20px; height: 20px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
    .nav-menu, .nav-actions { display: none; }
    .nav-toggle { display: block; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
    .tiers { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .contact-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .section { padding: 64px 0; }
    .hero { padding: 90px 0 100px; }
    .grid-3 { grid-template-columns: 1fr; }
    .tiers { grid-template-columns: 1fr; }
    .cta-band { padding: 36px 28px; text-align: center; justify-content: center; }
    .contact-info, .contact-form { padding: 40px 26px; }
    .content-box { padding: 30px 24px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-bottom .container { justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
}
