/* ============================================================
   Tesi & Moon — gut health journal
   Editorial, image-forward layout · sage / navy / gold
   Type: Fraunces (headings) + Mulish (body)
   ============================================================ */

:root {
  --ink:        #263238;
  --navy:       #22323f;
  --sage:       #7e9a78;
  --sage-deep:  #55684f;
  --sage-tint:  #e7ede3;
  --sage-line:  #d7ded1;
  --paper:      #f7f6f1;
  --card:       #ffffff;
  --gold:       #b3903f;
  --gold-deep:  #8f7230;
  --gold-soft:  #ecdcb0;

  --maxread: 40rem;
  --maxwide: 70rem;
  --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Mulish", system-ui, -apple-system, sans-serif;
  font-size: 1.075rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  color: var(--navy);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

a { color: var(--gold-deep); text-underline-offset: 3px; }
a:hover { color: var(--sage-deep); }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxwide); margin: 0 auto; padding: 0 1.5rem; }
.read { max-width: var(--maxread); margin: 0 auto; padding: 0 1.5rem; }

/* category tag */
.tag {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin: 0 0 .6rem;
}

/* ---------- sticky masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(247,246,241,0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--sage-line);
}
.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.5rem;
  flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.logo-full { height: 44px; width: auto; display: block; }
@media (max-width: 40rem) { .logo-full { height: 34px; } }
.nav { display: flex; flex-wrap: wrap; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 1.4rem;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.nav a:first-child { margin-left: 0; }
.nav a:hover { color: var(--gold-deep); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  padding: .8rem 1.5rem;
  border-radius: var(--radius);
  transition: background .18s ease, color .18s ease;
}
.btn-solid { background: var(--sage-deep); color: #fff; }
.btn-solid:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: #2c2410; box-shadow: inset 0 0 0 1px var(--gold-deep); }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }

.more {
  font-weight: 800;
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold-deep);
}
.more:hover { color: var(--sage-deep); }

/* ---------- home: page intro ---------- */
.page-intro {
  padding: 3rem 0 1.5rem;
}
.page-intro .kicker {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--sage-deep);
  font-size: 1.15rem;
  margin: 0 0 .3rem;
}
.page-intro h1 { font-size: clamp(2.2rem, 5.5vw, 3.4rem); margin: 0 0 .8rem; max-width: 24ch; }
.page-intro p { font-size: 1.15rem; max-width: 40ch; color: #43514b; margin: 0; }

/* ---------- featured story ---------- */
.featured {
  display: grid;
  gap: 1.6rem;
  margin: 1.5rem 0 3.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--sage-line);
}
@media (min-width: 46rem) {
  .featured { grid-template-columns: 1.15fr 1fr; gap: 2.4rem; align-items: center; }
}
.featured__img { display: block; border-radius: var(--radius); overflow: hidden; }
.featured__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.featured__img:hover img { transform: scale(1.03); }
.featured__body h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .7rem; }
.featured__body h2 a { color: var(--navy); text-decoration: none; }
.featured__body h2 a:hover { color: var(--gold-deep); }
.featured__body p { margin: 0 0 1.1rem; color: #46524c; }

/* ---------- section headings ---------- */
.section-lead {
  display: flex; align-items: baseline; gap: 1rem;
  margin: 0 0 1.6rem;
}
.section-lead h2 { font-size: 1.7rem; margin: 0; }
.section-lead .rule { flex: 1; height: 1px; background: var(--sage-line); }

/* ---------- card grid ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr));
  gap: 2rem 1.8rem;
  padding-bottom: 3.5rem;
}
.post-card { display: flex; flex-direction: column; }
.post-card__img { display: block; border-radius: var(--radius); overflow: hidden; margin-bottom: 1rem; }
.post-card__img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .4s ease; }
.post-card__img:hover img { transform: scale(1.04); }
.post-card h3 { font-size: 1.28rem; margin: 0 0 .5rem; }
.post-card h3 a { color: var(--navy); text-decoration: none; }
.post-card h3 a:hover { color: var(--gold-deep); }
.post-card .excerpt { margin: 0; font-size: .96rem; color: #4a564f; }

/* text-only card (no image) */
.post-card.text-only { background: var(--sage-tint); border-radius: var(--radius); padding: 1.5rem; }

/* ---------- more-from-journal headline list ---------- */
.more-list-section { padding: 2.6rem 0 3.5rem; border-top: 1px solid var(--sage-line); }
.more-list { list-style: none; margin: 1.2rem 0 0; padding: 0; }
.more-list li { border-bottom: 1px solid var(--sage-line); }
.more-list li:first-child { border-top: 1px solid var(--sage-line); }
.more-list a {
  display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap;
  padding: .95rem 0; text-decoration: none;
}
.more-list a .tag { margin: 0; flex: 0 0 auto; }
.more-list a .headline {
  font-family: "Fraunces", serif; font-size: 1.15rem; color: var(--navy);
}
.more-list a:hover .headline { color: var(--gold-deep); }

/* ---------- rituals + about (home) ---------- */
.band { padding: 2.6rem 0; border-top: 1px solid var(--sage-line); }
.band h2 { font-size: 1.7rem; margin: 0 0 .8rem; }
.band p { max-width: 44ch; color: #46524c; margin: 0; }

/* ---------- article header + hero image ---------- */
.article-head { padding: 2.8rem 0 1.2rem; }
.article-head .read { text-align: left; }
.eyebrow {
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep); margin: 0 0 .7rem;
}
.article-head h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .9rem; }
.byline { font-size: .9rem; color: #5b6660; }
.byline .dot { color: var(--sage); margin: 0 .45rem; }

figure.hero-image { max-width: 54rem; margin: 1.2rem auto 2.4rem; padding: 0 1.5rem; }
figure.hero-image img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius); display: block;
}
figure.hero-image figcaption {
  font-size: .78rem; color: #6a746e; margin-top: .5rem; font-style: italic; text-align: right;
}

