/* AutoPilot Your Wealth theme */

:root {
    --navy: #1B2633;
    --navy-deep: #121A24;
    --gold: #D4AF58;
    --gold-dark: #B8943E;
    --ink: #1F2933;
    --muted: #5B6672;
    --line: #E3E6EA;
    --paper: #FFFFFF;
    --paper-soft: #F6F4EF;
    --serif: var(--gh-font-heading, Georgia, "Times New Roman", serif);
    --sans: var(--gh-font-body, "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    --radius: 10px;
    --wide: 1180px;
    --narrow: 760px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.2;
    color: var(--navy);
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; }

.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; }

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

/* Buttons and links */

.btn {
    display: inline-block;
    border: 0;
    border-radius: 6px;
    padding: 14px 26px;
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-deep); }
.btn-small { padding: 9px 16px; font-size: 0.9rem; }

.link-quiet { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--muted); }
.link-quiet:hover { color: var(--navy); }
.link-gold { color: var(--gold-dark); font-weight: 600; text-decoration: none; }
.link-gold:hover { text-decoration: underline; }

.eyebrow {
    display: inline-block;
    font-family: var(--sans);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gold-dark);
    text-decoration: none;
    margin-bottom: 10px;
}

/* Header */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(6px);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; flex-wrap: wrap; }
.brand { text-decoration: none; display: flex; align-items: center; }
.brand-logo { max-height: 40px; width: auto; }
.brand-title { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--navy); }
.site-nav { flex: 1; }
.site-nav ul, .footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { text-decoration: none; font-weight: 500; font-size: 0.95rem; color: var(--ink); }
.site-nav a:hover, .site-nav .nav-current a { color: var(--gold-dark); }
.header-actions { display: flex; align-items: center; gap: 16px; }

/* Hero */

