/* All-out Christmas theme for The Barge Inn.
   Scoped to html.theme-xmas. One switch: generate.py XMAS_THEME +
   XMAS_THEME_UNTIL, and a Worker date check that strips the theme from
   00:00 Europe/London on 06/01/27 even if HTML was cached. */

@font-face {
  font-family: "Mountains of Christmas";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/mountains-of-christmas-400.woff2") format("woff2");
}
@font-face {
  font-family: "Mountains of Christmas";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/mountains-of-christmas-700.woff2") format("woff2");
}

html.theme-xmas {
  --evergreen: #143528;
  --evergreen-mid: #1f4a38;
  --evergreen-deep: #0b1f19;
  --berry: #8f1d26;
  --berry-dark: #6c1219;
  --velvet: #7a1520;
  --gold: #e4c15a;
  --gold-bright: #f3db8a;
  --gold-deep: #b8892a;
  --cream: #fff8eb;
  --text-strong: #143528;
  --night: #081511;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

html.theme-xmas body {
  background-color: var(--night);
  background-image:
    radial-gradient(1.4px 1.4px at 6% 10%, rgba(255,255,255,.85), transparent),
    radial-gradient(1.2px 1.2px at 18% 22%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.6px 1.6px at 28% 8%, rgba(255,250,220,.95), transparent),
    radial-gradient(1px 1px at 37% 30%, rgba(255,255,255,.65), transparent),
    radial-gradient(1.5px 1.5px at 49% 14%, rgba(255,255,255,.8), transparent),
    radial-gradient(1.2px 1.2px at 61% 26%, rgba(255,250,220,.75), transparent),
    radial-gradient(1.8px 1.8px at 72% 9%, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 81% 20%, rgba(255,255,255,.6), transparent),
    radial-gradient(1.4px 1.4px at 91% 12%, rgba(255,250,220,.85), transparent),
    radial-gradient(1.1px 1.1px at 12% 48%, rgba(255,255,255,.7), transparent),
    radial-gradient(1.3px 1.3px at 33% 58%, rgba(255,255,255,.55), transparent),
    radial-gradient(1px 1px at 55% 46%, rgba(255,250,220,.7), transparent),
    radial-gradient(1.5px 1.5px at 77% 52%, rgba(255,255,255,.75), transparent),
    radial-gradient(1.2px 1.2px at 94% 42%, rgba(255,255,255,.6), transparent),
    radial-gradient(1px 1px at 8% 78%, rgba(255,255,255,.5), transparent),
    radial-gradient(1.4px 1.4px at 24% 88%, rgba(255,250,220,.7), transparent),
    radial-gradient(1.1px 1.1px at 46% 82%, rgba(255,255,255,.55), transparent),
    radial-gradient(1.6px 1.6px at 68% 90%, rgba(255,255,255,.7), transparent),
    radial-gradient(1px 1px at 86% 76%, rgba(255,255,255,.5), transparent),
    linear-gradient(180deg, #07140f 0%, #10261e 42%, #16352a 100%);
  background-attachment: fixed;
}

html.theme-xmas h1,
html.theme-xmas h2,
html.theme-xmas h3,
html.theme-xmas h4 { color: var(--evergreen); }

html.theme-xmas a { color: var(--berry-dark); }
html.theme-xmas a:hover { color: var(--berry); }

/* Logo text is inside an <a>, so it would inherit the berry link colour.
   Force cream/white on the red header so it stays readable. */
html.theme-xmas .site-header .brand,
html.theme-xmas .site-header .brand:hover,
html.theme-xmas .brand-title,
html.theme-xmas .brand-tag {
  color: #fff8eb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}
html.theme-xmas .brand-tag { opacity: 0.92; }

html.theme-xmas .btn {
  background: linear-gradient(180deg, #f0d78c 0%, #d4a437 100%);
  border-color: #f8e7b0;
  color: #2a1a08;
  box-shadow: 0 2px 0 #7a5410, 0 0 0 2px #7a1f28;
  font-weight: 800;
}
html.theme-xmas .btn:hover {
  background: linear-gradient(180deg, #ffe7a8 0%, #e4b84a 100%);
  border-color: #fff3c8;
  color: #2a1a08;
}
html.theme-xmas .btn-secondary {
  background: var(--berry);
  color: var(--cream);
  border-color: var(--gold);
  box-shadow: none;
}
html.theme-xmas .btn-secondary:hover {
  background: var(--berry-dark);
  color: #fff;
  border-color: var(--gold-bright);
}

html.theme-xmas .chip-link:hover,
html.theme-xmas .event-date,
html.theme-xmas .btn-tickets {
  background: var(--berry);
  border-color: var(--berry);
  color: #fff;
}

/* Velvet header, gold trim, overflow for baubles and snow */
html.theme-xmas .site-header {
  background:
    linear-gradient(180deg, rgba(255, 215, 130, 0.16), transparent 38%),
    linear-gradient(180deg, #9a2230 0%, #7a1520 58%, #5c1018 100%);
  color: var(--cream);
  overflow: visible;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), inset 0 -3px 0 var(--gold);
  padding-bottom: 0.2rem;
}
html.theme-xmas .site-nav a { color: var(--cream); }
html.theme-xmas .site-nav a:hover,
html.theme-xmas .site-nav a[aria-current="page"] {
  background: rgba(232, 193, 90, 0.22);
  color: #fff8e0;
}
html.theme-xmas .nav-toggle {
  border-color: rgba(232, 193, 90, 0.55);
  background: rgba(0, 0, 0, 0.12);
}

/* Pine garland along the top of the header */
html.theme-xmas .xmas-garland {
  display: block;
  position: absolute;
  left: 0; right: 0; top: -2px;
  height: 18px;
  z-index: 42;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 18' preserveAspectRatio='none'><path fill='%23143d2c' d='M0 2l12 14 8-12 10 12 8-11 12 13 9-12 11 12 8-11 12 13 9-12 11 13 8-12 12 14 8-13 11 13 9-12 12 14V0H0z'/><circle cx='20' cy='10' r='2' fill='%23b4302a'/><circle cx='70' cy='11' r='2' fill='%23e4c15a'/><circle cx='118' cy='10' r='2' fill='%23b4302a'/></svg>");
  background-repeat: repeat-x;
  background-size: 160px 18px;
}

/* Santa hat + holly on the logo */
html.theme-xmas .brand-mark-wrap {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}
html.theme-xmas .brand-mark { width: 40px; height: 40px; margin-top: 6px; }
html.theme-xmas .xmas-santa-hat,
html.theme-xmas .xmas-holly,
html.theme-xmas .xmas-baubles { display: block; }
html.theme-xmas .xmas-santa-hat {
  position: absolute;
  left: -4px;
  top: -18px;
  width: 40px;
  height: 32px;
  pointer-events: none;
  transform: rotate(-22deg);
  z-index: 5;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.45));
}
html.theme-xmas .xmas-santa-hat svg { display: block; width: 40px; height: 32px; }
html.theme-xmas .xmas-holly {
  position: absolute;
  right: -12px;
  top: 14px;
  width: 24px;
  height: 24px;
  pointer-events: none;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.3));
  z-index: 2;
}
html.theme-xmas .xmas-holly svg { display: block; width: 24px; height: 24px; }

/* Hanging baubles */
html.theme-xmas .site-header { padding-top: 0.45rem; }
html.theme-xmas .xmas-baubles {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 0;
  pointer-events: none;
  z-index: 46;
}
html.theme-xmas .xmas-bauble {
  position: absolute;
  top: 0;
  width: 16px;
  transform: translateX(-50%);
}
html.theme-xmas .xmas-bauble::before {
  content: "";
  display: block;
  width: 1.5px;
  height: var(--hang, 28px);
  margin: 0 auto;
  background: #d9c27a;
}
html.theme-xmas .xmas-bauble i {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), var(--bauble, #c12b2b);
  box-shadow: 0 2px 4px rgba(0,0,0,.35), inset 0 -3px 4px rgba(0,0,0,.2);
  position: relative;
}
html.theme-xmas .xmas-bauble i::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 8px;
  height: 5px;
  transform: translateX(-50%);
  background: #d4a437;
  border-radius: 1px 1px 0 0;
}
html.theme-xmas .xmas-bauble:nth-child(2n) i { --bauble: #e4c15a; }
html.theme-xmas .xmas-bauble:nth-child(3n) i { --bauble: #1f6a45; }
html.theme-xmas .xmas-bauble:nth-child(4n) i { --bauble: #f3efe6; }
html.theme-xmas .xmas-bauble:nth-child(1) { left: 3.5%; --hang: 36px; }
html.theme-xmas .xmas-bauble:nth-child(2) { left: 9%; --hang: 62px; }
html.theme-xmas .xmas-bauble:nth-child(3) { left: 14.5%; --hang: 28px; }
html.theme-xmas .xmas-bauble:nth-child(4) { left: 86%; --hang: 30px; }
html.theme-xmas .xmas-bauble:nth-child(5) { left: 91.5%; --hang: 64px; }
html.theme-xmas .xmas-bauble:nth-child(6) { left: 96.5%; --hang: 40px; }

/* Bright twinkling fairy lights */
.xmas-lights,
.xmas-holly,
.xmas-santa-hat,
.xmas-garland,
.xmas-baubles,
#xmas-snow { display: none; }

html.theme-xmas .xmas-lights {
  display: block;
  position: relative;
  height: 36px;
  margin: 0 0 -10px;
  z-index: 44;
  pointer-events: none;
  overflow: visible;
}
html.theme-xmas .xmas-lights-wire {
  position: absolute;
  left: 0; right: 0; top: 0;
  width: 100%;
  height: 22px;
  display: block;
}
html.theme-xmas .xmas-bulbs {
  position: absolute;
  left: 1%;
  right: 1%;
  top: 4px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
html.theme-xmas .xmas-bulb {
  position: relative;
  width: 12px;
  height: 16px;
  border-radius: 50% 50% 55% 55%;
  background: #ffe37a;
  box-shadow: 0 0 10px 3px rgba(255, 220, 80, 0.85), 0 0 18px 6px rgba(255, 200, 60, 0.4);
  flex: none;
  transform: rotate(7deg);
}
html.theme-xmas .xmas-bulb::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 6px;
  height: 5px;
  transform: translateX(-50%);
  background: #3a2a18;
  border-radius: 1px 1px 0 0;
}
html.theme-xmas .xmas-bulb:nth-child(even) { transform: rotate(-8deg); margin-top: 9px; }
html.theme-xmas .xmas-bulb:nth-child(3n) {
  background: #fff6c8;
  box-shadow: 0 0 10px 3px rgba(255, 246, 200, 0.8), 0 0 18px 6px rgba(255, 230, 140, 0.4);
}
html.theme-xmas .xmas-bulb:nth-child(3n+1) {
  background: #ffbf4a;
  box-shadow: 0 0 10px 3px rgba(255, 180, 50, 0.8), 0 0 16px 5px rgba(255, 160, 40, 0.35);
}
html.theme-xmas .xmas-bulb:nth-child(5n+2) {
  background: #ff5b4a;
  box-shadow: 0 0 10px 3px rgba(255, 80, 70, 0.7), 0 0 16px 5px rgba(255, 80, 70, 0.3);
}
html.theme-xmas .xmas-bulb:nth-child(7n+3) {
  background: #5dcf7a;
  box-shadow: 0 0 10px 3px rgba(90, 200, 110, 0.65), 0 0 16px 5px rgba(90, 200, 110, 0.28);
}

@keyframes xmas-twinkle {
  0%, 100% { opacity: 1; filter: brightness(1); }
  40% { opacity: 0.55; filter: brightness(1.45); }
  60% { opacity: 1; filter: brightness(1.2); }
}
html.theme-xmas .xmas-bulb:nth-child(2n) { animation: xmas-twinkle 1.8s ease-in-out infinite; }
html.theme-xmas .xmas-bulb:nth-child(3n) { animation: xmas-twinkle 2.3s ease-in-out 0.4s infinite; }
html.theme-xmas .xmas-bulb:nth-child(5n) { animation: xmas-twinkle 1.5s ease-in-out 0.8s infinite; }

html.theme-xmas .site-header .xmas-snow-lip {
  display: block;
  position: relative;
  z-index: 45;
  height: 28px;
  margin-bottom: -18px;
  pointer-events: none;
  background: url("/images/xmas-snow-cap.svg") no-repeat top center / 100% 28px;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,.12));
}

/* Falling snow over the whole page */
html.theme-xmas #xmas-snow {
  display: block;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 80;
}

