/* ==========================================================================
   Beyond Health Therapy — shared site design system
   Used by every marketing/content page (index, coaching, articles, privacy).
   directory.html is a self-contained mini-app and keeps its own stylesheet,
   but mirrors these tokens for brand consistency.
   ========================================================================== */

:root {
  /* Brand */
  --primary: #2d4a3e;
  --primary-dark: #1f3a30;
  --primary-light: #3d6152;
  --accent: #166534;       /* links, checkmarks, in-content emphasis (green) */
  --gold: #b3803f;         /* decorative accent only — dots, underlines, icon fills (not text) */
  --gold-text: #8a5a1f;    /* AA-safe gold for actual text on white/cream/gold-light */
  --gold-light: #f3e6d0;

  /* Surface */
  --bg: #faf8f2;
  --bg-alt: #f2efe4;
  --card-bg: #ffffff;
  --text: #1f2823;
  --text-muted: #5c6b62;
  --border: #e8e2d3;

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Shape */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(31, 40, 35, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 40, 35, 0.08);
  --shadow-lg: 0 20px 45px rgba(31, 40, 35, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
body > footer { margin-top: auto; }

a { color: var(--accent); }
h1, h2, h3 {
  overflow-wrap: break-word;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
}

::selection { background: var(--gold-light); color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

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

/* ---------- Navigation ---------- */
nav.site-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  background: rgba(250, 248, 242, 0.9);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.brand-logo {
  font-family: var(--font-display);
  font-weight: 600;
  font-style: italic;
  font-size: 1.2rem;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-logo::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}
.nav-links { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  position: relative;
  padding: 4px 0;
}
.nav-links a:not(.btn-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--gold);
  transition: right 0.2s ease;
}
.nav-links a:not(.btn-cta):hover::after,
.nav-links a.active:not(.btn-cta)::after { right: 0; }
.nav-links a.active { color: var(--primary); }
.btn-cta {
  background: var(--primary);
  color: white !important;
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-cta:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

@media (max-width: 560px) {
  nav.site-nav { flex-direction: column; gap: 10px; padding: 12px 16px; }
  .nav-links { justify-content: center; gap: 12px; }
}

/* ---------- Buttons (shared) ---------- */
.btn-primary, .btn-secondary {
  font-family: var(--font-body);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--primary);
  color: white;
  padding: 13px 26px;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--border);
  padding: 11px 24px;
}
.btn-secondary:hover { border-color: var(--primary); transform: translateY(-2px); }

/* ---------- Footer ---------- */
footer.site-footer {
  text-align: center;
  padding: 36px 20px 32px;
  border-top: 1px solid var(--border);
  margin-top: 60px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.7;
  background: var(--bg-alt);
}
footer.site-footer a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
footer.site-footer a:hover { color: var(--primary); }
footer.site-footer .footer-nav { margin-bottom: 10px; }
footer.site-footer .footer-nav a { margin: 0 10px; }
footer.site-footer .footer-social {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 4px; color: var(--text-muted);
}

/* ---------- Long-form article content (shared by article-*.html) ---------- */
article.post { max-width: 680px; margin: 44px auto 0; padding: 0 20px; }
.breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--text-muted); font-weight: 600; text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.kicker { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold-text); }
article.post h1 { color: var(--primary); font-size: 2.1rem; line-height: 1.15; margin: 8px 0 8px; }
.meta { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 30px; }
article.post h2 { color: var(--primary); font-size: 1.3rem; margin: 36px 0 12px; }
article.post p, article.post li { font-size: 1.02rem; line-height: 1.7; }
article.post ul, article.post ol { padding-left: 22px; }
article.post li { margin-bottom: 8px; }

