:root {
  color-scheme: light;
  --ink: #2b211e;
  --muted: #766a66;
  --brand: #9d4f3d;
  --brand-dark: #793727;
  --cream: #fffaf7;
  --rose: #f7e8e2;
  --gold: #a27a32;
  --line: #eadbd4;
  --surface: rgba(255, 255, 255, 0.86);
  --shadow: 0 18px 50px rgba(74, 40, 29, 0.11);
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 280px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% -5%, #f4d9cf 0, transparent 30rem),
    radial-gradient(circle at 94% 9%, #f1e3bd 0, transparent 25rem),
    var(--cream);
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

.site-header,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(112, 53, 38, 0.16);
}

.header-tagline { color: var(--muted); font-size: 0.92rem; }

main {
  width: min(1120px, calc(100% - 40px));
  min-height: 70vh;
  margin-inline: auto;
}

main:focus { outline: none; }

.hero {
  overflow: hidden;
  padding: clamp(34px, 7vw, 82px);
  border: 1px solid rgba(157, 79, 61, 0.12);
  border-radius: 34px;
  background:
    linear-gradient(120deg, rgba(151, 72, 54, 0.94), rgba(129, 96, 43, 0.91)),
    var(--brand);
  color: white;
  box-shadow: var(--shadow);
  position: relative;
}

.hero::after {
  content: "🍲";
  position: absolute;
  right: clamp(18px, 8vw, 105px);
  top: 50%;
  translate: 0 -50%;
  rotate: -8deg;
  font-size: clamp(5rem, 16vw, 11rem);
  filter: drop-shadow(0 20px 15px rgba(52, 29, 18, 0.25));
  opacity: 0.9;
}

.hero-content { position: relative; z-index: 1; max-width: 620px; }

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 900;
  opacity: 0.85;
}

h1, h2, h3, p { margin-top: 0; }

h1 {
  margin-bottom: 16px;
  max-width: 760px;
  font-size: clamp(2.1rem, 5vw, 4.65rem);
  line-height: 1.01;
  letter-spacing: -0.055em;
}

.hero p:not(.eyebrow) {
  max-width: 520px;
  font-size: clamp(1rem, 2vw, 1.16rem);
  line-height: 1.6;
  opacity: 0.92;
}

.section-head {
  margin: 56px 0 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}

.section-head h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.4rem); letter-spacing: -0.04em; }
.section-head p { margin: 0; color: var(--muted); }

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.recipe-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(74, 40, 29, 0.07);
  text-decoration: none;
  transition: translate 160ms ease, box-shadow 160ms ease;
}

.recipe-card:hover { translate: 0 -4px; box-shadow: var(--shadow); }

.recipe-card img,
.photo-fallback {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  place-items: center;
  background: linear-gradient(135deg, #f3d8cc, #e8d7a9);
  font-size: 4rem;
}

.card-copy { padding: 18px; }
.card-copy h3 { margin-bottom: 8px; font-size: 1.12rem; line-height: 1.25; }
.card-copy p { margin-bottom: 14px; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }

.meta-row { display: flex; flex-wrap: wrap; gap: 7px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--rose);
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 750;
}

.recipe-shell { width: min(960px, 100%); margin-inline: auto; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 8px 0 22px;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 800;
}

.recipe-hero {
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.recipe-hero-media img,
.recipe-hero-media .photo-fallback {
  display: grid;
  width: 100%;
  max-height: 490px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  place-items: center;
  font-size: 7rem;
}

.recipe-hero-copy { padding: clamp(24px, 6vw, 54px); }
.recipe-hero h1 { margin-bottom: 18px; font-size: clamp(2rem, 6vw, 4.1rem); }
.lede { max-width: 720px; color: var(--muted); font-size: 1.04rem; line-height: 1.65; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.button {
  display: inline-flex;
  min-height: 47px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  background: var(--brand);
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(157, 79, 61, 0.18);
}

.button.secondary { background: var(--rose); color: var(--brand-dark); box-shadow: none; }

.content-grid {
  display: grid;
  grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.45fr);
  gap: 22px;
  margin-top: 24px;
}

.panel {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.panel h2 { font-size: 1.42rem; letter-spacing: -0.025em; }

.ingredient-list { list-style: none; padding: 0; margin: 0; }
.ingredient-list li { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.ingredient-list li:last-child { border-bottom: 0; }
.amount { min-width: 74px; color: var(--brand-dark); font-weight: 850; }

.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.step { position: relative; padding: 0 0 28px 54px; counter-increment: step; }
.step:last-child { padding-bottom: 0; }
.step::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -3px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: white;
  font-weight: 900;
}
.step:not(:last-child)::after { content: ""; position: absolute; left: 17px; top: 39px; bottom: 5px; width: 2px; background: var(--line); }
.step h3 { margin-bottom: 7px; font-size: 1rem; }
.step p { color: #594b47; line-height: 1.55; }
.step .comment { padding: 10px 12px; border-radius: 12px; background: #fff5e8; color: #7c571d; font-size: 0.9rem; }
.settings { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.setting { padding: 6px 9px; border-radius: 10px; background: #eee7df; font-size: 0.78rem; font-weight: 800; }

.empty,
.error,
.loading { min-height: 54vh; display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; color: var(--muted); }
.empty h1, .error h1 { margin-bottom: 2px; color: var(--ink); font-size: 2rem; }

.spinner { width: 38px; height: 38px; border: 4px solid var(--rose); border-top-color: var(--brand); border-radius: 50%; animation: spin 0.75s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

footer { margin-top: 70px; padding: 28px 0 45px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-brand { margin-bottom: 12px; }
.footer-brand img { width: 34px; height: 34px; }
footer p { font-size: 0.9rem; }

@media (max-width: 820px) {
  .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .hero::after { opacity: 0.3; right: -10px; }
}

@media (max-width: 560px) {
  .site-header, main, footer { width: min(100% - 28px, 1120px); }
  .site-header { min-height: 74px; }
  .header-tagline { display: none; }
  .hero { padding: 34px 24px; border-radius: 25px; }
  .recipe-grid { grid-template-columns: 1fr; }
  .section-head { margin-top: 40px; align-items: start; flex-direction: column; gap: 5px; }
  .recipe-hero { border-radius: 24px; }
  .recipe-hero-copy { padding: 24px 20px; }
  .actions .button { width: 100%; }
  .panel { border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
