.demo-word, .line-sequence {
  font-size: clamp(1.03rem, 1.8vw, 1.45rem);
  font-weight: 760;
  letter-spacing: -.055em;
  line-height: 1.25;
  white-space: nowrap;
}
.demo-chip {
  display: grid;
  place-items: center;
  min-width: 74px;
  padding: 9px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--demo-ink);
  font-size: .88rem;
  font-weight: 740;
}
.letter-sequence b, .word-sequence b { display: inline-block; animation: unit-rise 4.3s cubic-bezier(.22, .72, .25, 1) infinite; }
.letter-sequence b:nth-child(2), .word-sequence b:nth-child(2) { animation-delay: .12s; }
.letter-sequence b:nth-child(3), .word-sequence b:nth-child(3) { animation-delay: .24s; }
.letter-sequence b:nth-child(4) { animation-delay: .36s; }
.letter-sequence b:nth-child(5) { animation-delay: .48s; }
.word-sequence b { animation-delay: 0s; }
.word-sequence b:nth-child(2) { animation-delay: .32s; }
.word-sequence b:nth-child(3) { animation-delay: .64s; }
@keyframes unit-rise {
  0%, 10%, 100% { opacity: 0; transform: translateY(.55em); }
  24%, 75% { opacity: 1; transform: none; }
  88% { opacity: 0; transform: translateY(-.18em); }
}
.line-sequence { display: grid; text-align: left; gap: .14em; font-size: clamp(1rem, 1.64vw, 1.31rem); }
.line-sequence span { display: block; overflow: hidden; }
.line-sequence b { display: block; animation: line-in 4.7s cubic-bezier(.3,.7,.2,1) infinite; }
.line-sequence span:nth-child(2) b { animation-delay: .35s; color: #6745aa; }
@keyframes line-in {
  0%, 12%, 100% { transform: translateY(107%); }
  34%, 77% { transform: translateY(0); }
  90% { transform: translateY(-102%); }
}
.blur-word { animation: focus-text 4.2s ease-in-out infinite; }
@keyframes focus-text {
  0%, 15%, 100% { filter: blur(6px); opacity: .28; }
  43%, 76% { filter: blur(0); opacity: 1; }
}
@property --motion-count {
  syntax: "<integer>";
  inherits: true;
  initial-value: 0;
}
.counter { display: flex; align-items: baseline; gap: .35em; font-size: .87rem; color: #513783; animation: count-up 4.9s cubic-bezier(.16,.72,.32,1) infinite; }
.counter i { min-width: 4ch; text-align: right; font-size: 2rem; font-style: normal; font-weight: 800; font-variant-numeric: tabular-nums; counter-reset: motion-value var(--motion-count, 1500); }
.counter i::after { content: counter(motion-value); }
@keyframes count-up {
  0%, 10% { --motion-count: 0; opacity: .72; }
  62%, 87% { --motion-count: 1500; opacity: 1; }
  100% { --motion-count: 1500; opacity: .25; }
}
.typing-swap { position: relative; width: 5.5em; height: 1.27em; text-align: left; }
.typing-swap b { display: block; position: absolute; inset: 0 auto 0 0; overflow: hidden; width: 0; min-width: 1px; white-space: nowrap; border-right: 2px solid currentColor; animation: type-swap 6s steps(6, end) infinite; }
.typing-swap b:last-child { animation-delay: 3s; color: #6942bd; }
@keyframes type-swap {
  0% { opacity: 1; width: 0; }
  18%, 35% { opacity: 1; width: 5.25em; }
  47% { opacity: 1; width: 0; }
  48%, 100% { opacity: 0; width: 0; }
}
.colored-word { background: linear-gradient(100deg,#372477,#8b4bd1,#2b658a,#372477); background-size: 250% 100%; background-clip: text; color: transparent; animation: gradient 4.8s ease-in-out infinite; }

.stage[data-demo="blur-swap"], .stage[data-demo="wipe"], .stage[data-demo="iris"], .stage[data-demo="shutter"],
.stage[data-demo="diagonal"], .stage[data-demo="split"], .stage[data-demo="tiles"], .stage[data-demo="stack-slide"] {
  --demo-bg: #e4edf7;
  --demo-ink: #254970;
}
.blur-swap { display: grid; place-items: center; }
.blur-swap b { grid-area: 1 / 1; animation: blur-swap 5s ease-in-out infinite; }
.blur-swap b:nth-child(2) { opacity: 0; color: #6643a7; animation-delay: 2.5s; }
@keyframes blur-swap {
  0%, 13% { opacity: 0; filter: blur(7px); }
  23%, 38% { opacity: 1; filter: blur(0); }
  52%, 100% { opacity: 0; filter: blur(7px); }
}
.transition-frame {
  position: relative;
  display: block;
  width: 69%;
  height: 66%;
  isolation: isolate;
  overflow: hidden;
  border-radius: 8px;
  background: #c5d9f0;
  box-shadow: 0 4px 13px #233d611c;
}
.transition-frame b { display: grid; position: absolute; inset: 0; place-items: center; font-size: .9rem; }
.wipe-surface, .iris-surface, .diagonal-surface, .shutter-after, .split-layers b { background: #6052aa; color: #fff; }
.wipe-surface { animation: wipe 4.9s cubic-bezier(.57,.09,.24,.95) infinite; }
@keyframes wipe {
  0%, 20%, 100% { clip-path: inset(0 100% 0 0); }
  42%, 73% { clip-path: inset(0); }
  94% { clip-path: inset(0 0 0 100%); }
}
.iris-surface { background: #3b6384; animation: iris 4.8s ease-in-out infinite; }
@keyframes iris {
  0%, 17%, 100% { clip-path: circle(0% at 50% 50%); }
  43%, 72% { clip-path: circle(75% at 50% 50%); }
}
.shutter-frame i { position: absolute; inset: 0 50% 0 0; background: #374767; transform: translateX(-101%); animation: shutter 4.8s ease-in-out infinite; }
.shutter-frame i:last-child { inset: 0 0 0 50%; --closed-side: 101%; transform: translateX(101%); }
.shutter-after { opacity: 0; animation: shutter-scene 4.8s steps(1,end) infinite; }
@keyframes shutter {
  0%, 12%, 47%, 66%, 100% { transform: translateX(var(--closed-side, -101%)); }
  24%, 32%, 77%, 85% { transform: translateX(0); }
}
@keyframes shutter-scene {
  0%, 85%, 100% { opacity: 0; }
  32% { opacity: 1; }
}
.stack-card { grid-area: 1 / 1; display: grid; place-items: center; width: 76px; height: 48px; border-radius: 9px; background: #c0d7f0; font-size: .86rem; font-weight: 740; box-shadow: 0 6px 10px #20416225; }
.stack-base { animation: card-under 4.6s ease-in-out infinite; }
.stack-next { background: #395c93; color: #fff; animation: card-over 4.6s cubic-bezier(.25,.65,.32,1) infinite; }
@keyframes card-under {
  0%, 16%, 100% { transform: translate(-11px, 4px); }
  42%, 77% { transform: translate(-19px, -7px) scale(.88); }
}
@keyframes card-over {
  0%, 16%, 100% { transform: translate(55px, 29px) rotate(10deg); opacity: 0; }
  45%, 75% { transform: translate(7px, 4px); opacity: 1; }
}
.diagonal-surface { background: #387a83; animation: diagonal 4.9s cubic-bezier(.5,.07,.3,1) infinite; }
@keyframes diagonal {
  0%, 19%, 100% { clip-path: polygon(0 0,0 0,0 0,0 100%); }
  44%, 74% { clip-path: polygon(0 0,100% 0,100% 100%,0 100%); }
  93% { clip-path: polygon(100% 0,100% 0,100% 100%,100% 100%); }
}
.stage[data-demo="zoom-out"] { --demo-bg: #f8eddf; }
.zoom-out-window { position: relative; width: 65%; height: 61%; border-radius: 8px; overflow: hidden; background: #efc8a3; }
.zoom-out-picture { display: block; position: absolute; inset: 0; isolation: isolate; animation: zoom-out 4.9s cubic-bezier(.25,.6,.24,1) infinite; }
.zoom-out-picture i { position: absolute; inset: auto 0 0; height: 70%; background: #a96e64; clip-path: polygon(0 58%,25% 15%,50% 67%,74% 25%,100% 60%,100% 100%,0 100%); }
.zoom-out-picture i:last-child { inset: 12% 27% auto auto; width: 14%; height: auto; aspect-ratio: 1; border-radius: 50%; background: #fff0cf; clip-path: none; }
@keyframes zoom-out {
  0%, 18%, 100% { transform: scale(2.1); }
  48%, 79% { transform: scale(1); }
}
.split-layers b { animation: split 4.9s ease-in-out infinite; clip-path: inset(0 0 50% 0); }
.split-layers b:last-child { --split-side: 105%; clip-path: inset(50% 0 0 0); }
@keyframes split {
  0%, 16%, 100% { transform: translateX(var(--split-side,-105%)); }
  42%, 75% { transform: translateX(0); }
}
.tile-frame { display: grid; grid-template: repeat(2, 1fr) / repeat(3, 1fr); gap: 3px; width: 64%; height: 59%; }
.tile-frame i { border-radius: 4px; background: #afc3e4; animation: tile 4.8s ease-in-out infinite; }
.tile-frame i:nth-child(2), .tile-frame i:nth-child(4) { animation-delay: .13s; }
.tile-frame i:nth-child(3), .tile-frame i:nth-child(5) { animation-delay: .26s; }
.tile-frame i:nth-child(6) { animation-delay: .39s; }
@keyframes tile {
  0%, 16%, 100% { background: #afc3e4; transform: scale(1); }
  25% { transform: scale(.85); }
  43%, 75% { background: #664dab; transform: scale(1); }
}

.stage[data-demo="shimmer"], .stage[data-demo="glow"], .stage[data-demo="bounce"], .stage[data-demo="shake"],
.stage[data-demo="loading-dots"], .stage[data-demo="border-trace"], .stage[data-demo="orbit"] {
  --demo-bg: #e6f1ec;
  --demo-ink: #255745;
}
.skeleton { position: relative; display: grid; gap: 7px; width: 63%; padding: 12px; overflow: hidden; border-radius: 8px; background: #fff; }
.skeleton i { height: 6px; border-radius: 999px; background: #c9e0d5; }
.skeleton i:nth-child(2) { width: 82%; }
.skeleton i:nth-child(3) { width: 58%; }
.skeleton b { position: absolute; inset: 0; background: linear-gradient(110deg,transparent 31%,#ffffffbf 50%,transparent 69%); animation: shimmer 3s ease-in-out infinite; }
@keyframes shimmer {
  0%, 15% { transform: translateX(-120%); }
  70%, 100% { transform: translateX(120%); }
}
.glow-chip { color: white; background: #33785f; animation: glow 3.6s ease-in-out infinite; }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 3px #3c997e55; }
  51% { box-shadow: 0 0 19px 5px #3c997e8c; }
}
.bounce-floor { position: absolute; bottom: 26%; width: 43px; height: 5px; border-radius: 50%; background: #8db6a3; }
.bounce-ball { position: absolute; bottom: 30%; width: 26px; aspect-ratio: 1; border-radius: 50%; background: #3b825f; animation: bounce 3s ease-out infinite; }
@keyframes bounce {
  0%, 18%, 73%, 100% { transform: translateY(0); }
  33% { transform: translateY(-38px) scale(.97,1.03); }
  49% { transform: translateY(0) scale(1.15,.82); }
  58% { transform: translateY(-13px); }
}
.shake-field { padding: 7px 13px; border: 1px solid #ba6670; border-radius: 7px; background: #fff7f7; color: #8b3444; font-weight: 740; font-size: .83rem; animation: shake 3.4s ease-in-out infinite; }
@keyframes shake {
  0%, 18%, 48%, 100% { transform: none; }
  23%, 35% { transform: translateX(-6px); }
  29%, 41% { transform: translateX(6px); }
}
.loading-dot-row { display: flex; gap: 7px; align-items: center; }
.loading-dot-row i { display: block; width: 10px; aspect-ratio: 1; border-radius: 50%; background: #42896d; animation: loading-dot 2.3s ease-in-out infinite; }
.loading-dot-row i:nth-child(2) { animation-delay: .14s; }
.loading-dot-row i:nth-child(3) { animation-delay: .28s; }
@keyframes loading-dot {
  0%, 48%, 100% { transform: none; opacity: .55; }
  24% { transform: translateY(-10px); opacity: 1; }
}
.trace-shell { position: relative; display: grid; isolation: isolate; place-items: center; overflow: hidden; width: 88px; height: 38px; border-radius: 8px; background: #9fc3b4; }
.trace-light { position: absolute; z-index: -1; width: 115%; aspect-ratio: 1; background: conic-gradient(transparent 15%,#317b61 35%,#ecffbe 46%,transparent 56%); animation: orbit 3.3s linear infinite; }
.trace-shell b { position: absolute; inset: 2px; display: grid; place-items: center; border-radius: 6px; background: #fff; font-size: .83rem; }
.orbit-ring { position: relative; display: grid; place-items: center; width: 53px; aspect-ratio: 1; border: 1px solid #90b9a8; border-radius: 50%; }
.orbit-ring b, .orbit-path::before { width: 10px; aspect-ratio: 1; border-radius: 50%; background: #387b64; }
.orbit-path { position: absolute; inset: -1px; border-radius: 50%; animation: orbit 3.1s linear infinite; }
.orbit-path::before { position: absolute; content: ""; inset: -2px 0 auto; margin-inline: auto; background: #60a58e; }
@keyframes orbit { to { transform: rotate(360deg); } }

.stage[data-demo="sticky-scroll"], .stage[data-demo="scroll-progress"], .stage[data-demo="scroll-zoom"],
.stage[data-demo="horizontal-scroll"], .stage[data-demo="scroll-snap"] {
  --demo-bg: #f5eddc;
  --demo-ink: #5e451d;
}
.scroll-shell { position: relative; display: block; width: 67%; height: 75%; overflow: hidden; border-radius: 8px; border: 1px solid #e4d6bd; background: #fffaf1; padding: 8px; }
.scroll-moving { display: grid; gap: 5px; animation: sample-scroll 4.8s ease-in-out infinite; }
.scroll-moving i { display: block; height: 25px; border-radius: 4px; background: #e4d0ab; }
.scroll-moving i:nth-child(2n) { background: #f1e4ca; }
.sticky-shell .scroll-moving { padding-top: 19px; }
.sticky-shell > b { position: absolute; inset: 0 0 auto; padding: 5px 0; background: #957542; color: #fff; font-size: .76rem; }
@keyframes sample-scroll {
  0%, 16%, 100% { transform: translateY(0); }
  52%, 77% { transform: translateY(-47px); }
}
.progress-rail { position: absolute; z-index: 1; inset: 0 0 auto; height: 5px; background: #e7d7bb; }
.progress-rail i { display: block; height: 100%; transform-origin: left; background: #8c6836; animation: scroll-progress 4.8s ease-in-out infinite; }
@keyframes scroll-progress {
  0%, 16%, 100% { transform: scaleX(.12); }
  52%, 77% { transform: scaleX(1); }
}
.scroll-zoom-window { position: relative; width: 65%; height: 69%; border-radius: 8px; background: #e8d0a7; overflow: hidden; }
.scroll-zoom-art { position: absolute; inset: 0; background: linear-gradient(155deg,#f7e7bb,#cc9467); animation: scroll-zoom 4.8s ease-in-out infinite; }
.scroll-zoom-art::after { content: ""; position: absolute; inset: auto 0 0; height: 75%; background: #a67457; clip-path: polygon(0 54%,28% 26%,48% 56%,67% 11%,100% 64%,100% 100%,0 100%); }
.scroll-meter { position: absolute; inset: auto 0 0; height: 4px; transform-origin: left; background: #6c4c2a; animation: scroll-progress 4.8s ease-in-out infinite; }
@keyframes scroll-zoom {
  0%, 16%, 100% { transform: scale(1); }
  52%, 77% { transform: scale(1.72); }
}
.horizontal-shell, .snap-shell { display: block; width: 72%; overflow: hidden; border-radius: 7px; }
.horizontal-track { display: flex; gap: 5px; width: max-content; animation: horizontal-scroll 5.2s ease-in-out infinite; }
.horizontal-track b { display: grid; width: 53px; height: 47px; place-items: center; border-radius: 6px; background: #fdfaf4; font-size: .8rem; }
.horizontal-track b:nth-child(2) { background: #dfc9a3; }
.horizontal-track b:nth-child(3) { background: #be9f68; }
@keyframes horizontal-scroll {
  0%, 18%, 100% { transform: translateX(0); }
  55%, 78% { transform: translateX(-44px); }
}
.snap-shell { width: 56%; height: 62%; box-shadow: 0 4px 10px #674a2520; }
.snap-track { display: grid; height: 300%; grid-template-rows: repeat(3, 1fr); animation: snap-scroll 5.2s ease-out infinite; }
.snap-track b { display: grid; place-items: center; background: #fdfaf4; font-size: .82rem; }
.snap-track b:nth-child(2) { background: #bc9d69; color: #271d0e; }
@keyframes snap-scroll {
  0%, 21% { transform: translateY(0); }
  34% { transform: translateY(-24%); }
  41%, 69% { transform: translateY(-33.3333%); }
  82% { transform: translateY(-56%); }
  92%, 100% { transform: translateY(-66.6666%); }
}

.stage[data-demo="hover-lift"], .stage[data-demo="hover-zoom"], .stage[data-demo="button-press"],
.stage[data-demo="tab-indicator"], .stage[data-demo="accordion"], .stage[data-demo="tooltip"], .stage[data-demo="toggle"] {
  --demo-bg: #f7e9f1;
  --demo-ink: #783e60;
}
.sample-pointer { position: absolute; z-index: 2; margin: 28px 0 0 60px; width: 13px; aspect-ratio: 1; background: #502e4a; clip-path: polygon(0 0,100% 54%,57% 65%,43% 100%); animation: sample-pointer 4.6s ease-in-out infinite; }
@keyframes sample-pointer {
  0%, 16%, 100% { transform: translate(14px,8px); opacity: .55; }
  36%, 73% { transform: translate(-5px,-12px); opacity: 1; }
}
.lift-card { animation: hover-lift 4.6s ease-in-out infinite; box-shadow: 0 2px 6px #5b294f24; }
@keyframes hover-lift {
  0%, 25%, 100% { transform: none; box-shadow: 0 2px 6px #5b294f24; }
  43%, 73% { transform: translateY(-9px); box-shadow: 0 11px 18px #5b294f45; }
}
.hover-image { position: relative; overflow: hidden; width: 60%; height: 64%; border-radius: 7px; }
.hover-image i { position: absolute; inset: 0; background: linear-gradient(145deg,#deb8d0,#a85d89); animation: hover-zoom 4.6s ease-in-out infinite; }
.hover-image i::after { position: absolute; content: ""; inset: 30% 0 0; background: #794466; clip-path: polygon(0 58%,26% 15%,51% 72%,80% 27%,100% 68%,100% 100%,0 100%); }
@keyframes hover-zoom {
  0%, 24%, 100% { transform: scale(1); }
  44%, 73% { transform: scale(1.45); }
}
.press-chip { color: white; background: #95486f; box-shadow: 0 4px 0 #713252; animation: press 4.6s ease-in-out infinite; }
@keyframes press {
  0%, 37%, 55%, 100% { transform: none; box-shadow: 0 4px 0 #713252; }
  46% { transform: translateY(3px) scale(.95); box-shadow: 0 1px 0 #713252; }
}
.mini-tabs { display: grid; position: relative; width: 82%; grid-template-columns: repeat(3,minmax(0,1fr)); border-radius: 8px; background: white; overflow: hidden; padding-bottom: 4px; }
.mini-tabs b { padding: 9px 0 6px; font-size: .72rem; }
.mini-tabs i { position: absolute; inset: auto auto 0 0; width: 33.3333%; height: 3px; border-radius: 3px; background: #a24f7c; animation: tab-indicator 5s ease-in-out infinite; }
@keyframes tab-indicator {
  0%, 17%, 100% { transform: none; }
  31%, 50% { transform: translateX(100%); }
  65%, 83% { transform: translateX(200%); }
}
.mini-accordion { width: 74%; border-radius: 7px; background: white; overflow: hidden; text-align: left; }
.mini-accordion strong { display: flex; justify-content: space-between; align-items: center; gap: 5px; padding: 6px 9px; background: #f0d5e4; font-size: .8rem; }
.mini-accordion strong i { font-style: normal; animation: accordion-icon 4.7s ease-in-out infinite; }
.accordion-panel { display: grid; align-content: center; gap: 4px; height: 32px; padding: 0 9px; overflow: hidden; animation: accordion 4.7s ease-in-out infinite; }
.accordion-panel b { border-radius: 5px; height: 4px; background: #d9b6cb; }
.accordion-panel b:last-child { width: 60%; }
@keyframes accordion {
  0%, 18%, 100% { height: 0; opacity: 0; }
  42%, 74% { height: 32px; opacity: 1; }
}
@keyframes accordion-icon {
  0%, 18%, 100% { transform: none; }
  42%, 74% { transform: rotate(45deg); }
}
.tooltip-anchor { display: grid; place-items: center; width: 23px; height: 23px; border: 1px solid #a66b90; border-radius: 50%; font-size: .83rem; font-weight: 800; }
.tooltip-bubble { position: absolute; margin-bottom: 59px; padding: 5px 9px; border-radius: 6px; background: #743c5d; color: white; font-size: .75rem; white-space: nowrap; animation: tooltip 4.6s ease-out infinite; }
.tooltip-bubble::after { content: ""; position: absolute; inset: 100% 0 auto; width: 0; margin: auto; border-inline: 4px solid transparent; border-top: 4px solid #743c5d; }
@keyframes tooltip {
  0%, 28%, 100% { opacity: 0; transform: translateY(5px); }
  45%, 73% { opacity: 1; transform: none; }
}
.mini-toggle { position: relative; width: 56px; height: 28px; border-radius: 99px; background: #936e85; animation: toggle-bg 4.4s ease-in-out infinite; }
.mini-toggle i { position: absolute; inset: 4px auto 4px 4px; aspect-ratio: 1; background: white; border-radius: 50%; box-shadow: 0 2px 4px #4c273c40; animation: toggle-knob 4.4s ease-in-out infinite; }
@keyframes toggle-bg {
  0%, 22%, 100% { background: #936e85; }
  41%, 75% { background: #9d3f74; }
}
@keyframes toggle-knob {
  0%, 22%, 100% { transform: none; }
  41%, 75% { transform: translateX(28px); }
}
