/* ==========================================================================
   A Middle Manager's Guide to Parish Ministry — site stylesheet
   Palette: gold + parchment, evoking a wax seal / illuminated manuscript.
   Swap the --medallion-* placeholder art for the finished lamb logo later.
   ========================================================================== */

:root {
  --parchment: #fdfbf5;
  --parchment-deep: #f3ecd9;
  --parchment-line: #d9c9a3;
  --ink: #241c14;
  --ink-soft: #4a3f30;
  --gold: #a9761f;
  --gold-bright: #c9962f;
  --gold-deep: #7c5716;
  --wine: #6e2c2c;
  --shadow: rgba(42, 33, 24, 0.14);

  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-body: "Spectral", Georgia, "Times New Roman", serif;
  --font-ui: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --parchment: #170905;
    --parchment-deep: #0f0604;
    --parchment-line: #3d3220;
    --ink: #f7efdc;
    --ink-soft: #d3c3a0;
    --gold: #d9a53a;
    --gold-bright: #eac05a;
    --gold-deep: #e0b155;
    --wine: #d99191;
    --shadow: rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --parchment: #170905;
  --parchment-deep: #0f0604;
  --parchment-line: #3d3220;
  --ink: #f7efdc;
  --ink-soft: #d3c3a0;
  --gold: #d9a53a;
  --gold-bright: #eac05a;
  --gold-deep: #e0b155;
  --wine: #d99191;
  --shadow: rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--parchment);
  color: var(--ink);
}

body {
  font-family: var(--font-body);
  font-size: 1.25rem;
  line-height: 1.65;
  background-image:
    radial-gradient(ellipse at top, rgba(169, 118, 31, 0.06), transparent 60%),
    linear-gradient(var(--parchment), var(--parchment));
}

/* Dark mode: a deeper, two-layer glow evoking crema fading into an espresso
   shot's body — a tight warm highlight near the top, widening into a
   broader amber falloff, both fully faded out well above the body copy. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) body {
    background-image:
      radial-gradient(ellipse 55% 34% at 50% -4%, rgba(127, 106, 62, 0.30), transparent 60%),
      radial-gradient(ellipse 95% 55% at 50% -6%, rgba(75, 42, 21, 0.30), transparent 72%),
      linear-gradient(var(--parchment), var(--parchment));
  }
}

:root[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse 55% 34% at 50% -4%, rgba(127, 106, 62, 0.30), transparent 60%),
    radial-gradient(ellipse 95% 55% at 50% -6%, rgba(75, 42, 21, 0.30), transparent 72%),
    linear-gradient(var(--parchment), var(--parchment));
}

a { color: var(--gold-deep); text-decoration-color: var(--parchment-line); }
a:hover { color: var(--wine); }

.wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.wrap-wide {
  max-width: 64rem;
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--parchment-line);
  padding: 2.5rem 0 1.75rem;
  text-align: center;
}

.medallion {
  width: 101px;
  height: 101px;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 3px 6px var(--shadow));
}

.site-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.3rem;
  letter-spacing: 0.01em;
  margin: 0;
}

.site-title a { color: var(--ink); text-decoration: none; }

.site-tagline {
  font-family: var(--font-ui);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold-deep);
  margin: 0.5rem 0 0;
}

.site-byline {
  font-family: var(--font-ui);
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0.35rem 0 0;
}

nav.site-nav {
  margin-top: 1.5rem;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

nav.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  margin: 0 0.85rem;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

nav.site-nav a:hover,
nav.site-nav a.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.btn-subscribe {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.55rem 1.4rem;
  background: var(--gold-deep);
  color: var(--parchment) !important;
  font-family: var(--font-ui);
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-decoration: none !important;
  border-radius: 6px;
  box-shadow: 0 4px 14px var(--shadow);
  transition: background 0.15s ease, transform 0.15s ease;
}

.btn-subscribe:hover { background: var(--wine); transform: translateY(-1px); }

/* Dark mode: give the subscribe button's hover-lift a warm, espresso-toned
   shadow instead of the neutral grey the shared --shadow variable gives it,
   and swap the hover background from --wine (too pastel-pink against the
   espresso palette) to --ink — the same ivory as the body text, reading
   like crema rather than an unrelated wine tone. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-subscribe:hover {
    background: var(--ink);
    box-shadow: 0 6px 20px rgba(207, 157, 92, 0.45);
  }
}

:root[data-theme="dark"] .btn-subscribe:hover {
  background: var(--ink);
  box-shadow: 0 6px 20px rgba(207, 157, 92, 0.45);
}

/* ---------- Main content ---------- */

