/* joy.css — motion and feel-good layer for NUM's sales pages (18 Nov 2026).
   Loaded by the product pages, the group/business landing pages, VIP trips,
   Coachella VIP, points deals and stopovers. Everything here is decoration:
   pages read and work the same with it off, and prefers-reduced-motion turns
   every animation off. joy.js only adds the .joy-on and .in classes. */

/* 1. Reveal: sections rise in as they scroll into view (only once joy.js runs). */
.joy-on [data-joy] { opacity: 0; transform: translateY(26px); transition: opacity .7s cubic-bezier(.2,.7,.2,1), transform .7s cubic-bezier(.2,.7,.2,1); }
.joy-on [data-joy].in { opacity: 1; transform: none; }

/* 2. The hero photo breathes: a slow push-in, like the first second of a travel film. */
@keyframes joy-push { from { transform: scale(1) translate(0, 0); } to { transform: scale(1.07) translate(-1.2%, -1%); } }
.joy-frame { display: block; overflow: hidden; border-radius: 28px; position: relative; isolation: isolate; box-shadow: 0 24px 60px -30px rgba(10,26,36,.45); }
.joy-frame > img { display: block; width: 100%; object-fit: cover; border-radius: 0 !important; box-shadow: none !important; animation: joy-push 16s ease-in-out infinite alternate; transform-origin: 60% 40%; }

/* 3. Sparkles drifting up over the hero photo. */
@keyframes joy-rise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translateY(-260px) scale(1.1); opacity: 0; } }
.joy-sparks { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.joy-sparks i { position: absolute; bottom: -8px; width: 8px; height: 8px; border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, rgba(255,214,102,.9) 31% 60%, transparent 61%); animation: joy-rise 6s linear infinite; }
.joy-sparks i:nth-child(1) { left: 12%; animation-delay: 0s; }
.joy-sparks i:nth-child(2) { left: 28%; animation-delay: 1.4s; width: 6px; height: 6px; }
.joy-sparks i:nth-child(3) { left: 46%; animation-delay: 2.6s; }
.joy-sparks i:nth-child(4) { left: 63%; animation-delay: .8s; width: 10px; height: 10px; }
.joy-sparks i:nth-child(5) { left: 78%; animation-delay: 3.3s; width: 5px; height: 5px; }
.joy-sparks i:nth-child(6) { left: 90%; animation-delay: 4.4s; }

/* 4. Main buttons catch the light every few seconds. */
@keyframes joy-sheen { 0%, 70% { transform: translateX(-120%) skewX(-20deg); } 100% { transform: translateX(260%) skewX(-20deg); } }
.joy-on .b-1 { position: relative; overflow: hidden; }
.joy-on .b-1::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent); animation: joy-sheen 4.5s ease-in-out infinite; pointer-events: none; }

/* 5. Charts grow when they come into view. */
.joy-on [data-joy] .vb i { transform: scaleY(0); transform-origin: bottom; transition: transform 1s cubic-bezier(.2,.8,.2,1) .15s; }
.joy-on [data-joy] .hb i { transform: scaleX(0); transform-origin: left; transition: transform 1s cubic-bezier(.2,.8,.2,1) .15s; }
.joy-on [data-joy].in .vb i, .joy-on [data-joy].in .hb i { transform: none; }
.joy-on [data-joy] .day li { opacity: 0; transform: translateX(-12px); transition: opacity .5s ease, transform .5s ease; }
.joy-on [data-joy].in .day li { opacity: 1; transform: none; }
.joy-on [data-joy].in .day li:nth-child(2) { transition-delay: .12s; } .joy-on [data-joy].in .day li:nth-child(3) { transition-delay: .24s; }
.joy-on [data-joy].in .day li:nth-child(4) { transition-delay: .36s; } .joy-on [data-joy].in .day li:nth-child(5) { transition-delay: .48s; }
.joy-on [data-joy].in .day li:nth-child(6) { transition-delay: .6s; } .joy-on [data-joy].in .day li:nth-child(7) { transition-delay: .72s; }

/* 6. The ribbon: a slow, endless strip of real travel moments. */
@keyframes joy-slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.joy-ribbon { overflow: hidden; padding: 8px 0 4px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.joy-ribbon ul { display: flex; gap: 14px; width: max-content; margin: 0; padding: 0; list-style: none; animation: joy-slide 70s linear infinite; }
.joy-ribbon:hover ul, .joy-ribbon:focus-within ul { animation-play-state: paused; }
.joy-ribbon li { position: relative; flex: 0 0 auto; width: 260px; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; box-shadow: 0 10px 30px rgba(10,26,36,.12); }
.joy-ribbon img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s ease; }
.joy-ribbon li:hover img { transform: scale(1.06); }
.joy-ribbon span { position: absolute; left: 10px; bottom: 10px; background: rgba(255,255,255,.92); color: #0a1a24; font-size: 12.5px; font-weight: 800; padding: 5px 10px; border-radius: 999px; }
@media (max-width: 640px) { .joy-ribbon li { width: 200px; } }

/* 7. Big numbers that count up. */
.joy-num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  .joy-on [data-joy], .joy-on [data-joy] .vb i, .joy-on [data-joy] .hb i, .joy-on [data-joy] .day li { opacity: 1 !important; transform: none !important; transition: none !important; }
  .joy-frame > img, .joy-sparks i, .joy-on .b-1::after, .joy-ribbon ul { animation: none !important; }
  .joy-sparks { display: none; }
  .joy-ribbon { overflow-x: auto; }
}