/* ---------- article body ---------- */
article { padding-bottom: 2rem; }
article p, article ul, article ol { max-width: var(--maxread); }
article p { margin: 1.15rem auto; }
article ul, article ol { margin: 1.15rem auto; padding-left: 1.3rem; }
article li { margin: .4rem 0; }
article h2 { max-width: var(--maxread); margin: 2.8rem auto 0.8rem; font-size: 1.75rem; padding-top: .4rem; }
article h3 { max-width: var(--maxread); margin: 2rem auto .6rem; font-size: 1.3rem; color: var(--sage-deep); }
article strong { color: var(--navy); }
.lead-para { font-size: 1.22rem; line-height: 1.6; color: #33423c; }

/* comparison table */
.table-wrap { max-width: var(--maxread); margin: 1.8rem auto; overflow-x: auto; }
table.compare {
  width: 100%; border-collapse: collapse; font-size: .98rem;
  background: var(--card); border: 1px solid var(--sage-line);
  border-radius: var(--radius); overflow: hidden;
}
table.compare th, table.compare td {
  text-align: left; padding: .8rem .9rem; vertical-align: top;
  border-bottom: 1px solid var(--sage-line);
}
table.compare thead th { background: var(--sage-deep); color: #fff; font-weight: 700; }
table.compare thead th:first-child { background: var(--navy); }
table.compare tbody th { font-weight: 700; color: var(--navy); background: var(--sage-tint); width: 33%; }
table.compare tr:last-child td, table.compare tr:last-child th { border-bottom: none; }

/* callout */
.callout {
  max-width: var(--maxread); margin: 2rem auto;
  background: var(--sage-tint); border-left: 4px solid var(--sage);
  border-radius: 0 var(--radius) var(--radius) 0; padding: 1.2rem 1.4rem;
}
.callout.warn { border-left-color: var(--gold); background: #fbf3df; }
.callout h4 { margin: 0 0 .5rem; font-size: 1.15rem; color: var(--navy); }
.callout p { margin: .4rem 0; }
.callout ul { margin: .5rem 0; }

/* two-phase routine */
.phases { max-width: var(--maxread); margin: 1.8rem auto; display: grid; gap: 1rem; }
.phase {
  display: grid; grid-template-columns: 2.4rem 1fr; gap: 1rem;
  background: var(--card); border: 1px solid var(--sage-line);
  border-radius: var(--radius); padding: 1.1rem 1.2rem;
}
.phase .n { font-family: "Fraunces", serif; font-size: 1.7rem; color: var(--gold-deep); line-height: 1; }
.phase h4 { margin: .1rem 0 .3rem; font-size: 1.1rem; color: var(--navy); }
.phase p { margin: 0; font-size: .98rem; }

/* product review block */
.review {
  max-width: 44rem; margin: 3rem auto; background: var(--card);
  border: 1px solid var(--gold-soft); border-top: 4px solid var(--gold);
  border-radius: var(--radius); padding: 2rem 1.9rem 2.2rem;
}
.review > h2 { max-width: none; margin: 0 0 .3rem; padding: 0; font-size: 1.9rem; }
.review .sub { font-size: 1rem; color: var(--sage-deep); margin: 0 0 1rem; font-family: "Fraunces", serif; font-style: italic; }
.review h3 { max-width: none; margin: 1.6rem 0 .5rem; color: var(--navy); font-size: 1.28rem; }
.review p, .review ul { max-width: none; }
.review ul { list-style: none; padding-left: 0; }
.review .proscons { display: grid; gap: 1.2rem; margin: .6rem 0; }
@media (min-width: 34rem) { .review .proscons { grid-template-columns: 1fr 1fr; } }
.review .pc h4 { margin: 0 0 .5rem; font-size: 1rem; color: var(--sage-deep); }
.review .pc.cons h4 { color: var(--gold-deep); }
.review .pc li { position: relative; padding-left: 1.4rem; margin: .45rem 0; font-size: .98rem; }
.review .pc.pros li::before { content: "✓"; position: absolute; left: 0; color: var(--sage-deep); font-weight: 800; }
.review .pc.cons li::before { content: "–"; position: absolute; left: 0; color: var(--gold-deep); font-weight: 800; }
.review .cta { margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--gold-soft); }
.review .cta p { margin: 0 0 1rem; }

.aff-note {
  font-size: .86rem; color: #5b6660; background: var(--sage-tint);
  border-radius: var(--radius); padding: .7rem .9rem; margin: 0 0 1.4rem;
}
.aff-note strong { color: var(--navy); }
.aff-link { font-weight: 800; color: var(--gold-deep); background: var(--gold-soft); padding: .1rem .35rem; border-radius: 3px; text-decoration: none; }
.aff-link:hover { background: var(--gold); color: #2c2410; }

.disclaimer { max-width: 44rem; margin: 1.4rem auto 0; font-size: .84rem; color: #6a746e; font-style: italic; }

/* inline in-article image (optional, dormant) */
figure.post-image { max-width: var(--maxread); margin: 1.8rem auto; }
figure.post-image img { width: 100%; height: auto; border-radius: var(--radius); display: block; }
article > figure.post-image img { max-height: 340px; object-fit: cover; object-position: center; }
figure.post-image figcaption { font-size: .8rem; color: #6a746e; margin-top: .5rem; font-style: italic; text-align: right; }
.media-split { max-width: 52rem; margin: 1.8rem auto; display: grid; gap: 1.8rem; align-items: center; }
@media (min-width: 46rem) { .media-split { grid-template-columns: 1fr 0.8fr; } }
.media-split ul { max-width: none; margin: 0; }
.media-split figure.post-image { max-width: none; margin: 0; }

/* ---------- footer ---------- */
.site-foot { background: var(--navy); color: #d7ded6; margin-top: 3rem; padding: 3rem 0 2.4rem; }
.site-foot .wrap { display: grid; gap: 1.6rem; }
.foot-brand { display: inline-flex; align-items: center; text-decoration: none; }
.logo-foot { height: 46px; width: auto; display: block; }
.foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem 1.6rem; }
.foot-links a { color: #cdd8c6; text-decoration: none; font-size: .92rem; }
.foot-links a:hover { color: #fff; text-decoration: underline; }
.foot-disc { font-size: .84rem; color: #9fb09c; max-width: 46rem; line-height: 1.6; }
.foot-disc a { color: var(--gold-soft); }

/* ---------- back to top ---------- */
.to-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem;
  width: 2.9rem; height: 2.9rem; border-radius: 50%;
  background: var(--sage-deep); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; line-height: 1; text-decoration: none;
  box-shadow: 0 3px 12px rgba(0,0,0,.20);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, background .2s ease, transform .2s ease;
  z-index: 60;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--navy); color: #fff; transform: translateY(-2px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
