:root {
  --cream: #faf5ec;
  --cream-dark: #f3ead9;
  --ink: #2b2118;
  --muted: #7a6a58;
  --accent: #a63d2f;
  --accent-dark: #86301f;
  --gold: #c98f2d;
  --card: #fffdf8;
  --line: #e7dcc6;
  --qty-bg: #fbeed3;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- film grain (adapted from forever-ai-components backgrounds/04) ---------- */
.grain {
  position: fixed;
  inset: -10%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  animation: grain-jitter 0.9s steps(4, end) infinite;
}
.grain svg { width: 100%; height: 100%; }
@keyframes grain-jitter {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1.5%); }
  50% { transform: translate(1.5%, -2%); }
  75% { transform: translate(-1%, -1%); }
  100% { transform: translate(0, 0); }
}

/* ---------- hero ---------- */
.site-header {
  background:
    radial-gradient(70% 90% at 50% 0%, rgba(201, 143, 45, 0.16), transparent 60%),
    linear-gradient(135deg, #33200f 0%, #5c3a1e 60%, #7a4a24 100%);
  color: #f7ead6;
  padding: 88px 0 0;
  text-align: center;
  border-bottom: 4px solid var(--gold);
  overflow: hidden;
  position: relative;
}

.site-header .wrap { position: relative; }

.site-header h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  margin: 0 0 16px;
  letter-spacing: 0.5px;
  line-height: 1.08;
}

/* stagger-rise entrance (adapted from forever-ai-components text-effects/02) */
.stg-word { display: inline-block; overflow: hidden; padding: 0.1em 0 0.06em; vertical-align: bottom; }
.stg-ch {
  display: inline-block;
  will-change: transform, opacity;
  transform: translateY(115%);
  opacity: 0;
  animation: stg-rise 0.9s var(--ease-out) both;
  animation-delay: calc(var(--i) * 0.04s);
}
@keyframes stg-rise {
  to { transform: translateY(0); opacity: 1; }
}

.tagline {
  margin: 0 0 56px;
  color: #e8d3ae;
  font-size: 1.08rem;
  letter-spacing: 0.2px;
}

.lang-toggle {
  position: absolute;
  top: -64px;
  right: 0;
  display: flex;
  gap: 8px;
}

