/* The intro film: eight short scenes, about 40 seconds, built in HTML so it
   stays sharp, loads with the page and needs no video player. Scenes fade in
   one at a time; the pieces inside each scene come in on their own delays. */

.film2 { position: relative; }
.f2-stage {
  position: relative; overflow: hidden; aspect-ratio: 16 / 9;
  border-radius: 28px; color: #fff; font-family: var(--font-body);
  background: radial-gradient(ellipse at 50% 38%, #213450 0%, #111e31 58%, #0b1626 100%);
  box-shadow: 0 0 0 1px rgba(227, 166, 59, 0.28), 0 50px 110px -40px rgba(11, 22, 38, 0.85), 0 0 140px -50px rgba(227, 166, 59, 0.45);
}
.f2-stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
.f2-stage::after {
  content: ""; position: absolute; left: 50%; top: 42%; width: 70%; height: 70%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(227, 166, 59, 0.16), transparent 62%); pointer-events: none;
}

/* Scenes */
.f2-scene { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; padding: 5% 6% 13%; opacity: 0; visibility: hidden; transition: opacity 0.55s ease, visibility 0s linear 0.55s; }
.f2-scene.is-on { opacity: 1; visibility: visible; transition: opacity 0.55s ease; }
html:not(.js) .f2-scene[data-s="8"] { opacity: 1; visibility: visible; }
.f2-in { opacity: 0; }
.is-on .f2-in { animation: f2in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) var(--d, 0s) both; }
.is-on .f2-pop { animation: f2pop 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) var(--d, 0s) both; }
@keyframes f2in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes f2pop { from { opacity: 0; transform: scale(0.85); } to { opacity: 1; transform: none; } }

.f2-big { margin: 0; max-width: 17ch; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.7rem, 4.3vw, 3.3rem); line-height: 1.14; letter-spacing: -0.015em; text-wrap: balance; }
.f2-big em { font-style: normal; color: var(--amber-hot); }
.f2-cap { position: absolute; z-index: 2; left: 4%; right: 4%; bottom: 7%; margin: 0; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.05rem, 2.5vw, 1.85rem); line-height: 1.2; color: #fff; text-wrap: balance; }
.f2-cap em { font-style: normal; color: var(--amber-hot); }