/* Snow on every card and the slideshow */
html.theme-xmas .card,
html.theme-xmas .hero-card,
html.theme-xmas .xmas-banner,
html.theme-xmas .xmas-hero {
  position: relative;
  isolation: isolate;
}
html.theme-xmas .card::before,
html.theme-xmas .slideshow::after,
html.theme-xmas .xmas-banner::after,
html.theme-xmas .xmas-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 36px;
  z-index: 6;
  pointer-events: none;
  background: url("/images/xmas-snow-cap.svg") no-repeat top center / 100% 36px;
}
html.theme-xmas .card {
  background: #fffaf3;
  border-color: #e4d2a8;
  box-shadow: var(--shadow);
  overflow: hidden;
}
html.theme-xmas .card::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 22px;
  width: 28px;
  height: 28px;
  z-index: 6;
  pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='%231E3D32' d='M18 14c-6 1-12 8-10 16 3 4 8 5 12 3-2 6 2 13 9 14 2-6 0-12-4-16 5 1 11-3 12-10-6-3-12-2-16 1z'/><path fill='%23244A3B' d='M46 12c6 2 11 9 8 16-3 4-8 5-12 3 2 6-1 13-8 15-3-6-1-12 3-16-5 1-11-2-13-9 6-4 12-3 16 0z'/><circle cx='32' cy='30' r='4.2' fill='%239B2D20'/><circle cx='27' cy='34' r='3.4' fill='%23B4372A'/><circle cx='37' cy='34' r='3.4' fill='%238A2418'/></svg>") no-repeat center / contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.2));
}
html.theme-xmas .hero-card { overflow: hidden; }
html.theme-xmas .hero-card::before { height: 0; content: none; }
html.theme-xmas .hero-card::after { content: none; }

