/* =========================================================================
   Diet Train Lose — mom-blog stylesheet
   Warm, handcrafted, "passion project" feel. Rebrand by editing the
   variables in :root — everything else inherits from them.
   Fonts (Fraunces / Lora / Caveat) are loaded via <link> in each HTML page.
   ========================================================================= */

:root {
  /* --- Palette: warm paper + food-blog accents. Tweak to rebrand. --- */
  --paper:     #FAF4E8;   /* page background — warm recipe-card cream    */
  --paper-2:   #F3E9D7;   /* deeper warm panel / section bands          */
  --card:      #FFFCF5;   /* cards / elevated surfaces                  */
  --sticky:    #FFF6E2;   /* handwritten sticky-note yellow             */
  --ink:       #3E2F23;   /* primary text (warm dark brown)             */
  --ink-soft:  #8A745C;   /* secondary / meta text                      */
  --terra:     #C25B3C;   /* brand + CTAs (terracotta)                  */
  --terra-dark:#A8492E;   /* CTA shadow / hover, body links             */
  --sage:      #7E8B5A;   /* "fresh/healthy" accent                     */
  --sage-soft: #EAEEDD;   /* sage tint for pills/panels                 */
  --honey:     #D69A3E;   /* honey/mustard pop (badges, tape)           */
  --blush:     #ECC8BA;   /* dusty blush (soft panels/tags)             */
  --line:      #E4D6BF;   /* hairline + dashed borders                  */

  /* --- Type --- */
  --font-script: "Caveat", "Comic Sans MS", cursive;
  --font-head:   "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:   "Lora", Georgia, serif;

  /* --- Shape / depth --- */
  --radius:   18px;
  --maxw:     740px;
  --shadow:        0 8px 22px rgba(95, 62, 32, .10);
  --shadow-soft:   0 3px 12px rgba(95, 62, 32, .07);
}

/* --- Reset / base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background-color: var(--paper);
  /* whisper of paper grain */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--terra-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--terra); }