/* The agent */
.f2-bot { width: clamp(120px, 21vw, 230px); height: auto; overflow: visible; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.45)); }
.f2-bot--sm { width: clamp(90px, 13vw, 150px); }
.is-on .f2-bot { animation: f2bob 3.2s ease-in-out 0.6s infinite; }
@keyframes f2bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.f2-eye { transform-box: fill-box; transform-origin: center; animation: f2blink 4.2s ease-in-out infinite; }
@keyframes f2blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.12); } }
.f2-arm-wave { transform-box: fill-box; transform-origin: 20% 90%; }
.is-on .f2-arm-wave { animation: f2wave 1.1s ease-in-out 0.8s 3; }
@keyframes f2wave { 0%, 100% { transform: rotate(0deg); } 30% { transform: rotate(-38deg); } 65% { transform: rotate(-12deg); } }
.f2-hello { display: flex; align-items: center; gap: clamp(10px, 3vw, 34px); }
.f2-say { position: relative; background: #fff; color: var(--navy); font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.6vw, 1.9rem); padding: 0.55em 0.9em; border-radius: 22px; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.5); }
.f2-say::before { content: ""; position: absolute; left: -10px; bottom: 18px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }

/* The chat panel */
.f2-chat { width: min(640px, 100%); background: #fff; color: var(--ink); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08); text-align: left; }
.f2-chat__bar { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: #f3ebdd; border-bottom: 1px solid #e6dccb; font-family: var(--font-mono); font-size: 0.72rem; color: #5a6472; }
.f2-chat__bar i { width: 9px; height: 9px; border-radius: 50%; background: #d8cdbb; }
.f2-chat__bar span { margin-left: 6px; }
.f2-chat__body { padding: 14px 16px 16px; display: grid; gap: 10px; }
.f2-you { justify-self: end; max-width: 86%; background: var(--amber-wash); border-radius: 16px 16px 5px 16px; padding: 9px 13px; font-size: clamp(0.8rem, 1.5vw, 1rem); line-height: 1.45; }
.f2-agent { display: flex; gap: 10px; align-items: flex-start; }
.f2-avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; }
.f2-avatar svg { width: 22px; height: 22px; }
.f2-reply { background: #fbf7ef; border: 1px solid #e6dccb; border-radius: 16px 16px 16px 5px; padding: 10px 13px; font-size: clamp(0.8rem, 1.5vw, 1rem); line-height: 1.45; flex: 1; }
.f2-reply b { color: var(--navy); }
.f2-typing { display: inline-flex; gap: 4px; padding: 11px 13px; background: #fbf7ef; border: 1px solid #e6dccb; border-radius: 16px 16px 16px 5px; }
.f2-typing b { width: 6px; height: 6px; border-radius: 50%; background: #b9ad99; animation: f2dot 1s ease-in-out infinite; }
.f2-typing b:nth-child(2) { animation-delay: 0.15s; }
.f2-typing b:nth-child(3) { animation-delay: 0.3s; }
@keyframes f2dot { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }
.f2-typer { opacity: 0; }
.is-on .f2-typer { animation: f2typer var(--t, 1.4s) linear var(--d, 0.9s) both; }
@keyframes f2typer { 0% { opacity: 0; } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
.f2-rows { display: grid; gap: 6px; margin-top: 8px; }
.f2-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: baseline; padding: 7px 10px; background: #fff; border: 1px solid #ece3d3; border-radius: 10px; font-size: clamp(0.72rem, 1.3vw, 0.9rem); }
.f2-row span { font-weight: 800; font-size: 0.72em; letter-spacing: 0.12em; text-transform: uppercase; color: #8a5a0b; white-space: nowrap; }
.f2-lines { display: grid; gap: 5px; margin: 8px 0 2px; }
.f2-lines i { display: block; height: 7px; border-radius: 4px; background: #e8dfcf; }
.f2-lines i:nth-child(2) { width: 88%; }
.f2-lines i:nth-child(3) { width: 64%; }
.f2-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.f2-send { display: inline-flex; align-items: center; gap: 6px; background: var(--amber); color: var(--navy); font-weight: 800; font-size: clamp(0.72rem, 1.3vw, 0.88rem); padding: 6px 14px; border-radius: 999px; }
.is-on .f2-send { animation: f2press 0.5s ease var(--d, 3.6s) both; }
@keyframes f2press { 0% { transform: none; } 45% { transform: scale(0.9); box-shadow: 0 0 0 6px rgba(227, 166, 59, 0.35); } 100% { transform: none; } }
.f2-sent { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: clamp(0.72rem, 1.3vw, 0.88rem); color: #2f7a5b; }

/* Several jobs at once: three jobs, each one flips from Drafting to Ready */
.f2-jobs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; width: min(860px, 100%); }
.f2-job { background: #fff; color: var(--ink); border-radius: 16px; padding: 14px 16px 16px; box-shadow: 0 26px 60px -20px rgba(0, 0, 0, 0.6); text-align: left; }
.f2-job__top { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: clamp(0.78rem, 1.4vw, 1rem); line-height: 1.25; }
.f2-state { display: grid; margin-top: 12px; }
.f2-state > * { grid-area: 1 / 1; justify-self: start; }
.f2-tag { display: inline-block; font-size: clamp(0.66rem, 1.1vw, 0.78rem); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #8a5a0b; background: #fbeed3; border-radius: 999px; padding: 4px 10px; }
.f2-tag--ok { color: #2f7a5b; background: #e3f1ea; }
.f2-flip-in { opacity: 0; }
.is-on .f2-flip-out { animation: f2out 0.3s ease var(--d, 2s) both; }
.is-on .f2-flip-in { animation: f2pop 0.5s cubic-bezier(0.3, 1.5, 0.5, 1) var(--d, 2s) both; }
@keyframes f2out { to { opacity: 0; transform: scale(0.9); } }

/* Yours, in either app: the folder and what it holds */
.f2-home { display: grid; justify-items: center; gap: 20px; }
.f2-box { width: min(420px, 100%); background: #fff; color: var(--ink); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6); text-align: left; }
.f2-box__head { display: flex; align-items: center; gap: 10px; padding: 12px 18px; background: #f3ebdd; border-bottom: 1px solid #e6dccb; font-family: var(--font-mono); font-weight: 600; font-size: clamp(0.8rem, 1.5vw, 1rem); color: var(--navy); }
.f2-box__head svg { width: 24px; height: 24px; color: var(--amber-deep); }
.f2-box__list { list-style: none; margin: 0; padding: 10px 18px 14px; display: grid; gap: 2px; }
.f2-box__list li { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0e8da; font-weight: 700; font-size: clamp(0.82rem, 1.5vw, 1.02rem); }
.f2-box__list li:last-child { border-bottom: 0; }
.f2-box__list li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); }
.f2-apps { display: flex; align-items: center; gap: 10px; }
.f2-apps__label { font-size: clamp(0.8rem, 1.4vw, 0.95rem); font-weight: 700; color: #f0f0f0; }
.f2-app { font-weight: 800; font-size: clamp(0.85rem, 1.6vw, 1.05rem); padding: 8px 18px; border-radius: 999px; background: var(--amber); color: var(--navy); }

/* The end card */
.f2-end { display: grid; justify-items: center; gap: 14px; text-align: center; }
.f2-end__title { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1.1; }
.f2-end__sub { margin: 0; font-size: clamp(0.9rem, 1.8vw, 1.2rem); color: #f0f0f0; }
.f2-end .btn { margin-top: 6px; }

/* Controls */
.f2-bar { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; }
.f2-dots { display: flex; gap: 6px; }
.f2-dots i { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.22); overflow: hidden; position: relative; }
.f2-dots i.is-done { background: rgba(240, 180, 74, 0.8); }
.f2-dots i.is-now::after { content: ""; position: absolute; inset: 0; background: var(--amber-hot); transform-origin: 0 50%; animation: f2fill var(--dur, 5s) linear both; }
@keyframes f2fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.f2-replay { display: inline-flex; align-items: center; gap: 8px; background: rgba(11, 22, 38, 0.6); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.f2-replay:hover { border-color: var(--amber); }
.f2-replay svg { width: 14px; height: 14px; }
.f2-bigplay { position: absolute; z-index: 4; left: 50%; bottom: 13%; transform: translateX(-50%); white-space: nowrap; display: none; align-items: center; gap: 12px; background: var(--amber); color: var(--navy); border: 0; border-radius: 999px; padding: 16px 26px; font: inherit; font-weight: 800; font-size: 1.05rem; cursor: pointer; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 10px rgba(227, 166, 59, 0.25); }
.f2-bigplay svg { width: 20px; height: 20px; }
.film2.is-idle .f2-bigplay { display: inline-flex; }
.film2.is-idle .f2-cap, .film2.is-idle .f2-dots, .film2.is-idle .f2-replay { visibility: hidden; }
.film2.is-idle .f2-in, .film2.is-idle .f2-pop { opacity: 1; animation: none; }
.film2.is-idle .f2-bot, .film2.is-idle .f2-eye, .film2.is-idle .f2-arm-wave { animation: none; }
.film2.is-idle .f2-hello { margin-top: -9%; }
.film2.is-paused .f2-stage *, .film2.is-paused .f2-stage *::before, .film2.is-paused .f2-stage *::after, .film2.is-paused .f2-dots i::after { animation-play-state: paused !important; }
.f2-transcript { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 767px) {
  .f2-stage { aspect-ratio: 4 / 5; border-radius: 20px; }
  .f2-scene { padding: 7% 5% 122px; }
  .f2-cap { bottom: 60px; left: 5%; right: 5%; }
  .f2-bigplay { bottom: 64px; padding: 14px 22px; font-size: 1rem; }
  .film2.is-idle .f2-hello { margin-top: -18%; }
  .f2-end .btn { width: auto; min-height: 0; padding: 12px 20px; font-size: 0.95rem; white-space: nowrap; }
  .f2-hello { flex-direction: column; }
  .f2-say::before { left: 50%; top: -10px; bottom: auto; transform: translateX(-50%); border: 10px solid transparent; border-bottom-color: #fff; border-top: 0; }
  .f2-jobs { grid-template-columns: 1fr; gap: 10px; width: 88%; }
  .f2-job { padding: 12px 14px 13px; }
  .f2-state { margin-top: 8px; }
  .f2-box { width: 90%; }
  .f2-apps { flex-wrap: wrap; justify-content: center; }
  .f2-bar { padding: 10px 12px; }
  .f2-dots i { width: 14px; }
}
.f2-slot { flex: 1; display: grid; }
.f2-slot > * { grid-area: 1 / 1; }
.f2-slot .f2-typing { justify-self: start; align-self: start; }

/* You just talk: the voice bar and the words as they're said */
.f2-voice { width: min(660px, 100%); display: grid; gap: 22px; justify-items: center; }
.f2-voice__bar { display: flex; align-items: center; gap: 14px; background: #fff; color: var(--navy); border-radius: 999px; padding: 9px 22px 9px 9px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6); }
.f2-mic { width: 46px; height: 46px; border-radius: 50%; background: var(--amber); color: var(--navy); display: grid; place-items: center; }
.f2-mic svg { width: 22px; height: 22px; }
.is-on .f2-mic { animation: f2ring 1.3s ease-out 0.3s 3; }
@keyframes f2ring { 0% { box-shadow: 0 0 0 0 rgba(227, 166, 59, 0.6); } 100% { box-shadow: 0 0 0 16px rgba(227, 166, 59, 0); } }
.f2-wave { display: flex; align-items: center; gap: 4px; height: 30px; }
.f2-wave i { width: 4px; height: 30%; border-radius: 3px; background: var(--navy); opacity: 0.8; }
.is-on .f2-wave i { animation: f2talk 0.8s ease-in-out 0.3s infinite; }
.f2-wave i:nth-child(2) { animation-delay: 0.42s; }
.f2-wave i:nth-child(3) { animation-delay: 0.54s; }
.f2-wave i:nth-child(4) { animation-delay: 0.36s; }
.f2-wave i:nth-child(5) { animation-delay: 0.6s; }
.f2-wave i:nth-child(6) { animation-delay: 0.48s; }
.f2-wave i:nth-child(7) { animation-delay: 0.33s; }
.f2-wave i:nth-child(8) { animation-delay: 0.57s; }
.f2-wave i:nth-child(9) { animation-delay: 0.45s; }
@keyframes f2talk { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.f2-voice__label { font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #5a6472; }
.f2-said { margin: 0; max-width: 30ch; text-align: center; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.15rem, 2.5vw, 1.8rem); line-height: 1.3; color: #fff; text-wrap: balance; }

/* A job card's source line */
.f2-job__row { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; margin-top: 6px; }
.f2-job__src { margin: 0; font-size: clamp(0.68rem, 1.1vw, 0.84rem); color: #5a6472; }
.f2-job__row .f2-state { margin-top: 0; }

/* It comes back to you: the draft, ready for review */
.f2-review { width: min(600px, 100%); background: #fff; color: var(--ink); border-radius: 20px; overflow: hidden; box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.6); text-align: left; }
.f2-review__head { display: flex; align-items: center; gap: 10px; padding: 11px 16px; background: #f3ebdd; border-bottom: 1px solid #e6dccb; }
.f2-review__head b { font-size: clamp(0.85rem, 1.5vw, 1rem); color: var(--navy); }
.f2-review__head .f2-tag { margin-left: auto; }
.f2-review__body { padding: 14px 18px 16px; }
.f2-review__text { margin: 0; font-size: clamp(0.82rem, 1.5vw, 1.02rem); line-height: 1.5; }

/* It keeps the correction: the chat across two days */
.f2-chat--memo .f2-chat__body { gap: 8px; }
.f2-next { display: flex; align-items: center; gap: 10px; margin: 2px 0; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: #8a5a0b; }
.f2-next::before, .f2-next::after { content: ""; flex: 1; height: 1px; background: #e6dccb; }

@media (max-width: 767px) {
  .f2-voice { gap: 16px; }
  .f2-voice__bar { padding: 7px 16px 7px 7px; gap: 10px; }
  .f2-mic { width: 38px; height: 38px; }
  .f2-said { font-size: 1.12rem; }
  .f2-chat--memo .f2-chat__bar { display: none; }
  .f2-chat--memo .f2-chat__body { padding: 11px 12px 12px; gap: 6px; }
  .f2-chat--memo .f2-you, .f2-chat--memo .f2-reply { font-size: 0.78rem; padding: 7px 10px; }
  .f2-review__body { padding: 12px 14px 14px; }
  .f2-review__head .f2-tag { display: none; }
  .f2-job { padding: 10px 12px 11px; }
  .f2-job__row { flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; margin-top: 7px; }
}

/* The agent at work beside the screen, with happy eyes when a job is done */
.f2-duo { display: flex; align-items: center; justify-content: center; gap: clamp(16px, 3.5vw, 44px); width: 100%; }
.f2-duo > .f2-jobs { width: min(820px, 100%); }
.f2-bot--side { width: clamp(84px, 11vw, 150px); flex: none; }
.f2-happy { opacity: 0; }
.is-on .f2-bot--joy .f2-happy { animation: f2show 0.3s ease var(--joy, 99s) both; }
.is-on .f2-bot--joy .f2-eye { animation: f2blink 4.2s ease-in-out infinite, f2hide 0.3s ease var(--joy, 99s) both; }
@keyframes f2show { to { opacity: 1; } }
@keyframes f2hide { to { opacity: 0; } }

/* Light scenes, for a change of pace */
.f2-scene--light { background: radial-gradient(ellipse at 50% 38%, #fffaf0 0%, #f7ebd5 62%, #efdcbc 100%); }
.f2-scene--light .f2-cap { color: var(--navy); }
.f2-scene--light .f2-cap em { color: var(--amber-deep); }
.f2-scene--light .f2-said { color: var(--navy); }
.f2-scene--light .f2-voice__bar, .f2-scene--light .f2-review { box-shadow: 0 26px 50px -24px rgba(11, 22, 38, 0.4); }
.film2.is-light .f2-dots i { background: rgba(11, 22, 38, 0.18); }
.film2.is-light .f2-dots i.is-done { background: rgba(138, 90, 11, 0.75); }
.film2.is-light .f2-replay { background: rgba(11, 22, 38, 0.8); }
.f2-review__text--more { margin-top: 8px; color: #5a6472; }

@media (max-width: 767px) {
  .f2-duo { flex-direction: column; gap: 8px; }
  .f2-bot--side { width: 62px; }
  .f2-duo--tall .f2-bot--side { display: none; }
  .f2-review__text--more { display: none; }
}

/* ---------------------------------------------------------------------------
   Pea (JJ, 2 October 2026): the agent is a pea in a bow tie. P, E, A stands
   for personal executive assistant. It pops out of its pod, waves, talks,
   puts a little pea on every job, and the film has sound.
   --------------------------------------------------------------------------- */
.f2-pea { overflow: visible; }
.is-on .f2-pea { animation: f2peain 0.55s cubic-bezier(0.3, 1.5, 0.5, 1) var(--d, 0s) both, f2bob 3.2s ease-in-out calc(var(--d, 0s) + 0.7s) infinite; }
@keyframes f2peain { from { opacity: 0; transform: translateY(14px) scale(0.8); } to { opacity: 1; transform: none; } }
.f2-pea .f2-arm-wave { transform-origin: 15% 85%; }
.f2-pea .pea-sprout { transform-box: fill-box; transform-origin: 20% 100%; }
.is-on .f2-pea .pea-sprout { animation: f2sway 2.4s ease-in-out 0.5s infinite; }
@keyframes f2sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(7deg); } }
.f2-pea .pea-mouth { transform-box: fill-box; transform-origin: 50% 0%; }
.is-on .f2-pea--talk .pea-mouth { animation: f2peatalk 0.2s ease-in-out var(--talk, 1.3s) 4; }
@keyframes f2peatalk { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(2.1); } }
.f2-mini .f2-eye { transform-box: fill-box; transform-origin: center; }

/* Scene 1: the whole business in your head */
.f2-clutter { position: absolute; inset: 0; pointer-events: none; }
.f2-chip {
  position: absolute; left: var(--x); top: var(--y); display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.45em 0.95em; border-radius: 999px; background: #fff; color: #14202e; font-weight: 700;
  font-size: clamp(0.66rem, 1.3vw, 0.95rem); white-space: nowrap; box-shadow: 0 14px 30px -12px rgba(0, 0, 0, 0.6);
  opacity: 0; transform: rotate(var(--r, 0deg));
}
.f2-chip::before { content: ""; flex: none; width: 0.5em; height: 0.5em; border-radius: 50%; background: #e2564b; }
.is-on .f2-chip { animation: f2chip 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) var(--d) both, f2jit 1.3s ease-in-out calc(var(--d) + 0.4s) infinite; }
@keyframes f2chip { from { opacity: 0; transform: rotate(var(--r, 0deg)) scale(0.5); } to { opacity: 1; transform: rotate(var(--r, 0deg)) scale(1); } }
@keyframes f2jit { 0%, 100% { transform: rotate(var(--r, 0deg)) translate(0, 0); } 50% { transform: rotate(calc(var(--r, 0deg) * -0.6)) translate(2px, -3px); } }
.f2-scene--busy .f2-big { position: relative; z-index: 2; text-shadow: 0 6px 30px rgba(11, 22, 38, 0.95); }

/* Scene 2: the pod pops, Pea says hello, and P, E, A light up */
.f2-hellowrap { display: grid; justify-items: center; gap: clamp(14px, 3vw, 30px); }
.f2-scene--hello .f2-pea { width: clamp(112px, 17vw, 200px); }
.f2-podwrap { position: relative; display: grid; place-items: center; }
.f2-podwrap .f2-pea { position: relative; z-index: 2; }
.is-on .f2-pea--jump { animation: f2bob 3.2s ease-in-out 1.7s infinite; }
.f2-pea--jump .pea-all { transform-box: view-box; transform-origin: 100px 214px; }
.is-on .f2-pea--jump .pea-all { animation: f2jump 0.7s cubic-bezier(0.25, 1.55, 0.45, 1) 0.8s both; }
@keyframes f2jump { 0% { opacity: 0; transform: translateY(16px) scale(0.2); } 25% { opacity: 1; } 100% { opacity: 1; transform: none; } }
.f2-pea--jump .pea-shadow { opacity: 0; }
.is-on .f2-pea--jump .pea-shadow { animation: f2shadow 0.3s ease 1.1s forwards; }
@keyframes f2shadow { to { opacity: 0.3; } }
.f2-pod { position: absolute; left: -22%; width: 144%; bottom: -10%; height: auto; overflow: visible; pointer-events: none; opacity: 0; }
.f2-pod--back { z-index: 1; }
.f2-pod--front { z-index: 3; }
.is-on .f2-pod { animation: f2podin 0.4s cubic-bezier(0.3, 1.5, 0.5, 1) 0s both, f2podwig 0.4s ease-in-out 0.38s 1, f2podout 0.45s ease-in 1.25s forwards; }
@keyframes f2podin { from { opacity: 0; transform: translateY(-40px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes f2podwig { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes f2podout { from { opacity: 1; } to { opacity: 0; transform: translateY(26px) scale(0.92); } }
.f2-pod .pod-lid { transform-box: view-box; transform-origin: 14px 70px; }
.is-on .f2-pod .pod-lid { animation: f2lid 0.35s cubic-bezier(0.3, 1.4, 0.5, 1) 0.78s both; }
@keyframes f2lid { to { transform: rotate(-42deg); } }
.f2-acro { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(8px, 1.6vw, 16px); }
.f2-acro__l {
  display: inline-flex; align-items: baseline; padding: 0.32em 0.85em 0.4em; border-radius: 14px;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(240, 180, 74, 0.5);
  font-family: var(--font-display); font-weight: 600; font-size: clamp(0.95rem, 2.1vw, 1.5rem); color: #f0f0f0;
  box-shadow: 0 14px 30px -16px rgba(0, 0, 0, 0.6);
}
.f2-acro__l b { color: var(--amber-hot); font-weight: 800; font-size: 1.4em; line-height: 1; margin-right: 1px; }

/* A little Pea on every job, and one on the folder */
.f2-avatar--pea { background: #14202e; }
.f2-avatar--pea svg { width: 27px; height: 27px; }
.f2-boxwrap { position: relative; width: min(420px, 100%); }
.f2-boxwrap .f2-box { width: 100%; }
.f2-boxpea { position: absolute; z-index: 2; right: -18px; top: -36px; width: clamp(50px, 7vw, 72px); opacity: 0; overflow: visible; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.45)); }
.is-on .f2-boxpea { animation: f2peain 0.5s cubic-bezier(0.3, 1.6, 0.5, 1) 1.8s both, f2bob 3s ease-in-out 2.4s infinite; }

/* The end card */
.f2-end__title em { font-style: normal; color: var(--amber-hot); }

/* Sound */
.f2-ctrls { display: flex; align-items: center; gap: 8px; }
.f2-sound { display: inline-flex; align-items: center; gap: 8px; background: rgba(11, 22, 38, 0.6); color: #fff; border: 1px solid rgba(255, 255, 255, 0.35); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; }
.f2-sound:hover { border-color: var(--amber); }
.f2-sound svg { width: 16px; height: 16px; }
.f2-sound[aria-pressed="true"] { border-color: var(--amber); }
.film2.is-light .f2-sound { background: rgba(11, 22, 38, 0.8); }
.f2-soundtip {
  position: absolute; z-index: 4; top: 14px; right: 14px; display: none; align-items: center; gap: 8px;
  background: var(--amber); color: var(--navy); border: 0; border-radius: 999px; padding: 10px 18px;
  font: inherit; font-weight: 800; font-size: 0.92rem; cursor: pointer; animation: f2tip 2.2s ease-out infinite;
}
.f2-soundtip svg { width: 18px; height: 18px; }
.film2.is-mutedplay .f2-soundtip { display: inline-flex; }
@keyframes f2tip {
  0% { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 0 rgba(227, 166, 59, 0.6); }
  70%, 100% { box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 0 14px rgba(227, 166, 59, 0); }
}

/* Reduced motion: rest on the hello, pod gone, everything in place */
.film2.is-idle .f2-pod, .film2.is-idle .f2-soundtip, .film2.is-idle .f2-sound { display: none; }
.film2.is-idle .f2-pea, .film2.is-idle .pea-all, .film2.is-idle .pea-sprout, .film2.is-idle .pea-mouth { animation: none; opacity: 1; }
.film2.is-idle .f2-pea--jump .pea-shadow { animation: none; opacity: 0.3; }
.film2.is-idle .f2-hellowrap { margin-top: -10%; }

@media (max-width: 767px) {
  .f2-chip { left: var(--mx, var(--x)); font-size: 0.64rem; }
  .f2-chip:nth-child(6), .f2-chip:nth-child(7) { display: none; }
  .f2-scene--hello .f2-pea { width: 112px; }
  .f2-hellowrap { gap: 14px; }
  .f2-acro { gap: 6px; }
  .f2-acro__l { font-size: 0.86rem; padding: 0.3em 0.6em 0.36em; border-radius: 11px; }
  .f2-avatar--pea svg { width: 24px; height: 24px; }
  .f2-boxwrap { width: 90%; }
  .f2-boxpea { right: -8px; top: -30px; width: 46px; }
  .film2.is-mutedplay .f2-soundtip { display: none; }
  .film2.is-mutedplay .f2-sound { background: var(--amber); color: var(--navy); border-color: var(--amber); animation: f2tip 2.2s ease-out infinite; }
  .f2-sound { padding: 7px 12px; }
  .film2:not(.is-mutedplay) .f2-sound .f2-sound__t { display: none; }
  .f2-dots { gap: 5px; }
  .f2-dots i { width: 10px; }
  .film2.is-idle .f2-hellowrap { margin-top: -12%; }
  .f2-bigplay__more { display: none; }
}
