/* ============================================================================
   MCCB seasonal decor — date-aware holiday themes
   ----------------------------------------------------------------------------
   Everything is scoped to html[data-holiday="<theme>"]. When the attribute is
   absent (no active holiday, or decor switched off) the site looks exactly as
   it did before: no layout shift, no leftover colours.

   Used by:
     .site-header   — garland, twinkling lights and hanging ornaments
     .stats-grid    — festive frame, floating motifs and a countdown ribbon
   ========================================================================== */

:root{
  --hol-1:#0f7a3d;
  --hol-2:#c8102e;
  --hol-3:#f6c453;
  --hol-deep:#07341d;
  --hol-soft:#eaf6ee;
  --hol-line:rgba(15,122,61,.22);
  --hol-halo:rgba(246,196,83,.20);
  --hol-glow:rgba(246,196,83,.45);
}

/* ---------- Theme palettes ---------- */
html[data-holiday="christmas"]{
  --hol-1:#0f7a3d; --hol-2:#c8102e; --hol-3:#f6c453;
  --hol-deep:#07341d; --hol-soft:#eaf6ee;
  --hol-line:rgba(15,122,61,.22); --hol-halo:rgba(246,196,83,.20);
  --hol-glow:rgba(246,196,83,.45);
}
html[data-holiday="three-kings"]{
  --hol-1:#5b2a86; --hol-2:#c9a227; --hol-3:#2a9d8f;
  --hol-deep:#2b1450; --hol-soft:#f3eefb;
  --hol-line:rgba(91,42,134,.22); --hol-halo:rgba(201,162,39,.22);
  --hol-glow:rgba(201,162,39,.45);
}
html[data-holiday="chinese-new-year"]{
  --hol-1:#c1121f; --hol-2:#f6c453; --hol-3:#ffd166;
  --hol-deep:#5a0008; --hol-soft:#fff4ef;
  --hol-line:rgba(193,18,31,.22); --hol-halo:rgba(246,196,83,.22);
  --hol-glow:rgba(246,196,83,.45);
}
html[data-holiday="valentines"]{
  --hol-1:#c9184a; --hol-2:#ff4d6d; --hol-3:#ffb3c1;
  --hol-deep:#5a0b22; --hol-soft:#fff0f3;
  --hol-line:rgba(201,24,74,.20); --hol-halo:rgba(255,77,109,.18);
  --hol-glow:rgba(255,77,109,.42);
}
html[data-holiday="holy-week"]{
  --hol-1:#5e4b8b; --hol-2:#8e7cc3; --hol-3:#d4af37;
  --hol-deep:#2f2450; --hol-soft:#f4f1fa;
  --hol-line:rgba(94,75,139,.22); --hol-halo:rgba(94,75,139,.16);
  --hol-glow:rgba(148,120,200,.42);
}
html[data-holiday="valor"]{
  --hol-1:#c8102e; --hol-2:#0038a8; --hol-3:#fcd116;
  --hol-deep:#4a0710; --hol-soft:#fff5f5;
  --hol-line:rgba(200,16,46,.20); --hol-halo:rgba(252,209,22,.20);
  --hol-glow:rgba(200,16,46,.40);
}
html[data-holiday="labor"]{
  --hol-1:#b5121b; --hol-2:#1d4e89; --hol-3:#f2b705;
  --hol-deep:#3d0a0e; --hol-soft:#fdf2f2;
  --hol-line:rgba(181,18,27,.20); --hol-halo:rgba(242,183,5,.20);
  --hol-glow:rgba(181,18,27,.40);
}
html[data-holiday="independence"]{
  --hol-1:#0038a8; --hol-2:#ce1126; --hol-3:#fcd116;
  --hol-deep:#0a1f4d; --hol-soft:#eef3ff;
  --hol-line:rgba(0,56,168,.20); --hol-halo:rgba(252,209,22,.22);
  --hol-glow:rgba(0,56,168,.40);
}
html[data-holiday="heroes"]{
  --hol-1:#8a6d1d; --hol-2:#b5121b; --hol-3:#f4d35e;
  --hol-deep:#3b2c00; --hol-soft:#fbf7e8;
  --hol-line:rgba(138,109,29,.24); --hol-halo:rgba(244,211,94,.24);
  --hol-glow:rgba(244,211,94,.45);
}
html[data-holiday="allsouls"]{
  --hol-1:#5d5a8c; --hol-2:#c9c4e6; --hol-3:#ffb703;
  --hol-deep:#2a2740; --hol-soft:#f5f4fb;
  --hol-line:rgba(93,90,140,.22); --hol-halo:rgba(255,183,3,.18);
  --hol-glow:rgba(201,196,230,.45);
}

