/* ======================================================================
   THE WEATHER EYE — the signals everyone else is missing
   Co-branded with Pharos Hivemind: ivory paper, Playfair display,
   EB Garamond reading, Inter labels, navy + warm earthy accents.
   ====================================================================== */

:root {
    --ivory:        #FAFAF8;   /* primary canvas              */
    --warm-ivory:   #FFFDF5;   /* raised surfaces             */
    --border:       #E8E6E1;   /* hairlines                   */
    --ink:          #1a1a1a;   /* primary text                */
    --ink-soft:     #555555;   /* secondary text              */
    --ink-faint:    #888888;   /* tertiary text / meta        */
    --navy:         #1e3a5f;   /* brand + primary accent      */
    --navy-deep:    #16293f;
    --gold:         #d4a84b;   /* lantern glow / eyebrow      */
    --slate:        #6b8e9f;
    --terracotta:   #c2785c;
    --sage:         #7a9e7e;

    --max:        1180px;
    --narrow:     680px;
    --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --font-read:    "EB Garamond", Garamond, "Times New Roman", serif;
    --font-ui:      "Inter", system-ui, -apple-system, sans-serif;
}

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

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

body {
    margin: 0;
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--font-read);
    font-size: 20px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }
.wrap-narrow { max-width: var(--narrow); }

.rule { border: 0; border-top: 1px solid var(--border); margin: 54px 0; }

/* ---- brand mark: pharos lighthouse ----------------------------------- */
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: inline-block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-mark-lg { width: 56px; height: 56px; flex-basis: 56px; margin: 0 auto 18px; }

/* ---- buttons --------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: .4em;
    font-family: var(--font-ui); font-weight: 600; font-size: 13.5px;
    letter-spacing: .01em; line-height: 1;
    padding: 10px 18px; border-radius: 7px; border: 1px solid transparent;
    cursor: pointer; transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-accent { background: var(--navy); color: var(--warm-ivory); border-color: var(--navy); }
.btn-accent:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--ink-faint); }
.btn-lg { font-size: 14.5px; padding: 13px 24px; }

/* ---- masthead -------------------------------------------------------- */
.masthead { border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
    background: rgba(250,250,248,.85); backdrop-filter: saturate(120%) blur(10px); }
.masthead-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-name {
    font-family: var(--font-ui); font-weight: 600; font-size: 16px;
    letter-spacing: -.01em; color: var(--ink);
}
.brand-name .brand-sub { color: var(--ink-faint); font-weight: 400; }
.nav { display: flex; align-items: center; gap: 16px; }
.nav ul { display: flex; gap: 22px; list-style: none; margin: 0; padding: 0;
    font-family: var(--font-ui); font-size: 13px; letter-spacing: .02em; }
.nav ul a { color: var(--ink-faint); border-bottom: 2px solid transparent; padding-bottom: 2px; transition: color .15s ease, border-color .15s ease; }
.nav ul a:hover { color: var(--ink-soft); }
.nav ul li.nav-current a { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }

/* ---- hero ------------------------------------------------------------ */
.hero { padding: 92px 0 64px; border-bottom: 1px solid var(--border); text-align: center; }
.hero-kicker {
    font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .2em;
    font-size: 12px; font-weight: 600; color: var(--gold); margin: 0 0 22px;
}
.hero-title {
    font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em;
    font-size: clamp(40px, 7vw, 76px); line-height: 1.04; margin: 0 auto 26px; max-width: 15ch; color: var(--ink);
}
.hero-lede { font-size: 22px; color: var(--ink-soft); max-width: 58ch; margin: 0 auto 34px; line-height: 1.55; }
.hero-cta { display: flex; gap: 10px; max-width: 480px; flex-wrap: wrap; justify-content: center; margin-inline: auto; }
.hero-input {
    flex: 1 1 240px; background: var(--warm-ivory); border: 1px solid var(--border); color: var(--ink);
    border-radius: 7px; padding: 11px 16px; font-size: 15px; font-family: var(--font-ui);
}
.hero-input::placeholder { color: var(--ink-faint); }
.hero-input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(30,58,95,.08); }
.hero-fineprint { font-family: var(--font-ui); font-size: 13px; color: var(--ink-faint); margin: 14px 0 0; }

