/* Foton's motion vocabulary: masked type, unfolding artwork, soft sticker pops. */
:root {
  --motion-out: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-settle: cubic-bezier(0.22, 1.2, 0.36, 1);
  --motion-pop: cubic-bezier(0.34, 1.56, 0.64, 1);
  --motion-spring: cubic-bezier(0.3, 1.3, 0.5, 1);
}
/* Sampled damped springs: a lively pop (~23% overshoot) and a calmer settle. */
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --motion-pop: linear(
      0,
      0.084,
      0.287,
      0.54,
      0.788,
      0.993,
      1.136,
      1.214,
      1.233,
      1.21,
      1.161,
      1.101,
      1.044,
      0.998,
      0.966,
      0.949,
      0.946,
      0.952,
      0.964,
      0.978,
      0.991,
      1.001,
      1.009,
      1.012,
      1.013,
      1.011,
      1.008,
      1.005,
      1.002,
      0.999,
      1
    );
    --motion-spring: linear(
      0,
      0.064,
      0.219,
      0.413,
      0.611,
      0.787,
      0.927,
      1.028,
      1.091,
      1.121,
      1.126,
      1.114,
      1.093,
      1.068,
      1.043,
      1.022,
      1.005,
      0.994,
      0.987,
      0.984,
      0.984,
      0.986,
      0.989,
      0.992,
      0.995,
      0.998,
      1
    );
  }
}
@property --orbit-sweep {
  syntax: '<angle>';
  inherits: false;
  initial-value: 360deg;
}
.motion-line {
  display: block;
  overflow: clip;
  padding: 0.08em 0.035em 0.22em;
  margin: -0.08em -0.035em -0.22em;
}
.motion-line-inner {
  display: block;
  transform-origin: 0 100%;
}
.header {
  transition:
    background-color 350ms ease,
    box-shadow 350ms ease;
}
.header.is-scrolled {
  background-color: #f5f6f8f5;
  box-shadow:
    0 1px 0 #1d293910,
    0 8px 28px #1d293908;
}
.nav-links a:after {
  right: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 450ms var(--motion-out);
}
.nav-links a:hover:after,
.nav-links a:focus-visible:after {
  transform: scaleX(1);
  transform-origin: left;
}

