/*
 * The homepage: plain bands of deep green and light, left-aligned headings, and
 * pictures made from the app's own pieces. Colour and type values
 * are at the top of styles.css.
 */
.home { --mint: #eef5ef; --forest: #12130f; --glow: #8fcb9b; background: var(--white); }
.home ::selection { background: var(--glow); color: var(--forest); }

/* ---------- header ---------- */
.home .site-header { position: sticky; top: 0; z-index: 10; max-width: none; padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); border-bottom: 0; background: var(--mint); transition: box-shadow 0.3s, background-color 0.3s, transform 0.3s; }
.home .site-header.is-scrolled { background: rgb(250 252 250 / 0.97); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: 0 1px 12px rgb(18 19 15 / 0.1); }
/* Out of the way while the "How it works" scene fills the screen. */
.nav a { padding: 8px 0; }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px var(--accent); }

/* ---------- opening ---------- */
.lead { background: var(--mint); }
.lead__grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: clamp(40px, 6vw, 88px) clamp(80px, 9vw, 128px); }
.lead h1 { font-size: clamp(42px, 6vw, 76px); font-weight: 800; line-height: 1.04; letter-spacing: -0.035em; color: var(--forest); }
.lead__text { max-width: 44ch; margin-top: 22px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); }
.lead__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.lead__proof { margin-top: 26px; font-size: 13px; font-weight: 700; color: var(--forest); }

.collage { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); padding-top: 18px; }
.collage__main { grid-column: 1 / 11; grid-row: 1; }
.collage__side { position: relative; grid-column: 3 / 13; grid-row: 2; margin-top: -28px; }
.collage__side .card__meters { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 14px; }
.collage__side .meter__head em { white-space: nowrap; }

/* ---------- bands ---------- */
.band { position: relative; padding-block: clamp(72px, 9vw, 120px); scroll-margin-top: 60px; }
.band h2 { font-size: clamp(30px, 4vw, 50px); line-height: 1.08; }
.band--white { background: var(--white); }
.band--mint { background: var(--mint); }
.band--dark { background: var(--forest); color: var(--white); }
.band--dark :focus-visible, .foot :focus-visible { outline-color: var(--white); }
.band__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; }
.band__head a { display: inline-block; margin-top: 8px; font-size: 14px; }
.glow { color: var(--glow); }
.band__head .glow { font-size: 18px; font-weight: 600; }
.band__intro { max-width: 720px; }
.band__intro > p:last-child { margin-top: 16px; font-size: 18px; color: var(--ink-2); }
.band__text { max-width: 46ch; margin-top: 18px; font-size: 18px; color: var(--ink-2); }
.band--dark .band__text { color: rgb(255 255 255 / 0.84); }

/* Four facts set like a spec sheet: a rule above each, no boxes or icons. */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 56px; }
.facts li { padding-top: 18px; border-top: 1px solid rgb(255 255 255 / 0.28); }
.facts h3 { font-size: 19px; }
.facts p { margin-top: 8px; font-size: 15px; color: rgb(255 255 255 / 0.8); }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(32px, 6vw, 88px); align-items: center; }
.pair--wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.pair--flip { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.pair .button { margin-top: 28px; }
.ticks { display: grid; gap: 12px; margin-top: 26px; }
.ticks li { position: relative; padding-left: 28px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 6px; height: 11px; border: solid var(--accent); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.band--dark .ticks li::before { border-color: var(--glow); }

.phonestage { color: var(--ink); }

.paper { padding: 12px; border-radius: var(--radius-large); background: var(--white); box-shadow: var(--shadow); }
.paper .board-preview .board { padding: 14px; }

.shot { margin-top: 48px; margin-bottom: 0; }
.window { overflow: hidden; border: 1px solid var(--rule); border-radius: var(--radius-large); background: var(--white); box-shadow: var(--shadow); }
.window__bar { display: flex; align-items: center; gap: 7px; padding: 11px 16px; border-bottom: 1px solid var(--rule); background: var(--stone); }
.window__bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--rule-2); }
.window__bar span { margin-left: 10px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.window__view > div { position: relative; overflow: hidden; }
/* Fades out where the picture is cut off. */
.window__view > div::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(transparent, var(--white)); }
.stage { transform-origin: 0 0; }
.window .wb.panel { border: 0; border-radius: 0; box-shadow: none; }
.shot figcaption { margin-top: 14px; font-size: 13px; color: var(--ink-3); }

