/* ============================================================
   Millionaire Core — Ghost theme
   Design tokens approximated from the Figma design.
   Adjust the :root values to match exact dev-mode specs.
   ============================================================ */

:root {
    /* Palette */
    --green-900: #182E23;   /* deepest – footer / hero base */
    --green-800: #182F23;   /* header, dark sections */
    --green-700: #1B3024;   /* guides / feature cards */
    --green-600: #24412F;   /* card hover / borders on dark */
    --gold:      #C8A24B;   /* primary accent */
    --gold-soft: #D9BE78;   /* hover / lighter accent */
    --cream:     #F6F5F1;   /* light section bg */
    --white:     #FFFFFF;
    --ink:       #1A1A1A;   /* primary text on light */
    --ink-soft:  #6E6E6E;   /* muted text on light */
    --line:      #E7E5DF;   /* hairlines on light */
    --on-dark:   #F3F2EC;   /* text on dark */
    --on-dark-soft: #B9C2B7;

    /* Type */
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Layout */
    --container: 1440px;
    --container-pad: 72px;
    --container-narrow: 760px;
    --radius: 12px;        /* post cards, video cards */
    --radius-btn: 8px;     /* buttons, inputs */
    --radius-sm: 8px;
    --gap: 36px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1rem; }

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

.section { padding: 80px 0; }
.section--flush-top { padding-top: 0; }
.section--dark { background: var(--green-800); color: var(--on-dark); }
.section--cream { background: var(--cream); }
.section__head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section__head h2 { margin-bottom: .4em; }
.section__head p { color: var(--ink-soft); }
.section--dark .section__head h2 { color: var(--on-dark); }
.section--dark .section__head p { color: var(--on-dark-soft); }
.text-gold { color: var(--gold); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 13px 26px; border-radius: var(--radius-btn);
    font-weight: 600; font-size: .95rem; line-height: 1;
    border: 1.5px solid transparent; transition: all .18s ease;
    text-align: center;
}
.btn--light   { background: var(--white); color: var(--green-900); }
.btn--light:hover { background: var(--gold-soft); }
.btn--gold    { background: var(--gold); color: var(--green-900); }
.btn--gold:hover { background: var(--gold-soft); }
.btn--outline { background: transparent; color: var(--ink); border-color: currentColor; }
.btn--outline:hover { background: var(--ink); color: var(--white); }
.btn--green   { background: var(--green-700); color: var(--on-dark); }
.btn--green:hover { background: var(--green-600); }
.btn--dark    { background: var(--green-900); color: var(--on-dark); }
.btn--block   { display: flex; width: 100%; }

/* ---------- Header ---------- */
.site-header { background: var(--green-800); color: var(--on-dark); position: sticky; top: 0; z-index: 50; }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.site-header__left { display: flex; align-items: center; gap: 14px; }
.site-logo img { height: 34px; width: auto; }
.site-logo__crest { height: 34px; }
.site-search { background: none; border: 0; color: var(--on-dark); display: inline-flex; padding: 6px; border-radius: 6px; }
.site-search:hover { color: var(--gold); }

.site-nav { flex: 1; }
.site-nav__list { display: flex; gap: 30px; justify-content: center; list-style: none; margin: 0; padding: 0; }
.site-nav__list .nav-item { list-style: none; margin: 0; }
.site-nav__list a { color: var(--on-dark); font-size: .95rem; font-weight: 500; padding: 6px 0; transition: color .15s; }
.site-nav__list a:hover,
.site-nav__list .nav-current a { color: var(--gold); }

