/* Travel Fit motion kit v1 (2026-11-25). Coach G, the 3D icons and the emblem, animated from the existing
   PNG/WebP files. Free: plain CSS plus tf-motion.js. Nothing paid, no library.
   PROPOSED until Julian picks the keepers.
   Rules: transform and opacity only. The base style of every piece IS its still frame, so with
   prefers-reduced-motion, or data-motion="off" on any ancestor, everything rests on a sensible frame.
   Naming follows ../motion.css: tf- prefix. tf-bob and tf-pop are the same keyframes as there.
   Colours fall back to the brand tokens if the page has no --tf-* variables.
   Usage and markup: README.md in this folder. */

.tf-m { --tf-navy-c: var(--tf-navy, #131730); --tf-blue-c: var(--tf-blue, #8EA5CF);
  --tf-ease-out: cubic-bezier(.22, 1, .36, 1); --tf-ease-soft: cubic-bezier(.34, 1.2, .64, 1); }

/* ---------- 1. Coach G stage: frames stacked on the 1200 x 1700 canvas ---------- */
.tf-coach { position: relative; aspect-ratio: 1200 / 1700; container-type: inline-size; }
.tf-coach .tf-body { position: absolute; inset: 0; transform-origin: 50% 100%; }
.tf-coach .tf-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  object-position: center bottom; opacity: 0; }
.tf-coach .tf-frame:first-child { opacity: 1; }                   /* still frame = the first pose */
.tf-coach[data-live] .tf-frame { opacity: 0; }
.tf-coach[data-live] .tf-frame.is-on { opacity: 1; animation: tf-settle .42s var(--tf-ease-out) both; }
/* soft floor shadow, so a hop reads as leaving the ground */
.tf-coach .tf-shadow { position: absolute; left: 24%; right: 24%; bottom: 0.6%; height: 3.2%; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(19, 23, 48, .28), transparent); transform-origin: 50% 50%; }

/* idle: a slow bob (default) or a breath. Put the class on .tf-coach */
.tf-coach.tf-idle-bob .tf-body { animation: tf-bob 3.6s ease-in-out infinite; }
.tf-coach.tf-idle-breathe .tf-body { animation: tf-breathe 4.2s ease-in-out infinite; }
/* bounce: an option, the livelier end. A small hop every few seconds, not a cartoon spring */
.tf-coach.tf-hop .tf-body { animation: tf-hop 2.8s var(--tf-ease-out) infinite; }
.tf-coach.tf-hop .tf-shadow { animation: tf-shadow-hop 2.8s var(--tf-ease-out) infinite; }
/* enter: slides up and settles once */
.tf-coach.tf-enter { animation: tf-coach-in .7s var(--tf-ease-out) both; }   /* on the stage, so it combines with an idle */

/* ---------- 2. Icons popping in a row, like the kit chips ---------- */
/* <div class="tf-pop-row"> children get style="--i:0..n"; add .is-on (tf-motion.js does it when visible) */
.tf-pop-row > * { opacity: 1; }
.tf-pop-row.is-armed > * { opacity: 0; }
.tf-pop-row.is-on > * { opacity: 1; animation: tf-pop .5s var(--tf-ease-soft) both; animation-delay: calc(var(--i, 0) * 110ms); }

/* ---------- 3. Emblem ---------- */
/* 3a. wipe on, left to right. Two opposite translates on nested boxes = a reveal with transform only */
.tf-wipe { overflow: hidden; display: inline-block; }
.tf-wipe > .tf-wipe-in { display: block; width: 100%; height: auto; }   /* must be the wrapper's width */
.tf-wipe.is-on { animation: tf-wipe-out 1.1s var(--tf-ease-out) both; }
.tf-wipe.is-on > .tf-wipe-in { animation: tf-wipe-in 1.1s var(--tf-ease-out) both; }
/* 3b. stamp: lands with a small press, like the logo going onto the tank */
.tf-stamp.is-on { animation: tf-stamp .55s var(--tf-ease-out) both; }
/* 3c. turn through the real angled views (left, front, right, front). Front is the still */
.tf-turn { position: relative; aspect-ratio: 1; }
.tf-turn > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.tf-turn > img.v-front { opacity: 1; }
.tf-turn.is-on > img { animation: 6s ease-in-out infinite both; }
.tf-turn.is-on > img.v-front { animation-name: tf-turn-front; }
.tf-turn.is-on > img.v-left  { animation-name: tf-turn-left; }
.tf-turn.is-on > img.v-right { animation-name: tf-turn-right; }
/* 3d. sway: one flat emblem rocking in 3D, for comparison with 3c */
/* tf-sf: the emblem floats, glows and sways (the canvas's em-sf; Julian's Home pick, ruled for the website footer
   2026-11-25: "the floating one more, and the smooth sway"). Markup: <div class="tf-sf" aria-hidden="true"><img src="emblem"></div>.
   Still frame = the emblem flat, facing front, no glow. Glow is an opacity-only halo (the canvas animated a drop-shadow filter). */
