:root {
  --paper: #f7f6f1;
  --paper-warm: #efeee6;
  --ink: #122417;
  --ink-soft: #46584c;
  --ink-faint: #7d8b81;
  --green: #16a34a;
  --green-deep: #0e7a37;
  --green-soft: #dcf3e4;
  --green-mist: #ecf7f0;
  --line: #dcdad0;
  --danger: #dc2626;
  --radius: 18px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: clip; }

body {
  font-family: "Public Sans", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Grain overlay for warmth */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
  z-index: 999;
}

h1, h2, h3 {
  font-family: "Fraunces", serif;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
}

/* ---------- Nav ---------- */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px clamp(20px, 5vw, 64px);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 50;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-family: "Fraunces", serif;
  font-size: 22px;
  font-weight: 600;
}

.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 1px 4px rgba(18, 36, 23, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  box-shadow: 0 2px 10px rgba(22, 163, 74, 0.25);
}

.btn:hover {
  background: var(--green-deep);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.3);
}

.btn-small { padding: 10px 20px; font-size: 14px; }
.btn-big { padding: 17px 38px; font-size: 17px; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}

.btn-ghost:hover {
  background: var(--green-mist);
  color: var(--green-deep);
  box-shadow: inset 0 0 0 1.5px var(--green);
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vh, 110px) clamp(20px, 6vw, 84px) clamp(60px, 9vh, 120px);
  max-width: 1240px;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-deep);
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(42px, 6vw, 74px);
  margin-bottom: 22px;
}

.hero h1 em {
  font-style: italic;
  color: var(--green);
}

.lede {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 34px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Phone mockup ---------- */
.phone-wrap {
  position: relative;
  display: flex;
  justify-content: center;
}

.blob {
  position: absolute;
  inset: -8% -12%;
  background:
    radial-gradient(42% 46% at 62% 34%, rgba(22, 163, 74, 0.22), transparent 70%),
    radial-gradient(38% 40% at 30% 72%, rgba(22, 163, 74, 0.14), transparent 70%);
  filter: blur(6px);
  z-index: 0;
  animation: drift 9s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(10px, -14px) scale(1.05); }
}

.phone {
  position: relative;
  z-index: 1;
  width: min(310px, 78vw);
  border-radius: 46px;
  background: #0c0f0d;
  padding: 12px;
  box-shadow:
    0 24px 60px -18px rgba(18, 36, 23, 0.42),
    0 4px 16px rgba(18, 36, 23, 0.16);
  transform: rotate(2.5deg);
  transition: transform 0.5s ease;
}

.phone:hover { transform: rotate(0.5deg) translateY(-6px); }

.phone-notch {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  background: #0c0f0d;
  border-radius: 999px;
  z-index: 3;
}

.screen {
  background: #fdfdfb;
  border-radius: 36px;
  padding: 58px 16px 22px;
  position: relative;
  overflow: hidden;
}

.screen-date {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px 12px;
}