/* ---- members subscribe form states (Ghost adds .loading/.success/.error) -- */
.form-result { flex-basis: 100%; }
.form-success, .form-error { display: none; font-family: var(--font-ui); font-size: 14.5px; line-height: 1.5; margin: 14px 0 0; }
.form-success { color: var(--navy); }
.form-error { color: var(--terracotta); }
.hero-cta.success .form-success { display: block; }
.hero-cta.error .form-error { display: block; }
.hero-cta.loading .btn { opacity: .6; pointer-events: none; }
/* On success, replace the field + button with the confirmation message. */
.hero-cta.success .hero-input, .hero-cta.success .btn { display: none; }

/* ---- post meta line -------------------------------------------------- */
.post-meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
    font-family: var(--font-ui); font-size: 11.5px; font-weight: 500; letter-spacing: .07em;
    text-transform: uppercase; color: var(--ink-faint); margin: 0 0 16px;
}
.post-meta .tag { color: var(--navy); }
.post-meta .dot { color: var(--border); }
.post-meta .lock {
    color: var(--warm-ivory); background: var(--navy); border-radius: 4px;
    padding: 2px 7px; font-size: 10px; letter-spacing: .08em;
}

/* ---- lead post ------------------------------------------------------- */
.lead-post { padding: 64px 0 0; }
.lead-link { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.lead-media { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; aspect-ratio: 4 / 3; }
.lead-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.lead-link:hover .lead-media img { transform: scale(1.03); }
.lead-title {
    font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em;
    font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 0 0 18px; color: var(--ink);
}
.lead-link:hover .lead-title { color: var(--navy); }
.lead-excerpt { font-size: 19px; color: var(--ink-soft); margin: 0; }

/* ---- post grid ------------------------------------------------------- */
.post-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 44px 40px;
    padding-bottom: 30px;
}
.card-media { overflow: hidden; border: 1px solid var(--border); border-radius: 10px; aspect-ratio: 16 / 10; margin-bottom: 20px; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-link:hover .card-media img { transform: scale(1.04); }
.card-title {
    font-family: var(--font-display); font-weight: 600; letter-spacing: -.005em;
    font-size: 24px; line-height: 1.18; margin: 0 0 11px; color: var(--ink);
}
.card-link:hover .card-title { color: var(--navy); }
.card-excerpt { font-size: 17px; color: var(--ink-soft); margin: 0; }

/* ---- pagination ------------------------------------------------------ */
.pagination { display: flex; justify-content: center; gap: 20px; padding: 56px 0 90px;
    font-family: var(--font-ui); font-size: 14px; color: var(--ink-soft); }
.pagination a { color: var(--navy); }

/* ---- single article -------------------------------------------------- */
.article { padding-top: 70px; }
.article-head { text-align: center; padding-bottom: 8px; }
.article-head .post-meta { justify-content: center; }
.article-title {
    font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em;
    font-size: clamp(34px, 5.4vw, 58px); line-height: 1.08; margin: 0 0 22px; color: var(--ink);
}
.article-standfirst { font-size: 24px; line-height: 1.5; color: var(--ink-soft); margin: 0 auto 26px; max-width: 38ch; font-style: italic; }
.byline { font-family: var(--font-ui); font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); }
.byline-name { color: var(--ink); }

.article-media { margin: 48px 0; }
.article-media img { width: 100%; max-height: 70vh; object-fit: cover; border-radius: 10px; }
.article-media figcaption { font-family: var(--font-ui); font-size: 13px; color: var(--ink-faint); text-align: center; margin-top: 12px; }
.no-media .article-head { padding-top: 0; }

.article-body { margin: 50px 0 0; font-size: 21px; line-height: 1.72; color: var(--ink); }
.article-body p { margin: 0 0 1.5em; }
.article-body h2 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; font-size: 32px; line-height: 1.2; margin: 2em 0 .6em; }
.article-body h3 { font-family: var(--font-display); font-weight: 600; font-size: 25px; margin: 1.8em 0 .5em; }
.article-body a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; text-decoration-color: rgba(30,58,95,.35); }
.article-body a:hover { text-decoration-color: var(--navy); }
.article-body blockquote {
    margin: 1.8em 0; padding: 6px 0 6px 26px; border-left: 3px solid var(--gold);
    font-style: italic; color: var(--ink-soft); font-size: 24px; line-height: 1.5;
}
.article-body hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em 0; }
.article-body ul, .article-body ol { margin: 0 0 1.5em; padding-left: 1.2em; }
.article-body li { margin: 0 0 .5em; }
.article-body img { border-radius: 10px; margin: 2em 0; }
.article-body code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8em; background: var(--warm-ivory); border: 1px solid var(--border); padding: 1px 6px; border-radius: 4px; }
.kg-card, .kg-bookmark-card { margin: 2em 0; }

