:root {
  --paper: #f6f0e2;
  --card: #fffdf6;
  --ink: #23301f;
  --muted: #55624e;
  --line: #d9cfb8;
  --tomato: #c23a22;
  --tomato-dark: #9c2c18;
  --sage: #7f9a62;
  --mustard: #e2a93b;
  --display: "Yeseva One", Georgia, serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(35, 48, 31, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(35, 48, 31, .05) 1px, transparent 1px);
  background-size: 28px 28px;
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; }
h2 { font-size: clamp(2rem, 5vw, 3.1rem); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
svg { display: block; }
a { color: inherit; }
section[id] { scroll-margin-top: 16px; }

.hand { font-family: var(--hand); font-weight: 700; font-size: 1.6rem; line-height: 1.1; color: var(--tomato); }

:focus-visible { outline: 3px solid var(--mustard); outline-offset: 2px; }

/* Шапка */
.top {
  max-width: 1160px;
  margin: 0 auto;
  padding: 20px 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
}
.logo { font-family: var(--display); font-size: 1.6rem; text-decoration: none; }
.top nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; font-weight: 500; font-size: .98rem; }
.top nav a { text-decoration: none; padding: 6px 0; }
.top nav a:hover { color: var(--tomato); }
.top nav .nav-cta { color: var(--tomato); border-bottom: 2px solid currentColor; }

/* Первый экран */
.hero {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 16px 64px;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
  gap: 40px;
}
.hero h1 { font-size: clamp(4.2rem, 15vw, 9.5rem); line-height: .98; margin: 4px 0 20px; letter-spacing: -.01em; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.35rem); max-width: 32ch; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 30px; }
.hero-art { position: relative; min-width: 0; }
.hero-art svg { width: 100%; max-width: 460px; height: auto; margin: 0 auto; }
.note { position: absolute; left: 0; bottom: 2%; transform: rotate(-5deg); background: var(--mustard); color: var(--ink); padding: 4px 14px; font-size: 1.35rem; max-width: 90%; }

.btn {
  display: inline-block;
  background: var(--tomato);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 13px 24px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--ink);
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn:hover { background: var(--tomato-dark); transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.link { font-weight: 500; text-underline-offset: 4px; }
.link:hover { color: var(--tomato); }

/* Разделы */
.section { max-width: 1160px; margin: 0 auto; padding: 40px 16px 56px; }
.section-head { max-width: 62ch; margin-bottom: 30px; }
.section-head p { margin-top: 12px; color: var(--muted); }

/* Карточки рецептов */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-items: start; }
.card {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 22px;
  box-shadow: 6px 6px 0 rgba(35, 48, 31, .16);
}
.card-head { display: flex; gap: 16px; align-items: flex-start; padding-bottom: 16px; border-bottom: 2px dashed var(--line); }
.card-head svg { flex: 0 0 64px; width: 64px; height: 64px; }
.tag { display: inline-block; font-family: var(--hand); font-weight: 700; font-size: 1.3rem; line-height: 1.1; color: var(--tomato); }
.card h3 { font-size: 1.5rem; margin: 2px 0 4px; }
.serves { font-size: .93rem; color: var(--muted); }
.card h4 { margin: 16px 0 8px; font-size: .84rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }

.ingredients li { border-bottom: 1px solid var(--line); }
.ingredients li:last-child { border-bottom: 0; }
.ingredients label { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; cursor: pointer; }
.ingredients input { flex: none; width: 18px; height: 18px; margin: 4px 0 0; accent-color: var(--tomato); cursor: pointer; }
.ingredients input:checked + span { color: var(--muted); text-decoration: line-through; }

.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 10px 36px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -5px;
  font-family: var(--hand);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.2;
  color: var(--tomato);
}

/* Почему удобно */
.why-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.why-list li { padding: 22px 26px 22px 0; }
.why-list li + li { border-left: 2px solid var(--ink); padding-left: 26px; }
.why-list h3 { font-size: 1.45rem; margin-bottom: 8px; }
.why-list p { color: var(--muted); }

/* Подписка */
.subscribe { padding: 16px 16px 72px; }
.subscribe-card {
  max-width: 760px;
  margin: 0 auto;
  background: #dfe6c9;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: clamp(24px, 5vw, 48px);
  box-shadow: 8px 8px 0 var(--ink);
}
.subscribe-card h2 { margin: 4px 0 12px; font-size: clamp(1.9rem, 5vw, 2.8rem); }
.form { margin-top: 22px; }
.form label { display: block; font-weight: 600; margin-bottom: 8px; }
.form-row { display: flex; flex-wrap: wrap; gap: 14px; }
.form input {
  flex: 1 1 240px;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 12px 14px;
}
.form-note {
  margin-top: 18px;
  background: var(--mustard);
  border: 2px solid var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 600;
}
.form-note[hidden] { display: none; }

/* Подвал */
.foot {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 16px 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 24px;
  border-top: 2px solid var(--ink);
  color: var(--muted);
  font-size: .95rem;
}
.foot .logo { color: var(--ink); font-size: 1.3rem; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-bottom: 40px; }
  .hero-art svg { max-width: 360px; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .why-list { grid-template-columns: minmax(0, 1fr); }
  .why-list li, .why-list li + li { padding: 18px 0; border-left: 0; }
  .why-list li + li { border-top: 1px solid var(--ink); }
}

@media (max-width: 420px) {
  .card { padding: 18px 16px; }
  .btn { width: 100%; text-align: center; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-actions .link { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