@media (prefers-reduced-motion: no-preference) {
  /* A separate scroll plane preserves the authored layout and intro transforms.
     No transition: every depth position follows the scrollbar in both directions. */
  .depth-layer {
    translate: 0 var(--depth-y, 0px);
    scale: var(--depth-scale, 1);
  }
  .depth-layer:focus-visible,
  .depth-layer:has(:focus-visible) {
    translate: none;
    scale: none;
  }
  .motion-ready .reveal {
    opacity: 0;
    transform: translateY(42px) scale(0.985);
    transition:
      opacity 700ms ease,
      transform 1050ms var(--motion-out);
  }
  .motion-ready .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  .motion-ready .motion-heading.reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .motion-ready .motion-heading .motion-line-inner {
    transform: translateY(120%) rotate(2deg);
    opacity: 0.25;
    transition:
      transform 900ms var(--motion-out),
      opacity 600ms ease;
    transition-delay: calc(var(--line-order) * 110ms);
  }
  .motion-ready .motion-heading.is-visible .motion-line-inner {
    transform: none;
    opacity: 1;
  }
  .motion-ready .motion-support {
    opacity: 0;
    translate: 0 20px;
    transition:
      opacity 650ms ease,
      translate 850ms var(--motion-out);
    transition-delay: var(--support-delay, 200ms);
  }
  .motion-ready .is-visible > .motion-support {
    opacity: var(--support-opacity, 1);
    translate: 0 0;
  }
  .motion-ready .hero-art {
    opacity: 0;
    transform: translateY(32px) scale(0.92) rotate(2deg);
    transform-origin: 50% 60%;
    transition:
      opacity 600ms ease,
      transform 1250ms var(--motion-spring);
    transition-delay: 100ms;
  }
  .motion-ready .hero-art.is-visible {
    opacity: 1;
    transform: none;
  }
  /* Foton pops inside the arch, then keeps floating gently. */
  .motion-ready .hero-foton {
    transition: scale 1100ms 260ms var(--motion-pop);
  }
  .motion-ready .hero-art:not(.is-visible) .hero-foton {
    scale: 0.55;
  }
  .hero-art.is-visible .hero-foton {
    animation: foton-float 6.5s 1.6s ease-in-out infinite alternate;
  }
  /* The orbit is drawn around Foton rather than faded in. */
  .motion-ready .orbit {
    -webkit-mask: conic-gradient(from 200deg, #000 var(--orbit-sweep), #0000 0);
    mask: conic-gradient(from 200deg, #000 var(--orbit-sweep), #0000 0);
    transition: --orbit-sweep 1700ms 420ms cubic-bezier(0.45, 0, 0.2, 1);
  }
  .motion-ready .hero-art:not(.is-visible) .orbit {
    --orbit-sweep: 0deg;
  }
  /* Two26's pill treatment: the shell springs in, then its words rise. */
  .hero-hello-visible .hello-sticker {
    animation: foton-sticker-pop 1000ms 420ms var(--motion-pop) backwards;
  }
  .hero-hello-visible .sticker-text > span {
    animation: foton-mask-up 760ms 640ms var(--motion-out) backwards;
  }
  .hero-hello-visible .hello-sticker > span[aria-hidden='true'] {
    animation: foton-spark 1000ms 760ms var(--motion-pop) backwards;
  }
  .hero-message-visible .hero-chat {
    animation: foton-bubble-pop 950ms 720ms var(--motion-pop) backwards;
  }
  .hero-message-visible .hero-chat > * {
    animation: foton-rise 760ms 900ms var(--motion-out) backwards;
  }
  .hero-message-visible .hero-chat > :nth-child(2) {
    animation-delay: 980ms;
  }
  .hero-message-visible .hero-chat > :nth-child(3) {
    animation-delay: 1060ms;
  }
  /* The underline is drawn along its own curve instead of being stretched;
     once drawn, no clip remains on it. */
  .highlight:after {
    transform-origin: left;
  }
  .motion-ready .hero-copy:not(.is-visible) .highlight:after {
    clip-path: inset(-6px 100% -6px -6px);
  }
  .motion-ready .hero-copy.is-visible:not(.motion-instant) .highlight:after {
    animation: foton-underline 950ms 720ms cubic-bezier(0.65, 0, 0.35, 1) backwards;
  }
  /* As the hero recedes, its pieces separate: Foton and the message rise
     faster than the arch, the greeting faster still, and the orbit turns. */
  .hero-art {
    --foton-shift: calc(var(--hero-depth, 0) * -46px);
  }
  .hello-sticker {
    translate: 0 calc(var(--hero-depth, 0) * -78px);
  }
  .orbit {
    rotate: calc(var(--hero-depth, 0) * 18deg);
  }
  .roadmap-ready .story-copy {
    opacity: calc(0.4 + var(--story-progress) * 0.6);
  }
  .motion-ready .automation-process .automation-steps > li {
    opacity: 0;
    transform: translateY(22px);
    transition:
      opacity 550ms ease,
      transform 750ms var(--motion-out);
    transition-delay: 180ms;
  }
  .motion-ready .automation-process .automation-steps > li:nth-child(2) {
    transition-delay: 310ms;
  }
  .motion-ready .automation-process .automation-steps > li:nth-child(3) {
    transition-delay: 440ms;
  }
  .motion-ready .automation-process.is-visible .automation-steps > li {
    opacity: 1;
    transform: none;
  }
  .motion-ready .beta-steps > .reveal:nth-child(2) {
    transition-delay: 100ms;
  }
  .motion-ready .beta-steps > .reveal:nth-child(3) {
    transition-delay: 200ms;
  }
  .motion-ready .signup-card {
    transform: translateY(42px) rotate(1.5deg) scale(0.97);
  }
  .motion-ready .signup-card.is-visible {
    transform: none;
  }
}
@keyframes foton-sticker-pop {
  from {
    opacity: 0;
    transform: translateY(18px) rotate(-19deg) scale(0.3);
  }
  12% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: translateY(0) rotate(-7deg) scale(1);
  }
}
@keyframes foton-mask-up {
  from {
    transform: translateY(110%);
  }
  to {
    transform: none;
  }
}
@keyframes foton-spark {
  from {
    opacity: 0;
    transform: rotate(-170deg) scale(0);
  }
  20% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes foton-bubble-pop {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.5) rotate(5deg);
  }
  14% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes foton-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes foton-underline {
  from {
    clip-path: inset(-6px 100% -6px -6px);
  }
  to {
    clip-path: inset(-6px -6px -6px -6px);
  }
}
@keyframes foton-float {
  from {
    translate: 0 0;
    rotate: 0deg;
  }
  to {
    translate: 0 -12px;
    rotate: 2.5deg;
  }
}
.hello-sticker .sticker-text,
.hello-sticker .sticker-text > span {
  font-size: inherit;
}
/* Scroll-settled titles keep the line structure (and so the authored height)
   but neither clip nor animate their lines: their words move instead. */
.motion-line.motion-line-static {
  overflow: visible;
}
.motion-ready .motion-heading .motion-line-static > .motion-line-inner {
  transform: none;
  opacity: 1;
  transition: none;
}
.sticker-text {
  display: block;
  overflow: clip;
  padding: 0.1em 0 0.22em;
  margin: -0.1em 0 -0.22em;
}
.sticker-text > span {
  display: block;
}
@media (max-width: 800px) {
  .hero-hello-visible .hello-sticker {
    animation-delay: 220ms;
  }
  .hero-hello-visible .sticker-text > span {
    animation-delay: 440ms;
  }
  .hero-hello-visible .hello-sticker > span[aria-hidden='true'] {
    animation-delay: 560ms;
  }
  .hero-message-visible .hero-chat {
    animation-delay: 120ms;
  }
  .hero-message-visible .hero-chat > * {
    animation-delay: 300ms;
  }
  .hero-message-visible .hero-chat > :nth-child(2) {
    animation-delay: 380ms;
  }
  .hero-message-visible .hero-chat > :nth-child(3) {
    animation-delay: 460ms;
  }
}
@media (max-width: 699px) {
  .hero-art {
    --foton-shift: calc(var(--hero-depth, 0) * -18px);
  }
  .hello-sticker {
    translate: 0 calc(var(--hero-depth, 0) * -30px);
  }
  .orbit {
    rotate: calc(var(--hero-depth, 0) * 8deg);
  }
}
@media (max-width: 699px) {
  .motion-ready .beta-steps > .reveal:nth-child(n) {
    transition-delay: 0ms;
  }
}
@media (max-width: 600px) {
  .signup-foton {
    --support-opacity: 0.8;
  }
}
/* Focus, reduced motion and observer failures always expose the final state. */
.motion-instant,
.motion-instant .hello-sticker,
.motion-instant .hello-sticker > span,
.motion-instant .sticker-text > span,
.motion-instant .hero-chat,
.motion-instant .hero-chat > *,
.hero-chat.motion-instant > * {
  animation: none !important;
}
.motion-ready .motion-instant .orbit,
.motion-ready .motion-instant .hero-foton {
  transition: none;
}
.motion-ready .motion-instant,
.motion-ready .motion-instant .motion-line-inner,
.motion-ready .motion-instant .automation-steps > li {
  opacity: 1;
  transform: none;
  transition: none;
}
.motion-ready .motion-instant .motion-support {
  opacity: var(--support-opacity, 1);
  translate: none;
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  .depth-layer {
    translate: none;
    scale: none;
  }
  .motion-ready .reveal,
  .motion-ready .hero-art,
  .motion-ready .motion-line-inner,
  .motion-ready .automation-steps > li,
  .roadmap-ready .story-visual,
  .roadmap-ready .story-scene,
  .roadmap-ready .story-copy {
    opacity: 1;
    translate: none;
    transform: none;
    transition: none;
  }
  .hero-foton {
    will-change: auto;
    scale: none;
    translate: none;
    rotate: none;
  }
  .motion-ready .orbit {
    -webkit-mask: none;
    mask: none;
  }
  .orbit,
  .hello-sticker {
    rotate: none;
    translate: none;
  }
  .highlight:after {
    clip-path: none;
  }
  .motion-ready .motion-support {
    opacity: var(--support-opacity, 1);
    translate: none;
    transition: none;
  }
}
