/* Small Fox Studio — Playful motion
   The hero's crayon texture and calm reveals. main.js sets things up; everything is
   gated on .js so the page reads fine without scripts, and the motion only runs for
   people who haven't asked to reduce it. */

:root {
  --fx-glide: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Things rise in from just below; never let that scroll the page sideways */
main { overflow-x: clip; }

/* ─── Crayon texture (hero underline) ────────────────── */
.hero__swoosh { filter: url(#fx-crayon); }

/* Section titles: wrapper for the rising words */
.fx-title { display: inline-block; }
.fx-title .hw { padding-bottom: 0.22em; margin-bottom: -0.22em; }

/* ─── Link hover: a wavy underline ───────────────────── */
.text-link:hover,
.hero__text-link:hover {
  border-bottom-color: transparent;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='6' viewBox='0 0 14 6'%3E%3Cpath d='M0 3 Q 3.5 0 7 3 T 14 3' fill='none' stroke='%23C05A28' stroke-width='1.6'/%3E%3C/svg%3E") 0 100% / 14px 6px repeat-x;
}

/* ─── Motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {

  /* Scrolled-in content: a short, calm rise */
  .js-fade {
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.8s var(--fx-glide);
  }

  /* Titles: words rise into place */
  .js .fx-title .hw > span {
    transform: translateY(130%);
    transition: transform 0.8s var(--fx-glide);
    transition-delay: calc(var(--i, 0) * 70ms);
  }
  .js .fx-title.is-in .hw > span { transform: none; }

  /* Work cards: a calm fade up */
  .js .fx-rise {
    opacity: 0;
    translate: 0 20px;
    transition: opacity 0.8s ease, translate 0.9s var(--fx-glide);
    transition-delay: var(--d, 0s);
  }
  .js .fx-rise.is-in { opacity: 1; translate: 0 0; }

  /* Review stars twinkle on one by one */
  .fx-star { display: inline-block; }
  .js .fx-stars .fx-star {
    scale: 0;
    transition: scale 0.4s var(--fx-glide);
    transition-delay: calc(0.3s + var(--i) * 0.08s);
  }
  .js .fx-stars.is-in .fx-star { scale: 1; }

  /* Buttons give a small squish on hover */
  .btn:hover,
  .reviews__platform-btn:hover { animation: fx-squish 0.45s ease both; }
  @keyframes fx-squish {
    0%   { scale: 1; }
    40%  { scale: 1.04 0.96; }
    70%  { scale: 0.99 1.01; }
    100% { scale: 1; }
  }
}
