/* Mealeaf website: clean app-landing layout in Mealeaf colours. */
:root {
  --ink: #2b2523;
  --muted: #6e635b;
  --primary: #a8481f;
  --primary-hover: #8f3c19;
  --cream: #fbf4ec;
  --peach: #fbe7dc;
  --sage: #edf3e6;
  --olive: #4f6b3a;
  --line: #ece4da;
  --white: #ffffff;
  --radius: 28px;
  --shadow: 0 2px 10px rgba(43, 37, 35, 0.12);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 16px/1.6 "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
img { max-width: 100%; }
a { color: var(--primary); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { font-family: Poppins, system-ui, sans-serif; font-weight: 600; color: var(--ink); line-height: 1.25; }
.accent { padding-right: 0.12em; font-family: Caveat, cursive; font-weight: 600; color: var(--primary); font-size: 1.25em; line-height: 1; }

/* Header: white bar with a soft shadow, logo left, MENU right. */
.top { position: sticky; top: 0; z-index: 20; background: var(--white); box-shadow: var(--shadow); }
.top-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; }
.brand img { display: block; height: 38px; width: auto; }
.nav { display: none; gap: 4px; }
.nav a { padding: 10px 14px; border-radius: 999px; text-decoration: none; color: var(--ink); font: 500 15px Poppins, sans-serif; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--primary); }
@media (min-width: 900px) { .nav { display: flex; } .menu-button { display: none !important; } .menu { display: none; } }
.menu-button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px;
  background: none; border: 0; cursor: pointer; color: var(--ink);
  font: 600 16px/1 Poppins, system-ui, sans-serif; letter-spacing: 0.04em;
}
.burger { display: inline-grid; gap: 4px; }
.burger i { display: block; width: 20px; height: 2.5px; border-radius: 2px; background: var(--ink); }
.menu { border-top: 1px solid var(--line); background: var(--white); }
.menu ul { list-style: none; margin: 0 auto; padding: 8px 16px 16px; display: grid; gap: 2px; }
.menu a { display: block; padding: 12px 8px; border-radius: 12px; text-decoration: none; color: var(--ink); font: 500 17px Poppins, sans-serif; }
.menu a:hover, .menu a[aria-current="page"] { background: var(--cream); color: var(--primary); }

/* Sections */
.section { padding: 56px 0; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; } .split.flip > :first-child { order: 2; } }
.lead { font-size: 18px; color: var(--ink); max-width: 460px; }
.hero h1 { font-size: clamp(32px, 5.4vw, 48px); margin: 0 0 20px; }
.section h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 16px; }

/* Store badges (app not live yet: plain labels, not links). */
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.store { display: inline-flex; flex-direction: column; justify-content: center; min-height: 52px; padding: 6px 18px; border-radius: 10px; background: #111; color: #fff; }
.store small { font-size: 11px; opacity: 0.85; line-height: 1.2; }
.store strong { font: 600 19px/1.15 Poppins, sans-serif; }
.soon { margin-top: 10px; color: var(--muted); font-size: 14px; }

/* Phone mockup */
.stage { position: relative; display: flex; justify-content: center; padding: 24px 0; }
.phone {
  position: relative; z-index: 1; width: min(290px, 72vw); aspect-ratio: 540 / 1155;
  border: 10px solid #1d1a19; border-radius: 42px; overflow: hidden; background: #fff;
  box-shadow: 0 24px 48px rgba(43, 37, 35, 0.18);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.float { position: absolute; color: var(--primary); opacity: 0.55; }
.float .icon { width: 100%; height: 100%; }
.float.olive { color: var(--olive); }
.f1 { width: 64px; top: 6%; left: 6%; transform: rotate(-12deg); }
.f2 { width: 52px; top: 16%; right: 8%; transform: rotate(10deg); }
.f3 { width: 58px; bottom: 14%; left: 2%; transform: rotate(8deg); }
.f4 { width: 70px; bottom: 6%; right: 4%; transform: rotate(-8deg); }

/* Soft colour panels with a phone */
.panel { border-radius: var(--radius); padding: 40px 24px; }
.panel.cream { background: var(--cream); }
.panel.sage { background: var(--sage); }
.panel .phone { width: min(250px, 66vw); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--white); box-shadow: var(--shadow); font: 500 14px Poppins, sans-serif; }
.chip .icon { width: 20px; height: 20px; color: var(--primary); }

/* Feature cards */
.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 28px; }
.feature { padding: 24px; border-radius: 22px; background: var(--white); border: 1px solid var(--line); }
.feature .badge { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--peach); color: var(--primary); margin-bottom: 14px; }
.feature .badge .icon { width: 28px; height: 28px; }
.feature h3 { font-size: 18px; margin: 0 0 6px; }
.feature p { margin: 0; color: var(--muted); }
.center { text-align: center; }

