:root {
  --paper: #f6f1e7;
  --paper-deep: #ece4d6;
  --ink: #263127;
  --muted: #6f756d;
  --green: #47624c;
  --green-dark: #314737;
  --sage: #dfe6d9;
  --rust: #b8663f;
  --white: #fffdf8;
  --line: rgba(38, 49, 39, .13);
  --shadow: 0 20px 60px rgba(49, 42, 31, .12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 231, .9);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: "Newsreader", serif;
  font-weight: 600;
  font-size: 1.2rem;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  color: var(--paper);
  border-radius: 50%;
  background: var(--green);
  font-family: serif;
}
.icon-button, .save-button {
  border: 0;
  background: transparent;
  cursor: pointer;
}
.icon-button {
  width: 44px;
  height: 44px;
  padding: 11px;
  border-radius: 50%;
}
.icon-button:hover { background: var(--paper-deep); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-select {
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.icon-button svg, .save-button svg {
  width: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.hero {
  padding: clamp(70px, 10vw, 128px) 20px clamp(64px, 8vw, 100px);
  text-align: center;
  overflow: hidden;
  position: relative;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  width: 250px;
  height: 250px;
  border: 1px solid rgba(71, 98, 76, .16);
  border-radius: 50%;
  pointer-events: none;
}
.hero::before { left: -170px; top: 20px; }
.hero::after { right: -130px; bottom: -90px; width: 320px; height: 320px; }
.eyebrow, .kicker {
  margin: 0 0 14px;
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: .72rem;
  font-weight: 700;
}
h1, h2, h3 { font-family: "Newsreader", serif; }
h1 {
  margin: 0 auto;
  max-width: 760px;
  font-size: clamp(3.35rem, 8vw, 6.6rem);
  line-height: .88;
  letter-spacing: -.045em;
  font-weight: 500;
}
h1 em { color: var(--green); font-weight: 500; }
.hero-copy {
  max-width: 520px;
  margin: 28px auto 30px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}
.search {
  width: min(100%, 540px);
  height: 58px;
  margin: 0 auto;
  padding: 0 18px;
  display: flex;
  gap: 13px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(57, 49, 38, .08);
}
.search:focus-within { outline: 2px solid var(--green); outline-offset: 3px; }
.search svg {
  width: 22px;
  fill: none;
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
}
.search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}
.search input::placeholder { color: #989b94; }

.collection {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 80px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 3.4rem);
  letter-spacing: -.025em;
  line-height: 1;
}
.section-heading > span { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 28px 0;
}
.chip {
  padding: 10px 17px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  white-space: nowrap;
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
}
.chip.active, .chip:hover { color: var(--white); background: var(--green); border-color: var(--green); }
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.recipe-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--white);
  transition: transform .25s ease, box-shadow .25s ease;
}
.recipe-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.card-image {
  height: 330px;
  position: relative;
  background-image: url("assets/recipe-duo.png");
  background-repeat: no-repeat;
  background-size: 200% 100%;
}
.cheesecake-image { background-position: left center; }
.steak-image { background-position: right center; }
.no-bake-image {
  background-image: url("assets/no-bake-cheesecake.jpg");
  background-size: cover;
  background-position: center;
}
.ribs-image {
  background-image: url("assets/ribs.jpg");
  background-size: cover;
  background-position: center;
}
.category-tag, .difficulty {
  position: absolute;
  top: 18px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.category-tag { left: 18px; color: var(--green-dark); background: rgba(255,253,248,.9); }
.difficulty { right: 18px; color: var(--white); background: rgba(38,49,39,.76); }
.card-body { padding: 25px 26px 26px; }
.card-body .kicker { margin-bottom: 6px; }
.card-body h3 { margin: 0; font-size: 2rem; letter-spacing: -.02em; }
.card-body > p:not(.kicker) { color: var(--muted); line-height: 1.55; }
.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-top: 17px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .79rem;
  font-weight: 600;
}
.save-button {
  width: 42px;
  height: 42px;
  padding: 11px;
  position: absolute;
  right: 18px;
  bottom: 88px;
  border-radius: 50%;
  background: var(--paper);
  z-index: 2;
}
.save-button.saved { color: var(--rust); }
.save-button.saved svg { fill: currentColor; }
.empty-state { padding: 80px 20px; text-align: center; color: var(--muted); }
.empty-state h3 { margin: 12px 0 5px; color: var(--ink); font-size: 1.8rem; }
.empty-state p { margin: 0; }
.empty-state .empty-icon { font-size: 2rem; }
.search-status-text { color: var(--green); font-size: .95rem; font-weight: 600; }
.status-bar {
  width: 260px;
  height: 6px;
  margin: 18px auto 0;
  background: var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.status-bar-fill {
  width: 40%;
  height: 100%;
  background: var(--green);
  border-radius: 999px;
  animation: status-slide 1.4s ease-in-out infinite;
}
@keyframes status-slide {
  0% { margin-left: -40%; }
  100% { margin-left: 100%; }
}

.family-note {
  max-width: 740px;
  margin: 0 auto 100px;
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(71, 98, 76, .2);
  border-radius: 20px;
  background: var(--sage);
}
.family-note > span {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  height: 48px;
  color: var(--white);
  background: var(--green);
  border-radius: 50%;
}
.family-note p { margin: 0; line-height: 1.55; }

footer {
  padding: 48px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: .85rem;
}

.recipe-dialog {
  width: min(820px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 28px;
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.recipe-dialog::backdrop { background: rgba(24, 29, 24, .65); backdrop-filter: blur(4px); }
.dialog-hero {
  min-height: 280px;
  padding: 24px;
  position: relative;
  display: flex;
  align-items: end;
  background-image: linear-gradient(to top, rgba(20,25,20,.75), transparent 70%), url("assets/recipe-duo.png");
  background-size: 200% 100%;
  color: white;
}
.dialog-hero.cheesecake { background-position: left center; }
.dialog-hero.steak { background-position: right center; }
.dialog-hero.nobake {
  background-image: linear-gradient(to top, rgba(20,25,20,.75), transparent 70%), url("assets/no-bake-cheesecake.jpg");
  background-size: cover;
  background-position: center;
}
.dialog-hero.ribs {
  background-image: linear-gradient(to top, rgba(20,25,20,.75), transparent 70%), url("assets/ribs.jpg");
  background-size: cover;
  background-position: center;
}
.close-dialog {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: 1.2rem;
}
.back-dialog {
  position: absolute;
  top: 18px;
  left: 18px;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.9);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
}
.dialog-title .eyebrow { color: #f6c9aa; margin-bottom: 5px; }
.dialog-title h2 { margin: 0; font-size: clamp(2.4rem, 7vw, 4rem); line-height: .95; }
.dialog-body { padding: clamp(24px, 5vw, 44px); }
.quick-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 34px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.quick-facts div { padding: 15px; text-align: center; }
.quick-facts div + div { border-left: 1px solid var(--line); }
.quick-facts span { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; }
.quick-facts strong { display: block; margin-top: 4px; font-size: .92rem; }
.recipe-intro { color: var(--muted); line-height: 1.7; font-size: 1.02rem; }
.recipe-section { margin-top: 34px; }
.recipe-section h3 { margin: 0 0 18px; font-size: 1.75rem; }
.ingredients { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.ingredients label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--paper);
  cursor: pointer;
  line-height: 1.45;
}
.ingredients input { margin-top: 3px; accent-color: var(--green); }
.ingredients input:checked + span { text-decoration: line-through; color: var(--muted); }
.steps { padding: 0; margin: 0; list-style: none; counter-reset: steps; display: grid; gap: 22px; }
.steps li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  line-height: 1.65;
}
.steps li::before {
  content: counter(steps);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--white);
  border-radius: 50%;
  background: var(--green);
  font-weight: 700;
}
.callout {
  padding: 18px;
  margin-top: 24px;
  border-left: 4px solid var(--rust);
  border-radius: 0 12px 12px 0;
  background: #f8e9dd;
  line-height: 1.55;
}
.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 16px;
  background: #1d211d;
}
.video-wrap iframe, .video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.source-note { margin: 12px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.5; }
.source-note a { color: var(--green); }
.dialog-actions { display: flex; gap: 10px; margin-top: 32px; }
.action-button {
  flex: 1;
  padding: 13px 17px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-weight: 700;
}
.action-button.primary { color: white; background: var(--green); }
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 30;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: .85rem;
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: .25s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 680px) {
  .site-header { height: 64px; padding-inline: 16px; }
  .hero { padding-top: 64px; }
  .hero-copy { font-size: .96rem; }
  .section-heading { align-items: start; }
  .recipe-grid { grid-template-columns: 1fr; }
  .card-image { height: 270px; }
  .family-note { margin-inline: 16px; margin-bottom: 70px; align-items: flex-start; }
  footer { padding-bottom: 90px; text-align: center; }
  .recipe-dialog {
    width: 100%;
    max-height: calc(100dvh - 8px);
    margin: auto 0 0;
    border-radius: 26px 26px 0 0;
  }
  .dialog-hero { min-height: 240px; }
  .quick-facts strong { font-size: .8rem; }
  .quick-facts div { padding-inline: 7px; }
  .dialog-actions { flex-direction: column; }
}

@media print {
  body > *:not(.recipe-dialog) { display: none !important; }
  .recipe-dialog { position: static; width: 100%; max-height: none; display: block; box-shadow: none; }
  .close-dialog, .video-wrap, .dialog-actions { display: none; }
}

