/* The White Horse Inn: Christmas styling.
   Every rule here starts with html.christmas, so nothing changes unless js/season.js
   has switched Christmas on (1 to 31 December, UK time). Delete or edit freely:
   the normal site in style.css is untouched. */

/* 1. COLOURS: charcoal becomes deep holly green, red becomes berry red, sand becomes gold */
html.christmas {
  --sage-dark:  #1f3a2b;   /* header, footer, dark sections, headings: holly green */
  --sage:       #a3262a;   /* accents and labels: berry red */
  --sage-light: #e3c374;   /* highlights on dark: candle gold */
  --red:        #a3262a;   /* main buttons */
  --red-dark:   #7d1b1f;
  --line:       #e4d6c2;

  /* Icon set, drawn as small inline SVGs so there are no extra image files */
  --xmas-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23d4a537' d='M12 1.5l3.1 6.6 7.2.9-5.3 5 1.4 7.1L12 17.6l-6.4 3.5 1.4-7.1-5.3-5 7.2-.9z'/%3E%3C/svg%3E");
  --xmas-flake: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff7ea' stroke-width='1.6' stroke-linecap='round'%3E%3Cg id='a'%3E%3Cpath d='M12 12V2M9.5 4l2.5 2 2.5-2'/%3E%3C/g%3E%3Cuse href='%23a' transform='rotate(60 12 12)'/%3E%3Cuse href='%23a' transform='rotate(120 12 12)'/%3E%3Cuse href='%23a' transform='rotate(180 12 12)'/%3E%3Cuse href='%23a' transform='rotate(240 12 12)'/%3E%3Cuse href='%23a' transform='rotate(300 12 12)'/%3E%3C/svg%3E");
  --xmas-snow-pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200' fill='none' stroke='%23ffffff' stroke-opacity='.1' stroke-width='1.4' stroke-linecap='round'%3E%3Cdefs%3E%3Cg id='a'%3E%3Cpath d='M12 12V2M9.5 4l2.5 2 2.5-2'/%3E%3C/g%3E%3Cg id='f'%3E%3Cuse href='%23a'/%3E%3Cuse href='%23a' transform='rotate(60 12 12)'/%3E%3Cuse href='%23a' transform='rotate(120 12 12)'/%3E%3Cuse href='%23a' transform='rotate(180 12 12)'/%3E%3Cuse href='%23a' transform='rotate(240 12 12)'/%3E%3Cuse href='%23a' transform='rotate(300 12 12)'/%3E%3C/g%3E%3C/defs%3E%3Cuse href='%23f' transform='translate(20 24) scale(1.4)'/%3E%3Cuse href='%23f' transform='translate(130 110)'/%3E%3Cuse href='%23f' transform='translate(70 150) scale(.7)'/%3E%3Cg fill='%23ffffff' fill-opacity='.12' stroke='none'%3E%3Ccircle cx='160' cy='30' r='1.5'/%3E%3Ccircle cx='40' cy='100' r='1.2'/%3E%3Ccircle cx='110' cy='60' r='1'/%3E%3Ccircle cx='185' cy='170' r='1.3'/%3E%3C/g%3E%3C/svg%3E");
  --xmas-bauble-red: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Ccircle cx='10' cy='2' r='1.4' fill='none' stroke='%23c99a2e'/%3E%3Crect x='7.5' y='3.2' width='5' height='3' rx='.6' fill='%23c99a2e'/%3E%3Ccircle cx='10' cy='14.5' r='8.5' fill='%23b3262c'/%3E%3Cellipse cx='7' cy='11.5' rx='2' ry='3' fill='%23ffffff' fill-opacity='.35'/%3E%3C/svg%3E");
  --xmas-bauble-gold: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24'%3E%3Ccircle cx='10' cy='2' r='1.4' fill='none' stroke='%23c99a2e'/%3E%3Crect x='7.5' y='3.2' width='5' height='3' rx='.6' fill='%23c99a2e'/%3E%3Ccircle cx='10' cy='14.5' r='8.5' fill='%23d4a537'/%3E%3Cellipse cx='7' cy='11.5' rx='2' ry='3' fill='%23ffffff' fill-opacity='.4'/%3E%3C/svg%3E");
  --xmas-tree: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 26'%3E%3Cpath fill='%232f6b3a' d='M12 3l5 7h-2.6l4.6 6h-3l4 6H4l4-6H5l4.6-6H7z'/%3E%3Crect x='10.8' y='22' width='2.4' height='3' fill='%236b4a2b'/%3E%3Cpath fill='%23d4a537' d='M12 0l.9 1.9 2 .3-1.5 1.4.4 2L12 4.6l-1.8 1 .4-2-1.5-1.4 2-.3z'/%3E%3Ccircle cx='10' cy='13' r='1' fill='%23e2483d'/%3E%3Ccircle cx='14.5' cy='17.5' r='1' fill='%23f2c14e'/%3E%3Ccircle cx='9' cy='19.5' r='1' fill='%23e2483d'/%3E%3C/svg%3E");
  --xmas-holly: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 32'%3E%3Cpath fill='%232f6b3a' d='M20 18C15 9 8 10 2 5c2 6 0 10 4 12-2 4 2 6 4 4 2 4 6 3 10-3z'/%3E%3Cpath fill='%233b7f47' d='M20 18c5-9 12-8 18-13-2 6 0 10-4 12 2 4-2 6-4 4-2 4-6 3-10-3z'/%3E%3Ccircle cx='16.5' cy='19' r='3.4' fill='%23c4202a'/%3E%3Ccircle cx='23.5' cy='19' r='3.4' fill='%23c4202a'/%3E%3Ccircle cx='20' cy='24' r='3.4' fill='%23b01c25'/%3E%3C/svg%3E");
  --xmas-hanging: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 140'%3E%3Cpath d='M28 0v52M84 0v86M134 0v36' stroke='%23c99a2e' stroke-width='1.2'/%3E%3Cg fill='%23c99a2e'%3E%3Crect x='24' y='51' width='8' height='6' rx='1'/%3E%3Crect x='79' y='85' width='10' height='7' rx='1'/%3E%3Crect x='130.5' y='35' width='7' height='5' rx='1'/%3E%3C/g%3E%3Ccircle cx='28' cy='72' r='16' fill='%23b3262c'/%3E%3Ccircle cx='84' cy='112' r='21' fill='%232f6b3a'/%3E%3Ccircle cx='134' cy='52' r='13' fill='%23d4a537'/%3E%3Cpath d='M65 112h38' stroke='%23d4a537' stroke-width='3' stroke-dasharray='2 4'/%3E%3Cg fill='%23ffffff' fill-opacity='.35'%3E%3Cellipse cx='22' cy='66' rx='4' ry='6'/%3E%3Cellipse cx='77' cy='104' rx='5' ry='7.5'/%3E%3Cellipse cx='129.5' cy='47' rx='3' ry='4.5'/%3E%3C/g%3E%3C/svg%3E");
  --xmas-treeline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 40' fill='%231f3a2b'%3E%3Cpath d='M-12 40L0 14L12 40ZM20 40L40 2L60 40ZM52 40L64 20L76 40ZM68 40L88 8L108 40ZM100 40L113 22L126 40ZM118 40L138 4L158 40ZM150 40L164 18L178 40ZM172 40L192 10L212 40ZM204 40L216 24L228 40ZM228 40L240 14L252 40Z'/%3E%3C/svg%3E");
}