.feature__shot { min-width: 0; padding: clamp(18px, 3vw, 40px); border-radius: var(--radius-large); background: var(--mint); }

.card { padding: 22px; border: 1px solid var(--rule); border-radius: var(--radius-large); background: var(--white); box-shadow: var(--shadow); }
.card h3 { font-size: 20px; }
.card__grams { font-weight: 700; }
.card .lines li { grid-template-columns: minmax(0, 1fr) auto; padding: 9px 0; }
.card__meters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; margin-top: 20px; }
.card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.card__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.card__table th, .card__table td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.card__table thead th { font-size: 12px; font-weight: 500; color: var(--ink-3); }
.card__table tbody th { font-weight: 650; }
.card__table tr:last-child > * { border-bottom: 0; }

.phone { width: min(320px, 100%); margin: 0 auto; padding: 10px; border-radius: 40px; background: var(--ink); box-shadow: var(--shadow); }
.phone__screen { height: 560px; overflow: hidden; padding: 28px 18px 0; border-radius: 31px; background: var(--white); }
.phone__title { font-size: 26px; }
.phone .share__days { overflow: hidden; border-radius: 10px; border-color: var(--rule); }
.phone .daytab { display: grid; place-items: center; min-height: 34px; }
.phone .daytab[aria-pressed="true"] { background: var(--accent); }
.phone__meal { margin-top: 18px; }
.phone__meal h3 { font-size: 17px; }
.phone .share__items li { grid-template-columns: minmax(0, 1fr) 48px 58px; gap: 6px; font-size: 13px; }
.phone .share__items b { font-size: 13px; }
.phone .share__items small { font-size: 11px; }


/* ---------- pricing, questions, closing ---------- */
.home .pricing { padding-block: clamp(72px, 9vw, 120px); }
.home .pricing h2 { max-width: none; }
.pricing__lead { margin-top: 12px; color: var(--ink-2); }

.faq details { max-width: 860px; }
.faq h2 { margin-bottom: 28px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; font-weight: 650; font-size: 17px; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { padding-bottom: 20px; color: var(--ink-2); }

.cta { margin-top: 0; text-align: center; }
.cta h2 { margin-bottom: 28px; }
.cta .button { border-color: var(--glow); background: var(--glow); color: var(--forest); }
.cta .button:hover { background: var(--white); border-color: var(--white); }

.foot { padding-block: 56px 48px; border-top: 1px solid rgb(255 255 255 / 0.14); background: var(--forest); color: rgb(255 255 255 / 0.76); font-size: 14px; }
.foot__grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot__grid > div p:last-child { max-width: 40ch; }
.foot__brand { margin-bottom: 12px; color: var(--white); font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.foot nav { display: grid; align-content: start; justify-items: start; gap: 10px; }
.foot h2 { color: var(--white); font-size: 15px; letter-spacing: 0; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }

.calc__form { display: grid; gap: 16px; max-width: 420px; margin-top: 28px; }
.calc__form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.calc__form input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid var(--rule-2); border-radius: var(--radius); background: var(--white); font-size: 17px; }
.calc__form input:focus-visible { outline: 3px solid rgb(71 118 97 / 0.28); outline-offset: 0; border-color: var(--accent); }
.calc__result { padding: clamp(26px, 4vw, 44px); border-radius: var(--radius-large); background: var(--forest); color: var(--white); overflow-wrap: anywhere; }
.calc__big { margin-top: 6px; color: var(--glow); font-size: clamp(34px, 4.6vw, 56px); font-weight: 800; line-height: 1.08; letter-spacing: -0.03em; }
.calc__money { margin-top: 14px; font-size: 19px; }
.calc__compare { margin-top: 22px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 0.18); font-size: 17px; }
.calc__note { margin-top: 18px; font-size: 13px; color: rgb(255 255 255 / 0.76); }

.included { max-width: 860px; margin-top: 48px; }
.included h3 { font-size: 20px; }
.included .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 32px; margin-top: 20px; }
.included p { margin-top: 24px; color: var(--ink-2); }

