/* Pantrylore landing page. Look: "Pantrylore Plus" (the app's DESIGN.md). */

@font-face { font-family: Fraunces; src: url(assets/fonts/fraunces-latin-full-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: Fraunces; src: url(assets/fonts/fraunces-latin-full-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
@font-face { font-family: Figtree; src: url(assets/fonts/figtree-latin-wght-normal.woff2) format("woff2"); font-weight: 300 900; font-display: swap; }

:root {
  --ground: #F7F8F5; --wash-a: #F4FAF6; --wash-b: #FBF8F1; --wash-c: #FCEFE6;
  --mint: #E3F1EB; --peach: #FBEADF; --lemon: #FAF3DE; --frost: #E6F0F4;
  --sunken: #EEF2EF; --hairline: #E2E8E4;
  --ink: #1F2A27; --muted: #5B6763;
  --primary: #2B8566; --primary-ink: #1F6E52; --primary-tint: #E2F1EA;
  --fresh: #3FA37C; --soon: #F2B33D; --soon-tint: #FDF1D2; --soon-text: #8A5300; --today: #E5484D;
  --shadow: 0 6px 10px rgb(60 85 75 / .07);
  --display: Fraunces, Georgia, serif;
  --body: Figtree, system-ui, sans-serif;
  --spring: linear(0, .25 8%, .6 18%, .88 30%, 1.02 42%, 1.05 52%, 1.03 64%, 1.005 80%, 1);
  --gutter: clamp(16px, 5vw, 64px);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
.still { scroll-behavior: auto; }
body {
  font: 400 1.125rem/1.55 var(--body); color: var(--ink);
  background: linear-gradient(135deg, var(--wash-a), var(--wash-b) 50%, var(--wash-c)) fixed var(--ground);
  overflow-x: clip;
}
img { display: block; }
h1, h2, h3, .wordmark { font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-variation-settings: "SOFT" 80, "WONK" 0; text-wrap: balance; }
h1 { font-size: clamp(2.9rem, 7.2vw, 5.6rem); line-height: .98; }
h2 { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; }
h3 { font-size: 1.4rem; line-height: 1.15; }
em { font-style: italic; font-weight: 600; font-variation-settings: "SOFT" 100, "WONK" 1; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.4rem); color: var(--muted); max-width: 30ch; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }

.glass { background: rgb(255 255 255 / .78); border: 1px solid #fff; border-radius: 24px; box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pill { font-size: .875rem; font-weight: 600; padding: .45em 1em; border-radius: 99px; background: var(--primary-tint); color: var(--primary-ink); white-space: nowrap; }
.button { display: inline-block; font-weight: 700; color: #fff; background: var(--primary); padding: .85em 1.6em; border-radius: 99px; text-decoration: none; transition: scale .25s var(--spring), background .2s; }
.button:hover { background: var(--primary-ink); }
.button:active { scale: .97; }
[class^="dot-"] { display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-right: .5em; flex: none; }
.dot-today { background: var(--today); } .dot-soon { background: var(--soon); } .dot-fresh { background: var(--fresh); }

/* ---------- top bar ---------- */
.bar { position: fixed; inset: 12px var(--gutter) auto; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 8px 20px; border-radius: 99px; background: rgb(255 255 255 / .88); border: 1px solid #fff; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.wordmark { font-size: 1.35rem; color: var(--ink); text-decoration: none; }

/* ---------- 1. hero + story: one pinned scene ---------- */
.evening { --p: 0; --dusk: 0; position: relative; overflow-x: clip; }

/* plain version: no script, Reduce Motion, or no WebGL. Words stacked, one still picture. */
.pin { display: grid; gap: 48px; justify-items: start; padding: 120px var(--gutter) 72px; max-width: 1240px; margin: auto; }
.scene, .dusk, .rail, .hint { display: none; }
.beats { list-style: none; padding: 0; display: grid; gap: 56px; }
.beat { display: grid; gap: 12px; justify-items: start; max-width: 34ch; }
.beat.lead { max-width: 44rem; gap: 22px; min-height: 62svh; align-content: center; }
.time { font-weight: 700; font-size: .95rem; color: var(--primary-ink); }
.loop-line { display: flex; flex-wrap: wrap; gap: .4em .9em; font-weight: 600; color: var(--muted); }
.loop-line span + span::before { content: "→"; margin-right: .9em; font-weight: 400; }
.still-pic { position: relative; width: min(300px, 78vw); }
.still-pic img { position: absolute; width: 30%; }
.still-pic img:nth-child(1) { position: static; width: 100%; }
.still-pic img:nth-child(2) { left: 22%; top: 16%; } .still-pic img:nth-child(3) { left: 50%; top: 20%; } .still-pic img:nth-child(4) { left: 35%; top: 38%; }
.still-pic p { font: 700 1.8rem var(--display); text-align: center; margin-top: 12px; }
.still-pic small { font: 600 1rem var(--body); color: var(--primary-ink); }

/* the 3D version */
.motion .evening { height: 820vh; }
.motion .pin { position: sticky; top: 0; height: 100svh; max-width: none; padding: 0; display: block; overflow: clip; }
.motion .still-pic { display: none; }
.motion .dusk { display: block; position: absolute; inset: 0; background: linear-gradient(165deg, #F8DFCB, #F3C9AE 55%, #EDB79C); opacity: var(--dusk); }
.motion .scene { display: block; position: absolute; inset: 0; }
.scene canvas { display: block; width: 100%; height: 100%; touch-action: pan-y; }
.scene > :not(canvas) { position: absolute; left: 0; top: 0; pointer-events: none; }

.motion .beats { display: block; position: absolute; z-index: 2; top: 0; bottom: 0; left: max(var(--gutter), 50vw - 600px); width: min(44vw, 40rem); pointer-events: none; }
.motion .beat { --o: clamp(0, min(calc((var(--p) - var(--a)) * 16), calc((var(--b) - var(--p)) * 16)), 1); position: absolute; left: 0; right: 0; top: 50%; translate: 0 calc(-50% + (1 - var(--o)) * 22px); opacity: var(--o); }
.motion .beat p:last-child { color: var(--ink); }
.motion .beat.lead { min-height: 0; }
.motion .beat.lead p:last-of-type { color: var(--muted); }
.motion .lead .button { pointer-events: auto; }
.motion .away .lead { visibility: hidden; }
.motion .lead > * { animation: rise .9s var(--spring) both; }
.motion .lead > :nth-child(2) { animation-delay: .1s; } .motion .lead > :nth-child(3) { animation-delay: .2s; } .motion .lead > :nth-child(4) { animation-delay: .3s; }

.motion .hint { display: block; position: absolute; left: 73%; bottom: 26px; translate: -50%; font-weight: 600; font-size: .95rem; color: var(--muted); padding: .4em 1em; border-radius: 99px; background: rgb(255 255 255 / .62); border: 1px solid #fff; opacity: calc(1 - var(--p) * 25); transition: opacity .4s; animation: rise .9s var(--spring) both 1.4s; pointer-events: none; }
.motion .hint.done { opacity: 0; }
.motion .rail { display: block; position: absolute; inset: auto 0 0; height: 3px; background: var(--primary); transform-origin: 0 50%; scale: var(--p) 1; opacity: calc((1 - var(--p)) * 30); }

/* words that sit on top of the 3D picture; scene.js puts .days and .tag on their 3D spot */
.days, .tag, .notice, .saved { opacity: 0; transition: opacity .3s, scale .5s var(--spring), translate .5s var(--spring); }
.days.on, .tag.on, .notice.on, .saved.on { opacity: 1; }
.days { font: 700 clamp(1rem, 2vw, 1.4rem) var(--body); color: var(--ink); background: var(--lemon); padding: .5em .9em; border-radius: 6px; box-shadow: 0 6px 14px rgb(60 85 75 / .18); rotate: -4deg; white-space: nowrap; }
.tag, .notice { background: rgb(255 255 255 / .94); border: 1px solid #fff; box-shadow: 0 10px 24px rgb(60 85 75 / .18); }
.tag { display: flex; align-items: center; white-space: nowrap; font-size: .95rem; font-weight: 700; padding: .45em 1em; border-radius: 99px; scale: .7; }
.tag.on { scale: 1; }
.tag .dot-today { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgb(229 72 77 / .22); } }
.scene > .notice { left: 73%; top: 13%; width: min(300px, 80vw); margin-left: max(-150px, -40vw); padding: 12px 14px; border-radius: 20px; display: flex; gap: 12px; align-items: center; font-size: .95rem; line-height: 1.3; translate: 0 -24px; scale: .9; }
.notice.on { translate: 0; scale: 1; }
.notice small { display: block; color: var(--muted); font-size: .78rem; }
.notice b, .notice span { display: block; }
.app-mark { flex: none; width: 40px; height: 40px; border-radius: 11px; background: var(--primary); color: #fff; font: 700 24px/40px var(--display); text-align: center; }
.scene > .saved { left: 73%; top: 15%; width: 20rem; margin-left: -10rem; text-align: center; font: 700 clamp(2rem, 4vw, 3.2rem)/1.1 var(--display); letter-spacing: -.02em; translate: 0 16px; }
.saved.on { translate: 0; }
.saved small { display: block; font: 600 1.2rem var(--body); color: var(--primary-ink); letter-spacing: 0; margin-top: 6px; opacity: 0; transition: opacity .4s .3s; }
.saved.one small { opacity: 1; }
.roll { display: inline-block; height: 1.1em; overflow: hidden; vertical-align: bottom; color: var(--primary); }
.roll b { display: block; transition: translate .6s var(--spring); }
.saved.one .roll b { translate: 0 -100%; }
/* speech bubbles: scene.js keeps each one over its food */
.scene > .bubble { margin-top: -12px; font: 700 .95rem/1.2 var(--body); color: var(--ink); background: #fff; padding: .5em .9em; border-radius: 1.1em; white-space: nowrap; box-shadow: 0 8px 20px rgb(60 85 75 / .2); transform-origin: 50% calc(100% + 8px); opacity: 0; scale: .9; transition: opacity .15s, scale .15s ease-out; }
.bubble::after { content: ""; position: absolute; left: 50%; bottom: -5px; width: 12px; height: 12px; margin-left: -6px; background: #fff; border-radius: 3px; rotate: 45deg; }
.scene > .bubble.on { opacity: 1; scale: 1; transition: opacity .15s, scale .35s var(--spring); }
.bubble.today::before, .bubble.soon::before { content: ""; display: inline-block; width: .55em; height: .55em; border-radius: 50%; margin-right: .5em; background: var(--today); }
.bubble.soon::before { background: var(--soon); }

/* the recipe card beside the wok */
.dish { width: min(23rem, 100%); padding: 16px 18px; display: grid; gap: 9px; font-size: .9rem; line-height: 1.3; }
.dish h3 { font-size: 1.35rem; }
.dish .label { font-size: .7rem; }
.dish .chips { margin: 0; flex-wrap: wrap; }
.dish .chip { font-size: .78rem; padding: .3em .8em; }
.foods { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.foods button { font: 600 .82rem/1.25 var(--body); color: var(--ink); background: none; border: 0; border-radius: 14px; padding: 6px 2px; display: grid; justify-items: center; gap: 2px; cursor: pointer; transition: background .2s, scale .16s ease-out; }
.foods button:active { scale: .97; }
.foods img { width: 40px; }
.foods small { font-weight: 500; font-size: .7rem; color: var(--muted); }
.nutri { display: grid; gap: 7px; }
.nutri div { display: grid; grid-template-columns: 3.6rem 1fr 6.6rem; align-items: center; gap: 10px; }
.nutri b { text-align: right; font-variant-numeric: tabular-nums; }
.share { display: flex; gap: 2px; height: 10px; border-radius: 99px; overflow: hidden; background: var(--sunken); } /* one bar: who gives how much */
.share i { min-width: 2px; transition: opacity .2s; }
.share .spinach { background: #5CA84A; } .share .egg { background: #F7D25A; } .share .tomato { background: #E5503F; } .share .carrot { background: #F08A3C; }
/* one food picked (on the card or in the wok): its parts stay, the others step back */
.dish:is([data-pick="spinach"], [data-pick="egg"], [data-pick="tomato"], [data-pick="carrot"]) .share i { opacity: .18; }
.dish[data-pick="spinach"] .share .spinach, .dish[data-pick="egg"] .share .egg, .dish[data-pick="tomato"] .share .tomato, .dish[data-pick="carrot"] .share .carrot { opacity: 1; }
.dish[data-pick="spinach"] button.spinach, .dish[data-pick="egg"] button.egg, .dish[data-pick="tomato"] button.tomato, .dish[data-pick="carrot"] button.carrot { background: var(--primary-tint); }
.fine { font-size: .74rem; color: var(--muted); }
html:not(.motion) .play { display: none; }
.motion .dish { position: absolute; z-index: 3; left: max(var(--gutter), 50vw - 600px); bottom: 26px; opacity: 0; translate: 0 24px; visibility: hidden; transition: opacity .25s, translate .5s var(--spring), visibility 0s .25s; }
.motion .dinner .dish { opacity: 1; translate: 0; visibility: visible; transition-delay: 0s; }
.motion .beat:last-child { top: 25%; } /* room for the recipe card under it */

/* ---------- 2. the app in four steps ---------- */
.app { padding: clamp(72px, 12vw, 150px) var(--gutter); max-width: 1240px; margin: auto; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px 48px; align-items: center; }
.app-copy { display: grid; gap: 32px; }
.app-phone { position: relative; display: grid; place-items: center; perspective: 1200px; }

.loop-chips { display: flex; flex-wrap: wrap; gap: 6px 4px; align-items: center; }
.loop-chips button { font: 600 .95rem var(--body); color: var(--muted); background: rgb(255 255 255 / .62); border: 1px solid #fff; border-radius: 99px; padding: .5em 1.05em; cursor: pointer; transition: background .25s, color .25s, scale .25s var(--spring); }
.loop-chips button:not(:last-child)::after { content: "→"; margin-left: .9em; margin-right: -1.7em; color: var(--muted); font-weight: 400; pointer-events: none; }
.loop-chips button:not(:last-child) { margin-right: 1.3em; }
.loop-chips button[aria-selected="true"] { background: var(--primary); color: #fff; border-color: var(--primary); }
.loop-chips button:active { scale: .97; }
.loop-say { margin-top: 12px; color: var(--muted); min-height: 3.2em; max-width: 36ch; }

/* the drawn phone */
.phone { position: relative; width: 272px; height: 560px; border-radius: 46px; background: var(--ink); box-shadow: 0 30px 60px rgb(60 85 75 / .22), 0 6px 10px rgb(60 85 75 / .1); font-size: 11px; line-height: 1.3; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s ease-out; }
.screen-bg { position: absolute; inset: 8px; border-radius: 38px; background: linear-gradient(150deg, var(--wash-a), var(--wash-b) 55%, var(--wash-c)); }
.screen { position: absolute; inset: 8px; padding: 30px 14px 62px; opacity: 0; visibility: hidden; transition: opacity .35s, visibility 0s .35s; }
.screen.active { opacity: 1; visibility: visible; transition-delay: 0s; }
.ph-head { display: flex; justify-content: space-between; align-items: center; font: 700 22px var(--display); letter-spacing: -.02em; margin-bottom: 10px; }
.ph-head i { width: 28px; height: 28px; border-radius: 50%; background: rgb(255 255 255 / .8); border: 1px solid #fff; box-shadow: var(--shadow); }
.phone .label { font-size: 9px; margin: 10px 0 6px; }
/* the Know screen: the app's own fridge, in the app's own colours */
#s-know { overflow: hidden; border-radius: 38px; }
.rooms { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 0 0 8px; font-size: 8px; font-weight: 700; text-align: center; }
.rooms > * { padding: 5px 0; border-radius: 99px; border: 1px solid #DDD3C1; color: #5C5A50; }
.rooms b { background: #1E211C; border-color: #1E211C; color: #FFF9EC; }
.fridge-box { position: relative; height: 258px; padding: 5px; border-radius: 22px; background: #E9E0CF; border: 1px solid #D3C6AE; display: grid; grid-template-rows: repeat(3, 1fr); perspective: 560px; }
.fridge-box::before { content: ""; position: absolute; inset: 5px; border-radius: 17px; background: linear-gradient(#FFFDF6, #F1EBDD); }
.lamp { position: absolute; inset: 5px; border-radius: 17px; background: radial-gradient(circle at 50% 0, rgb(255 226 150 / .75), transparent 62%); }
.lamp::before { content: ""; position: absolute; left: 50%; top: 6px; translate: -50%; width: 36px; height: 4px; border-radius: 99px; background: #FFE296; box-shadow: 0 0 8px #FFE296; }
.shelf { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); align-items: end; padding: 0 6px 4px; border-bottom: 2px solid rgb(255 255 255 / .7); box-shadow: 0 1px 0 #DDD3C1; }
.shelf:nth-last-child(2) { margin: 6px 3px 3px; border: 1px solid #D3C6AE; border-radius: 11px; background: rgb(233 224 207 / .55); box-shadow: none; } /* the drawer */
.cell { display: grid; justify-items: center; gap: 1px; }
.cell img { width: 42px; height: 42px; transform-origin: bottom; }
.cell::after { content: attr(data-word); height: 12px; padding: 0 5px; border-radius: 99px; font-size: 7.5px; font-weight: 700; line-height: 12px; }
.cell.today::after { color: #B83A22; background: #FBE1D8; }
.cell.soon::after { color: #6E5B12; background: #F1E8C4; }
.f-door { position: absolute; inset: 5px; border-radius: 17px; background: #F7F1E6; border: 1px solid #DCCFB8; transform-origin: left; opacity: 0; }
.f-door::after { content: ""; position: absolute; right: 9px; top: 50%; translate: 0 -50%; width: 4px; height: 46px; border-radius: 99px; background: #D8CDB6; }
.nudge { margin-top: 16px; padding: 10px 12px; border-radius: 16px; font-weight: 600; display: flex; align-items: center; }
.tabbar { position: absolute; inset: auto 16px 16px; height: 44px; border-radius: 99px; background: rgb(255 255 255 / .88); border: 1px solid #fff; box-shadow: var(--shadow); display: flex; justify-content: space-around; align-items: center; font-size: 8px; font-weight: 600; color: var(--muted); }
.tabbar b { width: 40px; height: 40px; margin-top: -14px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 22px; font-weight: 400; display: grid; place-items: center; box-shadow: 0 6px 12px rgb(43 133 102 / .35); }
.cap { display: inline-block; background: var(--primary); color: #fff; font-weight: 700; font-size: 10px; padding: 7px 12px; border-radius: 99px; white-space: nowrap; }
.cap.wide { display: block; text-align: center; margin-top: 12px; padding: 10px; font-size: 11px; }

.viewfinder { position: relative; height: 290px; border-radius: 26px; background: linear-gradient(160deg, #DCE8E1, #C9D8CF); display: grid; place-items: center; overflow: hidden; }
.viewfinder::before { content: ""; position: absolute; inset: 44px 36px; border: 2px dashed rgb(255 255 255 / .9); border-radius: 22px; }
.viewfinder img { width: 120px; }
.scanline { position: absolute; left: 36px; right: 36px; top: 44px; height: 3px; border-radius: 3px; background: var(--primary); box-shadow: 0 0 14px 2px rgb(43 133 102 / .5); }
.found { margin-top: 14px; padding: 12px; border-radius: 20px; display: grid; grid-template-columns: 38px 1fr; gap: 6px 10px; align-items: center; }
.found img { width: 38px; }
.found b { display: block; font-size: 13px; }
.found small { color: var(--muted); font-size: 9.5px; }
.found .cap { grid-column: 1 / -1; text-align: center; padding: 9px; }

.recipe { padding: 14px; }
.plated { position: relative; width: 132px; height: 132px; margin: 0 auto 8px; }
.plated img { position: absolute; width: 44px; }
.plated img:nth-child(1) { width: 100%; }
.plated img:nth-child(2) { left: 26px; top: 30px; }
.plated img:nth-child(3) { left: 66px; top: 36px; }
.plated img:nth-child(4) { left: 44px; top: 62px; }
.r-title { display: block; font: 700 16px/1.15 var(--display); letter-spacing: -.01em; }
.chips { display: flex; gap: 6px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; font-size: 10px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--sunken); }
.chip.ok { background: var(--primary-tint); color: var(--primary-ink); }
.why { display: flex; align-items: center; font-size: 10.5px; margin-top: 4px; }

.win { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; gap: 2px; font-size: 14px; font-weight: 600; }
.win .big { font: 700 112px/1 var(--display); letter-spacing: -.04em; color: var(--primary); }
.next { margin-top: 22px; padding: 10px 14px; border-radius: 18px; display: flex; align-items: center; gap: 8px; font-size: 11px; }
.next img { width: 30px; }

.floater { position: absolute; width: clamp(44px, 6vw, 72px); z-index: -1; }
.f1 { left: 2%; top: 8%; } .f2 { right: 0; top: 20%; } .f3 { left: -2%; bottom: 22%; } .f4 { right: 4%; bottom: 8%; } .f5 { left: 12%; bottom: 0; }

/* phone motion */
/* the app's door: wait .25s, swing to -104deg in 1s, then it is gone */
@keyframes door-open { 0%, 14% { transform: rotateY(0); opacity: 1; animation-timing-function: cubic-bezier(.55, 0, .15, 1); } 71% { transform: rotateY(-104deg); opacity: 1; box-shadow: 8px 0 18px rgb(0 0 0 / .25); } 100% { transform: rotateY(-104deg); opacity: 0; } }
/* a flicker is a cut, not a fade: the old bulb catching */
@keyframes flicker { 0% { opacity: .2; } 59% { opacity: 1; } 66% { opacity: .35; } 75% { opacity: 1; } 86% { opacity: .55; } 96%, 100% { opacity: 1; } }
@keyframes settle { from { translate: 0 -14px; opacity: 0; } }
@keyframes lean { from { rotate: 2deg; } to { rotate: -5deg; } }
@keyframes pop { from { scale: .4; opacity: 0; } }
@keyframes rise { from { translate: 0 28px; opacity: 0; } }
@keyframes bob { 50% { translate: 0 -12px; rotate: 6deg; } }
@keyframes scan { 50% { translate: 0 200px; } }
.motion .floater { animation: bob 7s ease-in-out infinite; }
.motion .f2, .motion .f5 { animation-duration: 9s; animation-delay: -3s; }
.motion .phone:not(.intro) .f-door { opacity: 1; } /* shut until the phone is on screen */
.motion .phone.intro .screen.active .f-door { animation: door-open 1.75s linear both; }
.motion .phone.intro .screen.active .lamp { animation: flicker .8s step-end both; }
.motion .phone.intro .screen.active .cell { animation: settle .5s var(--spring) backwards; animation-delay: calc(.77s + var(--d, 0s)); }
.motion .cell.today img, .motion .cell.soon img { animation: lean 1.85s ease-in-out infinite alternate; }
.motion .screen.active .scanline { animation: scan 2.4s ease-in-out infinite; }
.motion .screen.active .found, .motion .screen.active .recipe, .motion .screen.active .win > *, .motion .screen.active .nudge { animation: rise .6s var(--spring) backwards .15s; }
.motion .screen.active .nudge { animation-delay: 1.4s; }
.motion .screen.active .win .big { animation: pop .7s var(--spring) backwards .1s; }

/* ---------- 3–5. promises, honest, close ---------- */
.promises, .honest, .close { padding: clamp(72px, 12vw, 150px) var(--gutter); max-width: 1240px; margin: auto; }
.promises h2 { max-width: 16ch; margin-bottom: 48px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card { padding: 28px; display: grid; gap: 10px; align-content: start; }
.card p { color: var(--muted); }
.art { position: relative; height: 96px; display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.art img { width: 72px; transition: translate .5s var(--spring), rotate .5s var(--spring); }
.art .on-plate { position: absolute; left: 14px; width: 44px; }
.card:hover .art img:nth-child(odd) { translate: 0 -8px; rotate: -6deg; }
.card:hover .art img:nth-child(even) { translate: 0 -4px; rotate: 6deg; }
.soon-chip { font-size: 1rem; padding: .6em 1.1em; background: var(--soon-tint); color: var(--soon-text); }

.honest { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px clamp(32px, 6vw, 96px); align-items: center; }
.honest-copy { display: grid; gap: 18px; }
.lines { display: grid; gap: 16px; }
.line { padding: 18px 22px; display: grid; gap: 6px; justify-items: start; }
.line:nth-child(2) { margin-left: clamp(0px, 4vw, 48px); }
.line small { font-size: .8rem; font-weight: 700; color: var(--muted); }
.line p, .guess { font: 600 1.15rem/1.4 var(--body); color: var(--ink); text-align: left; }
.guess { background: var(--soon-tint); color: var(--soon-text); border: 0; border-radius: 16px; padding: .5em .9em; cursor: pointer; transition: background .3s, color .3s, scale .25s var(--spring); }
.guess:active { scale: .97; }
.guess.fixed { background: var(--primary-tint); color: var(--primary-ink); }

.close { text-align: center; display: grid; gap: 32px; justify-items: center; padding-bottom: clamp(96px, 14vw, 180px); }
.fact { font-size: clamp(1.15rem, 1.8vw, 1.4rem); color: var(--muted); max-width: 38ch; }
.close h2 { font-size: clamp(3rem, 10vw, 7.5rem); line-height: .95; }
.big-pill { font-size: 1.05rem; padding: .7em 1.5em; }

footer { padding: 32px var(--gutter) 48px; border-top: 1px solid var(--hairline); display: grid; gap: 6px; justify-items: center; text-align: center; font-size: .85rem; color: var(--muted); }
footer .wordmark { margin-bottom: 6px; }

.motion [data-reveal] { opacity: 0; translate: 0 32px; transition: opacity .7s, translate .9s var(--spring); transition-delay: var(--rd, 0s); }
.motion [data-reveal].in { opacity: 1; translate: 0; }
.cards > :nth-child(2), .lines > :nth-child(2) { --rd: .1s; }
.cards > :nth-child(3), .lines > :nth-child(3) { --rd: .2s; }

/* ---------- phone widths ---------- */
@media (max-width: 820px) {
  h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); }
  .bar .pill { font-size: .78rem; }
  .app { grid-template-columns: 1fr; }
  .motion .beats { left: var(--gutter); right: var(--gutter); width: auto; top: 84px; bottom: auto; height: 40svh; }
  /* a frosted panel behind the words: on a phone the 3D picture runs under them */
  .motion .beats::before { content: ""; position: absolute; z-index: -1; inset: -84px calc(-1 * var(--gutter)) 8svh; background: rgb(255 255 255 / .4); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
  .motion .beat { top: 0; translate: 0 calc((1 - var(--o)) * 16px); gap: 6px; }
  .motion .beat.lead { gap: 12px; }
  .beat h2 { font-size: 1.8rem; }
  .motion .hint { left: 50%; bottom: 18px; }
  .scene > .notice, .scene > .saved { left: 50%; top: 40%; }
  .scene > .saved { top: 32%; font-size: 1.7rem; }
  .motion .dinner .beats::before { bottom: 24svh; } /* at dinner the words are short: a short frosted panel keeps "1 meal saved" sharp */
  .motion .dish { left: 10px; right: 10px; bottom: 10px; width: auto; padding: 10px 12px; gap: 6px; }
  .motion .dish .label:first-child, .motion .dish .chips { display: none; }
  .motion .dish h3 { font-size: 1.1rem; }
  .motion .foods img { width: 30px; }
  .motion .nutri { gap: 4px; font-size: .8rem; }
  .motion .beat:last-child { top: 0; }
  .motion .beat:last-child p:last-child { display: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .glass, .bar, .tabbar { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
}
