/* ============================================================
   SPIRITUAL INSIGHTS FOR CHALLENGING TIMES — STYLESHEET
   Rev. Ellen Barron, M.Div.
   Light, editorial magazine layout. Serif display type, thin
   rules, and one block format for every conversation: the full
   episode playing in place with its short reflections as
   pull-quote cards beneath it.
   ============================================================ */

:root {
    --paper:     #fbf8f1;
    --paper-2:   #f3eee3;
    --paper-3:   #e9e2d3;
    --ink:       #1c1a17;
    --ink-2:     #514b43;
    --ink-3:     #8a8177;
    --rule:      #d8cfbf;
    --rule-2:    #bfb4a0;
    --terra:     #b5502a;
    --terra-2:   #d0673f;
    --gold:      #a6873f;
    --yt:        #cc2f2f;

    --serif: 'Fraunces', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
    --sans:  'Inter', 'Segoe UI', system-ui, sans-serif;

    --wrap: 1180px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --t:    0.24s var(--ease);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }

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

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; color: inherit; background: none; border: 0; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; letter-spacing: -0.005em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: 32px; padding-right: 32px; }

.kicker {
    font-family: var(--sans); font-size: 0.72rem; font-weight: 600;
    letter-spacing: 0.2em; text-transform: uppercase; color: var(--terra);
}

/* Links & buttons */
.link-arrow {
    font-family: var(--serif); font-size: 1.05rem; font-style: italic; font-weight: 500;
    color: var(--ink); border-bottom: 1px solid var(--rule-2);
    padding-bottom: 2px; transition: color var(--t), border-color var(--t);
}
.link-arrow::after { content: ' \2192'; font-style: normal; transition: margin var(--t); }
.link-arrow:hover { color: var(--terra); border-color: var(--terra); }
.link-arrow:hover::after { margin-left: 4px; }
.link-arrow.muted { color: var(--ink-2); }

.btn-ink {
    display: inline-flex; align-items: center; gap: 0.55em;
    font-family: var(--sans); font-size: 0.86rem; font-weight: 600; letter-spacing: 0.02em;
    padding: 0.75em 1.4em; background: var(--ink); color: var(--paper);
    border: 1px solid var(--ink); transition: background var(--t), color var(--t), transform var(--t);
}
.btn-ink:hover { background: var(--terra); border-color: var(--terra); transform: translateY(-1px); }
.btn-ink.small { padding: 0.6em 1.1em; font-size: 0.8rem; }
.btn-ink i { color: #fff; }

/* ── Masthead ───────────────────────────────────────────────── */
.masthead {
    position: sticky; top: 0; z-index: 50;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    transition: box-shadow var(--t);
}
.masthead.scrolled { box-shadow: 0 6px 24px rgba(28,26,23,0.08); }
.masthead-top {
    max-width: var(--wrap); margin: 0 auto; padding: 14px 32px;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
    transition: padding var(--t);
}
.masthead.scrolled .masthead-top { padding: 8px 32px; }
.masthead-issue { font-family: var(--serif); font-style: italic; font-size: 0.95rem; color: var(--ink-3); }
.masthead-brand { display: flex; flex-direction: column; align-items: center; line-height: 1; text-align: center; }
.wordmark {
    font-family: var(--serif); font-size: 1.7rem; font-weight: 500; letter-spacing: -0.01em;
    color: var(--ink); transition: font-size var(--t);
}
.wordmark::before { content: '✦ '; color: var(--gold); font-size: 0.7em; vertical-align: 0.15em; }
.wordmark-sub {
    font-family: var(--serif); font-style: italic; font-size: 0.88rem; color: var(--terra);
    margin-top: 4px; transition: opacity var(--t), max-height var(--t);
}
.masthead.scrolled .wordmark { font-size: 1.3rem; }
.masthead.scrolled .wordmark-sub { display: none; }
.masthead-sub {
    justify-self: end; display: inline-flex; align-items: center; gap: 0.5em;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ink-2); transition: color var(--t);
}
.masthead-sub i { color: var(--yt); font-size: 1.2em; }
.masthead-sub:hover { color: var(--terra); }
.masthead-nav {
    border-top: 1px solid var(--rule);
    display: flex; justify-content: center; gap: 4px;
    padding: 0 32px;
    transition: max-height var(--t), opacity var(--t);
}
.masthead-nav a {
    font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink-2); padding: 11px 18px; position: relative;
    transition: color var(--t);
}
.masthead-nav a::after {
    content: ''; position: absolute; left: 18px; right: 18px; bottom: 0; height: 2px;
    background: var(--terra); transform: scaleX(0); transform-origin: left; transition: transform var(--t);
}
.masthead-nav a:hover, .masthead-nav a.active { color: var(--ink); }
.masthead-nav a:hover::after, .masthead-nav a.active::after { transform: scaleX(1); }
.masthead-menu { display: none; }

