/* Fame. Mobile-first. Green ink on a yellow page. */

/* Cormorant Garamond, latin subset only, self-hosted. Display use only. */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/cg-italic-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cg-italic-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/cg-normal-600.woff2') format('woff2');
}

:root {
  --green:     #05391b;
  --green-700: #0a5228;
  --green-500: #2f6b45;
  --yellow:    #fffacc;
  --surface:   #fffef6;
  --line:      #e8dfa8;
  --line-card: #efe7bd;
  --muted:     #57684f;
  --on-green:  #fffacc;
  --on-green-2:#bfd6bd;
  --tint:      rgba(5, 57, 27, .06);

  --r-card: 26px;
  --r-img:  18px;
  --r-sm:   16px;
  --pill:   999px;
  --bar-h:  78px;

  --display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #f2ecc4;
  color: var(--green);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  background: var(--yellow);
  position: relative;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.view { display: none; }
.view.active { display: block; }
.pad-bar { padding-bottom: calc(var(--bar-h) + 24px + env(safe-area-inset-bottom)); }
.wrap { padding: 0 16px; }

/* ---------- type ---------- */

.display { font-family: var(--display); }

h1, .rhead-body h1 {
  font-family: var(--display);
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.meta { font-size: 13px; color: var(--muted); }
.meta .star { color: var(--green); font-weight: 650; }

/* ---------- buttons ---------- */

.btn {
  display: block;
  width: 100%;
  min-height: 54px;
  border-radius: var(--pill);
  background: var(--green);
  color: var(--on-green);
  font-size: 16.5px;
  font-weight: 620;
  text-align: center;
  transition: background .12s ease, transform .12s ease;
}
.btn:active { background: var(--green-700); transform: scale(.99); }
.btn[disabled] { background: rgba(5, 57, 27, .22); color: rgba(255, 250, 204, .8); cursor: default; }
.btn-ghost {
  background: none;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 550;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: rgba(87, 104, 79, .35);
  text-underline-offset: 3px;
}

/* Image tile, with a graceful fallback when the file is missing. */
.ph { position: relative; background: linear-gradient(135deg, #eaeed8, #dee5c4); overflow: hidden; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph .ph-label {
  display: none;
  position: absolute; inset: 0;
  align-items: center; justify-content: center;
  padding: 10px; text-align: center;
  font-size: 12px; font-weight: 600; color: #8a9678;
}
.ph.noimg img { display: none; }
.ph.noimg .ph-label { display: flex; }

/* ---------- brand mark, replaces the old hero ---------- */

.brandmark {
  margin: 12px;
  padding: 34px 20px 28px;
  background: var(--green);
  border-radius: 30px;
  text-align: center;
}
.brandmark .wordmark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 52px;
  line-height: 1;
  color: var(--on-green);
  letter-spacing: -.01em;
}
/* ---------- topbar: the whole row is the back control ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 54px;
  padding: 0 16px 0 4px;
  text-align: left;
  background: rgba(255, 250, 204, .93);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar:active { background: rgba(5, 57, 27, .07); }
.back { width: 36px; height: 44px; display: grid; place-items: center; font-size: 25px; line-height: 1; }
.back-label { font-size: 15.5px; font-weight: 600; }

.page-h {
  font-family: var(--display);
  font-style: normal;
  font-weight: 600;
  font-size: 30px;
  margin: 18px 0 2px;
}

/* ---------- home ---------- */

/* The wordmark carries the serif. The headline stays plain so it reads fast. */
.hero-copy { padding: 20px 18px 4px; }
.hero-copy h1 {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: 29px;
  line-height: 1.14;
  letter-spacing: -.025em;
  margin: 0 0 10px;
}
.hero-copy p { margin: 0; color: var(--muted); font-size: 15.5px; }

.notice {
  margin: 20px 16px 4px;
  padding: 11px 16px;
  border: 1px solid rgba(5, 57, 27, .18);
  border-radius: var(--pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  text-align: center;
}

.rlist { padding: 20px 16px 0; display: grid; gap: 16px; }
.rcard {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: var(--r-card);
  padding: 8px;
  transition: transform .12s ease;
}
.rcard:active { transform: scale(.99); }
.rcard .ph { aspect-ratio: 16 / 10; border-radius: var(--r-img); }
.rcard-body { padding: 13px 8px 8px; }
.rcard-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.rcard-body h4 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.05;
  margin: 0;
}
.rcard-from { font-size: 13px; color: var(--muted); white-space: nowrap; flex: 0 0 auto; }
.rcard-from b { font-size: 15px; font-weight: 700; color: var(--green); }
.rcard-body .chips { margin-top: 11px; align-items: center; }
.rate { flex: 0 0 auto; white-space: nowrap; padding-right: 2px; }
.rate .star { font-size: 14px; }

.how { padding: 30px 20px 8px; }
.how ol { margin: 14px 0 0; padding: 0 0 0 18px; }
.how li { margin-bottom: 10px; font-size: 15px; color: var(--muted); }
.how li::marker { color: var(--green); font-weight: 700; }

footer {
  padding: 30px 16px calc(30px + env(safe-area-inset-bottom));
  text-align: center;
  font-family: var(--display);
  font-style: italic;
  font-size: 19px;
  color: rgba(5, 57, 27, .45);
}

/* ---------- menu ---------- */

.rhead { padding: 12px 12px 0; }
.rhead .ph { aspect-ratio: 2 / 1; border-radius: 24px; }
.rhead-body { padding: 16px 6px 6px; }
/* Title and tags share a line, tags wrap under it when the name is long. */
.rhead-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
}
.rhead-body h1 {
  font-style: normal;
  font-weight: 600;
  font-size: 28px;
  line-height: 1.1;
  margin: 0;
}
.rhead-title .chips { margin-top: 0; }
.rhead-body .meta { margin-top: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  font-size: 12px;
  padding: 5px 11px;
  border-radius: var(--pill);
  background: var(--tint);
  color: var(--green);
  font-weight: 600;
}

.tierbar {
  position: sticky;
  top: 54px;
  z-index: 15;
  margin: 14px 12px 0;
  padding: 11px 16px;
  border-radius: var(--pill);
  background: var(--tint);
  font-size: 13px;
  font-weight: 620;
  color: var(--green);
  text-align: center;
}
/* Goal met: the nudge recedes instead of shouting. */
.tierbar.done {
  background: none;
  color: var(--green-500);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 16px 2px;
}

.dishes { padding: 16px 12px 0; display: grid; gap: 12px; }
.dish {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: 24px;
  padding: 14px;
  align-items: stretch;
}
.dish-info { display: flex; flex-direction: column; min-height: 100px; }
.dish h4 { margin: 0 0 4px; font-size: 16px; font-weight: 650; }
.dish .desc { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; line-height: 1.35; }
.dish-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dish .price { font-size: 16.5px; font-weight: 700; line-height: 1.15; }
.dish .price small { font-size: 11px; font-weight: 600; color: var(--muted); display: block; margin-top: 1px; }
/* Photo fills the full card height, so it never floats in whitespace. */
.dish-media { display: flex; }
.dish-media .ph { width: 100%; min-height: 108px; border-radius: var(--r-img); }

.qty {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 0 0 auto;
  background: var(--tint);
  border-radius: var(--pill);
}
.qty button { width: 36px; height: 36px; font-size: 18px; font-weight: 600; display: grid; place-items: center; color: var(--green); border-radius: var(--pill); }
.qty .n { min-width: 14px; text-align: center; font-size: 14.5px; font-weight: 700; }
/* Same footprint as the qty stepper it turns into, so the row never jumps. */
.add {
  flex: 0 0 auto;
  height: 36px;
  padding: 0 20px;
  border-radius: var(--pill);
  background: var(--green);
  color: var(--on-green);
  font-size: 14.5px;
  font-weight: 650;
  display: grid;
  place-items: center;
}
.add:active { background: var(--green-700); }
.qty button:active { background: rgba(5, 57, 27, .1); }

/* ---------- cart ---------- */

.clist {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: 24px;
  padding: 2px 16px;
  margin-top: 14px;
}
.citem {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-card);
}
.citem:last-child { border-bottom: 0; }
.citem .ph { width: 62px; height: 62px; border-radius: var(--r-sm); }
.citem h4 { margin: 0 0 2px; font-size: 15px; font-weight: 640; }
.citem .from { font-size: 12.5px; color: var(--muted); }
.citem .cprice { text-align: right; font-size: 15.5px; font-weight: 680; white-space: nowrap; }
.citem .cqty { font-size: 11.5px; color: var(--muted); font-weight: 550; margin-top: 2px; }
.qty.inline {
  position: static;
  display: inline-flex;
  margin-top: 7px;
  box-shadow: none;
  background: var(--tint);
  border-color: transparent;
}
.qty.inline button { width: 30px; height: 30px; font-size: 16px; }
.qty.inline .n { font-size: 14px; }

