/* =========================================================
   QGS Hosting - Christmas theme
   Loaded AFTER css/style.css; everything is additive.
   On/off: python3 tools/seasonal.py christmas on|off (then build2 + build-qgsbg).
   ========================================================= */

:root {
  --xm-red: #e23744;
  --xm-red-deep: #b3121f;
  --xm-green: #1f9d55;
  --xm-gold: #f5c451;
  --xm-snow: #eef5ff;
  --xm-snow-shade: #b9cfe9;
}

/* ---------- Promo bar → red candy-stripe sale banner ---------- */
.promo {
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.07) 0 14px, transparent 14px 28px),
    linear-gradient(90deg, var(--xm-red-deep) 0%, var(--xm-red) 50%, var(--xm-red-deep) 100%);
  background-size: 40px 40px, 100% 100%;
  animation: xm-stripes 2.4s linear infinite;
}
.promo .promo-code {
  background: var(--xm-gold);
  color: #3a1d00;
  border-radius: 4px;
  padding: 1px 7px;
}
.promo a.promo-cta { background: rgba(0, 0, 0, 0.28); }
@keyframes xm-stripes { to { background-position: 40px 0, 0 0; } }

/* ---------- String lights under the header ---------- */
.site-header { overflow: visible; }
.xm-lights {
  position: absolute;
  left: 0; right: 0;
  bottom: -16px;
  height: 22px;
  pointer-events: none;
  z-index: -1;                       /* behind the mega menu / dropdowns */
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='12'%3E%3Cpath d='M0 1.5 Q22 13 44 1.5' fill='none' stroke='%235d8366' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x 0 0 / 44px 12px;
}
.xm-bulb {
  position: absolute;
  top: 6px;
  width: 8px; height: 12px;
  margin-left: -4px;
  border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%;
  background: var(--c);
  box-shadow: 0 0 6px 1px var(--c), 0 0 14px 3px color-mix(in srgb, var(--c) 45%, transparent);
  animation: xm-twinkle 2.6s ease-in-out infinite;
  animation-delay: var(--d);
}
.xm-bulb::before {                   /* socket */
  content: "";
  position: absolute;
  top: -3px; left: 1.5px;
  width: 5px; height: 4px;
  border-radius: 1px;
  background: #2b3b31;
}
@keyframes xm-twinkle {
  0%, 100% { opacity: 1; filter: brightness(1.15); }
  45% { opacity: 0.35; filter: brightness(0.7); box-shadow: none; }
}

/* ---------- Christmas logo: the hat sits above the wordmark, so it is taller ---------- */
.brand img { height: 56px; margin: -8px 0 -3px; }

/* ---------- Snow ---------- */
#xm-snow {
  position: fixed;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 45;                       /* under the sticky header (50) and the promo bar */
}
.xm-snow-toggle {
  position: fixed;
  left: 16px; bottom: 16px;
  z-index: 46;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(11, 16, 22, 0.72);
  color: var(--xm-snow);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, transform 0.2s, opacity 0.2s;
}
.xm-snow-toggle:hover { background: var(--xm-red); transform: rotate(30deg); }
.xm-snow-toggle.off { opacity: 0.55; }

/* ---------- Greeting pill in the homepage hero ---------- */
.xm-greet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border: 1px solid rgba(245, 196, 81, 0.55);
  border-radius: 999px;
  background: rgba(179, 18, 31, 0.32);
  color: #ffe6a8;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.4px;
}
.xm-greet span { font-size: 1.05rem; }

/* ---------- Snow drift at the bottom of every hero ---------- */
.hero, .page-hero { position: relative; }
.hero::after, .page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 34px;
  z-index: 2;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='34' viewBox='0 0 240 34'%3E%3Cpath d='M0 20 C20 10 38 12 56 18 S92 26 112 16 S150 6 172 15 S214 26 240 18 V34 H0Z' fill='%23b9cfe9' opacity='.55'/%3E%3Cpath d='M0 25 C24 17 44 19 66 24 S104 30 128 22 S168 14 190 21 S222 29 240 24 V34 H0Z' fill='%23eef5ff'/%3E%3C/svg%3E") repeat-x left bottom / 240px 34px;
  opacity: 0.92;
}
.page-hero { padding-bottom: 46px; }

