/* ===== Tokens ===================================================== */
/* Palette + type extracted directly from the Grocery Fresh Chef logo. */
:root {
  --ink: #1A375E;         /* cart outline / "CHEF" wordmark / body copy */
  --slate: #57667A;       /* secondary text */
  --green: #3E9562;       /* "GROCERY" / "FRESH" wordmark green */
  --green-deep: #257A3A;  /* chef-hat / leaf green — stamps, checks */
  --green-tint: #E7F1E6;  /* pale green — badge pills, highlight column */
  --tomato: #E04133;      /* tomato red — sale tags, stamp */
  --lemon: #F5CE17;       /* lemon — small accent dots only, not text */
  --carrot: #F17E25;      /* carrot — small accent dots only, not text */
  --bg: #F7F9F3;          /* page background — matches the logo's own background */
  --paper: #FFFFFF;       /* card / raised-surface background */
  --line: rgba(26, 55, 94, 0.12);

  --display: 'Baloo 2', 'Nunito Sans', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
  --sans: 'Nunito Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  --shadow-card: 0 18px 40px -18px rgba(26, 55, 94, 0.28);
  --wrap: 1120px;
}

/* ===== Reset / base ================================================ */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--slate); }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-size: 2.1rem; }
.section-head p { font-size: 1.02rem; }

/* Scroll reveal (JS adds .in) */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.in { opacity: 1; transform: none; }

/* ===== Buttons ====================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--green-deep); color: #FFFFFF; }
.btn-primary:hover { background: #1E652F; }

.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--ink);
  padding: 0.6em 1.25em;
  font-size: 0.9rem;
}
.btn-ghost:hover { border-color: var(--ink); }

.btn-text {
  background: none;
  padding: 0.85em 0.25em;
  color: var(--ink);
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  font-weight: 700;
}
.btn-text:hover { border-color: var(--ink); }

/* ===== Badge pill (Blue Apron-style "no subscription") ============= */
.badge-pill {
  display: inline-block;
  background: var(--green-tint);
  color: var(--green-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.5em 1.1em;
  border-radius: 999px;
  margin-bottom: 1.25em;
}

/* ===== Top bar ====================================================== */
.topbar { padding: 20px 0; }
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo-icon { height: 40px; width: auto; display: block; }
.wordmark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
.wordmark .w-grocery { color: var(--green); font-weight: 600; }
.wordmark .w-fresh { color: var(--green); font-weight: 800; }
.wordmark .w-chef { color: var(--ink); font-weight: 700; }

.topnav { display: flex; gap: 28px; }
.topnav a {
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
.topnav a:hover { border-color: var(--green); }

/* Social icons in the top banner */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
.socials {
  display: flex;
  align-items: center;
  gap: 14px;
}
.socials a {
  display: inline-flex;
  color: var(--slate);
  transition: color 0.15s ease, transform 0.15s ease;
}
.socials a:hover {
  color: var(--green-deep);
  transform: translateY(-1px);
}
.socials svg {
  width: 18px;
  height: 18px;
  display: block;
}

/* ===== Photo figures (real photo covers gradient placeholder) ====== */
.photo {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(120% 90% at 20% 15%, rgba(245, 206, 23, 0.35), transparent 55%),
    radial-gradient(110% 100% at 85% 90%, rgba(241, 126, 37, 0.30), transparent 60%),
    linear-gradient(155deg, #E9F2E4, #CBE3CE);
}
.photo::before {
  content: attr(data-dish);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3.2rem;
  opacity: 0.9;
}
.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.photo figcaption {
  position: absolute;
  left: 12px;
  bottom: 10px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.35em 0.8em;
  border-radius: 999px;
}

/* ===== Hero ========================================================= */
.hero { padding: 40px 0 110px; position: relative; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.6rem, 4.4vw, 3.9rem);
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.hero-copy h1 em { font-style: normal; color: var(--tomato); }

.lede { font-size: 1.15rem; max-width: 48ch; margin-bottom: 1.75em; }

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5em;
  flex-wrap: wrap;
  margin-bottom: 1.5em;
}

.fine-print { font-size: 0.85rem; color: var(--slate); opacity: 0.9; }

/* ===== Store-check widget (hero) — pre-signup zip availability check */
.store-check {
  margin-top: 1.5em;
  padding: 1.1em 1.25em;
  background: var(--green-tint);
  border-radius: 14px;
  max-width: 420px;
}

.store-check-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 0.6em;
}

.store-check-row {
  display: flex;
  gap: 0.6em;
  flex-wrap: wrap;
}

.store-check-input {
  flex: 1 1 140px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 0.95rem;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0.65em 0.9em;
}

.store-check-input:focus {
  outline: none;
  border-color: var(--green);
}

.store-check-btn {
  flex-shrink: 0;
}

.store-check-result {
  margin: 0.75em 0 0;
  font-size: 0.88rem;
  font-weight: 700;
  min-height: 1.2em;
}

.store-check-result-success { color: var(--green-deep); }
.store-check-result-error { color: var(--tomato); }

.store-check-cta-link {
  color: var(--green-deep);
  text-decoration: underline;
  font-weight: 800;
}
.store-check-cta-link:hover { color: var(--ink); }

@media (max-width: 640px) {
  .store-check { max-width: none; }
}


/* ===== Mascot + receipt — the signature composition ================= */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.meet-gfc {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-deep);
  text-align: center;
  margin: 0 0 18px;
}