.site-header__right { margin-left: auto; }
.site-nav__toggle { display: none; flex-direction: column; gap: 4px; background: none; border: 0; padding: 8px; }
.site-nav__toggle span { width: 22px; height: 2px; background: var(--on-dark); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: var(--on-dark); padding: 56px 0 0; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.site-footer__title { font-family: var(--font-display); color: var(--gold); font-size: 1.5rem; margin: 0 0 .3em; }
.site-footer__tagline { color: var(--on-dark-soft); margin: 0; max-width: 420px; }
.site-footer__nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.site-footer__nav a { color: var(--on-dark-soft); font-size: .9rem; }
.site-footer__nav a:hover { color: var(--gold); }
.site-footer__bottom {display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 22px; padding-bottom: 28px; }
.site-footer__copy { color: var(--on-dark-soft); font-size: .82rem; margin: 0; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--green-900); color: var(--on-dark); overflow: hidden; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(180deg, rgba(15,28,20,.55) 0%, rgba(15,28,20,.62) 55%, rgba(15,28,20,.78) 100%); }
.hero__inner { position: relative; z-index: 2; text-align: center; max-width: 1296px; margin: 80px auto; padding: 10px 56px 56px;
    border-radius: 16px; border: 1px solid rgba(255,255,255,.40);
    background: rgba(23,23,23,.05); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.hero__crest { width: 76px; margin: 0 auto 20px; }
.hero__eyebrow { letter-spacing: .04em; color: var(--on-dark-soft); margin-bottom: .2em; }
.hero__title { font-size: clamp(2.6rem, 6vw, 4rem); color: var(--white); margin: 0 0 .35em; }
.hero__sub { color: var(--on-dark-soft); margin-bottom: 1.8em; }
.hero__form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.hero__readers { color: var(--on-dark-soft); font-size: .85rem; margin: 2.8em 0 1em; }
.hero__logos { display: flex; flex-wrap: nowrap; gap: 44px; justify-content: center; align-items: center; max-width: none; margin: 0 auto; }
.hero__logos span { font-weight: 700; font-size: 1.05rem; letter-spacing: .01em; color: var(--white); opacity: .92; }
.hero__logos img { height: 26px; width: auto; flex: 0 0 auto; opacity: .9; }

/* ---------- Subscribe form (shared) ---------- */
.subscribe-form { display: flex; gap: 10px; max-width: 567px; margin: 0 auto; }
.subscribe-form input[type="email"] {
    flex: 1; padding: 13px 16px; border-radius: var(--radius-btn); border: 1px solid var(--line);
    font-size: .95rem; background: var(--white); color: var(--ink); min-width: 0;
}
.hero .subscribe-form input[type="email"] { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.06); color: var(--white); }
.hero .subscribe-form input::placeholder { color: rgba(255,255,255,.6); }

/* ---------- Post grid + card ---------- */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.post-grid--feed { gap: 36px var(--gap); }

.post-card { background: var(--white); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.section--cream .post-card { background: transparent; }
.post-card__image { display: block; aspect-ratio: 16/10; overflow: hidden; border-radius: var(--radius); background: var(--line); }
.post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .post-card__image img { transform: scale(1.04); }
.post-card__body { padding: 18px 2px 0; flex: 1; display: flex; flex-direction: column; }
.post-card__title { font-size: 1.18rem; font-weight: 700; margin: 0 0 .5em; }
.post-card__excerpt { color: var(--ink-soft); font-size: .95rem; margin: 0 0 1.1em; }
.post-card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); }
.post-card__author { display: flex; align-items: center; gap: 10px; }
.post-card__avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--green-700); }
.post-card__author-label { font-size: .7rem; color: var(--ink-soft); line-height: 1.2; }
.post-card__author-name { font-size: .85rem; font-weight: 600; }
.post-card__date { font-size: .82rem; color: var(--ink-soft); }

.text-center { text-align: center; }
.load-more { margin-top: 44px; text-align: center; }

