/*
Theme Name: Fed Well
Theme URI: https://getfedwell.com
Author: Fed Well
Description: A warm, editorial family food blog theme. Real food. No fuss.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: fedwell
Tags: food, blog, family, clean, minimal
*/

/* ─── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green:       #2C4A1E;
  --green-mid:   #3D6628;
  --green-light: #EDF2E8;
  --terra:       #C05A2B;
  --terra-light: #F7EDE6;
  --sage:        #7A9E6F;
  --sage-light:  #D4E4CE;
  --ochre:       #C08B2B;
  --cream:       #FAF8F3;
  --stone:       #E8E4DB;
  --stone-dark:  #C8C3B8;
  --ink:         #1F1E1A;
  --ink-mid:     #4A4840;
  --ink-light:   #7A786E;
  --white:       #FFFFFF;

  --font-display: 'Cormorant Garant', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(31,30,26,.08);
  --shadow-md: 0 4px 16px rgba(31,30,26,.10);
  --shadow-lg: 0 8px 32px rgba(31,30,26,.12);

  --max-w: 1200px;
  --content-w: 740px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ─── Typography ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.7rem); }
h4 { font-size: 1.15rem; }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--terra);
}

/* ─── Layout Utilities ──────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container--narrow { max-width: var(--content-w); margin: 0 auto; padding: 0 24px; }

.section { padding: 72px 0; }
.section--sm { padding: 48px 0; }

/* ─── Site Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--stone);
  padding: 0 24px;
}
.site-header__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: -.01em;
  flex-shrink: 0;
}
.site-logo span { color: var(--terra); }

/* Primary nav */
.primary-nav { display: flex; align-items: center; gap: 32px; }
.primary-nav a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink-mid);
  letter-spacing: .02em;
  transition: color .2s;
  position: relative;
}
.primary-nav a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--terra);
  transition: width .25s;
}
.primary-nav a:hover { color: var(--green); }
.primary-nav a:hover::after { width: 100%; }

.nav-cta {
  background: var(--green);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: .8rem !important;
  transition: background .2s !important;
}
.nav-cta::after { display: none !important; }
.nav-cta:hover { background: var(--green-mid) !important; }

/* Mobile burger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: all .3s;
}

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: var(--green);
  color: var(--white);
  padding: 80px 24px 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(122,158,111,.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner { position: relative; max-width: 780px; margin: 0 auto; }
.hero__eyebrow { color: var(--sage-light); margin-bottom: 16px; }
.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
  font-weight: 700;
}
.hero h1 em { color: var(--ochre); font-style: normal; }
.hero__sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,.78);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.hero__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 32px;
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  letter-spacing: .01em;
}
.btn--primary { background: var(--terra); color: var(--white); }
.btn--primary:hover { background: #a8491f; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn--outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.4); }
.btn--outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }

/* ─── Section: Pillars strip ────────────────────────────────────────────────── */
.pillars {
  background: var(--white);
  border-bottom: 1px solid var(--stone);
  padding: 0;
}
.pillars__grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.pillar {
  padding: 32px 24px;
  border-right: 1px solid var(--stone);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.pillar:last-child { border-right: none; }
.pillar__icon {
  width: 36px; height: 36px;
  background: var(--green-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.pillar__text h4 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }
.pillar__text p { font-size: .82rem; color: var(--ink-light); margin: 0; }

/* ─── Post Cards ────────────────────────────────────────────────────────────── */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.post-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.post-card__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--stone);
  position: relative;
}
.post-card__img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card__img img { transform: scale(1.04); }

.post-card__img--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}

.post-card__cat {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--green);
  color: var(--white);
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
}

.post-card__body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.post-card__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.post-card__meta time { font-size: .75rem; color: var(--ink-light); }
.post-card__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--stone-dark); }
.post-card__meta .read-time { font-size: .75rem; color: var(--ink-light); }

.post-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  line-height: 1.3;
  flex: 1;
}
.post-card h3 a { transition: color .2s; }
.post-card h3 a:hover { color: var(--terra); }

.post-card__excerpt { font-size: .85rem; color: var(--ink-light); line-height: 1.6; margin-bottom: 16px; }
.post-card__link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: gap .2s, color .2s;
}
.post-card__link:hover { color: var(--terra); gap: 8px; }

