/* Stylesheet for the generated site in docs/. Copied as-is when
   publishing; the script doesn't generate it, so it's fine to hand-edit. */

:root {
  --color-background: #faf8f5;
  --color-surface: #ffffff;
  --color-text: #2b2420;
  --color-text-muted: #6b6258;
  --color-border: #e4ddd3;
  --color-accent: #a3542b;
  --color-accent-soft: #f3e3d6;
  --color-tag-background: #efece6;
  --color-tag-text: #55504a;
  --shadow: 0 1px 3px rgba(43, 36, 32, 0.08);
  --radius: 12px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #1c1a17;
    --color-surface: #262320;
    --color-text: #f1ece5;
    --color-text-muted: #b4aba0;
    --color-border: #3a3530;
    --color-accent: #e3935e;
    --color-accent-soft: #3a2c22;
    --color-tag-background: #332f2a;
    --color-tag-text: #cfc8bd;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

header {
  padding: 2rem 1.25rem 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.75rem;
}

.subtitle {
  margin: 0 0 1rem;
  color: var(--color-text-muted);
}

#search {
  width: 100%;
  font-size: 1rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
}

#search:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.counter {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

main.grid {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  display: block;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--color-text);
  transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(43, 36, 32, 0.12);
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.badge {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.tag {
  background: var(--color-tag-background);
  color: var(--color-tag-text);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  font-size: 0.72rem;
}

footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* Recipe detail pages */

.back-link {
  display: inline-block;
  margin: 1.5rem 1.25rem 0;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.9rem;
}

article {
  max-width: 720px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 3rem;
}

article h1 {
  margin-bottom: 0.75rem;
}

article h2 {
  font-size: 1.1rem;
  margin: 2rem 0 0.6rem;
  color: var(--color-accent);
}

.ingredients,
.steps {
  padding-left: 1.3rem;
}

.steps li {
  margin-bottom: 0.6rem;
}

.ingredient-link {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.image {
  max-width: 100%;
  border-radius: var(--radius);
  margin: 1rem 0;
}

.source {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  word-break: break-word;
}

@media (max-width: 480px) {
  main.grid {
    grid-template-columns: 1fr;
  }
}
