/* ============================================================
   Tesi & Moon — gut health blog
   Palette: sage / navy / gold on green-warm paper
   Type: Fraunces (headings) + Mulish (body)
   ============================================================ */

:root {
  --ink:        #263238;   /* navy-charcoal, body text */
  --navy:       #22323f;   /* deep panel / footer */
  --navy-soft:  #33475699; /* muted navy for meta */
  --sage:       #7e9a78;   /* primary botanical accent */
  --sage-deep:  #55684f;   /* deeper sage for emphasis */
  --sage-tint:  #e7ede3;   /* pale sage fill */
  --sage-line:  #cdd8c6;   /* soft sage hairline */
  --paper:      #f5f4ed;   /* page background */
  --card:       #fbfaf5;   /* raised surface */
  --gold:       #b3903f;   /* accent, links, CTA edge */
  --gold-deep:  #8f7230;
  --gold-soft:  #ecdcb0;

  --maxread: 40rem;        /* ~ reading column */
  --radius: 4px;
}

* { 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; }

/* ---------- top bar ---------- */
.masthead {
  border-bottom: 1px solid var(--sage-line);
  background: var(--paper);
}
.masthead .wrap {
  max-width: 68rem;
  margin: 0 auto;
  padding: 1.15rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.wordmark {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  letter-spacing: 0.01em;
}
.wordmark span { color: var(--sage-deep); font-style: italic; }
.wordmark small {
  display: block;
  font-family: "Mulish", sans-serif;
  font-size: .66rem;
  letter-spacing: .22em;
  color: var(--sage-deep);
  text-transform: uppercase;
  margin-top: .1rem;
  font-weight: 700;
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  margin-left: 1.4rem;
  font-size: .95rem;
  font-weight: 600;
}
.nav a:hover { color: var(--gold-deep); }
.nav a:first-child { margin-left: 0; }

/* ---------- logo lockups ---------- */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.logo-full { height: 48px; width: auto; display: block; }
@media (max-width: 40rem) { .logo-full { height: 38px; } }

.foot-brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; }
.logo-mark { height: 54px; width: auto; display: block; }
.foot-name {
  font-family: "Fraunces", serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: #fff;
}
.foot-name em { color: var(--gold-soft); font-style: italic; }

/* ---------- generic containers ---------- */
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.read { max-width: var(--maxread); margin: 0 auto; padding: 0 1.5rem; }

/* ---------- home hero ---------- */
.hero {
  background:
    radial-gradient(120% 90% at 85% -10%, var(--sage-tint), transparent 60%),
    var(--paper);
  padding: 4.5rem 0 3.5rem;
  border-bottom: 1px solid var(--sage-line);
}
.hero .inner { max-width: 46rem; }
.hero .kicker {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--sage-deep);
  font-size: 1.15rem;
  margin: 0 0 .4rem;
}
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.9rem); margin: 0 0 1rem; }
.hero p {
  font-size: 1.2rem;
  max-width: 34rem;
  color: #3c4a44;
  margin: 0 0 1.8rem;
}

/* ---------- 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, box-shadow .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; }

/* ---------- post grid ---------- */
.section-lead {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1rem; margin: 3.2rem 0 1.4rem; flex-wrap: wrap;
}
.section-lead h2 { font-size: 1.9rem; margin: 0; }
.section-lead .rule { flex: 1; height: 1px; background: var(--sage-line); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.6rem;
  padding-bottom: 4rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--sage-line);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.7rem;
  display: flex; flex-direction: column;
}
.card .tag {
  font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  color: var(--sage-deep); margin-bottom: .7rem;
}
.card h3 { font-size: 1.35rem; margin: 0 0 .6rem; }
.card h3 a { text-decoration: none; color: var(--navy); }
.card h3 a:hover { color: var(--gold-deep); }
.card p { margin: 0 0 1.2rem; font-size: .98rem; color: #46524c; }
.card .more { margin-top: auto; font-weight: 700; text-decoration: none; }
.card.soon { background: var(--sage-tint); border-style: dashed; }
.card.soon .tag { color: var(--gold-deep); }
.card.soon h3 { color: var(--sage-deep); }

/* featured card spans full width */
.card.feature { grid-column: 1 / -1; }
@media (min-width: 46rem) {
  .card.feature {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2.2rem;
  }
  .card.feature .feat-copy h3 { font-size: 2rem; }
  .card.feature .feat-side {
    border-left: 1px solid var(--sage-line);
    padding-left: 2rem;
    font-size: .95rem;
    color: #46524c;
  }
}

/* ---------- article ---------- */
.article-head {
  padding: 3.4rem 0 1.6rem;
  border-bottom: 1px solid var(--sage-line);
  margin-bottom: 2.4rem;
}
.article-head .read { text-align: left; }
.eyebrow {
  font-family: "Fraunces", serif; font-style: italic;
  color: var(--sage-deep); font-size: 1.1rem; margin: 0 0 .5rem;
}
.article-head h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); margin: 0 0 1rem; }
.byline { font-size: .92rem; color: #5b6660; }
.byline .dot { color: var(--sage); margin: 0 .45rem; }

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; }

/* two-phase routine (a genuine sequence -> numbered) */
.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; }

.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; }

.review .cta {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--gold-soft);
}
.review .cta p { margin: 0 0 1rem; }

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

/* in-article image */
figure.post-image { max-width: var(--maxread); margin: 2rem auto; }
figure.post-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
}
/* in-flow banner images (direct children of article) stay a tidy band, not a giant 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;
}

/* two-column image + text split (mid-article variation) */
.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.2rem;
}
.site-foot .wrap { display: grid; gap: 1.6rem; }
.site-foot .wordmark, .site-foot .wordmark span { color: #fff; }
.site-foot .wordmark small { color: var(--gold-soft); }
.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); }

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

:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
