/* juicercook — recipe-site theme.
 *
 * Aesthetic: warm butter background, deep terracotta ink, paprika
 * accent. Serif headings (Playfair-shaped, cookbook feel), clean
 * sans-serif for the ingredients column. Print-friendly: a `print`
 * media query strips chrome so a recipe prints to a single page.
 */

/* ============================================================
   Tokens
   ============================================================ */
:root {
  --brand:        #7a2e10;
  --brand-strong: #4a1908;
  --brand-soft:   #f4d9c4;
  --accent:       #c0571d;
  --accent-soft:  #fbe1cd;

  --bg:           #fdf6e9;
  --bg-soft:      #f7eed8;
  --surface:      #fffaf0;
  --surface-soft: #f4e6cc;
  --ink:          #2c1c10;
  --ink-soft:     #5a3a26;
  --ink-faint:    #9a7958;
  --rule:         #ebd5b3;
  --rule-soft:    #f0dfc1;

  --font-sans:  -apple-system, BlinkMacSystemFont, 'Inter', 'Helvetica Neue', 'Segoe UI', sans-serif;
  --font-serif: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --font-mono:  ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --measure:     62ch;
  --gutter:      1.25rem;
  --max-w:       72rem;
  --max-w-recipe: 56rem;

  --radius:      0.35rem;
  --radius-lg:   0.5rem;
  --shadow-sm:   0 1px 2px 0 rgba(44, 28, 16, 0.05);
  --shadow-md:   0 8px 22px -6px rgba(44, 28, 16, 0.18);
  --transition:  0.18s ease;
}

[data-theme="dark"] {
  --brand:        #ffb085;
  --brand-strong: #ffd2b0;
  --brand-soft:   rgba(255, 176, 133, 0.16);
  --accent:       #f5915a;
  --accent-soft:  rgba(245, 145, 90, 0.18);

  --bg:           #1a1208;
  --bg-soft:      #211810;
  --surface:      #211810;
  --surface-soft: #261c12;
  --ink:          #f4e7d3;
  --ink-soft:     #c7b794;
  --ink-faint:    #9a8466;
  --rule:         #2c2114;
  --rule-soft:    #261c12;

  --shadow-md:    0 8px 22px -6px rgba(0, 0, 0, 0.55);
}

/* ============================================================
   Reset + base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: color var(--transition), border-color var(--transition);
}
a:hover { color: var(--brand-strong); border-bottom-color: var(--accent); }
img, video, svg { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 0.45em 0;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--brand);
  font-family: var(--font-serif);
}
h1 { font-size: 2.5rem; letter-spacing: -0.02em; font-weight: 600; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em 0; }

/* ============================================================
   Layout shell
   ============================================================ */
.juicercook-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.juicercook-main { flex: 1; }

/* ============================================================
   Topbar
   ============================================================ */
.juicercook-topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.juicercook-topbar-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.juicercook-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  color: var(--brand);
  border-bottom: none;
  font-family: var(--font-serif);
}
.juicercook-brand:hover { color: var(--accent); }
.juicercook-brand-logo { width: 1.5rem; height: 1.5rem; align-self: center; }
.juicercook-brand-name { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.005em; }
.juicercook-brand-tagline {
  font-size: 0.875rem;
  font-weight: 400;
  font-family: var(--font-sans);
  color: var(--ink-faint);
  font-style: italic;
}
.juicercook-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.juicercook-nav {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}
.juicercook-nav a {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  border-bottom: none;
}
.juicercook-nav a:hover { color: var(--accent); }
.juicercook-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--ink-soft);
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.juicercook-theme-toggle:hover {
  background: var(--surface-soft);
  color: var(--accent);
  border-color: var(--rule);
}
.juicercook-icon-sun { display: none; }
.juicercook-icon-moon { display: block; }
[data-theme="dark"] .juicercook-icon-sun { display: block; }
[data-theme="dark"] .juicercook-icon-moon { display: none; }

/* ============================================================
   Home — intro + cards grid
   ============================================================ */
.juicercook-home-intro {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem var(--gutter) 1.5rem;
  text-align: center;
}
.juicercook-home-title {
  font-size: 3rem;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 0.2em;
}
.juicercook-home-tagline {
  font-size: 1.25rem;
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 auto 1em;
  max-width: 36rem;
  font-family: var(--font-serif);
}
.juicercook-home-blurb {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 40rem;
  margin: 0 auto;
}
.juicercook-cat-strip {
  max-width: var(--max-w);
  margin: 0.5rem auto 0;
  padding: 0 var(--gutter) 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}
.juicercook-cat-chip {
  display: inline-block;
  padding: 0.35rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.juicercook-cat-chip:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--brand);
}

/* ============================================================
   Cards grid (home + section + tag pages)
   ============================================================ */
.juicercook-cards {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.5rem var(--gutter) 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
  gap: 1.5rem;
}
.juicercook-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.juicercook-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.juicercook-card-figure {
  margin: 0;
  background: var(--surface-soft);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.juicercook-card-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.juicercook-card:hover .juicercook-card-figure img { transform: scale(1.04); }
.juicercook-card-body {
  padding: 0.85rem 1rem 1.1rem;
}
.juicercook-card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--brand);
}
.juicercook-card-summary {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.juicercook-card-meta {
  margin: 0;
  font-size: 0.825rem;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-variant-numeric: tabular-nums;
}
.juicercook-card-time { font-family: var(--font-mono); font-size: 0.78rem; }
.juicercook-card-yield { font-style: italic; }

/* ============================================================
   Section landing (folder.html)
   ============================================================ */
.juicercook-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 3rem var(--gutter) 4rem;
}
.juicercook-section-head { text-align: center; margin-bottom: 1rem; }
.juicercook-section-title {
  font-size: 2.4rem;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}