/* Band */
.band { background: var(--peach); padding: 48px 0; text-align: center; }
.band h2 { margin: 0 0 8px; font-size: clamp(24px, 3.6vw, 32px); }
.band p { margin: 0 0 22px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px;
  border-radius: 999px; background: var(--primary); color: #fff; text-decoration: none; font: 600 16px Poppins, sans-serif;
}
.button:hover { background: var(--primary-hover); }

/* Text pages (privacy, terms, support, delete account) */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 16px 64px; }
.doc h1 { font-size: clamp(30px, 5vw, 42px); margin: 0 0 8px; }
.doc h2 { font-size: 22px; margin: 36px 0 8px; }
.doc h3 { font-size: 17px; margin: 22px 0 4px; }
.doc .muted { color: var(--muted); }
.box { background: var(--cream); border-radius: 22px; padding: 20px 24px; margin: 24px 0; }
.box h3:first-child { margin-top: 0; }
.toc { columns: 2; column-gap: 28px; padding-left: 18px; }
@media (max-width: 560px) { .toc { columns: 1; } }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-family: Poppins, sans-serif; font-weight: 600; }

/* Hook */
.kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px; background: var(--sage); color: var(--olive); font: 600 14px Poppins, sans-serif; }
.kicker .icon { width: 18px; height: 18px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 8px; }
.ticks li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.ticks li::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 12.5 3.2 3.2L17 9' fill='none' stroke='%234F6B3A' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-top: 28px; }
.button.ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.button.ghost:hover { background: var(--peach); }

