/* ============================================================
   ESSENTIAL MEALS — SITE STYLES
   (No need to edit this file.)
   ============================================================ */

/* ---- Self-hosted fonts (no third-party requests) ---- */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("fonts/caveat-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: optional;
  src: url("fonts/caveat-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20C0;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: optional;
  src: url("fonts/nunito-latin.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 200 1000;
  font-display: optional;
  src: url("fonts/nunito-latin-ext.woff2") format('woff2');
  unicode-range: U+0100-02BA, U+1E00-1E9F, U+2020, U+20A0-20C0;
}

/* ---- Design tokens ---- */
:root {
  --cream: #FBF8F0;
  --sage: #B9D4A2;
  --sage-soft: #EEF2E6;
  --sage-line: #A6C68C;
  --brown: #33291C;
  --brown-soft: #5A4A34;
  --orange: #E8943E;
  --orange-deep: #D97E28;
  --green: #2F5D4E;
  --green-dark: #2A3A1C;
  --green-head: #2A4A20;
  --green-dim: #5F7A4E;
  --tan: #E8C79A;
  --taupe: #C9BBA3;
  --muted: #9C927E;
  --muted-2: #B3A98F;
  --line: #EEE1C9;
  --line-2: #EAE1CC;
  --chip-text: #7A7264;
  --danger: #B3402E;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--cream);
  color: var(--brown);
}
a { color: var(--green); }
a:hover { color: var(--orange); }
img { max-width: 100%; }
button { font-family: inherit; }

.page { max-width: 1060px; margin: 0 auto; }

/* ============================================================
   HEADER (sage, rounded bottom)
   ============================================================ */
.hero {
  background: var(--sage);
  border-radius: 0 0 30px 30px;
  padding: 18px 22px 28px;
}
.hero-inner { max-width: 1060px; margin: 0 auto; }
.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.brand {
  font-size: 15px; font-weight: 900; color: var(--green-head);
  letter-spacing: .2px; text-decoration: none;
}
.brand:hover { color: var(--green-head); }
.brand .brand-script {
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 22px;
  color: var(--orange-deep); margin-right: 6px;
}
.hero-script {
  font-family: 'Caveat', cursive; font-size: clamp(26px, 4vw, 40px);
  color: var(--orange-deep); line-height: .9;
}
.hero-title {
  font-size: clamp(32px, 6vw, 54px); font-weight: 900;
  letter-spacing: -1px; color: var(--green-dark); line-height: 1.02;
  margin: 2px 0 0;
}
.hero-sub {
  font-size: 14px; font-weight: 700; color: var(--green-dim);
  margin-top: 10px; max-width: 560px;
}

/* ---- Step labels ---- */
.step-label {
  font-size: 14px; font-weight: 900; color: var(--brown);
  margin: 0 0 9px;
}
.step-label .hint { font-weight: 700; color: var(--muted); font-size: 12.5px; }

/* ============================================================
   KCAL TIER TILES (in header)
   ============================================================ */
.tier-row { display: flex; gap: 9px; margin-top: 18px; max-width: 460px; }
.tier-btn {
  flex: 1; text-align: center; padding: 12px 0 10px;
  border-radius: 18px; cursor: pointer; border: 2px solid var(--sage-line);
  background: transparent; transition: transform .08s ease;
}
.tier-btn:active { transform: scale(.97); }
.tier-btn .num { display: block; font-size: 21px; font-weight: 900; color: var(--green-head); line-height: 1; }
.tier-btn .lbl { display: block; font-size: 10.5px; font-weight: 800; color: var(--green-dim); margin-top: 2px; }
.tier-btn.selected { background: var(--brown); border-color: var(--brown); }
.tier-btn.selected .num { color: #fff; }
.tier-btn.selected .lbl { color: var(--tan); }

/* ============================================================
   PACKAGE PILLS
   ============================================================ */
.package-block { padding: 20px 22px 4px; }
.package-row { display: flex; gap: 8px; max-width: 560px; }
.pkg-btn {
  flex: 1; text-align: center; padding: 11px 0 9px; border-radius: 16px;
  cursor: pointer; border: 2px solid var(--line);
  background: transparent; transition: transform .08s ease;
}
.pkg-btn:active { transform: scale(.97); }
.pkg-btn .num { display: block; font-size: 20px; font-weight: 900; color: var(--brown); line-height: 1; }
.pkg-btn .lbl { display: block; font-size: 10.5px; font-weight: 800; color: var(--muted-2); margin-top: 2px; }
.pkg-btn.selected {
  background: var(--orange); border-color: var(--orange);
  box-shadow: 0 8px 16px -8px rgba(217, 126, 40, .8);
}
.pkg-btn.selected .num { color: #fff; }
.pkg-btn.selected .lbl { color: #FFF0DC; }

/* ============================================================
   CATEGORY CHIPS
   ============================================================ */
.chips {
  display: flex; gap: 8px; overflow-x: auto; padding: 18px 22px 12px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; cursor: pointer; white-space: nowrap; font-weight: 800;
  font-size: 13.5px; padding: 9px 16px; border-radius: 30px;
  background: #fff; border: 1.5px solid var(--line-2); color: var(--chip-text);
}
.chip.selected { background: var(--green); border-color: var(--green); color: #fff; }

/* ============================================================
   MEAL CARDS
   ============================================================ */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  padding: 4px 20px 40px;
}
@media (min-width: 700px)  { .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } }
@media (min-width: 980px)  { .grid { grid-template-columns: repeat(4, 1fr); } }

.meal-card {
  background: #fff; border-radius: 20px; overflow: hidden; position: relative;
  box-shadow: 0 10px 22px -14px rgba(60, 45, 20, .4);
}
.meal-photo {
  height: 130px; overflow: hidden; background: var(--sage-soft);
}
@media (min-width: 700px) { .meal-photo { height: 150px; } }
.meal-photo img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* + button / stepper, floating over photo corner */
.add-btn {
  position: absolute; top: 0; right: 10px; width: 38px; height: 38px;
  border-radius: 50%; background: var(--orange); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; line-height: 1; cursor: pointer;
  box-shadow: 0 6px 12px -4px rgba(217, 126, 40, .8);
}
.stepper {
  position: absolute; top: 0; right: 10px; display: flex; align-items: center;
  gap: 1px; background: var(--green); border-radius: 22px; padding: 3px;
  box-shadow: 0 6px 14px -4px rgba(47, 93, 78, .65);
}
.qty-anchor { position: relative; height: 0; }
.qty-anchor > .add-btn, .qty-anchor > .stepper { top: -19px; }
.stepper button {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 21px; line-height: 1; cursor: pointer;
}
.stepper .dec { background: rgba(255, 255, 255, .16); }
.stepper .inc { background: var(--orange); }
.stepper .qty {
  min-width: 24px; text-align: center; font-weight: 900; color: #fff;
  font-size: 15px; font-variant-numeric: tabular-nums;
}
.meal-body { padding: 14px 12px 13px; }
.meal-name { font-size: 14.5px; font-weight: 900; color: var(--green); line-height: 1.12; }
.meal-desc { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.meal-price { font-size: 13px; font-weight: 900; color: var(--orange-deep); margin-top: 6px; }

/* ============================================================
   FLOATING TRACKER BAR
   ============================================================ */
.tracker-wrap {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 14px 16px 20px;
  background: linear-gradient(180deg, rgba(251, 248, 240, 0), var(--cream) 34%);
  pointer-events: none;
}
.tracker {
  pointer-events: auto;
  max-width: 640px; margin: 0 auto;
  background: var(--brown); border-radius: 26px; padding: 12px 14px;
  display: flex; align-items: center; gap: 13px;
  box-shadow: 0 18px 34px -14px rgba(50, 35, 15, .75);
}
.ring {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center; padding: 5px;
  background: conic-gradient(var(--orange) 0deg, var(--brown-soft) 0deg);
}
.ring-inner {
  width: 100%; height: 100%; border-radius: 50%; background: var(--brown);
  display: flex; align-items: center; justify-content: center;
}
.ring-inner span {
  font-size: 14px; font-weight: 900; color: #fff; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.tracker-copy { flex: 1; min-width: 0; }
.tracker-headline { font-size: 14.5px; font-weight: 900; color: #fff; line-height: 1.15; }
.tracker-meta { font-size: 12px; color: var(--taupe); font-weight: 700; margin-top: 2px; }
.tracker-btn {
  background: var(--orange); color: #fff; font-weight: 900; font-size: 14.5px;
  padding: 13px 18px; border-radius: 16px; cursor: pointer; flex: none; border: none;
}
.tracker-btn:disabled { background: var(--brown-soft); color: var(--taupe); cursor: default; }
.page-bottom-space { height: 120px; }

/* ============================================================
   SECONDARY PAGES (extras / checkout / thank-you)
   ============================================================ */
.hero-compact { padding-bottom: 22px; }
.back-link {
  display: inline-block; font-weight: 800; font-size: 13.5px;
  color: var(--green-head); text-decoration: none; margin-bottom: 8px;
}
.back-link:hover { color: var(--green-head); text-decoration: underline; }

.section-heading {
  font-size: 15px; font-weight: 900; color: var(--brown);
  margin: 22px 22px 0;
}
.section-heading .script {
  font-family: 'Caveat', cursive; font-weight: 700; font-size: 22px;
  color: var(--orange-deep); margin-right: 6px;
}
.section-note { font-size: 12.5px; color: var(--muted); font-weight: 700; margin: 4px 22px 0; }

/* ---- Forms (checkout) ---- */
.narrow { max-width: 620px; margin: 0 auto; padding: 0 20px 60px; }
.card {
  background: #fff; border-radius: 24px; padding: 24px 22px;
  box-shadow: 0 10px 22px -14px rgba(60, 45, 20, .4); margin-top: 20px;
}
.card h2 { margin: 0 0 6px; font-size: 20px; font-weight: 900; color: var(--green-dark); }
.card .sub { font-size: 13px; color: var(--muted); font-weight: 700; margin: 0 0 18px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 900; color: var(--brown); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--cream);
  font-family: inherit; font-size: 15px; font-weight: 600; color: var(--brown);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sage-line); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 5px; }

.radio-pill {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: 14px; cursor: pointer;
  font-size: 14px; font-weight: 700; margin-bottom: 8px; background: var(--cream);
}
.radio-pill input { margin-top: 3px; accent-color: var(--orange-deep); }
.radio-pill strong { font-weight: 900; }
.radio-pill .pill-hint { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---- Order summary box ---- */
.summary-box {
  background: var(--sage-soft); border-radius: 18px;
  padding: 16px 18px; margin-bottom: 20px;
}
.summary-box .line {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; font-weight: 700; color: var(--green-dark); padding: 3px 0;
}
.summary-box .line.small { font-size: 12.5px; color: var(--green-dim); font-weight: 600; }
.summary-box .line.total {
  border-top: 2px solid var(--sage-line); margin-top: 8px; padding-top: 10px;
  font-size: 16px; font-weight: 900;
}

.submit-btn {
  width: 100%; background: var(--orange); color: #fff; font-weight: 900;
  font-size: 16px; padding: 16px; border-radius: 16px; border: none; cursor: pointer;
  box-shadow: 0 8px 16px -8px rgba(217, 126, 40, .8);
}
.submit-btn:disabled { background: var(--taupe); box-shadow: none; cursor: default; }

.error-banner {
  background: #FBEDE9; border: 2px solid #E8B3A6; color: var(--danger);
  border-radius: 14px; padding: 12px 16px; font-size: 14px; font-weight: 700;
  margin: 16px 0;
}

.secure-note {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 12.5px; color: var(--muted); font-weight: 700;
  text-align: center; margin-top: 14px;
}

/* ---- Thank-you page ---- */
.success-icon {
  width: 64px; height: 64px; border-radius: 50%; background: var(--sage);
  color: var(--green-head); font-size: 32px; font-weight: 900;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 16px;
}

/* ---- Footer ---- */
.site-footer {
  text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted);
  padding: 26p