/* The Pea film, version six (5 October 2026).
   A short character film with the velvet Pea, shot like stop motion: real poses
   swapped on the beat, with squash, stretch and bounce on every change. After
   the hello and the paperwork, a day with Pea across the whole business, the
   admin and the advice: each scene shows the in-between, so you can see what
   Pea is doing. Then your data, the subscription bill Pea tears up, and the pod.
   Scenes run on CSS animations that start when a scene is shown, so pausing is
   one class (is-paused) and a still of any scene is ?filmscene=N. Timing on each
   element: --d is when it appears, --h when it goes. */

.pf { position: relative; max-width: 1040px; margin-inline: auto; }
.pf-stage { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r-lg); color: var(--band); background: #f8ece2; isolation: isolate; container-type: size;
  box-shadow: 0 50px 110px -50px rgba(70, 46, 26, .45), 0 0 0 1px rgba(34, 56, 26, .08); }

/* The set: the pastel light of the teaser poster, pink on the left, sage on the
   right, a bright middle and slow light rays drifting across. */
.pf-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(65% 95% at 4% 42%, rgba(240, 164, 168, .72), transparent 64%),
    radial-gradient(55% 85% at 98% 48%, rgba(158, 182, 140, .62), transparent 66%),
    radial-gradient(48% 52% at 50% 36%, rgba(255, 251, 243, .98), transparent 72%),
    linear-gradient(180deg, #fbf0e6 0%, #f7e9dd 62%, #f0dccb 100%); }
.pf-bg::before { content: ""; position: absolute; inset: -40% -20%; opacity: .75; filter: blur(22px);
  background: repeating-linear-gradient(112deg, rgba(255, 255, 255, 0) 0 6%, rgba(255, 255, 255, .55) 7.5% 9.5%, rgba(255, 255, 255, 0) 11% 17%);
  animation: pfRays 22s linear infinite; }
.pf-bg::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: radial-gradient(46% 60% at 50% 40%, rgba(255, 250, 243, .75), rgba(255, 250, 243, 0) 70%),
    linear-gradient(180deg, rgba(236, 214, 196, 0) 0%, rgba(236, 214, 196, .45) 45%, rgba(228, 202, 182, .62) 100%); }
@keyframes pfRays { to { transform: translateX(18%); } }

.pf-scene { position: absolute; inset: 0; z-index: 1; opacity: 0; visibility: hidden; }
.pf-scene.is-on { opacity: 1; visibility: visible; }

/* Everything that appears on a beat starts hidden and pops in at --d. */
.pf-pose, .pf-say, .pf-cap, .pf-title, .pf-word, .pf-pile, .pf-big, .pf-send, .pf-cursor, .pf-you, .pf-dots3, .pf-end > *, .pf-puff,
.pf-clock, .pf-card, .pf-row, .pf-pill, .pf-w, .pf-caret, .pf-spot, .pf-app { opacity: 0; }

/* Pea's rig: one square box standing on the floor; poses stack inside it, each
   standing on the same ground line, and only the current one is visible. */
.pf-rig { position: absolute; left: 50%; bottom: 10.5%; height: 66%; aspect-ratio: 1; transform: translateX(-50%); z-index: 2; }
.pf-rig--l { left: 31%; }
.pf-rig--lc { left: 37%; }
.pf-rig--v { left: 24%; height: 62%; }
.pf-rig--wide { aspect-ratio: 1.1; height: 70%; }
.pf-body { position: absolute; inset: 0; transform-origin: 50% 100%; }
.pf-pose { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; height: 100%; width: auto; max-width: none; transform-origin: 50% 100%; filter: drop-shadow(0 16px 18px rgba(70, 46, 26, .2)); user-select: none; pointer-events: none; }
.pf-pose--tall { height: 112%; }
.pf-shadow { position: absolute; left: 50%; bottom: -2%; width: 46%; height: 8%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(84, 56, 34, .34), rgba(84, 56, 34, 0)); }

.pf-scene.is-on .pf-body { animation: pfBreath 2.4s ease-in-out .6s infinite; }
@keyframes pfBreath { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, .985); } }

.pf-scene.is-on .pf-pose { animation: pfOn 1ms linear var(--d, 0s) forwards, pfPop .52s cubic-bezier(.25, 1.55, .45, 1) var(--d, 0s) both; }
.pf-scene.is-on .pf-pose.pf-x { animation: pfOn 1ms linear var(--d, 0s) forwards, pfPop .52s cubic-bezier(.25, 1.55, .45, 1) var(--d, 0s) both, pfOff 1ms linear var(--h, 99s) forwards; }
@keyframes pfOn { to { opacity: 1; } }
@keyframes pfOff { to { opacity: 0; } }
@keyframes pfPop {
  0% { transform: scale(1.14, .84) translateY(2%); }
  30% { transform: scale(.93, 1.09) translateY(-5%); }
  58% { transform: scale(1.03, .97) translateY(0); }
  78% { transform: scale(.99, 1.01); }
  100% { transform: none; }
}