/* ============================================================================
   HEADER
   ========================================================================== */
html[data-holiday] .site-header .header-inner{position:relative;z-index:2}

.hol-head{
  position:absolute;inset:0;z-index:1;pointer-events:none;
}
html:not([data-holiday]) .hol-head{display:none}

/* Thin ribbon along the bottom edge of the header. */
.hol-rule{
  position:absolute;left:0;right:0;bottom:0;height:4px;
  background:linear-gradient(90deg,
    var(--hol-1) 0%, var(--hol-3) 20%, var(--hol-2) 40%,
    var(--hol-3) 60%, var(--hol-1) 80%, var(--hol-2) 100%);
  box-shadow:0 1px 0 rgba(255,255,255,.22), 0 2px 8px rgba(0,0,0,.18);
}

/* Scalloped garland that hangs just below the header. */
.hol-swag{
  position:absolute;left:0;right:0;top:calc(100% - 6px);height:34px;
  transition:opacity .35s var(--ease), transform .35s var(--ease);
  filter:drop-shadow(0 7px 10px rgba(0,0,0,.28)) drop-shadow(0 0 14px var(--hol-glow));
}
.hol-swag::before{
  content:"";position:absolute;left:0;right:0;top:0;height:26px;
  background:
    radial-gradient(ellipse 30px 26px at 30px 0, var(--hol-1) 99%, transparent 100%) 0 0 / 60px 26px repeat-x,
    radial-gradient(ellipse 30px 27px at 30px 0, var(--hol-deep) 99%, transparent 100%) 0 3px / 60px 28px repeat-x;
}
.hol-swag::after{
  content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg, transparent, var(--hol-3) 18%, var(--hol-1) 50%, var(--hol-3) 82%, transparent);
  opacity:.75;
}
/* The garland retreats when the header turns solid so it never sits over
   page content while scrolling. */
.site-header.solid .hol-swag{opacity:0;transform:translateY(-8px)}