/* Big festive hero */
html.theme-xmas .xmas-hero {
  display: grid;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  min-height: 22rem;
  box-shadow: var(--shadow);
  border: 1px solid #e4d2a8;
}
html.theme-xmas .xmas-hero-photo,
html.theme-xmas .xmas-hero-photo img,
html.theme-xmas .xmas-hero picture {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
html.theme-xmas .xmas-hero-photo { z-index: 0; }
html.theme-xmas .xmas-hero-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(8, 16, 12, 0.28) 0%, rgba(8, 16, 12, 0.2) 30%, rgba(8, 16, 12, 0.78) 100%);
}
html.theme-xmas .xmas-hero-inner {
  position: relative;
  z-index: 2;
  padding: 4.2rem 1.4rem 1.8rem;
  color: var(--cream);
  text-align: center;
  display: grid;
  justify-items: center;
  align-content: end;
  min-height: 22rem;
}
html.theme-xmas .xmas-hero-kicker {
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin: 0 0 0.2rem;
  text-shadow: 0 1px 8px rgba(0,0,0,.5);
}
html.theme-xmas .xmas-hero-title {
  font-family: "Mountains of Christmas", "Roboto Slab", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw + 1rem, 4.4rem);
  line-height: 0.95;
  margin: 0 0 0.45rem;
  color: #fff8e8;
  text-shadow: 0 2px 0 #7a1520, 0 4px 18px rgba(0,0,0,.55);
  max-width: 18ch;
}
html.theme-xmas .xmas-hero-sub {
  margin: 0 0 0.9rem;
  font-size: 1.12rem;
  color: #fff4d8;
  text-shadow: 0 1px 8px rgba(0,0,0,.55);
}
html.theme-xmas .xmas-hero-inner .btn-row { margin: 0; justify-content: center; }
html.theme-xmas .xmas-tree {
  width: 54px;
  height: 68px;
  margin-bottom: 0.35rem;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.4));
}
html.theme-xmas .xmas-hero .xmas-lights {
  position: absolute;
  left: 0; right: 0; top: 6px;
  z-index: 7;
  margin: 0;
  height: 34px;
}