/* Koenig wide / full-bleed cards break out of the narrow reading column. */
.article-body .kg-width-wide { position: relative; width: min(1020px, 92vw); margin-left: 50%; transform: translateX(-50%); }
.article-body .kg-width-full { position: relative; width: 100vw; margin-left: 50%; transform: translateX(-50%); }
.article-body .kg-width-full img { border-radius: 0; }

/* ---- click-to-zoom lightbox ------------------------------------------ */
.article-body img, .article-media img { cursor: zoom-in; }
.lightbox-overlay {
    position: fixed; inset: 0; z-index: 200; display: none;
    align-items: center; justify-content: center; padding: 4vw; cursor: zoom-out;
    background: rgba(26,26,26,.88); backdrop-filter: blur(4px);
}
.lightbox-overlay.is-open { display: flex; }
.lightbox-image {
    max-width: 94vw; max-height: 92vh; width: auto; height: auto;
    border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.45);
    animation: lightbox-in .2s ease-out;
}
@keyframes lightbox-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }

/* ---- article tags ---------------------------------------------------- */
.article-tags { display: flex; flex-wrap: wrap; gap: 9px; margin: 48px 0 0; padding-top: 28px; border-top: 1px solid var(--border); }
.article-tag {
    font-family: var(--font-ui); font-size: 12.5px; font-weight: 500; letter-spacing: .04em;
    text-transform: uppercase; color: var(--navy); border: 1px solid var(--border);
    border-radius: 999px; padding: 6px 14px; transition: border-color .15s ease, background .15s ease;
}
.article-tag:hover { border-color: var(--navy); background: var(--warm-ivory); }

/* ---- paywall --------------------------------------------------------- */
.paywall {
    margin: 56px 0 0; padding: 46px 38px; text-align: center;
    background: var(--warm-ivory); border: 1px solid var(--border); border-radius: 14px;
    position: relative; overflow: hidden;
}
.paywall::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), var(--navy), transparent);
}
.paywall-kicker { font-family: var(--font-ui); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 600; color: var(--gold); margin: 0 0 12px; }
.paywall-title { font-family: var(--font-display); font-weight: 700; font-size: 32px; letter-spacing: -.01em; margin: 0 0 12px; color: var(--ink); }
.paywall-copy { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 24px; }
.paywall-signin { font-family: var(--font-ui); font-size: 14px; color: var(--ink-faint); margin: 16px 0 0; }
.paywall-signin a { color: var(--navy); }

/* ---- subscribe band -------------------------------------------------- */
.subscribe-band { border-top: 1px solid var(--border); margin-top: 90px; padding: 80px 0 96px; text-align: center; }
.subscribe-title { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; font-size: clamp(28px, 4vw, 44px); line-height: 1.12; margin: 0 0 14px; max-width: 22ch; margin-inline: auto; color: var(--ink); }
.subscribe-copy { color: var(--ink-soft); margin: 0 0 28px; }
.subscribe-band .hero-cta { justify-content: center; margin-inline: auto; }

/* ---- footer ---------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 80px; margin-top: 0; }
.footer-inner { display: grid; gap: 18px; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-title { font-family: var(--font-ui); font-weight: 600; font-size: 16px; margin: 0; color: var(--ink); }
.footer-title .brand-sub { color: var(--ink-faint); font-weight: 400; }
.footer-tag { color: var(--ink-faint); margin: 2px 0 0; font-size: 16px; }
.footer-patron { color: var(--ink-soft); font-size: 16px; margin: 8px 0 0; max-width: 52ch; }
.footer-patron a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.footer-legal { font-family: var(--font-ui); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin: 6px 0 0; }

/* ---- responsive ------------------------------------------------------ */
@media (max-width: 900px) {
    .lead-link { grid-template-columns: 1fr; gap: 26px; }
    .post-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 28px; }
    .hero { padding: 64px 0 48px; }
}
@media (max-width: 600px) {
    body { font-size: 19px; }
    .wrap { padding: 0 20px; }
    .post-grid { grid-template-columns: 1fr; }
    .nav ul { display: none; }
    .masthead-inner { height: 64px; }
    .article { padding-top: 44px; }
}
