/* Foresight Academy - festive season decorations.
   Everything here only appears when js/festive.js adds the "festive" class
   to <body> (1 Dec to 7 Jan each year). Outside that window nothing shows. */

/* ---- Falling snow (canvas drawn by festive.js) ---- */
.festive-snow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1020;
  pointer-events: none;
}

/* ---- String lights across the top of the homepage banner ---- */
.festive-lights {
  position: absolute;
  left: 0;
  right: 0;
  height: 38px;
  z-index: 4;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
  overflow: hidden;
}
.festive-lights::before {              /* the wire */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 3px;
  height: 2px;
  background: #2b2b2b;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}
.festive-lights li {
  position: absolute;
  top: 5px;
  width: 10px;
  height: 15px;
  margin-left: -5px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  background: var(--bulb, #fff);
  box-shadow: 0 0 10px 3px var(--bulb, #fff);
  animation: festive-twinkle 2.8s ease-in-out infinite;
}
.festive-lights li::before {           /* the bulb cap */
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  background: #3a3a3a;
  border-radius: 1px;
}
.festive-lights li:nth-child(odd)  { top: 5px; }
.festive-lights li:nth-child(even) { top: 11px; }
.festive-lights li:nth-child(3n+1) { --bulb: #ffffff; }
.festive-lights li:nth-child(3n+2) { --bulb: #c9c9c9; animation-delay: .9s; }
.festive-lights li:nth-child(3n)   { --bulb: #c4343a; animation-delay: 1.7s; }

@keyframes festive-twinkle {
  0%, 100% { opacity: 1; }
  50%      { opacity: .4; }
}

/* ---- Greeting card, bottom left (can be dismissed) ---- */
.festive-greeting {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 1040;
  box-sizing: border-box;
  width: calc(100% - 32px);
  max-width: 400px;
  padding: 14px 48px 14px 18px;
  background: #151515;
  color: #fff;
  border-left: 6px solid #9d1c21;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  font-family: "Work Sans", Arial, sans-serif;
  line-height: 1.4;
}
.festive-greeting strong {
  display: block;
  margin-bottom: 2px;
  font-size: 17px;
  font-weight: 600;
}
.festive-greeting span {
  display: block;
  font-size: 14px;
  color: #d6d6d6;
}
.festive-greeting button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.festive-greeting button:hover { color: #c9c9c9; }
.festive-greeting button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.festive-greeting[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) {
  .festive-lights li { animation: none; }
}