.gfc-mascot {
  position: relative;
  width: 92%;
  max-width: 440px;
  aspect-ratio: 4 / 3;
  margin: 0 0 -36px;   /* pulls the receipt up to slightly overlap */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background:
    radial-gradient(120% 90% at 20% 15%, rgba(245, 206, 23, 0.35), transparent 55%),
    radial-gradient(110% 100% at 85% 90%, rgba(241, 126, 37, 0.30), transparent 60%),
    linear-gradient(155deg, #E9F2E4, #CBE3CE);
}
.gfc-mascot::before {
  content: attr(data-dish);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 5rem;
  opacity: 0.9;
}
.gfc-mascot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ===== Receipt (signature element) ================================= */
.receipt {
  position: relative;
  width: 68%;
  min-width: 300px;
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(6px) saturate(1.1);
  backdrop-filter: blur(6px) saturate(1.1);
  padding: 26px 24px 34px;
  border-radius: 4px;
  /* drop-shadow (not box-shadow): applied after the mask, so the shadow
     survives the zigzag cut and traces the torn edge. */
  filter: drop-shadow(0 20px 26px rgba(26, 55, 94, 0.28));
  transform: rotate(1.4deg);
  font-family: var(--mono);
  z-index: 2;
  /* Torn-paper bottom edge cut out of the receipt itself (works over
     photos — the old ::after painted solid page-color triangles, which
     showed as an opaque strip once anything sat behind the receipt). */
  --zz: 22px; /* tooth width */
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zz) 100%;
  mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / var(--zz) 100%;
}

/* Fallback for browsers without mask support: plain straight edge */
@supports not (mask: conic-gradient(#000, #000)) {
  .receipt { padding-bottom: 28px; }
}

.receipt-head { text-align: center; margin-bottom: 14px; }
.receipt-store { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.06em; margin: 0; }
.receipt-meta { font-size: 0.66rem; color: var(--slate); letter-spacing: 0.04em; margin: 4px 0 0; }

.receipt-lines {
  list-style: none;
  margin: 0 0 14px;
  padding: 14px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}
.receipt-lines li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.78rem;
  padding: 6px 0;
  opacity: 0;
  transform: translateY(6px);
}
.receipt.in-view .receipt-lines li { animation: line-in 0.5s ease forwards; }
.receipt.in-view .receipt-lines li:nth-child(1) { animation-delay: 0.15s; }
.receipt.in-view .receipt-lines li:nth-child(2) { animation-delay: 0.38s; }
.receipt.in-view .receipt-lines li:nth-child(3) { animation-delay: 0.61s; }
.receipt.in-view .receipt-lines li:nth-child(4) { animation-delay: 0.84s; }
.receipt.in-view .receipt-lines li:nth-child(5) { animation-delay: 1.07s; }
.receipt.in-view .receipt-lines li:nth-child(6) { animation-delay: 1.30s; }
.receipt.in-view .receipt-lines li:nth-child(7) { animation-delay: 1.53s; }

@keyframes line-in { to { opacity: 1; transform: translateY(0); } }

.receipt-lines .tag {
  color: var(--tomato);
  font-weight: 600;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
}
.receipt-lines .dim { color: var(--slate); font-size: 0.66rem; opacity: 0.7; }

.receipt-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.8rem; }
.receipt-total .amount { font-size: 1.3rem; font-weight: 600; color: var(--tomato); }

.receipt-stamp {
  position: absolute;
  top: 42%;
  right: 20px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: 0.06em;
  color: var(--tomato);
  border: 3px solid var(--tomato);
  border-radius: 8px;
  padding: 2px 10px;
  opacity: 0;
  transform: rotate(-9deg) scale(1.4);
  mix-blend-mode: multiply;
}
.receipt.in-view .receipt-stamp {
  animation: stamp-in 0.4s cubic-bezier(.2,.9,.3,1.3) 1.85s forwards;
}
@keyframes stamp-in { to { opacity: 0.9; transform: rotate(-9deg) scale(1); } }

/* ===== Chain strip ================================================== */
.chains {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  padding: 18px 0;
}
.chains-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.chains-label {
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--green-deep);
  white-space: nowrap;
}
.chain-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin: 0;
  padding: 0;
}
.chain-list li {
  font-family: var(--display);
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--slate);
}

/* ===== Meal showcase ================================================ */
.meals { padding: 88px 0 72px; }