/* Twinkling bulbs sitting on the garland. */
.hol-light{
  position:absolute;width:6px;height:9px;border-radius:50% 50% 46% 46%;
  background:var(--c,#ffe08a);
  box-shadow:0 0 5px 1px var(--c,#ffe08a), 0 0 12px 4px rgba(255,244,190,.35);
  transform:translateX(-50%);
  animation:holTwinkle 2.8s ease-in-out infinite;
  animation-delay:var(--d,0s);
}
@keyframes holTwinkle{
  0%,100%{opacity:.55;filter:brightness(.85)}
  50%{opacity:1;filter:brightness(1.35)}
}

/* Ornaments hanging from the garland. Colours come from --c. */
.hol-bauble{
  position:absolute;width:var(--s,14px);height:var(--s,14px);
  background:var(--c,var(--hol-2));
  transform:translateX(-50%);
  border-radius:50%;
  box-shadow:inset -2px -3px 5px rgba(0,0,0,.28), inset 2px 2px 3px rgba(255,255,255,.45);
}
.hol-bauble::before{
  content:"";position:absolute;left:50%;top:-3px;width:5px;height:3px;
  transform:translateX(-50%);border-radius:2px 2px 0 0;
  background:linear-gradient(var(--hol-3),var(--hol-deep));
}
.hol-bauble::after{
  content:"";position:absolute;left:24%;top:16%;width:28%;height:28%;
  border-radius:50%;background:rgba(255,255,255,.7);filter:blur(.4px);
}

/* Theme-specific ornament silhouettes. */
html[data-holiday="three-kings"] .hol-bauble,
html[data-holiday="heroes"] .hol-bauble,
html[data-holiday="independence"] .hol-bauble{
  border-radius:0;box-shadow:none;
  clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
html[data-holiday="three-kings"] .hol-bauble::before,
html[data-holiday="three-kings"] .hol-bauble::after,
html[data-holiday="heroes"] .hol-bauble::before,
html[data-holiday="heroes"] .hol-bauble::after,
html[data-holiday="independence"] .hol-bauble::before,
html[data-holiday="independence"] .hol-bauble::after{display:none}

html[data-holiday="valentines"] .hol-bauble{
  border-radius:0;box-shadow:none;
  clip-path:polygon(50% 100%,3% 46%,3% 27%,16% 10%,35% 10%,50% 25%,65% 10%,84% 10%,97% 27%,97% 46%);
}
html[data-holiday="valentines"] .hol-bauble::before,
html[data-holiday="valentines"] .hol-bauble::after{display:none}

html[data-holiday="holy-week"] .hol-bauble{
  border-radius:0;box-shadow:none;
  clip-path:polygon(36% 0,64% 0,64% 34%,100% 34%,100% 62%,64% 62%,64% 100%,36% 100%,36% 62%,0 62%,0 34%,36% 34%);
}
html[data-holiday="holy-week"] .hol-bauble::before,
html[data-holiday="holy-week"] .hol-bauble::after{display:none}

html[data-holiday="valor"] .hol-bauble,
html[data-holiday="labor"] .hol-bauble{
  border-radius:0;box-shadow:none;
  clip-path:polygon(0 0,100% 0,100% 64%,50% 100%,0 64%);
}
html[data-holiday="valor"] .hol-bauble::before,
html[data-holiday="valor"] .hol-bauble::after,
html[data-holiday="labor"] .hol-bauble::before,
html[data-holiday="labor"] .hol-bauble::after{display:none}

html[data-holiday="allsouls"] .hol-bauble{
  box-shadow:0 0 8px 2px rgba(255,215,150,.55), inset -2px -3px 5px rgba(0,0,0,.18);
}
html[data-holiday="allsouls"] .hol-bauble::before{background:linear-gradient(#ffe6b0,var(--hol-3))}

/* Chinese lanterns: oval body with gold ribs. */
html[data-holiday="chinese-new-year"] .hol-bauble{
  width:calc(var(--s) * .84);
  border-radius:48% 48% 44% 44%;
  background:
    repeating-linear-gradient(90deg, transparent 0 3px, rgba(255,209,102,.6) 3px 4px),
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.5), transparent 36%),
    var(--c);
  box-shadow:0 0 9px rgba(255,209,102,.5), inset -2px -3px 5px rgba(0,0,0,.25);
}
html[data-holiday="chinese-new-year"] .hol-bauble::before{
  background:linear-gradient(#ffe8a3, #a4161a);
}

/* ============================================================================
   DISTINCT SILHOUETTES
   Each holiday gets its own header shape, not just a recolour: a scalloped
   garland, a straight valance, a draped cloth or a row of bunting flags.
   ========================================================================== */

/* Chinese New Year — straight red valance with a gold fringe. */
.hol-decor-valance .hol-swag{height:46px}
.hol-decor-valance .hol-swag::before{
  top:0;height:19px;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,.10) 0 1px, transparent 1px 54px),
    linear-gradient(180deg, #e5383b 0%, #c1121f 58%, #9d0208 100%);
  border-bottom:2px solid var(--hol-3);
  box-shadow:0 4px 10px rgba(0,0,0,.28);
}
.hol-decor-valance .hol-swag::after{
  top:21px;height:6px;opacity:.9;
  background:repeating-linear-gradient(90deg, var(--hol-3) 0 2px, transparent 2px 9px);
}
.hol-decor-valance .hol-light{display:none}

/* Holy Week / All Souls — soft draped cloth with a thin gold edge. */
.hol-decor-drape .hol-swag{height:54px}
.hol-decor-drape .hol-swag::before{
  top:0;height:34px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.18), transparent 38%),
    linear-gradient(180deg, var(--hol-1), var(--hol-deep));
  border-radius:0 0 50% 50% / 0 0 18px 18px;
  box-shadow:inset 0 -3px 0 rgba(212,175,55,.35), 0 6px 12px rgba(0,0,0,.22);
}
.hol-decor-drape .hol-swag::after{
  top:32px;height:2px;
  background:linear-gradient(90deg, transparent, var(--hol-3) 20%, var(--hol-3) 80%, transparent);
  opacity:.8;
}
.hol-decor-drape .hol-light{display:none}

/* Day of Valor / Labor Day / Independence Day — bunting flags. */
.hol-decor-bunting .hol-swag{height:46px}
.hol-decor-bunting .hol-swag::before{
  top:2px;height:2px;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.6), transparent);
  opacity:.8;
}
.hol-decor-bunting .hol-swag::after{display:none}
.hol-decor-bunting .hol-light,
.hol-decor-bunting .hol-bauble{display:none}

.hol-flag{
  position:absolute;top:4px;width:26px;height:24px;
  background:var(--c);
  clip-path:polygon(0 0, 100% 0, 50% 100%);
  transform:translateX(-50%);
  transform-origin:50% 0;
  filter:drop-shadow(0 4px 5px rgba(0,0,0,.28));
  animation:holFlagSway 5s ease-in-out infinite;
  animation-delay:var(--d,0s);
}
@keyframes holFlagSway{
  0%,100%{transform:translateX(-50%) rotate(-1.2deg)}
  50%{transform:translateX(-50%) rotate(1.2deg)}
}
.hol-flag.has-star::after{
  content:"";position:absolute;left:50%;top:6px;width:7px;height:7px;
  transform:translateX(-50%);background:#fff;
  clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  opacity:.95;
}