.hero {
    position: relative;
    background-color: var(--navy);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: clamp(80px, 14vw, 160px) 0;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(18, 26, 36, 0.55) 0%, rgba(18, 26, 36, 0.85) 100%);
}
.hero-inner { position: relative; max-width: 820px; text-align: center; }
.hero-title { color: #fff; }
.hero-sub { font-size: 1.15rem; color: rgba(255, 255, 255, 0.85); margin-bottom: 30px; }

/* Signup form */

.subscribe-form { max-width: 520px; margin: 0 auto; }
.subscribe-row { display: flex; gap: 10px; }
.subscribe-input {
    flex: 1;
    min-width: 0;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-family: var(--sans);
    font-size: 1rem;
    color: var(--ink);
    background: #fff;
}
.subscribe-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.btn-loading, .form-msg { display: none; }
.subscribe-form.loading .btn-label { display: none; }
.subscribe-form.loading .btn-loading { display: inline; }
.subscribe-form.success .form-success,
.subscribe-form.error .form-error { display: block; margin-top: 12px; font-size: 0.95rem; }
.subscribe-form.success .subscribe-row { display: none; }
.hero .form-msg { color: #fff; }

/* Bands */

.band { padding: 80px 0; }
.band-navy { background: var(--navy); color: rgba(255, 255, 255, 0.85); }
.band-navy h2 { color: #fff; }
.band-navy p { font-size: 1.1rem; margin-bottom: 28px; }
.band-light { background: var(--paper-soft); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.rounded { border-radius: var(--radius); }

/* Flight Log and listings */

.flight-log { padding: 80px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 28px; border-bottom: 2px solid var(--gold); padding-bottom: 10px; }
.section-head h2 { margin: 0; }
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; transition: box-shadow 0.15s ease; }
.post-card:hover { box-shadow: 0 8px 24px rgba(27, 38, 51, 0.1); }
.post-card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.post-card-image { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.post-card-body { padding: 20px 22px 24px; }
.post-card-title { font-size: 1.25rem; margin-bottom: 8px; }
.post-card-excerpt { color: var(--muted); font-size: 0.95rem; }
.post-card-date { font-size: 0.85rem; color: var(--muted); }

.page-head { padding: 64px 0 32px; }
.page-sub { color: var(--muted); font-size: 1.1rem; }
.listing { padding-bottom: 80px; }
.pagination { display: flex; justify-content: center; gap: 20px; margin-top: 40px; color: var(--muted); }
.pagination a { color: var(--gold-dark); font-weight: 600; text-decoration: none; }

/* Articles and pages */

.article { padding: 56px 0 80px; }
.article-head { margin-bottom: 32px; }
.article-sub { font-size: 1.2rem; color: var(--muted); }
.article-date { font-size: 0.9rem; color: var(--muted); }
.article-image { margin: 0 auto 40px; }
.article-image img { border-radius: var(--radius); width: 100%; }
.article-image figcaption { text-align: center; color: var(--muted); font-size: 0.9rem; margin-top: 8px; }

.gh-content > * + * { margin-top: 1.2em; }
.gh-content h2 { margin-top: 1.8em; }
.gh-content h3 { margin-top: 1.5em; }
.gh-content a { color: var(--gold-dark); }
.gh-content img { border-radius: var(--radius); }
.gh-content iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.gh-content .kg-embed-card { display: block; }
.gh-content blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--gold); font-family: var(--serif); font-size: 1.15rem; color: var(--navy); }
.gh-content table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.gh-content th, .gh-content td { border-bottom: 1px solid var(--line); padding: 10px 8px; text-align: left; }
.gh-content th { color: var(--navy); }
.gh-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }

/* Ghost editor card widths (required by Ghost) */
.kg-width-wide { position: relative; width: 85vw; max-width: 1040px; left: 50%; transform: translateX(-50%); }
.kg-width-full { position: relative; width: 100vw; left: 50%; transform: translateX(-50%); }
.kg-width-full img { border-radius: 0; }

/* Members-only call to action inside gated posts */
.gh-post-upgrade-cta { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 40px 28px; text-align: center; }
.gh-post-upgrade-cta h2 { color: #fff; }
.gh-post-upgrade-cta a.gh-btn, .gh-post-upgrade-cta-content a { color: var(--navy); background: var(--gold); }

/* Hangar */

.hangar-head { background: var(--navy); color: rgba(255, 255, 255, 0.85); padding: 72px 0 56px; }
.hangar-head h1 { color: #fff; }
.hangar-head .eyebrow { color: var(--gold); }
.hangar-head .page-sub { color: rgba(255, 255, 255, 0.78); }
.hangar-head + .gh-content { padding-top: 48px; }
.hangar-library { padding: 48px 0 96px; }
.hangar-series { margin-bottom: 56px; }
.hangar-list { list-style: none; margin: 0; padding: 0; counter-reset: ep; }
.hangar-item { counter-increment: ep; border-bottom: 1px solid var(--line); }
.hangar-item a { display: flex; align-items: center; gap: 18px; padding: 18px 4px; text-decoration: none; }
.hangar-item a::before { content: counter(ep, decimal-leading-zero); font-family: var(--serif); font-weight: 700; color: var(--gold-dark); min-width: 2.2em; }
.hangar-item-title { flex: 1; font-weight: 600; color: var(--navy); }
.hangar-item-cta { font-size: 0.9rem; font-weight: 600; color: var(--gold-dark); white-space: nowrap; }
.hangar-item a:hover { background: var(--paper-soft); }

/* Footer */

.footer-signup { background: var(--paper-soft); padding: 72px 0; border-top: 1px solid var(--line); }
.footer-signup p { color: var(--muted); }
.site-footer { margin-top: auto; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; padding-top: 28px; padding-bottom: 28px; font-size: 0.9rem; color: var(--muted); }
.footer-nav a { text-decoration: none; color: var(--muted); }
.footer-nav a:hover { color: var(--navy); }

/* Homepage bio and system columns */

.bio { padding: 96px 0; }
.bio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.bio-text h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.bio-text p { font-size: 1.12rem; }
.bio-photos { position: relative; padding-bottom: 30%; }
.bio-photo { border-radius: var(--radius); object-fit: cover; box-shadow: 0 18px 40px rgba(27, 38, 51, 0.18); }
.bio-photo-1 { width: 72%; aspect-ratio: 4 / 5; }
.bio-photo-2 { position: absolute; right: 0; bottom: 0; width: 46%; aspect-ratio: 4 / 5; object-position: center 30%; border: 6px solid #fff; }
.bio-photos:has(.bio-photo-1:only-child) { padding-bottom: 0; }
.bio-photo-1:only-child { width: 100%; }

.system { padding: 88px 0; background: var(--paper-soft); }
.system-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.system-col:only-child { grid-column: 1 / -1; max-width: var(--narrow); width: 100%; margin: 0 auto; }
.system-col > :first-child { margin-top: 0; }
.system-col h2 { font-size: clamp(1.75rem, 3vw, 2.25rem); padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.system-col h3 { font-size: 1.3rem; margin-top: 1.4em; }
.system-col p { font-size: 1rem; }

@media (max-width: 900px) {
    .bio-grid, .system-grid { grid-template-columns: 1fr; gap: 40px; }
    .bio-photos { max-width: 520px; }
}

/* Hangar: members gate, series cards, episode list */

.container.mid { max-width: 940px; }
.hangar-intro { padding-bottom: 8px; }

.gate { max-width: 620px; margin: 0 auto; text-align: center; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 28px; }
.gate p { color: var(--muted); }
.gate .subscribe-form { margin-top: 24px; }
.gate-signin { margin: 18px 0 0; font-size: 0.95rem; }
.gate-signin a { color: var(--gold-dark); font-weight: 600; }

.series-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.series-card { display: flex; flex-direction: column; text-decoration: none; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.15s ease, transform 0.15s ease; }
.series-card:hover { box-shadow: 0 10px 28px rgba(27, 38, 51, 0.12); transform: translateY(-2px); }
.series-image { display: flex; align-items: center; justify-content: center; aspect-ratio: 16 / 9; background: var(--navy); }
.series-image img { width: 100%; height: 100%; object-fit: cover; }
.series-image-fallback { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--gold); text-align: center; padding: 0 20px; }
.series-body { display: block; padding: 22px 24px 26px; }
.series-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--navy); margin-bottom: 8px; }
.series-desc { display: block; color: var(--muted); font-size: 0.95rem; margin-bottom: 14px; }
.series-count { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dark); }

.episode-list { list-style: none; margin: 0; padding: 0; counter-reset: ep; border-top: 2px solid var(--gold); }
.episode { counter-increment: ep; border-bottom: 1px solid var(--line); }
.episode a { display: grid; grid-template-columns: 2.6em 184px 1fr; gap: 22px; align-items: center; padding: 20px 8px; text-decoration: none; color: inherit; }
.episode a:hover { background: var(--paper-soft); }
.episode-num::before { content: counter(ep, decimal-leading-zero); font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: var(--gold-dark); }
.episode-thumb { display: block; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--navy); }
.episode-thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode-title { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.15rem; line-height: 1.3; color: var(--navy); margin-bottom: 6px; }
.episode-excerpt { display: block; color: var(--muted); font-size: 0.95rem; line-height: 1.5; }
.empty { text-align: center; color: var(--muted); }

.back-link:hover { text-decoration: underline; }
.episode-foot { margin-top: 48px; }

@media (max-width: 900px) {
    .series-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .series-grid { grid-template-columns: 1fr; }
    .episode a { grid-template-columns: 1.8em 112px 1fr; gap: 12px; }
    .episode-num::before { font-size: 1.1rem; }
    .episode-excerpt { display: none; }
}

/* Phones and tablets */

@media (max-width: 900px) {
    .post-grid { grid-template-columns: 1fr 1fr; }
    .two-col { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 640px) {
    body { font-size: 16px; }
    .header-inner { gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
    .site-nav { order: 3; flex-basis: 100%; }
    .header-actions { margin-left: auto; }
    .post-grid { grid-template-columns: 1fr; }
    .subscribe-row { flex-direction: column; }
    .subscribe-row .btn { width: 100%; }
    .band, .flight-log, .bio, .system { padding: 56px 0; }
    .kg-width-wide { width: 100%; left: 0; transform: none; }
}
