.scroll-progress, .pointer-ring, .brand-opening { display: none; }
html.motion-paused { scroll-behavior: auto; }
.title-fragment { display: inline-block; max-width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  .motion-enabled { --ease-out: cubic-bezier(.2, .7, .2, 1); }

  .motion-enabled .site-header {
    position: sticky;
    inset-block-start: 0;
    transition: translate .32s var(--ease-out), background-color .25s;
  }

  .motion-enabled .site-header.is-solid { background-color: #081525f5; }
  .motion-enabled .site-header.is-hidden:not(:has(:focus-visible)) { translate: 0 -102%; }

  .motion-enabled .scroll-progress {
    position: fixed;
    z-index: 6;
    inset: 0 0 auto;
    display: block;
    height: 2px;
    scale: var(--page-progress, 0) 1;
    transform-origin: left center;
    background: #66bcff;
    pointer-events: none;
  }

  .motion-enabled .button { transition: translate .22s var(--ease-out), background-color .18s, color .18s; }
  .motion-enabled .button:hover { translate: 0 -2px; }
  .motion-enabled .button:active { translate: 0 1px; }

  .motion-enabled .text-link span { transition: translate .22s var(--ease-out); }
  .motion-enabled .text-link:hover span { translate: 2px -2px; }

  .motion-enabled .resource-links a { transition: color .35s ease, border-color .35s ease; }
  .motion-enabled .resource-links a::before {
    transition: transform .45s cubic-bezier(.16, .7, .2, 1);
  }

  .motion-enabled.intro .brand-opening {
    position: fixed;
    z-index: 8;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(ellipse at 50% 42%, #edf7fe 5%, #d5e7f4 63%, #9db5cc);
    animation: opening-away .52s var(--ease-out) 1.42s both;
    pointer-events: none;
  }

  .brand-opening::before {
    position: absolute;
    inset: 0;
    background: url("grain.webp");
    mix-blend-mode: multiply;
    opacity: .14;
    content: "";
  }

  .opening-logo {
    position: relative;
    display: grid;
    justify-items: center;
    color: #165188;
    font: 900 clamp(4.8rem, 12vw, 10rem)/.86 var(--display);
    letter-spacing: -.025em;
    text-transform: uppercase;
  }

  .opening-line { animation: opening-word .68s var(--ease-out) .04s both; }
  .opening-line:nth-child(2) { font-size: 1.23em; animation-delay: .19s; }
  .opening-drop {
    position: absolute;
    inset: calc(100% + .06em) auto auto 64%;
    width: clamp(.82rem, 1.7vw, 1.48rem);
    aspect-ratio: 1;
    border: 1px solid #86c9ee;
    border-radius: 9% 59% 62% 59%;
    rotate: 45deg;
    background: radial-gradient(ellipse at 40% 65%, #d8f3ff, #71c0ef 46%, #2683c0 90%);
    animation: opening-drop .63s ease-in .64s both;
  }

  .opening-ripple {
    position: absolute;
    inset: calc(100% + .34em) auto auto 67%;
    width: clamp(2rem, 5vw, 4rem);
    height: clamp(.48rem, 1.2vw, .9rem);
    translate: -50%;
    border: 2px solid #4398d3b8;
    border-radius: 50%;
    box-shadow: 0 0 0 5px #60abe439;
    animation: opening-ripple .62s var(--ease-out) 1.08s both;
  }

  .motion-enabled.intro .hero-copy > .eyebrow { animation: arrive .48s var(--ease-out) 1.42s both; }
  .motion-enabled.intro .title-fragment { animation: text-reveal .64s var(--ease-out) 1.48s both; }
  .motion-enabled.intro .title-fragment:last-child { animation-delay: 1.6s; }
  .motion-enabled.intro .hero-description { animation: arrive .6s var(--ease-out) 1.7s both; }
  .motion-enabled.intro .hero-actions:not(:focus-within) { animation: arrive .6s var(--ease-out) 1.77s both; }
  .motion-enabled.intro .showcase { --preview-delay: 1.12s; animation: arrive .73s var(--ease-out) 1.48s both; }
  .motion-enabled.intro .site-header .brand-drop { animation: drop-in .72s var(--ease-out) 1.34s both; }
  .motion-enabled .showcase::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: .3;
    background: radial-gradient(ellipse at var(--glare-x, 75%) var(--glare-y, 20%), #67bfff58, transparent 65%);
    transition: opacity .4s ease;
    pointer-events: none;
    content: "";
  }

  .motion-enabled .showcase[data-in-view] .bars > span {
    transform-origin: center bottom;
    animation: bar-rise .8s var(--ease-out) calc(.32s + var(--bar-index) * 50ms + var(--preview-delay, 0s)) both;
  }

  .motion-enabled .showcase[data-in-view] :is(.preview-context, .sample-label, .chart-heading) {
    animation: text-arrive .54s var(--ease-out) calc(.22s + var(--preview-delay, 0s)) both;
  }

  .motion-enabled .showcase[data-in-view] #preview-title {
    animation: text-reveal .6s var(--ease-out) calc(.28s + var(--preview-delay, 0s)) both;
  }
  .motion-enabled .showcase[data-in-view] .preview-metrics > div {
    --metric-delay: .33s;
  }
  .motion-enabled .showcase[data-in-view] .preview-metrics > div:nth-child(2) { --metric-delay: .41s; }
  .motion-enabled .showcase[data-in-view] .preview-metrics > div:nth-child(3) { --metric-delay: .49s; }
  .motion-enabled .showcase[data-in-view] .preview-metrics dt {
    animation: text-arrive .46s var(--ease-out) calc(var(--metric-delay) + var(--preview-delay, 0s)) both;
  }
  .motion-enabled .showcase[data-in-view] .preview-metrics dd {
    animation: text-reveal .56s var(--ease-out) calc(var(--metric-delay) + .06s + var(--preview-delay, 0s)) both;
  }

  .reveal-enabled [data-reveal] {
    transition: opacity .75s var(--ease-out), translate .75s var(--ease-out);
    transition-delay: var(--delay, 0s);
  }

  .reveal-enabled [data-reveal]:not([data-seen]):not(:focus-within) { opacity: 0; translate: 0 18px; }
  .reveal-enabled [data-reveal]:focus-within { transition: none; }

  .reveal-enabled :is(.section-heading, .pipeline li)[data-seen] > :is(.eyebrow, .step-label) {
    animation: text-arrive .46s var(--ease-out) var(--delay, 0s) both;
  }

  .reveal-enabled :is(.section-heading, .pipeline li)[data-seen] > :is(h2, h3) {
    animation: text-reveal .69s var(--ease-out) calc(var(--delay, 0s) + .1s) both;
  }

  .reveal-enabled :is(.section-heading, .pipeline li)[data-seen] > p:last-child {
    animation: text-arrive .58s var(--ease-out) calc(var(--delay, 0s) + .2s) both;
  }

  .motion-enabled .report-explorer.is-enhanced .report-panel { animation: panel-in .35s var(--ease-out) both; }
  .reveal-enabled .report-explorer.is-enhanced[data-seen] .report-copy h3 {
    animation: text-reveal .62s var(--ease-out) .06s both;
  }
  .reveal-enabled .report-explorer.is-enhanced[data-seen] :is(.report-copy p, .report-preview) {
    animation: text-arrive .55s var(--ease-out) .16s both;
  }
  .motion-enabled .report-explorer.is-enhanced .retention-track > span {
    transform-origin: left center;
    animation: retention-fill .65s var(--ease-out) both;
  }

  .motion-enabled .pipeline[data-in-view] li[data-seen]::before {
    animation: data-packet 4.5s ease-in-out calc(var(--delay, 0ms) * 5) infinite;
  }
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) and (pointer: fine) {
  .motion-enabled .pointer-ring {
    position: fixed;
    z-index: 9;
    inset: 0 auto auto 0;
    display: block;
    width: 1.7rem;
    aspect-ratio: 1;
    margin: -.85rem;
    border: 1px solid #4c9adbbc;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    transition: translate .15s ease-out, opacity .2s, scale .22s var(--ease-out);
  }

  .motion-enabled .pointer-ring.is-visible { opacity: .7; }
  .motion-enabled .pointer-ring::after {
    position: absolute;
    inset: 50% auto auto 50%;
    width: .28rem;
    aspect-ratio: 1;
    translate: -50% -50%;
    border-radius: 50%;
    background: #86d7ff;
    box-shadow: 0 0 .42rem #5ec3ff;
    content: "";
  }
  .motion-enabled .pointer-ring.is-over-control { scale: 1.5; }
  .motion-enabled .pointer-ring.is-pressed { scale: .75; }
  .motion-enabled .showcase:hover::before { opacity: .85; }
}

@keyframes arrive {
  from { opacity: 0; translate: 0 16px; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes text-reveal {
  from { clip-path: inset(0 -.1em 100%); opacity: 0; translate: 0 .34em; }
  40% { opacity: 1; }
  to { clip-path: inset(-.2em -.1em -.23em); opacity: 1; translate: 0 0; }
}

@keyframes text-arrive {
  from { opacity: 0; translate: 0 .55em; }
  to { opacity: 1; translate: 0 0; }
}

@keyframes panel-in {
  from { opacity: .35; }
  to { opacity: 1; }
}

@keyframes drop-in {
  0% { opacity: 0; translate: 0 -.65rem; scale: .55; }
  55% { opacity: 1; translate: 0 .15rem; scale: 1.15; }
  100% { opacity: 1; translate: 0 0; scale: 1; }
}

@keyframes opening-word {
  0% { opacity: 0; clip-path: inset(0 -.1em 100%); translate: 0 .13em; }
  60% { opacity: 1; }
  100% { opacity: 1; clip-path: inset(-.2em -.13em -.23em); translate: 0; }
}

@keyframes opening-drop {
  0% { opacity: 0; translate: 0 -.18em; scale: .25; }
  40% { opacity: 1; translate: 0 -.01em; scale: .86; }
  80% { opacity: 1; translate: 0 .23em; scale: .75 1.08; }
  100% { opacity: 0; translate: 0 .28em; scale: 1 .3; }
}

@keyframes opening-ripple {
  0% { opacity: .85; transform: scale(.18); }
  100% { opacity: 0; transform: scale(1.4); }
}

@keyframes opening-away {
  from { opacity: 1; visibility: visible; }
  to { opacity: 0; visibility: hidden; }
}

@keyframes bar-rise {
  from { scale: 1 .06; }
  to { scale: 1 1; }
}

@keyframes retention-fill {
  from { scale: 0 1; }
  to { scale: 1 1; }
}

@keyframes data-packet {
  0%, 16% { inset-inline-start: 0; opacity: .85; }
  70% { inset-inline-start: calc(100% - .66rem); opacity: 1; }
  85%, 100% { inset-inline-start: calc(100% - .66rem); opacity: 0; }
}
