:root {
  --bg: #faf6ef;
  --paper: #ffffff;
  --ink: #2b2420;
  --muted: #6f635a;
  --line: #e7ddcf;
  --accent: #b4441f;
  --accent-dark: #8c3215;
  --soft: #f3e9da;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Шапка */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav a { color: var(--muted); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

/* Заголовки */
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; line-height: 1.25; }
h1 { font-size: 2.1rem; margin: 0 0 10px; }
h2 { font-size: 1.6rem; margin: 0 0 8px; }
h3 { font-size: 1.15rem; margin: 22px 0 8px; }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 720px; margin: 0; }

.page-head { padding: 36px 0 8px; }

/* Главная */
.hero { position: relative; margin-top: 24px; border-radius: 14px; overflow: hidden; background: #3a2a22; }
.hero img { width: 100%; height: 380px; object-fit: cover; opacity: .72; }
.hero-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; color: #fff; background: linear-gradient(transparent, rgba(30, 18, 12, .82)); }
.hero-text h1 { color: #fff; }
.hero-text p { margin: 0; max-width: 620px; }

.section-title { margin: 40px 0 16px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.card:hover { color: inherit; transform: translateY(-3px); box-shadow: 0 8px 22px rgba(60, 35, 20, .12); }
.card img { width: 100%; height: 170px; object-fit: cover; }
.card-body { padding: 14px 16px 18px; }
.card-body h3 { margin: 0 0 4px; }
.card-body p { margin: 0; color: var(--muted); font-size: .95rem; }
.tag { display: inline-block; margin-bottom: 6px; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

/* Рецепт */
.recipe { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; margin: 28px 0; overflow: hidden; }
.recipe > img { width: 100%; height: 360px; object-fit: cover; }
.recipe-body { padding: 24px 28px 28px; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0; }
.meta li { background: var(--soft); border-radius: 999px; padding: 3px 12px; font-size: .9rem; color: var(--muted); }
.cols { display: grid; grid-template-columns: minmax(220px, 1fr) 2fr; gap: 8px 36px; margin-top: 8px; }
.ingredients { list-style: none; padding: 0; margin: 0; }
.ingredients li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.steps { margin: 0; padding-left: 22px; }
.steps li { margin-bottom: 10px; }
.tip { margin: 20px 0 0; padding: 12px 16px; background: var(--soft); border-left: 4px solid var(--accent); border-radius: 0 8px 8px 0; }
.tip strong { color: var(--accent-dark); }
figure { margin: 22px 0 0; }
figure img { border-radius: 10px; width: 100%; max-height: 380px; object-fit: cover; }
figcaption, .photo-note { color: var(--muted); font-size: .85rem; margin-top: 6px; }

/* Таблицы */
.table-wrap { overflow-x: auto; margin-top: 14px; }
table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .97rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 8px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .15); }

.doneness { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 18px; }
.doneness figure { margin: 0; }
.doneness img { height: 190px; }

/* Подвал */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--paper); color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 22px; }

.center { text-align: center; padding: 80px 0; }

@media (max-width: 720px) {
  h1 { font-size: 1.7rem; }
  .cols { grid-template-columns: 1fr; }
  .recipe > img { height: 230px; }
  .recipe-body { padding: 18px; }
  .hero img { height: 300px; }
  .hero-text { padding: 18px; }
}

@media print {
  .site-header, .site-footer, .nav { display: none; }
  body { background: #fff; }
  .recipe { border: 0; break-inside: avoid; }
}
