/* Wellness Origin Hub — "the clean magazine": one centred column, a card grid, olive on bone. */

:root {
  --bg: #ecebe7;
  --surface: #e1dfd9;
  --surface-2: #d5d4c9;
  --ink: #38450f;
  --muted: #5d683a;
  --field: #38450f;
  --field-ink: #ecebe7;
  --tone-b: #5d683a;
  --tone-c: #c9cdb0;

  --font-display: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --font-text: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.1875rem);
  --step-lead: clamp(1.1875rem, 1.1rem + 0.45vw, 1.4375rem);
  --step-card: clamp(1.1875rem, 1.05rem + 0.5vw, 1.4375rem);
  --step-section: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
  --step-head: clamp(2.125rem, 1.4rem + 2.8vw, 3.5rem);

  --wrap: 1200px;
  --margin: clamp(16px, 3vw, 40px);
  --gutter: clamp(20px, 2.6vw, 36px);
  --section: clamp(64px, 8vw, 112px);
  --measure: 42rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.6 var(--font-text);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.025em; line-height: 1.08; margin: 0; text-wrap: balance; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
a { color: inherit; text-decoration-thickness: 0.08em; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.16em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.field :focus-visible { outline-color: var(--field-ink); }
::selection { background: var(--ink); color: var(--bg); }

.skip { position: absolute; left: var(--margin); top: -100px; background: var(--ink); color: var(--bg); padding: 12px 16px; z-index: 10; }
.skip:focus { top: 12px; }

/* The one container every section sits in. */
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--margin)); margin-inline: auto; padding-inline: var(--margin); }

/* Buttons: square-cornered, one flat fill. */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  background: var(--ink); color: var(--bg);
  font: 500 var(--step-small)/1 var(--font-display); letter-spacing: 0;
  text-decoration: none; border: 0; border-radius: 0; cursor: pointer;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.button:hover { background: var(--muted); }
.button:active { transform: translateY(1px) scale(0.98); }
.button-small { min-height: 40px; padding: 0 16px; }
.field .button { background: var(--field-ink); color: var(--field); }

/* Small print in the display face: category, date, reading time. */
.meta { font: 500 var(--step-small)/1.45 var(--font-display); color: var(--muted); }
.meta a { text-decoration: none; color: var(--ink); }
.meta a:hover { text-decoration: underline; }
.field .meta, .field .meta a { color: var(--tone-c); }

/* Header */
.site-header { font-family: var(--font-display); }
.header-inner { display: flex; align-items: center; gap: var(--gutter); min-height: 72px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; margin-right: auto; }
.header-nav ul { display: flex; gap: 28px; list-style: none; padding: 0; font-weight: 500; font-size: var(--step-small); white-space: nowrap; }
.header-nav a { text-decoration: none; }
.header-nav a:hover { text-decoration: underline; }

/* Flat tiles stand in where a post has no photograph. */
.tile { position: relative; display: grid; place-items: center; height: 100%; background: var(--field); color: var(--field-ink); overflow: hidden; }
.tone-b { background: var(--tone-b); color: var(--field-ink); }
.tone-c { background: var(--tone-c); color: var(--ink); }
.field .tile:not(.tone-c) { background: var(--tone-b); }
.tile .vessel { position: absolute; inset: 0; margin: auto; height: 74%; width: auto; }
.tile-title { font: 800 clamp(1.5rem, 2.4vw, 2.25rem)/0.95 var(--font-display); letter-spacing: -0.04em; padding: 16px; text-align: center; }

.thumb { aspect-ratio: 3 / 2; overflow: hidden; background: var(--surface); }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); }

/* Home: a short statement, then the newest story. */
.home-intro { padding-top: clamp(32px, 5vw, 72px); padding-bottom: clamp(32px, 4vw, 56px); }
.home-title { font-size: var(--step-head); letter-spacing: -0.035em; line-height: 1.02; max-width: 18ch; }
.standfirst { font-size: var(--step-lead); line-height: 1.45; max-width: 38rem; margin-top: 20px; }

.lead { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gutter); align-items: center; }
.lead-figure { display: block; }
.lead-figure:hover img, .card-figure:hover img { transform: scale(1.03); }
.lead-text { display: grid; gap: 16px; justify-items: start; }
.lead-title { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.75rem); letter-spacing: -0.03em; line-height: 1.05; }
.lead-title a, .card-title a { text-decoration: none; }
.lead-title a:hover, .card-title a:hover { text-decoration: underline; }
.lead-excerpt { font-size: var(--step-body); max-width: 34rem; }
.lead-text .button { margin-top: 8px; }

