/*
 * Motion pack for the public pages.
 *
 * Everything here is switched on by <html class="motion-on">. That class is added (by a one-line
 * script in the page head) only when the visitor has NOT asked their device to reduce motion.
 * Without it the site is static and every element is visible, so nothing depends on these effects.
 * To turn the whole pack off, remove motion.css / motion.js from inc/layout/header.php and footer.php.
 */

/* ---------------------------------------------------------------- scroll progress bar */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1040; pointer-events: none; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, #ffe933, #ff3d9a 55%, #6ee9ed); box-shadow: 0 0 10px rgba(255, 61, 154, .6); }

/* ---------------------------------------------------------------- confetti layer */
.confetti-layer { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1035; pointer-events: none; }

/* ---------------------------------------------------------------- poster: entrance, disco lights, shine, glints */
.hero-poster { overflow: hidden; }
.motion-on .poster-img { animation: poster-in 1.5s cubic-bezier(.2, .7, .2, 1) both; transform-origin: 50% 40%; }
@keyframes poster-in { from { transform: scale(1.07); opacity: .35; } to { transform: none; opacity: 1; } }

.poster-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; line-height: 0; }

.disco-light { position: absolute; width: 48vw; height: 48vw; border-radius: 50%; mix-blend-mode: screen; opacity: 0; will-change: transform, opacity; }
.disco-light.l1 { left: -12%; top: -38%; background: radial-gradient(closest-side, rgba(255, 61, 154, .6), rgba(255, 61, 154, 0) 72%); animation: disco-a 9s ease-in-out .8s infinite alternate; }
.disco-light.l2 { left: 30%; top: 22%; background: radial-gradient(closest-side, rgba(255, 233, 51, .42), rgba(255, 233, 51, 0) 72%); animation: disco-b 11s ease-in-out 1.4s infinite alternate; }
.disco-light.l3 { right: -14%; top: -20%; background: radial-gradient(closest-side, rgba(110, 233, 237, .5), rgba(110, 233, 237, 0) 72%); animation: disco-c 10s ease-in-out 2s infinite alternate; }
@keyframes disco-a { 0% { opacity: .1; transform: translate3d(0, 0, 0) scale(.9); } 50% { opacity: .65; } 100% { opacity: .2; transform: translate3d(26vw, 16vw, 0) scale(1.15); } }
@keyframes disco-b { 0% { opacity: .08; transform: translate3d(-10vw, 4vw, 0) scale(1.1); } 50% { opacity: .5; } 100% { opacity: .12; transform: translate3d(14vw, -8vw, 0) scale(.85); } }
@keyframes disco-c { 0% { opacity: .15; transform: translate3d(0, 0, 0) scale(1); } 50% { opacity: .6; } 100% { opacity: .1; transform: translate3d(-24vw, 14vw, 0) scale(1.2); } }

.poster-shine { position: absolute; top: -20%; bottom: -20%; left: 0; width: 20%; background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .2) 42%, rgba(255, 255, 255, .36) 50%, rgba(255, 255, 255, .2) 58%, rgba(255, 255, 255, 0)); transform: translate3d(-150%, 0, 0) skewX(-18deg); animation: poster-shine 8.5s ease-in-out 1.8s infinite; will-change: transform; }
@keyframes poster-shine { 0% { transform: translate3d(-150%, 0, 0) skewX(-18deg); } 24%, 100% { transform: translate3d(680%, 0, 0) skewX(-18deg); } }