main { padding: 2.5rem 0 4rem; }

.pillar-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold-deep);
  border: 1px solid var(--parchment-line);
  border-radius: 999px;
  padding: 0.15rem 0.65rem;
  margin: 0 0.4rem 0.6rem 0;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

a.pillar-tag:hover,
a.pillar-tag:focus-visible {
  background: var(--gold-deep);
  color: var(--parchment);
  border-color: var(--gold-deep);
}

.post-share {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--parchment-line);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-share-label {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-right: 0.35rem;
}

/* Deliberately the reverse of .pillar-tag's resting/hover pair: the
   tag chips start outlined and fill with gold on hover, so the Share
   pill starts filled and goes outlined on hover/open -- same two
   states, opposite order, so the two pill styles read as a matched
   pair rather than duplicates. Both halves of the swap reuse the same
   --gold-deep/--parchment tokens the tags use (with no raw colors of
   its own), so light/dark mode stay correct automatically. */
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  background: var(--gold-deep);
  color: var(--parchment);
  border: 1px solid var(--gold-deep);
  border-radius: 999px;
  padding: 0.3rem 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.share-btn:hover,
.share-btn:focus-visible,
.share-trigger[aria-expanded="true"] {
  background: none;
  color: var(--gold-deep);
  border-color: var(--parchment-line);
}

.share-icon { flex: none; }

.share-wrap { position: relative; display: inline-block; }

.post-meta-with-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.post-meta-with-share .share-wrap { margin-left: auto; }

.post-meta-with-share .share-menu { left: auto; right: 0; }

.share-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  z-index: 20;
  min-width: 190px;
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  border: 1px solid var(--parchment-line);
  border-radius: 10px;
  box-shadow: 0 10px 28px var(--shadow);
  padding: 0.35rem;
}

/* The [hidden] attribute is how the JS opens/closes this menu, but our
   own "display: flex" above outranks the browser's built-in (very low
   priority) "[hidden] { display: none }" rule -- without this, the menu
   would render open all the time regardless of the hidden attribute. */
.share-menu[hidden] {
  display: none;
}

.share-menu-item {
  display: block;
  width: 100%;
  text-align: left;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink);
  background: none;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 0.7rem;
  text-decoration: none;
  cursor: pointer;
}

.share-menu-item:hover,
.share-menu-item:focus-visible {
  background: var(--parchment-deep);
  color: var(--gold-deep);
}

.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-card {
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--parchment-line);
}

.post-card:first-child { padding-top: 0; }

.post-card h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin: 0 0 0.15rem;
  line-height: 1.3;
}

.post-card h2 a { text-decoration: none; color: var(--ink); }
.post-card h2 a:hover { color: var(--gold-deep); }

.post-subtitle {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 0.5rem;
}

.post-excerpt {
  margin: 0.5rem 0 0;
  color: var(--ink-soft);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.post-meta {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

.post-reprint-notice {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  margin-top: 2.5rem;
  text-align: center;
}

.read-on-substack {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.read-on-substack::after { content: " →"; }

/* ---------- Homepage: two-column layout ---------- */

.page-heading {
  font-family: var(--font-display);
  font-size: 2.1rem;
  margin: 0 0 1.75rem;
  text-align: center;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 3rem;
  align-items: start;
}

.col-heading {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gold-deep);
  margin: 0 0 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--parchment-line);
}

.notes-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.note-card {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--parchment-line);
}

.note-card:first-child { padding-top: 0; }
.note-card:last-child { border-bottom: none; }

.note-date {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: 0 0 0.3rem;
}

.note-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin: 0 0 0.3rem;
}

.note-text {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.home-col-articles .post-list-compact .post-card {
  padding: 1.1rem 0;
}

.home-col-articles .post-list-compact h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin: 0 0 0.15rem;
  line-height: 1.3;
}

.home-col-articles .post-list-compact h3 a { text-decoration: none; color: var(--ink); }
.home-col-articles .post-list-compact h3 a:hover { color: var(--gold-deep); }

@media (max-width: 42rem) {
  .home-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .home-col-articles {
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--parchment-line);
  }
}

/* ---------- Homepage: Substack subscribe embed ---------- */

.substack-embed-section {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--parchment-line);
  text-align: center;
}

.substack-embed-wrap {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--parchment-deep);
  border: 1px solid var(--parchment-line);
  border-radius: 8px;
  box-shadow: 0 2px 8px var(--shadow);
}

