/* ---- Festive version (Christmas 2026) ----------------------------------------------------
   /assets/js/festive.js adds classes to <html> between its start and end dates (UK time):
     "festive"       on every page: the Santa hat on the P, the message and its button;
     "festive-home"  on the English and Welsh home pages only: colours, lights, snow, greeting.
   After the end date neither class is added, so the site looks exactly as normal without
   anyone touching it. Colours come from the design system's seasonal rule: navy and turquoise
   stay as the anchor, with festive red #b3363f, deep red #8c2730, warm gold #e9c98b and
   cream #fbf4e6. */
html.festive{--festive-red:#b3363f;--festive-red-deep:#8c2730;--festive-gold:#e9c98b;--festive-cream:#fbf4e6;--festive-cream-2:#f5e8cb}

/* Santa hat on the P, on every page. The logo artwork itself is untouched: the hat is a
   separate picture laid over it, placed exactly as on the Christmas social posts. */
.festive-logo{position:relative;display:inline-block;line-height:0;max-width:100%}
.festive-logo--lockup{align-self:flex-start}
.festive-hat{position:absolute;height:auto;max-width:none;pointer-events:none;rotate:-14deg;transform-origin:60% 75%}
.festive-logo--mono .festive-hat{left:-19.4%;top:-13.9%;width:65.8%}
.festive-logo--lockup .festive-hat{left:-3.41%;top:-12%;width:11.13%}
@media (prefers-reduced-motion:no-preference){
/* Settles once, on the first page of a visit. No looping. */
html.festive-first .festive-hat{animation:festive-hat-drop .95s cubic-bezier(.3,.7,.3,1) .35s both}
@keyframes festive-hat-drop{0%{opacity:0;translate:0 -170%;rotate:-42deg}50%{opacity:1;translate:0 7%;rotate:-5deg}72%{translate:0 -4%;rotate:-20deg}88%{translate:0 1%;rotate:-12deg}100%{translate:0 0;rotate:-14deg}}
}

/* ---- Home pages only ----------------------------------------------------------------------- */
/* No turquoise on the home pages: gold on dark grounds, and a deeper gold (#7d5f1a, derived from
   the festive gold so it is readable) wherever the accent is text on a light ground. */
html.festive-home{--festive-gold-deep:#7d5f1a;
--accent:var(--festive-gold);--accent-on-navy:var(--festive-gold);--pje-turquoise:var(--festive-gold);--pje-turquoise-light:var(--festive-gold);
--accent-strong:var(--festive-gold-deep);--accent-text:var(--festive-gold-deep);--accent-strong-hover:var(--festive-gold-deep);--link-hover:var(--festive-gold-deep);
--turq-800:var(--festive-gold-deep);--turq-700:var(--festive-gold-deep);--turq-600:var(--festive-gold-deep);--turq-500:var(--festive-gold);--turq-300:var(--festive-gold);--turq-200:#f1deb2;--turq-100:var(--festive-cream-2);--turq-50:var(--festive-cream);
--surface-tint:var(--festive-cream);--surface-tint-2:var(--festive-cream-2);--surface-soft:var(--festive-cream);--surface-soft-2:var(--festive-cream-2);--surface-accent:var(--festive-red);--rule-accent:var(--festive-red)}
/* PJE Agri keeps its own palette: .agri sets these tokens itself, and the rules below skip it. */
html.festive-home .btn-accent:not(.agri *){background:var(--festive-red);border-color:var(--festive-red);color:#fff}
html.festive-home .btn-accent:not(.agri *):hover{background:var(--festive-red-deep);border-color:var(--festive-red-deep)}
html.festive-home .btn-soft:not(.agri *){background:var(--festive-cream-2);border-color:var(--festive-cream-2)}
html.festive-home .btn-soft:not(.agri *):hover{background:var(--festive-gold);border-color:var(--festive-gold)}
html.festive-home [aria-hidden="true"][style*="border-radius: 50%"][style*="var(--turq-100)"]:not(.agri *){background:#f1deb2 !important}
html.festive-home [aria-hidden="true"][style*="border-radius: 50%"][style*="var(--pje-turquoise)"]:not(.agri *){background:var(--festive-red-deep) !important}
/* The logo's rule: red on light grounds, gold on navy. */
html.festive-home .rule-divider{background:var(--festive-red)}
html.festive-home a[href$="/message"] .rule-divider{background:var(--festive-gold)}

/* The home hero: a winter evening. The photo is cooled and dimmed, a string of lights hangs
   along the top, snow lies along the bottom and falls in front of the photo, behind the words. */
html.festive-home .home-hero .hero-photo{filter:saturate(.7) brightness(.78) contrast(1.05)}
html.festive-home .home-hero>.fx-lift{z-index:2}
html.festive-home .home-hero::before{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='56' viewBox='0 0 260 56'%3E%3Cpath d='M0 4 Q65 34 130 4 Q195 34 260 4' fill='none' stroke='%230f2440' stroke-width='1.8'/%3E%3Ccircle cx='26' cy='23.6' r='13' fill='%23d2434d' opacity='.22'/%3E%3Crect x='23.5' y='13.6' width='5' height='5' rx='1' fill='%230f2440'/%3E%3Cellipse cx='26' cy='24.6' rx='5' ry='7' fill='%23d2434d'/%3E%3Cellipse cx='24.4' cy='22.1' rx='1.3' ry='2' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='65' cy='29' r='13' fill='%23e9c98b' opacity='.22'/%3E%3Crect x='62.5' y='19' width='5' height='5' rx='1' fill='%230f2440'/%3E%3Cellipse cx='65' cy='30' rx='5' ry='7' fill='%23e9c98b'/%3E%3Cellipse cx='63.4' cy='27.5' rx='1.3' ry='2' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='104' cy='23.6' r='13' fill='%23fbf4e6' opacity='.22'/%3E%3Crect x='101.5' y='13.6' width='5' height='5' rx='1' fill='%230f2440'/%3E%3Cellipse cx='104' cy='24.6' rx='5' ry='7' fill='%23fbf4e6'/%3E%3Cellipse cx='102.4' cy='22.1' rx='1.3' ry='2' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='156' cy='23.6' r='13' fill='%23e9c98b' opacity='.22'/%3E%3Crect x='153.5' y='13.6' width='5' height='5' rx='1' fill='%230f2440'/%3E%3Cellipse cx='156' cy='24.6' rx='5' ry='7' fill='%23e9c98b'/%3E%3Cellipse cx='154.4' cy='22.1' rx='1.3' ry='2' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='195' cy='29' r='13' fill='%23d2434d' opacity='.22'/%3E%3Crect x='192.5' y='19' width='5' height='5' rx='1' fill='%230f2440'/%3E%3Cellipse cx='195' cy='30' rx='5' ry='7' fill='%23d2434d'/%3E%3Cellipse cx='193.4' cy='27.5' rx='1.3' ry='2' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='234' cy='23.6' r='13' fill='%23fbf4e6' opacity='.22'/%3E%3Crect x='231.5' y='13.6' width='5' height='5' rx='1' fill='%230f2440'/%3E%3Cellipse cx='234' cy='24.6' rx='5' ry='7' fill='%23fbf4e6'/%3E%3Cellipse cx='232.4' cy='22.1' rx='1.3' ry='2' fill='%23fff' opacity='.7'/%3E%3C/svg%3E") left top/260px 56px repeat-x,url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 64' preserveAspectRatio='none'%3E%3Cpath d='M0 64 V26 C150 2 250 40 400 22 C560 2 660 40 820 20 C980 2 1090 34 1200 14 V64 Z' fill='%23ffffff' opacity='.55'/%3E%3Cpath d='M0 64 V38 C120 14 220 48 360 32 C520 12 640 50 800 30 C960 10 1080 44 1200 26 V64 Z' fill='%23fbf4e6'/%3E%3C/svg%3E") center bottom/100% 64px no-repeat,linear-gradient(180deg,rgba(15,36,64,.62) 0%,rgba(15,36,64,.28) 38%,rgba(15,36,64,.1) 70%,rgba(15,36,64,.3) 100%)}
html.festive-home .home-hero::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
--flake-l:radial-gradient(circle,#fff 0 3.4px,rgba(255,255,255,.35) 3.6px 5px,transparent 5.2px);
--flake:radial-gradient(circle,#fbf4e6 0 2.4px,transparent 2.6px);
--flake-s:radial-gradient(circle,rgba(251,244,230,.85) 0 1.5px,transparent 1.7px);
background-image:var(--flake-l),var(--flake),var(--flake-s),var(--flake),var(--flake-s),var(--flake-l),var(--flake-s);
background-size:330px 330px,210px 210px,150px 150px,270px 270px,190px 190px,430px 430px,120px 120px;
background-position:60px 20px,120px 90px,30px 140px,210px 160px,20px 200px,300px 250px,80px 60px}
/* The greeting above the logo. */
.festive-hero-greet{align-self:center;text-align:center;display:inline-flex;align-items:center;gap:.55em;margin:0;padding:.42em 1.05em;border-radius:var(--radius-pill);background:var(--festive-red);color:#fff;font-family:var(--font-serif);font-size:clamp(18px,2.1vw,26px);line-height:1.2;box-shadow:0 6px 18px -6px rgba(15,36,64,.6),inset 0 0 0 1.5px rgba(233,201,139,.85)}
.festive-hero-greet svg{width:.8em;height:.8em;flex:none;fill:var(--festive-gold)}
.festive-hero-greet .rule-divider{background:var(--festive-gold) !important;margin:0 .15em}
/* A little snow settled on the header. */
html.festive-home header[style*="position: sticky"]>div::after{content:"";position:absolute;left:30px;right:30px;top:0;height:13px;pointer-events:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='132' height='13' viewBox='0 0 132 13'%3E%3Cpath d='M0 0 H132 V5 Q118 13 102 6 Q88 1 74 7 Q58 14 42 6 Q30 1 18 6 Q8 10 0 5 Z' fill='%23ffffff'/%3E%3C/svg%3E") left top/132px 13px repeat-x;opacity:.96}
@media (max-width:767px){
html.festive-home .home-hero::before{background-size:200px 43px,100% 24px,auto}
}
@media (prefers-reduced-motion:no-preference){
/* Falling snow: the one looping animation on the site, as a seasonal exception. It stays
   still for visitors who have asked for reduced motion. */
html.festive-home .home-hero::after{animation:festive-snow 24s linear infinite}
@keyframes festive-snow{to{background-position:60px 350px,120px 510px,30px 590px,210px 430px,20px 770px,300px 680px,80px 660px}}
}

/* Festive message. Reuses the "Message the team" pop-up's frame. */
.festive-dialog{width:min(560px,calc(100% - 32px))}
.festive-dialog .msg-body{background:var(--festive-cream,#fbf4e6);gap:var(--space-4);padding:var(--space-6) var(--space-5)}
.festive-dialog .msg-bar{padding-top:var(--space-5)}
.festive-greet{margin:0;font-family:var(--font-serif);font-style:italic;font-weight:300;font-size:26px;line-height:1.2;color:var(--festive-red,#b3363f)}
.festive-title{margin:0;font-family:var(--font-serif);font-weight:400;font-size:clamp(30px,6vw,40px);line-height:1.1;color:var(--fg-1)}
.festive-hours{margin:0;padding:var(--space-4) var(--space-5);border-radius:var(--radius-4);background:#fff;display:grid;grid-template-columns:auto 1fr;gap:var(--space-2) var(--space-5);font-size:17px;line-height:1.5}
.festive-hours dt{font-weight:700;color:var(--fg-1)}
.festive-hours dd{margin:0;color:var(--fg-2)}
.festive-dialog p{margin:0}
.festive-dialog .btn-accent{background:var(--festive-red,#b3363f);border-color:var(--festive-red,#b3363f);color:#fff}
.festive-dialog .btn-accent:hover{background:var(--festive-red-deep,#8c2730);border-color:var(--festive-red-deep,#8c2730)}
.festive-pill{position:fixed;left:var(--gutter);bottom:var(--gutter);z-index:30;display:inline-flex;align-items:center;min-height:44px;padding:0 var(--space-5);border:0;border-radius:var(--radius-pill);background:var(--festive-red,#b3363f);color:#fff;font:inherit;font-weight:700;font-size:16px;box-shadow:var(--shadow-2);cursor:pointer}
.festive-pill:hover{background:var(--festive-red-deep,#8c2730)}
@media (max-width:640px){
.festive-hours{grid-template-columns:1fr;gap:0}
.festive-hours dd{padding-bottom:var(--space-2)}
.festive-pill{left:auto;right:var(--gutter);bottom:calc(var(--gutter) + 64px)}
}

/* ---- The bigger festive message ------------------------------------------------------------
   A sleigh and four reindeer (artwork supplied by Llyr) cross the screen once as the message opens. It is one flight,
   not a loop, and it is skipped for visitors who have asked for reduced motion. */
.festive-flight{position:fixed;inset:0;width:100vw;height:100vh;max-width:none;max-height:none;margin:0;border:0;padding:0;background:transparent;overflow:hidden;pointer-events:none}
.festive-flight-x{position:absolute;left:0;top:0;width:min(96vw,940px);translate:-112% 0}
.festive-flight--go .festive-flight-x{animation:festive-fly-x 5s cubic-bezier(.42,.08,.6,.94) both}
.festive-flight--go .festive-flight-y{animation:festive-fly-y 5s cubic-bezier(.3,0,.5,1) both}
.festive-flight-team{position:relative;filter:drop-shadow(0 10px 20px rgba(15,36,64,.5))}
.festive-flight-art{display:block;width:100%;height:auto;aspect-ratio:960/446}
.festive-flight-stars{position:absolute;right:97%;top:52%;width:15%;height:auto;overflow:visible;fill:#e9c98b}
@keyframes festive-fly-x{from{translate:-112% 0}to{translate:104vw 0}}
@keyframes festive-fly-y{from{translate:0 58vh;rotate:5deg}50%{translate:0 14vh;rotate:-1deg}to{translate:0 0;rotate:3deg}}
.festive-star{transform-box:fill-box;transform-origin:center}
.festive-trail .festive-star{animation:festive-twinkle .7s ease-in-out 10 alternate both}
.festive-star--2{animation-delay:.2s !important}.festive-star--3{animation-delay:.45s !important}
@keyframes festive-twinkle{from{opacity:.25;scale:.6}to{opacity:1;scale:1.1}}
/* The message itself: a starrier bar, a larger greeting, a red and gold frame. */
.festive-dialog{width:min(600px,calc(100% - 32px));box-shadow:0 0 0 1px rgba(233,201,139,.55),0 24px 60px -12px rgba(15,36,64,.55)}
.festive-dialog::backdrop{background:radial-gradient(120% 90% at 50% 0%,rgba(29,67,111,.72),rgba(15,36,64,.86))}
.festive-dialog .msg-bar{position:relative;background-color:var(--navy-950);background-image:radial-gradient(circle,#fbf4e6 0 1.6px,transparent 1.8px),radial-gradient(circle,rgba(251,244,230,.7) 0 1.1px,transparent 1.3px);background-size:90px 64px,61px 47px;background-position:14px 10px,40px 30px;border-bottom:3px solid var(--festive-gold,#e9c98b)}
.festive-bar-stars{flex:1;display:flex;justify-content:flex-end;padding-right:var(--space-2)}
.festive-bar-stars svg{width:96px;height:38px;fill:var(--festive-gold,#e9c98b);overflow:visible}
.festive-dialog .festive-greet{font-size:clamp(30px,6vw,38px)}
.festive-dialog .festive-title{font-size:clamp(26px,5vw,34px)}
.festive-dialog .festive-hours{border:1px solid rgba(233,201,139,.9)}
@media (prefers-reduced-motion:no-preference){
.festive-dialog[open]{animation:festive-pop .5s cubic-bezier(.2,.9,.3,1.15) both}
@keyframes festive-pop{from{opacity:0;transform:translateY(22px) scale(.94)}to{opacity:1;transform:none}}
.festive-dialog[open] .festive-bar-stars .festive-star{animation:festive-twinkle .8s ease-in-out .5s 6 alternate both}
}