.tf-sf { position: relative; perspective: 1100px; }
.tf-sf > img { position: relative; display: block; width: 100%; }
.tf-sf::before { content: ""; position: absolute; inset: 6%; border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(closest-side, rgba(142,165,207,.55), rgba(142,165,207,0)); }
.tf-sf.is-on { animation: tf-sf-float 7s ease-in-out infinite; }
.tf-sf.is-on::before { animation: tf-sf-glow 7s ease-in-out infinite; }
.tf-sf.is-on > img { animation: tf-sf-sway 11s cubic-bezier(.45, 0, .55, 1) infinite; }
@media (prefers-reduced-motion: reduce) { .tf-sf, .tf-sf::before, .tf-sf > img { animation: none !important; } }
[data-motion="off"] .tf-sf::before { animation: none !important; }
.tf-sf[data-tf-paused]::before { animation-play-state: paused !important; }
.tf-sway { perspective: 900px; }
.tf-sway > img { display: block; width: 100%; }
.tf-sway.is-on > img { animation: tf-sway 6s ease-in-out infinite; }

/* ---------- 4. Scrolling strip: coach and icons drifting past ---------- */
/* tf-motion.js doubles the track's children (the copy is aria-hidden) so the loop has no seam */
.tf-strip { overflow: hidden; }
.tf-strip .tf-track { display: flex; align-items: flex-end; gap: var(--gap, 28px); width: max-content; }
.tf-strip.is-on .tf-track { animation: tf-marquee var(--dur, 38s) linear infinite; }
.tf-strip:hover .tf-track, .tf-strip:focus-within .tf-track { animation-play-state: paused; }

/* ---------- 5. More (v1.1, 2026-11-25) ---------- */
/* 5a. any [data-seq] box of .tf-frame children steps like the coach; .tf-cycle pops each item in (one chip, rotating kit) */
.tf-cycle { position: relative; }
.tf-cycle .tf-frame { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; }
.tf-cycle .tf-frame:first-child { opacity: 1; }
.tf-cycle[data-live] .tf-frame { opacity: 0; }
.tf-cycle[data-live] .tf-frame.is-on { opacity: 1; animation: tf-pop .45s var(--tf-ease-soft) both; }
/* 5b. medal swings from its ribbon; flame flickers from its base. Plain objects, no faces */
.tf-swing { transform-origin: 50% 4%; animation: tf-swing 2.6s ease-in-out infinite; }
.tf-flicker { transform-origin: 50% 92%; animation: tf-flicker 1.4s ease-in-out infinite alternate; }
/* 5c. icons floating around Coach G: each drifts on its own timing (--i) */
.tf-float > * { animation: tf-float calc(3.4s + var(--i, 0) * .37s) ease-in-out infinite; animation-delay: calc(var(--i, 0) * -.9s); }
/* 5d. peek: Coach G rises from the bottom edge of a card, once */
.tf-peek { overflow: hidden; }
.tf-peek.is-on > .tf-peek-in { animation: tf-peek .9s var(--tf-ease-out) both; animation-delay: var(--d, 0s); }
/* 5e. speech bubble pops from its tail; thinking dots */
.tf-bubble { transform-origin: 12% 100%; }
.tf-bubble.is-on { animation: tf-bubble .5s var(--tf-ease-soft) both; animation-delay: var(--d, .3s); }
.tf-dots { display: inline-flex; gap: .32em; }
.tf-dots > i { width: .5em; height: .5em; border-radius: 50%; background: currentColor; opacity: .35; animation: tf-dot 1.2s ease-in-out infinite; }
.tf-dots > i:nth-child(2) { animation-delay: .15s; } .tf-dots > i:nth-child(3) { animation-delay: .3s; }
/* 5f. rise: fade up once, in order (--d); for building a "Done" card or a website section */
.tf-rise-group.is-on .tf-rise { animation: tf-rise .6s var(--tf-ease-out) both; animation-delay: var(--d, 0s); }