.totals { padding: 18px 0 4px; font-size: 15px; }
.totals .row { display: flex; justify-content: space-between; padding: 6px 0; color: var(--muted); }
.totals .row.save { color: var(--green-500); font-weight: 620; }
/* The number carries the emphasis, not the word, so it stops reading as a heading. */
.totals .row.big {
  color: var(--green);
  font-size: 17px;
  font-weight: 650;
  align-items: baseline;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}
.totals .row.big .amt { font-size: 24px; font-weight: 700; letter-spacing: -.01em; }

/* Section label, not a heading. Same treatment as "How it works" on the home screen. */
.sub-h {
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 30px 0 12px;
}

.tierbar.inline-note {
  position: static;
  margin: 26px 0 0;
}
.tierbar.inline-note.at-top { margin: 14px 0 0; }
.days { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.day {
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 20px;
  padding: 14px 16px;
  text-align: left;
  min-height: 66px;
}
.day.sel { border-color: var(--green); background: var(--tint); }
.day b { display: block; font-size: 15px; font-weight: 650; }
.day span { font-size: 12.5px; color: var(--muted); }

/* ---------- sticky cart bar ---------- */

#cartbar {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(120%);
  width: 100%;
  max-width: 480px;
  z-index: 30;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 250, 204, .95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  transition: transform .22s cubic-bezier(.2, .8, .3, 1);
}
#cartbar.show { transform: translateX(-50%) translateY(0); }
#cartbar .btn { display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 18px; gap: 10px; }
#cartbar .cb-n {
  min-width: 26px; height: 26px;
  border-radius: var(--pill);
  background: rgba(255, 250, 204, .2);
  font-size: 13.5px;
  font-weight: 700;
  display: grid; place-items: center;
  padding: 0 7px;
}
#cartbar .cb-t { font-weight: 700; padding-right: 10px; }
#cartbar .hint { text-align: center; font-size: 12.5px; color: var(--muted); padding: 4px 0 9px; font-weight: 550; }

