:root {
  --bg: #fbf3e9;
  --bg-alt: #f2e4d2;
  --fg: #3a281c;
  --fg-muted: #7a6552;
  --accent: #6f4429;
  --accent-dark: #4f2f1a;
  --border: #e2cdb3;
  --radius: 16px;
  --font: Georgia, "Times New Roman", -apple-system, BlinkMacSystemFont, serif;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font); line-height: 1.25; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 8px; top: 8px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 20px; }
.section-muted { background: var(--bg-alt); }
.narrow { max-width: 780px; }

.site-header { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 10; }
.header-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--fg); font-weight: 700; font-size: 1.15rem; font-family: var(--font); }
.logo img { border-radius: 50%; }

.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 36px; background: none; border: 1px solid var(--border); border-radius: 8px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--fg); margin: 0 auto; }

.site-nav { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.site-nav a { color: var(--fg); font-size: 0.95rem; }

.hero { padding: 56px 20px; }
.hero-row { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.hero-row > div { flex: 1 1 380px; }
.hero-row img { flex: 1 1 400px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-top: 0; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }

.btn { display: inline-block; background: var(--accent); color: #fff; padding: 12px 24px; border-radius: 30px; font-weight: 600; border: none; cursor: pointer; font-size: 1rem; }
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn-outline { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.btn-outline:hover { background: var(--accent); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 24px 0; }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; }

.post-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin: 24px 0; }
.post-item { color: var(--fg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; background: #fff; }
.post-item:hover { text-decoration: none; border-color: var(--accent); }
.post-item img { aspect-ratio: 16/10; object-fit: cover; border-radius: 0; }
.post-item div { padding: 14px 16px; }
.post-date { color: var(--fg-muted); font-size: 0.85rem; }
.post-item h3 { margin: 6px 0; font-size: 1.05rem; }

.post-meta { color: var(--fg-muted); }
.post-body { margin-top: 20px; }
.post-body img { margin: 16px 0; }
.tags { margin-top: 24px; }
.tag { display: inline-block; background: var(--bg-alt); border: 1px solid var(--border); padding: 4px 12px; border-radius: 20px; margin: 0 6px 6px 0; font-size: 0.85rem; }

.variety-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 24px; }
.variety-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; padding-bottom: 18px; }
.variety-card img { border-radius: 0; aspect-ratio: 3/2; object-fit: cover; }
.variety-card h2 { font-size: 1.2rem; margin: 14px 18px 4px; }
.variety-card p { margin: 4px 18px; }
.variety-origin { color: var(--fg-muted); font-size: 0.9rem; }
.price-from { color: var(--accent); font-weight: 700; }

.points-list { display: grid; gap: 16px; margin-top: 24px; }
.point-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.point-card h2 { margin-top: 0; font-size: 1.15rem; }

.brew-block { border-top: 1px solid var(--border); padding: 22px 0; }
.brew-block ol { padding-left: 20px; }

.form { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.form label { font-size: 0.9rem; color: var(--fg-muted); margin-top: 8px; }
.form input, .form select, .form textarea { background: var(--bg); color: var(--fg); border: 1px solid var(--border); border-radius: 8px; padding: 10px; font-family: inherit; font-size: 1rem; }
.form button { margin-top: 16px; align-self: flex-start; }
.form-note { color: var(--fg-muted); font-size: 0.9rem; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 24px; }
.contact-info { list-style: none; padding: 0; line-height: 2; }

.error-page { text-align: center; padding-top: 80px; padding-bottom: 80px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--accent); margin: 0; font-family: var(--font); }

/* 404: иллюстрация и ссылки на разделы */
.error-art {
  display: block; max-width: 100%; height: auto; margin: 0 auto 16px;
  color: var(--accent); fill: none; stroke: currentColor; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.error-art .art-dim { opacity: 0.4; }
.error-art .art-dash { stroke-dasharray: 4 6; }
.error-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

.pagination { display: flex; gap: 10px; justify-content: center; margin: 30px 0; list-style: none; padding: 0; }
.pagination a, .pagination span { padding: 8px 14px; border: 1px solid var(--border); border-radius: 20px; color: var(--fg); }

.site-footer { border-top: 1px solid var(--border); margin-top: 60px; padding: 40px 0 20px; background: var(--bg-alt); }
.footer-row { display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between; }
.footer-nav { display: flex; flex-direction: column; gap: 6px; }
.copyright { color: var(--fg-muted); font-size: 0.85rem; margin-top: 20px; }

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .site-nav { display: none; flex-direction: column; align-items: flex-start; gap: 14px; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 20px; }
  .site-nav.open { display: flex; }
  .contact-grid { grid-template-columns: 1fr; }
}