.glint { position: absolute; width: var(--s, 18px); height: var(--s, 18px); margin: calc(var(--s, 18px) / -2) 0 0 calc(var(--s, 18px) / -2); background: #fff; clip-path: polygon(50% 0, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0 50%, 41% 41%); opacity: 0; animation: glint var(--t, 2.6s) ease-in-out var(--d, 0s) infinite; will-change: transform, opacity; }
.glint.warm { background: #fff3a6; }
@keyframes glint { 0%, 100% { opacity: 0; transform: scale(.15) rotate(0deg); } 45% { opacity: 1; transform: scale(1) rotate(35deg); } 60% { opacity: .9; transform: scale(.8) rotate(50deg); } }

/* ---------------------------------------------------------------- reveal on scroll (attributes are added by motion.js) */
.motion-on [data-reveal] { opacity: 0; transform: translate3d(0, 30px, 0); transition: opacity .75s cubic-bezier(.2, .7, .2, 1), transform .75s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--reveal-delay, 0ms); will-change: opacity, transform; }
.motion-on [data-reveal="zoom"] { transform: scale(.9); }
@media (min-width: 992px) {
  .motion-on [data-reveal="left"] { transform: translate3d(-44px, 0, 0); }
  .motion-on [data-reveal="right"] { transform: translate3d(44px, 0, 0); }
}
.motion-on [data-reveal].is-in { opacity: 1; transform: none; }

/* timeline dots pop as their row arrives */
.motion-on .timeline li.is-in::before { animation: dot-pop .6s cubic-bezier(.3, 1.6, .5, 1) var(--reveal-delay, 0ms) both; }
@keyframes dot-pop { from { transform: scale(0); } 60% { transform: scale(1.5); } to { transform: scale(1); } }

/* ---------------------------------------------------------------- marquee ribbon */
.festival-ribbon.is-marquee { overflow: hidden; }
.festival-ribbon.is-marquee span, .festival-ribbon.is-marquee b { display: inline-block !important; }
.ribbon-track { display: flex; width: max-content; animation: ribbon-move 34s linear infinite; will-change: transform; }
.ribbon-set { display: flex; align-items: center; gap: 2.6rem; padding-right: 2.6rem; flex: none; }
.festival-ribbon.is-marquee:hover .ribbon-track { animation-play-state: paused; }
.festival-ribbon.is-marquee b { animation: spin-slow 7s linear infinite; }
@keyframes ribbon-move { to { transform: translate3d(-50%, 0, 0); } }
@keyframes spin-slow { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) { .ribbon-track { animation-duration: 24s; } .ribbon-set { gap: 1.6rem; padding-right: 1.6rem; } }

/* ---------------------------------------------------------------- countdown: digits drop in when they change */
.motion-on .countdown .cd { overflow: hidden; }
.motion-on .countdown .num.tick { animation: cd-tick .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes cd-tick { from { transform: translate3d(0, -55%, 0); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- buttons: light sweep + pulse on the main call to action */
.motion-on .btn-gold:not(.disabled) { position: relative; overflow: hidden; isolation: isolate; }
.motion-on .btn-gold:not(.disabled)::after { content: ""; position: absolute; z-index: -1; top: -10%; bottom: -10%; left: 0; width: 38%; background: linear-gradient(100deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .7) 50%, rgba(255, 255, 255, 0)); transform: translate3d(-140%, 0, 0) skewX(-20deg); animation: btn-shine 4.2s ease-in-out 1.2s infinite; pointer-events: none; }
@keyframes btn-shine { 0% { transform: translate3d(-140%, 0, 0) skewX(-20deg); } 30%, 100% { transform: translate3d(420%, 0, 0) skewX(-20deg); } }

.motion-on .info-cta .btn-gold:not(.disabled):not(:hover):not(:focus-visible),
.motion-on .cta-band .btn-gold:not(.disabled):not(:hover):not(:focus-visible) { animation: cta-pulse 2.2s ease-out infinite; }
@keyframes cta-pulse {
  0% { box-shadow: 0 6px 0 rgba(124, 65, 32, .5), 0 12px 32px rgba(255, 170, 68, .18), 0 0 0 0 rgba(255, 220, 105, .6); }
  70%, 100% { box-shadow: 0 6px 0 rgba(124, 65, 32, .5), 0 12px 32px rgba(255, 170, 68, .18), 0 0 0 18px rgba(255, 220, 105, 0); }
}
.motion-on .btn-gold .bi-arrow-up-right, .motion-on .btn-gold .bi-arrow-right { display: inline-block; transition: transform .25s ease; }
.motion-on .btn-gold:hover .bi-arrow-up-right { transform: translate3d(3px, -3px, 0); }
.motion-on .btn-gold:hover .bi-arrow-right { transform: translate3d(4px, 0, 0); }

/* ---------------------------------------------------------------- small loops that keep the page alive */
.motion-on .feature i { animation: icon-bob 3.4s ease-in-out infinite; }
.motion-on .feature:nth-child(2) i { animation: heartbeat 1.6s ease-in-out infinite; }
.motion-on .feature:nth-child(3) i { animation-delay: -1.1s; }
.motion-on .feature:nth-child(4) i { animation-delay: -2.2s; }
@keyframes icon-bob { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(0, -6px, 0); } }
@keyframes heartbeat { 0%, 40%, 100% { transform: scale(1); } 12% { transform: scale(1.22); } 24% { transform: scale(1.05); } 32% { transform: scale(1.16); } }

.motion-on .price-card.featured { animation: featured-glow 2.8s ease-in-out infinite alternate; }
@keyframes featured-glow { from { box-shadow: 0 20px 50px rgba(247, 60, 155, .14); } to { box-shadow: 0 22px 60px rgba(247, 60, 155, .42), 0 0 0 1px rgba(255, 105, 188, .55); } }

.motion-on .about-sticker { animation: sticker-wobble 4.5s ease-in-out infinite; }
@keyframes sticker-wobble { 0%, 100% { transform: rotate(-7deg) translate3d(0, 0, 0); } 50% { transform: rotate(-3deg) translate3d(0, -8px, 0); } }

.motion-on .org img { transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.motion-on .org:hover img { transform: scale(1.08) rotate(-3deg); }

/* inner pages: the page title slides in */
.motion-on .page-head h1 { animation: head-in .7s cubic-bezier(.2, .7, .2, 1) both; }
.motion-on .page-head p { animation: head-in .7s cubic-bezier(.2, .7, .2, 1) .12s both; }
@keyframes head-in { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- cards lean toward the mouse (desktop only) */
@media (hover: hover) and (pointer: fine) {
  .motion-on .is-tilting { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translate3d(0, -6px, 0) !important; transition: transform .12s linear, box-shadow .2s ease, border-color .2s ease !important; }
}

/* ---------------------------------------------------------------- safety nets */
html:not(.motion-on) [data-reveal] { opacity: 1 !important; transform: none !important; }
html:not(.motion-on) .poster-fx, html:not(.motion-on) .confetti-layer, html:not(.motion-on) .scroll-progress { display: none !important; }

/* footer switch */
.motion-toggle { background: none; border: 0; padding: 0; color: var(--text-soft); font: inherit; cursor: pointer; }
.motion-toggle:hover { color: var(--gold); text-decoration: underline; }
.motion-toggle b { color: var(--gold); font-weight: 600; }
@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .poster-fx, .confetti-layer, .scroll-progress { display: none !important; }
}