/* ── Hero — HALF the height of index.html (72vh → 36vh) ─────── */
.hero {
    position: relative; min-height: 36vh; overflow: hidden;
    background: var(--paper-3);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; }
.hero-veil {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(28,26,23,0.35) 0%, rgba(28,26,23,0) 50%);
}
.hero-caption {
    position: absolute; right: 32px; bottom: 14px;
    font-family: var(--serif); font-style: italic; font-size: 0.9rem; color: rgba(255,255,255,0.85);
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}

/* Title plate overlapping the bottom of the hero */
.hero-plate { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
.plate {
    background: #fffdf9;
    border: 1px solid var(--rule-2); border-top: 5px solid var(--ink);
    max-width: 760px; margin-top: -72px; padding: 28px 40px 30px;
    box-shadow: 0 24px 60px rgba(28,26,23,0.18), 0 2px 8px rgba(28,26,23,0.08);
}
.plate h1 {
    font-size: clamp(2.2rem, 4.8vw, 3.9rem); font-weight: 400; margin: 10px 0 16px;
    font-variation-settings: 'opsz' 144;
}
.plate h1 em { font-style: italic; font-weight: 300; color: var(--terra); }
.plate-lede { font-family: var(--serif); font-size: 1.15rem; line-height: 1.6; color: var(--ink-2); max-width: 58ch; }

/* Featured section sits closer beneath the plate */
.featured.wrap { padding-top: 32px; }

/* ── Rule headers ───────────────────────────────────────────── */
.rule-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
    border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule);
    padding: 10px 0; margin-bottom: 36px;
}
.rule-label { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.rule-aside { font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--ink-3); }

section.wrap { padding-top: 64px; padding-bottom: 24px; }