/* ---------- fake door ---------- */

.door { padding: 44px 22px 22px; text-align: center; min-height: 100dvh; display: flex; flex-direction: column; }
.door .mark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  color: rgba(5, 57, 27, .38);
  margin-bottom: 22px;
}
.door h1 { font-size: 36px; line-height: 1.08; margin: 0 0 14px; }
.door p.sub { color: var(--muted); font-size: 15.5px; margin: 0 auto 26px; max-width: 320px; }

.basket-recap {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: 24px;
  padding: 18px;
  text-align: left;
  margin-bottom: 24px;
}
.basket-recap .rl { display: flex; justify-content: space-between; font-size: 14px; padding: 4px 0; }
.basket-recap .rl.tot { font-weight: 700; border-top: 1px solid var(--line); margin-top: 9px; padding-top: 10px; }

form { text-align: left; }
input[type="email"] {
  width: 100%;
  height: 56px;
  padding: 0 22px;
  font-size: 16px; /* below 16px, iOS zooms the page on focus */
  font-family: var(--sans);
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  background: var(--surface);
  color: var(--green);
  margin-bottom: 12px;
}
input[type="email"]::placeholder { color: rgba(87, 104, 79, .65); }
input[type="email"]:focus { outline: none; border-color: var(--green); }
.err { color: #b3261e; font-size: 13px; margin: -6px 0 10px; padding-left: 20px; display: none; font-weight: 550; }
.err.show { display: block; }
.fineprint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; }