/* Artwork uploaded in Content Studio replaces the built-in header garland. */
.hol-head.has-art .hol-swag{display:none}
.hol-custom-head{
  position:absolute;left:0;right:0;top:calc(100% - 4px);
  width:100%;height:var(--hol-art-h,120px);
  object-fit:cover;object-position:center top;
  transform:translateY(var(--hol-art-y,0px));
  transition:opacity .35s var(--ease), transform .35s var(--ease);
  filter:drop-shadow(0 8px 14px rgba(0,0,0,.25));
  pointer-events:none;
}
.site-header.solid .hol-custom-head{
  opacity:0;
  transform:translateY(calc(var(--hol-art-y,0px) - 8px));
}

/* ============================================================================
   STATS GRID
   ========================================================================== */
html[data-holiday] .stats-grid{
  position:relative;overflow:hidden;
  border:1px solid var(--hol-line);
  box-shadow:var(--shadow-lg), 0 0 0 4px var(--hol-halo), 0 0 34px -8px var(--hol-glow);
  background:
    radial-gradient(130% 100% at 0% 0%, var(--hol-soft), transparent 58%),
    radial-gradient(130% 100% at 100% 100%, var(--hol-soft), transparent 58%),
    var(--surface);
}
/* Festive stripe along the top edge of the card. */
/* The grid is the positioning box for the uploaded stats artwork, the top
   stripe and the floating motifs. */
html[data-holiday] .stats-grid{position:relative}

html[data-holiday] .stats-grid::before{
  content:"";position:absolute;left:0;right:0;top:0;height:5px;z-index:3;
  background:linear-gradient(90deg,
    var(--hol-1), var(--hol-3) 22%, var(--hol-2) 48%, var(--hol-3) 72%, var(--hol-1));
  opacity:.95;
}
html[data-holiday] .stat{position:relative;z-index:2}

/* A different top edge for the holidays with a strong flag or stripe motif. */
html[data-holiday="chinese-new-year"] .stats-grid::before{
  height:4px;
  background:repeating-linear-gradient(90deg, var(--hol-1) 0 16px, var(--hol-3) 16px 19px);
}
html[data-holiday="valor"] .stats-grid::before,
html[data-holiday="independence"] .stats-grid::before{
  background:linear-gradient(90deg,
    var(--hol-1) 0 33.33%, var(--hol-3) 33.33% 66.66%, var(--hol-2) 66.66% 100%);
}
html[data-holiday="labor"] .stats-grid::before{
  background:repeating-linear-gradient(45deg, var(--hol-1) 0 11px, var(--hol-3) 11px 15px);
}

/* Artwork uploaded in Content Studio sits behind the numbers. */
.hol-custom-stats{
  position:absolute;inset:0;width:100%;height:100%;
  object-fit:cover;object-position:center;
  opacity:var(--hol-art-o,.45);
  border-radius:inherit;pointer-events:none;z-index:0;
}
html[data-holiday] .hol-mote{z-index:1}

