/* ===== Colours and sizes — change these to restyle the whole site ===== */
:root {
  --bg: #fffaf3;
  --surface: #ffffff;
  --text: #1f2a24;
  --muted: #5b6b62;
  --brand: #2f8f5b;      /* main green */
  --brand-dark: #1f6b42;
  --accent: #f2a93b;     /* warm orange */
  --pink: #e8577e;       /* from the poster */
  --sky: #2aa7c9;        /* from the poster */
  --border: #e6e0d6;
  --shadow: 0 10px 30px rgba(31, 42, 36, 0.08);
  --radius: 14px;
  --max-width: 1080px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141a17;
    --surface: #1d2521;
    --text: #eef3ef;
    --muted: #a7b5ad;
    --brand: #4fbf83;
    --brand-dark: #3a9e69;
    --border: #2d3832;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--brand-dark); }

main, .site-header, .site-footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

h2 { font-size: 1.8rem; margin-top: 0; }
.muted { color: var(--muted); }

/* ===== Header ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.logo {
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
  color: var(--text);
}
.logo span { color: var(--brand); }

.site-nav { display: flex; gap: 20px; }
.site-nav a { text-decoration: none; color: var(--muted); font-weight: 600; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--brand); }

.nav-toggle { display: none; }

@media (max-width: 640px) {
  .nav-toggle {
    display: block;
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 6px 12px;
    color: var(--text);
    font: inherit;
  }
  .site-nav { display: none; width: 100%; flex-direction: column; gap: 8px; }
  .site-nav.open { display: flex; }
}

/* ===== Sections ===== */
section { padding: 48px 0; }

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 80px 16px;
  margin-top: 8px;
  border-radius: 28px;
  /* Soft colour blobs: pink top-left, orange top-right, green at the bottom */
  background:
    radial-gradient(circle at 12% 18%, rgba(232, 87, 126, 0.16), transparent 38%),
    radial-gradient(circle at 88% 22%, rgba(242, 169, 59, 0.22), transparent 40%),
    radial-gradient(circle at 50% 110%, rgba(47, 143, 91, 0.20), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
}
.hero-content { position: relative; z-index: 1; }   /* text sits above the floating food */
.hero h1 { font-size: clamp(2rem, 6vw, 3.5rem); margin: 12px 0; line-height: 1.15; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }

/* Orange underline that "draws" itself under "A brighter tomorrow." */
.highlight {
  color: var(--brand);
  background-image: linear-gradient(rgba(242, 169, 59, 0.45), rgba(242, 169, 59, 0.45));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 0% 0.3em;
  animation: draw-underline 1.2s 0.4s ease-out forwards;
}
@keyframes draw-underline { to { background-size: 100% 0.3em; } }

.sdg-badge {
  display: inline-block;
  background: var(--accent);
  color: #1f1a10;
  padding: 4px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  animation: pop-in 0.6s ease-out both;
}
@keyframes pop-in {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* Floating food */
.floaters { position: absolute; inset: 0; pointer-events: none; }
.float {
  position: absolute;
  font-size: 2.6rem;
  animation: bob 6s ease-in-out infinite;
}
.f1 { top: 10%; left: 6%;  animation-delay: 0s; }
.f2 { top: 14%; right: 7%; animation-delay: -1.5s; }
.f3 { bottom: 14%; left: 10%; animation-delay: -3s; }
.f4 { bottom: 12%; right: 10%; animation-delay: -4.5s; }
.f5 { top: 48%; left: 2%;  animation-delay: -2s; font-size: 2rem; }
.f6 { top: 50%; right: 3%; animation-delay: -5s; font-size: 2rem; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50%      { transform: translateY(-16px) rotate(6deg); }
}

/* On phones: smaller food, and hide the two middle ones so they don't cover the text */
@media (max-width: 640px) {
  .hero { padding: 76px 12px; }
  .float { font-size: 1.7rem; }
  .f1 { top: 14px; left: 14px; }
  .f2 { top: 14px; right: 14px; }
  .f3 { bottom: 14px; left: 14px; }
  .f4 { bottom: 14px; right: 14px; }
  .f5, .f6 { display: none; }
}

/* ===== Buttons ===== */
.button {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 26px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(47, 143, 91, 0.3);
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.button:hover {
  background: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(47, 143, 91, 0.35);
}
.button .arrow { display: inline-block; transition: transform 0.2s; }
.button:hover .arrow { transform: translateX(4px); }

/* ===== Why it matters cards ===== */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top-width: 6px;
  border-radius: var(--radius);
  padding: 20px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card-problem  { border-top-color: var(--pink); }
.card-solution { border-top-color: var(--accent); }
.card-promise  { border-top-color: var(--brand); }

.card-emoji, .step-emoji {
  display: inline-block;
  font-size: 2.2rem;
  margin: 0 0 4px;
}
.card:hover .card-emoji, .step:hover .step-emoji { animation: wiggle 0.5s ease-in-out; }
@keyframes wiggle {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-12deg); }
  75% { transform: rotate(12deg); }
}

/* ===== How it works ===== */
.how {
  background: rgba(42, 167, 201, 0.13);   /* light sky-blue band */
  border-radius: 28px;
  padding: 48px 20px;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  counter-reset: step;
}
@media (min-width: 760px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 40px; }
  /* Arrow between steps, like the poster */
  .step:not(:last-child)::after {
    content: "➜";
    position: absolute;
    right: -32px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--muted);
  }
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 20px;
  text-align: center;
  counter-increment: step;
  transition: transform 0.25s, box-shadow 0.25s;
}
.step:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.step::before {                 /* the 1, 2, 3 bubble */
  content: counter(step);
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--pink);
  color: #fff;
  font-weight: 800;
  line-height: 30px;
}
.step:nth-child(2)::before { background: var(--accent); }
.step:nth-child(3)::before { background: var(--brand); }
.step h3 { margin: 4px 0; }
.step p:last-child { margin: 0; color: var(--muted); }