/* ---------- 6. Third batch (v1.2, 2026-11-25) ---------- */
/* 6a. confirm: an icon pops and one soft ring spreads behind it, once. Done, saved, booked */
.tf-confirm { position: relative; display: inline-grid; place-items: center; }
.tf-confirm::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; border: 3px solid var(--tf-blue-c); opacity: 0; }
.tf-confirm.is-on > * { animation: tf-pop .5s var(--tf-ease-soft) both; }
.tf-confirm.is-on::before { animation: tf-ring .9s var(--tf-ease-out) .15s both; }
/* 6b. lift: website cards rise a little on hover or keyboard focus (a transition, so it is still when untouched) */
.tf-lift { transition: transform .25s var(--tf-ease-out); position: relative; }
.tf-lift::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 14px 30px rgba(19, 23, 48, .16); opacity: 0; transition: opacity .25s; pointer-events: none; }
.tf-lift:hover, .tf-lift:focus-within { transform: translateY(-4px); }
.tf-lift:hover::after, .tf-lift:focus-within::after { opacity: 1; }
.tf-lift:hover .tf-lift-icon, .tf-lift:focus-within .tf-lift-icon { transform: translateY(-3px) rotate(-4deg); }
.tf-lift-icon { transition: transform .3s var(--tf-ease-soft); }
/* 6c. reveal: anything fades up once as it scrolls into view (website sections). --d staggers */
.tf-reveal.is-on { animation: tf-rise .7s var(--tf-ease-out) both; animation-delay: var(--d, 0s); }
/* 6d. loader: the emblem breathing, with dots. While a workout is being built */
.tf-loader { display: inline-flex; flex-direction: column; align-items: center; gap: .6em; }
.tf-loader > img { animation: tf-glow 1.8s ease-in-out infinite; }
/* 6e. lean: Coach G leans in a touch, like he's listening. Put on .tf-coach */
.tf-coach.tf-lean .tf-body { animation: tf-lean 4.8s ease-in-out infinite; }
/* 6f. roll: a number rolls up to the next one, once (streak day 4 -> 5). <span class="tf-roll"><span><b>4</b><b>5</b></span></span> */
.tf-roll { display: inline-block; height: 1em; line-height: 1; overflow: hidden; vertical-align: bottom; }
.tf-roll > span { display: flex; flex-direction: column; }
.tf-roll > span > b { display: block; height: 1em; font: inherit; }
.tf-roll > span { transform: translateY(-50%); }                      /* still frame: the new number */
.tf-roll.is-on > span { animation: tf-roll .7s var(--tf-ease-soft) .4s both; }

/* ---------- 7. Fourth batch (v1.3, 2026-11-25) ---------- */
/* 7a. fan: a stack of cards spreads into place, once. Each child sets its resting spot: style="--tx:-60%;--r:-6deg" */
.tf-fan { position: relative; }
.tf-fan > * { transform: translateX(var(--tx, 0)) rotate(var(--r, 0deg)); }
.tf-fan.is-on > * { animation: tf-fan .7s var(--tf-ease-soft) both; animation-delay: calc(var(--i, 0) * 90ms); }
/* 7b. progress: the bar fills to --p (0..1) with scaleX, once. <div class="tf-progress" style="--p:.6"><i></i></div> */
.tf-progress { overflow: hidden; }
.tf-progress > i { display: block; height: 100%; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.tf-progress.is-on > i { animation: tf-fill-bar 1.1s var(--tf-ease-out) .2s both; }
/* 7c. week: the day dots pop in one after another, once */
.tf-week.is-on > * { animation: tf-pop .45s var(--tf-ease-soft) both; animation-delay: calc(var(--i, 0) * 80ms); }
/* 7d. tick: a small nudge every second, like a clock hand. For the rest timer */
.tf-tick { animation: tf-tick 1s ease-out infinite; transform-origin: 50% 55%; }
/* 7e. ripple: a row of icons hops in a wave, once */
.tf-ripple.is-on > * { animation: tf-ripple .6s var(--tf-ease-out) both; animation-delay: calc(var(--i, 0) * 70ms); }
/* 7f. pulse: a soft ring leaves a button every few seconds. For one main call to action per page, at most */
.tf-pulse { position: relative; }
.tf-pulse::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 2px var(--tf-blue-c); opacity: 0; animation: tf-pulse 3.2s var(--tf-ease-out) infinite; pointer-events: none; }

