/* Motion: short, calm, triggered by the user. Nothing moves on its own. */
@keyframes fl-spin { to { transform: rotate(360deg); } }
@keyframes fl-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@keyframes fl-rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes fl-pop { from { opacity: 0; transform: scale(.96); } }
@keyframes fl-fade { from { opacity: 0; } }

/* ── Hover & entrance polish: transform/opacity only, 150–450ms, off for reduced motion ── */
@keyframes fl-pop-heart { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes fl-wiggle { 25% { rotate: -10deg; } 75% { rotate: 8deg; } }
@keyframes fl-hop { 40% { transform: translateY(-14px) rotate(-4deg); } 70% { transform: translateY(2px); } }
@keyframes fl-bob { 50% { transform: translateY(-10px) rotate(-5deg); } }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    /* nav: the highlighter stroke peeks in on hover, fully drawn for the current page */
    .fl-nav__link:hover::after { transform: scaleX(.45); }
    .fl-nav__link[aria-current]:hover::after, .fl-nav__link.is-current:hover::after { transform: scaleX(1); }

    /* product card: lifts, photo swaps, + turns */
    .fl-pcard__media { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
    .fl-pcard:hover .fl-pcard__media { transform: translateY(-4px); box-shadow: 0 18px 30px -22px color-mix(in srgb, var(--ink) 55%, transparent); }
    .fl-pcard__tag { transition: rotate var(--dur-2) var(--ease); }
    .fl-pcard:hover .fl-pcard__tag { rotate: -4deg; }


    /* benefits: the yellow disc turns green and the icon gives a small wiggle */
    .fl-benefits__ic { transition: background-color var(--dur-2), color var(--dur-2); }
    .fl-benefits__list li:hover .fl-benefits__ic { background: var(--primary); color: var(--fl-yellow); }
    .fl-benefits__list li:hover .fl-benefits__ic .fl-icon { animation: fl-wiggle .45s var(--ease); }

    /* moments: posts lift and tilt a little, like picking up a photo */
    .fl-post { transition: transform var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
    .fl-post:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 24px 40px -26px #000; }
    .fl-moments__grid > .fl-post:nth-child(2):hover { transform: translateY(-6px) rotate(1.5deg); } /* middle tilts the other way */
    .fl-post__img { transition: filter var(--dur-2); }
    .fl-post:hover .fl-post__img { filter: saturate(1.15); }

    /* value tickets: straighten and come forward */
    .fl-way__list > li { transition: rotate var(--dur-2) var(--ease), transform var(--dur-2) var(--ease); }
    .fl-way__list > li:hover { rotate: 0deg; transform: translateY(-8px); }
    [dir="rtl"] .fl-way__list > li:hover { transform: translateY(-8px); }

    /* hero A: photo breathes in, sticker turns */
    .fl-hero--a .fl-hero__media > img { transition: transform 1.2s var(--ease); }
    .fl-hero--a .fl-hero__media:hover > img { transform: scale(1.04); }
    .fl-hero__burst { transition: rotate .6s var(--ease); }
    .fl-hero__slide:hover .fl-hero__burst { rotate: 10deg; }

    /* showcase: the product lifts and turns, the lifestyle circle rolls in */
    .fl-feat__media:hover .fl-feat__img, .fl-feat:has(.fl-feat__name a:hover) .fl-feat__img { transform: translateY(-10px) rotate(-3deg) scale(1.03); }
    .fl-feat__media:hover .fl-feat__life { transform: rotate(-14deg) scale(1.08); }

    /* newsletter objects hop one by one; ticket straightens */
    .fl-join__obj:hover { animation: fl-hop .55s var(--ease); }
    .fl-join__ticket { transition: rotate var(--dur-2) var(--ease); }
    .fl-join__ticket:focus-within, .fl-join__ticket:hover { rotate: 0deg; }

    /* footer + mega links slide toward the reading direction */
    /* (display stays as components.css sets it: inline-block text links, flex contact rows, round grid social buttons) */
    .fl-footer__col a { transition: transform var(--dur-1) var(--ease), color var(--dur-1); }
    .fl-footer__col a:not(.fl-footer__social a):hover { transform: translateX(4px); }
    [dir="rtl"] .fl-footer__col a:not(.fl-footer__social a):hover { transform: translateX(-4px); }

    /* Instagram tiles: the brand-green veil with the icon (already), plus a soft lift */
    .fl-insta__grid li { transition: transform var(--dur-2) var(--ease); }
    .fl-insta__grid li:hover { transform: translateY(-4px); }
}

/* heart pops when it is pressed on (all devices) */
@media (prefers-reduced-motion: no-preference) {
    [data-save][aria-pressed="true"] .fl-icon { animation: fl-pop-heart .45s var(--ease); }
    /* new hero slide fades its words in */
    .fl-hero__slide.is-in .fl-hero__txt > * { animation: fl-rise .5s var(--ease) both; }
    .fl-hero__slide.is-in .fl-hero__txt > :nth-child(2) { animation-delay: 60ms; }
    .fl-hero__slide.is-in .fl-hero__txt > :nth-child(3) { animation-delay: 120ms; }
    .fl-hero__slide.is-in .fl-hero__txt > :nth-child(4) { animation-delay: 180ms; }

    /* scroll entrance: blocks rise in once, staggered (set by ui.js; without JS nothing is hidden) */
    /* uses translate (not transform) so it never overrides a hover transform */
    .fl-reveal { opacity: 0; translate: 0 18px; transition: opacity .6s var(--ease) calc(var(--i, 0) * 70ms), translate .6s var(--ease) calc(var(--i, 0) * 70ms), transform var(--dur-2) var(--ease), rotate var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease); }
    .fl-reveal.is-in { opacity: 1; translate: none; }
}

/* People who ask for less motion get none (spinners slow down instead of stopping, so loading still reads) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
    .fl-spinner, .fl-btn[aria-busy="true"]::after { animation-duration: 1.6s !important; animation-iteration-count: infinite !important; }
    .fl-skel { animation: none !important; }
}
