/* Christmas decorations, switched on/off in Admin -> Site settings.
   Ornaments are added by tours/components/festive.html. */

/* title text gets wrapped so ornaments can sit right next to the letters */
.festive-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3em;
  max-width: 100%;
}
.festive-wrap .festive-text { display: inline; }

.festive-orn {
  display: inline-block;
  flex-shrink: 0;
  height: .7em;
  width: auto;
  pointer-events: none;
  user-select: none;
}
.festive-orn--small { height: .45em; }
.festive-orn--big { height: 1.6em; }

/* Santa hat sitting on the last letter */
.festive-hat {
  position: absolute;
  top: -.28em;
  right: -.32em;
  height: .48em;
  width: auto;
  transform-origin: 30% 90%;
  animation: festive-sway 4s ease-in-out infinite;
}

/* bells hanging in the top-right corner of the contact card */
.festive-corner {
  position: absolute;
  top: 28px;
  right: 28px;
  height: 64px;
}
@media (max-width: 768px) {
  .festive-corner { top: 16px; right: 16px; height: 44px; }
}

.festive-spin  { animation: festive-spin 14s linear infinite; }
.festive-spin.festive-rev { animation-direction: reverse; animation-duration: 18s; }
.festive-rock  { transform-origin: 50% 90%; animation: festive-rock 3.2s ease-in-out infinite; }
.festive-swing { transform-origin: 50% 8%;  animation: festive-swing 2.8s ease-in-out infinite; }
.festive-twinkle { animation: festive-twinkle 3s ease-in-out infinite; }
.festive-bob   { animation: festive-bob 3.6s ease-in-out infinite; }

/* snowy town skyline above the Boat Schedule */
.festive-skyline {
  position: relative;
  width: min(1300px, calc(100% - 32px));
  margin: 40px auto 8px;
  padding: 0 110px;
  box-sizing: border-box;
}
.festive-skyline .festive-town {
  display: block;
  width: 100%;
  height: auto;
}
/* snowman / tree / gingerbread standing next to the town */
.festive-ground {
  position: absolute;
  bottom: 9%;
  height: 34%;
  width: auto;
  pointer-events: none;
}
.festive-ground--left  { left: 8px; }
.festive-ground--right { right: 8px; }
.festive-ground--right2 { right: 78px; height: 24%; bottom: 8%; }

/* light snowfall over the whole screen (clicks pass through) */
.festive-page-snow {
  position: fixed;
  inset: 0;
  z-index: 1100;
  overflow: hidden;
  pointer-events: none;
}
.festive-flake {
  position: absolute;
  top: -12px;
  border-radius: 50%;
  background: #E3ECF1;
  box-shadow: 0 0 2px rgba(27, 51, 80, .45);
  opacity: .85;
  will-change: transform;
  animation: festive-fall linear infinite;
}

@keyframes festive-sway {
  0%, 100% { transform: rotate(8deg); }
  50% { transform: rotate(18deg); }
}
@keyframes festive-spin { to { transform: rotate(360deg); } }
@keyframes festive-rock {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-2px); }
}
@keyframes festive-swing {
  0%, 100% { transform: rotate(-9deg); }
  50% { transform: rotate(9deg); }
}
@keyframes festive-twinkle {
  0%, 100% { filter: brightness(1); transform: scale(1); }
  50% { filter: brightness(1.12); transform: scale(1.05); }
}
@keyframes festive-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes festive-fall {
  from { transform: translate(0, 0); }
  to   { transform: translate(var(--drift, 10px), calc(100vh + 24px)); }
}

@media (max-width: 768px) {
  .festive-hide-mobile { display: none; }
  .festive-skyline { margin-top: 24px; padding: 0 44px; }
  .festive-ground--left  { left: 0; }
  .festive-ground--right { right: 0; }
  .festive-ground--right2 { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .festive-hat, .festive-spin, .festive-rock, .festive-swing,
  .festive-twinkle, .festive-bob { animation: none; }
  .festive-page-snow { display: none; }
}