/* Featured post card (full width) */
.post-card--featured {
  grid-column: 1 / -1;
  flex-direction: row;
}
.post-card--featured .post-card__img {
  width: 52%;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.post-card--featured .post-card__body { padding: 40px 40px; justify-content: center; }
.post-card--featured h3 { font-size: clamp(1.4rem, 2.5vw, 2rem); }
.post-card--featured .post-card__excerpt { font-size: .9rem; }

/* ─── Category Pills ────────────────────────────────────────────────────────── */
.cat-filter {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.cat-pill {
  padding: 7px 16px;
  border-radius: 24px;
  font-size: .78rem;
  font-weight: 500;
  cursor: pointer;
  border: 1.5px solid var(--stone);
  background: var(--white);
  color: var(--ink-mid);
  transition: all .2s;
  text-decoration: none;
  display: inline-block;
}
.cat-pill:hover, .cat-pill--active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ─── About Strip ───────────────────────────────────────────────────────────── */
.about-strip {
  background: var(--terra-light);
  border-top: 1px solid #e8d5c8;
  border-bottom: 1px solid #e8d5c8;
}
.about-strip__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 60px;
  align-items: center;
}
.about-strip__img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--stone);
  display: flex; align-items: center; justify-content: center;
  font-size: 5rem;
}
.about-strip__img img { width: 100%; height: 100%; object-fit: cover; }
.about-strip__text .eyebrow { margin-bottom: 12px; }
.about-strip__text h2 { margin-bottom: 16px; }
.about-strip__text p { font-size: .95rem; color: var(--ink-mid); margin-bottom: 16px; }
.about-strip__text .btn--primary { background: var(--green); }
.about-strip__text .btn--primary:hover { background: var(--green-mid); }

/* ─── Newsletter Banner ─────────────────────────────────────────────────────── */
.newsletter {
  background: var(--green);
  color: var(--white);
  padding: 64px 24px;
  text-align: center;
}
.newsletter__inner { max-width: 560px; margin: 0 auto; }
.newsletter .eyebrow { color: var(--sage-light); margin-bottom: 12px; }
.newsletter h2 { color: var(--white); margin-bottom: 12px; }
.newsletter p { color: rgba(255,255,255,.72); margin-bottom: 28px; font-size: .95rem; }
.newsletter__form {
  display: flex;
  gap: 8px;
  max-width: 420px;
  margin: 0 auto;
}
.newsletter__form input {
  flex: 1;
  padding: 12px 18px;
  border: none;
  border-radius: 32px;
  font-family: var(--font-body);
  font-size: .9rem;
  background: rgba(255,255,255,.12);
  color: var(--white);
  outline: none;
  border: 1.5px solid rgba(255,255,255,.2);
  transition: border-color .2s, background .2s;
}
.newsletter__form input::placeholder { color: rgba(255,255,255,.45); }
.newsletter__form input:focus { border-color: rgba(255,255,255,.5); background: rgba(255,255,255,.16); }
.newsletter__form button { background: var(--terra); color: var(--white); white-space: nowrap; }
.newsletter__form button:hover { background: #a8491f; }
.newsletter__note { font-size: .72rem; color: rgba(255,255,255,.4); margin-top: 12px; }

/* ─── Site Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,.6);
  padding: 56px 24px 32px;
}
.site-footer__grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  margin-bottom: 32px;
}
.footer-brand .site-logo { color: var(--white); }
.footer-brand .site-logo span { color: var(--ochre); }
.footer-brand p { font-size: .82rem; margin-top: 12px; line-height: 1.6; color: rgba(255,255,255,.5); }
.footer-brand__social { display: flex; gap: 12px; margin-top: 20px; }
.social-link {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  transition: background .2s, color .2s;
  border: 1px solid rgba(255,255,255,.1);
}
.social-link:hover { background: var(--terra); color: var(--white); border-color: transparent; }

.footer-col h5 {
  font-family: var(--font-body);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.9);
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: .82rem;
  color: rgba(255,255,255,.5);
  transition: color .2s;
}
.footer-col a:hover { color: var(--white); }

.site-footer__bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: .76rem;
  color: rgba(255,255,255,.35);
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: rgba(255,255,255,.35); transition: color .2s; }
.footer-legal a:hover { color: rgba(255,255,255,.7); }

/* ─── Single Post ───────────────────────────────────────────────────────────── */
.post-header { padding: 60px 0 0; }
.post-header .container--narrow { }
.post-header__cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.post-header__cat {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--terra);
  background: var(--terra-light);
  padding: 4px 10px;
  border-radius: 20px;
}
.post-header__meta {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--stone);
  font-size: .8rem;
  color: var(--ink-light);
}
.post-header__meta .sep { color: var(--stone-dark); }

