/* ═══════════════════════════════════════════════════
   ANIMATION LIBRARIES DEMOS — animlibs-demos.css
   Selector prefix: dm-al-
   Scope: .demo-al-gsap | .demo-al-framer | .demo-al-aos
          .demo-al-animate | .demo-al-motionone
          .demo-al-lottie | .demo-al-lenis
═══════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   SHARED PRIMITIVES
───────────────────────────────────────── */
.dm-al-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.dm-al-intro {
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding-bottom: 1.6rem;
  margin-bottom: 2rem;
}
.dm-al-meta-label {
  font-family: 'Montserrat', sans-serif;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: .6rem;
}
.dm-al-intro h2 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #fff;
  margin: 0 0 .7rem;
  line-height: 1.05;
}
.dm-al-intro p {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  color: rgba(255,255,255,.65);
  line-height: 1.7;
  max-width: 720px;
  margin: 0;
}
.dm-al-intro p code {
  font-family: 'Menlo', monospace;
  font-size: .82em;
  background: rgba(255,255,255,.08);
  color: #93c5fd;
  padding: 1px 6px;
  border-radius: 4px;
}

.dm-al-section {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.dm-al-section:last-of-type { border-bottom: none; }
.dm-al-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: .5rem;
}
.dm-al-section-head h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #fff;
  margin: 0;
}
.dm-al-section-desc {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: rgba(255,255,255,.55);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 0 1.2rem;
}
.dm-al-section-desc code {
  font-family: 'Menlo', monospace;
  font-size: .8em;
  background: rgba(255,255,255,.07);
  color: #93c5fd;
  padding: 1px 6px;
  border-radius: 4px;
}
.dm-al-hint {
  font-family: 'Montserrat', sans-serif;
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}

.dm-al-replay-btn,
.dm-al-fr-toggle {
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 6px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.78);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .15s;
}
.dm-al-replay-btn:hover,
.dm-al-fr-toggle:hover {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.3);
  transform: translateY(-1px);
}

.dm-al-code {
  display: block;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.08);
  border-left: 3px solid var(--blue);
  border-radius: 6px;
  padding: 14px 18px;
  margin: 1.2rem 0 0;
  overflow-x: auto;
}
.dm-al-code code {
  font-family: 'Menlo', 'Courier New', monospace;
  font-size: .76rem;
  color: #cbd5e1;
  white-space: pre;
  line-height: 1.6;
}
.dm-al-code-wide { margin-top: 1rem; }

.dm-al-code-note {
  text-align: center;
  padding: 2rem 1rem 2rem;
  font-family: 'Montserrat', sans-serif;
}
.dm-al-code-note code {
  font-family: 'Menlo', 'Courier New', monospace;
  font-size: .76rem;
  background: rgba(37,99,235,.14);
  color: #93c5fd;
  padding: 8px 18px;
  border-radius: 6px;
  display: inline-block;
}

.dm-al-spacer    { height: 60vh; }
.dm-al-spacer-lg { height: 80vh; }

