/* =========================================================
   匠心國際設計 — 季節主題層（season layer）
   由 assets/js/season.js 按日期／預覽參數喺 <html> 加 class：
     html.season-xmas     聖誕
     html.season-newyear  跨年／元旦
     html.season-cny      農曆新年（羊年）
   banner／掛飾由 season.js 注入；特效 canvas 由對應 js 注入。
   ========================================================= */
:root{ --season-bar-h:0px; }
html.season-xmas,html.season-newyear,html.season-cny{ --season-bar-h:66px; }
@media (max-width:640px){
  html.season-xmas,html.season-newyear,html.season-cny{ --season-bar-h:60px; }
}

/* 內容讓開橫額 */
body{padding-top:var(--season-bar-h)}
.nav{top:var(--season-bar-h)}

/* ---------------- 共用橫額骨架 ---------------- */
.season-bar{
  position:fixed;top:0;left:0;right:0;height:var(--season-bar-h);
  z-index:76;display:none;align-items:center;justify-content:center;gap:10px;
  padding:0 60px;text-align:center;text-decoration:none;overflow:hidden;
  transition:filter .3s ease;
}
html.season-xmas .season-bar,
html.season-newyear .season-bar,
html.season-cny .season-bar{ display:flex; }
.season-bar:hover{ filter:brightness(1.08); }
.season-bar__text{ position:relative;z-index:2; }
.season-bar__text b{ font-weight:700; }
.season-bar__text em{ font-style:normal; }
.season-bar__arrow{
  position:relative;z-index:2;font-weight:700;
  animation:season-arrow-pulse 1.6s ease-in-out infinite;
}
.season-bar__marker{ position:relative;z-index:2;flex:0 0 auto;width:18px;height:18px; }
@keyframes season-arrow-pulse{0%,100%{transform:translateX(0);opacity:.72}50%{transform:translateX(3px);opacity:1}}

/* 上下金線（共用） */
.season-bar__line{ position:absolute;left:0;right:0;height:1.5px;pointer-events:none; }

/* ---------------- 閃鑽星星（共用骨架；由頂一路跌到螢幕底） ---------------- */
.season-bar__sparks{ position:fixed;inset:0;pointer-events:none;z-index:1;overflow:visible; }
.season-bar__spark{
  position:absolute;top:-24px;transform-origin:50% 50%;
  width:14px;height:14px;
  animation:season-fall 6s linear infinite;
}
.season-bar__spark.s1{left:3%;width:22px;height:22px;animation-duration:9.6s;animation-delay:-1.1s}
.season-bar__spark.s2{left:11%;width:13px;height:13px;animation-duration:7.4s;animation-delay:-3.2s}
.season-bar__spark.s3{left:19%;width:15px;height:15px;animation-duration:10.4s;animation-delay:-5.6s}
.season-bar__spark.s4{left:28%;width:10px;height:10px;animation-duration:6.6s;animation-delay:-2.2s}
.season-bar__spark.s5{left:37%;width:12px;height:12px;animation-duration:8.4s;animation-delay:-4.5s}
.season-bar__spark.s6{left:63%;width:12px;height:12px;animation-duration:8s;animation-delay:-3.9s}
.season-bar__spark.s7{left:72%;width:15px;height:15px;animation-duration:9.8s;animation-delay:-6.1s}
.season-bar__spark.s8{left:81%;width:13px;height:13px;animation-duration:7.2s;animation-delay:-1.7s}
.season-bar__spark.s9{left:90%;width:17px;height:17px;animation-duration:9.2s;animation-delay:-5s}
.season-bar__spark.s10{left:96%;width:22px;height:22px;animation-duration:10.8s;animation-delay:-2.9s}
@keyframes season-fall{
  0%{transform:translateY(-24px) rotate(0deg) scale(.6);opacity:0}
  8%{opacity:1}
  88%{opacity:1}
  100%{transform:translateY(101vh) rotate(240deg) scale(.9);opacity:0}
}
@keyframes season-gold-shimmer{to{background-position:-220% center}}

/* =========================================================
   🎄 聖誕
   ========================================================= */