/* Christmas at the Barge banner */
.xmas-banner, .xmas-hero { display: none; }
html.theme-xmas .xmas-banner {
  display: block;
  overflow: hidden;
  padding: 2.1rem 1.25rem 1.25rem 1.4rem;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.2), rgba(255,248,235,0.92)),
    linear-gradient(125deg, #f7efe3 0%, #f3e2c8 55%, #ead5b6 100%);
  border: 1px solid #e0cdaa;
  box-shadow: inset 7px 0 0 var(--berry), var(--shadow);
  border-radius: var(--radius-lg);
}
html.theme-xmas .xmas-banner .xmas-lights {
  position: absolute;
  left: 0; right: 0; top: 2px;
  margin: 0;
  height: 32px;
  z-index: 7;
}
html.theme-xmas .xmas-banner .eyebrow {
  color: var(--berry-dark);
  letter-spacing: 0.16em;
}
html.theme-xmas .xmas-banner h2 {
  margin: 0 0 0.4rem;
  font-family: "Mountains of Christmas", "Roboto Slab", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 3vw + 1rem, 2.6rem);
  line-height: 1;
  color: var(--berry-dark);
}
html.theme-xmas .xmas-banner-lede { margin: 0 0 0.35rem; max-width: 40rem; }
html.theme-xmas .xmas-banner-actions { margin: 0.7rem 0 0.2rem; }
html.theme-xmas .xmas-banner-events { margin-top: 0.55rem; }
html.theme-xmas .xmas-banner-events .status,
html.theme-xmas .xmas-banner-events .empty {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
html.theme-xmas .xmas-event-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
html.theme-xmas .xmas-event-list a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
  min-height: 44px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
  border: 1px solid #e0cdaa;
  color: var(--evergreen-deep);
}
html.theme-xmas .xmas-event-list a:hover {
  background: #fff;
  border-color: var(--berry);
  color: var(--berry-dark);
}
html.theme-xmas .xmas-event-list .when {
  font-weight: 700;
  color: var(--berry-dark);
  font-size: 0.88rem;
  white-space: nowrap;
}
html.theme-xmas .xmas-event-list .name {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Snowflake bullets on ordinary content lists */
html.theme-xmas .page .card ul:not(.socials):not(.event-list):not(.event-cards):not(.xmas-event-list) {
  list-style: none;
  padding-left: 1.35rem;
}
html.theme-xmas .page .card ul:not(.socials):not(.event-list):not(.event-cards):not(.xmas-event-list) > li {
  position: relative;
}
html.theme-xmas .page .card ul:not(.socials):not(.event-list):not(.event-cards):not(.xmas-event-list) > li::before {
  content: "❄";
  position: absolute;
  left: -1.25rem;
  color: var(--berry);
  font-size: 0.85rem;
}

#christmas { scroll-margin-top: calc(var(--header-h) + 1.8rem); }

/* Snowy footer */
html.theme-xmas .site-footer {
  background:
    url("/images/xmas-snow-cap.svg") no-repeat top center / 100% 40px,
    linear-gradient(180deg, #123028 40px, #0b1f19 100%);
  color: #f3e6d2;
  padding-top: 3rem;
  position: relative;
}
html.theme-xmas .site-footer a { color: #fff; }
html.theme-xmas .xmas-footer-wish {
  display: block;
  text-align: center;
  font-family: "Mountains of Christmas", "Roboto Slab", Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw + 1rem, 2.4rem);
  color: var(--gold-bright);
  margin: 0 auto 1.1rem;
  text-shadow: 0 2px 0 #7a1520;
  padding: 0 1rem;
}

@media (max-width: 639px) {
  html.theme-xmas .xmas-lights { height: 30px; }
  html.theme-xmas .xmas-bulb { width: 10px; height: 14px; }
  html.theme-xmas .xmas-banner { padding: 1.9rem 1rem 1.05rem 1.2rem; }
  html.theme-xmas .xmas-hero-inner { min-height: 18rem; padding: 3.6rem 1rem 1.3rem; }
  html.theme-xmas .xmas-bauble:nth-child(3),
  html.theme-xmas .xmas-bauble:nth-child(4) { display: none; }
  html.theme-xmas .xmas-event-list { display: grid; gap: 0.45rem; }
  html.theme-xmas .xmas-event-list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    width: 100%;
    border-radius: 0.9rem;
    padding: 0.55rem 0.9rem;
    min-height: 48px;
  }
  html.theme-xmas .card::before,
  html.theme-xmas .slideshow::after,
  html.theme-xmas .xmas-banner::after,
  html.theme-xmas .xmas-hero::after { height: 28px; background-size: 160% 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-xmas .xmas-bulb { animation: none !important; }
  html.theme-xmas #xmas-snow { display: none !important; }
  html.theme-xmas body { background-attachment: scroll; }
}

html.theme-xmas [data-xmas-off] { display: none; }