/* 2. BANNER (wording is set in js/main.js) */
html.christmas .notice--christmas { background: var(--red); color: #fff7ea; letter-spacing: 0.02em; }
html.christmas .notice--christmas a { color: #fff7ea; }

/* 3. FAIRY LIGHTS hanging under the header */
html.christmas .site-header::before,
html.christmas .site-header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 18px; pointer-events: none;
  background-repeat: repeat-x; background-size: 140px 18px;
}
html.christmas .site-header::before {   /* warm white and gold bulbs */
  background-image:
    radial-gradient(circle at 50% 50%, #fff3c4 0 3px, rgba(255,230,150,.45) 4px, transparent 9px),
    radial-gradient(circle at 50% 50%, #f2c14e 0 3px, rgba(242,193,78,.45) 4px, transparent 9px);
  background-position: 0 0, 70px 0;
  animation: xmas-twinkle 2.6s ease-in-out infinite;
}
html.christmas .site-header::after {    /* red and green bulbs */
  background-image:
    radial-gradient(circle at 50% 50%, #e2483d 0 3px, rgba(226,72,61,.45) 4px, transparent 9px),
    radial-gradient(circle at 50% 50%, #57b267 0 3px, rgba(87,178,103,.45) 4px, transparent 9px);
  background-position: 35px 0, 105px 0;
  animation: xmas-twinkle 2.6s ease-in-out 1.3s infinite;
}
@keyframes xmas-twinkle { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

/* 4. HOLLY on the pub drawing in the header */
html.christmas .brand-plaque { position: relative; }
html.christmas .brand-plaque::after {
  content: ""; position: absolute; top: -9px; right: -12px; width: 30px; height: 24px;
  background: var(--xmas-holly) no-repeat center / contain;
}

/* 5. GENTLE SNOW over the home page photo */
@media (max-width: 899px) { html.christmas .hero--bleed .hero-photo { position: relative; } }  /* wider screens already position it */
html.christmas .hero--bleed .hero-photo::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.95) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255,255,255,.8) 0 1.5px, transparent 2.5px),
    radial-gradient(circle, rgba(255,255,255,.7) 0 1px, transparent 2px);
  background-size: 180px 180px, 120px 120px, 70px 70px;
  background-position: 0 0, 40px 60px, 20px 30px;
  animation: xmas-snow 18s linear infinite;
}
@keyframes xmas-snow {
  from { background-position: 0 0, 40px 60px, 20px 30px; }
  to   { background-position: 30px 540px, 70px 420px, 40px 310px; }
}

/* 6. SMALL TOUCHES */
html.christmas .facts-strip { border-top: 3px solid var(--red); }
html.christmas .site-footer { border-top: 3px solid var(--red); }
html.christmas .hours-card,
html.christmas .card,
html.christmas .quote { border-top: 3px solid var(--sage-dark); }

/* 7. SNOWFLAKES either side of the banner */
html.christmas .notice--christmas::before,
html.christmas .notice--christmas::after {
  content: ""; display: inline-block; width: 1em; height: 1em; vertical-align: -0.15em;
  background: var(--xmas-flake) no-repeat center / contain;
}
html.christmas .notice--christmas::before { margin-right: 0.6em; }
html.christmas .notice--christmas::after  { margin-left: 0.6em; }

/* 8. GOLD STARS before the small labels above headings and on event cards */
html.christmas .eyebrow::before,
html.christmas .hero .sub::before,
html.christmas .card .tag::before {
  content: ""; display: inline-block; width: 1.05em; height: 1.05em; margin-right: 0.5em; vertical-align: -0.18em;
  background: var(--xmas-star) no-repeat center / contain;
}

/* 9. BAUBLES hanging in the top corner of every inside page (hidden on phones to keep the title clear) */
html.christmas .page-head { position: relative; }
@media (min-width: 700px) {
  html.christmas .page-head::after {
    content: ""; position: absolute; top: 0; right: max(1rem, calc((100% - var(--max)) / 2)); width: 160px; height: 140px;
    background: var(--xmas-hanging) no-repeat center top / contain; pointer-events: none;
    transform-origin: 50% 0; animation: xmas-swing 6s ease-in-out infinite;
  }
}
@keyframes xmas-swing { 0%, 100% { transform: rotate(-1.5deg); } 50% { transform: rotate(1.5deg); } }

/* 10. SNOWFLAKE PATTERN on the dark bands, facts strip and footer */
html.christmas .section--dark,
html.christmas .facts-strip,
html.christmas .site-footer { background-image: var(--xmas-snow-pattern); background-size: 200px 200px; }

/* 11. FIR TREES along the top of the footer */
html.christmas .site-footer { position: relative; margin-top: 40px; }
html.christmas .site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: -42px; height: 40px; pointer-events: none;
  background: var(--xmas-treeline) repeat-x left bottom / 240px 40px;
}

/* 12. HOLLY on the corner of the hours boxes, quiz rounds and reviews */
html.christmas .hours-card,
html.christmas .round,
html.christmas .quote { position: relative; }
html.christmas .hours-card::after,
html.christmas .round::after,
html.christmas .quote::after {
  content: ""; position: absolute; top: -12px; right: 14px; width: 38px; height: 30px; pointer-events: none;
  background: var(--xmas-holly) no-repeat center / contain;
}

/* 13. MENU: a little tree beside each section heading */
html.christmas .menu-section h2::before {
  content: ""; display: inline-block; width: 0.8em; height: 0.87em; margin-right: 0.35em; vertical-align: -0.05em;
  background: var(--xmas-tree) no-repeat center / contain;
}
html.christmas .menu-nav a:hover { background: var(--red); border-color: var(--red); color: #fff; }

/* 14. HISTORY: the timeline dots become red and gold baubles */
html.christmas .timeline li::before {
  width: 15px; height: 18px; left: -8.5px; top: 0.2rem; border-radius: 0;
  background: var(--xmas-bauble-red) no-repeat center / contain;
}
html.christmas .timeline li:nth-child(even)::before { background-image: var(--xmas-bauble-gold); }

/* 15. ROAST photo framed like a Christmas card */
html.christmas .roast img { box-shadow: 0 0 0 6px var(--paper), 0 0 0 7px #d4a537, 0 18px 40px -24px rgba(54,51,47,.7); }

/* 16. Phone action bar: red edge to match */
html.christmas .action-bar { border-top: 2px solid var(--red); }

/* 17. SNOW SETTLED ON THE PAGE HEADLINES AND SECTION HEADINGS (h1 and h2)
   Layered shadows nudged upwards, so white only shows along the top edge of every letter.
   Sizes are in em, so it scales with the heading. The faint blue-grey layer outlines the
   snow so it still shows against the cream background. */
html.christmas h1,
html.christmas h2 {
  text-shadow:
    0 -0.03em 0 #ffffff,
    0.012em -0.05em 0 #ffffff,
    -0.012em -0.065em 0 #ffffff,
    0 -0.08em 0 #ffffff,
    0.006em -0.092em 0.006em #ffffff,
    0 -0.1em 0.02em rgba(60, 85, 115, .6),
    0 -0.11em 0.05em rgba(60, 85, 115, .25);
}
/* On the dark green bands the headings are cream, the same colour as snow, so make them
   candle gold there and the white snow shows on top */
html.christmas .section--dark h2 { color: var(--sage-light); }

/* Respect visitors who prefer less motion: lights stay lit, snow and baubles stay still */
@media (prefers-reduced-motion: reduce) {
  html.christmas .site-header::before,
  html.christmas .site-header::after,
  html.christmas .hero--bleed .hero-photo::after,
  html.christmas .page-head::after { animation: none; }
}

/* MORE PICTURES THROUGHOUT the site: corners of boxes, card photos, a divider at the top of
   the paper-coloured bands, menu headings, the history timeline and the footer headings.
   (The slots are in style.css, section 26.) */
html.christmas {
  --sd-corner: var(--xmas-holly);
  --sd-card: var(--xmas-star);
  --sd-divider: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 132 28'%3E%3Cpath d='M4 14h42M86 14h42' stroke='%232f6b3a' stroke-width='1.4' stroke-linecap='round'/%3E%3Ccircle cx='50' cy='14' r='2.4' fill='%23b3262c'/%3E%3Ccircle cx='82' cy='14' r='2.4' fill='%23b3262c'/%3E%3Cg transform='translate(54 2)'%3E%3Cpath fill='%23d4a537' d='M12 1.5l3.1 6.6 7.2.9-5.3 5 1.4 7.1L12 17.6l-6.4 3.5 1.4-7.1-5.3-5 7.2-.9z'/%3E%3C/g%3E%3C/svg%3E");
  --sd-footer: var(--xmas-star); --sd-footer-w: 1.1em;
}