@charset "UTF-8";

/* ==========================================================================
   Motion: the four primitives (defrost, impact, scroll-crush, frost sweep)
   plus the wordmark shatter. Everything here is switched off under
   prefers-reduced-motion.
   ========================================================================== */

@layer motion {
  /* Primitive 1 — "defrost reveal": condensation clearing off the glass.
     Applied to every section element via IntersectionObserver. */
  [data-reveal] {
    opacity: 0;
    translate: 0 16px;
    filter: blur(6px);
    transition:
      opacity var(--dur-slow) var(--ease-out) var(--delay, 0ms),
      translate var(--dur-slow) var(--ease-frost) var(--delay, 0ms),
      filter var(--dur-slow) var(--ease-out) var(--delay, 0ms);
  }
  /* Headings used to relax their letter-spacing while revealing. That re-wrapped them mid-scroll
     and shortened the page under an anchor jump, so the target landed 40px off. Layout-neutral only. */
  /* Cards that share a row appear together: a staggered third card reads as a misalignment. */
  :is(.grid, .compare, .menu, .honest, .qa, .chain, .req, .calc, .wash, .pilot, .passport) [data-reveal] {
    --delay: 0ms !important;
  }
  [data-reveal].is-in {
    opacity: 1;
    translate: 0 0;
    filter: blur(0);
  }

  @keyframes defrost {
    from {
      opacity: 0;
      translate: 0 10px;
      filter: blur(5px);
    }
    to {
      opacity: 1;
      translate: 0 0;
      filter: blur(0);
    }
  }

  /* Primitive 2 — "impact": the shared 180ms hit used by the shatter,
     the CTA press and every committed calculator value. */
  @keyframes impact-shake {
    0% {
      translate: 0 0;
    }
    18% {
      translate: -3px 1px;
    }
    36% {
      translate: 2px -2px;
    }
    54% {
      translate: -2px -1px;
    }
    72% {
      translate: 1px 1px;
    }
    100% {
      translate: 0 0;
    }
  }

  .is-impact {
    animation: impact-shake 190ms var(--ease-impact) both;
  }

  @keyframes value-hit {
    0% {
      filter: brightness(1);
    }
    22% {
      filter: brightness(1.55) drop-shadow(0 0 18px rgb(163 255 0 / 70%));
    }
    100% {
      filter: brightness(1);
    }
  }
  .is-hit {
    animation: value-hit 340ms var(--ease-out);
  }

  /* --- wordmark frost shatter --- */
  @keyframes shard-land {
    from {
      opacity: 0;
      transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    }
    to {
      opacity: 1;
      transform: translate(0, 0) rotate(0deg);
    }
  }

  @keyframes chip-land {
    0% {
      opacity: 0;
      transform: translate(26px, -22px) rotate(10deg);
    }
    72% {
      opacity: 1;
      transform: translate(-2px, 2px) rotate(-1.2deg);
    }
    100% {
      opacity: 1;
      transform: translate(0, 0) rotate(0);
    }
  }

  @keyframes crack-draw {
    from {
      stroke-dashoffset: var(--crack-len, 400);
      opacity: 0.9;
    }
    to {
      stroke-dashoffset: 0;
      opacity: 0.5;
    }
  }

  @keyframes crack-frost {
    from {
      stroke-dashoffset: var(--crack-len, 400);
      opacity: 0;
    }
    to {
      stroke-dashoffset: 0;
      opacity: 1;
    }
  }

  @keyframes impact-flash {
    0% {
      opacity: 0;
      transform: scale(0.2);
    }
    12% {
      opacity: 0.95;
    }
    100% {
      opacity: 0;
      transform: scale(1.5);
    }
  }

  @keyframes shard-fly {
    0% {
      opacity: 0;
      transform: translate(0, 0) scale(0.4);
    }
    14% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translate(var(--fx), var(--fy)) scale(0.1);
    }
  }

  @keyframes chroma-split {
    0%,
    100% {
      opacity: 0;
      transform: translate(0, 0);
    }
    18% {
      opacity: 0.7;
      transform: translate(-1.5px, 0.4px);
    }
    40% {
      opacity: 0.35;
      transform: translate(1.5px, -0.4px);
    }
    70% {
      opacity: 0;
    }
  }

  /* Before the hit: solid copy. After the hit: `is-shattering` stays on so
     fill-mode `both` holds the landed shards and drawn cracks. Killing that
     class (or animation:none) was compositing the wedges into a clean glyph —
     letters looked taller, most fractures vanished. */
  .wordmark [data-solid],
  .wordmark [data-chip] {
    opacity: 1;
  }
  .wordmark [data-shard],
  .wordmark [data-ice],
  .wordmark [data-flash],
  .wordmark [data-chroma] {
    opacity: 0;
  }
  .wordmark [data-crack] {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  /* Header mark: the landed hero pose, without playing the hit. */
  .wordmark--rest [data-solid] {
    opacity: 0;
  }
  .wordmark--rest [data-shard],
  .wordmark--rest [data-chip] {
    opacity: 1;
    transform: none;
    filter: none;
    animation: none;
  }
  .wordmark--rest [data-crack] {
    stroke-dashoffset: 0;
    opacity: 1;
  }

  .wordmark.is-armed:not(.is-shattering) [data-chip] {
    opacity: 0;
  }
  .wordmark.is-armed:not(.is-shattering) [data-crack] {
    opacity: 0;
    stroke-dashoffset: var(--crack-len, 400);
  }

  .wordmark.is-shattering [data-solid] {
    opacity: 0;
  }
  .wordmark.is-shattering [data-shard] {
    animation: shard-land 620ms var(--ease-frost) var(--d, 0ms) both;
  }
  .wordmark.is-shattering [data-chip] {
    animation: chip-land 520ms var(--ease-impact) both;
  }
  .wordmark.is-shattering [data-crack] {
    animation: crack-frost 700ms var(--ease-out) 180ms both;
  }
  .wordmark.is-shattering [data-flash] {
    animation: impact-flash 420ms var(--ease-out) 150ms both;
  }
  .wordmark.is-shattering [data-ice] {
    animation: shard-fly 720ms var(--ease-out) var(--d, 0ms) both;
  }
  .wordmark.is-shattering [data-chroma] {
    animation: chroma-split 280ms linear 170ms both;
  }

  /* Cheaper replay used on header logo hover: cracks only */
  .wordmark.is-cracking [data-crack] {
    animation: crack-frost 1400ms var(--ease-out) both;
  }

  @keyframes pulse-dot {
    0%,
    100% {
      opacity: 1;
      box-shadow: 0 0 0 0 currentcolor;
    }
    50% {
      opacity: 0.55;
      box-shadow: 0 0 0 4px rgb(163 255 0 / 0%);
    }
  }

  @keyframes ticker-run {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(-50%);
    }
  }

  @keyframes glass-sheen {
    0%,
    62% {
      transform: translateX(-70%);
    }
    100% {
      transform: translateX(70%);
    }
  }

  /* Scroll-driven where the browser supports it; JS drives the fallback. */
  @supports (animation-timeline: scroll()) {
    .scrollbar-top {
      animation: scale-x linear;
      animation-timeline: scroll(root block);
    }
    @keyframes scale-x {
      from {
        scale: 0 1;
      }
      to {
        scale: 1 1;
      }
    }
  }

  .scrollbar-top {
    position: fixed;
    inset: 0 0 auto;
    z-index: 130;
    height: 2px;
    background: linear-gradient(90deg, var(--ice), var(--acid));
    transform-origin: 0 50%;
    scale: var(--sp, 0) 1;
    pointer-events: none;
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    *,
    *::before,
    *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
    [data-reveal] {
      opacity: 1;
      translate: 0 0;
      filter: none;
    }
    .wordmark.is-armed [data-solid],
    .wordmark.is-armed [data-chip] {
      opacity: 1;
    }
    .wordmark [data-crack],
    .wordmark.is-armed [data-crack] {
      stroke-dashoffset: 0;
      opacity: 1;
    }
    .ticker__track {
      animation: none;
    }
  }

  /* Heavy blurs are wasteful on small screens */
  @media (width < 48rem) {
    [data-reveal] {
      filter: none;
    }
    .hero::before {
      opacity: 0.6;
    }
  }
}
