/* ============================================================
   The Well Chapter — editorial stylesheet
   Palette: cream / olive / bronze / deep blue (Brand DNA)
   ============================================================ */

:root {
  --bg: #FAF6EE;
  --surface: #FFFDF9;
  --ink: #2B2E26;
  --muted: #66695C;
  --olive: #5A6647;
  --olive-dark: #454F36;
  --olive-tint: #EEF0E5;
  --bronze: #B08D57;
  --bronze-text: #8A6B3C;   /* bronze escuro p/ texto sobre fundo claro (contraste AA) */
  --bronze-light: #D9C49A;  /* bronze claro p/ texto sobre fundo escuro (contraste AA) */
  --bronze-soft: #F3EADB;
  --blue: #33455C;
  --line: #E7DFCE;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--olive-dark); text-decoration-color: var(--bronze); text-underline-offset: 3px; }
a:hover { color: var(--bronze); }

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

.topline { height: 4px; background: linear-gradient(90deg, var(--olive), var(--bronze)); }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand img { width: 44px; height: 44px; border-radius: 50%; }

.brand-name {
  font-family: var(--serif);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: .01em;
}

.brand-tag {
  display: block;
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--bronze-text);
}

.site-nav { display: flex; gap: 26px; }

.site-nav a {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: .02em;
}

.site-nav a:hover { color: var(--bronze); }

/* ---------- Hero (home) ---------- */

.hero {
  background: var(--olive-dark);
  color: #F6F2E8;
  overflow: hidden;
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 48px;
}

.hero-copy { padding: 72px 0; }

.hero-kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bronze-light);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.4vw, 3.4rem);
  line-height: 1.15;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero h1 em { color: #D9C49A; font-style: italic; }

.hero p { font-size: 1.08rem; max-width: 34rem; color: #E4DFD2; margin-bottom: 30px; }

.hero-img { align-self: stretch; min-height: 420px; position: relative; }

.hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.btn {
  display: inline-block;
  background: var(--bronze-text);
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  padding: 14px 28px;
  border-radius: 4px;
  text-decoration: none;
  letter-spacing: .03em;
}

.btn:hover { background: #6F5630; color: #fff; }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--bronze-light);
  color: var(--bronze-light);
  margin-left: 12px;
}

.btn-ghost:hover { background: var(--bronze-light); color: #2B2E26; }

/* ---------- Sections ---------- */

.section { max-width: 1200px; margin: 0 auto; padding: 64px 24px; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 34px; }

.section-title {
  font-family: var(--serif);
  font-size: 1.9rem;
  font-weight: 700;
}

.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  background: var(--bronze);
  margin-top: 10px;
}

/* ---------- Article cards ---------- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}

.card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(43,46,38,.10); }

.card-img { aspect-ratio: 16/10; overflow: hidden; }

.card-img img { width: 100%; height: 100%; object-fit: cover; }

.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card-cat {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bronze-text);
}

.card h3 { font-family: var(--serif); font-size: 1.22rem; line-height: 1.35; }

.card h3 a { color: var(--ink); text-decoration: none; }

.card h3 a:hover { color: var(--olive); }

.card p { font-size: .93rem; color: var(--muted); }

.card-meta { margin-top: auto; font-size: .8rem; color: var(--muted); }

/* ---------- Mission strip ---------- */

.mission {
  background: var(--olive-tint);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.mission-inner { max-width: 860px; margin: 0 auto; padding: 64px 24px; text-align: center; }

.mission-inner h2 { font-family: var(--serif); font-size: 1.7rem; margin-bottom: 16px; }

.mission-inner p { color: var(--muted); margin-bottom: 22px; }

/* ---------- Article layout ---------- */

.article-hero { background: var(--surface); border-bottom: 1px solid var(--line); }

.article-hero-inner { max-width: 1200px; margin: 0 auto; padding: 48px 24px 40px; }

.breadcrumbs { font-size: .82rem; color: var(--muted); margin-bottom: 18px; }

.breadcrumbs a { color: var(--muted); }

.article-cat {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: 14px;
}

h1.article-title {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  line-height: 1.18;
  font-weight: 700;
  max-width: 22ch;
}

.article-byline { display: flex; align-items: center; gap: 12px; margin-top: 22px; font-size: .9rem; color: var(--muted); }

.article-byline img { width: 40px; height: 40px; border-radius: 50%; }

.article-byline strong { color: var(--ink); }

.article-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 52px 24px 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 56px;
  align-items: start;
}

.article-main { max-width: 720px; }

.article-main > p { margin-bottom: 1.35em; }

.article-main h2 {
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.3;
  margin: 2em 0 .8em;
  scroll-margin-top: 90px;
}

.article-main h3 { font-size: 1.13rem; margin: 1.6em 0 .6em; }

.article-main ul, .article-main ol { margin: 0 0 1.35em 1.3em; }

.article-main li { margin-bottom: .45em; }

.article-main figure { margin: 2em 0; }

.article-main figure img { border-radius: 6px; width: 100%; max-height: 460px; object-fit: cover; }

.article-main figcaption { font-size: .78rem; color: var(--muted); margin-top: 8px; }

.article-main figcaption a { color: var(--muted); }

/* Answer block */

.answer-box {
  background: var(--olive-tint);
  border-left: 4px solid var(--bronze);
  border-radius: 0 6px 6px 0;
  padding: 22px 26px;
  margin: 1.8em 0 2.2em;
}

.answer-box .label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--olive-dark);
  display: block;
  margin-bottom: 8px;
}

