/* Titan, the mascot, on the site. mascot.js adds every image (all decorative, alt=""), one job per spot:
   he never sits beside a heading as a sticker, never appears twice in the same drawing on a page, and never moves the film.
   Home: logo, under the film, at the chart, behind the ask box, behind the closing phone. Search pages: behind the ask box only.
   Connect, guides, support: behind one box. 404: he is the zero of the 404. Legal pages: none. */
.mx { pointer-events: none; user-select: none; height: auto; max-width: none; }

/* A. the logo tile is his head: it comes alive on hover (and once on load) */
.mx-logo { position: relative; display: inline-block; width: 30px; height: 30px; flex: none; }
.mx-logo .brand-mark { transition: opacity .18s ease; }
.mx-logo .mx-face { position: absolute; left: -2px; top: -4px; width: 34px; opacity: 0; transform: translateY(6px) scale(.55) rotate(-14deg); transform-origin: 50% 80%; transition: opacity .16s ease, transform .5s cubic-bezier(.2, 1.6, .3, 1); }
a.brand:hover .mx-face, a.brand:focus-visible .mx-face, .mx-logo.alive .mx-face { opacity: 1; transform: none; }
a.brand:hover .brand-mark, a.brand:focus-visible .brand-mark, .mx-logo.alive .brand-mark { opacity: 0; }

/* B. hero: he stands under the film and carries it on his palms; he stands still, only breathing; the video never moves */
.stage.mx-stage .dvp { position: relative; z-index: 2; transform-origin: 50% 100%; }
.mx-atlas { --w: min(480px, 74vw); position: relative; z-index: 3; width: var(--w); margin: calc(var(--w) * -0.136 - 6px) auto 0; pointer-events: none; }
.mx-atlas::before { content: ""; position: absolute; left: 50%; top: 16%; width: 78%; aspect-ratio: 1; margin-left: -39%; border-radius: 50%; background: #f3d94e; z-index: -1; transform: scale(0); transition: transform .7s cubic-bezier(.2, 1.3, .3, 1) .15s; }
/* his legs end on the circle (same centre and radius as ::before), never on a straight cut */
.mx-atlas img { display: block; width: 100%; clip-path: inset(13.6% 0 0 0); -webkit-mask: linear-gradient(#000 0 0) top / 100% 55% no-repeat, radial-gradient(39% 39% at 50% 55%, #000 99.4%, transparent 100%); mask: linear-gradient(#000 0 0) top / 100% 55% no-repeat, radial-gradient(39% 39% at 50% 55%, #000 99.4%, transparent 100%); transform-origin: 50% 100%; transform: translateY(60%); opacity: 0; transition: transform .8s cubic-bezier(.2, 1.35, .3, 1) .3s, opacity .15s ease .3s; }
.mx-atlas.in::before { transform: none; }
.mx-atlas.in img { transform: none; opacity: 1; animation: mx-breathe 3.6s ease-in-out 1.4s infinite; }
.stage.mx-stage { z-index: 1; }
@keyframes mx-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.012); } }

/* D. progress: he brings the week's numbers in and points at them (the stats drawing) */
.chart .tip.mx-carry { isolation: isolate; translate: 260px 0; opacity: 0; transition: translate 1.1s cubic-bezier(.3, .9, .3, 1), opacity .3s ease; }
.chart .tip.mx-carry.in { translate: 0 0; opacity: 1; animation: mx-press 4.6s ease-in-out 1.6s infinite; }
.mx-carrier { position: absolute; right: calc(100% - 8px); bottom: -74px; width: 210px; z-index: -1; }
.mx-carrier img { display: block; width: 100%; }
.tip.mx-carry:not(.in) .mx-carrier img { animation: mx-walk .36s ease-in-out infinite; }
@keyframes mx-walk { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-5px) rotate(1.5deg); } }
@keyframes mx-press { 0%, 86%, 100% { translate: 0 0; } 91% { translate: 0 -9px; } 95% { translate: 0 2px; } }