/* ---------- survey ---------- */

.survey { padding: 52px 22px calc(30px + env(safe-area-inset-bottom)); }
.survey h1 { font-size: 34px; text-align: center; margin: 0 0 10px; line-height: 1.08; }
.survey p.sub { text-align: center; color: var(--muted); margin: 0 0 34px; font-size: 15px; }
.q { margin-bottom: 28px; }
.q h4 { font-size: 15px; margin: 0 0 12px; font-weight: 640; }
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt {
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 18px;
  min-height: 50px;
  font-size: 15px;
  font-weight: 560;
  color: var(--green);
}
.opt.sel { border-color: var(--green); background: var(--tint); font-weight: 680; }

.thanks { text-align: center; padding: 90px 26px; }
.thanks .mark {
  font-family: var(--display);
  font-style: italic;
  font-weight: 600;
  font-size: 30px;
  color: rgba(5, 57, 27, .38);
  margin-bottom: 20px;
}
.thanks h1 { font-size: 34px; margin: 0 0 12px; }
.thanks p { color: var(--muted); margin: 0; }

/* ---------- consent banner ---------- */

#consent {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  z-index: 60;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
  background: var(--green);
  color: var(--on-green);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -8px 30px rgba(5, 57, 27, .18);
}
#consent[hidden] { display: none; }
#consent p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.45; color: var(--on-green-2); }
#consent a { color: var(--on-green); text-decoration: underline; text-underline-offset: 2px; }
.consent-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.btn-sm { min-height: 46px; font-size: 15px; }
#consent .btn { background: var(--on-green); color: var(--green); }
#consent .btn:active { background: #f2ecb4; }
#consent .btn-out {
  background: none;
  color: var(--on-green);
  box-shadow: inset 0 0 0 1.5px rgba(255, 250, 204, .45);
}
#consent .btn-out:active { background: rgba(255, 250, 204, .12); }

/* Keep the cart bar clear of the banner while it is up. */
#cartbar { bottom: var(--consent-h, 0px); }

.foot-links {
  margin-top: 10px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 12.5px;
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  color: var(--muted);
}
.foot-links a, .linklike {
  color: var(--muted);
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 6px 0;
}

/* ---------- privacy page ---------- */

.doc { padding: 8px 20px calc(48px + env(safe-area-inset-bottom)); }
.doc h1 { font-size: 34px; margin: 22px 0 4px; line-height: 1.1; }
.doc-meta { font-size: 12.5px; color: var(--muted); margin: 0 0 24px; }
.doc h2 {
  font-family: var(--display);
  font-style: normal;
  font-weight: 600;
  font-size: 22px;
  margin: 32px 0 8px;
}
.doc p, .doc li { font-size: 15px; line-height: 1.55; color: #3a4636; }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 7px; }
.doc a { color: var(--green); text-decoration: underline; text-underline-offset: 2px; }
.doc-callout {
  background: var(--surface);
  border: 1px solid var(--line-card);
  border-radius: 20px;
  padding: 16px 18px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--green);
  margin-bottom: 8px;
}
.doc-table { width: 100%; border-collapse: collapse; margin: 12px 0 4px; font-size: 13.5px; }
.doc-table th, .doc-table td { text-align: left; padding: 9px 8px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.doc-table th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.doc-table td { color: #3a4636; }
.doc-foot { margin-top: 40px; }
a.topbar { text-decoration: none; color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
