/* TravelKida start-up loader: CHRISTMAS styles. Markup in /loader/christmas.js, engine in /loader/loader.js.
   Only transform / opacity are animated (smooth on phones). Same night scene in light and dark theme. */
html.tkl-lock, html.tkl-lock body { overflow: hidden !important; }

.tkl {
  position: fixed; inset: 0; z-index: 2147483000; overflow: hidden;
  background: radial-gradient(120% 80% at 70% 8%, #0e4f4a 0%, #062e2c 42%, #031a19 100%);
  color: #f4fbfa; font-family: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-user-select: none; user-select: none; contain: strict;
  transition: opacity .9s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .9s;
}
.tkl * { box-sizing: border-box; }

/* ---------- sky ---------- */
.tkl__sky { position: absolute; inset: 0; transition: opacity .7s ease, transform .9s cubic-bezier(.4, 0, .2, 1); }
.tkl__stars i {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, .8); animation: tkl-twinkle 3s ease-in-out infinite;
}
@keyframes tkl-twinkle { 0%, 100% { opacity: .25; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.15); } }
.tkl__moon {
  position: absolute; top: 8%; right: 11%; width: clamp(64px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fffdf2 0 38%, #f6ecc8 62%, #e9dca8 100%);
  box-shadow: 0 0 40px 10px rgba(255, 246, 214, .28), 0 0 120px 40px rgba(45, 212, 191, .12);
  animation: tkl-moon 6s ease-in-out infinite alternate;
}
.tkl__moon::before, .tkl__moon::after { content: ""; position: absolute; border-radius: 50%; background: rgba(214, 200, 150, .45); }
.tkl__moon::before { width: 18%; height: 18%; top: 28%; left: 52%; }
.tkl__moon::after { width: 11%; height: 11%; top: 58%; left: 30%; }
@keyframes tkl-moon { from { transform: translateY(0) scale(1); } to { transform: translateY(6px) scale(1.03); } }
.tkl__aurora {
  position: absolute; left: -20%; right: -20%; top: 4%; height: 40%; opacity: .32; border-radius: 50%;
  background: radial-gradient(60% 50% at 40% 50%, rgba(45, 212, 191, .55), transparent 70%),
              radial-gradient(40% 40% at 70% 40%, rgba(246, 211, 107, .25), transparent 70%);
  animation: tkl-aurora 9s ease-in-out infinite alternate;
}
@keyframes tkl-aurora { from { transform: translateX(-4%) scaleY(.9); } to { transform: translateX(5%) scaleY(1.1); } }

/* ---------- snow ---------- */
.tkl__snow { position: absolute; inset: 0; pointer-events: none; }
.tkl__snow i {
  position: absolute; top: -12px; width: var(--s); height: var(--s); border-radius: 50%; background: #fff;
  animation: tkl-snow 9s linear infinite; will-change: transform;
}
.tkl__snow i.d0 { opacity: .45; }
.tkl__snow i.d1 { opacity: .7; }
.tkl__snow i.d2 { opacity: .95; box-shadow: 0 0 6px rgba(255, 255, 255, .7); }
@keyframes tkl-snow {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(var(--x), 55vh, 0); }
  100% { transform: translate3d(0, 108vh, 0); }
}

/* ---------- Santa's sleigh team ---------- */
.tkl-team {
  position: absolute; left: 0; top: 9%; width: clamp(400px, 52vw, 800px);
  animation: tkl-fly 7.2s cubic-bezier(.45, .05, .55, .95) -1.6s infinite; will-change: transform;
}
@keyframes tkl-fly {
  0% { transform: translate3d(-100%, 46px, 0) rotate(-5deg); }
  50% { transform: translate3d(calc(50vw - 50%), -10px, 0) rotate(-1.5deg); }
  100% { transform: translate3d(100vw, 26px, 0) rotate(-7deg); }
}
.tkl-team__bob { animation: tkl-bob 1.25s ease-in-out infinite alternate; }
@keyframes tkl-bob { from { transform: translateY(-5px); } to { transform: translateY(6px); } }
.tkl-team__svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
/* reindeer: the body rises and pitches with each bound; legs are jointed (upper turns at the shoulder / hip, lower at
   the knee / hock), so the gallop reads like a real leap. One cycle = .62s, each deer offset by --d. */
