/* Christmas & New Year theme — temporary, layered on top of style.css.
   Loaded only on the public pages (not /admin, which also uses style.css).
   To go back to the regular look, remove the christmas.css <link> and the
   christmas.js <script> from the public pages (or just deploy main). */

:root {
  --xmas-red: #c8102e;
  --xmas-red-dark: #9b0c23;
  --xmas-green: #0b5d3b;
  --xmas-green-dark: #063d27;
  --xmas-gold: #e8b923;
  --xmas-snow: #fbf8f3;

  /* Re-points the site's brand colours: orange → Christmas red,
     indigo → pine green, warm footer → snow. */
  --bg: #f6f3ee;
  --orange: var(--xmas-red);
  --orange-dark: var(--xmas-red-dark);
  --indigo: var(--xmas-green);
  --footer-bg: var(--xmas-snow);
}

/* ---------- announcement bar (inserted by christmas.js) ---------- */

.xmas-bar {
  position: relative;
  z-index: 2;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0 14px, transparent 14px 28px),
    linear-gradient(90deg, var(--xmas-green-dark), var(--xmas-green) 50%, var(--xmas-green-dark));
  color: #fff;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.2px;
  padding: 14px 16px;
  line-height: 1.5;
}

.xmas-bar strong {
  color: var(--xmas-gold);
}

.xmas-bar .xmas-bar-ta {
  display: inline-block;
  margin-left: 8px;
  font-weight: 600;
  opacity: 0.9;
}

/* ---------- header: string of fairy lights along the bottom edge ---------- */

.site-header {
  position: relative;
  border-bottom: none;
  border-image: none;
  padding-bottom: calc(var(--sp-2) + 18px);
  background:
    radial-gradient(ellipse at 50% -40%, rgba(200, 16, 46, 0.07), transparent 60%),
    #fff;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  background:
    radial-gradient(circle at 12px 11px, var(--xmas-red) 0 4px, transparent 5px) 0 0 / 96px 18px repeat-x,
    radial-gradient(circle at 36px 11px, var(--xmas-gold) 0 4px, transparent 5px) 0 0 / 96px 18px repeat-x,
    radial-gradient(circle at 60px 11px, #1f9d55 0 4px, transparent 5px) 0 0 / 96px 18px repeat-x,
    radial-gradient(circle at 84px 11px, #2f7de1 0 4px, transparent 5px) 0 0 / 96px 18px repeat-x,
    radial-gradient(ellipse at 48px -6px, transparent 0 46px, #2d3a2f 46px 47.5px, transparent 48.5px) 0 0 / 48px 18px repeat-x;
  animation: xmas-twinkle 2.4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes xmas-twinkle {
  from { filter: brightness(0.85) saturate(0.9); }
  to { filter: brightness(1.25) saturate(1.2) drop-shadow(0 0 3px rgba(255, 220, 120, 0.9)); }
}

.main-nav a.active {
  border-bottom-color: var(--xmas-gold);
}

/* ---------- hero carousel ---------- */

.carousel-slide {
  position: relative;
}

/* Soft snow dots over each slide. */
.carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.55) 0 2px, transparent 3px),
    radial-gradient(circle at 25% 70%, rgba(255, 255, 255, 0.4) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 42% 35%, rgba(255, 255, 255, 0.35) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 63% 80%, rgba(255, 255, 255, 0.45) 0 2px, transparent 3px),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.5) 0 2px, transparent 3px),
    radial-gradient(circle at 90% 60%, rgba(255, 255, 255, 0.4) 0 1.5px, transparent 2.5px);
  background-size: 260px 220px;
  pointer-events: none;
}

/* Snowy ground along the bottom of each slide. */
.carousel-slide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 28px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 28' preserveAspectRatio='none'%3E%3Cpath d='M0 18 C40 6 80 6 120 14 S200 26 240 14 S330 2 400 16 V28 H0Z' fill='%23ffffff' fill-opacity='0.55'/%3E%3Cpath d='M0 22 C50 14 90 16 140 22 S240 12 290 20 S360 26 400 21 V28 H0Z' fill='%23ffffff' fill-opacity='0.9'/%3E%3C/svg%3E") 0 100% / 400px 28px repeat-x;
  pointer-events: none;
}

.carousel-content {
  position: relative;
  z-index: 1;
}

.carousel-slide.slide-1 { background: linear-gradient(135deg, var(--xmas-green-dark), var(--xmas-green) 60%, #12784e); }
.carousel-slide.slide-2 { background: linear-gradient(135deg, var(--xmas-red-dark), var(--xmas-red)); }
.carousel-slide.slide-3 { background: linear-gradient(135deg, #122046, #1d3a7a); }

.carousel-content h1 {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.xmas-kicker {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(232, 185, 35, 0.18);
  border: 1px solid rgba(232, 185, 35, 0.6);
  color: #ffe08a;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

/* Gold primary CTA on the green slide stands out better than red-on-green. */
.carousel-slide.slide-1 .hero-cta {
  background: var(--xmas-gold);
  color: #2a1d00;
}

.carousel-slide.slide-1 .hero-cta:hover {
  background: #f5cb45;
}

/* ---------- panels and headings ---------- */

.panel-head h1::before,
.panel-head h2::before,
.panel-head h1::after,
.panel-head h2::after {
  content: "❄";
  display: inline-block;
  margin: 0 10px;
  color: #9cc7d8;
  font-size: 0.7em;
  vertical-align: middle;
}

/* ---------- chit fund table (hardcoded indigo shades in style.css) ---------- */

.chit-table-wrap {
  box-shadow: 0 6px 20px rgba(11, 93, 59, 0.14);
}

.chit-table th {
  background: linear-gradient(135deg, var(--xmas-green-dark), var(--xmas-green));
}

.chit-table tr:nth-child(even) td {
  background: #f3f8f4;
}

/* ---------- footer: candy-cane edge ---------- */

.site-footer {
  position: relative;
  border-top: none;
  padding-top: calc(var(--sp-2) + 10px);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 8px;
  background: repeating-linear-gradient(135deg, var(--xmas-red) 0 12px, #fff 12px 24px);
}

.footer-map {
  border-color: #e6ded2;
}

/* ---------- snowfall canvas (christmas.js) ---------- */

.xmas-snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

@media (max-width: 600px) {
  .xmas-bar {
    font-size: 16px;
    padding: 10px 12px;
  }

  .xmas-bar .xmas-bar-ta {
    display: block;
    margin-left: 0;
  }

  .panel-head h1::before,
  .panel-head h2::before,
  .panel-head h1::after,
  .panel-head h2::after {
    margin: 0 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header::after {
    animation: none;
  }
}
