/* Smart Pantry landing. Tokens follow ../DESIGN.md. No pills, no dots, no gradients on surfaces. */
:root {
  --bg: #F1F2EE; --card: #FFFFFF; --well: #F4F5F1; --ink: #1B1E19; --ink2: #5E6359; --line: #E4E6DF;
  --olive: #5D6F22; --on-olive: #FFFFFF; --bright: #A9C04E; --orange: #B0501C; --red: #B3261E; --bar: #1B1E19;
  --lift: 0 8px 24px -12px rgba(27, 30, 25, .16);
  --max: 1160px; --gutter: 20px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121410; --card: #1C1F1A; --well: #23271F; --ink: #F1F3EC; --ink2: #B4B9AD; --line: #2C3028;
    --olive: #A9C04E; --on-olive: #172005; --orange: #F0A06A; --red: #FF8A80; --bar: #050604;
    --lift: 0 8px 24px -12px rgba(0, 0, 0, .6);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--olive); text-underline-offset: .2em; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.3rem, 6.4vw, 4.4rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.3rem; letter-spacing: -.01em; }
.how-text h3 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.02em; }
p { margin: 0; }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -80px; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; z-index: 10; }
.skip:focus { top: 12px; }
main { display: block; }
main:focus { outline: none; }
section { scroll-margin-top: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 28px;
  border-radius: 16px; font: inherit; font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; border: 0;
}
.btn-main { background: var(--olive); color: var(--on-olive); }
.btn-main:hover { filter: brightness(1.08); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 1rem; background: var(--ink); color: var(--bg); }
.text-link { font-weight: 600; }

/* Header */
.top { display: flex; align-items: center; gap: 24px; padding-block: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; margin-right: auto; }
.brand img { border-radius: 9px; }
.top nav { display: none; gap: 22px; }
.top nav a { color: var(--ink2); text-decoration: none; font-weight: 600; font-size: 1rem; padding: 10px 2px; }
.top nav a:hover { color: var(--ink); }
@media (min-width: 820px) { .top nav { display: flex; } }

/* Hero */
.hero { display: grid; gap: 40px; padding-block: 28px 64px; align-items: center; }
.hero-copy { display: grid; gap: 22px; justify-items: start; }
.lead { font-size: clamp(1.1rem, 2.2vw, 1.3rem); color: var(--ink2); max-width: 34em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.fine { color: var(--ink2); font-size: 1rem; }
.hero-stage { position: relative; height: 560px; }
.hero-photo {
  position: absolute; inset: 90px 0 40px 24%; border-radius: 28px;
  background: url('../img/recipes/omelet.jpg') 70% 50% / cover no-repeat; box-shadow: var(--lift);
}
.phone-hero { position: absolute; left: 4%; top: 0; width: 250px; margin: 0; }
@media (min-width: 900px) {
  .hero { grid-template-columns: 1.05fr 1fr; gap: 56px; padding-block: 40px 96px; }
  .hero-stage { height: 680px; }
  .phone-hero { width: 310px; left: 6%; }
  .hero-photo { inset: 120px 0 60px 30%; }
}

/* Phone frame: a plain dark bezel around a real screenshot */
.phone {
  margin: 0; background: var(--bar); border-radius: 40px; padding: 9px; box-shadow: var(--lift);
  border: 1px solid rgba(255, 255, 255, .08); width: 100%; max-width: 290px;
}
.phone img { width: 100%; height: auto; aspect-ratio: 390 / 844; border-radius: 32px; background: var(--bg); object-fit: cover; object-position: top; }
@media (prefers-color-scheme: dark) { .phone { border-color: rgba(255, 255, 255, .14); } }

/* The one motion moment: the phone settles into place when the page opens */
@keyframes settle { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.phone-hero { animation: settle .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero-photo { animation: settle .9s .1s cubic-bezier(.2, .7, .2, 1) both; }

/* Try it */
.try { padding-block: 24px 88px; }
.try-head { display: grid; gap: 14px; max-width: 40em; margin-bottom: 28px; }
.try-head p, .section-intro { color: var(--ink2); }
.demo { background: var(--card); border-radius: 28px; box-shadow: var(--lift); padding: 20px; display: grid; gap: 28px; }
.demo-kitchen h3 { font-size: 1.1rem; margin-bottom: 8px; }
#demoStock { list-style: none; margin: 0; padding: 0; }
#demoStock li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
#demoStock li:first-child { border-top: 0; }
#demoStock .q { color: var(--ink2); text-align: right; }
#demoStock em, .date-card .soon { font-style: normal; font-weight: 600; color: var(--orange); display: block; font-size: .95rem; }
.demo-talk { display: grid; gap: 14px; align-content: start; }
.demo-talk label { font-weight: 700; font-size: 1.1rem; }
#demoText {
  width: 100%; min-height: 84px; resize: vertical; font: inherit; font-size: 1.15rem; color: var(--ink); background: var(--well);
  border: 2px solid var(--olive); border-radius: 16px; padding: 14px 16px;
}
#demoText:focus-visible { outline: 3px solid var(--bright); outline-offset: 2px; }
.try-these { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: baseline; font-size: 1rem; color: var(--ink2); }
.try-these button { font: inherit; font-weight: 600; color: var(--olive); background: none; border: 0; padding: 10px 0; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; text-align: left; }
#demoOut h3 { font-size: 1.1rem; margin-bottom: 6px; }
#demoOut ol { list-style: none; margin: 0; padding: 0; }
#demoOut li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
#demoOut .mk { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; background: var(--bright); color: #172005; }
#demoOut .mk.minus { background: var(--well); color: var(--orange); }
#demoOut li.note .mk { background: var(--well); color: var(--ink2); }
#demoOut small { display: block; color: var(--ink2); font-size: .95rem; }
.unclear, .demo-empty { color: var(--ink2); }
.demo-note { color: var(--ink2); font-size: .95rem; padding-top: 4px; }
@media (min-width: 860px) {
  .demo { grid-template-columns: 5fr 7fr; padding: 36px; gap: 48px; }
}

/* How it works */
.how { padding-block: 24px 40px; }
.section-title { margin-bottom: 48px; }
.how-row { display: grid; gap: 28px; align-items: center; padding-block: 36px; justify-items: start; }
.how-text { display: grid; gap: 14px; max-width: 32em; }
.how-text p { color: var(--ink2); }
.pair { display: flex; gap: 16px; align-items: flex-start; max-width: 100%; }
.pair .phone { max-width: 230px; }
.phone-low { margin-top: 44px; }
.date-card { background: var(--card); border-radius: 24px; box-shadow: var(--lift); padding: 24px; width: 100%; max-width: 440px; display: grid; gap: 16px; }
.date-card dl { margin: 0; }
.date-card dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); align-items: baseline; }
.date-card dl > div:first-child { border-top: 0; padding-top: 0; }
.date-card dt { font-weight: 600; }
.date-card dd { margin: 0; color: var(--ink2); text-align: right; }
.date-card dd.soon { margin: 0; display: block; }
.date-card p { color: var(--ink2); font-size: .98rem; }
@media (min-width: 860px) {
  .how-row { grid-template-columns: 1fr 1fr; gap: 72px; padding-block: 56px; }
  .how-row.flip .how-text { order: 2; }
  .how-row > figure, .how-row > .date-card, .how-row > .pair { justify-self: center; }
  .pair .phone { max-width: 250px; }
}