.tier { border-left: 4px solid var(--border); background: white; border-radius: var(--radius-sm); padding: 14px 18px; margin: 12px 0; box-shadow: var(--shadow-sm); }
.tier h3 { margin: 0 0 4px; font-size: 1rem; font-family: var(--font-body); font-weight: 700; }
.tier p { margin: 0; font-size: 0.92rem; color: var(--text-muted); }
.tier.t1 { border-left-color: #166534; } .tier.t1 h3 { color: #166534; }
.tier.t2 { border-left-color: #0369a1; } .tier.t2 h3 { color: #0369a1; }
.tier.t3 { border-left-color: #b45309; } .tier.t3 h3 { color: #b45309; }
.tier.t4 { border-left-color: #991b1b; } .tier.t4 h3 { color: #991b1b; }

.callout {
  background: var(--gold-light); border: 1px solid #e6cd9e; border-radius: var(--radius-md);
  padding: 18px 20px; margin: 28px 0; font-size: 0.95rem;
}
.callout strong { color: var(--primary-dark); }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.cols > div { background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 0.92rem; }
.cols h3 { margin: 0 0 6px; font-size: 0.95rem; font-family: var(--font-body); }
.cols .good { border-left: 4px solid #166534; } .cols .good h3 { color: #166534; }
.cols .avoid { border-left: 4px solid #991b1b; } .cols .avoid h3 { color: #991b1b; }
@media (max-width: 520px) { .cols { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; margin: 16px 0; font-size: 0.9rem; }
th, td { border: 1px solid var(--border); padding: 9px 11px; text-align: left; vertical-align: top; }
th { background: var(--bg-alt); color: var(--primary); }

.disclaimer { max-width: 680px; margin: 32px auto 0; padding: 0 20px; color: var(--text-muted); font-size: 0.85rem; line-height: 1.55; }

@media (max-width: 560px) {
  article.post h1 { font-size: 1.6rem; }
}

/* ---------- Portrait (photo with initials fallback) ---------- */
/* The initials sit underneath; if the photo is missing it's removed and they show through. */
.portrait {
  position: relative;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  flex: none;
}
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Newsletter sign-up (shared) ---------- */
.signup {
  max-width: 680px;
  margin: 48px auto 0;
  padding: 30px 28px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.signup-wrap { padding: 0 20px; }
.signup h2 { margin: 0 0 6px; font-size: 1.35rem; color: var(--gold-light); }
.signup > p { margin: 0 0 18px; font-size: 0.94rem; line-height: 1.55; opacity: 0.92; }
.signup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.signup input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 16px;
  border-radius: 999px;
  border: 2px solid transparent;
  font: inherit;
  font-size: 0.95rem;
}
.signup button {
  background: var(--gold-text);
  color: white;
  border: none;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
.signup button:hover { background: #7a5322; transform: translateY(-1px); }
.signup button:disabled { opacity: 0.7; cursor: default; transform: none; }
.signup-consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 0.8rem; line-height: 1.5; opacity: 0.9; }
.signup-consent input { margin-top: 3px; flex: none; }
.signup a { color: #86efac; }
.signup-success { margin: 0; font-weight: 700; color: #d9f2e4; }

/* ---------- Keep reading (end of article) ---------- */
.keep-reading { max-width: 680px; margin: 48px auto 0; padding: 0 20px; }
.keep-reading h2 { color: var(--primary); font-size: 1.3rem; margin: 0 0 14px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.related-card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.related-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.related-card h3 { color: var(--primary); font-size: 1.05rem; margin: 6px 0 6px; }
.related-card p { margin: 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.55; }
.keep-reading .coach-line { margin: 18px 0 0; font-size: 0.95rem; color: var(--text-muted); }
.keep-reading .coach-line a { font-weight: 700; }

/* ---------- Testimonials ---------- */
.testimonials { max-width: 1080px; margin: 0 auto 40px; padding: 20px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.testimonial {
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 24px 20px;
  box-shadow: var(--shadow-sm);
}
.testimonial blockquote { margin: 0 0 14px; font-family: var(--font-display); font-size: 1.05rem; line-height: 1.5; color: var(--primary-dark); }
.testimonial figcaption { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.testimonial:only-child { max-width: 720px; margin: 0 auto; }

/* ---------- Footer social ---------- */
footer.site-footer .footer-follow { margin-bottom: 10px; }