/* ── Shared player facade ───────────────────────────────────── */
.frame { position: relative; aspect-ratio: 16/9; background: var(--ink); overflow: hidden; }
.frame.clip { aspect-ratio: 16/9; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.facade { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; text-align: left; display: block; }
.facade img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease), filter var(--t); filter: sepia(0.12); }
.facade:hover img { transform: scale(1.03); filter: sepia(0); }
.facade-play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 76px; height: 76px; border-radius: 50%;
    border: 1.5px solid rgba(255,255,255,0.9); background: rgba(28,26,23,0.35);
    backdrop-filter: blur(4px); color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; padding-left: 5px; transition: background var(--t), transform var(--t);
}
.facade:hover .facade-play { background: var(--terra); border-color: var(--terra); transform: translate(-50%, -50%) scale(1.06); }
.frame.clip .facade-play { width: 56px; height: 56px; font-size: 1.05rem; }
.frame.clip .facade-note { font-size: 0.6rem; max-width: calc(100% - 66px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.facade-note {
    position: absolute; left: 12px; top: 12px;
    font-family: var(--sans); font-size: 0.68rem; letter-spacing: 0.06em;
    background: rgba(251,248,241,0.9); color: var(--ink-2); padding: 3px 8px;
}
.figcap {
    font-family: var(--serif); font-style: italic; font-size: 0.9rem; color: var(--ink-3);
    padding-top: 10px; border-top: 1px solid var(--rule); margin-top: 10px;
    display: flex; justify-content: space-between; gap: 12px;
}

/* ── Episode block — used for this week's conversation and every earlier one ── */
.ep-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: start; }
.ep-meta { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; margin-bottom: 12px; }
.ep-meta .num { font-family: var(--serif); font-size: 0.95rem; font-style: italic; color: var(--ink-3); }
.ep-copy h2 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); font-weight: 400; margin-bottom: 18px; }
.featured .ep-copy h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); }
.ep-copy .dropcap::first-letter {
    font-family: var(--serif); font-size: 3.6em; font-weight: 400; float: left; line-height: 0.85;
    padding: 6px 10px 0 0; color: var(--terra);
}
.ep-copy p { font-family: var(--serif); font-size: 1.08rem; line-height: 1.7; color: var(--ink-2); margin-bottom: 14px; }
.ep-copy .body { font-size: 1rem; }
.ep-copy .tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 22px; }
.ep-copy .tag { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-2); border: 1px solid var(--rule-2); padding: 3px 9px; }
.ep-actions { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.ep-views { font-family: var(--serif); font-style: italic; font-size: 0.92rem; color: var(--ink-3); }

/* Earlier conversations: the same block, one after another */
.ep-list .ep-block { padding: 44px 0; border-top: 1px solid var(--rule); }
.ep-list .ep-block:first-child { padding-top: 0; border-top: 0; }
.ep-list .ep-block:last-child { border-bottom: 1px solid var(--rule); }

/* Short reflections beneath the player */
.ep-clips { margin-top: 26px; }
.ep-clips h4 {
    font-family: var(--sans); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-3); margin-bottom: 14px; padding-top: 14px; border-top: 1px solid var(--rule);
}
.clip-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.clip-card { display: flex; flex-direction: column; }
.clip-card .frame { border: 1px solid var(--rule-2); }
.clip-card .quote {
    position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1;
    font-family: var(--serif); font-style: italic; font-size: 1.02rem; line-height: 1.3; color: #fff;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5); pointer-events: none;
}
.clip-card .quote::before { content: '\201C'; }
.clip-card .quote::after  { content: '\201D'; }
.clip-card .facade::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(20,16,10,0.8) 0%, rgba(20,16,10,0.05) 55%);
}
.clip-card .dur { position: absolute; right: 10px; top: 10px; z-index: 1; font-size: 0.7rem; font-weight: 600; color: #fff; background: rgba(28,26,23,0.65); padding: 2px 7px; }
.clip-card .figcap { font-size: 0.82rem; }
.clip-card .figcap a { color: var(--ink-2); border-bottom: 1px solid transparent; transition: border-color var(--t); }
.clip-card .figcap a:hover { border-color: var(--terra); color: var(--terra); }

/* Placeholder card while a short is still being edited */
.facade.placeholder { cursor: default; }
.facade.placeholder img { filter: sepia(0.5) saturate(0.4) brightness(0.55) blur(2px); transform: scale(1.04); }
.facade.placeholder:hover img { transform: scale(1.04); filter: sepia(0.5) saturate(0.4) brightness(0.55) blur(2px); }
.clip-card.is-placeholder .frame { border-style: dashed; }
.clip-card.is-placeholder .quote { color: rgba(255,255,255,0.85); }
.clip-card.is-placeholder .quote::before, .clip-card.is-placeholder .quote::after { content: ''; }
.clip-card.is-placeholder .figcap { color: var(--ink-3); }


/* ── Letter ─────────────────────────────────────────────────── */
.letter-grid { display: grid; grid-template-columns: 280px 1fr; gap: 56px; align-items: start; }
.portrait-frame {
    aspect-ratio: 4/5; background: linear-gradient(160deg, #2a2340, #4a3a6a);
    display: flex; align-items: center; justify-content: center; text-align: center;
    font-family: var(--serif); font-style: italic; color: rgba(255,255,255,0.7);
    border: 8px solid var(--paper); box-shadow: 0 0 0 1px var(--rule-2), 0 20px 40px rgba(28,26,23,0.12);
    overflow: hidden;
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.letter-portrait figcaption { font-family: var(--serif); font-size: 1rem; margin-top: 16px; text-align: center; }
.letter-portrait figcaption span { font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.letter-body { max-width: 62ch; }
.letter-body p { font-family: var(--serif); font-size: 1.12rem; line-height: 1.75; color: var(--ink-2); margin-bottom: 18px; }
.letter-open { font-style: italic; font-size: 1.3rem !important; color: var(--ink) !important; }
.letter-sign { margin-top: 26px; }
.signature { font-family: var(--serif); font-style: italic; font-size: 2.2rem; color: var(--terra); line-height: 1; display: inline-block; margin-top: 6px; }
.letter-actions { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; margin-top: 12px; }

/* ── Be a Guest ─────────────────────────────────────────────── */
.guest-grid { display: grid; grid-template-columns: 340px 1fr; gap: 64px; align-items: start; }
.guest-intro { position: sticky; top: 120px; }
.guest-intro h2 { font-size: 1.7rem; font-weight: 400; line-height: 1.25; margin: 8px 0 16px; }
.guest-intro p { font-family: var(--serif); font-size: 1.05rem; line-height: 1.65; color: var(--ink-2); }
.guest-notes { list-style: none; margin-top: 22px; border-top: 1px solid var(--rule); }
.guest-notes li {
    font-size: 0.86rem; color: var(--ink-2); padding: 10px 0 10px 22px; position: relative;
    border-bottom: 1px solid var(--rule);
}
.guest-notes li::before { content: '\2726'; position: absolute; left: 2px; top: 11px; font-size: 0.6rem; color: var(--gold); }
.req { color: var(--terra); }

.guest-form { display: flex; flex-direction: column; gap: 26px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 36px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
    font-family: var(--sans); font-size: 0.7rem; font-weight: 600;
    letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
}
.field input, .field textarea {
    font-family: var(--serif); font-size: 1.05rem; color: var(--ink);
    background: #fff; border: 1px solid var(--rule-2); border-bottom-width: 2px;
    padding: 11px 14px 12px; outline: none; border-radius: 2px; resize: vertical;
    box-shadow: inset 0 1px 3px rgba(28,26,23,0.05);
    transition: border-color var(--t), box-shadow var(--t), background var(--t);
}
.field textarea { line-height: 1.55; min-height: 120px; }
.field input:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); font-style: italic; }
.field input:focus, .field textarea:focus {
    border-color: var(--ink); background: #fff;
    box-shadow: inset 0 1px 3px rgba(28,26,23,0.05), 0 0 0 3px rgba(28,26,23,0.08);
}
.field input.invalid, .field textarea.invalid {
    border-color: var(--terra);
    box-shadow: inset 0 1px 3px rgba(28,26,23,0.05), 0 0 0 3px rgba(181,80,42,0.12);
}
.guest-form {
    background: var(--paper-2); border: 1px solid var(--rule);
    padding: 32px 36px 34px;
}
.field-submit { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding-top: 8px; }
.guest-form .honey { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }  /* spam trap, never shown */
.field-note { font-family: var(--serif); font-style: italic; font-size: 0.9rem; color: var(--ink-3); }
.btn-ink:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ── Toast ──────────────────────────────────────────────────── */
#toast {
    position: fixed; right: 28px; bottom: 28px; z-index: 200;
    display: flex; align-items: flex-start; gap: 14px;
    max-width: 380px; padding: 16px 18px;
    background: var(--ink); color: var(--paper);
    border-left: 4px solid var(--gold);
    box-shadow: 0 20px 50px rgba(28,26,23,0.35);
    opacity: 0; transform: translateY(12px); pointer-events: none;
    transition: opacity var(--t), transform var(--t);
}
#toast.visible { opacity: 1; transform: none; pointer-events: auto; }
#toast .toast-icon { color: var(--gold); font-size: 1.2rem; margin-top: 2px; }
#toast .toast-title { font-family: var(--serif); font-size: 1.05rem; margin-bottom: 2px; }
#toast .toast-message { font-size: 0.86rem; color: rgba(251,248,241,0.75); line-height: 1.5; }
#toast .toast-close { margin-left: auto; color: rgba(251,248,241,0.6); font-size: 1.3rem; line-height: 1; }
#toast .toast-close:hover { color: var(--paper); }

/* ── Colophon ───────────────────────────────────────────────── */
.colophon { margin-top: 72px; border-top: 1px solid var(--ink); background: var(--paper-2); }
.colophon-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px; padding-top: 44px; padding-bottom: 36px; }
.colophon-col { display: flex; flex-direction: column; gap: 8px; font-size: 0.88rem; color: var(--ink-2); }
.colophon-col h4 { font-size: 1.05rem; margin-bottom: 4px; }
.colophon-col a { transition: color var(--t); }
.colophon-col a:hover { color: var(--terra); }
.colophon-col a i { width: 18px; color: var(--ink-3); }
.colophon-col .btn-ink { align-self: flex-start; margin-top: 6px; }
.colophon-plate { display: inline-block; background: var(--ink); padding: 10px 14px; margin-bottom: 10px; align-self: flex-start; }
.colophon-logo { height: 40px; width: auto; }
.colophon-line {
    text-align: center; font-family: var(--serif); font-style: italic; font-size: 0.9rem; color: var(--ink-3);
    border-top: 1px solid var(--rule); padding: 16px 0;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 980px) {
    /* One column: player, then the copy, then the clips */
    .ep-grid { grid-template-columns: 1fr; gap: 32px; }
    .ep-media { display: contents; }
    .ep-media > figure { order: 1; }
    .ep-copy { order: 2; }
    .ep-clips { order: 3; margin-top: 0; }
    .letter-grid { grid-template-columns: 1fr; }
    .letter-portrait { max-width: 260px; }
    .guest-grid { grid-template-columns: 1fr; gap: 32px; }
    .guest-intro { position: static; }
    .colophon-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    .wrap, .hero-plate { padding-left: 18px; padding-right: 18px; }
    .masthead-top { grid-template-columns: 1fr auto; padding: 10px 18px; }
    .masthead-issue { display: none; }
    .masthead-brand { justify-self: start; }
    .masthead-nav { display: none; flex-direction: column; gap: 0; padding: 6px 18px 12px; }
    .masthead-nav.open { display: flex; }
    .masthead-nav a { padding: 10px 0; }
    .masthead-menu {
        display: block; width: 100%; text-align: left; padding: 8px 18px;
        border-top: 1px solid var(--rule); font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2);
    }
    .plate { margin-top: -40px; padding: 20px 22px 22px; }
    .clip-cards { grid-template-columns: 1fr; gap: 16px; }
    .colophon-inner { grid-template-columns: 1fr; }
    .hero-caption { display: none; }
    .field-row { grid-template-columns: 1fr; }
    #toast { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