/* Sections */
.section { padding-top: var(--section); }
.section-tight { padding-top: clamp(24px, 3vw, 40px); }
.section.field { background: var(--field); color: var(--field-ink); margin-top: var(--section); padding-bottom: var(--section); }
.section-title { font-size: var(--step-section); letter-spacing: -0.03em; margin-bottom: clamp(24px, 3vw, 40px); }

/* Cards: three across, picture first. */
.cards { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4vw, 56px) var(--gutter); }
.card { display: flex; flex-direction: column; gap: 10px; }
.card-figure { display: block; margin-bottom: 6px; }
.card-title { font-size: var(--step-card); letter-spacing: -0.02em; line-height: 1.15; }
.card-excerpt { font-size: 1rem; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }

/* Topics and buying guides share the olive field on the home page. */
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--section) var(--gutter); }
.topic-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-list a {
  display: inline-flex; align-items: baseline; gap: 10px; min-height: 48px; padding: 13px 18px;
  background: var(--tone-b); color: var(--field-ink); text-decoration: none;
  font: 800 1.0625rem/1.2 var(--font-display); letter-spacing: -0.015em;
  transition: background-color 160ms var(--ease);
}
.topic-list a:hover { background: var(--field-ink); color: var(--field); }
.topic-list .count { font-weight: 500; font-size: var(--step-small); opacity: 0.75; }

.guide-list { list-style: none; padding: 0; display: grid; gap: 20px; }
.guide-list a { font: 800 var(--step-card)/1.2 var(--font-display); letter-spacing: -0.02em; text-decoration: none; display: block; }
.guide-list a:hover { text-decoration: underline; }
.guide-list span { font: 500 var(--step-small)/1.4 var(--font-display); color: var(--tone-c); }

/* List pages, static pages and the 404 */
.page-head { padding-top: clamp(32px, 5vw, 72px); }
.page-head .meta { margin-bottom: 14px; }
.page-title, .post-title { font-size: var(--step-head); letter-spacing: -0.035em; line-height: 1.02; }
.page { max-width: calc(var(--measure) + 2 * var(--margin)); }
.page .prose { margin-top: clamp(32px, 4vw, 56px); }
.back { margin-top: 24px; }

.search-form { margin-top: 28px; max-width: 34rem; }
.search-form label { display: block; font: 500 var(--step-small)/1.4 var(--font-display); color: var(--muted); margin-bottom: 8px; }
.search-row { display: flex; }
.search-row input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 16px;
  background: var(--surface); color: var(--ink); border: 0; border-radius: 0;
  font: 400 var(--step-body)/1 var(--font-text);
}
.search-row input::placeholder { color: var(--muted); opacity: 1; }

/* Post: title, picture, then the text with its side card on the right. */
.post { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "hero" "picks" "body"; max-width: calc(var(--measure) + 2 * var(--margin)); }
.post.has-side {
  max-width: calc(var(--wrap) + 2 * var(--margin));
  grid-template-columns: minmax(0, 1fr) minmax(0, 20rem);
  grid-template-areas: "head ." "hero hero" "picks side" "body side";
  column-gap: clamp(40px, 6vw, 96px);
}
.post-header { grid-area: head; padding-top: clamp(32px, 5vw, 72px); }
.post.has-side .post-header { grid-column: 1 / -1; max-width: 56rem; }
.post-header .standfirst { max-width: var(--measure); }
.post-header .meta { margin-bottom: 16px; }
.disclosure { margin-top: 20px; font-size: var(--step-small); color: var(--muted); max-width: 34rem; }
.post-hero { grid-area: hero; margin-top: clamp(28px, 4vw, 48px); aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.post-hero img { width: 100%; height: 100%; object-fit: cover; }

.picks { grid-area: picks; background: var(--surface); padding: clamp(20px, 3vw, 32px); margin-top: clamp(32px, 4vw, 56px); max-width: var(--measure); }
.picks h2 { font-size: 1.25rem; letter-spacing: -0.02em; margin-bottom: 16px; }
.picks ul { list-style: none; padding: 0; display: grid; gap: 4px; }
.picks li { display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center; background: var(--bg); padding: 12px 12px 12px 16px; }
.picks-name { font: 500 1rem/1.3 var(--font-display); text-decoration: none; }
.picks-name:hover { text-decoration: underline; }
.picks-price { font: 500 var(--step-small)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--muted); }

.post .prose { grid-area: body; margin-top: clamp(32px, 4vw, 56px); }
.post-side { grid-area: side; align-self: start; position: sticky; top: 24px; display: grid; gap: 32px; margin-top: clamp(32px, 4vw, 56px); }

.toc h2, .recipe-card h2 { font-size: 1.125rem; letter-spacing: -0.02em; margin-bottom: 12px; }
.toc ul { list-style: none; padding: 0; display: grid; gap: 8px; font: 500 var(--step-small)/1.35 var(--font-display); }
.toc a { text-decoration: none; color: var(--muted); }
.toc a:hover, .toc a[aria-current="true"] { color: var(--ink); text-decoration: underline; }

