:root {
  --tomato: #d33b2b;
  --tomato-dark: #b22b1e;
  --basil: #2e7d32;
  --cream: #fdf6ec;
  --crust: #f4e6d0;
  --ink: #2b2118;
  --ink-soft: #6b5d4f;
  --card-bg: #ffffff;
  --border: #eadfce;
  --shadow: 0 6px 20px rgba(43, 33, 24, 0.08);
  --shadow-hover: 0 12px 28px rgba(43, 33, 24, 0.16);
  --radius: 14px;
  --max-width: 1100px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

a {
  color: var(--tomato);
  text-decoration: none;
}

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

.container {
  width: min(var(--max-width), 100% - 2.5rem);
  margin-inline: auto;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand .slice {
  font-size: 1.5rem;
}

.brand span:last-child {
  color: var(--tomato);
}

.site-nav {
  display: flex;
  gap: 0.35rem;
}

.site-nav a {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  color: var(--ink-soft);
  font-weight: 600;
}

.site-nav a:hover {
  color: var(--tomato);
  background: var(--cream);
}

.site-nav a.active {
  background: var(--tomato);
  color: #fff;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1.4rem;
  line-height: 1;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
}

.hero .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
}

.hero .container {
  position: relative;
  padding-block: 5rem 6rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 0.75rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.15rem;
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  color: rgba(255, 255, 255, 0.92);
}

.btn {
  display: inline-block;
  background: var(--tomato);
  color: #fff;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  transition: transform 0.15s ease, background 0.15s ease;
}

.btn:hover {
  background: var(--tomato-dark);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Recipe grid ---------- */
.section {
  padding-block: 3.5rem;
}

.section h2 {
  font-size: 1.9rem;
  margin: 0 0 0.4rem;
}

.section .lede {
  color: var(--ink-soft);
  margin: 0 0 1.75rem;
  max-width: 46rem;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.4rem;
}

.recipe-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.recipe-card img {
  aspect-ratio: 4 / 3;
  width: 100%;
  object-fit: cover;
}

.recipe-card .card-body {
  padding: 1rem 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.recipe-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.recipe-card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.badge {
  background: var(--crust);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-weight: 600;
}

.badge.easy { background: #e6f4e6; color: var(--basil); }
.badge.medium { background: #fdf0d5; color: #9a6b00; }

.recipe-card .card-link {
  margin-top: auto;
  font-weight: 700;
}

/* ---------- Recipe page ---------- */
.recipe-hero {
  background: var(--ink);
  color: #fff;
}

.recipe-hero .container {
  padding-block: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 760px) {
  .recipe-hero .container {
    grid-template-columns: 1.1fr 1fr;
  }
}

.recipe-hero img {
  border-radius: var(--radius);
  aspect-ratio: 16 / 10;
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow-hover);
}

.recipe-hero h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.1;
}

.recipe-hero .tagline {
  color: rgba(255, 255, 255, 0.9);
  max-width: 34rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.fact {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
}

.fact strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.8;
}

.recipe-layout {
  display: grid;
  gap: 2rem;
  padding-block: 3rem;
}

@media (min-width: 820px) {
  .recipe-layout {
    grid-template-columns: 1fr 1.6fr;
    align-items: start;
  }
}

.panel {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.panel h2 {
  margin-top: 0;
  font-size: 1.4rem;
  border-bottom: 2px solid var(--cream);
  padding-bottom: 0.5rem;
}

.ingredients {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ingredients li {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border);
}

.ingredients li:last-child {
  border-bottom: none;
}

.ingredients .check {
  color: var(--basil);
  font-weight: 800;
}

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0 0.75rem 3rem;
  border-bottom: 1px dashed var(--border);
}

.steps li:last-child {
  border-bottom: none;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.7rem;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--tomato);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  padding-block: 2rem;
  margin-top: 2rem;
  text-align: center;
}

.site-footer a {
  color: #fff;
}

/* ---------- Mobile nav ---------- */
@media (max-width: 640px) {
  .nav-toggle {
    display: inline-block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 0.75rem 1rem 1rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }
}