.meal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.meal-card {
  background: var(--paper);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px -16px rgba(26, 55, 94, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.meal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}
.meal-card .photo {
  border-radius: 0;
  aspect-ratio: 4 / 3;
}
.meal-info { padding: 16px 18px 18px; }
.meal-info h3 {
  font-size: 1.08rem;
  margin-bottom: 0.35em;
}
.meal-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}
.sale-flag {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--tomato);
  border: 1.5px solid var(--tomato);
  border-radius: 4px;
  padding: 1px 7px;
}
.pantry-flag {
  font-family: var(--mono);
  font-size: 0.66rem;
  color: var(--slate);
}
.meal-price .price {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
}
.meal-price .price small {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--slate);
}
.meals-note {
  margin-top: 20px;
  font-size: 0.82rem;
  opacity: 0.85;
}

/* ===== How it works ================================================= */
.how { padding: 24px 0 88px; }
.how h2 { font-size: 2.1rem; margin-bottom: 0.9em; }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.steps li { border-top: 1px solid var(--line); padding-top: 18px; }
.steps .num {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 0.75em;
}
.steps .num-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.steps li:nth-child(1) .num-dot { background: var(--green-deep); }
.steps li:nth-child(2) .num-dot { background: var(--tomato); }
.steps li:nth-child(3) .num-dot { background: var(--carrot); }
.steps li:nth-child(4) .num-dot { background: var(--lemon); }
.steps h3 { font-size: 1.2rem; margin-bottom: 0.4em; }
.steps p { font-size: 0.92rem; }

/* ===== Versus meal kits ============================================= */
.versus { padding: 0 0 96px; }

.versus-table {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--paper);
}
/* Subtle "not this" slash across the meal-kit column.
   Column geometry: grid is 0.7fr / 1fr / 1.3fr (total 3fr), so the middle
   column spans 23.333% → 56.667% of the table width. */
.versus-table::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 23.333%;
  width: 33.334%;
  pointer-events: none;
  z-index: 1;
  background: linear-gradient(
    to top right,
    transparent calc(50% - 1px),
    rgba(224, 65, 51, 0.38) calc(50% - 1px),
    rgba(224, 65, 51, 0.38) calc(50% + 1px),
    transparent calc(50% + 1px)
  );
}
.vs-row {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1.3fr;
  border-top: 1px solid var(--line);
}
.vs-row:first-child { border-top: none; }
.vs-row > span {
  padding: 16px 20px;
  font-size: 0.92rem;
  color: var(--slate);
}
.vs-row > span[role="rowheader"] {
  font-weight: 800;
  color: var(--ink);
  font-size: 0.85rem;
}
.vs-head > span {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--ink);
  padding-top: 18px;
  padding-bottom: 12px;
}
.vs-us { background: var(--green-tint); }
/* Mute the column being crossed out, just a touch */
.vs-row > span[role="cell"]:not(.vs-us) { opacity: 0.72; }
.vs-head > span:not(.vs-us):not(.vs-blank) { opacity: 0.72; }
.vs-head .vs-us { color: var(--green-deep); }
.vs-row .vs-us b { color: var(--green-deep); }

/* ===== Features ====================================================== */
.features { padding: 0 0 96px; }
.features h2 { font-size: 2.1rem; margin-bottom: 0.9em; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.feature-grid article { background: var(--paper); padding: 32px; }
.feature-grid h3 { font-size: 1.1rem; font-family: var(--sans); font-weight: 800; margin-bottom: 0.5em; }
.feature-grid p { font-size: 0.92rem; margin: 0; }

/* ===== Pricing ======================================================= */
.pricing { padding: 72px 0 112px; }
.pricing-inner { text-align: center; max-width: 640px; }
.pricing h2 { font-size: 2.3rem; }
.pricing p { font-size: 1.05rem; margin-bottom: 1.5em; }
.pricing .fine-print { margin-top: 1.5em; margin-bottom: 0; }

/* ===== Footer ======================================================== */
.footer { padding: 32px 0 48px; border-top: 1px solid var(--line); }
.footer-inner {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--slate);
}
.footer-inner a { text-decoration: underline; text-underline-offset: 3px; }

/* ===== Responsive ==================================================== */
@media (max-width: 960px) {
  .topnav { display: none; }
}
@media (max-width: 560px) {
  .socials { display: none; } /* topbar gets tight — brand + CTA win */
}
@media (max-width: 880px) {
  .hero { padding-bottom: 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { max-width: 460px; margin: 0 auto; width: 100%; }
  .meal-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: 1fr; }
  .vs-row { grid-template-columns: 1fr; }
  .versus-table::before { display: none; } /* stacked layout — no columns to slash */
  .vs-row > span[role="rowheader"] { padding-bottom: 0; }
  .vs-head { display: none; }
  .vs-row > span[role="cell"]:not(.vs-us)::before { content: "Meal-kit boxes: "; font-weight: 800; }
  .vs-row > .vs-us::before { content: "Grocery Fresh Chef: "; font-weight: 800; color: var(--green-deep); }
}
@media (max-width: 520px) {
  .meal-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .footer-inner { flex-direction: column; gap: 8px; }
  .gfc-mascot { width: 96%; }
  .receipt { width: 82%; }
}