.substack-embed-wrap iframe {
  display: block;
  max-width: 100%;
  border-radius: 4px;
}

/* ---------- Decorative divider ribbon ---------- */

.ribbon-divider {
  height: 7px;
  margin: 0 auto 2.5rem;
  max-width: 46rem;
  background-image: url("../img/divider-stripe.png");
  background-repeat: repeat-x;
  background-size: auto 100%;
  border-radius: 1px;
  opacity: 0.85;
}

/* ---------- Empty state (no published posts yet) ---------- */

.empty-state {
  text-align: center;
  padding: 3.5rem 1rem;
  color: var(--ink-soft);
  font-family: var(--font-ui);
}

.empty-state p:first-child {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-style: italic;
  margin-bottom: 1.5rem;
}

/* ---------- About page ---------- */

.about-banner {
  margin: 0 0 1.75rem;
}

.about-banner img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  border: 1px solid var(--parchment-line);
  box-shadow: 0 4px 14px var(--shadow);
}

.about-hero { text-align: center; margin-bottom: 2rem; }

.short-bio {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-style: italic;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 auto;
}

.about-body p {
  margin: 1.1rem 0;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.about-body h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.015em;
  margin: 2.25rem 0 0.75rem;
}

.about-body h2:first-child { margin-top: 0; }

.about-body ul.about-list {
  margin: 1.1rem 0;
  padding-left: 1.4rem;
}

.about-body ul.about-list li {
  margin: 0.75rem 0;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.55;
}

.about-body ul.about-list li strong {
  color: var(--ink);
}

.about-body p.about-flourish {
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
  margin: 2.25rem 0;
  line-height: 1.6;
}

.bmc-badge {
  height: 54px;
  width: auto;
  display: inline-block;
  border-radius: 6px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.bmc-badge:hover {
  transform: translateY(-1px);
  opacity: 0.92;
}

.about-cta {
  text-align: center;
  margin: 2.25rem 0 0;
}

.about-cta .btn-subscribe {
  margin: 0;
}

.about-cta-divider {
  margin: 1.75rem auto;
}

.about-legal {
  margin-top: 1.25rem;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.about-legal p { margin: 0.85rem 0; }

.about-legal h3 {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin: 1.75rem 0 0.5rem;
  text-align: center;
}

.about-placeholder {
  border: 1px dashed var(--parchment-line);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  color: var(--ink-soft);
  font-family: var(--font-ui);
  font-size: 1.05rem;
}

/* ---------- Footer ---------- */

footer {
  border-top: 1px solid var(--parchment-line);
  padding: 2rem 0 3rem;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--ink-soft);
}

footer a { color: var(--ink-soft); }

/* ---------- Responsive ---------- */

@media (max-width: 30rem) {
  .site-title { font-size: 1.85rem; }
  nav.site-nav a { margin: 0 0.5rem; }
  body { font-size: 1.15rem; }
}

/* ---------- Post body (RSS-synced full article text) ---------- */

.post-body {
  /* Deliberately no max-width here: the About page's running text
     (.about-body) isn't narrowed either -- it just fills .wrap (46rem).
     Narrowing only this block made the post's own title/subtitle look
     wider than its own body text, and the About page narrower than
     this one, for no real reason. Both now share the same column. */
}

.post-copyright h3 {
  text-align: center;
}

.post-body p {
  margin: 1.1rem 0;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.post-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold-deep);
  letter-spacing: 0.015em;
  margin: 2.25rem 0 0.75rem;
}

.post-body h3:first-child { margin-top: 0; }

.post-body ul, .post-body ol {
  margin: 1.1rem 0;
  padding-left: 1.4rem;
}

.post-body li {
  margin: 0.75rem 0;
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  line-height: 1.55;
}

.post-body a {
  color: var(--gold-deep);
}

/* ---------- Post end-of-article CTAs (Buy Me a Coffee + Subscribe) ---------- */

.post-cta {
  margin: 2.5rem 0 0;
  text-align: center;
  padding-top: 1.75rem;
  border-top: 1px solid var(--parchment-line);
}

.post-cta-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 0 0 1rem;
}

.substack-embed-wrap {
  display: flex;
  justify-content: center;
  padding: 0.75rem;
  background: var(--parchment-deep);
  border-radius: 10px;
}

.substack-embed-wrap iframe {
  max-width: 100%;
  border-radius: 6px;
}