/* Floating motifs inside the card (snow, hearts, stars...). */
.hol-mote{
  position:absolute;z-index:0;pointer-events:none;
  width:var(--s,6px);height:var(--s,6px);
  background:var(--c,var(--hol-2));
  border-radius:50%;
  opacity:.6;
  animation:holFloat var(--dur,10s) ease-in-out infinite;
  animation-delay:var(--d,0s);
}
@keyframes holFloat{
  0%,100%{transform:translate3d(0,0,0) rotate(0deg)}
  50%{transform:translate3d(5px,-11px,0) rotate(10deg)}
}
html[data-holiday="christmas"] .hol-mote{
  background:#fff;opacity:.7;box-shadow:0 0 6px rgba(255,255,255,.85);
  animation-name:holSnow;animation-timing-function:linear;
}
html[data-holiday="christmas"] .hol-mote.is-star{
  background:var(--hol-3);border-radius:0;box-shadow:0 0 8px rgba(246,196,83,.8);
  clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  animation-name:holFloat;
}
@keyframes holSnow{
  0%{transform:translate3d(0,-14px,0)}
  100%{transform:translate3d(10px,130px,0)}
}
html[data-holiday="valentines"] .hol-mote{
  border-radius:0;
  clip-path:polygon(50% 100%,3% 46%,3% 27%,16% 10%,35% 10%,50% 25%,65% 10%,84% 10%,97% 27%,97% 46%);
  opacity:.5;
}
html[data-holiday="three-kings"] .hol-mote,
html[data-holiday="heroes"] .hol-mote,
html[data-holiday="independence"] .hol-mote{
  border-radius:0;
  clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
  opacity:.55;
}
html[data-holiday="chinese-new-year"] .hol-mote{
  opacity:.6;box-shadow:0 0 7px rgba(246,196,83,.55);
}
html[data-holiday="holy-week"] .hol-mote{
  border-radius:60% 40% 55% 45%;
  opacity:.45;
}
html[data-holiday="valor"] .hol-mote,
html[data-holiday="labor"] .hol-mote{
  border-radius:0;
  clip-path:polygon(0 0,100% 0,100% 64%,50% 100%,0 64%);
  opacity:.5;
}
html[data-holiday="allsouls"] .hol-mote{
  background:radial-gradient(circle, #fff 0 35%, var(--hol-2) 70%, transparent 72%);
  opacity:.55;box-shadow:0 0 10px rgba(255,214,160,.55);
}

/* ---------- Countdown ribbon ---------- */
.hol-ribbon{
  position:absolute;top:-28px;left:50%;transform:translateX(-50%);
  z-index:6;pointer-events:none;
  display:inline-flex;align-items:center;gap:10px;
  max-width:calc(100% - 16px);
  padding:8px 18px 8px 9px;border-radius:999px;white-space:nowrap;
  background:linear-gradient(135deg,var(--hol-deep) 0%,var(--hol-1) 62%,var(--hol-2) 100%);
  border:1px solid rgba(255,255,255,.28);
  color:#fff;
  box-shadow:0 14px 30px rgba(7,21,40,.30), inset 0 1px 0 rgba(255,255,255,.30);
}
html:not([data-holiday]) .hol-ribbon{display:none}

.hol-ribbon-emblem{
  width:36px;height:36px;flex:0 0 36px;border-radius:50%;
  display:grid;place-items:center;
  background:linear-gradient(145deg,#fff,var(--hol-3));
  color:var(--hol-deep);
  box-shadow:0 4px 12px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.8);
}
.hol-ribbon-emblem svg{width:21px;height:21px}

.hol-ribbon-main{display:flex;align-items:baseline;gap:6px;min-width:0}
.hol-ribbon-main b{
  font-family:var(--font-display,"Fraunces",Georgia,serif);
  font-size:1.55rem;font-weight:600;line-height:1;letter-spacing:-.02em;
}
.hol-ribbon-main span{
  font-size:.78rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;
  color:rgba(255,255,255,.92);
}
.hol-ribbon-main.is-day span{
  font-size:1rem;letter-spacing:.02em;text-transform:none;font-weight:600;
}
.hol-ribbon-side{
  border-left:1px solid rgba(255,255,255,.26);
  padding-left:12px;font-size:.72rem;line-height:1.25;
  color:rgba(255,255,255,.82);white-space:normal;max-width:190px;
}

/* ============================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width:920px){
  .hol-swag{height:26px;top:calc(100% - 5px)}
  .hol-swag::before{
    height:20px;
    background:
      radial-gradient(ellipse 24px 20px at 24px 0, var(--hol-1) 99%, transparent 100%) 0 0 / 48px 20px repeat-x,
      radial-gradient(ellipse 24px 21px at 24px 0, var(--hol-deep) 99%, transparent 100%) 0 3px / 48px 21px repeat-x;
  }
  .hol-decor-valance .hol-swag{height:38px}
  .hol-decor-drape .hol-swag{height:46px}
  .hol-decor-bunting .hol-swag{height:38px}
  .hol-flag{width:20px;height:19px}
  .hol-ribbon-side{display:none}
}
@media (max-width:680px){
  .hol-ribbon{top:-22px;gap:8px;padding:6px 13px 6px 7px;border-radius:999px}
  .hol-ribbon-emblem{width:30px;height:30px;flex-basis:30px}
  .hol-ribbon-emblem svg{width:18px;height:18px}
  .hol-ribbon-main b{font-size:1.3rem}
  .hol-ribbon-main span{font-size:.66rem;letter-spacing:.04em}
  .hol-ribbon-main.is-day span{font-size:.86rem}
}

@media (prefers-reduced-motion:reduce){
  .hol-light,.hol-mote{animation:none!important}
  .hol-swag{transition:none}
}