/* ---------- Guides (video poster facade) ---------- */
.guides-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.guide-card {
    position: relative; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, #d2d4d3 0%, #b9bcbb 100%);
    cursor: pointer; display: block; width: 100%; border: 0; padding: 0; text-align: left;
    transition: filter .2s ease;
}
.guide-card:hover { filter: brightness(.94); }
.guide-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.guide-card__crest { position: absolute; right: 6%; top: 50%; transform: translateY(-50%); width: 46%; max-width: 200px; opacity: .35; pointer-events: none; }
.guide-card__play {
    position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%);
    width: 56px; height: 56px; border-radius: 50%; background: var(--white); color: #111827;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.18);
    transition: background .2s ease, color .2s ease;
}
.guide-card__play svg { width: 22px; height: 22px; fill: currentColor; margin-left: 2px; transition: width .2s ease, height .2s ease; }
.guide-card:hover .guide-card__play { background: var(--green-900); color: var(--white); }
.guide-card:hover .guide-card__play svg { width: 30px; height: 30px; }
.guide-card__title {
    position: absolute; left: 24px; bottom: 22px; right: 38%;
    font-family: var(--font-display); font-size: 1.3rem; line-height: 1.2; margin: 0; color: var(--ink);
}
/* Active player (after click) — same 16/9 box as the poster, no resize */
.guide-card.is-playing { background: #000; cursor: default; }
.guide-card.is-playing .guide-card__crest,
.guide-card.is-playing .guide-card__play,
.guide-card.is-playing .guide-card__title { display: none; }
.guide-card__iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Feature boxes ---------- */
.features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.feature-box {
    background: linear-gradient(157deg, #294737 0%, #1A2D21 55%, #142219 100%);
    border: 0;
    border-radius: 16px; padding: 44px 40px; text-align: center;
}
.feature-box__title { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--gold); font-family: var(--font-display); font-size: 1.4rem; margin: 0 0 .6em; }
.feature-box__title svg { width: 22px; height: 22px; flex: none; }
.feature-box p { color: var(--on-dark-soft); margin: 0; font-size: .97rem; line-height: 1.65; }

/* ---------- Browse by topic + newsletter ---------- */
.topics-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.topics { text-align: center; }
.topics h2 { margin-bottom: .3em; }
.topics p { color: var(--ink-soft); margin-bottom: 0; }
.topics .divider-gradient { margin: 22px auto 26px; }
.topics__list { display: flex; flex-direction: column; gap: 12px; max-width: 340px; margin: 0 auto; }
.topic-btn { background: var(--green-800); color: var(--on-dark); padding: 7px 40px; border-radius: var(--radius-btn); text-align: center; font-weight: 600; font-size: .9rem; }
.topic-btn:hover { background: var(--green-700); }
.newsletter-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.04); }
.newsletter-card h3 { font-size: 1.6rem; margin-bottom: .3em; }
.newsletter-card p { color: var(--ink-soft); margin-bottom: 1.4em; }

/* ---------- Gradient separator ---------- */
.divider-gradient {
    height: 1px; border: 0; margin: 44px auto 0; max-width: 100%;
    background: linear-gradient(90deg, rgba(200,162,75,0) 0%, rgba(200,162,75,.55) 50%, rgba(200,162,75,0) 100%);
}
.divider-gradient--on-dark {
    margin: 0 0 56px;
    background: linear-gradient(90deg, rgba(200,162,75,0) 0%, rgba(200,162,75,.5) 50%, rgba(200,162,75,0) 100%);
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .8rem; color: var(--ink-soft); padding: 22px 0 0; }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb span { color: var(--gold); }

/* ---------- Single post ---------- */
.post-full { padding: 8px 0 64px; }
.post-full__header { max-width: var(--container-narrow); margin: 0 auto; padding: 28px 0 8px; }
.post-full__title { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: .4em; }
.post-full__excerpt { font-size: 1.15rem; color: var(--ink-soft); }
.post-byline { display: flex; align-items: center; gap: 12px; max-width: var(--container-narrow); margin: 18px auto 28px; }
.post-byline__avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: var(--green-700); }
.post-byline__name { font-weight: 600; font-size: .95rem; }
.post-byline__date { font-size: .85rem; color: var(--ink-soft); }
.post-full__feature { max-width: var(--container); margin: 0 auto 36px; }
.post-full__feature img { width: 100%; border-radius: var(--radius); }