/* Scene 1: Pea spins in to say hi. */
.pf-s1 .pf-shadow { opacity: 0; }
.pf-scene.pf-s1.is-on .pf-shadow { animation: pfOn 1ms linear .12s forwards; }
.pf-scene.is-on .pf-pose.pf-spin { animation: pfOn 1ms linear var(--d, 0s) forwards, pfSpin .7s cubic-bezier(.2, 1.3, .4, 1) var(--d, 0s) both; }
@keyframes pfSpin {
  0% { transform: scaleX(.06) scaleY(1.06) translateY(-10%); filter: blur(6px) drop-shadow(0 16px 18px rgba(70, 46, 26, .2)); }
  32% { transform: scaleX(1.16) scaleY(.88) translateY(0); filter: blur(0) drop-shadow(0 16px 18px rgba(70, 46, 26, .2)); }
  55% { transform: scaleX(.94) scaleY(1.07) translateY(-4%); }
  78% { transform: scaleX(1.02) scaleY(.98) translateY(0); }
  100% { transform: none; }
}
/* A hop: up and back down, used for celebrations. */
.pf-scene.is-on .pf-pose.pf-hop { animation: pfOn 1ms linear var(--d, 0s) forwards, pfHop .8s cubic-bezier(.3, 0, .3, 1) var(--d, 0s) both; }
.pf-scene.is-on .pf-pose.pf-hop.pf-x { animation: pfOn 1ms linear var(--d, 0s) forwards, pfHop .8s cubic-bezier(.3, 0, .3, 1) var(--d, 0s) both, pfOff 1ms linear var(--h, 99s) forwards; }
@keyframes pfHop {
  0% { transform: scale(1.12, .86); }
  18% { transform: scale(.92, 1.1) translateY(-6%); }
  48% { transform: translateY(-24%) rotate(-3deg); }
  80% { transform: scale(1.08, .9) translateY(0); }
  100% { transform: none; }
}
.pf-scene.is-on .pf-shadow.pf-hopshadow { animation: pfHopShadow .8s cubic-bezier(.3, 0, .3, 1) var(--d, 0s) both; }
@keyframes pfHopShadow { 48% { transform: translateX(-50%) scale(.6); opacity: .5; } }

