/* Grammy Dunn's Cookbook — minimal custom theme */
:root {
  --bg: #fdf9f1;
  --ink: #3b2a1e;
  --muted: #8a7360;
  --accent: #b3402a;
  --accent-dark: #8f3120;
  --card: #ffffff;
  --border: #eadfce;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.65;
  font-size: 17px;
}
h1, h2, h3 {
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.25;
  color: var(--ink);
}
h1 { font-size: 2rem; margin: 0.4em 0 0.5em; }
h2 { font-size: 1.45rem; margin-top: 1.8em; border-bottom: 2px solid var(--border); padding-bottom: 0.3em; }
h3 { font-size: 1.15rem; margin-top: 1.2em; color: var(--accent-dark); }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
img { max-width: 100%; height: auto; border-radius: 6px; }

.container { max-width: 960px; margin: 0 auto; padding: 0 1.1rem; }
main.container { padding-top: 1.5rem; padding-bottom: 3rem; }

/* header */
.site-header { background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.site-title { font-family: Georgia, serif; font-size: 1.35rem; font-weight: bold; color: var(--ink); text-decoration: none; }
.site-nav a { margin-left: 1.1rem; text-decoration: none; color: var(--ink); font-weight: 500; }
.site-nav a:hover { color: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--border); margin-top: 3rem; padding: 1.5rem 0 2.5rem; color: var(--muted); font-size: 0.95rem; background: var(--card); }

/* recipe meta */
.recipe-meta { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.recipe-meta li { background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 1rem; font-size: 0.95rem; }
ul.ingredients { columns: 2; column-gap: 2rem; }
ul.ingredients li { break-inside: avoid; margin-bottom: 0.35rem; }
ol.instructions li { margin-bottom: 0.6rem; }

/* grids */
.thumb-grid, .photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1rem; }
.thumb { display: block; position: relative; border-radius: var(--radius); overflow: hidden; text-decoration: none; background: var(--card); border: 1px solid var(--border); }
.thumb img { display: block; width: 100%; height: 190px; object-fit: cover; border-radius: 0; transition: transform 0.25s ease; }
.thumb:hover img { transform: scale(1.04); }
.thumb-label { display: block; padding: 0.5rem 0.7rem; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.photo-grid figure { margin: 0; }
.photo-grid img { width: 100%; height: 220px; object-fit: cover; cursor: zoom-in; display: block; }
figure.cover { text-align: center; margin: 1.5rem 0; }
figure.cover img { max-height: 420px; cursor: zoom-in; box-shadow: 0 6px 24px rgba(0,0,0,0.12); }

/* story / share */
.story p, .share p { max-width: 62ch; }
.button { display: inline-block; background: var(--accent); color: #fff !important; padding: 0.65rem 1.4rem; border-radius: 999px; text-decoration: none; font-weight: 600; }
.button:hover { background: var(--accent-dark); }
.cta { margin-top: 1.2rem; }

/* post */
.post-date, .post-meta { color: var(--muted); font-size: 0.9rem; }
.back-link { margin-top: 2rem; }

/* contact form */
.contact-form { max-width: 560px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.contact-form label { display: block; font-weight: 600; margin: 1rem 0 0.3rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; font: inherit; background: var(--bg); }
.contact-form button { margin-top: 1.2rem; background: var(--accent); color: #fff; border: none; padding: 0.7rem 1.6rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.contact-form button:hover { background: var(--accent-dark); }

/* fractions page */
.fractions { font-size: 2.2rem; letter-spacing: 0.4rem; }

/* 404 */
.error-page { text-align: center; padding: 4rem 0; }

/* lightbox */
.lightbox { display: none; position: fixed; inset: 0; background: rgba(20, 12, 8, 0.92); z-index: 100; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox-img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: 0 10px 60px rgba(0,0,0,0.5); }
.lightbox button { position: absolute; background: none; border: none; color: #fff; font-size: 2.2rem; cursor: pointer; padding: 0.5rem 1rem; opacity: 0.85; }
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 0.5rem; right: 0.8rem; }
.lightbox-prev { left: 0.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 0.5rem; top: 50%; transform: translateY(-50%); }

@media (max-width: 640px) {
  body { font-size: 16px; }
  ul.ingredients { columns: 1; }
  .site-nav a { margin-left: 0.8rem; }
  .thumb-grid, .photo-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .thumb img { height: 150px; }
}
