/* Healthy Cravings, brand stylesheet
   Palette: chocolate #3B2318 (dark #231009, light #5A3826), berry #A82F52 (light #E58AA0),
   cream #F5EDE4, gold #E7C9A0. Warm, premium, chocolate-and-berry, mobile-first. */

@font-face {
  font-family: "Marcellus";
  src: url("/fonts/Marcellus-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/fonts/Lato-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/fonts/Lato-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lato";
  src: url("/fonts/Lato-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --chocolate: #3B2318;
  --chocolate-dark: #231009;
  --chocolate-light: #5A3826;
  --berry: #A82F52;
  --berry-light: #E58AA0;
  --cream: #F5EDE4;
  --gold: #E7C9A0;
  --white: #FFFFFF;
  --max-width: 1120px;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(35, 16, 9, 0.12);
  --shadow-sm: 0 4px 14px rgba(35, 16, 9, 0.10);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--chocolate-dark);
  font-family: "Lato", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--berry); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: "Marcellus", Georgia, serif;
  color: var(--chocolate-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 400;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.45rem); }

p { margin: 0 0 1.1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--berry);
  color: var(--white);
  padding: 10px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 10px; top: 10px; }

/* Header / nav */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid rgba(59, 35, 24, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--chocolate-dark);
}
.brand:hover { text-decoration: none; }
.brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.brand-word {
  font-family: "Marcellus", Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(59, 35, 24, 0.2);
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  display: none;
}
.nav-toggle svg { width: 22px; height: 22px; stroke: var(--chocolate-dark); }

.site-nav {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 6px 0 16px;
}
.site-nav.is-open { display: flex; }
.site-nav a {
  color: var(--chocolate-dark);
  font-weight: 700;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(59, 35, 24, 0.08);
}
.site-nav a:hover { color: var(--berry); text-decoration: none; }

@media (min-width: 760px) {
  .nav-toggle { display: none; }
  .site-nav {
    display: flex !important;
    flex-direction: row;
    gap: 28px;
    padding: 0;
  }
  .site-nav a { border-bottom: none; padding: 6px 2px; }
}

/* Hero */
.hero {
  position: relative;
  background: linear-gradient(180deg, var(--gold) 0%, var(--cream) 78%);
  overflow: hidden;
}
.hero .container {
  padding-top: 48px;
  padding-bottom: 40px;
  text-align: center;
}
.hero-logo { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto 18px; box-shadow: var(--shadow); }
.hero h1 { margin-bottom: 10px; }
.hero .tagline {
  font-size: 1.15rem;
  color: var(--chocolate-light);
  max-width: 46ch;
  margin: 0 auto 22px;
}
.hero-cta { display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.btn {
  display: inline-block;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--berry); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: #8f2745; }
.btn-secondary { background: var(--white); color: var(--chocolate-dark); border: 1px solid rgba(59,35,24,0.18); }

/* Intro */
.intro { padding: 40px 0 8px; }
.intro p { font-size: 1.08rem; max-width: 68ch; margin-left: auto; margin-right: auto; text-align: center; color: var(--chocolate-light); }

/* Recipe / post card grid */
.grid-section { padding: 28px 0 48px; }
.grid-section h2 { text-align: center; margin-bottom: 24px; }
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
@media (min-width: 620px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card a.card-link { color: inherit; }
.card a.card-link:hover { text-decoration: none; }
.card-img-wrap { aspect-ratio: 4 / 5; overflow: hidden; background: var(--gold); }
.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 16px 18px 20px; }
.card-body h3 { margin-bottom: 6px; font-size: 1.15rem; }
.card-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--berry);
  margin-bottom: 8px;
}
.card-excerpt { color: var(--chocolate-light); font-size: 0.95rem; margin: 0; }

/* Category chips */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 6px 0 44px;
}
.chip {
  background: var(--white);
  border: 1px solid rgba(59,35,24,0.15);
  color: var(--chocolate-dark);
  font-weight: 700;
  font-size: 0.92rem;
  padding: 9px 18px;
  border-radius: 999px;
}
.chip:hover { background: var(--berry); color: var(--white); border-color: var(--berry); text-decoration: none; }

/* Post / article */
.post-hero { background: var(--chocolate-dark); }
.post-hero img { width: 100%; max-height: 460px; object-fit: cover; }
.post-header { padding: 34px 0 10px; text-align: center; }
.post-header .eyebrow {
  display: block;
  color: var(--berry);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.post-header h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.post-meta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  color: var(--chocolate-light);
  font-size: 0.92rem;
  margin-top: 10px;
}

.post-body { max-width: 720px; margin: 0 auto; padding: 18px 0 10px; }
.post-body p { font-size: 1.05rem; }
.jump-link {
  display: inline-block;
  margin: 6px 0 26px;
  font-weight: 700;
  border-bottom: 2px solid var(--berry);
}