/* Speech, captions and titles. */
.pf-say { position: absolute; z-index: 4; background: #fff; color: var(--band); font: 800 clamp(15px, 2.5vw, 30px)/1.05 var(--display); letter-spacing: -.02em; padding: .55em .85em .6em; border-radius: 22px; box-shadow: 0 16px 34px -14px rgba(70, 46, 26, .45); transform-origin: 8% 100%; white-space: nowrap; }
.pf-say::before { content: ""; position: absolute; left: 14%; bottom: -9px; border: 10px solid transparent; border-top-color: #fff; border-bottom: 0; }
.pf-say--flip { transform-origin: 92% 100%; }
.pf-say--flip::before { left: auto; right: 14%; }
.pf-scene.is-on .pf-say { animation: pfSay .5s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both; }
.pf-scene.is-on .pf-say.pf-x { animation: pfSay .5s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both, pfSayOut .2s ease-in var(--h, 99s) forwards; }
@keyframes pfSay { 0% { opacity: 0; transform: scale(.35) rotate(-6deg); } 100% { opacity: 1; transform: none; } }
@keyframes pfSayOut { to { opacity: 0; transform: scale(.7); } }

.pf-cap { position: absolute; z-index: 4; left: 5%; right: 5%; bottom: 4.5%; text-align: center; font: 800 clamp(17px, 2.7vw, 34px)/1.08 var(--display); letter-spacing: -.02em; text-wrap: balance; color: var(--band); }
.pf-cap em, .pf-title em, .pf-big em { font-style: normal; color: var(--pea); }
.pf-scene.is-on .pf-cap { animation: pfRise .6s cubic-bezier(.2, .9, .3, 1.15) var(--d, 0s) both; }
.pf-scene.is-on .pf-cap.pf-x { animation: pfRise .6s cubic-bezier(.2, .9, .3, 1.15) var(--d, 0s) both, pfOff .2s ease-in var(--h, 99s) forwards; }
@keyframes pfRise { 0% { opacity: 0; transform: translateY(40%); } 100% { opacity: 1; transform: none; } }

.pf-title { position: absolute; z-index: 4; left: 4%; right: 4%; top: 7%; text-align: center; font: 800 clamp(24px, 4.8vw, 60px)/.98 var(--display); letter-spacing: -.035em; color: #1f2a1c; text-wrap: balance; }
.pf-title--sm { font-size: clamp(20px, 3.6vw, 44px); top: 6%; }
.pf-scene.is-on .pf-title { animation: pfRise .7s cubic-bezier(.2, .9, .3, 1.15) var(--d, 0s) both; }
.pf-scene.is-on .pf-title.pf-x { animation: pfRise .7s cubic-bezier(.2, .9, .3, 1.15) var(--d, 0s) both, pfOff .25s ease-in var(--h, 99s) forwards; }

/* Scene 2: P, E, A. */
.pf-acro { position: absolute; z-index: 3; left: 52%; top: 50%; transform: translateY(-58%); display: grid; gap: .1em; font: 800 clamp(26px, 5.4vw, 66px)/1 var(--display); letter-spacing: -.035em; color: #1f2a1c; }
.pf-word b { color: var(--pea); }
.pf-scene.is-on .pf-word { animation: pfWord .5s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both; }
@keyframes pfWord { 0% { opacity: 0; transform: translateX(-24%) scale(.8); } 100% { opacity: 1; transform: none; } }

/* Scene 3: the day lands on Pea. */
.pf-paper { position: absolute; z-index: 3; left: var(--x); top: -26%; width: var(--w, 8.5%); aspect-ratio: .78; border-radius: 5px; background: #fffdf7; box-shadow: 0 8px 14px -6px rgba(70, 46, 26, .35); opacity: 0; }
.pf-paper::before { content: ""; position: absolute; inset: 20% 16%; background: repeating-linear-gradient(180deg, transparent 0 15%, rgba(70, 70, 60, .18) 15% 21%); }
.pf-paper--y { background: #ffe58c; aspect-ratio: 1; }
.pf-paper--p { background: #ffd0dc; aspect-ratio: 1; }
.pf-paper--b { background: #d6ebff; }
.pf-paper--env { background: #fbf3e2; aspect-ratio: 1.45; }
.pf-paper--env::before { inset: 0; background: linear-gradient(32deg, transparent 49%, rgba(150, 120, 80, .25) 50%, transparent 52%), linear-gradient(-32deg, transparent 49%, rgba(150, 120, 80, .25) 50%, transparent 52%); }
.pf-scene.is-on .pf-paper { animation: pfFall .62s cubic-bezier(.5, 0, .9, .55) var(--d, 0s) both, pfOff 1ms linear var(--h, 1.55s) forwards; }
@keyframes pfFall { 0% { opacity: 1; top: -26%; transform: rotate(var(--r0, -20deg)); } 100% { opacity: 1; top: var(--y, 60%); transform: rotate(var(--r1, 10deg)); } }
.pf-pile { position: absolute; z-index: 3; left: 50%; bottom: 8%; height: 74%; width: auto; max-width: none; transform: translateX(-50%); transform-origin: 50% 100%; filter: drop-shadow(0 16px 18px rgba(70, 46, 26, .2)); }
.pf-scene.is-on .pf-pile { animation: pfOn 1ms linear var(--d, 0s) forwards, pfThump .5s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both, pfJiggle .5s ease-in-out calc(var(--d, 0s) + .7s) 2; }
@keyframes pfThump { 0% { transform: translateX(-50%) scale(1.12, .8); } 45% { transform: translateX(-50%) scale(.96, 1.05); } 100% { transform: translateX(-50%); } }
@keyframes pfJiggle { 0%, 100% { transform: translateX(-50%) rotate(0); } 25% { transform: translateX(-50%) rotate(-2.2deg); } 75% { transform: translateX(-50%) rotate(2.2deg); } }
/* Pea's sprout pokes out of the top of the pile, so Pea takes the pile's thump
   and jiggle on the same beats and the sprout moves with the paper (JJ, 6 Oct:
   the pile jiggled and the sprout stayed put). */
.pf-scene.pf-s3.is-on .pf-body { animation: pfBodyThump .5s cubic-bezier(.25, 1.6, .4, 1) 1.55s, pfBodyJiggle .5s ease-in-out 2.25s 2; }
@keyframes pfBodyThump { 0% { transform: scale(1.12, .8); } 45% { transform: scale(.96, 1.05); } 100% { transform: none; } }
@keyframes pfBodyJiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-2.2deg); } 75% { transform: rotate(2.2deg); } }
.pf-puff { position: absolute; z-index: 2; left: 50%; bottom: 6%; width: 70%; height: 18%; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 250, 242, .95), rgba(255, 250, 242, 0)); }
.pf-scene.is-on .pf-puff { animation: pfPuff .7s ease-out var(--d, 0s) both; }
@keyframes pfPuff { 0% { opacity: .95; transform: translateX(-50%) scale(.4); } 100% { opacity: 0; transform: translateX(-50%) scale(1.5); } }

/* Confetti, for the good moments. */
.pf-bit { position: absolute; z-index: 3; left: var(--ox, 50%); top: var(--oy, 52%); width: 1.3%; aspect-ratio: 1; border-radius: 2px; background: var(--c, #6fa14a); opacity: 0; }
.pf-bit:nth-child(3n) { border-radius: 50%; }
.pf-scene.is-on .pf-bit { animation: pfBurst 1s cubic-bezier(.12, .75, .3, 1) var(--d, 0s) forwards; }
@keyframes pfBurst { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rr, 220deg)); } }

/* Scene 4: Easy peasy. */
.pf-big { position: absolute; z-index: 4; left: 54%; top: 50%; transform: translateY(-55%); font: 800 clamp(34px, 7.4vw, 92px)/.92 var(--display); letter-spacing: -.045em; color: #1f2a1c; }
.pf-big span { display: block; }
.pf-scene.is-on .pf-big { animation: pfBig .6s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both; }
@keyframes pfBig { 0% { opacity: 0; transform: translateY(-55%) scale(.4) rotate(-8deg); } 100% { opacity: 1; transform: translateY(-55%); } }
.pf-star { position: absolute; z-index: 4; width: 3.4%; aspect-ratio: 1; opacity: 0; background: #ffd25c; clip-path: polygon(50% 0, 61% 38%, 100% 50%, 61% 62%, 50% 100%, 39% 62%, 0 50%, 39% 38%); }
.pf-scene.is-on .pf-star { animation: pfTwinkle 1.2s ease-in-out var(--d, 0s) infinite both; }
@keyframes pfTwinkle { 0%, 100% { opacity: 0; transform: scale(.3) rotate(0); } 50% { opacity: 1; transform: scale(1) rotate(45deg); } }

/* A day with Pea (scenes 5 to 9): the time of day, and the cards Pea works on. */
.pf-clock { position: absolute; z-index: 5; left: 3.2%; top: 5%; display: inline-flex; align-items: center; gap: .45em; padding: .5em .9em .5em .65em; border-radius: 999px; background: rgba(255, 255, 255, .88); color: var(--band); font: 800 clamp(12px, 1.7cqw, 19px)/1 var(--body); box-shadow: 0 10px 24px -14px rgba(70, 46, 26, .5); }
.pf-clock svg { width: 1.15em; height: 1.15em; color: var(--pea); }
.pf-scene.is-on .pf-clock { animation: pfClock .45s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both; }
@keyframes pfClock { 0% { opacity: 0; transform: translateY(-60%) scale(.8); } 100% { opacity: 1; transform: none; } }

.pf-card { position: absolute; z-index: 3; left: 47.5%; width: 47%; background: #fff; color: var(--ink); border-radius: clamp(12px, 1.8cqw, 20px); text-align: left; font-size: clamp(10px, 1.5cqw, 16px);
  box-shadow: 0 24px 50px -26px rgba(70, 46, 26, .55), 0 0 0 1px rgba(34, 56, 26, .06); }
.pf-scene.is-on .pf-card { animation: pfCard .55s cubic-bezier(.2, 1.25, .35, 1) var(--d, 0s) both; }
@keyframes pfCard { 0% { opacity: 0; transform: translateY(18%) scale(.92) rotate(1.5deg); } 100% { opacity: 1; transform: none; } }
.pf-scene.is-on .pf-row { animation: pfRow .45s cubic-bezier(.2, 1.3, .35, 1) var(--d, 0s) both; }
@keyframes pfRow { 0% { opacity: 0; transform: translateX(8%); } 100% { opacity: 1; transform: none; } }

/* Scene 5: the morning page, the same page Pea opens for you each morning. */
.pf-today { top: 12%; background: none; box-shadow: none; border-radius: 0; }
.pf-today .today { width: 100%; font-size: 1em; box-shadow: 0 24px 50px -26px rgba(70, 46, 26, .55), 0 0 0 1px rgba(34, 56, 26, .06); }

/* Scene 5: day one. Pea plugs into your tools and spots what you'd miss. */
.pf-spots { position: absolute; z-index: 3; left: 47.5%; width: 47%; top: 8%; display: grid; gap: .55em; font-size: clamp(10px, 1.5cqw, 16px); }
.pf-spot { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .8em; padding: .75em .95em; border-radius: 14px; background: #fff; color: var(--ink); text-align: left;
  box-shadow: 0 18px 40px -24px rgba(70, 46, 26, .55), 0 0 0 1px rgba(34, 56, 26, .06); }
.pf-spot p { margin: 0; font-weight: 650; line-height: 1.3; }
.pf-scene.is-on .pf-spot { animation: pfSpot .5s cubic-bezier(.2, 1.3, .35, 1) var(--d, 0s) both; }
@keyframes pfSpot { 0% { opacity: 0; transform: translateX(12%) scale(.94); } 100% { opacity: 1; transform: none; } }
.pf-tool { display: inline-flex; align-items: center; gap: .45em; min-width: 6.4em; padding: .45em .7em; border-radius: 999px; font: 800 .74em/1 var(--body); letter-spacing: .03em; white-space: nowrap; background: #f1eee6; color: #3b3a33; }
.pf-tool::before { content: ""; width: .65em; height: .65em; border-radius: 50%; background: currentColor; }
.pf-tool--in { background: #e6efff; color: #2f5fb3; }
.pf-tool--ac { background: #e3f4fb; color: #127a9e; }
.pf-tool--ca { background: #e3efd2; color: var(--pea); }
.pf-tool--cl { background: #fbe9ee; color: #b0456a; }

/* Scene 7: an email arrives, Pea reads it, writes your reply, and you send it. */
.pf-mail { top: 8%; padding: 1em 1.2em 1.1em; }
.pf-mail__from { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75em; }
.pf-mail__from i { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: 50%; background: #d6ebff; color: #24507a; font: 800 1em/1 var(--display); font-style: normal; }
.pf-mail__from b { display: block; font: 800 1.15em/1.1 var(--display); letter-spacing: -.01em; }
.pf-mail__from small { display: block; margin-top: .15em; font-weight: 700; color: var(--ink); }
.pf-new { padding: .45em .75em; border-radius: 999px; background: var(--pea-hi); color: #fff; font: 800 .72em/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.pf-mail p { margin: .7em 0 0; color: var(--muted); font-weight: 500; }
.pf-draft { top: 35.5%; padding: 1em 1.2em 1.1em; box-shadow: 0 24px 50px -26px rgba(70, 46, 26, .55), 0 0 0 2px var(--pea-hi); }
.pf-draft__h { display: flex; align-items: center; justify-content: space-between; gap: .6em; font: 800 .95em/1 var(--body); color: var(--pea); }
.pf-draft__h > span:first-child { display: inline-flex; align-items: center; gap: .45em; }
.pf-draft__h svg { width: 1.1em; height: 1.1em; }
.pf-type { margin: .7em 0 0; font-weight: 600; line-height: 1.45; min-height: 2.9em; }
.pf-scene.is-on .pf-w { animation: pfOn 1ms linear var(--d, 0s) forwards; }
.pf-caret { display: inline-block; width: 2px; height: 1.1em; margin-left: 2px; vertical-align: -.18em; background: var(--pea); }
.pf-scene.is-on .pf-caret { animation: pfBlink .6s steps(1) var(--d, 0s) infinite, pfOff 1ms linear var(--h, 99s) forwards; }
@keyframes pfBlink { 0% { opacity: 1; } 50% { opacity: 0; } }
.pf-send { position: absolute; z-index: 4; left: 63%; top: 50%; display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-width: 8.4em; white-space: nowrap; padding: .65em 1.2em; border-radius: 999px; background: var(--pea); color: #fff; font: 800 clamp(15px, 2.3vw, 28px)/1 var(--body); box-shadow: 0 16px 30px -12px rgba(34, 56, 26, .6); transform-origin: 50% 50%; }
.pf-send svg { width: 1em; height: 1em; }
.pf-send .pf-sent { display: none; }
.pf-scene.is-on .pf-send { animation: pfSay .45s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both, pfPress .3s ease-out var(--t, 2s) both, pfSentBg 1ms linear calc(var(--t, 2s) + .15s) forwards; }
.pf-scene.is-on .pf-send .pf-go { animation: pfOff 1ms linear calc(var(--t, 2s) + .15s) forwards; }
.pf-scene.is-on .pf-send .pf-sent { display: inline-flex; align-items: center; gap: .45em; position: absolute; inset: 0; justify-content: center; opacity: 0; animation: pfOn 1ms linear calc(var(--t, 2s) + .15s) forwards; }
@keyframes pfPress { 0% { transform: scale(1); } 40% { transform: scale(.88); } 100% { transform: scale(1); } }
@keyframes pfSentBg { to { background: #2c4822; } }
.pf-cursor { position: absolute; z-index: 5; left: 86%; top: 88%; width: clamp(26px, 4.4vw, 52px); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .25)); }
.pf-scene.is-on .pf-cursor { animation: pfOn 1ms linear var(--d, 0s) forwards, pfPoint .75s cubic-bezier(.3, .7, .2, 1) var(--d, 0s) both, pfTap .25s ease-in-out calc(var(--d, 0s) + .8s) both, pfOff .3s linear calc(var(--d, 0s) + 1.6s) forwards; }
@keyframes pfPoint { from { left: 96%; top: 98%; } to { left: var(--cx, 74%); top: var(--cy, 58%); } }
@keyframes pfTap { 0%, 100% { transform: scale(1); } 50% { transform: scale(.82); } }

/* Scene 9: the nudge you sent this morning worked, and the money lands. */
.pf-nudge { top: 9%; padding: 1em 1.2em 1.1em; }
.pf-nudge p { margin: .6em 0 0; font-weight: 600; line-height: 1.4; color: var(--ink); }
.pf-paid { position: absolute; z-index: 4; left: 47.5%; width: 47%; top: 52%; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .8em; padding: .9em 1.1em; border-radius: clamp(12px, 1.8cqw, 20px); background: #fff; color: var(--ink); font-size: clamp(10px, 1.5cqw, 16px); text-align: left; opacity: 0;
  box-shadow: 0 24px 50px -24px rgba(70, 46, 26, .55), 0 0 0 2px var(--pea-hi); }
.pf-paid i { display: grid; place-items: center; width: 2.5em; height: 2.5em; border-radius: 50%; background: var(--pea-hi); color: #fff; }
.pf-paid i svg { width: 1.4em; height: 1.4em; }
.pf-paid b { display: block; font: 800 1.1em/1.1 var(--display); letter-spacing: -.01em; }
.pf-paid small { display: block; margin-top: .2em; font-weight: 650; color: var(--muted); }
.pf-paid em { font: 800 1.6em/1 var(--display); font-style: normal; letter-spacing: -.02em; color: var(--pea); }
.pf-scene.is-on .pf-paid { animation: pfSay .5s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both, pfTada .5s ease-in-out calc(var(--d, 0s) + .5s) both; }
@keyframes pfTada { 0%, 100% { rotate: 0deg; } 25% { rotate: -2deg; } 75% { rotate: 2deg; } }

/* You, talking to Pea (scenes 8 and 10), with the typing dots before it. */
.pf-you { position: absolute; z-index: 4; right: 6%; top: 8%; max-width: 46%; background: #e3efd2; color: var(--ink); font: 700 clamp(14px, 2.2vw, 26px)/1.2 var(--body); padding: .65em .95em; border-radius: 22px 22px 6px 22px; box-shadow: 0 14px 28px -16px rgba(34, 56, 26, .5); }
.pf-you small { display: block; font: 800 .6em/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--pea); margin-bottom: .5em; }
.pf-scene.is-on .pf-you { animation: pfSay .45s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both; transform-origin: 100% 100%; }
.pf-dots3 { position: absolute; z-index: 4; right: 6%; top: 8%; display: flex; gap: 6px; padding: .8em 1em; border-radius: 20px; background: #e3efd2; }
.pf-dots3 i { width: 9px; height: 9px; border-radius: 50%; background: var(--pea-hi); }
.pf-scene.is-on .pf-dots3 { animation: pfOn 1ms linear var(--d, 0s) forwards, pfOff 1ms linear var(--h, 1s) forwards; }
.pf-scene.is-on .pf-dots3 i { animation: pfBlip .9s ease-in-out infinite; }
.pf-dots3 i:nth-child(2) { animation-delay: .15s !important; } .pf-dots3 i:nth-child(3) { animation-delay: .3s !important; }
@keyframes pfBlip { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-5px); opacity: 1; } }

/* Scene 8: you ask whether to put your prices up. Pea checks your numbers and
   gives you its take. */
.pf-advice { top: 25%; padding: 1em 1.2em 1.1em; }
.pf-advice__h, .pf-plan__h { display: flex; align-items: center; gap: .45em; font: 800 .95em/1 var(--body); color: var(--pea); }
.pf-advice__h svg, .pf-plan__h svg { width: 1.2em; height: 1.2em; }
.pf-chk { display: flex; align-items: center; gap: .55em; margin-top: .65em; font-weight: 650; line-height: 1.25; color: var(--ink); }
.pf-chk svg { flex: none; width: 1.25em; height: 1.25em; padding: .18em; border-radius: 50%; background: var(--pea-hi); color: #fff; }
.pf-verdict { margin: .8em 0 0; padding: .7em .85em; border-radius: .7em; background: var(--pea-soft); color: var(--band); font: 800 1.12em/1.25 var(--display); letter-spacing: -.01em; opacity: 0; }
.pf-scene.is-on .pf-verdict { animation: pfCard .5s cubic-bezier(.2, 1.25, .35, 1) var(--d, 0s) both; }
.pf-next { display: flex; align-items: center; justify-content: space-between; gap: .6em; margin-top: .75em; font-weight: 650; color: var(--muted); opacity: 0; }
.pf-next b { flex: none; padding: .5em .85em; border-radius: 999px; background: var(--pea); color: #fff; font: 800 .9em/1 var(--body); }
.pf-scene.is-on .pf-next { animation: pfRow .45s cubic-bezier(.2, 1.3, .35, 1) var(--d, 0s) both; }

/* Scene 10: a shiny new idea. Pea keeps you on the plan and parks the idea
   for later. */
.pf-plan { top: 27%; padding: 1em 1.2em 1.1em; }
.pf-plan__row { display: grid; grid-template-columns: 3.3em 1fr auto; align-items: center; gap: .7em; margin-top: .75em; padding-top: .75em; border-top: 1px solid #edf0e6; }
.pf-plan__when { font: 800 .78em/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pf-plan__what b { display: block; font: 800 1.05em/1.15 var(--display); letter-spacing: -.01em; color: var(--ink); }
.pf-prog { display: block; height: .5em; margin-top: .45em; border-radius: 99px; background: #edf0e6; overflow: hidden; }
.pf-prog i { display: block; width: 62%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pea-hi), var(--pea)); transform-origin: 0 50%; }
.pf-scene.is-on .pf-prog i { animation: pfGrowX 1s cubic-bezier(.2, .8, .2, 1) calc(var(--d, 0s) + .3s) both; }
@keyframes pfGrowX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pf-plan__slot { display: flex; align-items: center; min-height: 2.3em; padding: .2em; border: 2px dashed #dfe3d6; border-radius: .6em; }
.pf-plan__slot em { display: inline-block; padding: .45em .75em; border-radius: .4em; background: #ffe58c; color: #3a2d0a; font: 800 .95em/1.1 var(--body); font-style: normal; box-shadow: 0 8px 14px -8px rgba(70, 46, 26, .45); rotate: -3deg; opacity: 0; }
.pf-scene.is-on .pf-plan__slot em { animation: pfDrop .55s cubic-bezier(.3, 1.5, .5, 1) var(--d, 0s) both; }
@keyframes pfDrop { 0% { opacity: 0; transform: translateY(-160%) rotate(-14deg) scale(.9); } 100% { opacity: 1; transform: none; } }
.pf-park { opacity: 0; }
.pf-scene.is-on .pf-park { animation: pfSay .4s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both; }

/* Scene 11: works with ChatGPT and Claude, and your data stays yours. */
.pf-app { position: absolute; z-index: 4; top: 30%; display: grid; justify-items: center; gap: .45em; font: 800 clamp(15px, 2.4cqw, 28px)/1 var(--display); color: var(--band); }
.pf-app small { font: 800 .48em/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--pea); }
.pf-app b { display: inline-flex; align-items: center; gap: .4em; padding: .55em .9em; border-radius: 999px; background: #fff; box-shadow: 0 16px 34px -16px rgba(70, 46, 26, .5); }
.pf-app svg { width: .9em; height: .9em; color: var(--pea-hi); }
.pf-app--l { left: 9%; }
.pf-app--r { right: 9%; }
.pf-scene.is-on .pf-app { animation: pfSay .5s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both, pfFloat 2.6s ease-in-out calc(var(--d, 0s) + .5s) infinite; }
@keyframes pfFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6%; } }

/* Scene 12: a monthly subscription bill drops in, and Pea tears it in half.
   The bill is drawn twice and each copy is cut down the same ragged line. */
.pf-rig--bill { left: 30%; height: 60%; }
.pf-bill { position: absolute; z-index: 3; left: 52%; top: 13%; width: 27%; aspect-ratio: .78; opacity: 0; filter: drop-shadow(0 18px 22px rgba(70, 46, 26, .3)); }
.pf-scene.is-on .pf-bill { animation: pfBillIn .6s cubic-bezier(.2, 1.3, .35, 1) var(--d, 0s) both; }
@keyframes pfBillIn { 0% { opacity: 0; transform: translateY(-45%) rotate(-14deg); } 50% { opacity: 1; } 100% { opacity: 1; transform: rotate(3deg); } }
.pf-bill__half { position: absolute; inset: 0; }
.pf-bill__l { clip-path: polygon(0 0, 53% 0, 48% 9%, 54% 19%, 47% 30%, 53% 41%, 48% 52%, 54% 63%, 47% 74%, 53% 85%, 49% 100%, 0 100%); }
.pf-bill__r { clip-path: polygon(53% 0, 100% 0, 100% 100%, 49% 100%, 53% 85%, 47% 74%, 54% 63%, 48% 52%, 53% 41%, 47% 30%, 54% 19%, 48% 9%); }
.pf-scene.is-on .pf-bill__l { animation: pfRipL .8s cubic-bezier(.45, 0, .8, .6) var(--t, 1.5s) forwards; }
.pf-scene.is-on .pf-bill__r { animation: pfRipR .8s cubic-bezier(.45, 0, .8, .6) var(--t, 1.5s) forwards; }
@keyframes pfRipL { 0% { transform: none; opacity: 1; } 18% { transform: translateX(-5%) rotate(-7deg); opacity: 1; } 100% { transform: translate(-45%, 95%) rotate(-40deg); opacity: 0; } }
@keyframes pfRipR { 0% { transform: none; opacity: 1; } 18% { transform: translateX(5%) rotate(7deg); opacity: 1; } 100% { transform: translate(45%, 95%) rotate(36deg); opacity: 0; } }
.pf-bill__in { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .55em; padding: 11% 11% 12%; border-radius: 6px; background: #fffdf7; color: #3b3a33; font: 700 clamp(9px, 1.45cqw, 17px)/1.2 var(--body); text-align: left; overflow: hidden; }
.pf-bill__k { font-size: .72em; letter-spacing: .18em; text-transform: uppercase; color: #8d8a7c; }
.pf-bill__t { font: 800 1.5em/1.02 var(--display); letter-spacing: -.025em; color: #1f2a1c; }
.pf-bill__ln { display: block; width: 92%; height: .55em; border-radius: 4px; background: #ece6d8; }
.pf-bill__ln--b { width: 70%; }
.pf-bill__ln--c { width: 82%; }
.pf-bill__due { margin-top: auto; padding-top: .6em; border-top: 1.5px dashed #ddd5c4; font-weight: 800; color: #6b6656; }
.pf-bill__stamp { position: absolute; right: 9%; bottom: 25%; padding: .35em .6em; border: .17em solid #c9473a; border-radius: .45em; color: #c9473a; font: 800 1.05em/1 var(--display); letter-spacing: .05em; text-transform: uppercase; rotate: -13deg; opacity: .88; }
.pf-say--bill { left: 13%; top: 15%; }

/* Scene 13: the end card. */
.pf-end { position: absolute; inset: 0; z-index: 3; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center; padding: 5.5% 5% 13%; text-align: center; }
.pf-end__t { font: 800 clamp(30px, 6vw, 74px)/.95 var(--display); letter-spacing: -.045em; color: #1f2a1c; }
.pf-end__pod { height: 100%; max-height: 52cqh; width: auto; max-width: 92%; object-fit: contain; filter: drop-shadow(0 18px 20px rgba(70, 46, 26, .22)); transform-origin: 50% 100%; }
.pf-end__row { display: flex; align-items: center; justify-content: center; gap: clamp(10px, 2vw, 22px); flex-wrap: wrap; }
.pf-end__s { font: 800 clamp(18px, 3vw, 36px)/1 var(--display); letter-spacing: -.02em; color: var(--pea); }
.pf-end .btn { pointer-events: auto; }
.pf-scene.is-on .pf-end > * { animation: pfSay .55s cubic-bezier(.25, 1.6, .4, 1) var(--d, 0s) both; transform-origin: 50% 100%; }

/* Controls. While the film plays muted, the sound button in the bar turns into
   "Watch with sound", so nothing floats over the scenes. */
.pf-bar { position: absolute; z-index: 6; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; pointer-events: none; }
.pf-bar > * { pointer-events: auto; }
.pf-dots { display: flex; gap: 5px; }
.pf-dots i { position: relative; width: 20px; height: 4px; border-radius: 4px; background: rgba(34, 56, 26, .16); overflow: hidden; }
.pf-dots i.is-done { background: rgba(63, 106, 43, .7); }
.pf-dots i.is-now::after { content: ""; position: absolute; inset: 0; background: var(--pea); transform-origin: 0 50%; animation: pfFill var(--dur, 4s) linear both; }
@keyframes pfFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.pf-ctrl { display: flex; gap: 8px; }
.pf-ctrl button { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .78); color: var(--band); border: 1px solid rgba(34, 56, 26, .16); border-radius: 999px; padding: 7px 14px; font: 700 14px var(--body); cursor: pointer; backdrop-filter: blur(6px); }
.pf-ctrl button:hover { border-color: var(--pea); }
.pf-ctrl svg { width: 14px; height: 14px; }
.pf-sound__s { display: none; }
.pf.is-mutedplay .pf-sound { background: var(--pea); color: #fff; border-color: var(--pea); box-shadow: 0 8px 20px -8px rgba(34, 56, 26, .6), 0 0 0 5px rgba(111, 161, 74, .22); }
.pf.is-mutedplay .pf-sound:hover { background: var(--band); }
.pf-bigplay { position: absolute; z-index: 7; left: 50%; bottom: 10%; transform: translateX(-50%); display: none; align-items: center; gap: 12px; background: var(--pea); color: #fff; border: 0; border-radius: 999px; padding: 16px 26px; font: 800 17px var(--body); cursor: pointer; white-space: nowrap; box-shadow: 0 16px 40px rgba(34, 56, 26, .35), 0 0 0 10px rgba(111, 161, 74, .22); }
.pf-bigplay svg { width: 20px; height: 20px; }
.pf.is-idle .pf-bigplay { display: inline-flex; }
.pf.is-idle .pf-dots, .pf.is-idle .pf-ctrl { visibility: hidden; }
.pf.is-paused .pf-stage *, .pf.is-paused .pf-stage *::before, .pf.is-paused .pf-stage *::after, .pf.is-paused .pf-dots i::after { animation-play-state: paused !important; }
.pf.is-static *, .pf.is-static *::before, .pf.is-static *::after, .pf.is-idle .pf-scene * { animation-delay: 0s !important; animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition: none !important; }
.pf.is-static .pf-bg::before, .pf.is-idle .pf-bg::before { animation: none !important; }
.pf.is-static .pf-caret, .pf.is-idle .pf-caret { animation: none !important; opacity: 0 !important; }

@media (prefers-reduced-motion: reduce) {
  .pf-bg::before { animation: none; }
}

/* Scene placements, desktop. */
.pf-day .pf-cap, .pf-s11 .pf-cap, .pf-s12 .pf-cap { font-size: clamp(16px, 2.4vw, 30px); }
/* Captions stay clear of the dots and the buttons in the bar beneath them. */
@media (min-width: 641px) { .pf-cap { left: 17%; right: 17%; } }
.pf-s1 .pf-say { left: 59%; top: 13%; }
.pf-s3 .pf-title { top: 6%; }
.pf-s3 .pf-say { left: 60%; top: 20%; }
.pf-s4 .pf-star:nth-of-type(1) { left: 56%; top: 16%; --d: .2s; }
.pf-s4 .pf-star:nth-of-type(2) { left: 88%; top: 30%; --d: .55s; }
.pf-s4 .pf-star:nth-of-type(3) { left: 61%; top: 74%; --d: .9s; }
.pf-say--v { left: 9.5%; top: 15.5%; }
.pf-s7 .pf-send { left: 63%; top: 73%; }
.pf-s7 .pf-cursor { --cx: 74%; --cy: 78%; }

/* Phones: a taller frame, Pea low, the cards above, and the controls under
   the frame so they never sit on top of a scene. */
@media (max-width: 640px) {
  .pf-stage { aspect-ratio: 2 / 3; border-radius: 22px; }
  .pf-rig, .pf-rig--l, .pf-rig--lc { left: 50%; height: 46%; bottom: 14%; }
  .pf-rig--wide { height: 46%; }
  .pf-title { top: 7%; font-size: clamp(26px, 8.4vw, 40px); }
  .pf-title--sm { font-size: clamp(22px, 7vw, 32px); }
  .pf-cap { bottom: 4.5%; font-size: clamp(18px, 5.6vw, 26px); }
  .pf-say { font-size: clamp(15px, 4.6vw, 22px); }
  .pf-acro { left: 50%; top: 7%; transform: translateX(-50%); text-align: center; gap: 0; font-size: clamp(24px, 7.4vw, 34px); }
  .pf-big { left: 50%; top: 9%; transform: translateX(-50%); text-align: center; font-size: clamp(40px, 13vw, 64px); }
  .pf-big span { display: inline; }
  .pf-scene.is-on .pf-big { animation-name: pfBigM; }
  @keyframes pfBigM { 0% { opacity: 0; transform: translateX(-50%) scale(.4) rotate(-8deg); } 100% { opacity: 1; transform: translateX(-50%); } }
  .pf-you { right: 5%; top: 8%; max-width: 74%; }
  .pf-dots3 { right: 5%; top: 8%; }
  .pf-pile { height: 56%; bottom: 13%; }
  .pf-end { padding: 10% 5% 12%; }
  .pf-end__pod { max-height: 40cqh; }

  .pf-clock { left: 4.5%; top: 3.2%; font-size: 3.6cqw; }
  .pf-rig--v { left: 27%; height: 36%; bottom: 13%; }
  .pf-card { left: 5%; width: 90%; font-size: 3.2cqw; border-radius: 14px; }
  .pf-today { top: 10%; }
  .pf-today .today__lvl, .pf-today .today__badges { display: none; }
  .pf-today .trow:nth-child(4) { display: none; }
  /* The Hendersons' invoice line runs to two lines here, so the card sits a
     little tighter to keep clear of "Here's your day." */
  .pf-today .today__top { padding: .8em 1em; }
  .pf-today .today__rows { gap: .4em; padding: .8em 1em; }
  .pf-today .trow { padding: .55em .7em; }
  .pf-spots { left: 5%; width: 90%; top: 10%; font-size: 3.1cqw; gap: .5em; }
  .pf-spot { padding: .6em .75em; gap: .6em; }
  .pf-spot:nth-child(4) { display: none; }
  .pf-app { top: 9%; font-size: 4.6cqw; }
  .pf-app--l { left: 8%; }
  .pf-app--r { right: 8%; }
  .pf-mail { top: 10%; }
  .pf-draft { top: 30.5%; }
  .pf-say--v { left: 47%; top: 54%; }
  .pf-s5 .pf-say--v { left: 44%; top: 41%; white-space: normal; max-width: 52%; }
  .pf-day .pf-cap, .pf-s11 .pf-cap, .pf-s12 .pf-cap { font-size: clamp(18px, 5.6vw, 26px); }
  .pf-day .pf-cap { bottom: 3.5%; }
  .pf-s7 .pf-send { left: 52%; top: 72%; font-size: clamp(14px, 4.4vw, 18px); }
  .pf-s7 .pf-cursor { --cx: 64%; --cy: 76%; }
  .pf-advice { top: 21%; }
  .pf-nudge { top: 10%; }
  .pf-paid { left: 5%; width: 90%; top: 36%; font-size: 3.4cqw; border-radius: 14px; }
  .pf-advice .pf-next { display: none; }
  .pf-plan { top: 23%; }
  .pf-s8 .pf-say--v, .pf-s10 .pf-say--v { left: 46%; top: 52%; white-space: normal; max-width: 50%; }
  .pf-rig--bill { left: 50%; height: 40%; bottom: 13%; }
  .pf-bill { left: 27%; top: 7%; width: 46%; }
  .pf-bill__in { font-size: 3.1cqw; }
  .pf-say--bill { left: 6%; top: 50%; }

  .pf-bar { position: static; padding: 10px 2px 0; }
  .pf-dots { gap: 3px; }
  .pf-dots i { width: 10px; }
  .pf-ctrl button { padding: 8px 12px; font-size: 13.5px; }
  .pf-sound__t { display: none; }
  .pf.is-mutedplay .pf-sound__s { display: inline; }
  .pf-bigplay { bottom: 8%; padding: 14px 22px; font-size: 16px; }
}
@media (max-width: 640px) {
  .pf-s1 .pf-say { left: 50%; top: 13%; transform-origin: 50% 100%; margin-left: -4em; }
  .pf-s3 .pf-say { margin-left: -4em; }
  .pf-s3 .pf-title { top: 5%; }
  .pf-s3 .pf-say { left: 50%; top: 22%; }
  .pf-s4 .pf-star:nth-of-type(1) { left: 12%; top: 34%; }
  .pf-s4 .pf-star:nth-of-type(2) { left: 82%; top: 38%; }
  .pf-s4 .pf-star:nth-of-type(3) { left: 76%; top: 70%; }
}
.pf-s12 .pf-cap em { white-space: nowrap; }
.pf-s9 .pf-cap em { white-space: nowrap; }
@media (max-width: 640px) {
  .pf-s8 .pf-say--v { left: 41%; white-space: nowrap; max-width: none; }
  .pf-s6 .pf-say--v { top: 66%; }
  /* 10 Oct: on phones the morning card sat over Pea's sprout; shrink it from the top */
  .pf-s6 .pf-today { scale: .84; transform-origin: 50% 0; }
}

/* Start again, shown while the film plays (7 October 2026) */
.pf-restart[hidden] { display: none; }
@media (max-width: 640px) { .pf-restart__t { display: none; } }

/* 10 Oct: while it plays muted at the start, the big "Watch with sound" sits over the frame for the first two scenes */
.pf.is-mutedplay.is-early .pf-bigplay { display: inline-flex; }
/* while the big pill (or the reduced-motion gate) shows, the bar's own sound button steps back */
.pf.is-idle .pf-sound, .pf.is-mutedplay.is-early .pf-sound { visibility: hidden; }
@media (max-width: 640px) { .pf-ctrl button { min-height: 44px; min-width: 44px; } }