/* paused off screen or in a hidden tab (tf-motion.js sets it) */
[data-tf-paused], [data-tf-paused] * { animation-play-state: paused !important; }

/* ---------- still frames ---------- */
@media (prefers-reduced-motion: reduce) {
  .tf-m *, .tf-m { animation: none !important; transition: none !important; }
  .tf-pop-row.is-armed > * { opacity: 1; }
}
[data-motion="off"], [data-motion="off"] * { animation: none !important; transition: none !important; }
[data-motion="off"] .tf-pop-row.is-armed > * { opacity: 1; }

/* ---------- keyframes ---------- */
@keyframes tf-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.6%); } }   /* = ../motion.css */
@keyframes tf-pop { from { opacity: 0; transform: scale(.5) translateY(6px); } }                    /* = ../motion.css */
@keyframes tf-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.006, 1.014); } }
@keyframes tf-settle { from { opacity: 0; transform: translateY(1.2%) scale(.985); } }
@keyframes tf-hop { 0%, 64%, 100% { transform: translateY(0); } 74% { transform: translateY(-4%); } 86% { transform: translateY(0); } 91% { transform: translateY(-.8%); } }
@keyframes tf-shadow-hop { 0%, 64%, 100% { transform: scale(1); opacity: 1; } 74% { transform: scale(.82); opacity: .55; } 86% { transform: scale(1); opacity: 1; } }
@keyframes tf-coach-in { from { opacity: 0; transform: translateY(6%); } }
@keyframes tf-wipe-out { from { transform: translateX(-100%); } }
@keyframes tf-wipe-in { from { transform: translateX(100%); } }
@keyframes tf-stamp { 0% { opacity: 0; transform: scale(1.12); } 60% { opacity: 1; transform: scale(.98); } 100% { transform: scale(1); } }
@keyframes tf-turn-front { 0%, 20%, 30%, 70%, 80%, 100% { opacity: 1; } 22%, 28%, 72%, 78% { opacity: 0; } }
@keyframes tf-turn-left  { 0%, 20%, 30%, 100% { opacity: 0; } 22%, 28% { opacity: 1; } }
@keyframes tf-turn-right { 0%, 70%, 80%, 100% { opacity: 0; } 72%, 78% { opacity: 1; } }
@keyframes tf-sf-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-14px) scale(1.03); } }
@keyframes tf-sf-glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes tf-sf-sway { 0%, 100% { transform: rotateY(-20deg) rotateX(3deg); } 50% { transform: rotateY(20deg) rotateX(-3deg); } }
@keyframes tf-sway { 0%, 100% { transform: rotateY(0); } 25% { transform: rotateY(-18deg); } 75% { transform: rotateY(18deg); } }
@keyframes tf-marquee { to { transform: translateX(calc(-50% - var(--gap, 28px) / 2)); } }
@keyframes tf-swing { 0%, 100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg); } }
@keyframes tf-flicker { 0% { transform: scale(1, 1); opacity: 1; } 40% { transform: scale(.97, 1.04); } 100% { transform: scale(1.02, .97); opacity: .92; } }
@keyframes tf-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes tf-peek { from { transform: translateY(100%); } }
@keyframes tf-bubble { from { opacity: 0; transform: scale(.6); } }
@keyframes tf-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-.35em); opacity: 1; } }
@keyframes tf-rise { from { opacity: 0; transform: translateY(14px); } }
@keyframes tf-ring { from { opacity: .7; transform: scale(.6); } to { opacity: 0; transform: scale(1.35); } }
@keyframes tf-glow { 0%, 100% { opacity: .75; transform: scale(.97); } 50% { opacity: 1; transform: scale(1); } }
@keyframes tf-lean { 0%, 100% { transform: rotate(0); } 40%, 60% { transform: rotate(-1.4deg); } }
@keyframes tf-roll { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@keyframes tf-fan { from { transform: translateX(0) rotate(0); opacity: 0; } 30% { opacity: 1; } }
@keyframes tf-fill-bar { from { transform: scaleX(0); } }
@keyframes tf-tick { 0%, 20%, 100% { transform: rotate(0); } 6% { transform: rotate(5deg); } }
@keyframes tf-ripple { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14%); } }
@keyframes tf-pulse { 0% { opacity: .8; transform: scale(1); } 45%, 100% { opacity: 0; transform: scale(1.18, 1.45); } }
