/* ============================================================
   Healthiest Finds — shared stylesheet
   Aesthetic: black ink on white paper, editorial, lots of air.
   Display face: Domaine Display (licensed) → Playfair Display fallback.
   Drop your licensed Domaine Display @font-face in the block below
   and it will take over automatically everywhere.
   ============================================================ */

/* ---- 1. Brand font: swap-in slot --------------------------------
   When you license Domaine Display from Klim Type Foundry, host the
   webfont files and uncomment + point these @font-face rules at them.
   Until then, Playfair Display (loaded in each page <head>) stands in.

@font-face {
  font-family: "Domaine Display";
  src: url("assets/fonts/DomaineDisplay-Regular.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Domaine Display";
  src: url("assets/fonts/DomaineDisplay-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
------------------------------------------------------------------ */

:root {
  --paper:      #ffffff;
  --paper-soft: #f7f6f4;   /* warm off-white for alternating sections */
  --ink:        #0b0b0b;   /* near-black */
  --ink-soft:   #565656;   /* secondary text */
  --ink-faint:  #8a8a8a;   /* captions, fine print */
  --line:       #e6e4e0;   /* hairline rules */

  --font-display: "Domaine Display", "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --maxw-read: 680px;      /* reading column */
  --maxw-wide: 1080px;     /* homepage / wide layouts */
}

/* ---- 2. Reset / base ------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---- 3. Typography --------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.12; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); margin: 2em 0 .5em; }
h3 { font-size: 1.25rem; margin: 1.6em 0 .4em; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.22rem; line-height: 1.55; color: var(--ink-soft); }
.eyebrow { font-family: var(--font-sans); font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }
small, .fine { font-size: .82rem; line-height: 1.55; color: var(--ink-faint); }

/* ---- 4. Layout shells ------------------------------------------ */
.wrap   { width: 100%; max-width: var(--maxw-wide); margin: 0 auto; padding: 0 24px; }
.read   { width: 100%; max-width: var(--maxw-read); margin: 0 auto; padding: 0 24px; }
section { padding: 0; }
.section-soft { background: var(--paper-soft); }

/* ---- 5. Masthead ----------------------------------------------- */
.masthead { border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: center; min-height: 76px; }
.wordmark {
  font-family: var(--font-display); font-weight: 700;
  font-size: 1.5rem; letter-spacing: .01em; color: var(--ink);
  text-decoration: none;
}
.masthead--home .wrap { flex-direction: column; gap: 6px; min-height: 132px; }
.masthead--home .wordmark { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.masthead--home .tagline { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); }

/* ---- 6. Advertisement / disclosure bar ------------------------- */
.ad-bar {
  background: var(--ink); color: #fff;
  text-align: center; padding: 7px 16px;
  font-size: .72rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.disclosure {
  background: var(--paper-soft); border-bottom: 1px solid var(--line);
  text-align: center; padding: 10px 16px;
  font-size: .8rem; color: var(--ink-soft);
}
.disclosure a { color: var(--ink-soft); }

/* ---- 7. Buttons / CTA ------------------------------------------ */
.btn {
  display: inline-block; cursor: pointer;
  background: var(--ink); color: #fff !important;
  font-family: var(--font-sans); font-weight: 700; font-size: 1.05rem;
  text-decoration: none; text-align: center;
  padding: 16px 34px; border: 2px solid var(--ink); border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.btn:hover { background: #fff; color: var(--ink) !important; }
.btn--lg { font-size: 1.15rem; padding: 18px 44px; }
.btn--block { display: block; width: 100%; }
.cta-block { text-align: center; margin: 2.2rem 0; }
.cta-block .sub { margin-top: .7rem; }

/* ---- 8. Article / advertorial body ----------------------------- */
.article-header { padding: 40px 0 8px; }
.byline { font-size: .85rem; color: var(--ink-faint); margin-top: 1rem; }
.byline strong { color: var(--ink-soft); }
.hero-figure { margin: 1.8rem 0; }
.hero-figure img { width: 100%; border-radius: 4px; background: var(--paper-soft); }
.hero-figure figcaption { margin-top: .5rem; }

/* image placeholder — replace .ph blocks with real <img> tags */
.ph { background: var(--paper-soft); border: 1px dashed #cfccc6; border-radius: 4px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: var(--ink-faint); font-size: .8rem; padding: 1rem; min-height: 120px; }
.ph--hero { aspect-ratio: 16 / 9; }
.ph--sq { aspect-ratio: 1 / 1; }
.article-body { padding-bottom: 8px; }
.article-body p:first-of-type::first-letter { /* subtle editorial touch off by default */ }
.pull {
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1.3;
  border-left: 3px solid var(--ink); padding-left: 1.1rem; margin: 1.8rem 0; color: var(--ink);
}

/* spec strip for macros */
.spec {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  margin: 1.8rem 0;
}
.spec div { background: var(--paper); padding: 18px 10px; text-align: center; }
.spec .n { font-family: var(--font-display); font-weight: 700; font-size: 1.7rem; }
.spec .l { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }

/* ---- 9. Listicle entries --------------------------------------- */
.entry { border-top: 1px solid var(--line); padding: 2.4rem 0; }
.entry__rank { font-family: var(--font-display); font-weight: 700; font-size: 2.4rem; line-height: 1; }
.entry__name { margin: .2rem 0 .2rem; }
.entry__tag { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.entry--hero { background: var(--paper-soft); border-radius: 8px; border-top: 0; padding: 2rem; margin: 1.4rem 0; }
.entry img { border-radius: 4px; background: var(--paper); }
.pros { list-style: none; padding: 0; margin: 1rem 0; }
.pros li { padding-left: 1.5rem; position: relative; margin-bottom: .4rem; }
.pros li::before { content: "—"; position: absolute; left: 0; color: var(--ink-faint); }

/* ---- 10. Homepage featured grid -------------------------------- */
.intro { text-align: center; padding: 48px 0 8px; }
.grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
  padding: 28px 0 56px;
}
.card { text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: border-color .15s ease; display: block; }
.card:hover { border-color: var(--ink); }
.card__thumb { aspect-ratio: 16 / 10; background: var(--paper-soft); display: flex; align-items: center; justify-content: center; color: var(--ink-faint); font-size: .8rem; }
.card__body { padding: 18px 20px 22px; }
.card__kicker { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.card__title { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; line-height: 1.2; margin: .4rem 0 0; }

/* ---- 11. Footer ------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 36px 0 56px; }
.site-footer .wordmark { font-size: 1.25rem; display: inline-block; margin-bottom: .8rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.footer-nav a { font-size: .9rem; color: var(--ink-soft); text-decoration: none; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; }
.legal-note { font-size: .78rem; color: var(--ink-faint); line-height: 1.6; max-width: 760px; }

/* ---- 12. Legal / long-form text pages -------------------------- */
.doc { padding: 40px 0 8px; }
.doc h2 { font-size: 1.3rem; }
.doc p, .doc li { color: var(--ink-soft); }
.doc ul { padding-left: 1.2rem; }
.doc li { margin-bottom: .5rem; }
.updated { color: var(--ink-faint); font-size: .85rem; }

/* ---- 13. Responsive -------------------------------------------- */
@media (max-width: 820px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .grid { grid-template-columns: 1fr; }
  .spec { grid-template-columns: repeat(3, 1fr); }
  .spec .n { font-size: 1.35rem; }
  .btn { width: 100%; }
  .entry--hero { padding: 1.4rem; }
}