/* Food photos */
.food { padding-block: 56px; }
.food h2 { margin-bottom: 28px; max-width: 18em; }
.food-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.food-grid figure { margin: 0; border-radius: 24px; overflow: hidden; aspect-ratio: 4 / 3; background: var(--well); }
.food-grid img { width: 100%; height: 100%; object-fit: cover; }
.credit { margin-top: 14px; color: var(--ink2); font-size: .92rem; }
@media (min-width: 860px) {
  .food-grid { grid-template-columns: 1.5fr 1fr 1fr; grid-template-rows: 220px 220px; gap: 18px; }
  .food-grid figure { aspect-ratio: auto; border-radius: 28px; }
  .f1 { grid-row: 1 / 3; }
  .f4 { grid-column: 2 / 4; }
}

/* Comparison */
.why { padding-block: 72px; }
.why h2 { margin-bottom: 18px; }
.why-text { max-width: 36em; display: grid; gap: 14px; }
.why-text p { font-size: clamp(1.15rem, 2.2vw, 1.35rem); line-height: 1.55; color: var(--ink2); }
.why-text p:first-child { color: var(--ink); }
.brand small { font-weight: 600; color: var(--ink2); font-size: .85em; }

/* Privacy */
.privacy { padding-block: 24px 72px; display: grid; gap: 16px; }
.privacy h2, .privacy p { max-width: 36em; }
.privacy p { font-size: 1.2rem; color: var(--ink2); }

/* Install */
.install { padding-block: 24px 80px; }
.install h2 { margin-bottom: 12px; }
.install-cols { display: grid; gap: 20px; }
.install-cols > div { background: var(--card); border-radius: 24px; padding: 28px 24px; box-shadow: var(--lift); }
.install-cols h3 { margin-bottom: 14px; }
ol { padding-left: 1.3em; margin: 0; display: grid; gap: 10px; }
.coming { margin-top: 32px; max-width: 42em; color: var(--ink2); padding: 22px 24px; background: var(--well); border-radius: 20px; }
.coming strong { color: var(--ink); }
@media (min-width: 760px) { .install-cols { grid-template-columns: 1fr 1fr; } }

/* FAQ */
.faq { padding-block: 40px 72px; }
.faq h2 { margin-bottom: 28px; }
.faq-list { max-width: 46em; border-top: 1px solid var(--line); }
details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 700; font-size: 1.15rem; padding: 20px 40px 20px 0; list-style: none; position: relative; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 4px; top: 16px; font-size: 1.6rem; font-weight: 500; color: var(--olive); }
details[open] summary::after { content: '\2212'; }
details p { padding: 0 40px 22px 0; color: var(--ink2); }

/* Closer + footer */
.closer { padding-block: 40px 88px; display: grid; gap: 24px; justify-items: start; }
.foot { padding-block: 36px 56px; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--ink2); font-size: 1rem; }
.foot-brand { font-weight: 800; color: var(--ink); font-size: 1.2rem; }
.foot .foot-links { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.foot a { padding: 8px 0; font-weight: 600; }

@media (max-width: 420px) { :root { --gutter: 16px; } body { font-size: 17px; } .phone-hero { width: 220px; } .hero-stage { height: 500px; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone-hero, .hero-photo { animation: none; }
}

/* Header fits on one line at phone width */
.brand span, .top .btn-small { white-space: nowrap; }
@media (max-width: 520px) { .brand small { display: none; } .top .btn-small { padding: 0 14px; } }
.foot .foot-credit { font-size: .95rem; }
.foot .foot-credit a { font-weight: 600; }
