/* Earn To Invest — Ghost theme styles */

:root {
    --navy: #0F2340;
    --navy-2: #17305A;
    --navy-3: #2A4775;
    --blue: #1D4E89;
    --blue-dark: #143A6A;
    --green: #1F7A55;
    --gold: #F4C66A;
    --gold-dark: #6B4E0A;
    --ink: #0F2340;
    --muted: #4A5B72;
    --line: #9FB1C8;
    --bg: #F6F8FB;
    --tint: #E8EEF6;
    --white: #FFFFFF;
    --light-text: #C9D4E3;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --radius: 28px;
    --gutter: clamp(16px, 5vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:hover { color: var(--blue-dark); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 4vw, 52px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); }
p { margin: 0; }

.container { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 16px; }
.container-wide { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.center { text-align: center; }
.center-row { display: flex; justify-content: center; margin-top: 48px; }
.lead { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.6; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 999px; border: 2px solid transparent; font-family: inherit; font-size: 17px; font-weight: 600; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { min-height: 42px; padding: 0 20px; font-size: 16px; }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 18px; }
.btn-primary { background: var(--blue); color: var(--white); }
.btn-primary:hover { background: var(--blue-dark); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline:hover { color: var(--ink); background: var(--tint); }
.btn-gold { background: var(--gold); color: var(--navy); font-weight: 700; }
.btn-gold:hover { color: var(--navy); background: #F0B94A; }
.btn-outline-light { border-color: var(--white); color: var(--white); }
.btn-outline-light:hover { color: var(--navy); background: var(--white); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; }
.btn-col { display: flex; flex-direction: column; gap: 12px; flex-shrink: 0; }

/* Pills, chips, badges */
.pill { display: inline-block; padding: 7px 16px; border-radius: 999px; font-size: 15px; font-weight: 700; margin-bottom: 18px; }
.pill-gold { background: var(--gold); color: var(--navy); }
.pill-white { background: var(--white); color: var(--green); }
.chips, .chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 32px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); font-weight: 600; font-size: 16px; text-decoration: none; }
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip-active, .chip-active:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chip-outline { padding: 7px 14px; border-radius: 999px; border: 1.5px solid #3A5A88; font-size: 15px; font-weight: 600; color: var(--white); }
.chip-row { margin: 22px 0 0; }
.badge { display: inline-block; align-self: flex-start; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge-sponsored { background: var(--gold); color: var(--navy); margin-bottom: 8px; }
.badge-light { background: var(--tint); color: var(--muted); }
.eyebrow { font-family: var(--sans); font-size: 15px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 20px; }
.eyebrow-gold { color: var(--gold); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(246, 248, 251, .94); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(159, 177, 200, .3); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 84px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-logo { max-height: 44px; width: auto; }
.brand-name { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 32px; }
.nav { display: flex; gap: 32px; list-style: none; margin: 0; padding: 0; }
.nav a { color: var(--ink); text-decoration: none; font-size: 17px; font-weight: 500; }
.nav a:hover, .nav-current a { color: var(--blue); }
.menu-toggle { display: none; width: 44px; height: 44px; border: none; border-radius: 999px; background: var(--tint); color: var(--ink); align-items: center; justify-content: center; cursor: pointer; }

/* Sections */
.band { padding: clamp(56px, 8vw, 112px) 0; }
.band-white { background: var(--white); }
.band-tint { background: var(--tint); }
.band-navy { background: var(--navy); color: var(--white); }
.band-navy .lead { color: var(--light-text); }
.section-head { display: flex; flex-direction: column; gap: 16px; max-width: 780px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; align-items: center; }
.section-head.split { max-width: none; flex-direction: row; justify-content: space-between; align-items: flex-end; gap: 48px; }
.section-head.split > div:first-child { max-width: 780px; display: flex; flex-direction: column; gap: 16px; }
.section-head .pill { margin-bottom: 0; align-self: flex-start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }

/* Hero */
.hero { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px; align-items: center; padding-top: 64px; padding-bottom: 112px; }
.hero-copy { display: flex; flex-direction: column; gap: 24px; }
.hero-copy .pill { align-self: flex-start; margin-bottom: 0; background: #FDF0CF; color: var(--gold-dark); }
.hero-copy .lead { max-width: 560px; }
.hero-art { aspect-ratio: 1 / 1; max-height: 520px; border-radius: 40px; background: var(--tint); display: flex; align-items: center; justify-content: center; }
.hero-art svg { width: 80%; height: auto; }

/* Pillars & steps */
.pillar { padding: 40px; border-radius: var(--radius); background: var(--bg); display: flex; flex-direction: column; gap: 14px; }
.pillar p, .step p { color: var(--muted); }
.pillar-icon { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; }
.pillar-icon .tag-icon { width: 30px; height: 30px; stroke-width: 2; }
.icon-gold { background: #FDF0CF; color: var(--gold-dark); }
.icon-green { background: #DDF1E7; color: var(--green); }
.icon-blue { background: #DCE7F5; color: var(--blue); }
.step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.step h3 { font-family: var(--sans); font-size: 24px; font-weight: 700; }
.step p { max-width: 340px; }
.step-num { width: 72px; height: 72px; border-radius: 999px; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--serif); font-size: 32px; font-weight: 600; }

/* Post cards */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.post-card-link { height: 100%; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--white); overflow: hidden; color: var(--ink); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.post-card-link:hover { color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 35, 64, .1); }
.band-tint .post-card-link, .band-white .post-card-link { background: var(--white); }
.post-card-media { aspect-ratio: 16 / 9; background: #DCE7F5; color: var(--blue); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; }
.post-card-media .tag-icon { width: 80px; height: 80px; }
.tag-bg-investing { background: #DDF1E7; color: var(--green); }
.tag-bg-budgeting { background: #FDF0CF; color: var(--gold-dark); }
.tag-bg-finance { background: #DCE7F5; color: var(--blue); }
.post-card-body { padding: 28px 32px 32px; display: flex; flex-direction: column; gap: 12px; flex-grow: 1; }
.post-card-tag { font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); text-decoration: none; }
.tag-color-investing { color: var(--green); }
.tag-color-budgeting { color: var(--gold-dark); }
.tag-color-finance { color: var(--blue); }
.post-card-title { font-size: 25px; line-height: 1.25; }
.post-card-excerpt { font-size: 17px; color: var(--muted); }
.post-card-meta { margin-top: auto; padding-top: 6px; font-size: 15px; color: var(--muted); }
.empty-note { padding: 28px; border-radius: 20px; border: 2px dashed var(--line); color: var(--muted); font-size: 17px; }
.band-navy .empty-note { border-color: #3A5A88; color: var(--light-text); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 24px; margin-top: 56px; font-weight: 600; color: var(--muted); }
.pagination a { color: var(--blue); text-decoration: none; }

/* Magazine */
.mag { display: flex; flex-direction: column; }
.mag-grid { display: grid; grid-template-columns: 420px minmax(0, 1fr); gap: 72px; align-items: start; margin-bottom: 64px; }
.mag-cover { min-height: 560px; border-radius: 12px; background: var(--gold); color: var(--navy); padding: 36px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 24px 50px rgba(0, 0, 0, .3); }
.mag-cover-title { font-family: var(--serif); font-size: 34px; font-weight: 700; letter-spacing: .02em; border-bottom: 2px solid var(--navy); padding-bottom: 14px; }
.mag-cover-issue { font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.mag-cover-art { flex-grow: 1; display: flex; align-items: center; justify-content: center; }
.mag-cover-art svg { width: 160px; height: 160px; }
.mag-cover-headline { font-family: var(--serif); font-size: 34px; line-height: 1.1; font-weight: 700; }
.mag-cover-company { font-size: 16px; font-weight: 600; }
.mag-col { display: flex; flex-direction: column; gap: 20px; }
.mag-col .eyebrow { margin-bottom: 4px; }
.leader-card { display: flex; gap: 24px; align-items: center; padding: 24px; border-radius: 20px; background: var(--navy-2); color: var(--white); text-decoration: none; }
.leader-card:hover { color: var(--white); background: #1E3A69; }
.leader-photo { flex-shrink: 0; width: 88px; height: 88px; border-radius: 999px; background: var(--navy-3); overflow: hidden; }
.leader-photo img { width: 100%; height: 100%; object-fit: cover; }
.leader-text { display: flex; flex-direction: column; gap: 6px; }
.leader-title { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.2; }
.leader-byline { font-size: 16px; color: var(--light-text); }
.mag-companies { margin-bottom: 64px; }
.company-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.company-card { padding: 28px; border-radius: 20px; background: var(--white); color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: 12px; }
.company-card:hover { color: var(--ink); transform: translateY(-2px); }
.company-name { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.company-summary { font-size: 16px; color: var(--muted); }
.partner { padding: clamp(28px, 4vw, 56px); border-radius: 32px; background: var(--navy-2); display: flex; flex-direction: column; gap: 32px; color: var(--white); }
.partner-head { display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.partner-head h3 { font-size: clamp(28px, 3vw, 40px); }
.partner-head p { color: var(--light-text); }
.partner-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.partner-card { padding: 32px; border-radius: 20px; background: var(--navy); display: flex; flex-direction: column; gap: 12px; }
.partner-name { font-family: var(--serif); font-size: 24px; font-weight: 600; }
.partner-price { font-size: 28px; font-weight: 700; color: var(--gold); }
.partner-desc { font-size: 16px; color: var(--light-text); }
.partner .btn { align-self: flex-start; }
.mag-disclosure { margin-top: 40px; font-size: 15px; color: #A9B8CC; max-width: 1000px; }

/* About */
.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 80px; align-items: center; }
.about-photo { aspect-ratio: 1 / 1; max-height: 480px; border-radius: 40px; background: var(--tint); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-photo .brand-mark { width: 40%; height: auto; }
.about-copy { display: flex; flex-direction: column; gap: 20px; }

/* Subscribe */
.subscribe { margin: 0 0 96px; padding: clamp(32px, 5vw, 72px); border-radius: 40px; background: var(--blue); color: var(--white); display: flex; align-items: center; justify-content: space-between; gap: 48px; }
.subscribe-copy { display: flex; flex-direction: column; gap: 12px; max-width: 560px; }
.subscribe-copy h2 { font-size: clamp(30px, 3.4vw, 44px); }
.subscribe-copy p { color: #DCE7F5; font-size: 19px; }
.subscribe-form { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }
.subscribe-label { font-size: 15px; font-weight: 600; }
.subscribe-row { display: flex; gap: 12px; }
.subscribe-row input { width: 320px; min-height: 56px; padding: 0 20px; border-radius: 999px; border: none; font-size: 17px; font-family: inherit; color: var(--ink); }
.subscribe-row .btn { min-height: 56px; }
.form-msg { display: none; font-size: 15px; font-weight: 600; }
.subscribe-form.success .msg-success, .subscribe-form.error .msg-error { display: block; }
.subscribe-form.loading button { opacity: .6; pointer-events: none; }
.container-narrow .subscribe { flex-direction: column; align-items: flex-start; margin-top: 64px; }
.container-narrow .subscribe-row input { width: 100%; }

/* Page hero (blog/tag) */
.page-hero { padding: clamp(48px, 7vw, 96px) 0 8px; }
.page-hero .container { display: flex; flex-direction: column; gap: 16px; }
.page-hero .pill { align-self: flex-start; margin-bottom: 0; }
.page-hero .lead { max-width: 720px; }

/* Article */
.article { padding: clamp(40px, 6vw, 80px) 0 0; }
.article-header { display: flex; flex-direction: column; gap: 18px; margin-bottom: 40px; }
.article-title { font-size: clamp(36px, 5vw, 56px); }
.article-excerpt { font-size: 21px; color: var(--muted); }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 16px; color: var(--muted); }
.article-meta a { color: var(--ink); font-weight: 600; text-decoration: none; }
.sponsored-notice { padding: 16px 20px; border-radius: 16px; background: #FDF0CF; color: var(--gold-dark); font-size: 16px; border-left: 4px solid var(--gold); }
.article-image { margin: 0 auto 48px; }
.article-image img { width: 100%; border-radius: 24px; }
.article-image figcaption { margin-top: 10px; font-size: 15px; color: var(--muted); text-align: center; }
.article-footer { margin-top: 48px; }
.article-disclaimer { padding-top: 24px; border-top: 1px solid rgba(159, 177, 200, .5); font-size: 15px; color: var(--muted); }

/* Ghost content (editor output) */
.gh-content { display: grid; grid-template-columns: [full-start] minmax(16px, 1fr) [wide-start] minmax(0, 220px) [main-start] min(728px, calc(100% - 32px)) [main-end] minmax(0, 220px) [wide-end] minmax(16px, 1fr) [full-end]; font-size: 19px; line-height: 1.75; }
.gh-content > * { grid-column: main-start / main-end; margin: 0 0 1.4em; min-width: 0; overflow-wrap: break-word; }
.gh-content > .kg-width-wide { grid-column: wide-start / wide-end; }
.gh-content > .kg-width-full { grid-column: full-start / full-end; }
.gh-content > .kg-width-full img { width: 100%; }
.gh-content h2 { font-size: 34px; margin-top: 1.6em; margin-bottom: .5em; }
.gh-content h3 { font-size: 26px; margin-top: 1.4em; margin-bottom: .4em; }
.gh-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.gh-content blockquote { margin-left: 0; padding-left: 24px; border-left: 4px solid var(--gold); font-family: var(--serif); font-size: 24px; line-height: 1.4; }
.gh-content img { border-radius: 16px; }
.gh-content figcaption { font-size: 15px; color: var(--muted); text-align: center; margin-top: 8px; }
.gh-content ul, .gh-content ol { padding-left: 1.3em; }
.gh-content li + li { margin-top: .4em; }
.gh-content hr { border: none; border-top: 1px solid var(--line); margin: 2.4em 0; }
.gh-content pre { overflow-x: auto; padding: 20px; border-radius: 12px; background: var(--navy); color: var(--white); font-size: 15px; }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 17px; display: block; overflow-x: auto; }
.gh-content th, .gh-content td { padding: 10px 12px; border-bottom: 1px solid #D5DFEC; text-align: left; }

/* Error */
.error-page .container { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.error-code { font-family: var(--serif); font-size: 96px; font-weight: 700; color: var(--gold); line-height: 1; }

/* Footer */
.site-footer { background: var(--navy); color: var(--light-text); padding: 48px 0; }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-brand { font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--white); text-decoration: none; }
.footer-brand:hover { color: var(--white); }
.site-footer .nav { gap: 24px; flex-wrap: wrap; }
.site-footer .nav a { color: var(--light-text); font-size: 16px; }
.site-footer .nav a:hover { color: var(--white); }
.footer-disclaimer, .footer-copy { font-size: 14px; color: #A9B8CC; max-width: 900px; }
.footer-copy { margin-top: 10px; }

/* Responsive */
@media (max-width: 1100px) {
    .mag-grid { grid-template-columns: 1fr; gap: 40px; }
    .mag-cover { max-width: 420px; min-height: 480px; }
    .card-grid, .company-grid, .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    body { font-size: 17px; }
    .menu-toggle { display: inline-flex; }
    .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 16px; padding: 20px 16px 28px; background: var(--bg); border-bottom: 1px solid rgba(159, 177, 200, .4); }
    .site-nav.is-open { display: flex; }
    .site-nav .nav { flex-direction: column; gap: 4px; }
    .site-nav .nav a { display: block; padding: 10px 0; font-size: 18px; }
    .header-inner { min-height: 68px; }
    .brand-name { font-size: 20px; }
    .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 24px; padding-bottom: 56px; }
    .hero-art { max-height: 320px; aspect-ratio: auto; height: 300px; }
    .grid-3, .card-grid, .company-grid, .partner-grid, .about { grid-template-columns: 1fr; gap: 20px; }
    .about { gap: 24px; }
    .about-photo { max-height: 320px; }
    .pillar { padding: 28px; }
    .steps { gap: 32px; }
    .step { flex-direction: column; }
    .section-head { margin-bottom: 28px; }
    .section-head.split { flex-direction: column; align-items: flex-start; gap: 20px; }
    .btn-col, .btn-row { width: 100%; }
    .btn-row .btn, .btn-col .btn, .partner .btn { width: 100%; }
    .post-card-body { padding: 22px 24px 26px; }
    .post-card-title { font-size: 22px; }
    .leader-card { padding: 18px; gap: 16px; }
    .leader-photo { width: 64px; height: 64px; }
    .leader-title { font-size: 19px; }
    .subscribe { flex-direction: column; align-items: stretch; gap: 20px; border-radius: 28px; margin-bottom: 56px; }
    .subscribe-form, .subscribe-row { width: 100%; }
    .subscribe-row { flex-direction: column; }
    .subscribe-row input { width: 100%; }
    .chip { padding: 0 16px; font-size: 15px; }
    .chip-outline { font-size: 13px; padding: 6px 12px; }
    .gh-content { font-size: 18px; }
}
