:root {
  --ink: #24211d;
  --muted: #68615a;
  --paper: #f7f5ef;
  --paper-warm: #fbf3e7;
  --paper-cool: #eef4ef;
  --line: #ddd5ca;
  --accent: #b9362b;
  --green: #326f54;
  --gold: #d99b2b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(238,244,239,.96) 0%, rgba(247,245,239,.98) 38%, rgba(251,243,231,.92) 100%);
  background-attachment: fixed;
}

a { color: inherit; }

.site-header {
  min-height: 104px;
  padding: 12px clamp(18px, 4vw, 56px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 248, 242, 0.94);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
}

.brand img { height: 72px; width: auto; display: block; }
.brand img { max-width: min(280px, 52vw); object-fit: contain; }

nav {
  display: flex;
  gap: clamp(10px, 2vw, 24px);
  flex-wrap: wrap;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 1rem;
}

nav a { text-decoration: none; }
nav a:hover { color: var(--accent); }

.hero {
  position: relative;
  min-height: clamp(500px, 64vh, 680px);
  padding: clamp(46px, 7vw, 86px) clamp(20px, 6vw, 80px);
  display: flex;
  align-items: center;
  background: #2f2a23;
  color: white;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(29, 22, 17, .78) 0%, rgba(29, 22, 17, .56) 34%, rgba(29, 22, 17, .18) 68%, rgba(29, 22, 17, .08) 100%),
    linear-gradient(0deg, rgba(0,0,0,.22), rgba(0,0,0,0) 45%);
  pointer-events: none;
}

.hero-copy {
  max-width: 620px;
  position: relative;
  z-index: 2;
  text-shadow: 0 2px 18px rgba(0,0,0,.38);
}

.eyebrow {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0;
  font-size: 0.82rem;
  color: var(--gold);
}

h1 {
  margin: 0 0 14px;
  font-size: clamp(2.4rem, 7vw, 5.8rem);
  line-height: 0.98;
}