.recipe-card {
  max-width: 760px;
  margin: 24px auto 40px;
  background: var(--white);
  border: 1px solid rgba(59,35,24,0.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px 24px;
}
.recipe-card-header { text-align: center; border-bottom: 2px solid var(--gold); padding-bottom: 18px; margin-bottom: 20px; }
.recipe-card-header h2 { margin-bottom: 6px; }
.recipe-card-header p { color: var(--chocolate-light); margin: 0; }

.recipe-meta-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 16px;
  margin: 18px 0 24px;
  padding: 16px;
  background: var(--cream);
  border-radius: 10px;
}
@media (min-width: 540px) { .recipe-meta-row { grid-template-columns: repeat(4, 1fr); } }
.recipe-meta-item { text-align: center; }
.recipe-meta-item .label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 900;
  color: var(--berry);
  margin-bottom: 3px;
}
.recipe-meta-item .value { font-weight: 700; color: var(--chocolate-dark); }

.recipe-card h3 {
  border-left: 4px solid var(--berry);
  padding-left: 12px;
  margin-top: 26px;
}
.ingredients-list, .instructions-list { padding-left: 0; margin: 0 0 10px; }
.ingredients-list { list-style: none; }
.ingredients-list li {
  padding: 8px 0 8px 30px;
  border-bottom: 1px dashed rgba(59,35,24,0.15);
  position: relative;
}
.ingredients-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 15px;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--gold);
  border: 1px solid var(--berry);
}
.instructions-list { counter-reset: step; list-style: none; }
.instructions-list li {
  counter-increment: step;
  padding: 10px 0 10px 44px;
  position: relative;
  border-bottom: 1px dashed rgba(59,35,24,0.15);
}
.instructions-list li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--berry);
  color: var(--white);
  font-weight: 900;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nutrition-box {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(59,35,24,0.15);
  border-radius: 10px;
}
.nutrition-box h3 { margin-top: 0; border-left: 4px solid var(--gold); padding-left: 12px; }
.nutrition-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 18px;
  font-size: 0.95rem;
}
@media (min-width: 480px) { .nutrition-grid { grid-template-columns: repeat(3, 1fr); } }
.nutrition-grid .n-item { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(59,35,24,0.08); padding: 4px 0; }
.nutrition-grid .n-item strong { color: var(--chocolate-dark); }
.nutrition-note { font-size: 0.82rem; color: var(--chocolate-light); margin-top: 12px; margin-bottom: 0; }

.print-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  background: var(--chocolate-dark);
  color: var(--white);
  border: none;
  padding: 11px 20px;
  border-radius: 999px;
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
}
.print-btn:hover { background: var(--chocolate-light); }

/* Roundup list posts */
.roundup-list { counter-reset: ritem; list-style: none; padding: 0; max-width: 720px; margin: 0 auto; }
.roundup-item {
  counter-increment: ritem;
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(59,35,24,0.12);
}
.roundup-item .num {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--chocolate-dark);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}
.roundup-item h3 { margin: 0 0 4px; font-size: 1.08rem; }
.roundup-item .cal-badge {
  display: inline-block;
  background: var(--berry-light);
  color: var(--chocolate-dark);
  font-size: 0.75rem;
  font-weight: 900;
  padding: 2px 9px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}
.roundup-item p { margin: 0; color: var(--chocolate-light); font-size: 0.97rem; }

/* Ad slot placeholder (visually empty, no network calls, real ad code goes here later) */
.ad-slot { display: none; }

/* Category / recipes index pages */
.page-header { text-align: center; padding: 44px 0 18px; }
.page-header p { color: var(--chocolate-light); max-width: 60ch; margin: 0 auto; }

/* About page */
.about-content { max-width: 700px; margin: 0 auto; padding: 10px 0 50px; }
.about-content .cover-shot { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 28px; }

/* Footer */
.site-footer {
  background: var(--chocolate-dark);
  color: var(--cream);
  margin-top: 30px;
}
.site-footer .container { padding: 40px 20px 30px; }
.footer-top {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: flex-start;
}
@media (min-width: 700px) {
  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 36px; height: 36px; border-radius: 50%; }
.footer-brand span { font-family: "Marcellus", serif; font-size: 1.15rem; color: var(--white); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-nav a { color: var(--cream); opacity: 0.85; }
.footer-nav a:hover { opacity: 1; color: var(--berry-light); }
.footer-bottom {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(245,237,228,0.15);
  font-size: 0.85rem;
  opacity: 0.75;
}

/* Print styles for the recipe card */
@media print {
  .site-header, .site-footer, .post-hero, .hero, .print-btn, .jump-link { display: none !important; }
  body { background: #fff; }
  .recipe-card { box-shadow: none; border: none; }
}

/* Accessibility: visible focus states */
a:focus-visible, button:focus-visible, .chip:focus-visible {
  outline: 3px solid var(--berry);
  outline-offset: 2px;
}
