/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

:root {
  --ink: #22201d;
  --muted: #6b6560;
  --rule: #e4ded6;
  --paper: #fbf9f6;
  --accent: #8c4a2f;
  --measure: 42rem;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
}

main { max-width: var(--measure); margin: 0 auto; padding: 2rem 1.25rem 4rem; }
h1, h2 { font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.2; }
h1 { font-size: 2rem; margin: 0 0 .25rem; }
h2 { font-size: 1.15rem; margin: 2.25rem 0 .5rem; }
a { color: var(--accent); }
.lead { color: var(--muted); }
.subtitle { color: var(--muted); margin-top: 0; font-style: italic; }
.count, .card-meta { color: var(--muted); font-size: .875rem; }

.site-header, .site-footer {
  max-width: var(--measure); margin: 0 auto; padding: 1rem 1.25rem;
  font-family: ui-sans-serif, system-ui, sans-serif; font-size: .9rem;
}
/* Two deliberate rows: navigation, then a quieter language row. They were one
   flex row with margin-left:auto on the languages, which looked fine until the
   eight names stopped fitting beside the nav -- then they wrapped but kept the
   auto margin, hugging the right edge with a gap beside them. */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header nav { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; align-items: baseline; }
.site-header nav a { text-decoration: none; color: var(--ink); }
.site-header nav a:hover { color: var(--accent); }
.brand { font-weight: 700; letter-spacing: -0.01em; }

.locales {
  list-style: none; display: flex; flex-wrap: wrap;
  gap: .15rem .85rem; margin: .55rem 0 0; padding: 0;
  font-size: .78rem;
}
.locales a { text-decoration: none; color: var(--muted); }
.locales a:hover { color: var(--accent); }
/* the current language is the emphasised one, not the odd one out */
.locales [aria-current] { color: var(--ink); font-weight: 600; }
.site-footer { border-top: 1px solid var(--rule); margin-top: 3rem; }

.hero { padding: 1rem 0 2rem; border-bottom: 1px solid var(--rule); }
.tagline { font-size: 1.1rem; margin-top: 0; }
.button {
  display: inline-block; padding: .55rem 1.1rem; border-radius: 999px;
  background: var(--accent); color: #fff; text-decoration: none;
  font-family: ui-sans-serif, system-ui, sans-serif; font-size: .9rem;
}

.cards { list-style: none; padding: 0; display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.card a { display: block; text-decoration: none; color: inherit; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; display: block; }
.card-title { display: block; margin-top: .45rem; font-weight: 600; }
.badge {
  display: inline-block; margin-top: .3rem; padding: .1rem .5rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .7rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.chapter-list { list-style: none; padding: 0; margin: 1.5rem 0 0; }
.chapter-list li { border-bottom: 1px solid var(--rule); }

/* The whole row is the link, so the photo and the title share one hit target
   and one focus ring. The image is decorative -- the chapter title is right
   beside it -- so it carries an empty alt rather than repeating the name. */
.chapter-row {
  display: flex; gap: 1rem; align-items: center;
  padding: .85rem 0; text-decoration: none; color: inherit;
}
.chapter-row:hover .chapter-title { color: var(--accent); }
.chapter-thumb {
  width: 76px; height: 76px; flex: none;
  object-fit: cover; border-radius: 8px; display: block;
  background: var(--rule);
}
.chapter-text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.chapter-title {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem; font-weight: 600; line-height: 1.3;
}
.chapter-text .subtitle { margin: 0; font-size: .9rem; }

.recipe-photo { width: 100%; border-radius: 8px; margin-bottom: 1.25rem; }
.facts { display: flex; flex-wrap: wrap; gap: 1.5rem; padding: .9rem 0; margin: 0 0 1rem; border-block: 1px solid var(--rule); font-family: ui-sans-serif, system-ui, sans-serif; font-size: .85rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: .1rem 0 0; font-weight: 600; }
.ingredients, .method { padding-left: 1.2rem; }
.ingredients li, .method li { margin-bottom: .4rem; }

.locked { margin-top: 2rem; padding: 1.25rem; border: 1px solid var(--rule); border-radius: 8px; background: #fff; }
.locked h2 { margin-top: 0; }
.placeholder { color: var(--muted); font-style: italic; }

.notice {
  padding: .9rem 1.1rem; margin: 1.5rem 0;
  border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0;
  background: #fff; font-size: .95rem;
}
.beta { margin-top: 2.25rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.beta ol { padding-left: 1.2rem; }
.beta ol li { margin-bottom: .45rem; }

.sample-note {
  margin-top: 1.75rem; padding-top: 1rem;
  border-top: 1px solid var(--rule);
  color: var(--muted); font-size: .95rem;
}
.locked .button { margin-top: .35rem; }