/* Why Mealeaf */
.why { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); margin-top: 32px; text-align: left; }
.why .item { padding: 26px; border-radius: 24px; background: var(--cream); }
.why .item:nth-child(2) { background: var(--sage); }
.why .item:nth-child(3) { background: var(--peach); }
.why .item:nth-child(4) { background: #f3eee8; }
.why .num { font: 600 34px/1 Poppins, sans-serif; color: var(--primary); }
.why h3 { margin: 10px 0 6px; font-size: 19px; }
.why p { margin: 0; }

/* Story */
.story { max-width: 760px; margin: 0 auto; }
.story p { font-size: 17px; }
.quote { margin: 32px 0; padding: 28px; border-radius: 24px; background: var(--cream); font: 600 22px/1.4 Poppins, sans-serif; }
.quote .accent { font-size: 1.3em; }
.timeline { list-style: none; padding: 0; margin: 28px 0; display: grid; gap: 14px; }
.timeline li { display: grid; grid-template-columns: 88px 1fr; gap: 16px; align-items: start; }
.timeline .year { font: 600 18px Poppins, sans-serif; color: var(--primary); }

/* Team */
.team { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-top: 36px; }
.member { text-align: center; }
.avatar { display: inline-grid; place-items: center; width: 140px; height: 140px; border-radius: 50%; background: var(--peach); box-shadow: 0 0 0 10px var(--cream); color: var(--primary); font: 600 44px Poppins, sans-serif; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.member h3 { margin: 22px 0 0; font-size: 22px; }
.member .role { display: block; font-family: Caveat, cursive; font-weight: 600; font-size: 24px; color: var(--primary); }
.member .rule { display: block; width: 28px; height: 3px; margin: 12px auto; border-radius: 2px; background: var(--olive); }
.member p { color: var(--muted); max-width: 320px; margin: 0 auto; }
.member.join .avatar { background: var(--sage); color: var(--olive); }

/* Footer: hills illustration, then the green ground with the links */
.foot { margin-top: 24px; font-size: 15px; color: #fff; }
.hills { height: clamp(110px, 16vw, 220px); background: url("assets/footer-hills.svg") center bottom / cover no-repeat; }
.foot-body { background: #4f6b3a; padding: 8px 0 24px; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.foot h2 { font-size: 16px; margin: 0 0 8px; color: #fff; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.foot a { color: #fff; text-decoration: none; opacity: 0.92; }
.foot a:hover { opacity: 1; text-decoration: underline; }
.foot p { color: #e7efdc; margin: 8px 0 0; }
.foot-brand { display: flex; align-items: center; gap: 10px; font: 600 22px Poppins, sans-serif; color: #fff !important; margin: 0 !important; }
.foot-brand img { background: #fbf4ec; border-radius: 12px; padding: 4px; }
.foot-bottom { margin-top: 28px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.2); color: #dfe8d3; font-size: 13px; }
.avatar .icon { width: 64px; height: 64px; }

/* ---------- Motion (all of it off with reduced motion) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }
@keyframes drift { 0%, 100% { translate: 0 0; rotate: 0deg; } 50% { translate: 0 10px; rotate: 6deg; } }
.phone-float { animation: bob 6s ease-in-out infinite; }
.float { animation: drift 7s ease-in-out infinite; }
.float.f2 { animation-delay: -2s; } .float.f3 { animation-delay: -4s; } .float.f4 { animation-delay: -1s; }
.button, .store { transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; }
.button:hover, a.store:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(168, 72, 31, 0.25); }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
  .phone-float, .float { animation: none; }
  .button, .store, .phone img { transition: none !important; }
}

/* Hero phone: stacked screens cross-fading */
.phone[data-rotate] { position: relative; }
.phone[data-rotate] img { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; }
.phone[data-rotate] img.is-active { opacity: 1; }
.trust { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.trust span::before { content: "✓ "; color: var(--olive); font-weight: 700; }

/* 3 steps */
.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); counter-reset: none; }
.steps li { position: relative; padding: 30px 24px 24px; border-radius: 24px; background: var(--white); border: 1px solid var(--line); }
.step-num { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: #fff; font: 600 22px Poppins, sans-serif; box-shadow: 0 8px 18px rgba(168, 72, 31, 0.28); }
.steps h3 { margin: 16px 0 6px; font-size: 19px; }
.steps p { margin: 0; color: var(--muted); }

/* Feature tour */
.tour { display: grid; gap: 32px; align-items: center; margin-top: 28px; }
@media (min-width: 860px) { .tour { grid-template-columns: 1.05fr 1fr; } }
.tour-tabs { display: grid; gap: 10px; }
.tour-tabs [role="tab"] {
  position: relative; overflow: hidden; display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--white); color: var(--ink); cursor: pointer;
  font: inherit; transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.tour-tabs [role="tab"]:hover { transform: translateX(4px); }
.tour-tabs [aria-selected="true"] { background: var(--cream); border-color: var(--peach); }
.tour-tabs strong { display: block; font: 600 17px Poppins, sans-serif; }
.tour-tabs small { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.tour-tabs .badge { flex: none; display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--peach); color: var(--primary); }
.tour-tabs .badge .icon { width: 26px; height: 26px; }
.tour-tabs .bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--primary); }
.tour:not(.is-manual) [aria-selected="true"] .bar { animation: fill 5s linear forwards; }
@keyframes fill { to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .tour-tabs .bar { display: none; } .tour-tabs [role="tab"]:hover { transform: none; } }
.tour-stage { position: relative; display: flex; justify-content: center; padding: 24px 0; }
.tour-stage .phone img { transition: opacity 0.18s ease, transform 0.18s ease; }
.tour-stage .phone img.is-swapping { opacity: 0; transform: scale(0.98); }

/* Mini features */
.mini-features { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-top: 28px; text-align: left; }
.mini { padding: 20px; border-radius: 20px; background: var(--cream); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.mini:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(43, 37, 35, 0.08); }
.mini .badge { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--white); color: var(--primary); }
.mini .badge .icon { width: 24px; height: 24px; }
.mini h3 { margin: 12px 0 4px; font-size: 16px; }
.mini p { margin: 0; color: var(--muted); font-size: 14.5px; }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font: 600 17px Poppins, sans-serif; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 24px; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* Sticky download bar (phones only) */
.sticky-cta {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 20px; background: var(--white); box-shadow: 0 10px 30px rgba(43, 37, 35, 0.2);
  animation: rise 0.35s ease-out;
}
.sticky-cta[hidden] { display: none; }
.sticky-cta span { flex: 1; min-width: 0; }
.sticky-cta strong { display: block; font: 600 15px Poppins, sans-serif; }
.sticky-cta small { display: block; color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-cta .button { min-height: 44px; padding: 0 18px; font-size: 15px; }
@keyframes rise { from { transform: translateY(120%); } to { transform: none; } }
@media (min-width: 900px) { .sticky-cta { display: none !important; } }
@media (prefers-reduced-motion: reduce) { .sticky-cta { animation: none; } }
