/* ============================================
   MEDICINE PATH PODCAST — "Threshold" design system
   Palette:
     --night:      #14171F  (background, the dark)
     --dusk:       #1E2230  (panels)
     --dusk-2:     #262B3D  (raised panels/hover)
     --ember:      #C9A227  (aged gold — embers, firelight)
     --ember-soft: #E6C766  (ember highlight)
     --threshold:  #3F7268  (dusk teal — the in-between hour)
     --paper:      #EDE7DA  (warm off-white text)
     --paper-dim:  #ABA695  (secondary text)
   Type:
     Display: 'Fraunces' (expressive serif, ritual/manuscript feel)
     Body:    'Work Sans'
     Utility: 'JetBrains Mono' (labels, captions, timestamps)
   Signature: the "threshold line" — a horizon rule with a rising/setting
   marker, used as the section divider throughout. It encodes the site's
   core idea (the deliberate crossing from day into rest) structurally.
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Work+Sans:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --night: #14171F;
  --dusk: #1E2230;
  --dusk-2: #262B3D;
  --ember: #C9A227;
  --ember-soft: #E6C766;
  --threshold: #3F7268;
  --paper: #EDE7DA;
  --paper-dim: #ABA695;
  --max: 760px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--paper);
  font-family: 'Work Sans', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

a { color: var(--ember-soft); text-decoration: none; border-bottom: 1px solid rgba(230,199,102,0.35); }
a:hover { border-bottom-color: var(--ember-soft); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--ember-soft); outline-offset: 3px; }

h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  color: var(--paper);
  line-height: 1.15;
  margin: 0 0 0.5em;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--threshold);
}

.eyebrow.ember { color: var(--ember); }

/* ---------- Layout shells ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.wrap-wide { max-width: 980px; margin: 0 auto; padding: 0 24px; }

header.site-header {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(237,231,218,0.08);
}

.brand {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--paper);
  border: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.brand .dot { color: var(--ember); }

nav.site-nav a {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--paper-dim);
  border: none;
  margin-left: 22px;
}
nav.site-nav a:hover { color: var(--ember-soft); }

/* ---------- Threshold line (signature element) ---------- */
.threshold {
  position: relative;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(237,231,218,0.18) 15%, rgba(237,231,218,0.18) 85%, transparent);
  margin: 56px 0;
}
.threshold::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ember);
  box-shadow: 0 0 10px 2px rgba(201,162,39,0.55);
  transform: translate(-50%, -50%);
}
.threshold.rise::before { background: var(--threshold); box-shadow: 0 0 10px 2px rgba(63,114,104,0.55); }

/* ---------- Hero ---------- */
.hero {
  padding: 88px 24px 64px;
  text-align: left;
  background:
    radial-gradient(ellipse 640px 320px at 85% -10%, rgba(63,114,104,0.20), transparent 60%),
    radial-gradient(ellipse 500px 260px at 10% 110%, rgba(201,162,39,0.10), transparent 60%);
}
.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  max-width: 15ch;
}
.hero .lede {
  color: var(--paper-dim);
  font-size: 1.1rem;
  max-width: 52ch;
  margin-top: 18px;
}

/* ---------- Cards / tenets ---------- */
.tenets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 36px;
}
@media (max-width: 720px) { .tenets { grid-template-columns: 1fr; } }

.tenet-card {
  background: var(--dusk);
  border: 1px solid rgba(237,231,218,0.07);
  border-radius: 3px;
  padding: 26px 22px;
}
.tenet-card .eyebrow { display: block; margin-bottom: 10px; }
.tenet-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.tenet-card p { color: var(--paper-dim); font-size: 0.95rem; margin: 0; }

/* ---------- Episode list ---------- */
.episode {
  display: flex;
  gap: 18px;
  padding: 22px 0;
  border-bottom: 1px solid rgba(237,231,218,0.08);
}
.episode:last-child { border-bottom: none; }
.episode .ep-num {
  font-family: 'JetBrains Mono', monospace;
  color: var(--threshold);
  font-size: 0.85rem;
  padding-top: 4px;
  min-width: 3ch;
}
.episode h3 { font-size: 1.05rem; margin-bottom: 4px; }
.episode p { color: var(--paper-dim); font-size: 0.92rem; margin: 0; }

/* ---------- Article ---------- */
article.post { padding: 64px 24px 40px; }
article.post .meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--paper-dim);
  margin-bottom: 18px;
}
article.post h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); max-width: 22ch; }
article.post .lede {
  font-size: 1.15rem;
  color: var(--paper-dim);
  margin-top: 16px;
}
article.post h2 {
  font-size: 1.4rem;
  margin-top: 2.2em;
}
article.post p { margin: 0 0 1.3em; }
article.post ul, article.post ol { margin: 0 0 1.3em; padding-left: 1.3em; }
article.post li { margin-bottom: 0.5em; }

.callout {
  background: var(--dusk);
  border-left: 3px solid var(--ember);
  border-radius: 0 3px 3px 0;
  padding: 22px 24px;
  margin: 2em 0;
}
.callout p { margin: 0; }
.callout p:not(:last-child) { margin-bottom: 0.8em; }
.callout .eyebrow { display: block; margin-bottom: 8px; }

.byline-box {
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--dusk);
  border-radius: 3px;
  padding: 18px 20px;
  margin-top: 3em;
}
.byline-box .avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ember), var(--threshold));
  flex-shrink: 0;
}
.byline-box .name { font-family: 'Fraunces', serif; font-weight: 600; }
.byline-box .role { color: var(--paper-dim); font-size: 0.85rem; }

/* ---------- Footer ---------- */
footer.site-footer {
  padding: 40px 24px 60px;
  border-top: 1px solid rgba(237,231,218,0.08);
  color: var(--paper-dim);
  font-size: 0.85rem;
}
footer.site-footer a { color: var(--paper-dim); }
footer.site-footer .foot-links { margin-top: 10px; }
footer.site-footer .foot-links a { margin-right: 16px; }

.btn {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--night);
  background: var(--ember-soft);
  padding: 12px 20px;
  border-radius: 2px;
  border-bottom: none;
  margin-top: 8px;
}
.btn:hover { background: var(--ember); border-bottom: none; }