.juicercook-section-summary {
  font-size: 1.05rem;
  color: var(--ink-soft);
  font-style: italic;
  margin: 0 auto 0.5em;
  max-width: 38rem;
  font-family: var(--font-serif);
}
.juicercook-section-blurb {
  font-size: 1rem;
  color: var(--ink-soft);
  max-width: 42rem;
  margin: 0 auto;
}

/* ============================================================
   Recipe page (file.html)
   ============================================================ */
.juicercook-recipe {
  max-width: var(--max-w-recipe);
  margin: 0 auto;
  padding: 2.5rem var(--gutter) 5rem;
}
.juicercook-recipe-head { text-align: center; margin-bottom: 1.5rem; }
.juicercook-recipe-title {
  font-size: 2.75rem;
  letter-spacing: -0.02em;
  font-weight: 600;
  margin: 0 0 0.35rem;
}
.juicercook-recipe-summary {
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--font-serif);
  margin: 0 auto 1.2em;
  max-width: 36rem;
}
.juicercook-recipe-meta {
  margin: 1.25rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 36rem;
}
.juicercook-recipe-meta-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.05rem;
}
.juicercook-recipe-meta dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-weight: 600;
  margin: 0;
}
.juicercook-recipe-meta dd {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  margin: 0;
}

.juicercook-recipe-hero {
  margin: 1.75rem 0;
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 28rem;
}
.juicercook-recipe-hero img {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
}

.juicercook-recipe-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
}
@media (min-width: 48rem) {
  .juicercook-recipe-card {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 2.5rem;
    padding: 2rem;
  }
}

.juicercook-section-h {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--brand);
  margin: 0 0 0.85rem;
  padding-bottom: 0.45rem;
  border-bottom: 2px solid var(--accent);
}
.juicercook-ingredients-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.juicercook-ingredients-list li {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--rule);
  font-size: 0.95rem;
  line-height: 1.45;
}
.juicercook-ingredients-list li::before {
  content: "□";
  display: inline-block;
  width: 1.25rem;
  color: var(--accent);
  font-family: var(--font-mono);
}
.juicercook-ingredients-list li:last-child { border-bottom: 0; }

.juicercook-instructions-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: jc-step;
}
.juicercook-instructions-list li {
  counter-increment: jc-step;
  padding: 0.6rem 0 0.8rem 2.5rem;
  position: relative;
  border-bottom: 1px dashed var(--rule);
  font-size: 1rem;
  line-height: 1.6;
}
.juicercook-instructions-list li::before {
  content: counter(jc-step);
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.juicercook-instructions-list li:last-child { border-bottom: 0; }

/* ============================================================
   Step / process photos (optional, frontmatter `photos:`)
   ============================================================ */
.juicercook-step-photos {
  margin: 3rem 0 0;
}
.juicercook-step-photos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.juicercook-step-photo {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.juicercook-step-photo img,
.juicercook-step-photo picture {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.juicercook-step-photo figcaption {
  padding: 0.55rem 0.8rem 0.7rem;
  font-size: 0.83rem;
  color: var(--ink-soft);
  font-style: italic;
  line-height: 1.45;
}

.juicercook-recipe-body {
  max-width: var(--measure);
  margin: 2.5rem auto 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
}
.juicercook-recipe-body > * + * { margin-top: 1.1rem; }
.juicercook-recipe-body h2 { margin-top: 2.2rem; }

.juicercook-recipe-tags {
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: var(--ink-faint);
}
.juicercook-recipe-tags a {
  color: var(--ink-soft);
  border-bottom: none;
}
.juicercook-recipe-tags a:hover { color: var(--accent); }

/* ============================================================
   Tag list
   ============================================================ */
.juicercook-taglist {
  list-style: none;
  margin: 1.5rem auto 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  max-width: 40rem;
}
.juicercook-taglist-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-faint);
  margin-left: 0.15rem;
}

/* ============================================================
   Footer
   ============================================================ */
.juicercook-footer {
  border-top: 1px solid var(--rule);
  background: var(--bg-soft);
  padding: 1.5rem var(--gutter);
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.juicercook-footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.juicercook-footer-credit a { color: var(--ink-soft); border-bottom: none; }
.juicercook-footer-credit a:hover { color: var(--accent); }
.juicercook-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 0.75rem;
}
.juicercook-footer-links a { color: var(--ink-soft); border-bottom: none; }
.juicercook-footer-links a:hover { color: var(--accent); }

.juicercook-404 { text-align: center; padding-top: 5rem; }

/* ============================================================
   Print stylesheet — strip chrome so a recipe prints clean
   ============================================================ */
@media print {
  .juicercook-topbar,
  .juicercook-footer,
  .juicercook-recipe-tags,
  .juicercook-theme-toggle { display: none !important; }
  body { background: white; color: black; }
  .juicercook-recipe-card {
    border: 0;
    padding: 0;
    background: transparent;
  }
  .juicercook-instructions-list li::before {
    background: black;
    color: white;
  }
  a { color: black; border-bottom: none; }
  .juicercook-recipe-hero { max-height: 14rem; }
  .juicercook-recipe-hero img { max-height: 14rem; }
  .juicercook-step-photos { display: none !important; }
}