/* Prose / content cards */
.post-content { max-width: var(--container-narrow); margin: 0 auto; font-size: 1.08rem; line-height: 1.75; }
.post-content h2 { font-size: 1.7rem; margin: 1.8em 0 .5em; }
.post-content h3 { font-size: 1.3rem; margin: 1.5em 0 .4em; }
.post-content img { border-radius: var(--radius); margin: 1.6em 0; }
.post-content figure { margin: 1.6em 0; }
.post-content figcaption { text-align: center; font-size: .85rem; color: var(--ink-soft); margin-top: .6em; }
.post-content blockquote { border-left: 3px solid var(--gold); margin: 1.6em 0; padding: .2em 0 .2em 1.4em; font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.post-content a { color: var(--green-700); text-decoration: underline; text-decoration-color: var(--gold); }
.post-content ul, .post-content ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.post-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.kg-card { margin: 1.6em 0; }

/* Koenig editor card widths (required by Ghost) */
.post-content :not(.kg-width-wide):not(.kg-width-full) > .kg-card { max-width: 100%; }
.kg-width-wide { position: relative; width: 85vw; min-width: 100%; margin-left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; left: 50%; right: 50%; margin-left: -50vw; margin-right: -50vw; }
.kg-width-full img { width: 100%; border-radius: 0; }
figure.kg-image-card img { margin: 0 auto; }
.kg-embed-card { display: flex; flex-direction: column; align-items: center; width: 100%; }

/* Worth Your Attention (sponsored module) */
.attention { max-width: var(--container-narrow); margin: 44px auto; background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px; }
.attention__label { font-family: var(--font-display); font-size: 1.2rem; margin-bottom: .8em; }
.attention ul { list-style: none; margin: 0; padding: 0; }
.attention li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.attention li:last-child { border-bottom: 0; }
.attention__tag { display: inline-block; font-size: .7rem; color: var(--ink-soft); margin-left: 8px; }

/* ---------- Legal pages ---------- */
.legal { max-width: var(--container-narrow); margin: 0 auto; padding: 18px 0 72px; }
.legal__title { text-align: center; margin: 18px 0 .3em; }
.legal__rule { width: 120px; height: 2px; background: var(--gold); margin: 14px auto 10px; border: 0; }
.legal__updated { text-align: center; font-size: .82rem; color: var(--ink-soft); margin-bottom: 40px; }
.legal__body h2, .legal__body h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.05rem; margin: 1.8em 0 .5em; text-transform: uppercase; letter-spacing: .02em; }
.legal__body p { color: #333; }

/* ---------- Gold Charts ---------- */
.charts-page { padding: 48px 0 80px; }
.chart-embed { background: var(--green-800); border: 1px solid var(--green-600); border-radius: var(--radius); min-height: 420px; display: flex; align-items: center; justify-content: center; color: var(--on-dark-soft); margin-bottom: 28px; overflow: hidden; }
.chart-embed iframe { width: 100%; border: 0; }
.chart-placeholder { text-align: center; padding: 40px; font-size: .9rem; }

/* ---------- Pagination ---------- */
.pagination { display: flex; justify-content: center; gap: 18px; align-items: center; margin-top: 48px; }
.pagination a, .pagination .page-number { font-size: .9rem; color: var(--ink-soft); }

/* ---------- Author / error ---------- */
.page-head { text-align: center; padding: 64px 0 40px; }
.page-head p { color: var(--ink-soft); max-width: 560px; margin: 0 auto; }
.error-page { text-align: center; padding: 120px 0; }
.error-page__code { font-family: var(--font-display); font-size: 5rem; color: var(--gold); }

/* ---------- Mobile nav state ---------- */
.site-nav.is-open { display: block; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1200px) {
    :root { --container-pad: 40px; }
}

@media (max-width: 980px) {
    .topics-split { grid-template-columns: 1fr; gap: 40px; }
    .post-grid, .guides-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
    :root { --container-pad: 24px; }
    .site-nav { position: absolute; top: 64px; left: 0; right: 0; background: var(--green-800); display: none; padding: 12px 0; }
    .site-nav__list { flex-direction: column; gap: 0; }
    .site-nav__list a { display: block; padding: 12px 24px; }
    .site-nav__toggle { display: flex; }
    .section { padding: 56px 0; }
    .features-grid { grid-template-columns: 1fr; }
    /* logos wrap on smaller screens (looks good per design) */
    .hero__logos { flex-wrap: wrap; gap: 18px 40px; max-width: 560px; }
}

@media (max-width: 600px) {
    .post-grid, .guides-grid { grid-template-columns: 1fr; }
    .hero__form, .subscribe-form { flex-direction: column; }
    .hero__inner { padding: 64px 4px 56px; }
    .site-footer__inner { flex-direction: column; gap: 24px; }
    .site-footer__nav ul { flex-wrap: wrap; gap: 16px; }
}