::selection { background: var(--honey); color: #fff; }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.18; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 1.9rem); margin: 1.8em 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.5em 0 .4em; }
p  { margin: 0 0 1.1em; }

/* --- Layout --- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.container.wide { max-width: 1100px; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }

/* --- Header --- */
.site-header { border-bottom: 2px dashed var(--line); }
.site-header__inner {
  max-width: 1100px; margin: 0 auto; padding: 20px 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
}
.brand { text-decoration: none; line-height: 1.1; }
.brand__name {
  font-family: var(--font-head); font-weight: 700; font-size: 1.7rem; color: var(--terra);
  letter-spacing: -0.02em;
}
.brand__tagline {
  display: block; font-family: var(--font-script); font-weight: 600;
  font-size: 1.25rem; color: var(--sage); margin-top: -4px;
}
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  color: var(--ink); text-decoration: none; padding: 8px 14px; border-radius: 999px;
  transition: background .2s ease, color .2s ease;
}
.site-nav a:hover { background: var(--paper-2); color: var(--terra); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 13px 26px; border-radius: 999px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
}
.btn--primary { background: var(--terra); color: #fff; box-shadow: 0 4px 0 var(--terra-dark); }
.btn--primary:hover { background: var(--terra-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 0 #81371f; }
.btn--ghost { background: transparent; color: var(--terra-dark); border-color: var(--terra); }
.btn--ghost:hover { background: var(--terra); color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* --- Pills / tags / badges --- */
.pill {
  display: inline-block; font-family: var(--font-script); font-weight: 700; font-size: 1.1rem;
  padding: 0 12px; border-radius: 999px; line-height: 1.9;
}
.pill--sage  { color: var(--sage);  background: var(--sage-soft); border: 1px solid #d6ddc4; }
.pill--terra { color: var(--terra-dark); background: #f8e2d9; border: 1px solid #e8c3b5; }
.pill--honey { color: #9a6a1c; background: #f7e6c4; border: 1px solid #ecd29b; }

.badge {
  position: absolute; top: -14px; right: -10px; z-index: 2;
  width: 78px; height: 78px; border-radius: 50%;
  background: var(--honey); color: #fff; font-family: var(--font-script); font-weight: 700;
  font-size: 1.05rem; line-height: 1.05; text-align: center;
  display: flex; align-items: center; justify-content: center; padding: 8px;
  transform: rotate(12deg); box-shadow: var(--shadow-soft);
}

/* --- Hero --- */
.hero { text-align: center; padding: 56px 0 30px; }
.hero__eyebrow {
  font-family: var(--font-script); font-weight: 700; font-size: 1.9rem;
  color: var(--terra); margin-bottom: 6px; display: inline-flex; align-items: center; gap: 8px;
}
.hero__title { margin: 0 auto .35em; max-width: 16ch; }
.hero__lede { color: var(--ink-soft); font-size: 1.18rem; max-width: 52ch; margin: 0 auto 26px; }
.hero__photo {
  width: 150px; height: 150px; border-radius: 50%; margin: 6px auto 26px;
  background: var(--blush); border: 5px solid var(--card);
  box-shadow: var(--shadow); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-script); color: #9c5b46; font-size: 1.2rem;
}
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero__proof {
  margin-top: 26px; font-family: var(--font-script); font-size: 1.4rem; color: var(--sage);
  display: inline-flex; align-items: center; gap: 8px;
}
.hero__proof svg { width: 20px; height: 20px; fill: var(--terra); }

/* --- Section headings + ornament --- */
.section-head { text-align: center; margin: 56px 0 8px; }
.section-head__eyebrow {
  font-family: var(--font-script); font-weight: 700; font-size: 1.5rem; color: var(--terra);
}
.section-head__title { margin: 0 auto .3em; max-width: 20ch; }
.divider { border: none; border-top: 2px dashed var(--line); margin: 2.6em auto; width: 60%; max-width: 280px; }

/* --- Post grid --- */
.post-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 30px; margin: 34px 0 10px;
}
.post-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft); transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card__thumb {
  aspect-ratio: 4/3; background: linear-gradient(135deg, var(--blush), var(--honey) 120%);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.post-card__thumb svg { width: 46px; height: 46px; stroke: rgba(255,255,255,.85); fill: none; stroke-width: 1.6; }
.post-card__thumb .pill { position: absolute; top: 12px; left: 12px; background: rgba(255,252,245,.92); }
.post-card__body { padding: 20px 22px 24px; }
.post-card__title { font-size: 1.3rem; margin: 8px 0 8px; }
.post-card__title a { color: var(--ink); text-decoration: none; }
.post-card__title a:hover { color: var(--terra); }
.post-card__excerpt { color: var(--ink-soft); font-size: .98rem; margin-bottom: 14px; }
.post-card__meta { font-size: .82rem; color: var(--ink-soft); letter-spacing: .03em; text-transform: uppercase; }
.read-more {
  font-family: var(--font-script); font-weight: 700; font-size: 1.25rem; color: var(--terra);
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.read-more svg { width: 18px; height: 18px; transition: transform .2s ease; }
.read-more:hover { color: var(--terra-dark); }
.read-more:hover svg { transform: translateX(4px); }

/* --- Empty state --- */
.empty-state {
  text-align: center; color: var(--ink-soft); background: var(--card);
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; margin: 34px 0;
}
.empty-state .script { font-family: var(--font-script); font-size: 1.6rem; color: var(--sage); }

/* --- About strip --- */
.about { background: var(--paper-2); border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); padding: 48px 0; margin-top: 60px; }
.about__inner { max-width: 760px; margin: 0 auto; padding: 0 22px; text-align: center; }
.about p { font-size: 1.08rem; color: var(--ink-soft); }

/* --- Article body --- */
.article { padding-top: 40px; padding-bottom: 40px; }
.post-meta { color: var(--ink-soft); font-size: .88rem; margin: -4px 0 18px; letter-spacing: .03em; text-transform: uppercase; }
.article .lead { font-size: 1.25rem; color: var(--ink); }

/* --- Handwritten sticky note (.kitchen-note) --- */
.kitchen-note {
  background: var(--sticky); border: 1px solid #ecd9b0; border-radius: 4px 18px 4px 18px;
  padding: 18px 22px 16px; margin: 1.9em -6px; box-shadow: var(--shadow-soft);
  transform: rotate(-0.6deg); position: relative;
}
.kitchen-note::before { /* tape */
  content: ""; position: absolute; top: -11px; left: 50%; width: 74px; height: 20px;
  transform: translateX(-50%) rotate(-3deg); background: rgba(214,154,62,.45);
}
.kitchen-note__label {
  display: block; font-family: var(--font-script); font-weight: 700; font-size: 1.4rem;
  color: var(--terra); margin-bottom: 2px;
}

/* --- Recipe-card offer box (.affiliate-box) --- */
.affiliate-box {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  margin: 2em 0; box-shadow: var(--shadow); overflow: hidden;
}
.affiliate-box__label {
  display: inline-block; background: var(--terra); color: #fff;
  font-family: var(--font-script); font-weight: 700; font-size: 1.2rem;
  padding: 7px 18px; border-radius: 0 0 12px 0;
}
.affiliate-box__inner { padding: 18px 24px 24px; }
.affiliate-box h3 { margin-top: 4px; }
.affiliate-box p:last-of-type { margin-bottom: 16px; }

/* --- Ingredients / roundup list (.ingredients) --- */
.ingredients {
  list-style: none; padding: 18px 22px; margin: 1.5em 0;
  background: var(--sage-soft); border: 1px dashed #cdd6ba; border-radius: 14px;
}
.ingredients li {
  position: relative; padding: 8px 0 8px 30px; border-bottom: 1px dotted #cdd6ba;
}
.ingredients li:last-child { border-bottom: none; }
.ingredients li::before {
  content: ""; position: absolute; left: 0; top: 13px; width: 18px; height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237E8B5A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 13l5 5L20 6'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* --- Numbered "reasons" list (educational listicles) --- */
ol.reasons { margin: 1.2em 0 1.6em; padding-left: 28px; }
ol.reasons li { padding: 7px 0; line-height: 1.65; }
ol.reasons li::marker { color: var(--terra); font-family: var(--font-head); font-weight: 600; }

/* --- Disclosure (.disclosure) --- */
.disclosure {
  margin-top: 2.6em; padding: 16px 20px; border: 2px dashed var(--line); border-radius: 14px;
  background: var(--paper-2); color: var(--ink-soft); font-size: .88rem;
}
.disclosure strong { color: var(--ink); }

/* --- Inline email capture (in-post) --- */
.email-capture { background: var(--sage-soft); border: 1px solid #cdd6ba; border-radius: var(--radius); padding: 28px 24px; margin: 2.4em 0; text-align: center; }
.email-capture h3 { font-family: var(--font-script); font-weight: 700; font-size: 1.8rem; color: var(--sage); margin-top: 0; }
.email-capture form { display: flex; gap: 10px; max-width: 420px; margin: 14px auto 0; flex-wrap: wrap; justify-content: center; }
.email-capture input[type="email"] { flex: 1 1 220px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font-family: var(--font-body); font-size: 1rem; }

/* --- Pull quote (Caveat accent) --- */
.pull-quote { font-family: var(--font-head); font-style: italic; font-size: 1.5rem; color: var(--terra-dark); border-left: 4px solid var(--honey); padding: 4px 0 4px 22px; margin: 1.8em 0; }

/* --- P.S. (the second-most-read line) --- */
.ps { font-family: var(--font-script); font-weight: 700; font-size: 1.55rem; line-height: 1.4; color: var(--terra); border-top: 2px dashed var(--line); padding-top: 16px; margin: 2em 0 0; }
.ps a { color: var(--terra-dark); }

/* --- Footer --- */
.site-footer { margin-top: 60px; border-top: 2px dashed var(--line); background: var(--paper-2); color: var(--ink-soft); }
.site-footer__inner { max-width: 1100px; margin: 0 auto; padding: 40px 22px; text-align: center; }
.site-footer .sig { font-family: var(--font-script); font-weight: 700; font-size: 2rem; color: var(--terra); }
.site-footer p { font-size: .92rem; }
.social { display: flex; gap: 14px; justify-content: center; margin: 14px 0 18px; }
.social a { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--terra); transition: background .2s ease, color .2s ease; }
.social a:hover { background: var(--terra); color: #fff; }
.social svg { width: 19px; height: 19px; fill: currentColor; }

/* --- Accessibility: focus + reduced motion --- */
a:focus-visible, .btn:focus-visible, input:focus-visible, .site-nav a:focus-visible, .social a:focus-visible {
  outline: 3px solid var(--honey); outline-offset: 2px; border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
  .post-card:hover, .btn--primary:hover { transform: none; }
}

/* --- Responsive --- */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-header__inner { flex-direction: column; gap: 8px; }
  .hero { padding: 38px 0 18px; }
  .kitchen-note { margin-inline: 0; }
}