h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.lead {
  max-width: 720px;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

.hero-slider {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity .75s ease, transform 5.2s ease;
  pointer-events: none;
  color: white;
  text-decoration: none;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.hero-slide span {
  position: absolute;
  right: clamp(18px, 5vw, 64px);
  bottom: clamp(18px, 5vw, 54px);
  max-width: calc(100% - 36px);
  padding: 10px 14px;
  background: rgba(36, 33, 29, .70);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 6px;
  font-weight: 800;
  z-index: 2;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: clamp(20px, 6vw, 80px);
  bottom: clamp(18px, 4vw, 36px);
  display: flex;
  gap: 8px;
  align-items: center;
}

.hero-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 1px solid rgba(255,255,255,.80);
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  cursor: pointer;
  transition: width .2s ease, background .2s ease;
}

.hero-dot.is-active {
  width: 30px;
  background: rgba(255,255,255,.92);
}

.home-ribbon {
  width: min(1180px, calc(100% - 40px));
  margin: -38px auto 0;
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.ribbon-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: rgba(255,255,255,.93);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 16px 40px rgba(64, 46, 30, .12);
}

.ribbon-card img {
  width: 92px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.ribbon-card span {
  min-width: 0;
  font-weight: 850;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.ribbon-card:hover span { color: var(--accent); }

.home-ribbon + .stats { margin-top: 28px; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 750;
}

.button.secondary {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.45);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,.82);
}

.stats div {
  padding: 24px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.stats div:last-child { border-right: 0; }
.stats strong { display: block; font-size: 2rem; color: var(--green); }
.stats span { color: var(--muted); }

.section, .page-title, .prose, .article {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.section { padding: 56px 0; }

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

.section-head a { color: var(--accent); font-weight: 750; text-decoration: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
}

.card {
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.thumb {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #eee5d9;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}

.card:hover .thumb img { transform: scale(1.035); }

.type, .meta { color: var(--green); font-size: 0.82rem; font-weight: 800; text-transform: uppercase; padding-inline: 20px; }
.type { padding-top: 18px; }
.card h3 { margin: 0; font-size: 1.25rem; line-height: 1.25; padding-inline: 20px; }
.card h3 a { text-decoration: none; }
.card p { color: var(--muted); line-height: 1.5; margin: 0; padding-inline: 20px; }
.tags, .article-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding: 0 20px 20px; }
.article-tags { padding: 0; margin-top: 12px; }
.tags span, .article-tags span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--muted);
  font-size: 0.78rem;
}

.page-title {
  padding: 54px 0 18px;
}

.page-title h1, .article h1 { color: var(--accent); }
.page-title p { color: var(--muted); max-width: 720px; line-height: 1.6; }

.article {
  padding: 48px 0 72px;
  max-width: 860px;
}

.back { color: var(--green); text-decoration: none; font-weight: 800; }
.content { margin-top: 30px; line-height: 1.75; font-size: 1.05rem; }
.content img { max-width: 100%; height: auto; border-radius: 8px; }
.recipe-page .content img,
.recipe-page .recipe-hero-img,
.recipe-page .step-images img,
.gallery img { cursor: zoom-in; }
.content a { color: var(--accent); }
.content table { width: 100%; border-collapse: collapse; overflow-x: auto; display: block; }
.content td, .content th { border: 1px solid var(--line); padding: 8px; }

.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.photo-strip img,
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.photo-strip img {
  aspect-ratio: 4 / 3;
}

.gallery {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 72px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.gallery figure {
  margin: 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.gallery img {
  aspect-ratio: 1 / 1;
  border-radius: 0;
}

.gallery figcaption {
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.prose {
  padding: 24px 0 72px;
  max-width: 760px;
  line-height: 1.7;
  color: var(--muted);
}

.about-page {
  width: min(1060px, calc(100% - 40px));
  margin: 0 auto 72px;
  display: grid;
  grid-template-columns: minmax(280px, 390px) 1fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: start;
  background:
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(251,243,231,.72));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 42px);
  box-shadow: 0 18px 55px rgba(64, 46, 30, .08);
}

.about-page figure { margin: 0; }
.about-page img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 16px 40px rgba(0,0,0,.12);
}

.about-page .content {
  margin-top: 0;
  font-size: 1.04rem;
  line-height: 1.78;
}

.about-page .content::first-line {
  color: var(--green);
  font-weight: 850;
}

.recipe-page {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto;
  padding: 42px 0 80px;
}

.recipe-hero {
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(280px, .85fr);
  gap: clamp(24px, 4vw, 44px);
  align-items: center;
}

.recipe-hero > div { min-width: 0; }

.recipe-hero h1 {
  color: var(--accent);
  font-size: clamp(2.2rem, 4.4vw, 4.15rem);
  line-height: 1.02;
  overflow-wrap: anywhere;
}

.recipe-intro {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.58;
  max-width: 58ch;
}

.recipe-hero-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  max-height: 460px;
}

.recipe-facts {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.recipe-facts span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  background: white;
  padding: 8px 11px;
  border-radius: 999px;
  color: var(--muted);
}

.recipe-facts strong { color: var(--green); }

.recipe-layout {
  margin-top: 42px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: clamp(28px, 4vw, 52px);
  align-items: start;
}

.ingredients {
  position: sticky;
  top: 116px;
  background: rgba(255,255,255,.90);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
}

.ingredients h2,
.recipe-main h2 { color: var(--green); font-size: 1.55rem; }

.ingredients ul {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.ingredients li {
  display: grid;
  grid-template-columns: minmax(72px, 38%) minmax(0, 1fr);
  gap: 12px;
  border-bottom: 1px solid #eee5d9;
  padding-bottom: 10px;
  align-items: start;
}

.ingredients li:last-child { border-bottom: 0; padding-bottom: 0; }
.ingredients strong {
  color: var(--accent);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.ingredients span {
  min-width: 0;
  line-height: 1.28;
  overflow-wrap: anywhere;
}
.ingredients em {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .9rem;
  font-style: normal;
}

.recipe-step {
  margin-top: 24px;
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.step-body {
  background: rgba(255,255,255,.90);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.step-body h3 { margin: 0 0 8px; }
.step-body p { margin-top: 0; color: var(--muted); line-height: 1.7; }

.step-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.step-images img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

body.lightbox-open { overflow: hidden; }

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 54px);
  background: rgba(24, 20, 17, .86);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.image-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.image-lightbox img {
  max-width: min(1120px, 100%);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(0,0,0,.42);
}

.image-lightbox p {
  margin: 12px 0 0;
  color: rgba(255,255,255,.86);
  font-weight: 700;
  text-align: center;
}

.lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 50%;
  background: rgba(255,255,255,.14);
  color: white;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover { background: rgba(255,255,255,.24); }

.site-footer {
  padding: 30px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.74);
}

.product-ended {
  width: min(960px, calc(100% - 40px));
  margin: 0 auto;
  min-height: calc(100vh - 170px);
  display: grid;
  align-items: center;
}

.product-ended > div {
  max-width: 720px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.95), rgba(238,244,239,.76));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(28px, 5vw, 56px);
  box-shadow: 0 22px 70px rgba(64, 46, 30, .10);
}

.product-ended h1 {
  color: var(--accent);
  font-size: clamp(2.4rem, 6vw, 5rem);
}

.product-ended p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .home-ribbon { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header { align-items: flex-start; flex-direction: column; }
  .brand img { height: 64px; }
  nav { justify-content: flex-start; }
  .stats { grid-template-columns: 1fr; }
  .stats div { border-right: 0; border-bottom: 1px solid var(--line); }
  .stats div:last-child { border-bottom: 0; }
  .recipe-hero, .recipe-layout, .about-page {
    grid-template-columns: 1fr;
  }
  .hero { min-height: 520px; align-items: flex-end; }
  .hero-dots { bottom: 18px; }
  .home-ribbon {
    grid-template-columns: 1fr;
    margin-top: 16px;
  }
  .ribbon-card { box-shadow: none; }
  .photo-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ingredients { position: static; }
  .recipe-hero h1 { font-size: clamp(2.1rem, 12vw, 3.5rem); }
  .recipe-hero-img { aspect-ratio: 4 / 3; }
  .ingredients li { grid-template-columns: 1fr; gap: 4px; }
}