.recipe-card { background: var(--surface); padding: 24px; }
.vessel-card { width: 120px; height: auto; margin-bottom: 16px; color: var(--ink); }
.recipe-facts { display: grid; gap: 6px; font: 500 var(--step-small)/1.35 var(--font-display); margin-bottom: 20px; }
.recipe-facts div { display: flex; gap: 8px; }
.recipe-facts dt { color: var(--muted); min-width: 4.5rem; }
.recipe-facts dd { margin: 0; }
.scaler { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font: 500 var(--step-small)/1 var(--font-display); }
.scaler[hidden] { display: none; }
.scaler-buttons { display: flex; gap: 4px; }
.scaler button {
  min-width: 44px; min-height: 44px; border: 0; border-radius: 0; cursor: pointer;
  background: var(--bg); color: var(--ink); font: 500 1rem/1 var(--font-display); font-variant-numeric: tabular-nums;
  transition: background-color 160ms var(--ease), transform 120ms var(--ease);
}
.scaler button:hover { background: var(--surface-2); }
.scaler button:active { transform: scale(0.95); }
.scaler button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.ingredients { list-style: none; padding: 0; display: grid; gap: 2px; }
.ingredients li { display: grid; grid-template-columns: 3.25rem 2.75rem 1fr; gap: 4px; align-items: baseline; background: var(--bg); padding: 9px 12px; font-size: 1rem; line-height: 1.35; }
.ingredients .amount { font: 800 1.0625rem/1 var(--font-display); font-variant-numeric: tabular-nums; text-align: right; padding-right: 4px; }
.ingredients .unit { font: 500 var(--step-small)/1 var(--font-display); color: var(--muted); }

/* Vessel drawing */
.vessel { color: currentColor; overflow: visible; }
.vessel-line { fill: none; stroke: currentColor; stroke-width: 6; stroke-linejoin: round; stroke-linecap: round; }
.vessel-solid { fill: currentColor; }
.vessel-ice rect { fill: var(--bg); opacity: 0.55; }
.vessel-liquid { transform-box: fill-box; transform-origin: 50% 100%; }

/* Long-form text */
.prose { max-width: var(--measure); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2rem); letter-spacing: -0.03em; line-height: 1.1; margin-top: 2em; scroll-margin-top: 24px; }
.prose h3 { font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; margin-top: 1.6em; scroll-margin-top: 24px; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.4em; }
.prose ol li::marker { font-family: var(--font-display); font-weight: 800; }
.prose blockquote { font-size: var(--step-lead); line-height: 1.4; font-style: italic; padding-left: 24px; border-left: 6px solid var(--tone-c); }
.prose figure img { width: 100%; height: auto; }
.prose figcaption, .credit { font: 500 var(--step-small)/1.4 var(--font-display); color: var(--muted); margin-top: 10px; }
.prose a[rel~="sponsored"] { font-weight: 600; }
.tags { font-size: var(--step-small); color: var(--muted); margin-top: 2.5em !important; }

.callout { background: var(--surface); padding: 20px 24px; }
.callout > * + * { margin-top: 0.7em; }
.callout-tip { background: var(--tone-c); }

/* Real tables keep their lines, quietly. */
.table-wrap { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font: 400 1rem/1.4 var(--font-display); font-variant-numeric: tabular-nums; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; }
.prose thead th { background: var(--ink); color: var(--bg); font-weight: 500; }
.prose tbody tr:nth-child(odd) { background: var(--surface); }
.prose tbody th { font-weight: 500; }