.tkl-deer { --cyc: .62s; transform-box: fill-box; transform-origin: 50% 60%; animation: tkl-bound var(--cyc) linear var(--d, 0s) infinite; }
@keyframes tkl-bound {
  0% { transform: translateY(0) rotate(-3deg); }
  35% { transform: translateY(-4px) rotate(2.5deg); }
  70% { transform: translateY(1px) rotate(0deg); }
  100% { transform: translateY(0) rotate(-3deg); }
}
.tkl-lu, .tkl-ll { animation: var(--cyc) cubic-bezier(.45, 0, .55, 1) var(--d, 0s) infinite; }
.tkl-lu.is-far, .tkl-ll.is-far { animation-delay: calc(var(--d, 0s) - .08s); }
.tkl-lu--f { animation-name: tkl-front-u; }
.tkl-ll--f { animation-name: tkl-front-l; }
.tkl-lu--r { animation-name: tkl-rear-u; }
.tkl-ll--r { animation-name: tkl-rear-l; }
@keyframes tkl-front-u { 0% { transform: rotate(-58deg); } 45% { transform: rotate(32deg); } 100% { transform: rotate(-58deg); } }
@keyframes tkl-front-l { 0% { transform: rotate(4deg); } 40% { transform: rotate(8deg); } 62% { transform: rotate(78deg); } 85% { transform: rotate(36deg); } 100% { transform: rotate(4deg); } }
@keyframes tkl-rear-u { 0% { transform: rotate(38deg); } 50% { transform: rotate(-42deg); } 100% { transform: rotate(38deg); } }
@keyframes tkl-rear-l { 0% { transform: rotate(8deg); } 25% { transform: rotate(34deg); } 50% { transform: rotate(58deg); } 75% { transform: rotate(-6deg); } 100% { transform: rotate(8deg); } }
.tkl-leg { fill: #6e4425; }
.tkl-leg.is-far { fill: #4d2e17; }
.tkl-hoof { fill: #1f140c; }
.tkl-deer__tail, .tkl-deer__rump { fill: #efe3cf; }
.tkl-deer__rump { opacity: .55; }
.tkl-deer__mane { fill: #eadcc4; }
.tkl-deer__muzzle { fill: #5a3519; opacity: .55; }
.tkl-deer__ear { fill: #5e381c; }
.tkl-deer__mouth { fill: none; stroke: #2a1a10; stroke-width: .9; stroke-linecap: round; }
.tkl-antler { stroke: #dcc59a; stroke-width: 2.8; stroke-linecap: round; fill: none; }
.tkl-antler.is-far { stroke: #b59d72; }
.tkl-nose { fill: #1f140c; }
.tkl-nose--lead { fill: #ff3b30; filter: drop-shadow(0 0 6px #ff3b30); animation: tkl-glow 1s ease-in-out infinite alternate; }
@keyframes tkl-glow { from { opacity: .75; } to { opacity: 1; } }
.tkl-collar { stroke: #c0281e; stroke-width: 4.2; fill: none; stroke-linecap: round; }
.tkl-strap { stroke: #c0281e; stroke-width: 3.6; fill: none; stroke-linecap: round; }
.tkl-bell { fill: #f6d36b; stroke: #b8891d; stroke-width: .8; }
.tkl-hat { transform-box: fill-box; transform-origin: 100% 100%; animation: tkl-hat .7s ease-in-out infinite alternate; }
@keyframes tkl-hat { from { transform: rotate(0deg); } to { transform: rotate(-4deg); } }
.tkl-rein { fill: none; stroke: #f6d36b; stroke-width: 1.6; opacity: .85; }
.tkl-pom { transform-box: fill-box; transform-origin: center; animation: tkl-pom .6s ease-in-out infinite alternate; }
@keyframes tkl-pom { from { transform: translate(0, 0); } to { transform: translate(-1px, 2px); } }
.tkl-spark { fill: #fff7cf; transform-box: fill-box; transform-origin: center; animation: tkl-spark 1.4s ease-out infinite; }
@keyframes tkl-spark {
  0% { opacity: 0; transform: translateX(0) scale(.3); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateX(-26px) scale(1.1) rotate(90deg); }
}

/* ---------- ground ---------- */
.tkl-ground {
  position: absolute; left: 0; bottom: 0; width: 100%; height: clamp(170px, 34vh, 340px); display: block;
  transition: transform .9s cubic-bezier(.55, 0, .3, 1);
}
.tkl-window { fill: #ffd27a; animation: tkl-window 2.6s ease-in-out infinite; filter: drop-shadow(0 0 8px rgba(255, 196, 92, .85)); }
@keyframes tkl-window { 0%, 100% { opacity: 1; } 45% { opacity: .82; } 60% { opacity: .95; } }
.tkl-smoke circle { fill: rgba(255, 255, 255, .45); transform-box: fill-box; transform-origin: center; animation: tkl-smoke 3.6s ease-out infinite; }
.tkl-smoke circle:nth-child(2) { animation-delay: -1.2s; }
.tkl-smoke circle:nth-child(3) { animation-delay: -2.4s; }
@keyframes tkl-smoke {
  0% { opacity: 0; transform: translate(0, 0) scale(.4); }
  20% { opacity: .8; }
  100% { opacity: 0; transform: translate(26px, -70px) scale(1.6); }
}
.tkl-bulb { animation: tkl-bulb 1.6s ease-in-out infinite alternate; }
.tkl-bulb--r { fill: #ff5a4e; } .tkl-bulb--g { fill: #3ee07f; } .tkl-bulb--y { fill: #ffd55a; } .tkl-bulb--b { fill: #4fc3ff; }
@keyframes tkl-bulb { from { opacity: .35; } to { opacity: 1; } }
.tkl-topstar { fill: #f6d36b; transform-box: fill-box; transform-origin: center; animation: tkl-topstar 2.4s ease-in-out infinite; filter: drop-shadow(0 0 6px #f6d36b); }
@keyframes tkl-topstar { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.18) rotate(12deg); } }
.tkl-gift { animation: tkl-giftbob 2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes tkl-giftbob { 0%, 80%, 100% { transform: scale(1); } 88% { transform: scale(1.1, .9); } }

/* ---------- centre: logo, percentage, candy-cane bar, message ---------- */
.tkl__ui {
  position: absolute; left: 50%; top: 47%; width: min(440px, calc(100vw - 48px));
  transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 14px; text-align: center;
  animation: tkl-ui-in .8s cubic-bezier(.2, .8, .2, 1) both;
  transition: opacity .45s ease, transform .6s cubic-bezier(.4, 0, .2, 1);
}
@keyframes tkl-ui-in { from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)); } }
.tkl__brand { position: relative; display: grid; place-items: center; }
.tkl__brand::before { /* soft moonlight behind the logo (no box) so its dark letters read on the night sky */
  content: ""; position: absolute; inset: -70% -45%; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .5), rgba(255, 255, 255, .18) 55%, transparent);
}
.tkl__brand img { display: block; width: auto; height: 80px; pointer-events: none; filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 2px rgba(255, 255, 255, .9)); }
.tkl__pct {
  font-weight: 800; font-size: clamp(44px, 9vw, 68px); line-height: 1; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; filter: drop-shadow(0 4px 18px rgba(45, 212, 191, .45));
  display: flex; align-items: flex-start; justify-content: center;
}
.tkl__pct small { font-size: .42em; margin: 0 0 .12em 4px; align-self: flex-end; opacity: .8; font-weight: 700; }
.tkl__bar { position: relative; width: 100%; height: 18px; }
.tkl__track {
  position: absolute; inset: 0; border-radius: 99px; overflow: hidden;
  background: rgba(255, 255, 255, .12); box-shadow: inset 0 2px 6px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .14);
}
.tkl__fill {
  position: absolute; inset: 0; border-radius: 99px; overflow: hidden; transform: translateX(-100%);
  box-shadow: 0 0 16px rgba(255, 90, 78, .55); will-change: transform;
}
.tkl__fill i {
  position: absolute; top: 0; bottom: 0; left: 0; width: calc(100% + 28.29px);
  background: repeating-linear-gradient(-45deg, #e5332a 0 10px, #fff5f2 10px 20px);
  animation: tkl-stripes .7s linear infinite;
}
.tkl__fill::after { /* glossy highlight */
  content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 40%; border-radius: 99px; background: rgba(255, 255, 255, .35);
}
@keyframes tkl-stripes { to { transform: translateX(-28.29px); } }
.tkl__rail { position: absolute; inset: 0; transform: translateX(0); will-change: transform; pointer-events: none; }
.tkl__knob {
  position: absolute; left: -15px; top: 50%; width: 30px; height: 30px; margin-top: -15px;
  display: grid; place-items: center; filter: drop-shadow(0 0 8px rgba(246, 211, 107, .9));
}
.tkl__knob svg { width: 100%; height: 100%; fill: #f6d36b; stroke: #fff6d0; stroke-width: 1; animation: tkl-spin 2.4s linear infinite; }
@keyframes tkl-spin { to { transform: rotate(360deg); } }
.tkl__msg {
  margin: 2px 0 0; min-height: 1.4em; font-size: 15px; font-weight: 600; color: #d7f5f1;
  transition: opacity .26s ease, transform .26s ease;
}
.tkl__msg.is-out { opacity: 0; transform: translateY(-6px); }
.tkl__wish { margin: 0; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; color: #f6d36b; opacity: .9; }

/* ---------- exit: content drops away, ground sinks, sky fades, page shows through ---------- */
.tkl--out { opacity: 0; visibility: hidden; pointer-events: none; }
.tkl--out .tkl__ui { opacity: 0; transform: translate(-50%, calc(-50% - 26px)) scale(.96); }
.tkl--out .tkl-ground { transform: translateY(60%); }
.tkl--out .tkl__sky { transform: scale(1.06); }

/* ---------- phones ---------- */
@media (max-width: 640px) {
  .tkl-team { top: 9%; width: 118vw; }
  .tkl__ui { top: 44%; gap: 12px; }
  .tkl__brand img { height: 62px; }
  .tkl-ground { height: 26vh; }
  .tkl__moon { top: 6%; right: 7%; }
}
@media (max-height: 520px) {
  .tkl-team { top: 2%; width: min(440px, 56vw); }
  .tkl__ui { top: 50%; gap: 8px; }
  .tkl-ground { height: 24vh; }
}

@media (prefers-reduced-motion: reduce) {
  .tkl *, .tkl *::before, .tkl *::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
  .tkl-team { transform: translate3d(calc(50vw - 50%), 0, 0); }
  .tkl__snow { display: none; }
}
