/* ============================================================
   From the Well — shared chrome (global nav + footer)
   Included on every page via <link href="/chrome.css">.
   Uses CSS custom properties (--ink, --water, --maxw, etc.)
   that each page still declares in its own :root.
   ============================================================ */

/* ---------- Base foundation (shared by every page) ---------- */
:root {
  --paper: #ffffff; --paper-2: #eceff4;
  --ink: #2b3a5b; --ink-soft: #3c4560; --muted: #6b7288;
  --line: #d7dbe4; --navy-deep: #1b2740; --water: #5b6a8a;
  --maxw: 1080px; --read: 40rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--paper); color: var(--ink-soft);
  font-family: "EB Garamond", Georgia, serif; font-size: 1.18rem; line-height: 1.75;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
em { font-style: italic; }
a { color: inherit; }

/* ---------- Global nav (bookmark menu) ---------- */
.nav-toggle {
  position: fixed; top: 0; right: max(1.5rem, calc((100vw - var(--maxw)) / 2 + 1.5rem)); z-index: 60;
  display: inline-flex; align-items: center;
  background: none; border: 0; cursor: pointer; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.nav-toggle .bookmark { width: 27px; height: 66px; display: block; fill: var(--ink); filter: drop-shadow(0 2px 4px rgba(27,39,64,0.32)); transition: fill .2s ease; }
.nav-toggle:hover .bookmark { fill: var(--water); }
.nav-toggle[aria-expanded="true"] .bookmark { fill: #e6e9f1; filter: none; }

.nav-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(15,22,38,0.4); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.nav-scrim.open { opacity: 1; visibility: visible; }

.nav-drawer {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: var(--navy-deep); color: #e6e9f1;
  max-height: 100vh; overflow-y: auto;
  transform: translateY(-100%); transition: transform .38s cubic-bezier(.22,.61,.36,1);
  box-shadow: 0 22px 44px -26px rgba(0,0,0,0.55);
}
.nav-drawer.open { transform: translateY(0); }
.nav-drawer-inner {
  max-width: 46rem; margin: 0 auto; padding: 4.5rem 1.5rem 3rem;
  display: grid; grid-template-columns: 1fr 2fr; gap: 2.5rem 3rem; align-items: start; text-align: left;
}
.nav-primary { display: flex; flex-direction: column; align-items: flex-start; }
.nav-primary a { color: #e6e9f1; text-decoration: none; font-family: "faust", Georgia, serif; font-weight: 300; font-size: 1.2rem; letter-spacing: -0.01em; line-height: 1.15; padding: 0.42rem 0; transition: color .2s ease; }
.nav-primary a:hover { color: #aebbd6; }
.nav-primary .nav-get {
  margin-top: 1.1rem; font-family: "EB Garamond", serif; font-size: 1.05rem; letter-spacing: 0.04em;
  background: #eceff4; color: var(--navy-deep); padding: 0.6rem 1.6rem; border-radius: 2px;
}
.nav-primary .nav-get:hover { background: var(--water); color: #fff; }

.nav-feature-label { font-family: "EB Garamond", serif; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.7rem; color: #8ea3c6; margin: 0.4rem 0 0.9rem; }
.nav-latest { display: block; text-decoration: none; border-top: 1px solid rgba(230,233,241,0.16); border-bottom: 1px solid rgba(230,233,241,0.16); padding: 1.1rem 0; transition: opacity .2s ease; }
.nav-latest:hover { opacity: 0.72; }
.nav-latest .nl-ref { display: block; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.68rem; color: #9db0d0; margin-bottom: 0.35rem; }
.nav-latest .nl-title { display: block; font-family: "faust", serif; font-weight: 300; color: #e6e9f1; font-size: 1.4rem; line-height: 1.15; margin-bottom: 0.4rem; }
.nav-latest .nl-teaser { display: block; color: #b9c2d6; font-size: 0.96rem; line-height: 1.5; }

@media (max-width: 620px) { .nav-drawer-inner { grid-template-columns: 1fr; gap: 1.8rem; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: #cdd3e0; padding: 3rem 1.5rem 2.5rem; }
.footer-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 1.4rem;
}
.footer-brand { display: inline-flex; line-height: 0; }
.footer-brand .mark-sm { display: block; width: 40px; height: auto; opacity: 0.9; filter: brightness(0) invert(0.86); }
.footer-links { display: flex; align-items: center; gap: 1.15rem; flex-wrap: wrap; }
.footer-links a { color: #e6e9f1; text-decoration: none; font-size: 0.92rem; letter-spacing: 0.02em; border-bottom: 1px solid transparent; transition: border-color .2s ease; }
.footer-links a:hover { border-color: var(--water); }
.footer-links a.footer-cta { background: #eceff4; color: var(--navy-deep); padding: 0.5rem 1.2rem; border: 1px solid #eceff4; border-radius: 2px; letter-spacing: 0.03em; }
.footer-links a.footer-cta:hover { background: var(--water); border-color: var(--water); color: #fff; }
.footer-meta { width: 100%; margin: 1.4rem 0 0; font-size: 0.85rem; color: #8a92a8; letter-spacing: 0.03em; border-top: 1px solid rgba(230,233,241,0.12); padding-top: 1.4rem; }
.footer-meta a { color: #b9c2d6; text-decoration: none; border-bottom: 1px solid rgba(230,233,241,0.25); transition: border-color .2s ease, color .2s ease; }
.footer-meta a:hover { border-color: var(--water); color: #e6e9f1; }

/* ---------- "Read" indicator (bookmark ribbon on read devotionals) ---------- */
.entry, .dev-card { position: relative; }
.entry.is-read::after, .dev-card.is-read::after {
  content: ""; position: absolute; top: 0;
  width: 14px; height: 19px;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2015%2020'%3E%3Cpath%20d='M1%200%20h13%20v18%20l-6.5%20-4.5%20-6.5%204.5%20z'%20fill='%235b6a8a'/%3E%3C/svg%3E");
}
.entry.is-read::after { right: 0.15rem; }
.dev-card.is-read::after { right: 0.9rem; }
.entry.is-read .etitle, .dev-card.is-read .t { color: var(--water); }