.post-hero-img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin: 36px 0;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--ink-mid);
}
.post-content h2 { margin: 2em 0 .75em; color: var(--ink); }
.post-content h3 { margin: 1.6em 0 .6em; color: var(--ink); }
.post-content p { margin-bottom: 1.4em; }
.post-content ul, .post-content ol {
  margin: 1.2em 0 1.4em 1.4em;
  display: flex; flex-direction: column; gap: 6px;
  list-style: disc;
}
.post-content ol { list-style: decimal; }
.post-content li { font-size: .98rem; }
.post-content a { color: var(--terra); text-decoration: underline; text-decoration-color: rgba(192,90,43,.3); transition: text-decoration-color .2s; }
.post-content a:hover { text-decoration-color: var(--terra); }
.post-content strong { font-weight: 700; color: var(--ink); }
.post-content blockquote {
  border-left: 3px solid var(--terra);
  padding: 16px 24px;
  margin: 2em 0;
  background: var(--terra-light);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--ink);
}

/* ─── Recipe card (shortcode/block hook) ────────────────────────────────────── */
.recipe-card {
  background: var(--green-light);
  border: 1.5px solid var(--sage-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin: 2.5em 0;
}
.recipe-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--green);
  margin-bottom: 6px;
}
.recipe-card__stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
  padding: 16px 0;
  border-top: 1px solid var(--sage-light);
  border-bottom: 1px solid var(--sage-light);
}
.recipe-stat { text-align: center; }
.recipe-stat label { font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--green); display: block; }
.recipe-stat span { font-family: var(--font-display); font-size: 1.3rem; color: var(--ink); }
.recipe-card h4 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 10px; color: var(--green); }
.recipe-card ul, .recipe-card ol { margin-left: 1.2em; display: flex; flex-direction: column; gap: 5px; }
.recipe-card ul { list-style: disc; }
.recipe-card ol { list-style: decimal; }
.recipe-card li { font-size: .92rem; line-height: 1.55; }

/* ─── Sidebar ───────────────────────────────────────────────────────────────── */
.content-sidebar { display: grid; grid-template-columns: 1fr 300px; gap: 60px; align-items: start; }
.sidebar { padding-top: 8px; }
.widget { margin-bottom: 36px; }
.widget-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-light);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stone);
}
.widget ul { display: flex; flex-direction: column; gap: 8px; }
.widget a { font-size: .88rem; color: var(--ink-mid); transition: color .2s; }
.widget a:hover { color: var(--terra); }

/* ─── Pagination ────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 48px 0 0;
}
.pagination a, .pagination span {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink-mid);
  border: 1.5px solid var(--stone);
  background: var(--white);
  transition: all .2s;
}
.pagination a:hover { border-color: var(--green); color: var(--green); }
.pagination .current { background: var(--green); border-color: var(--green); color: var(--white); }

/* ─── Search ────────────────────────────────────────────────────────────────── */
.search-form { display: flex; gap: 0; }
.search-form input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--stone);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-family: var(--font-body);
  font-size: .85rem;
  outline: none;
  background: var(--white);
  color: var(--ink);
  transition: border-color .2s;
}
.search-form input:focus { border-color: var(--green); }
.search-form button {
  padding: 10px 16px;
  background: var(--green);
  border: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--white);
  cursor: pointer;
  font-size: .85rem;
  transition: background .2s;
}
.search-form button:hover { background: var(--green-mid); }

/* ─── UPF Score badge (unique to Fed Well) ──────────────────────────────────── */
.upf-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green-light);
  color: var(--green);
  border: 1.5px solid var(--sage-light);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 600;
}
.upf-badge--clean { background: var(--green-light); color: var(--green); border-color: var(--sage); }
.upf-badge--caution { background: #FFF8E6; color: #7A5A00; border-color: #E8D070; }

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .post-card--featured { flex-direction: column; }
  .post-card--featured .post-card__img { width: 100%; aspect-ratio: 16/7; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .about-strip__inner { grid-template-columns: 1fr; gap: 36px; }
  .about-strip__img { max-width: 320px; }
  .content-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .pillars__grid { grid-template-columns: 1fr; }
  .pillar { border-right: none; border-bottom: 1px solid var(--stone); }
  .pillar:last-child { border-bottom: none; }
  .primary-nav { display: none; }
  .nav-toggle { display: flex; }
  .primary-nav--open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--cream);
    padding: 24px;
    border-bottom: 1px solid var(--stone);
    gap: 16px;
    box-shadow: var(--shadow-md);
  }
  .primary-nav--open .nav-cta { align-self: flex-start; }
  .posts-grid { grid-template-columns: 1fr; }
  .newsletter__form { flex-direction: column; }
  .newsletter__form button { width: 100%; justify-content: center; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer__bottom { flex-direction: column; align-items: flex-start; }
}