/* ---------- motion ---------- */
/* Arriving on scroll is done in js/move.js; nothing is hidden if scripts do not run. */
@media (prefers-reduced-motion: reduce) {
  .home .site-header { transition: none; }
}
@media print {
  [data-reveal], [data-reveal] * { opacity: 1 !important; transform: none !important; }
}

@media (max-width: 960px) {
  .lead__grid, .pair, .pair--wide, .pair--flip { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .collage { width: 100%; max-width: 560px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  /* The three tabs stay visible on a phone, on their own row. The header scrolls away. */
  .home .site-header { position: static; grid-template-columns: 1fr auto; grid-template-areas: "brand account" "tabs tabs"; height: auto; padding-block: 14px 8px; row-gap: 8px; }
  .home .site-header .mark { grid-area: brand; }
  .home .site-header .account-links { grid-area: account; }
  .home .site-header .nav { grid-area: tabs; display: flex; gap: 24px; }
  .collage__main { grid-column: 1 / -1; }
  .collage__side { grid-column: 2 / -1; }
  .facts, .foot__grid, .included .ticks { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .card__meters { grid-template-columns: minmax(0, 1fr); }
  .card__table th:nth-child(2), .card__table td:nth-child(2), .card__table th:nth-child(3), .card__table td:nth-child(3) { display: none; }
}
.pricing__free { max-width: 560px; margin-top: 14px; color: var(--forest); }
.pricing__free p:first-child { font-size: 20px; font-weight: 700; }
.pricing__free p + p { margin-top: 4px; color: var(--ink-3); }

/* The demo video. */
.demo__lead { margin-top: 10px; color: var(--ink-2); font-size: 18px; }
.demo__frame { max-width: 960px; margin-top: 32px; border-radius: var(--radius-large); overflow: hidden; background: var(--forest); box-shadow: var(--shadow); }
.demo__frame video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; }
.demo__text { max-width: 62ch; margin-top: 18px; color: var(--ink-2); font-size: 14px; }

/* ---------- how it works: three steps, on one screen ---------- */
.howto h2 { font-size: clamp(28px, 3.2vw, 40px); }
.howto ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 40px 0 0; padding: 0; list-style: none; }
.howto li { padding: 26px; border: 1px solid rgb(255 255 255 / 0.18); border-radius: var(--radius-large); background: rgb(255 255 255 / 0.05); }
.howto li b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--glow); color: var(--forest); }
.howto h3 { margin-top: 18px; font-size: 20px; }
.howto li p { margin-top: 8px; color: rgb(255 255 255 / 0.84); }
.howto__data { margin-top: 28px; font-size: 14px; color: rgb(255 255 255 / 0.84); }
.howto a { color: inherit; }
@media (max-width: 760px) {
  .howto ol { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 24px; }
  .howto li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; padding: 16px 18px; }
  .howto li b { width: 30px; height: 30px; grid-row: span 2; }
  .howto h3 { margin-top: 3px; font-size: 18px; }
  .howto li p { margin-top: 4px; }
}

/* ---------- critique fixes: home ---------- */
/* text beside a tall picture starts at the top, so no empty band of space sits over the heading */
.band .pair { align-items: start; }
.band .pair > :first-child { position: sticky; top: 96px; }
/* pricing while it is free: one offer, then the tiers for reference */
.pricing__free .button { margin-top: 18px; }
.pricing__later { margin-top: 36px; font-size: 20px; }
.plan.is-later { box-shadow: var(--shadow-sm); }
.demo__full { display: none; }
.phone-cta { display: none; }
@media (max-width: 760px) {
  .band .pair > :first-child { position: static; }
  .demo__full { display: inline-flex; margin-top: 14px; }
  /* a small "Get started" at the bottom once the first one is out of sight */
  .phone-cta { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 20; display: block; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
  .phone-cta.is-shown { opacity: 1; transform: none; pointer-events: auto; }
  .phone-cta .button { width: 100%; justify-content: center; min-height: 50px; box-shadow: 0 2px 4px rgb(53 90 73 / 0.3), 0 12px 28px -8px rgb(18 19 15 / 0.4); }
}
@media (prefers-reduced-motion: reduce) { .phone-cta { transition: none; } }
@media print { .phone-cta { display: none !important; } }
