/* InvestEarly — site-wide stylesheet. Mobile-first. Dark theme (Capital.com-inspired). */

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

:root {
    --bg: #0c0b09;
    --card: #161918;
    --card-2: #1e2220;
    --ink: #e9ece9;
    --muted: #9aa59e;
    --line: #262b28;
    --green: #2fbf71;
    --green-dark: #27a862;
    --green-ink: #0b0d0c;
    --green-pale: rgba(47, 191, 113, 0.12);
    --amber: #e8b04b;
    --amber-pale: rgba(232, 176, 75, 0.12);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.7;
    font-size: 17px;
}

/* Gold silk wash fading in from the top-right (Capital.com-style) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('bg-gold.svg') top right / 120% auto no-repeat;
    pointer-events: none;
    z-index: -1;
}
@media (max-width: 720px) {
    body::before { background-size: 220% auto; }
}

/* ---------- Header & nav ---------- */

.site-header {
    background: rgba(11, 13, 12, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25em;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.logo .logo-mark { flex: 0 0 auto; display: block; }
.logo span { color: var(--green); }

.nav-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: block;
}
.nav-toggle .bar {
    display: block;
    width: 24px;
    height: 3px;
    background: var(--ink);
    border-radius: 2px;
    margin: 4px 0;
}

.site-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: var(--bg);
}
.site-nav.open { display: block; }
.site-nav a {
    display: block;
    padding: 14px 20px;
    color: var(--ink);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid var(--line);
}
.site-nav a:last-child { border-bottom: none; }
.site-nav a.active { color: var(--green); }
.site-nav a:hover { background: var(--card); }

@media (min-width: 720px) {
    .nav-toggle { display: none; }
    .site-nav {
        display: flex !important;
        border-top: none;
        background: none;
    }
    .header-inner { padding: 0 20px; }
    .header-row { display: flex; align-items: center; justify-content: space-between; max-width: 960px; margin: 0 auto; }
    .site-nav a { border-bottom: none; padding: 20px 14px; }
}

/* ---------- Layout ---------- */

main {
    max-width: 680px;
    margin: 0 auto;
    padding: 36px 20px 56px;
}

.page-hero { margin-bottom: 30px; }
.page-hero h1 {
    font-size: 2em;
    line-height: 1.22;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    color: #fff;
    font-weight: 700;
}
.page-hero .lede { font-size: 1.1em; color: var(--muted); }

h2 { font-size: 1.35em; margin: 38px 0 12px; line-height: 1.3; color: #fff; }
h3 { font-size: 1.1em; margin: 26px 0 8px; color: #fff; }
p  { margin-bottom: 16px; }
ul, ol { margin: 0 0 16px 22px; }
li { margin-bottom: 6px; }
a  { color: var(--green); }

/* ---------- Components ---------- */

.callout {
    border-radius: 18px;
    padding: 16px 18px;
    margin: 20px 0;
    background: var(--green-pale);
    border: 1px solid rgba(47, 191, 113, 0.35);
}
.callout.warn {
    background: var(--amber-pale);
    border-color: rgba(232, 176, 75, 0.35);
}
.callout.warn .callout-title { color: var(--amber); }
.callout .callout-title { font-weight: 600; display: block; margin-bottom: 4px; color: var(--green); }

.stat-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.stat {
    flex: 1 1 140px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px 16px;
    text-align: center;
}
.stat .stat-number { font-size: 1.6em; font-weight: 700; color: var(--green); display: block; }
.stat .stat-label { font-size: 0.85em; color: var(--muted); }

.btn {
    display: inline-block;
    background: var(--green);
    color: var(--green-ink);
    font-weight: 700;
    text-decoration: none;
    padding: 14px 26px;
    border-radius: 999px;
    border: none;
    font-size: 1em;
    cursor: pointer;
}
.btn:hover { background: var(--green-dark); }

/* ---------- Comparison table → cards on mobile ---------- */

.compare { margin: 20px 0; border-collapse: collapse; width: 100%; }
.compare caption {
    text-align: left;
    font-size: 0.85em;
    color: var(--muted);
    margin-bottom: 8px;
}

/* Mobile: each row becomes a card */
.compare thead { display: none; }
.compare tr {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 20px;
    margin-bottom: 12px;
    padding: 10px 18px;
}
.compare td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.95em;
}
.compare td:last-child { border-bottom: none; }
.compare td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
}
.compare td.row-title {
    font-weight: 700;
    font-size: 1.05em;
    justify-content: flex-start;
    color: #fff;
}
.compare td.row-title::before { content: none; }

/* Desktop: normal table */
@media (min-width: 720px) {
    .compare thead { display: table-header-group; }
    .compare tr { display: table-row; background: none; border: none; padding: 0; }
    .compare tbody tr { background: var(--card); }
    .compare td, .compare th {
        display: table-cell;
        padding: 12px 14px;
        border: 1px solid var(--line);
        text-align: left;
    }
    .compare td::before { content: none; }
    .compare th { background: var(--card-2); font-size: 0.9em; color: var(--muted); }
}

/* ---------- Signup block ---------- */

.signup-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 26px 20px;
    margin: 40px 0 0;
    text-align: center;
}
.signup-block .lead { font-weight: 600; margin-bottom: 14px; color: #fff; }
.signup-block form { display: flex; flex-direction: column; gap: 10px; }
.signup-block input[type="text"],
.signup-block input[type="email"] {
    width: 100%;
    padding: 13px 18px;
    font-size: 1em;
    font-family: inherit;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg);
    color: var(--ink);
    outline: none;
}
.signup-block input:focus { border-color: var(--green); }
.signup-block .small-print { font-size: 0.8em; color: var(--muted); margin-top: 12px; }
@media (min-width: 720px) {
    .signup-block form { flex-direction: row; }
    .signup-block input { flex: 1; }
}

/* ---------- Footer ---------- */

.site-footer {
    border-top: 1px solid var(--line);
    background: var(--bg);
    margin-top: 44px;
}
.footer-inner {
    max-width: 680px;
    margin: 0 auto;
    padding: 24px 20px 40px;
    font-size: 0.8em;
    color: var(--muted);
    line-height: 1.7;
}
.footer-inner .disclaimer {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.footer-inner a { color: var(--muted); }