/* ===== Who it's for ===== */
.pills {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.pills li {
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  transition: transform 0.2s;
}
.pills li:hover { transform: scale(1.05); }
.pills li:nth-child(1) { background: rgba(232, 87, 126, 0.12); border: 2px solid var(--pink); }
.pills li:nth-child(2) { background: rgba(242, 169, 59, 0.15); border: 2px solid var(--accent); }
.pills li:nth-child(3) { background: rgba(42, 167, 201, 0.12); border: 2px solid var(--sky); }

/* ===== Tonight's food ===== */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0 24px;
}
.filter {
  background: var(--surface);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.filter:hover { border-color: var(--brand); transform: translateY(-1px); }
.filter.active { background: var(--brand); border-color: var(--brand); color: #fff; }

.food-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 600px) { .food-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .food-grid { grid-template-columns: repeat(3, 1fr); } }

.food-card {
  --cat: var(--brand);          /* colour for this card's category */
  --cat-soft: rgba(47, 143, 91, 0.12);
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
  transition: transform 0.25s, box-shadow 0.25s;
}
.food-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.cat-bakery      { --cat: var(--pink);   --cat-soft: rgba(232, 87, 126, 0.12); }
.cat-supermarket { --cat: var(--accent); --cat-soft: rgba(242, 169, 59, 0.16); }
.cat-hawker      { --cat: var(--brand);  --cat-soft: rgba(47, 143, 91, 0.12); }

.food-emoji {
  width: 84px;
  height: 84px;
  margin: 0 0 12px;
  display: grid;
  place-items: center;
  font-size: 2.8rem;
  border-radius: 50%;
  background: var(--cat-soft);
  transition: transform 0.3s;
}
.food-card:hover .food-emoji { transform: scale(1.08) rotate(-6deg); }

.discount {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--pink);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 4px 10px;
  border-radius: 999px;
}