/* Affiliate product */
.product { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); background: var(--surface); margin-top: 2em !important; scroll-margin-top: 24px; }
.product:not(:has(.product-media)) { grid-template-columns: 1fr; }
.product-media { background: #fff; display: grid; place-items: center; padding: 20px; }
.product-media img { width: 100%; height: auto; max-height: 320px; object-fit: contain; }
.product-body { padding: clamp(20px, 2.6vw, 32px); }
.product-body > * + * { margin-top: 0.9em; }
.product h3 { font-size: 1.375rem; letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
.product-price { font: 800 1.125rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.product-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.product-proscons h4 { font-size: 1rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.product-proscons ul { padding-left: 1.1em; font-size: 1rem; line-height: 1.45; }
.product-proscons li + li { margin-top: 0.3em; }
.product .button { margin-top: 0.4em; }

/* Ad slots (content/ads.json): a banner or ad code under a small label, and the featured pick. */
.section-ad { padding-top: clamp(48px, 6vw, 80px); }
.cards-more { padding-top: clamp(40px, 4vw, 56px); }
.ad { display: grid; gap: 8px; justify-items: center; }
.ad-label { font: 500 0.8125rem/1 var(--font-display); color: var(--muted); }
.ad-banner {
  display: block; max-width: 100%; padding: clamp(4px, 0.7vw, 8px);
  background: var(--bg); border: clamp(4px, 0.6vw, 8px) solid var(--ink);
  transition: border-color 0.2s var(--ease);
}
.ad-banner:hover { border-color: var(--tone-b); }
.ad-banner img { display: block; width: 100%; height: auto; }
.ad-code { width: 100%; display: grid; justify-items: center; }
.ad-placeholder {
  width: 100%; aspect-ratio: var(--ad-ratio); background: var(--surface); padding: 16px;
  display: grid; place-content: center; gap: 4px; text-align: center;
  font: 500 var(--step-small)/1.4 var(--font-display); color: var(--muted);
}
.ad-placeholder span:first-child { font-weight: 800; color: var(--ink); }

.ad-contact {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px var(--gutter);
  background: var(--surface); padding: clamp(24px, 3.4vw, 48px);
}
.ad-contact > div { display: grid; gap: 10px; max-width: 40rem; }
.ad-contact-title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); letter-spacing: -0.03em; }

.ad-pick { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); background: var(--surface); }
.ad-pick-figure { display: block; }
.ad-pick-figure .thumb { height: 100%; }
.ad-pick-figure:hover img { transform: scale(1.03); }
.ad-pick-product { background: #fff; }
.ad-pick-product img { object-fit: contain; padding: 24px; }
.ad-pick-body { padding: clamp(24px, 3vw, 40px); display: grid; gap: 14px; align-content: center; justify-items: start; }
.ad-pick-title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem); letter-spacing: -0.03em; line-height: 1.08; }
.ad-pick-pros { padding-left: 1.1em; font-size: 1rem; line-height: 1.45; }
.ad-pick-pros li + li { margin-top: 0.3em; }
.ad-pick-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.button-quiet { background: var(--bg); color: var(--ink); }
.button-quiet:hover { background: var(--surface-2); }
.ad-note { font: 500 0.8125rem/1.4 var(--font-display); color: var(--muted); }

/* Footer: small and quiet; it joins the olive field directly when a page ends on one. */
.site-footer { background: var(--surface); margin-top: var(--section); padding: clamp(48px, 6vw, 80px) 0 28px; font-family: var(--font-display); }
main:has(> .field:nth-last-child(1 of :not(script))) + .site-footer { margin-top: 0; }
.footer-cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); }
.footer-wordmark { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; margin-bottom: 12px; }
.footer-about { font: 400 1.0625rem/1.5 var(--font-text); max-width: 26rem; }
.site-footer h2 { font-size: 1rem; letter-spacing: -0.01em; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 8px; font-weight: 500; font-size: var(--step-small); }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.footer-base { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 6px; font-size: var(--step-small); color: var(--muted); max-width: 44rem; }

/* Motion: entrances only when the script runs; nothing stays hidden without it. */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: var(--delay, 0ms); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .vessel-liquid { animation: pour 1400ms var(--ease) 300ms both; }
@keyframes pour { from { transform: scaleY(0); } to { transform: scaleY(1); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .vessel-liquid { animation: none; }
  .lead-figure:hover img, .card-figure:hover img, .ad-pick-figure:hover img { transform: none; }
}

/* Tablet */
@media (max-width: 960px) {
  .header-nav ul { gap: 20px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead { grid-template-columns: 1fr; }
  .ad-pick { grid-template-columns: 1fr; }
  .ad-pick-figure .thumb { height: auto; }
  .field-grid { grid-template-columns: 1fr; }
  .post.has-side { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "hero" "picks" "side" "body"; max-width: calc(var(--measure) + 2 * var(--margin)); }
  .post-side { position: static; }
  .toc { display: none; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-cols > :first-child { grid-column: span 2; }
}

/* Phone: the topic links move to their own scrolling row under the name. */
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; row-gap: 0; min-height: 0; padding-top: 12px; }
  .header-nav { order: 3; flex-basis: 100%; overflow-x: auto; scrollbar-width: none; }
  .header-nav::-webkit-scrollbar { display: none; }
  .header-nav ul { gap: 20px; padding: 10px 0 12px; }
  .header-nav a { display: inline-block; padding: 4px 0; }
  .cards { grid-template-columns: 1fr; }
  .post-hero { aspect-ratio: 3 / 2; margin-inline: calc(-1 * var(--margin)); }
  .picks li { grid-template-columns: 1fr auto; }
  .picks li .button { grid-column: span 2; }
  .product, .product-proscons { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-cols > :first-child { grid-column: auto; }
}