/* F. ask your AI: his pose answers the prompt being typed */
.ask.mx-ask { position: relative; isolation: isolate; }
.ask.mx-ask .ask-box { position: relative; z-index: 1; }
.mx-answer-wrap { position: relative; height: 0; margin: 0 auto; z-index: 0; }
.mx-answer { position: absolute; left: calc(100% - 40px); bottom: -8px; width: 200px; transform-origin: 20% 100%; }
.mx-answer.pop { animation: mx-pop .55s cubic-bezier(.2, 1.5, .3, 1) both; }
@keyframes mx-pop { 0% { transform: translateX(-70px) rotate(-10deg) scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* G. final call: he leans out from behind the phone */
.t-final.mx-final { isolation: isolate; }
.mx-wrap { position: relative; width: 340px; max-width: 78vw; height: 0; margin: 0 auto; z-index: 0; }
.mx-clip { position: absolute; left: 100%; top: 0; width: 330px; height: 720px; overflow: hidden; -webkit-mask-image: linear-gradient(#000 44%, transparent 60%); mask-image: linear-gradient(#000 44%, transparent 60%); }
.mx-peek { position: absolute; left: -148px; top: 64px; width: 300px; transform-origin: 30% 70%; transform: translateX(-170px) rotate(-8deg); transition: transform .9s cubic-bezier(.2, 1.4, .3, 1) .25s; }
.mx-peek.in { transform: none; }
.t-final:has(.store:hover) .mx-peek.in { transform: translateX(16px) rotate(3deg); transition-delay: 0s; transition-duration: .4s; }
.final-phone.mx-over { position: relative; z-index: 1; }

@media (max-width: 760px) {
  /* the site hides the numbers card on a phone: the stats Titan stands at the chart's corner instead */
  .chart.mx-chart { position: relative; }
  .mx-carrier { right: -6px; bottom: 2px; width: 126px; z-index: 2; opacity: 0; transform: translateY(16px) scale(.9); transform-origin: 50% 100%; transition: opacity .3s ease, transform .6s cubic-bezier(.2, 1.4, .3, 1); }
  .mx-carrier.in { opacity: 1; transform: none; }
  .mx-answer { left: auto; right: 2px; bottom: auto; top: -104px; width: 128px; }
  .mx-answer-wrap.top { }
  /* the phone steps aside a little so he fits beside it */
  .final-phone.mx-over, .mx-wrap { translate: -40px 0; }
  .mx-clip { width: 120px; height: 520px; }
  .mx-peek { width: 170px; left: -84px; top: 84px; }
}
@media (prefers-reduced-motion: reduce) { .mx-atlas img, .mx-atlas::before, .mx-peek, .chart .tip.mx-carry, .mx-face { transition: none !important; animation: none !important; } }

/* phones: the site hides the week's numbers card under 600 px; with Titan pointing at the chart it is shown again, smaller, top left */
@media (max-width: 600px) {
  .chart .tip.mx-carry { display: block; left: 6px !important; top: -14px; transform: none; min-width: 0; width: 186px; padding: 11px 13px; font-size: 12.5px; }
  .chart .tip.mx-carry ul { gap: 5px; font-size: 12.5px; }
}

/* one Titan leaning out from behind a box (connect, guides, support) */
.mx-behind { position: absolute; z-index: 0; transform-origin: 30% 100%; opacity: 0; transform: translateY(18px) rotate(-6deg) scale(.9); transition: opacity .25s ease, transform .7s cubic-bezier(.2, 1.4, .3, 1); }
.mx-behind.in { opacity: 1; transform: none; }
.mx-behind img { position: relative; display: block; width: 100%; }
.mx-behind.disc::before, .mx-lost::before { content: ""; position: absolute; left: 50%; top: 10%; width: 80%; aspect-ratio: 1; margin-left: -40%; border-radius: 50%; background: #f3d94e; }
@media (max-width: 760px) { .mx-room { margin-top: 112px !important; } }
/* 404: the zero is his circle, and he is in it looking for the page, one way then the other */
.nf-code { display: flex; align-items: center; justify-content: center; gap: .04em; margin: 0 0 22px; font: 700 clamp(140px, 31vw, 340px)/.92 var(--display, "Geist", system-ui, sans-serif); letter-spacing: -.05em; color: var(--snow, #f7f8f8); user-select: none; }
.nf-zero { position: relative; flex: none; width: .8em; aspect-ratio: 1; margin: 0 .02em; border-radius: 50%; background: #f3d94e; animation: nf-in .7s cubic-bezier(.2, 1.4, .3, 1) both; }
.nf-zero img { position: absolute; left: 50%; bottom: -15%; width: 124%; max-width: none; margin-left: -62%; transform-origin: 50% 92%; animation: nf-look 6s cubic-bezier(.6, 0, .2, 1) 1s infinite; }
.nf-code span:first-child { animation: nf-digit .6s cubic-bezier(.2, 1, .3, 1) both; }
.nf-code span:last-child { animation: nf-digit .6s cubic-bezier(.2, 1, .3, 1) .12s both; }
@keyframes nf-in { from { transform: scale(.3); opacity: 0; } }
@keyframes nf-digit { from { transform: translateY(.18em); opacity: 0; } }
@keyframes nf-look { 0%, 40% { transform: scaleX(1) rotate(0); } 44% { transform: scaleX(.2) rotate(0); } 48%, 90% { transform: scaleX(-1) rotate(0); } 94% { transform: scaleX(-.2) rotate(0); } 98%, 100% { transform: scaleX(1) rotate(0); } }
.not-found main { gap: 16px; }
@media (prefers-reduced-motion: reduce) { .nf-zero, .nf-zero img, .nf-code span { animation: none; } }
@media (prefers-reduced-motion: reduce) { .mx-behind { transition: none; opacity: 1; transform: none; } }

/* capture mode (?still): everything revealed, nothing moving; for screenshots in review */
html.still *, html.still *::before, html.still *::after { transition: none !important; animation: none !important; }
html.still .reveal, html.still .mx-carrier, html.still .mx-behind { opacity: 1 !important; transform: none !important; }