.food-tag {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--cat);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.food-card h3 { margin: 4px 0 2px; font-size: 1.15rem; line-height: 1.3; }
.food-shop { margin: 0 0 12px; color: var(--muted); font-size: 0.95rem; }

.food-price { margin: 0 0 8px; display: flex; align-items: baseline; gap: 10px; }
.price-new { font-size: 1.6rem; font-weight: 800; color: var(--brand); }
.price-old { color: var(--muted); }

.food-meta {
  margin: 0 0 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  font-size: 0.9rem;
  color: var(--muted);
}
.few-left { color: var(--pink); font-weight: 700; }

.food-button { margin-top: auto; width: 100%; }
.food-button:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }

.demo-note { margin-top: 20px; font-size: 0.85rem; color: var(--muted); text-align: center; }

/* Pickup countdown on each food card */
.countdown {
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}
.countdown-soon   { background: rgba(42, 167, 201, 0.12); color: #1d7c96; }
.countdown-now    { background: rgba(232, 87, 126, 0.14); color: #b8355a; animation: pulse 2s ease-in-out infinite; }
.countdown-closed { background: rgba(91, 107, 98, 0.12); color: var(--muted); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(232, 87, 126, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(232, 87, 126, 0); }
}
@media (prefers-color-scheme: dark) {
  .countdown-soon { color: #7fd3ea; }
  .countdown-now  { color: #ff9bb6; }
}

.my-count {
  margin: 0 0 10px;
  font-weight: 700;
  color: var(--brand);
  font-size: 0.95rem;
}
.food-card.sold-out .food-emoji,
.food-card.sold-out h3,
.food-card.sold-out .food-price { opacity: 0.45; }
.food-card.sold-out .discount { background: var(--muted); }

/* ===== Your impact ===== */
.impact {
  background:
    radial-gradient(circle at 90% 10%, rgba(242, 169, 59, 0.18), transparent 40%),
    radial-gradient(circle at 5% 90%, rgba(232, 87, 126, 0.12), transparent 40%),
    rgba(47, 143, 91, 0.08);
  border-radius: 28px;
  padding: 48px 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 24px 0;
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 12px;
  text-align: center;
  transition: transform 0.25s, box-shadow 0.25s;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat p { margin: 0; }
.stat-emoji { font-size: 1.8rem; }
.stat-number {
  font-size: clamp(1.5rem, 5vw, 2.2rem);
  font-weight: 800;
  color: var(--brand);
  font-variant-numeric: tabular-nums;   /* digits stay the same width while counting */
}
.stat:nth-child(2) .stat-number { color: var(--accent); }
.stat:nth-child(3) .stat-number { color: var(--sky); }
.stat:nth-child(4) .stat-number { color: var(--pink); }
.stat-label { color: var(--muted); font-size: 0.9rem; line-height: 1.3; }

.meal-progress {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 20px;
}
.meal-progress p { margin: 0; }
.meal-text { font-weight: 700; }
.progress-bar {
  height: 16px;
  margin: 12px 0;
  background: rgba(47, 143, 91, 0.12);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--pink), var(--brand));
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
  transition: width 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);   /* little overshoot */
}
@keyframes shimmer {
  from { background-position: 0% 0; }
  to   { background-position: 200% 0; }
}
.meal-count { color: var(--muted); }
.meal-count strong { color: var(--brand); font-size: 1.1rem; }

/* Emoji burst when a free meal is earned */
.confetti {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 60;
  font-size: 1.8rem;
  pointer-events: none;
  animation: burst 1.2s ease-out forwards;
}
@keyframes burst {
  from { transform: translate(-50%, -50%) scale(0.4); opacity: 1; }
  to   { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1.2) rotate(30deg); opacity: 0; }
}

.basket-food-saved strong { color: var(--brand); }

/* ===== Leftover Chef ===== */
.chef-intro {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.chef-intro h2 { margin: 0; }
.chef-intro p { margin: 4px 0 0; }
.chef-hat {
  margin: 0;
  font-size: 3.2rem;
  animation: bob 4s ease-in-out infinite;
}

.chef-box {
  background:
    radial-gradient(circle at 100% 0%, rgba(242, 169, 59, 0.2), transparent 45%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.chef-step { margin: 0 0 10px; font-weight: 700; }

.chef-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chef-pick {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.chef-pick:hover { transform: translateY(-1px); border-color: var(--accent); }
.chef-pick.picked {
  background: rgba(242, 169, 59, 0.2);
  border-color: var(--accent);
  font-weight: 700;
}
.chef-pick.picked::after { content: " ✓"; color: var(--brand); }

.chef-cook { background: var(--accent); color: #1f1a10; box-shadow: 0 6px 16px rgba(242, 169, 59, 0.35); }
.chef-cook:hover { background: #e0962a; box-shadow: 0 10px 22px rgba(242, 169, 59, 0.4); }

.chef-results:not(:empty) { margin-top: 20px; }
.chef-loading { font-weight: 700; color: var(--muted); }
.pan { display: inline-block; font-size: 1.6rem; animation: wiggle 0.4s ease-in-out infinite; }
.chef-message { font-weight: 700; }
.chef-note { color: var(--muted); font-size: 0.9rem; }

.recipes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) { .recipes { grid-template-columns: repeat(2, 1fr); } }

.recipe {
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 6px solid var(--accent);
  border-radius: 18px;
  padding: 18px;
  animation: pop-in 0.4s ease-out both;
}
.recipe:nth-child(2) { border-left-color: var(--pink); animation-delay: 0.1s; }
.recipe:nth-child(3) { border-left-color: var(--brand); animation-delay: 0.2s; }
.recipe:nth-child(4) { border-left-color: var(--sky); animation-delay: 0.3s; }
.recipe h3 { margin: 2px 0 6px; }
.recipe p { margin: 0 0 8px; }
.recipe-uses { font-size: 1.3rem; }
.recipe-meta { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.recipe-level {
  background: rgba(47, 143, 91, 0.12);
  color: var(--brand);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 2px 10px;
  border-radius: 999px;
}
.recipe-steps { margin: 8px 0 10px; padding-left: 22px; }
.recipe-steps li { margin-bottom: 4px; }
.recipe-saves { color: var(--brand); font-weight: 600; }
.recipe-credit { font-size: 0.8rem; color: var(--muted); }

.chef-prompt { margin-top: 18px; }
.chef-prompt summary { cursor: pointer; font-weight: 600; color: var(--brand-dark); }
.chef-prompt-text {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
}

.chef-safety {
  margin: 16px 0 0;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(232, 87, 126, 0.1);
  font-size: 0.9rem;
}

.basket-chef { display: block; text-align: center; margin: 12px 0 8px; }

/* ===== For shops ===== */
.shops-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 20px;
  align-items: start;
}
@media (min-width: 860px) { .shops-layout { grid-template-columns: 3fr 2fr; } }

.shop-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 6px solid var(--sky);
  border-radius: 24px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .form-row { grid-template-columns: 1fr; } }

.shop-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 600;
  font-size: 0.9rem;
}
.shop-form input,
.shop-form select {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-weight: 400;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.shop-form input:focus,
.shop-form select:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 4px rgba(42, 167, 201, 0.15);
}
.shop-form .button { align-self: flex-start; }
.form-error { margin: 0; color: var(--pink); font-weight: 700; min-height: 1.2em; }
.shop-reset { align-self: flex-start; }

.preview-title { margin: 0 0 8px; font-weight: 700; color: var(--muted); }
.shop-preview .food-card:hover { transform: none; box-shadow: none; }
.shop-benefits {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 8px;
}
.shop-benefits li {
  background: rgba(42, 167, 201, 0.1);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 600;
}

.new-badge {
  display: inline-block;
  margin-left: 6px;
  background: var(--sky);
  color: #fff;
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: middle;
}
.food-card.just-added { animation: glow 1.6s ease-out 2; }
@keyframes glow {
  0%   { box-shadow: 0 0 0 0 rgba(42, 167, 201, 0.6); }
  100% { box-shadow: 0 0 0 18px rgba(42, 167, 201, 0); }
}

/* ===== Basket button (bottom-right) ===== */
.basket-button {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(31, 42, 36, 0.25);
  transition: transform 0.2s, background 0.2s;
}
.basket-button[hidden] { display: none; }
.basket-button:hover { background: var(--brand-dark); transform: translateY(-2px); }
.basket-count {
  background: var(--accent);
  color: #1f1a10;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  padding: 0 6px;
}
.basket-button.bounce { animation: bounce 0.5s ease-out; }
@keyframes bounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}
@media (max-width: 480px) {
  .basket-label { display: none; }   /* phones: just the bag and the number */
}

/* ===== Basket panel (slides in from the right) ===== */
.basket-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(20, 26, 23, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}
.basket-backdrop.open { opacity: 1; visibility: visible; }

.basket {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  width: min(400px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  padding: 20px;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.35s ease, visibility 0.35s;
}
.basket.open { transform: none; visibility: visible; }

.basket-header { display: flex; align-items: center; justify-content: space-between; }
.basket-header h2 { margin: 0; font-size: 1.4rem; }
.basket-close {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
}

.basket-empty { color: var(--muted); display: none; }
.basket.is-empty .basket-empty { display: block; }
.basket.is-empty .basket-summary { display: none; }

.basket-list {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  overflow-y: auto;
  flex: 1;
}
.basket-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
}
.basket-emoji { font-size: 1.8rem; }
.basket-info { flex: 1; min-width: 0; }
.basket-info p, .basket-right p { margin: 0; }
.basket-name { font-weight: 700; line-height: 1.3; }
.basket-where { font-size: 0.85rem; color: var(--muted); }
.basket-right { text-align: right; }
.basket-price { font-weight: 800; color: var(--brand); }

.basket-summary {
  border-top: 2px dashed var(--border);
  padding-top: 12px;
}
.basket-summary p { display: flex; justify-content: space-between; margin: 4px 0; }
.basket-total { font-size: 1.3rem; }
.basket-saved strong { color: var(--pink); }
.basket-summary .basket-tip { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 8px; }

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}
.link-button:hover { color: var(--pink); }

/* ===== Toast (pop-up message at the bottom) ===== */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 50;
  max-width: calc(100% - 32px);
  background: var(--text);
  color: var(--bg);
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.35s ease, opacity 0.35s;
  pointer-events: none;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 640px) {
  .toast { bottom: 84px; border-radius: 16px; text-align: center; }  /* sits above the basket button */
}

/* ===== Explore: big buttons to the other pages (home page) ===== */
.explore-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 760px) { .explore-grid { grid-template-columns: repeat(3, 1fr); } }

