:root {
  --ink: #1F2421;
  --ink-soft: #5C635D;
  --accent: #C4612F;
  --accent-soft: #F2E3D6;
  --accent-deep: #7A3818;
  --paper: #F7F4EF;
  --paper-alt: #FBF9F5;
  --line: #E7E1D7;
  --gold: #8a6a2c;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-weight: 400;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

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

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

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.wrap-narrow { max-width: 860px; margin: 0 auto; padding: 0 2rem; }

/* ---------- header / nav ---------- */
.site-header {
  background: linear-gradient(135deg, #1F2421 0%, #2a2d29 100%);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.9rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  color: var(--paper);
  text-decoration: none;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand span { color: var(--accent); }
.site-nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.site-nav a {
  color: #DCD5C9;
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 500;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background 0.18s, color 0.18s;
}
.site-nav a:hover { background: rgba(196, 97, 47, 0.22); color: #fff; }
.site-nav a.active { background: var(--accent); color: #fff; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, #1F2421 0%, #2a2d29 100%);
  color: var(--paper);
  padding: 4rem 2rem 3.5rem;
  text-align: center;
  border-bottom: 3px solid var(--accent);
}
.hero h1 {
  color: var(--paper);
  font-size: clamp(2rem, 5vw, 3.1rem);
  margin-bottom: 0.9rem;
}
.hero p {
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  color: #DCD5C9;
  font-size: clamp(1rem, 2vw, 1.2rem);
  max-width: 720px;
  margin: 0 auto;
}
.hero-badges {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.9rem;
}
.hero-badges span {
  background: rgba(196, 97, 47, 0.28);
  border: 1px solid rgba(196, 97, 47, 0.6);
  color: #F2E3D6;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.4rem 1rem;
  border-radius: 999px;
}

/* ---------- sections ---------- */
.section { padding: 3.5rem 0; }
.section-alt { background: var(--paper-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section-head p { color: var(--ink-soft); max-width: 620px; margin: 0.7rem auto 0; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card-body { padding: 1.5rem; flex: 1; }
.card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }
.card .tag {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.card-img { height: 190px; object-fit: cover; border-bottom: 1px solid var(--line); }

.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.6rem;
}
.feature .num {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.7rem;
}
.feature h3 { font-size: 1.12rem; margin-bottom: 0.45rem; }
.feature p { font-size: 0.92rem; color: var(--ink-soft); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, background 0.18s, color 0.18s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #a9501f; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--paper); border: 2px solid rgba(247, 244, 239, 0.5); }
.btn-ghost:hover { border-color: var(--paper); }
.btn-outline { background: #fff; color: var(--ink); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent-soft); }
.btn-row { display: flex; gap: 0.9rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }

/* ---------- catalog ---------- */
.mode-switch {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1.75rem 2rem;
  background: var(--paper-alt);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.mode-btn {
  font-family: inherit;
  font-weight: 600;
  padding: 0.85rem 2.2rem;
  border: 2px solid var(--accent);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.98rem;
  transition: all 0.18s;
}
.mode-btn.active { background: var(--accent); color: #fff; }

.process-strip { padding: 2.5rem 0 0.5rem; }
.process-strip-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.3rem;
  margin-bottom: 1.1rem;
}
.process-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.process-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.process-card img { width: 100%; height: 175px; object-fit: cover; border-bottom: 1px solid var(--line); }
.process-card-body { padding: 1rem 1.15rem; }
.process-step-tag {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}
.process-card-title { font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; font-weight: 600; margin-bottom: 0.35rem; }
.process-card-text { font-size: 0.88rem; color: var(--ink-soft); }

.categories { display: flex; gap: 0.7rem; flex-wrap: wrap; margin: 2.2rem 0 1.8rem; justify-content: center; }
.cat-btn {
  font-family: inherit;
  padding: 0.65rem 1.5rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.92rem;
  transition: all 0.15s;
}
.cat-btn:hover { border-color: var(--accent); }
.cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.5rem; margin-bottom: 3rem; }
.recipe-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  text-align: left;
}
.recipe-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(31, 36, 33, 0.12); }
.recipe-card-img { width: 100%; height: 155px; object-fit: cover; border-bottom: 1px solid var(--line); }
.recipe-card-content { padding: 1.3rem 1.45rem 1.45rem; flex: 1; display: flex; flex-direction: column; }
.recipe-card h3 { font-size: 1.28rem; margin-bottom: 0.35rem; }
.recipe-card .meta { color: var(--accent); font-weight: 600; font-size: 0.87rem; margin-bottom: 0.6rem; }
.recipe-card .desc { font-size: 0.93rem; color: var(--ink-soft); font-style: italic; }

/* ---------- modal ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 33, 0.85);
  backdrop-filter: blur(4px);
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem;
}
.modal.active { display: flex; align-items: flex-start; justify-content: center; }
.modal-content { background: var(--paper-alt); border-radius: 16px; max-width: 820px; width: 100%; margin: 2rem auto; position: relative; }
.modal-header {
  background: linear-gradient(135deg, #1F2421 0%, #2a2d29 100%);
  padding: 2rem;
  border-radius: 16px 16px 0 0;
  border-bottom: 3px solid var(--accent);
}
.modal-header h2 { color: var(--paper); font-size: clamp(1.5rem, 4vw, 2rem); padding-right: 2.5rem; }
.modal-header .subtitle { color: #DCD5C9; margin-top: 0.3rem; font-size: 0.94rem; }
.modal-body { padding: 2rem; }
.modal-hero-img { width: 100%; max-height: 260px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 1.5rem; }
.close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(247, 244, 239, 0.2);
  border: none;
  color: var(--paper);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}
.close-btn:hover { background: rgba(247, 244, 239, 0.35); }

.calc-section { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.35rem 1.5rem; margin-bottom: 1.8rem; }
.calc-input { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.calc-input label { font-weight: 500; }
.calc-input input {
  padding: 0.65rem;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-size: 1.05rem;
  width: 150px;
  text-align: center;
  font-family: inherit;
}
.calc-input input:focus { outline: none; border-color: var(--accent); }
.calc-hint { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.6rem; }

.section-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  color: var(--accent);
  margin: 1.8rem 0 0.9rem;
  border-bottom: 2px solid var(--line);
  padding-bottom: 0.45rem;
}
.ingredients-list { list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0.4rem 1.5rem; }
.ingredients-list li { padding: 0.7rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; font-size: 0.96rem; }
.ingredients-list li:last-child { border-bottom: none; }
.ingredients-list .amount { font-weight: 600; color: var(--accent); text-align: right; white-space: nowrap; }

.stages-list { list-style: none; counter-reset: stage; padding: 0; }
.stages-list li {
  counter-increment: stage;
  padding: 1.25rem 1.35rem 1.25rem 3.7rem;
  margin-bottom: 0.9rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  position: relative;
  font-size: 0.96rem;
}
.stages-list li::before {
  content: counter(stage);
  position: absolute;
  left: 1.15rem;
  top: 1.2rem;
  background: var(--accent);
  color: #fff;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
}
.stage-thumb { width: 100%; max-height: 165px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); margin-top: 0.85rem; }
.stage-time { background: var(--accent-soft); padding: 0.2rem 0.7rem; border-radius: 999px; font-size: 0.83rem; margin-left: 0.35rem; color: var(--accent-deep); white-space: nowrap; display: inline-block; }
.stage-why { margin-top: 0.7rem; padding-top: 0.7rem; border-top: 1px solid var(--line); font-style: italic; color: var(--ink-soft); font-size: 0.92rem; }
.stage-why::before { content: "→ Зачем: "; color: var(--gold); font-weight: 600; font-style: normal; }

.tips-list { list-style: none; }
.tips-list li { padding: 0.95rem 1rem 0.95rem 2.5rem; margin-bottom: 0.7rem; background: var(--paper); border-left: 3px solid var(--accent); border-radius: 0 8px 8px 0; position: relative; font-size: 0.94rem; }
.tips-list li::before { content: "★"; position: absolute; left: 1rem; color: var(--accent); }
.action-buttons { display: flex; gap: 1rem; margin-top: 1.8rem; flex-wrap: wrap; }

/* ---------- about page ---------- */
.prose p { margin-bottom: 1rem; color: var(--ink-soft); }
.prose h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 2.5rem 0 0.9rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0 0 1rem 1.3rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.5rem; }
.prose strong { color: var(--ink); }

.rules { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); margin: 1.5rem 0; }
.rule { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 1.2rem 1.35rem; }
.rule strong { display: block; margin-bottom: 0.3rem; }
.rule span { font-size: 0.92rem; color: var(--ink-soft); }

.faq details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1rem 1.3rem;
  margin-bottom: 0.8rem;
}
.faq summary { cursor: pointer; font-weight: 600; font-family: Georgia, "Times New Roman", serif; font-size: 1.05rem; }
.faq details[open] summary { color: var(--accent); margin-bottom: 0.6rem; }
.faq p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---------- footer ---------- */
.site-footer {
  background: linear-gradient(135deg, #1F2421 0%, #2a2d29 100%);
  color: #B9B2A6;
  border-top: 3px solid var(--accent);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.9rem;
}
.site-footer .brand { display: inline-block; margin-bottom: 0.6rem; font-size: 1.15rem; }
.site-footer a { color: #E7E1D7; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer nav { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin: 0.9rem 0; }

/* ---------- labels / print ---------- */
.label-grid { display: none; }
.label { width: 100mm; height: 90mm; border: 2px solid var(--accent); border-radius: 8px; padding: 6mm; background: #fff; display: flex; flex-direction: column; page-break-inside: avoid; box-sizing: border-box; }
.label-brand { font-family: Georgia, "Times New Roman", serif; font-size: 15pt; font-weight: 700; color: var(--accent); text-align: center; margin-bottom: 2mm; }
.label-name { font-family: Georgia, "Times New Roman", serif; font-size: 14pt; font-weight: 600; text-align: center; margin-bottom: 2mm; }
.label-specs { font-size: 10pt; color: var(--ink-soft); text-align: center; margin-bottom: 2mm; }
.label-desc { font-size: 8.5pt; color: var(--ink-soft); font-style: italic; text-align: center; margin-bottom: 3mm; flex-grow: 1; }
.label-ingredients { font-size: 8.5pt; color: var(--ink-soft); margin-bottom: 3mm; }
.label-dates { border-top: 1px solid var(--line); padding-top: 2mm; font-size: 8.5pt; color: var(--ink-soft); text-align: center; }
.label-ready { font-weight: 600; color: var(--accent); font-size: 10pt; margin-top: 1mm; }

@media print {
  body { background: #fff; }
  .site-header, .site-footer, .no-print, .mode-switch { display: none !important; }
  .label-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6mm; width: 210mm; margin: 0 auto; }
  .modal { display: none !important; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
@page { size: A4; margin: 10mm; }

@media (max-width: 640px) {
  .wrap, .wrap-narrow { padding: 0 1.25rem; }
  .modal { padding: 0.75rem; }
  .modal-body { padding: 1.35rem; }
  .modal-header { padding: 1.5rem; }
  .ingredients-list { padding: 0.3rem 1.1rem; }
  .calc-input input { width: 110px; }
}
