/* Space all over the page: drifting planets and sparkles behind the cream sections, starfields in the
   night-sky panels, a sparkle trail in the hero and cards that launch into view. Loaded after site.css. */

/* Decorations sit behind each section's content; data-parallax moves them a little while scrolling. */
.space { position: relative; overflow-x: clip; }
.space > .wrap { position: relative; z-index: 1; }
.deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.deco > * { position: absolute; left: var(--x); top: var(--y); will-change: transform; }
.d-planet { width: var(--s); height: var(--s); border-radius: 50%; background: radial-gradient(circle at 32% 30%, rgba(255,255,255,.6), transparent 45%), var(--c); opacity: .85; animation: bob 7s ease-in-out infinite; }
.d-planet.ringed::after { content: ""; position: absolute; left: -45%; right: -45%; top: 50%; height: 34%; transform: translateY(-50%) rotate(-20deg); border-radius: 50%; border: 3px solid var(--c); opacity: .45; }
.d-spark { width: var(--s); height: var(--s); fill: var(--c); animation: sparkle 3.2s ease-in-out var(--d, 0s) infinite; }
.d-ufo { width: var(--s); height: calc(var(--s) * .62); animation: ufo 9s ease-in-out infinite; filter: drop-shadow(0 10px 12px rgba(23,25,90,.25)); }
.d-orbit { width: var(--s); height: var(--s); border-radius: 50%; border: 2px dashed color-mix(in srgb, var(--c) 35%, transparent); animation: spin 30s linear infinite; }
.d-orbit i { position: absolute; top: -7px; left: 50%; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 18%, transparent); }
@keyframes sparkle { 0%, 100% { transform: scale(.55) rotate(0deg); opacity: .35; } 50% { transform: scale(1) rotate(45deg); opacity: 1; } }
@keyframes ufo { 0%, 100% { transform: translate(0, 0) rotate(-6deg); } 25% { transform: translate(-30px, 10px) rotate(4deg); } 50% { transform: translate(-60px, -6px) rotate(-3deg); } 75% { transform: translate(-24px, -14px) rotate(5deg); } }
/* The scroll offset uses the separate `translate` property, so it never fights the drifting `transform` animations. */
[data-parallax] { translate: 0 var(--py, 0px); }

/* Starfield canvas over the CSS stars in the two night-sky panels */
.starfield { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.visit-card > :not(.starfield) { position: relative; z-index: 1; }

/* Sparkles that follow the pointer in the hero */
.trail { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; pointer-events: none; z-index: 2; fill: #FFE79A; animation: trail .9s ease-out forwards; }
@keyframes trail { from { opacity: 1; transform: scale(1) rotate(0); } to { opacity: 0; transform: translateY(18px) scale(.2) rotate(120deg); } }

/* Cards launch into view once (only when the script runs; without it everything is simply visible). */
.js .reveal { opacity: 0; translate: 0 36px; transition: opacity .7s ease, translate .7s cubic-bezier(.2, .9, .3, 1.2); transition-delay: var(--rd, 0s); }
.js .reveal.in { opacity: 1; translate: 0 0; }

@media (max-width: 560px) {
  .d-orbit, .d-ufo { display: none; }
  .deco > * { scale: .75; }
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; translate: none; }
  [data-parallax] { translate: none; }
}