.lang-toggle button {
  background: transparent;
  border: 1px solid rgba(247, 234, 214, 0.45);
  color: #f7ead6;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.lang-toggle button:hover { border-color: #f7ead6; }

.lang-toggle button.active { background: #f7ead6; color: #3a2415; border-color: #f7ead6; }

/* ---------- marquee divider (adapted from forever-ai-components kinetic-type/06) ---------- */
.ticker {
  border-top: 1px solid rgba(247, 234, 214, 0.22);
  overflow: hidden;
  white-space: nowrap;
  padding: 18px 0;
  background: rgba(0, 0, 0, 0.14);
}
.ticker-track {
  display: inline-block;
  will-change: transform;
  animation: ticker-scroll 36s linear infinite;
}
.ticker-track span {
  display: inline-block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #efdfbe;
  padding: 0 0.5em;
}
.ticker-track .sep { color: var(--gold); font-style: normal; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

main { padding: 60px 0 96px; }

/* ---------- home cards (zoom adapted from forever-ai-components cards/10) ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 36px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
  display: flex;
  flex-direction: column;
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 40px rgba(60, 40, 20, 0.16);
}

.card-media { position: relative; overflow: hidden; }

.card-media img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.6s var(--ease-out);
}

.card:hover .card-media img { transform: scale(1.07); }

.card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(43, 33, 24, 0.38), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card:hover .card-media::after { opacity: 1; }

.card-num {
  position: absolute;
  top: 14px;
  left: 16px;
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: #fffdf8;
  background: rgba(43, 33, 24, 0.55);
  backdrop-filter: blur(4px);
  border-radius: 999px;
  padding: 4px 14px;
  letter-spacing: 0.08em;
  z-index: 2;
}

.card-body { padding: 28px 28px 32px; }

.card-body h2 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin: 0 0 8px;
  line-height: 1.35;
}

.card-tr {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 18px;
  font-style: italic;
  line-height: 1.6;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  transform: translateY(4px);
  transition: transform 0.4s var(--ease-out);
}

.card:hover .card-meta { transform: translateY(0); }

/* ---------- recipe detail ---------- */
.back {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 0.95rem;
  cursor: pointer;
  color: var(--ink);
  background: var(--card);
  margin-bottom: 34px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.back:hover { border-color: var(--accent); color: var(--accent); }

.recipe-hero {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 40px;
  max-height: 440px;
  box-shadow: 0 16px 44px rgba(60, 40, 20, 0.12);
}

.recipe-hero img { width: 100%; height: 100%; max-height: 440px; object-fit: cover; display: block; }

.recipe-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
  margin: 0 0 12px;
}

.recipe h2 {
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4.5vw, 2.8rem);
  margin: 0 0 10px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.recipe-tr { color: var(--muted); font-style: italic; margin: 0 0 20px; font-size: 1.08rem; }

.recipe-meta { color: var(--muted); font-size: 0.95rem; margin: 0 0 34px; }

.servings-bar {
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 26px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  box-shadow: 0 6px 20px rgba(60, 40, 20, 0.06);
}

.servings-bar .label {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-dark);
}

.stepper { display: flex; align-items: center; gap: 14px; }

.stepper button {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.stepper button:hover:not(:disabled) { background: var(--accent); color: #fff; transform: scale(1.06); }

.stepper button:disabled { opacity: 0.35; cursor: default; }

.stepper strong { font-size: 1.3rem; min-width: 96px; text-align: center; font-variant-numeric: tabular-nums; }

.scale-note { font-size: 0.85rem; color: var(--muted); font-style: italic; }

.cols { display: grid; grid-template-columns: 340px 1fr; gap: 40px; margin-bottom: 48px; align-items: start; }

@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

.ingredients, .steps, .video-block, .notes {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px 32px;
}

.ingredients { position: sticky; top: 24px; }

@media (max-width: 820px) { .ingredients { position: static; } }

.ingredients h3, .steps h3, .video-block h3, .notes h3 {
  font-family: var(--serif);
  margin: 0 0 22px;
  font-size: 1.3rem;
  color: var(--accent-dark);
  letter-spacing: 0.01em;
}

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

.ingredients li {
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.98rem;
  line-height: 1.7;
}

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

.amt {
  display: inline-block;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--qty-bg);
  border-radius: 6px;
  padding: 2px 9px;
  margin-right: 9px;
  white-space: nowrap;
}

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

.steps li {
  counter-increment: step;
  margin-bottom: 24px;
  font-size: 1.02rem;
  line-height: 1.8;
  position: relative;
  padding-left: 52px;
}

.steps li:last-child { margin-bottom: 0; }

.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--gold);
  font-weight: 700;
}

.qty {
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--qty-bg);
  border-radius: 6px;
  padding: 2px 8px;
  white-space: nowrap;
}

.video-block { margin-bottom: 44px; }

.video-block video { width: 100%; border-radius: 10px; display: block; background: #000; }

.video-soon {
  border: 2px dashed var(--line);
  border-radius: 10px;
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 0.98rem;
}

.notes ul { margin: 0; padding-left: 20px; font-size: 0.95rem; color: #4d4136; }
.notes li { margin-bottom: 14px; line-height: 1.75; }
.notes li:last-child { margin-bottom: 0; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 52px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

.site-footer p { margin: 0; line-height: 1.8; }

/* ---------- reduced motion (contract from all four components) ---------- */
@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  .stg-ch { animation: none; transform: translateY(0); opacity: 1; }
  .ticker-track { animation: none; }
  .card, .card-media img, .card-meta { transition-duration: 0.001ms; }
}