html.season-xmas .season-bar{
  background:
    radial-gradient(120% 220% at 0% 50%,rgba(255,225,150,.14),transparent 42%),
    radial-gradient(120% 220% at 100% 50%,rgba(255,225,150,.14),transparent 42%),
    linear-gradient(90deg,#5e1410 0%,#7d1e16 50%,#5e1410 100%);
  color:#f8f0df;font-size:13.5px;letter-spacing:.07em;
  box-shadow:
    inset 0 1px 0 rgba(255,225,150,.65),
    inset 0 -1px 0 rgba(255,225,150,.65),
    inset 0 0 26px rgba(120,20,14,.75),
    0 2px 16px -4px rgba(0,0,0,.5);
}
html.season-xmas .season-bar__line{background:linear-gradient(90deg,transparent,#f0cf6e 18%,#fff4c6 50%,#f0cf6e 82%,transparent)}
html.season-xmas .season-bar__line--t{top:0}
html.season-xmas .season-bar__line--b{bottom:0}
html.season-xmas .season-bar__text{
  background:linear-gradient(100deg,#c99a2e 0%,#fff6cf 18%,#e6c15a 34%,#fffdf0 50%,#e6c15a 66%,#fff6cf 82%,#c99a2e 100%);
  background-size:220% auto;-webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
  animation:season-gold-shimmer 3.4s linear infinite;
}
html.season-xmas .season-bar__text b{
  -webkit-text-fill-color:#fff3c4;color:#fff3c4;
  text-shadow:0 0 9px rgba(255,215,120,.95),0 0 2px rgba(255,248,210,1);
}
html.season-xmas .season-bar__arrow{color:#ffe79a;filter:drop-shadow(0 0 6px rgba(255,222,140,.8))}
html.season-xmas .season-bar__marker{color:#ffe79a}
html.season-xmas .season-bar__spark{color:#ffe89a;filter:drop-shadow(0 0 6px rgba(255,225,150,.95))}
html.season-xmas .season-bar__spark--big{color:#fff2c0}

/* 🎄 聖誕配件：Logo 聖誕帽、暖色 hover、頁尾花環 */
html.season-xmas .nav__brand,html.season-xmas .footer__brand{position:relative}
html.season-xmas .nav__brand::after,html.season-xmas .footer__brand::after{
  content:"";position:absolute;width:28px;height:28px;z-index:2;
  transform:rotate(-14deg);transform-origin:50% 92%;pointer-events:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M4 25 C4 13 10 5 18 5 C24 5 27 9 26 14 C28 13 30 14 30 14 C28 22 22 26 16 26 Z' fill='%23c0392b'/%3E%3Cpath d='M3 24 q13 6 27 0 l0 3 q-14 5 -27 0 z' fill='%23ffffff'/%3E%3Ccircle cx='30' cy='13' r='3.6' fill='%23ffffff'/%3E%3C/svg%3E") no-repeat center/contain;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.28));
}
html.season-xmas .nav__brand::after{left:18px;top:-14px}
html.season-xmas .footer__brand::after{left:16px;top:calc(50% - 33px)}
html.season-xmas .post__crumb a:hover,html.season-xmas .nav__links a:hover,html.season-xmas .footer a:hover{color:#a52a24}
html.season-xmas .season-wreath{display:flex;justify-content:center;padding:34px 0 6px}
html.season-xmas .season-wreath img{
  width:212px;height:auto;transform-origin:50% 5%;
  filter:drop-shadow(0 6px 10px rgba(0,0,0,.12));
  animation:season-wreath-sway 7s ease-in-out infinite;
}
@keyframes season-wreath-sway{0%,100%{transform:rotate(-2.4deg)}50%{transform:rotate(2.4deg)}}
@media (max-width:640px){html.season-xmas .season-wreath img{width:150px}}

/* =========================================================
   🎆 跨年／元旦（深底 · 閃令令金）
   ========================================================= */
html.season-newyear .season-bar{
  background:
    radial-gradient(120% 240% at 0% 50%,rgba(255,208,110,.28),transparent 46%),
    radial-gradient(120% 240% at 100% 50%,rgba(255,208,110,.28),transparent 46%),
    linear-gradient(90deg,#2b1005 0%,#5c2a0d 48%,#2b1005 100%);
  color:#ffe9a8;font-size:13.5px;letter-spacing:.09em;
  box-shadow:
    inset 0 1px 0 rgba(255,226,150,.85),
    inset 0 -1px 0 rgba(255,226,150,.85),
    inset 0 0 32px rgba(40,15,3,.85),
    0 2px 16px -4px rgba(0,0,0,.55);
}
/* 一道金屬反光掃過全條 banner */
html.season-newyear .season-bar::after{
  content:"";position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(100deg,transparent 32%,rgba(255,245,205,.28) 45%,rgba(255,255,255,.72) 50%,rgba(255,245,205,.28) 55%,transparent 68%);
  background-size:250% 100%;
  animation:season-sweep 3.4s ease-in-out infinite;
  mix-blend-mode:screen;
}
@keyframes season-sweep{0%{background-position:200% 0}100%{background-position:-100% 0}}
html.season-newyear .season-bar__line{background:linear-gradient(90deg,transparent,#f0cf6e 18%,#fff4c6 50%,#f0cf6e 82%,transparent)}
html.season-newyear .season-bar__line--t{top:0}
html.season-newyear .season-bar__line--b{bottom:0}
html.season-newyear .season-bar__text{
  background:linear-gradient(100deg,#7a4d08 0%,#e9c86a 16%,#fff8dc 30%,#d4a017 44%,#fff6d0 52%,#d4a017 66%,#e9c86a 84%,#7a4d08 100%);
  background-size:220% auto;-webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
  animation:season-gold-shimmer 2.6s linear infinite;
  filter:drop-shadow(0 1px 1px rgba(60,25,0,.55)) drop-shadow(0 0 8px rgba(255,215,120,.35));
}
html.season-newyear .season-bar__bigyear{
  font-weight:800;font-size:1.8em;letter-spacing:.03em;
  background:linear-gradient(100deg,#8a5a10 0%,#ffe9a0 22%,#fffdf0 40%,#f0c24f 52%,#fff6d0 62%,#e0b64a 78%,#8a5a10 100%);
  background-size:220% auto;-webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
  animation:season-gold-shimmer 2.6s linear infinite;
  filter:drop-shadow(0 1px 1px rgba(60,25,0,.6)) drop-shadow(0 0 12px rgba(255,220,130,.75));
  margin-right:.12em;
}
html.season-newyear .season-bar__arrow{color:#ffe79a;filter:drop-shadow(0 0 6px rgba(255,220,140,.8))}
html.season-newyear .season-bar__marker{color:#ffdf8f;filter:drop-shadow(0 0 5px rgba(255,220,140,.75))}
html.season-newyear .season-bar__spark{color:#fff2c0;filter:drop-shadow(0 0 7px rgba(255,225,150,.95))}
html.season-newyear .season-bar__spark--big{color:#fff8dc}
html.season-newyear .post__crumb a:hover,html.season-newyear .nav__links a:hover,html.season-newyear .footer a:hover{color:#b8892f}

/* 🎆 跨年配件：Logo 旁斜放香檳 + 開瓶噴泡 */
html.season-newyear .nav__brand,html.season-newyear .footer__brand{position:relative}
html.season-newyear .nav__brand::after,html.season-newyear .footer__brand::after{
  content:"";position:absolute;width:44px;height:44px;z-index:2;pointer-events:none;
  background:url("../img/newyear/champagne.svg") no-repeat center/contain;
  filter:drop-shadow(0 2px 3px rgba(0,0,0,.28));
  transform-origin:50% 85%;
  animation:season-champagne-bob 3.6s ease-in-out infinite;
}
html.season-newyear .nav__brand::after{left:20px;top:-20px}
html.season-newyear .footer__brand::after{left:18px;top:calc(50% - 42px)}
@keyframes season-champagne-bob{
  0%,100%{transform:translateY(0) rotate(-5deg)}
  50%{transform:translateY(-2px) rotate(3deg)}
}

/* 🎆 跨年頁尾：派對道具組合（置中，取代花環） */
html.season-newyear .season-party{display:flex;justify-content:center;padding:34px 0 6px}
html.season-newyear .season-party img{
  width:320px;max-width:86vw;height:auto;transform-origin:50% 82%;
  animation:season-party-bob 3.6s ease-in-out infinite;
}
@keyframes season-party-bob{
  0%,100%{transform:translateY(0) rotate(-1.5deg)}
  50%{transform:translateY(-4px) rotate(1.5deg)}
}
@media (max-width:640px){html.season-newyear .season-party img{width:230px}}

/* =========================================================
   🧧 農曆新年（羊年）
   ========================================================= */
html.season-cny .season-bar{
  background:
    radial-gradient(120% 220% at 0% 50%,rgba(255,220,130,.18),transparent 44%),
    radial-gradient(120% 220% at 100% 50%,rgba(255,220,130,.18),transparent 44%),
    linear-gradient(90deg,#7c0a0a 0%,#a81212 50%,#7c0a0a 100%);
  color:#ffeccf;font-size:13.5px;letter-spacing:.09em;
  box-shadow:
    inset 0 1px 0 rgba(255,220,130,.75),
    inset 0 -1px 0 rgba(255,220,130,.75),
    inset 0 0 30px rgba(90,6,6,.8),
    0 2px 16px -4px rgba(0,0,0,.55);
}
html.season-cny .season-bar__line{background:linear-gradient(90deg,transparent,#f0cf6e 18%,#fff4c6 50%,#f0cf6e 82%,transparent)}
html.season-cny .season-bar__line--t{top:0}
html.season-cny .season-bar__line--b{bottom:0}
html.season-cny .season-bar__text{
  background:linear-gradient(100deg,#d9a52e 0%,#fff3c8 18%,#f0c24f 34%,#fffdf0 50%,#f0c24f 66%,#fff3c8 82%,#d9a52e 100%);
  background-size:220% auto;-webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
  animation:season-gold-shimmer 3.4s linear infinite;
}
html.season-cny .season-bar__text b{
  -webkit-text-fill-color:#fff6d2;color:#fff6d2;
  text-shadow:0 0 10px rgba(255,210,110,.95),0 0 2px rgba(255,250,220,1);
}
html.season-cny .season-bar__arrow{color:#ffdd8a;filter:drop-shadow(0 0 6px rgba(255,205,110,.9))}
html.season-cny .season-bar__marker{color:#ffdd8a}
html.season-cny .season-bar__spark{color:#ffe08a;filter:drop-shadow(0 0 6px rgba(255,200,110,.9))}
html.season-cny .season-bar__spark--big{color:#fff0b8}
html.season-cny .post__crumb a:hover,html.season-cny .nav__links a:hover,html.season-cny .footer a:hover{color:#a81212}

/* 🧧 新年掛飾：左右兩串炮仗（放低、唔遮 logo／報價掣、底部爆火花） */
.season-crackers{position:fixed;top:0;left:0;right:0;z-index:75;pointer-events:none;display:none}
html.season-cny .season-crackers{display:block}
.season-crackers__l,.season-crackers__r{
  position:absolute;top:calc(var(--season-bar-h) + 96px);width:72px;
  transform-origin:50% 0;
  filter:drop-shadow(0 8px 12px rgba(0,0,0,.3));
  animation:season-crackers-sway 5.2s ease-in-out infinite;
}
.season-crackers__l{left:10px}
.season-crackers__r{right:10px;animation-delay:1.3s}
.season-crackers svg{width:100%;height:auto;display:block}
@keyframes season-crackers-sway{0%,100%{transform:rotate(-3.2deg)}50%{transform:rotate(3.2deg)}}
@media (max-width:640px){
  .season-crackers__l,.season-crackers__r{width:50px;top:calc(var(--season-bar-h) + 72px)}
  .season-crackers__l{left:3px}
  .season-crackers__r{right:3px}
}

/* 🧧 福字：大有細，由橫額底部跌到螢幕底 */
.season-fu-layer{position:fixed;inset:0;z-index:74;pointer-events:none;overflow:hidden}
.season-fu{position:absolute;top:calc(-1 * var(--season-bar-h) - 90px);display:block;animation-name:season-fu-fall;animation-timing-function:linear;animation-iteration-count:infinite;will-change:transform}
.season-fu svg{width:100%;height:100%;display:block;filter:drop-shadow(0 2px 3px rgba(120,10,10,.35))}
@keyframes season-fu-fall{
  0%{transform:translateY(0) rotate(-14deg) scale(.85);opacity:0}
  7%{opacity:1}
  90%{opacity:1}
  100%{transform:translateY(calc(100vh + var(--season-bar-h) + 150px)) rotate(200deg) scale(1);opacity:0}
}

/* 🧧 卡通羊：banner 兩邊各一隻，喺 banner 度跳 */
.season-bar__sheep{
  position:relative;z-index:2;flex:0 0 auto;width:42px;height:42px;
  display:inline-block;transform-origin:50% 92%;
  animation:season-bar-sheep-hop 1s ease-in-out infinite;
}
.season-bar__sheep svg{width:100%;height:100%;display:block}
.season-bar__sheep--r{animation-delay:.5s}
@keyframes season-bar-sheep-hop{
  0%,100%{transform:translateY(3px) rotate(-5deg)}
  50%{transform:translateY(-7px) rotate(5deg)}
}
@media (max-width:640px){
  .season-bar__sheep{width:30px;height:30px}
  .season-bar__sheep--l{display:none}
}

/* 特效 canvas 共用 */
.season-fx{position:fixed;inset:0;width:100%;height:100%;z-index:74;pointer-events:none}

@media (max-width:640px){
  /* 注意：要同季節規則同等 specificity（html.season-* .season-bar）先蓋得過 13.5px */
  html.season-xmas .season-bar,
  html.season-newyear .season-bar,
  html.season-cny .season-bar{font-size:12px;letter-spacing:.02em;padding:0 30px;gap:6px}
  .season-bar__spark.s1,.season-bar__spark.s10{width:18px;height:18px;margin-top:-9px}
  .season-bar__spark.s2,.season-bar__spark.s5,.season-bar__spark.s6,.season-bar__spark.s8{display:none}
  html.season-newyear .season-bar__bigyear{font-size:1.5em}
}
@media (max-width:380px){
  html.season-xmas .season-bar,
  html.season-newyear .season-bar,
  html.season-cny .season-bar{font-size:11px;padding:0 22px;gap:5px}
  .season-bar__marker{width:15px;height:15px}
  html.season-newyear .season-bar__bigyear{font-size:1.35em}
}
@media (prefers-reduced-motion:reduce){
  .season-bar__text,.season-bar__arrow,.season-crackers__l,.season-crackers__r,
  .season-bar__sheep{animation:none}
  .season-bar__spark{animation:none;top:40%;opacity:.85}
  .season-fu{animation:none;display:none}
}
