/* Fair Deal Accordions — seasonal Christmas theme (Nov–Dec).
   Included by one line in each page: css/christmas.css + js/christmas.js.
   To switch off in January, remove that include line from every page.
   No photographs; decoration is CSS and SVG only. */

:root {
  --xmas-green: #1E4A36;
  --xmas-green-2: #245C3E;
  --xmas-gold: #C9A44C;
  --xmas-cream: #F7F1DC;
  --xmas-berry: #B01212;
}

/* Slim festive greeting across the top of every page. */
.xmas-banner {
  background: var(--xmas-green);
  color: var(--xmas-cream);
  text-align: center;
  padding: 8px 16px;
  border-bottom: 2px solid var(--xmas-gold);
  position: relative;
  z-index: 950;
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
.xmas-banner-inner {
  display: inline-block;
  padding: 0 44px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath d='M22 18C12 16 7 9 11 5c4 4 7 6 13 7-5-5-7-9-3-12 3 6 7 11 10 16z' fill='%231B5E3B'/%3E%3Cpath d='M42 18C52 16 57 9 53 5c-4 4-7 6-13 7 5-5 7-9 3-12-3 6-7 11-10 16z' fill='%23164A2F'/%3E%3Ccircle cx='30' cy='22' r='3.1' fill='%23B01212'/%3E%3Ccircle cx='34.2' cy='20.2' r='2.9' fill='%23C41E1E'/%3E%3Ccircle cx='32.2' cy='25.2' r='2.5' fill='%239B1010'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath d='M22 18C12 16 7 9 11 5c4 4 7 6 13 7-5-5-7-9-3-12 3 6 7 11 10 16z' fill='%231B5E3B'/%3E%3Cpath d='M42 18C52 16 57 9 53 5c-4 4-7 6-13 7 5-5 7-9 3-12-3 6-7 11-10 16z' fill='%23164A2F'/%3E%3Ccircle cx='30' cy='22' r='3.1' fill='%23B01212'/%3E%3Ccircle cx='34.2' cy='20.2' r='2.9' fill='%23C41E1E'/%3E%3Ccircle cx='32.2' cy='25.2' r='2.5' fill='%239B1010'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-size: 40px 20px, 40px 20px;
  background-position: left center, right center;
}

/* CSS-only fallback if JavaScript is off. */
body:not(:has(.xmas-banner))::before {
  content: "Merry Christmas from Fair Deal Accordions";
  display: block;
  background: var(--xmas-green);
  color: var(--xmas-cream);
  text-align: center;
  padding: 8px 16px;
  border-bottom: 2px solid var(--xmas-gold);
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

/* Subtle holly / snowflake accents on the header and headings. */
.header .site-name {
  padding: 0 48px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath d='M22 18C12 16 7 9 11 5c4 4 7 6 13 7-5-5-7-9-3-12 3 6 7 11 10 16z' fill='%231B5E3B'/%3E%3Cpath d='M42 18C52 16 57 9 53 5c-4 4-7 6-13 7 5-5 7-9 3-12-3 6-7 11-10 16z' fill='%23164A2F'/%3E%3Ccircle cx='30' cy='22' r='3.1' fill='%23B01212'/%3E%3Ccircle cx='34.2' cy='20.2' r='2.9' fill='%23C41E1E'/%3E%3Ccircle cx='32.2' cy='25.2' r='2.5' fill='%239B1010'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 32'%3E%3Cpath d='M22 18C12 16 7 9 11 5c4 4 7 6 13 7-5-5-7-9-3-12 3 6 7 11 10 16z' fill='%231B5E3B'/%3E%3Cpath d='M42 18C52 16 57 9 53 5c-4 4-7 6-13 7 5-5 7-9 3-12-3 6-7 11-10 16z' fill='%23164A2F'/%3E%3Ccircle cx='30' cy='22' r='3.1' fill='%23B01212'/%3E%3Ccircle cx='34.2' cy='20.2' r='2.9' fill='%23C41E1E'/%3E%3Ccircle cx='32.2' cy='25.2' r='2.5' fill='%239B1010'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-size: 48px 24px, 48px 24px;
  background-position: left 0 center, right 0 center;
}
h1, h2, .stock-head {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke='%23C9A44C' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M16 3v26M3 16h26M6.5 6.5l19 19M25.5 6.5l-19 19'/%3E%3Cpath d='M16 7l-2.2-2.2M16 7l2.2-2.2M16 25l-2.2 2.2M16 25l2.2 2.2M7 16l-2.2-2.2M7 16l-2.2 2.2M25 16l2.2-2.2M25 16l2.2 2.2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 18px 18px;
  background-position: left 0.15em center;
  padding-left: 26px;
}

/* Landing snowfall. A brief cool dusk veil helps white flakes show on the
   cream page and the blue nav. Flakes are individual SVG snowflakes, spawned
   in JS, and stop when the visitor starts navigating (or after ~9s). */
.xmas-snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 900;
  overflow: hidden;
}
.xmas-snow-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(50, 68, 96, 0.20) 0%, rgba(40, 56, 82, 0.12) 100%);
  transition: opacity 1s ease;
}
.xmas-snow.is-stopping .xmas-snow-veil {
  opacity: 0;
}
.xmas-flake {
  position: absolute;
  top: -10%;
  left: 0;
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath stroke='%235c6b80' stroke-width='3.2' d='M16 2v28M2 16h28M5.7 5.7l20.6 20.6M26.3 5.7 5.7 26.3'/%3E%3Cpath stroke='%235c6b80' stroke-width='3.2' d='M16 6.2l-2.4-2.4M16 6.2l2.4-2.4M16 25.8l-2.4 2.4M16 25.8l2.4 2.4M6.2 16l-2.4-2.4M6.2 16l-2.4 2.4M25.8 16l2.4-2.4M25.8 16l2.4 2.4'/%3E%3Cpath stroke='%23fff' stroke-width='1.7' d='M16 2v28M2 16h28M5.7 5.7l20.6 20.6M26.3 5.7 5.7 26.3'/%3E%3Cpath stroke='%23fff' stroke-width='1.7' d='M16 6.2l-2.4-2.4M16 6.2l2.4-2.4M16 25.8l-2.4 2.4M16 25.8l2.4 2.4M6.2 16l-2.4-2.4M6.2 16l-2.4 2.4M25.8 16l2.4-2.4M25.8 16l2.4 2.4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 1px rgba(40, 50, 70, 0.75)) drop-shadow(0 1px 2px rgba(30, 40, 60, 0.4));
  animation-name: xmas-flake-fall;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  will-change: transform, opacity;
}
.xmas-snow.is-stopping .xmas-flake {
  opacity: 0 !important;
  transition: opacity 1s ease;
}

@keyframes xmas-flake-fall {
  from {
    transform: translate3d(var(--sx), 0, 0) rotate(0deg);
  }
  to {
    transform: translate3d(calc(var(--sx) + var(--dx)), 120vh, 0) rotate(var(--rot));
  }
}

/* Keep the music button above the snow. */
.music-toggle { z-index: 1000; }

@media (max-width: 600px) {
  .xmas-banner,
  body:not(:has(.xmas-banner))::before {
    font-size: 14px;
    padding: 8px 12px;
  }
  .xmas-banner-inner {
    padding: 0 36px;
    background-size: 32px 16px, 32px 16px;
  }
  .header .site-name {
    padding: 0 36px;
    background-size: 36px 18px, 36px 18px;
  }
  h1, h2, .stock-head {
    background-size: 16px 16px;
    padding-left: 22px;
  }
}

/* Honour reduced-motion: keep the banner and static accents, no snowfall. */
@media (prefers-reduced-motion: reduce) {
  .xmas-snow {
    display: none !important;
  }
}
html.xmas-reduced-motion .xmas-snow {
  display: none !important;
}