.explore-card {
  --tint: rgba(242, 169, 59, 0.16);
  --edge: var(--accent);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 24px 22px;
  border-radius: 24px;
  border: 2px solid var(--edge);
  background: linear-gradient(160deg, var(--tint), transparent 70%), var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
.explore-chef  { --tint: rgba(232, 87, 126, 0.14); --edge: var(--pink); }
.explore-shops { --tint: rgba(42, 167, 201, 0.14); --edge: var(--sky); }
.explore-ai    { --tint: rgba(47, 143, 91, 0.14);  --edge: var(--brand); }

/* 4 buttons: 2 × 2 on tablets, 4 in a row on big screens */
@media (min-width: 600px) { .explore-grid.count-4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .explore-grid.count-4 { grid-template-columns: repeat(4, 1fr); } }
.explore-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.explore-emoji { font-size: 2.6rem; }
.explore-title { font-size: 1.35rem; font-weight: 800; }
.explore-text { color: var(--muted); }
.explore-go {
  position: absolute;
  right: 20px;
  bottom: 18px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--edge);
  transition: transform 0.2s;
}
.explore-card:hover .explore-go { transform: translateX(6px); }
.explore-card:hover .explore-emoji { animation: wiggle 0.5s ease-in-out; }

/* ===== Keep exploring (bottom of every page except Home) ===== */
.keep-exploring {
  margin-top: 24px;
  border-top: 2px dashed var(--border);
  text-align: center;
}
.keep-exploring h2 { margin-bottom: 4px; }
.keep-exploring .muted { margin: 0 0 20px; }
.keep-exploring .explore-grid { text-align: left; }
@media (min-width: 760px) {
  .keep-exploring .explore-grid.count-2 { grid-template-columns: repeat(2, 1fr); max-width: 760px; margin: 0 auto; }
}
.explore-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.explore-actions .button { margin-top: 0; }
.share-button { background: var(--pink); box-shadow: 0 6px 16px rgba(232, 87, 126, 0.3); }
.share-button:hover { background: #d0466c; box-shadow: 0 10px 22px rgba(232, 87, 126, 0.35); }
.banner-share {
  margin-top: 16px;
  background: #fff;
  color: var(--brand-dark);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.banner-share:hover { background: #f3fff8; color: var(--brand-dark); }
.back-home-button { margin-top: 24px; background: var(--surface); color: var(--text); border: 2px solid var(--border); box-shadow: none; }
.back-home-button:hover { background: var(--bg); border-color: var(--brand); color: var(--brand); box-shadow: none; }

.next-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: var(--edge);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  animation: nudge 2.4s ease-in-out infinite;
}
@keyframes nudge {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

/* Pages already seen during this visit */
.seen-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: var(--surface);
  color: var(--brand);
  border: 2px solid var(--brand);
  font-size: 0.8rem;
  font-weight: 800;
  padding: 1px 10px;
  border-radius: 999px;
}
.explore-card.seen { background: var(--surface); border-style: dashed; }
.explore-card.seen .explore-emoji { opacity: 0.75; }
.explore-card.seen:hover .explore-go { transform: rotate(-180deg); }   /* the ↺ spins */

/* "You've seen it all!" gets a little celebration */
.keep-exploring.seen-all h2 { animation: pop-in 0.6s ease-out both; }

/* Small "← Back to home" link at the top of each page */
.back-home {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.back-home:hover { color: var(--brand); border-color: var(--brand); transform: translateX(-3px); }
main > .back-home + section { padding-top: 24px; }

/* ===== Page titles (Tonight's food, Leftover Chef, For shops) ===== */
.page-title {
  font-size: clamp(2rem, 6vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 6px;
}
.page-emoji { display: inline-block; animation: bob 5s ease-in-out infinite; }
.title-orange { color: var(--text); text-decoration: underline 6px rgba(242, 169, 59, 0.55); text-underline-offset: 6px; }
.title-pink   { color: var(--text); text-decoration: underline 6px rgba(232, 87, 126, 0.45); text-underline-offset: 6px; }
.title-sky    { color: var(--text); text-decoration: underline 6px rgba(42, 167, 201, 0.45); text-underline-offset: 6px; }
.chef .page-title { margin: 0; }

.form-success { margin: 0; font-weight: 700; color: var(--brand); }
.form-success:empty, .form-error:empty { display: none; }

/* ===== Soft change between pages, like slides ===== */
main { animation: page-in 0.5s ease-out both; }
@keyframes page-in {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ===== Closing banner ===== */
.banner {
  text-align: center;
  color: #fff;
  border-radius: 28px;
  padding: 36px 16px;
  margin-bottom: 48px;
  /* Green gradient that slowly shifts */
  background: linear-gradient(120deg, #2f8f5b, #3fae74, #2aa7c9, #2f8f5b);
  background-size: 300% 300%;
  animation: shift 12s ease-in-out infinite;
}
@keyframes shift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.banner p {
  margin: 0;
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 800;
  text-transform: uppercase;
}
.globe { display: inline-block; animation: spin-wobble 4s ease-in-out infinite; }
@keyframes spin-wobble {
  0%, 100% { transform: rotate(-10deg); }
  50%      { transform: rotate(10deg); }
}

/* ===== Scroll-in animation =====
   Things with class="reveal" fade and slide up when you scroll to them.
   js/main.js adds the "visible" class. Only hidden when JavaScript is on. */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.js .reveal.visible { opacity: 1; transform: none; }
/* Cards in a row appear one after another */
.cards .reveal:nth-child(2), .steps .reveal:nth-child(2), .pills .reveal:nth-child(2) { transition-delay: 0.12s; }
.cards .reveal:nth-child(3), .steps .reveal:nth-child(3), .pills .reveal:nth-child(3) { transition-delay: 0.24s; }
.food-grid .reveal:nth-child(3n+2) { transition-delay: 0.1s; }
.food-grid .reveal:nth-child(3n+3) { transition-delay: 0.2s; }

/* ===== Interactive feature ===== */
.ai-form { display: flex; flex-direction: column; gap: 8px; max-width: 560px; }
.ai-form input {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.ai-form .button { align-self: flex-start; }

.ai-output:not(:empty) {
  margin-top: 24px;
  background: var(--surface);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 16px 20px;
  white-space: pre-wrap;
}

/* ===== How we use AI page ===== */
.ai-page .ai-intro { padding-bottom: 8px; }
.lead-left { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 8px 0 0; }

.ai-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px 22px;
  margin-bottom: 20px;
}
.ai-block h2 { font-size: 1.4rem; margin-bottom: 12px; }
.ai-block p { margin: 0 0 12px; }
.ai-block p:last-child { margin-bottom: 0; }

.tool-list { display: grid; gap: 12px; margin-bottom: 12px; }
@media (min-width: 760px) { .tool-list { grid-template-columns: 1fr 1fr; } }
.tool {
  background: var(--bg);
  border-left: 5px solid var(--sky);
  border-radius: 14px;
  padding: 14px 16px;
}
.tool:nth-child(2) { border-left-color: var(--accent); }
.tool p { margin: 0; }
.tool-name { font-weight: 800; margin-bottom: 4px !important; }

.check-list, .limit-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.check-list li {
  background: rgba(47, 143, 91, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
}
.limit-list li {
  background: rgba(232, 87, 126, 0.08);
  border-radius: 12px;
  padding: 10px 14px 10px 40px;
  position: relative;
}
.limit-list li::before { content: "⚠️"; position: absolute; left: 12px; }
.limit-list { margin-bottom: 12px; }

.promise-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
@media (min-width: 600px) { .promise-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .promise-grid { grid-template-columns: repeat(3, 1fr); } }
.promise {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  transition: transform 0.2s;
}
.promise:hover { transform: translateY(-3px); }
.promise > span { font-size: 1.6rem; line-height: 1; }
.promise p { margin: 0; }

.ai-block .check-list { margin-top: 12px; }
.human-check {
  background: rgba(47, 143, 91, 0.1);
  border-left: 5px solid var(--brand);
  border-radius: 14px;
  padding: 14px 16px;
}

/* Yellow boxes = parts for Emma to write herself (delete them when done) */
.todo {
  background: #fff6d6;
  color: #5a4500;
  border: 2px dashed #e6b800;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.95rem;
}

/* ===== Text pages ===== */
.prose { max-width: 720px; padding-bottom: 48px; }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  padding-bottom: 32px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===== Respect "reduce motion" =====
   Some people feel sick from moving things, so turn animations off for them. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .highlight { background-size: 100% 0.3em; }
  .js .reveal { opacity: 1; transform: none; }
}