.answer-box p { margin: 0; font-size: 1.02rem; }

/* Callout / data highlight */

.data-note {
  background: var(--bronze-soft);
  border-radius: 6px;
  padding: 18px 22px;
  margin: 1.6em 0;
  font-size: .97rem;
}

/* FAQ */

.faq { margin-top: 2.5em; }

.faq h2 { margin-bottom: 1em; }

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 12px;
}

.faq summary { font-weight: 700; cursor: pointer; font-size: 1rem; }

.faq details p { margin-top: 10px; font-size: .96rem; }

/* Sources */

.sources { margin-top: 2.6em; padding-top: 1.4em; border-top: 1px solid var(--line); }

.sources h2 { font-size: 1.05rem; font-family: var(--sans); font-weight: 700; margin-bottom: .7em; }

.sources ol { font-size: .86rem; color: var(--muted); margin-left: 1.2em; }

.sources li { margin-bottom: .4em; }

/* Author box */

.author-box {
  display: flex;
  gap: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 24px;
  margin-top: 2.6em;
}

.author-box img { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; }

.author-box h4 { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 4px; }

.author-box p { font-size: .9rem; color: var(--muted); margin: 0; }

/* Disclaimer inline */

.ymyl-note {
  font-size: .84rem;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 6px;
  padding: 14px 18px;
  margin-top: 1.6em;
}

/* ---------- Sidebar ---------- */

.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 24px; }

.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 22px 24px;
}

.side-card h4 {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bronze-text);
  margin-bottom: 14px;
}

.side-author { text-align: center; }

.side-author img { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 12px; }

.side-author .name { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; }

.side-author p { font-size: .85rem; color: var(--muted); margin-top: 8px; }

.toc a {
  display: block;
  font-size: .88rem;
  color: var(--ink);
  text-decoration: none;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}

.toc a:last-child { border-bottom: 0; }

.toc a:hover { color: var(--bronze); }

.related a {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  line-height: 1.4;
}

.related a:last-child { border-bottom: 0; }

.related a:hover { color: var(--olive); }

.related span { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--bronze-text); margin-bottom: 2px; }

/* ---------- Prose pages (about, legal) ---------- */

.prose-wrap { max-width: 780px; margin: 0 auto; padding: 56px 24px 80px; }

.prose-wrap h1 { font-family: var(--serif); font-size: 2.3rem; line-height: 1.2; margin-bottom: .8em; }

.prose-wrap h2 { font-family: var(--serif); font-size: 1.5rem; margin: 1.8em 0 .7em; }

.prose-wrap p { margin-bottom: 1.3em; }

.prose-wrap ul { margin: 0 0 1.3em 1.3em; }

.prose-wrap li { margin-bottom: .5em; }

.about-photo { border-radius: 6px; margin: 1.5em 0 2em; }

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

.site-footer { background: var(--olive-dark); color: #CFC9B8; margin-top: 40px; }

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 30px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
}

.footer-brand .brand-name { color: #F6F2E8; }

.footer-inner p { font-size: .88rem; margin-top: 14px; max-width: 34rem; }

.footer-inner h5 {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--bronze-light);
  margin-bottom: 14px;
}

.footer-inner a { display: block; color: #CFC9B8; font-size: .9rem; text-decoration: none; padding: 4px 0; }

.footer-inner a:hover { color: #fff; }

.footer-legal {
  border-top: 1px solid rgba(255,255,255,.12);
  margin-top: 20px;
}

.footer-legal-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  font-size: .78rem;
  color: #BDB8A6;
}

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

@media (max-width: 980px) {
  .article-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-inner { grid-template-columns: 1fr; gap: 0; }
  .hero-img { min-height: 300px; }
  .hero-copy { padding: 56px 0 40px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .card-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
  .site-nav a { font-size: .84rem; }
  .header-inner { flex-direction: column; gap: 8px; }
  .btn-ghost { margin-left: 0; margin-top: 10px; }
}