/* ---------- Snow caps on cards ---------- */
.plan::before, .game-card::before, .wq-card::before, .pop-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 13px;
  pointer-events: none;
  z-index: 3;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Crect width='120' height='5' fill='%23eef5ff'/%3E%3Cellipse cx='8' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3Cellipse cx='22' cy='4' rx='8' ry='6' fill='%23eef5ff'/%3E%3Cellipse cx='37' cy='4' rx='6' ry='4' fill='%23eef5ff'/%3E%3Cellipse cx='50' cy='4' rx='7.5' ry='5.5' fill='%23eef5ff'/%3E%3Cellipse cx='64' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3Cellipse cx='79' cy='4' rx='8.5' ry='6.5' fill='%23eef5ff'/%3E%3Cellipse cx='94' cy='4' rx='6' ry='4' fill='%23eef5ff'/%3E%3Cellipse cx='107' cy='4' rx='7.5' ry='5.5' fill='%23eef5ff'/%3E%3Cellipse cx='120' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3Cellipse cx='0' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 13px;
}
.plan::before { top: -5px; left: -5px; right: -5px; }   /* sits on the 5px frame */
.game-card::before, .pop-card::before { top: 0; }
.pop-card { position: relative; }
.wq-card { position: relative; }
.wq-card::before { top: -1px; border-radius: inherit; }
.plan-badge { z-index: 4; }

/* gift bow on the highlighted plan */
.plan.popular::after {
  content: "";
  position: absolute;
  top: -12px; right: 4px;
  width: 42px; height: 35px;
  z-index: 5;
  pointer-events: none;
  transform: rotate(14deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 40'%3E%3Cpath d='M24 18C14 4 2 6 4 16c2 8 14 6 20 2z' fill='%23e23744'/%3E%3Cpath d='M24 18c10-14 22-12 20-2-2 8-14 6-20 2z' fill='%23c81e2c'/%3E%3Cpath d='M22 20 14 38l5-3 3 4 2-18z' fill='%23b3121f'/%3E%3Cpath d='m26 20 8 18-5-3-3 4-2-18z' fill='%23d42a37'/%3E%3Ccircle cx='24' cy='18' r='4.5' fill='%23f5c451'/%3E%3C/svg%3E") no-repeat center / contain;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5));
}

/* ---------- Holly under section headings ---------- */
.section-head h2::after {
  content: "";
  display: block;
  width: 120px; height: 18px;
  margin: 12px auto 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 18'%3E%3Cpath d='M2 9h34M84 9h34' stroke='%23f5c451' stroke-opacity='.45' stroke-width='1.2'/%3E%3Cpath d='M60 9C52 2 42 2 36 6c4 1 4 4 2 6 6 3 16 2 22-3z' fill='%231f9d55'/%3E%3Cpath d='M60 9c8-7 18-7 24-3-4 1-4 4-2 6-6 3-16 2-22-3z' fill='%23178a48'/%3E%3Ccircle cx='57' cy='9.5' r='3.2' fill='%23e23744'/%3E%3Ccircle cx='63' cy='9.5' r='3.2' fill='%23e23744'/%3E%3Ccircle cx='60' cy='5.6' r='3.2' fill='%23ff5966'/%3E%3C/svg%3E") no-repeat center / contain;
}
.page-hero .section-head h2::after, .section-head.left h2::after { margin-left: 0; }

/* ---------- Candy-cane hover on the primary buttons ---------- */
.btn-primary:hover {
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.16) 0 8px, transparent 8px 16px);
  background-size: 23px 23px;
  animation: xm-cane 0.9s linear infinite;
}
@keyframes xm-cane { to { background-position: 23px 0; } }

/* ---------- Footer: snow on the top edge ---------- */
.qgsf-footer { border-top: 0; }
.qgsf-footer::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 16px;
  z-index: 2;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='14' viewBox='0 0 120 14' preserveAspectRatio='none'%3E%3Crect width='120' height='5' fill='%23eef5ff'/%3E%3Cellipse cx='8' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3Cellipse cx='22' cy='4' rx='8' ry='6' fill='%23eef5ff'/%3E%3Cellipse cx='37' cy='4' rx='6' ry='4' fill='%23eef5ff'/%3E%3Cellipse cx='50' cy='4' rx='7.5' ry='5.5' fill='%23eef5ff'/%3E%3Cellipse cx='64' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3Cellipse cx='79' cy='4' rx='8.5' ry='6.5' fill='%23eef5ff'/%3E%3Cellipse cx='94' cy='4' rx='6' ry='4' fill='%23eef5ff'/%3E%3Cellipse cx='107' cy='4' rx='7.5' ry='5.5' fill='%23eef5ff'/%3E%3Cellipse cx='120' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3Cellipse cx='0' cy='4' rx='6.5' ry='4.5' fill='%23eef5ff'/%3E%3C/svg%3E") repeat-x 0 0 / 160px 16px;
}

@media (max-width: 640px) {
  .plan.popular::after { right: 4px; width: 36px; height: 30px; }
  .xm-greet { font-size: 0.82rem; }
}

@media (prefers-reduced-motion: reduce) {
  .promo, .xm-bulb, .btn-primary:hover { animation: none; }
}