/* ═══════════════════════════════════════════════════
   1. GSAP
═══════════════════════════════════════════════════ */
.demo-al-gsap {
  background: #07090d;
  min-height: 100%;
}
.demo-al-gsap .dm-al-meta-label { color: #88ce02; }
.demo-al-gsap .dm-al-code { border-left-color: #88ce02; }

.dm-al-gsap-stage {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding: 1.4rem;
  background: rgba(136,206,2,.04);
  border: 1px solid rgba(136,206,2,.12);
  border-radius: 10px;
}
.dm-al-gsap-box {
  flex: 1;
  min-width: 110px;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, rgba(136,206,2,.18), rgba(136,206,2,.06));
  border: 1px solid rgba(136,206,2,.35);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(50px);
}
.dm-al-gsap-box.dm-al-anim {
  animation: dmAlGsapFadeUp .6s cubic-bezier(.22,.68,0,1.2) forwards;
  animation-delay: calc(var(--i, 0) * 100ms);
}
@keyframes dmAlGsapFadeUp {
  to { opacity: 1; transform: translateY(0); }
}
.dm-al-gsap-box span {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #88ce02;
}
.dm-al-gsap-box em {
  font-family: 'Menlo', monospace;
  font-style: normal;
  font-size: .58rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
}

.dm-al-gsap-letters {
  display: flex;
  justify-content: center;
  gap: .15rem;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, rgba(136,206,2,.06), transparent);
  border-radius: 10px;
}
.dm-al-gsap-letter {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.01em;
  display: inline-block;
  opacity: 0;
  transform: translateY(60px) rotate(-8deg);
}
.dm-al-gsap-letter.dm-al-anim {
  animation: dmAlGsapLetter .7s cubic-bezier(.22,1.46,.36,1) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes dmAlGsapLetter {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.dm-al-gsap-scrub-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5rem 1rem;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.02) 0 1px, transparent 1px 60px),
    rgba(0,0,0,.2);
  border-radius: 10px;
  min-height: 280px;
}
.dm-al-gsap-scrub-box {
  width: 140px;
  height: 140px;
  border-radius: 18px;
  background: linear-gradient(135deg, #88ce02, #2563eb);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(136,206,2,.3);
  will-change: transform, background;
  transition: background .1s linear;
}
.dm-al-gsap-scrub-label {
  font-family: 'Menlo', monospace;
  font-size: .65rem;
  letter-spacing: .12em;
  color: rgba(255,255,255,.95);
  text-transform: uppercase;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* ═══════════════════════════════════════════════════
   2. FRAMER MOTION
═══════════════════════════════════════════════════ */
.demo-al-framer {
  background: #060814;
  min-height: 100%;
}
.demo-al-framer .dm-al-meta-label { color: #4d7eff; }
.demo-al-framer .dm-al-code { border-left-color: #0055ff; }

.dm-al-fr-presence-stage {
  min-height: 180px;
  background: rgba(0,85,255,.05);
  border: 1px solid rgba(0,85,255,.18);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dm-al-fr-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0,85,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(0,85,255,.4);
  border-radius: 12px;
  padding: 1.1rem 1.3rem;
  max-width: 460px;
  width: 100%;
  transition:
    transform .55s cubic-bezier(.34,1.56,.64,1),
    opacity .35s ease;
}
.dm-al-fr-card.dm-al-out {
  transform: translateX(60px) scale(.95);
  opacity: 0;
  pointer-events: none;
}
.dm-al-fr-card-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0055ff, #5d8aff);
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,.2);
  position: relative;
}
.dm-al-fr-card-avatar::after {
  content: 'LH';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.dm-al-fr-card-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.dm-al-fr-card-body strong {
  font-family: 'Oswald', sans-serif;
  font-size: 1rem;
  color: #fff;
  letter-spacing: .02em;
}
.dm-al-fr-card-body span {
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
.dm-al-fr-card-body em {
  font-style: normal;
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  color: rgba(255,255,255,.78);
  margin-top: 6px;
  line-height: 1.5;
}

/* Layout-animation tabs */
.dm-al-fr-tabs {
  position: relative;
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(0,85,255,.25);
  border-radius: 12px;
}
.dm-al-fr-tab {
  position: relative;
  z-index: 2;
  background: transparent;
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 9px 18px;
  border-radius: 8px;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  transition: color .25s;
}
.dm-al-fr-tab.dm-al-active { color: #fff; }
.dm-al-fr-tab:hover { color: rgba(255,255,255,.85); }
.dm-al-fr-tab-pill {
  position: absolute;
  z-index: 1;
  top: 5px;
  left: 5px;
  background: linear-gradient(135deg, #0055ff, #4d7eff);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,85,255,.4);
  transition:
    transform .55s cubic-bezier(.34,1.4,.64,1),
    width .55s cubic-bezier(.34,1.4,.64,1),
    height .55s cubic-bezier(.34,1.4,.64,1);
  pointer-events: none;
}

/* Hover spring grid */
.dm-al-fr-hover-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.dm-al-fr-hover-card {
  background: rgba(0,85,255,.07);
  border: 1px solid rgba(0,85,255,.22);
  border-radius: 12px;
  padding: 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: transform .55s cubic-bezier(.34,1.56,.64,1),
              background .25s, border-color .25s;
}
.dm-al-fr-hover-card:hover {
  transform: translateY(-10px) scale(1.04);
  background: rgba(0,85,255,.18);
  border-color: rgba(0,85,255,.55);
}
.dm-al-fr-hover-card span {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.dm-al-fr-hover-card em {
  font-style: normal;
  font-family: 'Montserrat', sans-serif;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.5);
}
@media (max-width: 720px) {
  .dm-al-fr-hover-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════
   3. AOS
═══════════════════════════════════════════════════ */
.demo-al-aos {
  background: #0a0a10;
  min-height: 100%;
}
.demo-al-aos .dm-al-meta-label { color: #ff6b6b; }
.demo-al-aos .dm-al-code { border-left-color: #ff6b6b; }

.dm-al-aos-stream {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.dm-al-aos-block {
  background: rgba(255,107,107,.05);
  border: 1px solid rgba(255,107,107,.16);
  border-left: 3px solid #ff6b6b;
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  opacity: 0;
  transition:
    transform .85s cubic-bezier(.22,.68,0,1),
    opacity .85s ease;
  will-change: transform, opacity;
}
.dm-al-aos-block[data-aos="fade-up"]    { transform: translateY(40px); }
.dm-al-aos-block[data-aos="fade-left"]  { transform: translateX(60px); }
.dm-al-aos-block[data-aos="fade-right"] { transform: translateX(-60px); }
.dm-al-aos-block[data-aos="flip-up"]    { transform: perspective(800px) rotateX(-70deg); transform-origin: bottom; }
.dm-al-aos-block[data-aos="flip-left"]  { transform: perspective(800px) rotateY(70deg); transform-origin: left; }
.dm-al-aos-block[data-aos="zoom-in"]    { transform: scale(.6); }
.dm-al-aos-block[data-aos="zoom-in-up"] { transform: translateY(40px) scale(.7); }

.dm-al-aos-block.dm-al-aos-in {
  opacity: 1;
  transform: translate(0,0) scale(1) rotate(0) perspective(800px) rotateX(0) rotateY(0);
}
.dm-al-aos-tag {
  display: inline-block;
  font-family: 'Menlo', monospace;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(255,107,107,.15);
  color: #ff8a8a;
  border: 1px solid rgba(255,107,107,.3);
  padding: 3px 9px;
  border-radius: 4px;
  margin-bottom: .55rem;
}
.dm-al-aos-block h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #fff;
  margin: 0 0 .3rem;
}
.dm-al-aos-block p {
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: rgba(255,255,255,.65);
  line-height: 1.6;
  margin: 0;
}

/* ═══════════════════════════════════════════════════
   4. ANIMATE.CSS
═══════════════════════════════════════════════════ */
.demo-al-animate {
  background: #0a0a07;
  min-height: 100%;
}
.demo-al-animate .dm-al-meta-label { color: #ffd700; }
.demo-al-animate .dm-al-code { border-left-color: #ffd700; }

.dm-al-anim-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.dm-al-anim-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1.4rem 1rem;
  background: rgba(255,215,0,.04);
  border: 1px solid rgba(255,215,0,.18);
  border-radius: 10px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  font-family: inherit;
  color: inherit;
}
.dm-al-anim-tile:hover {
  background: rgba(255,215,0,.1);
  border-color: rgba(255,215,0,.4);
}
.dm-al-anim-icon {
  font-size: 1.7rem;
  color: #ffd700;
  line-height: 1;
}
.dm-al-anim-label {
  font-family: 'Menlo', monospace;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .02em;
}
.dm-al-anim-hint {
  font-family: 'Montserrat', sans-serif;
  font-size: .54rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: rgba(255,215,0,.55);
}

/* Animate.css emulated keyframes */
@keyframes dmAlBounce {
  0%, 20%, 53%, 80%, 100% { transform: translate3d(0,0,0); }
  40%, 43% { transform: translate3d(0,-22px,0); }
  70% { transform: translate3d(0,-12px,0); }
  90% { transform: translate3d(0,-4px,0); }
}
@keyframes dmAlFadeInLeft {
  0% { opacity: 0; transform: translate3d(-60px,0,0); }
  100% { opacity: 1; transform: translate3d(0,0,0); }
}
@keyframes dmAlFlash {
  0%, 50%, 100% { opacity: 1; }
  25%, 75% { opacity: 0; }
}
@keyframes dmAlRubberBand {
  0% { transform: scale3d(1,1,1); }
  30% { transform: scale3d(1.25,.75,1); }
  40% { transform: scale3d(.75,1.25,1); }
  50% { transform: scale3d(1.15,.85,1); }
  65% { transform: scale3d(.95,1.05,1); }
  75% { transform: scale3d(1.05,.95,1); }
  100% { transform: scale3d(1,1,1); }
}
@keyframes dmAlShakeX {
  0%, 100% { transform: translate3d(0,0,0); }
  10%, 30%, 50%, 70%, 90% { transform: translate3d(-9px,0,0); }
  20%, 40%, 60%, 80% { transform: translate3d(9px,0,0); }
}
@keyframes dmAlTada {
  0% { transform: scale3d(1,1,1); }
  10%, 20% { transform: scale3d(.9,.9,.9) rotate(-3deg); }
  30%, 50%, 70%, 90% { transform: scale3d(1.1,1.1,1.1) rotate(3deg); }
  40%, 60%, 80% { transform: scale3d(1.1,1.1,1.1) rotate(-3deg); }
  100% { transform: scale3d(1,1,1); }
}
@keyframes dmAlWobble {
  0% { transform: translate3d(0,0,0); }
  15% { transform: translate3d(-25%,0,0) rotate(-5deg); }
  30% { transform: translate3d(20%,0,0) rotate(3deg); }
  45% { transform: translate3d(-15%,0,0) rotate(-3deg); }
  60% { transform: translate3d(10%,0,0) rotate(2deg); }
  75% { transform: translate3d(-5%,0,0) rotate(-1deg); }
  100% { transform: translate3d(0,0,0); }
}
@keyframes dmAlHeartBeat {
  0% { transform: scale(1); }
  14% { transform: scale(1.3); }
  28% { transform: scale(1); }
  42% { transform: scale(1.3); }
  70% { transform: scale(1); }
}

.dm-al-anim-bounce      { animation: dmAlBounce      1s ease both; }
.dm-al-anim-fadeInLeft  { animation: dmAlFadeInLeft  .8s ease both; }
.dm-al-anim-flash       { animation: dmAlFlash       1s ease both; }
.dm-al-anim-rubberBand  { animation: dmAlRubberBand  1s ease both; }
.dm-al-anim-shakeX      { animation: dmAlShakeX      1s ease both; }
.dm-al-anim-tada        { animation: dmAlTada        1s ease both; }
.dm-al-anim-wobble      { animation: dmAlWobble      1s ease both; }
.dm-al-anim-heartBeat   { animation: dmAlHeartBeat  1.3s ease-in-out both; }

@media (max-width: 720px) {
  .dm-al-anim-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════════════
   5. MOTION ONE
═══════════════════════════════════════════════════ */
.demo-al-motionone {
  background: #061010;
  min-height: 100%;
}
.demo-al-motionone .dm-al-meta-label { color: var(--green); }
.demo-al-motionone .dm-al-code { border-left-color: var(--green); }

.dm-al-mo-stage {
  background: rgba(16,185,129,.04);
  border: 1px solid rgba(16,185,129,.16);
  border-radius: 12px;
  padding: 1.5rem;
}
.dm-al-mo-track {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.dm-al-mo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dm-al-mo-label {
  flex: 0 0 130px;
  font-family: 'Menlo', monospace;
  font-size: .7rem;
  color: rgba(255,255,255,.7);
}
.dm-al-mo-rail {
  flex: 1;
  height: 36px;
  background: rgba(255,255,255,.03);
  border-radius: 999px;
  position: relative;
  border: 1px solid rgba(255,255,255,.07);
}
.dm-al-mo-box {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 4px 12px rgba(16,185,129,.4);
}
/* Different stiffness — different easing curves & durations */
.dm-al-mo-box[data-stiff="soft"].dm-al-mo-go {
  animation: dmAlMoSoft 1.6s cubic-bezier(.32,1.05,.5,1) forwards;
}
.dm-al-mo-box[data-stiff="med"].dm-al-mo-go {
  animation: dmAlMoMed .9s cubic-bezier(.34,1.4,.5,1) forwards;
}
.dm-al-mo-box[data-stiff="hard"].dm-al-mo-go {
  animation: dmAlMoHard .45s cubic-bezier(.4,1.7,.5,1.05) forwards;
}
@keyframes dmAlMoSoft { to { left: calc(100% - 33px); } }
@keyframes dmAlMoMed  { to { left: calc(100% - 33px); } }
@keyframes dmAlMoHard { to { left: calc(100% - 33px); } }

/* Timeline scene */
.dm-al-mo-tl-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 24px;
  padding: 3rem 1rem 2rem;
  background: rgba(16,185,129,.04);
  border: 1px solid rgba(16,185,129,.16);
  border-radius: 12px;
  min-height: 180px;
}
.dm-al-mo-tl-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  box-shadow: 0 6px 18px rgba(16,185,129,.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  transform: translateY(0);
}
.dm-al-mo-tl-dot[data-step="1"].dm-al-mo-tl-go {
  animation: dmAlMoTlBounce .6s cubic-bezier(.34,1.56,.5,1) 0s both;
}
.dm-al-mo-tl-dot[data-step="2"].dm-al-mo-tl-go {
  animation: dmAlMoTlBounce .6s cubic-bezier(.34,1.56,.5,1) .2s both;
}
.dm-al-mo-tl-dot[data-step="3"].dm-al-mo-tl-go {
  animation: dmAlMoTlBounce .6s cubic-bezier(.34,1.56,.5,1) .4s both;
}
@keyframes dmAlMoTlBounce {
  0%   { transform: translateY(0); }
  40%  { transform: translateY(-50px); }
  100% { transform: translateY(0); }
}

@media (max-width: 720px) {
  .dm-al-mo-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .dm-al-mo-label { flex: 0 0 auto; }
}

/* ═══════════════════════════════════════════════════
   6. LOTTIE / RIVE
═══════════════════════════════════════════════════ */
.demo-al-lottie {
  background: #050a14;
  min-height: 100%;
}
.demo-al-lottie .dm-al-meta-label { color: #00d2ff; }
.demo-al-lottie .dm-al-code { border-left-color: #00d2ff; }
.demo-al-lottie .dm-al-rive-section .dm-al-code { border-left-color: #ff6b35; }

.dm-al-lottie-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.dm-al-lottie-card {
  background: rgba(0,210,255,.04);
  border: 1px solid rgba(0,210,255,.18);
  border-radius: 12px;
  padding: 1.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-height: 200px;
  justify-content: space-between;
}
.dm-al-lottie-tag {
  font-family: 'Menlo', monospace;
  font-size: .62rem;
  color: rgba(0,210,255,.85);
  letter-spacing: .04em;
}

/* Heart pulse */
.dm-al-lottie-heart {
  width: 90px;
  height: 90px;
  filter: drop-shadow(0 0 12px rgba(255,23,68,.5));
  animation: dmAlHeartPulse 1.2s ease-in-out infinite;
  transform-origin: center;
}
@keyframes dmAlHeartPulse {
  0%, 100% { transform: scale(1); }
  20% { transform: scale(1.15); }
  40% { transform: scale(1); }
  60% { transform: scale(1.1); }
}

/* Checkmark stroke */
.dm-al-lottie-check {
  width: 90px;
  height: 90px;
}
.dm-al-lottie-check-circle {
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
  animation: dmAlCheckCircle 1.4s ease-out infinite;
}
.dm-al-lottie-check-path {
  stroke-dasharray: 80;
  stroke-dashoffset: 80;
  animation: dmAlCheckPath 1.4s ease-out infinite;
}
@keyframes dmAlCheckCircle {
  0% { stroke-dashoffset: 264; }
  60%, 100% { stroke-dashoffset: 0; }
}
@keyframes dmAlCheckPath {
  0%, 50% { stroke-dashoffset: 80; }
  85%, 100% { stroke-dashoffset: 0; }
}

/* Loader bars */
.dm-al-lottie-loader {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  height: 60px;
}
.dm-al-lottie-loader span {
  display: block;
  width: 10px;
  height: 100%;
  background: linear-gradient(180deg, #00d2ff, #0084ff);
  border-radius: 4px;
  animation: dmAlLoaderBar 1s ease-in-out infinite;
}
.dm-al-lottie-loader span:nth-child(2) { animation-delay: .1s; }
.dm-al-lottie-loader span:nth-child(3) { animation-delay: .2s; }
.dm-al-lottie-loader span:nth-child(4) { animation-delay: .3s; }
@keyframes dmAlLoaderBar {
  0%, 100% { transform: scaleY(.3); }
  50% { transform: scaleY(1); }
}

/* Rive */
.dm-al-rive-stage {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.2rem;
  background: rgba(255,107,53,.04);
  border: 1px solid rgba(255,107,53,.18);
  border-radius: 12px;
  padding: 1.5rem;
  align-items: center;
}
.dm-al-rive-canvas {
  position: relative;
  min-height: 220px;
  background:
    radial-gradient(circle at 50% 50%, rgba(255,107,53,.18), transparent 70%),
    rgba(0,0,0,.25);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  overflow: hidden;
}
.dm-al-rive-char {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 28px;
  background: linear-gradient(135deg, #ff6b35, #ffb37a);
  box-shadow: 0 12px 32px rgba(255,107,53,.4);
  transition: transform .5s cubic-bezier(.34,1.56,.5,1);
}
.dm-al-rive-eye {
  position: absolute;
  top: 36px;
  width: 14px;
  height: 14px;
  background: #1e1107;
  border-radius: 50%;
  transition: transform .35s, height .25s;
}
.dm-al-rive-eye-l { left: 28px; }
.dm-al-rive-eye-r { right: 28px; }
.dm-al-rive-mouth {
  position: absolute;
  bottom: 28px;
  left: 50%;
  width: 36px;
  height: 12px;
  border-bottom: 4px solid #1e1107;
  border-radius: 0 0 36px 36px;
  transform: translateX(-50%);
  transition: all .35s;
}

/* Rive states */
.dm-al-rive-canvas[data-state="idle"] .dm-al-rive-char {
  animation: dmAlRiveIdle 3s ease-in-out infinite;
}
@keyframes dmAlRiveIdle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.dm-al-rive-canvas[data-state="happy"] .dm-al-rive-char {
  animation: dmAlRiveHappy .6s ease-in-out infinite;
  background: linear-gradient(135deg, #ffb720, #ffe35a);
}
.dm-al-rive-canvas[data-state="happy"] .dm-al-rive-mouth {
  width: 50px;
  height: 22px;
  border-bottom-width: 5px;
}
@keyframes dmAlRiveHappy {
  0%, 100% { transform: scale(1) rotate(0); }
  50% { transform: scale(1.06) rotate(-3deg); }
}

.dm-al-rive-canvas[data-state="sad"] .dm-al-rive-char {
  background: linear-gradient(135deg, #4d7eff, #8aa9ff);
  transform: translateY(8px);
}
.dm-al-rive-canvas[data-state="sad"] .dm-al-rive-mouth {
  border-bottom: none;
  border-top: 4px solid #1e1107;
  border-radius: 36px 36px 0 0;
  bottom: 22px;
}
.dm-al-rive-canvas[data-state="sad"] .dm-al-rive-eye {
  height: 8px;
  border-radius: 0 0 50% 50%;
  top: 40px;
}

.dm-al-rive-canvas[data-state="excited"] .dm-al-rive-char {
  animation: dmAlRiveExcited .35s ease-in-out infinite;
  background: linear-gradient(135deg, #ff3d77, #ff8eb0);
}
@keyframes dmAlRiveExcited {
  0%, 100% { transform: translateY(-10px) rotate(-4deg); }
  50% { transform: translateY(-2px) rotate(4deg); }
}
.dm-al-rive-canvas[data-state="excited"] .dm-al-rive-mouth {
  width: 30px;
  height: 30px;
  border: 4px solid #1e1107;
  border-radius: 50%;
  bottom: 22px;
}

.dm-al-rive-canvas[data-state="sleep"] .dm-al-rive-char {
  background: linear-gradient(135deg, #6b6b8c, #aaaac9);
  animation: dmAlRiveSleep 4s ease-in-out infinite;
}
@keyframes dmAlRiveSleep {
  0%, 100% { transform: rotate(-8deg) translateY(2px); }
  50% { transform: rotate(-8deg) translateY(-3px); }
}
.dm-al-rive-canvas[data-state="sleep"] .dm-al-rive-eye {
  height: 3px;
  border-radius: 2px;
  top: 44px;
}
.dm-al-rive-canvas[data-state="sleep"] .dm-al-rive-mouth {
  width: 16px;
  height: 6px;
  border-bottom: 3px solid #1e1107;
}

.dm-al-rive-state-label {
  font-family: 'Menlo', monospace;
  font-size: .7rem;
  color: rgba(255,255,255,.7);
  background: rgba(0,0,0,.5);
  padding: 6px 14px;
  border-radius: 999px;
}
.dm-al-rive-state-label strong {
  color: #ff6b35;
  font-weight: 700;
}

.dm-al-rive-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 150px;
}
.dm-al-rive-btn {
  font-family: 'Menlo', monospace;
  font-size: .72rem;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: 6px;
  background: rgba(255,107,53,.08);
  border: 1px solid rgba(255,107,53,.3);
  color: rgba(255,255,255,.8);
  cursor: pointer;
  transition: background .18s, color .18s, border-color .18s, transform .15s;
  text-align: left;
}
.dm-al-rive-btn:hover {
  background: rgba(255,107,53,.18);
  color: #fff;
  transform: translateX(3px);
}
.dm-al-rive-btn.dm-al-active {
  background: rgba(255,107,53,.28);
  border-color: #ff6b35;
  color: #fff;
}

@media (max-width: 720px) {
  .dm-al-lottie-grid { grid-template-columns: 1fr; }
  .dm-al-rive-stage { grid-template-columns: 1fr; }
  .dm-al-rive-controls { flex-direction: row; flex-wrap: wrap; }
  .dm-al-rive-btn { flex: 1; min-width: 80px; text-align: center; }
}

/* ═══════════════════════════════════════════════════
   7. LENIS SCROLL
═══════════════════════════════════════════════════ */
.demo-al-lenis {
  background: #100a05;
  min-height: 100%;
}
.demo-al-lenis .dm-al-meta-label { color: #ff9800; }
.demo-al-lenis .dm-al-code { border-left-color: #ff9800; }

.dm-al-len-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.dm-al-len-col {
  background: rgba(255,152,0,.04);
  border: 1px solid rgba(255,152,0,.16);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.dm-al-len-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(0,0,0,.35);
  border-bottom: 1px solid rgba(255,152,0,.16);
}
.dm-al-len-col-head strong {
  font-family: 'Menlo', monospace;
  font-size: .68rem;
  color: rgba(255,255,255,.75);
  letter-spacing: .04em;
}
.dm-al-len-badge {
  display: inline-block;
  font-family: 'Montserrat', sans-serif;
  font-size: .54rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid;
}
.dm-al-len-badge-native {
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.75);
  border-color: rgba(255,255,255,.2);
}
.dm-al-len-badge-lenis {
  background: rgba(255,152,0,.18);
  color: #ffb756;
  border-color: rgba(255,152,0,.5);
}
.dm-al-len-scroll {
  height: 220px;
  overflow-y: auto;
  padding: 14px 18px;
}
.dm-al-len-scroll p {
  font-family: 'Inter', sans-serif;
  font-size: .85rem;
  color: rgba(255,255,255,.78);
  line-height: 1.7;
  margin: 0 0 1rem;
  display: flex;
  gap: 12px;
}
.dm-al-len-scroll p span {
  flex: 0 0 28px;
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: #ff9800;
  font-size: .9rem;
}
.dm-al-len-end {
  color: var(--green) !important;
  font-weight: 700;
  font-family: 'Menlo', monospace !important;
  font-size: .8rem !important;
}

/* Native scrollbar visible / instant feel */
.dm-al-len-native::-webkit-scrollbar { width: 10px; }
.dm-al-len-native::-webkit-scrollbar-thumb { background: rgba(255,255,255,.25); border-radius: 0; }
.dm-al-len-native { scroll-behavior: auto; }

/* Smooth feels softer */
.dm-al-len-smooth::-webkit-scrollbar { width: 4px; }
.dm-al-len-smooth::-webkit-scrollbar-thumb { background: rgba(255,152,0,.6); border-radius: 4px; }

/* Scroll-driven transformer */
.dm-al-len-trans-wrap {
  background: rgba(255,152,0,.04);
  border: 1px solid rgba(255,152,0,.16);
  border-radius: 12px;
  padding: 4rem 1rem;
}
.dm-al-len-trans-track {
  display: flex;
  justify-content: center;
}
.dm-al-len-trans-block {
  width: 130px;
  height: 130px;
  border-radius: 18px;
  background: linear-gradient(135deg, #ff5722, #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 32px rgba(255,152,0,.4);
  will-change: transform, background;
  transition: background .15s linear;
}
.dm-al-len-trans-block span {
  font-family: 'Menlo', monospace;
  font-size: .6rem;
  font-weight: 700;
  color: rgba(255,255,255,.95);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  padding: 0 8px;
  line-height: 1.3;
}

@media (max-width: 720px) {
  .dm-al-len-compare { grid-template-columns: 1fr; }
}
