/* Recipes — shared styles
   Mobile-first, single column, readable in the kitchen.
   No external fonts or assets; works offline over file://. */

:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --ink: #2b2622;
  --ink-soft: #6b6258;
  --accent: #b4451f;
  --accent-soft: #f3e2d8;
  --line: #e7ded3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 38, 34, 0.06), 0 6px 20px rgba(43, 38, 34, 0.06);
  --maxw: 44rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem;
}

/* ---- Site header / nav ---- */

.site-head {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

.site-head a.back {
  display: inline-block;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.site-head a.back:hover { color: var(--accent); }

/* ---- Recipe page ---- */

.recipe-header { margin: 0.5rem 0 1.5rem; }

.recipe-header h1 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.recipe-header .description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

.hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin: 1rem 0 0;
  box-shadow: var(--shadow);
}

section.recipe-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

section.recipe-section > h2 {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

#ingredients ul {
  margin: 0;
  padding-left: 1.25rem;
}
#ingredients li { margin: 0.3rem 0; }

#references dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1rem;
}
#references dt { font-weight: 600; color: var(--ink-soft); }
#references dd { margin: 0; }

#directions ol {
  margin: 0;
  padding-left: 1.4rem;
}
#directions li {
  margin: 0.6rem 0;
  padding-left: 0.25rem;
}

#notes ul { margin: 0; padding-left: 1.25rem; }
#notes li { margin: 0.3rem 0; }

.recipe-source {
  margin: 1.25rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.recipe-source a { color: var(--ink-soft); }
.recipe-source a:hover { color: var(--accent); }

/* ---- Index page ---- */

.index-head h1 {
  margin: 0.5rem 0 1rem;
  font-size: 2rem;
}

.search {
  width: 100%;
  font-size: 1.05rem;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.count {
  color: var(--ink-soft);
  font-size: 0.9rem;
  margin: 0.75rem 0 0.25rem;
}

.gallery {
  list-style: none;
  margin: 1rem 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 34rem) {
  .gallery { grid-template-columns: 1fr 1fr; }
}

.card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.card a:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(43, 38, 34, 0.08), 0 12px 28px rgba(43, 38, 34, 0.1);
}

.card .thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--accent-soft);
  display: block;
}
.card .thumb.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.8rem;
}

.card .body { padding: 0.85rem 1rem 1rem; }
.card h2 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  line-height: 1.2;
}
.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.empty {
  color: var(--ink-soft);
  text-align: center;
  padding: 2rem 0;
}

footer.site-foot {
  max-width: var(--maxw);
  margin: 2rem auto;
  padding: 0 1.25rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