.screen-heading { font-size: 21px; font-weight: 800; font-family: "Public Sans", sans-serif; }
.chev { color: #b9c2bc; font-size: 20px; font-weight: 600; }

.scard {
  background: #f4f5f2;
  border: 1px solid #e8eae4;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 9px;
}

.summary-row { display: flex; justify-content: space-between; }
.summary-row .right { text-align: right; }
.big { font-size: 24px; font-weight: 800; }
.small { font-size: 11px; color: var(--ink-faint); }
.tiny { font-size: 10px; color: #a8b2ab; margin-top: 7px; }

.track {
  height: 8px;
  border-radius: 4px;
  background: #e4e6e0;
  margin-top: 12px;
  overflow: hidden;
}

.fill {
  height: 100%;
  width: 65%;
  border-radius: 4px;
  background: var(--green);
  animation: grow 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

@keyframes grow { from { width: 0; } }

.screen-label { font-size: 13px; font-weight: 700; margin: 14px 4px 8px; }

.meal { display: flex; justify-content: space-between; align-items: center; }
.meal-name { font-size: 13.5px; font-weight: 600; }
.meal-meta { font-size: 10px; color: var(--ink-faint); margin-top: 2px; }
.meal-kcal { font-size: 16px; font-weight: 800; color: var(--green); }

.fab {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 28px;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.4);
}

/* ---------- Features ---------- */
.features {
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 110px) clamp(20px, 6vw, 84px);
}

.section-title {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: clamp(30px, 5vh, 54px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 36px);
}

.feature {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature:hover {
  transform: translateY(-6px);
  border-color: var(--green);
  box-shadow: 0 18px 40px -20px rgba(22, 163, 74, 0.35);
}

.feature-num {
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 15px;
  color: var(--green);
  margin-bottom: 14px;
}

.feature h3 { font-size: 24px; margin-bottom: 10px; }
.feature p { color: var(--ink-soft); font-size: 15.5px; }

/* ---------- Quote band ---------- */
.band {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(56px, 10vh, 110px) clamp(20px, 6vw, 84px);
}

.band-inner { max-width: 880px; margin: 0 auto; text-align: center; }

.band-quote {
  font-family: "Fraunces", serif;
  font-size: clamp(26px, 3.6vw, 42px);
  font-weight: 500;
  line-height: 1.25;
  font-style: italic;
}

.band-quote::selection, .band-sub::selection { background: var(--green); }

.band-sub {
  margin-top: 18px;
  color: #a3b5a9;
  font-size: clamp(15px, 1.4vw, 18px);
}

/* ---------- Progress section ---------- */
.progress-sec {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 110px) clamp(20px, 6vw, 84px);
}

.progress-copy p { color: var(--ink-soft); max-width: 50ch; }

.ticks { list-style: none; margin-top: 24px; }

.ticks li {
  padding: 9px 0 9px 34px;
  position: relative;
  font-weight: 500;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-6.5' fill='none' stroke='%230e7a37' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.progress-visual {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 40px);
  box-shadow: 0 20px 50px -30px rgba(18, 36, 23, 0.3);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 220px;
}

.bar {
  flex: 1;
  height: var(--h);
  border-radius: 8px 8px 4px 4px;
  background: var(--green-soft);
  position: relative;
  transform-origin: bottom;
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.reveal.visible .bar { animation-play-state: running; }

.bar:nth-child(1) { animation-delay: 0.05s; }
.bar:nth-child(2) { animation-delay: 0.12s; }
.bar:nth-child(3) { animation-delay: 0.19s; }
.bar:nth-child(4) { animation-delay: 0.26s; }
.bar:nth-child(5) { animation-delay: 0.33s; }
.bar:nth-child(6) { animation-delay: 0.40s; }
.bar:nth-child(7) { animation-delay: 0.47s; }

@keyframes rise { from { transform: scaleY(0); } }

.bar.over { background: #fbdada; }
.bar.today { background: var(--green); }

.chart-labels {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.chart-labels span {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-faint);
}

/* ---------- CTA ---------- */
.cta { padding: clamp(40px, 8vh, 90px) clamp(20px, 6vw, 84px) clamp(70px, 10vh, 120px); }

.cta-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(160deg, var(--green-mist), var(--green-soft));
  border: 1px solid #c9e9d4;
  border-radius: 28px;
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 64px);
}

.cta-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  box-shadow: 0 10px 26px -8px rgba(22, 163, 74, 0.45);
  margin-bottom: 22px;
}

.cta h2 { font-size: clamp(28px, 3.6vw, 42px); margin-bottom: 12px; }

.cta p {
  color: var(--ink-soft);
  margin-bottom: 30px;
  font-size: clamp(15px, 1.5vw, 18px);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(20px, 5vw, 64px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-size: 14px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.visible { opacity: 1; transform: none; }

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob, .fill, .bar { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 40px; }
  /* Keep the glow inside the viewport — off-screen overflow breaks mobile layout */
  .blob { inset: 0; }
  .hero-copy { order: 1; }
  .phone-wrap { order: 2; margin-top: 12px; }
  .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .feature-grid { grid-template-columns: 1fr; }
  .progress-sec { grid-template-columns: 1fr; }
  .phone { transform: rotate(0deg); }
}
