/* Entrances and reduced motion. Rules: .claude/skills/daisy-ui/references/motion.md.
   Everything enters once and then stays still. Daisy is the only thing that keeps moving (js/daisy.js). */

@keyframes rise {
  from {
    opacity: 0;
    translate: 0 14px;
  }

  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* The hero settles in on load: words first, then Daisy's stage, one beat apart. */
.enter {
  animation: rise var(--dur-slow) var(--ease-out) both;
}

.enter-1 {
  animation-delay: calc(var(--beat) * 1);
}

.enter-2 {
  animation-delay: calc(var(--beat) * 2);
}

.enter-3 {
  animation-delay: calc(var(--beat) * 3);
}

/* A word underlined by hand (the hero's "small win", owner 2026-11-16): the pen line is drawn in, left to right, once
   the words around it have settled. With reduced motion it is simply there. */
@keyframes draw-in {
  from {
    background-size: 0% 0.7em;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .draw-in {
    animation: draw-in 700ms var(--ease-out) calc(var(--beat) * 2 + var(--dur-slow)) both;
  }
}

/* Hovered, the underlined words shimmer like a link (base.css, link-shimmer). The draw-in stays first in the list, so
   it doesn't replay when the pointer leaves. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .draw-in:hover {
    -webkit-mask-image: linear-gradient(100deg, rgb(0 0 0 / 0.45) 38%, #000 50%, rgb(0 0 0 / 0.45) 62%);
    mask-image: linear-gradient(100deg, rgb(0 0 0 / 0.45) 38%, #000 50%, rgb(0 0 0 / 0.45) 62%);
    -webkit-mask-size: 300% 100%;
    mask-size: 300% 100%;
    animation:
      draw-in 700ms var(--ease-out) calc(var(--beat) * 2 + var(--dur-slow)) both,
      link-shimmer 1.5s linear infinite;
  }
}

/* Sections below the fold rise in once (js/site.js adds .is-pending, then .is-in). */
.reveal.is-pending {
  opacity: 0;
  translate: 0 18px;
}

.reveal.is-pending.is-in {
  opacity: 1;
  translate: 0 0;
  transition:
    opacity var(--dur-slow) var(--ease-out),
    translate var(--dur-slow) var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }

  .enter,
  .reveal {
    animation: none !important;
    opacity: 1 !important;
    translate: none !important;
  }
}
