/* =====================================================================
   Seasonal look for the HOMEPAGE HERO
   ---------------------------------------------------------------------
   Switch it on/off in assets/js/config.js  ->  season: 'christmas' | 'cny' | 'auto' | ''
   The script in home.html turns that setting into <html data-season="...">.
   Every rule below only applies while that attribute is set, so with
   season: '' the hero looks exactly like the normal design.
   Preview without editing anything:  /?season=christmas  /?season=cny  /?season=none
   ===================================================================== */
.season-defs{position:absolute;width:0;height:0;overflow:hidden}
.season,.season-banner,.season-ring{display:none}

/* ---------- shared ---------- */
[data-season] .hero__in{position:relative;z-index:1;padding-top:84px}
[data-season] .hero__scroll{display:none}
[data-season] .cstl__orbits circle{display:none}
.season{position:absolute;inset:0;z-index:0;pointer-events:none;overflow:hidden}
.season__fx{position:absolute;inset:0;width:100%;height:100%;opacity:0;transition:opacity 1.4s}
.season__fx.is-on{opacity:1}
.season-banner{position:relative;align-items:center;gap:10px;width:fit-content;max-width:100%;margin:0 0 20px;padding:7px 18px 7px 9px;border-radius:999px;font-size:14px;font-weight:700;line-height:1.3;color:#fff}
.season-banner__ic{width:26px;height:26px;flex:none}
.season-banner .nw{white-space:nowrap}
.season-ring{position:absolute;pointer-events:none}

/* ---------- Christmas ---------- */
[data-season=christmas] .season--christmas,[data-season=christmas] .season-ring--christmas{display:block}
[data-season=christmas] .season-banner--christmas{display:flex}
[data-season=christmas] .cstl::before{background:radial-gradient(closest-side,rgba(255,221,170,.26),rgba(134,182,226,.08) 62%,transparent)}

.season-banner--christmas{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.24);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);box-shadow:0 12px 30px -14px rgba(0,0,0,.55)}
.season-banner--christmas::before{content:"";position:absolute;left:16px;width:min(46%,150px);top:-7px;height:15px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 16'%3E%3Cpath fill='%23fff' d='M2 10C2 6 6 4 11 5c3-4 11-4 15-1 4-3 12-4 17-1 5-2 13-2 17 1 5-2 13-2 17 1 5-2 13-2 17 1 5-2 14-1 18 2 4 0 7 1 6 3-4 1-10 0-14 1-3 0-4 3-7 3s-3-3-7-3H64c-3 0-4 4-7 4s-3-4-7-4H30c-4 0-5 2-8 2s-3-2-7-2H6c-3 0-4-1-4-2Z'/%3E%3C/svg%3E") no-repeat 0 0/100% 100%;filter:drop-shadow(0 1px 1px rgba(0,0,0,.18))}

.season-ring--christmas{left:19.4%;top:19.4%;width:61.2%;height:61.2%;filter:drop-shadow(0 14px 20px rgba(4,6,28,.45))}

/* fairy lights along the top edge (built by season.js) */
.xm-lights{position:absolute;left:0;right:0;top:0;height:90px}
.xm-lights svg{position:absolute;left:0;top:0;display:block;overflow:visible}
.xm-lg{will-change:opacity;animation:xmTwinkle 3.3s ease-in-out infinite}
.xm-lg--1{animation-delay:-1.1s}.xm-lg--2{animation-delay:-2.2s}
@keyframes xmTwinkle{0%,100%{opacity:1}50%{opacity:.38}}

/* large, faint snow crystals in the background */
.xm-flake{position:absolute;color:#fff;opacity:.08;will-change:transform;animation:xmSpin 70s linear infinite}
.xm-flake--1{width:240px;height:240px;left:-70px;top:22%}
.xm-flake--2{width:150px;height:150px;right:3%;bottom:16%;opacity:.06;animation-duration:90s;animation-direction:reverse}
.xm-flake--3{width:96px;height:96px;left:43%;top:66%;opacity:.07;animation-duration:55s}
@keyframes xmSpin{to{transform:rotate(360deg)}}

/* wreath hanging on a red ribbon */
.xm-hang{position:absolute;top:0;left:50%;width:104px;margin-left:-52px;padding-top:60px;display:none;transform-origin:50% 0;will-change:transform;animation:xmSwing 7s ease-in-out infinite}
.xm-hang::before{content:"";position:absolute;left:50%;top:0;width:7px;height:66px;margin-left:-3.5px;border-radius:0 0 2px 2px;background:linear-gradient(90deg,#8E0C20,#D8213B 50%,#8E0C20)}
.xm-hang svg{display:block;width:104px;height:104px;filter:drop-shadow(0 12px 16px rgba(0,0,0,.4))}
@keyframes xmSwing{0%,100%{transform:rotate(-2.2deg)}50%{transform:rotate(2.2deg)}}
@media (min-width:1200px) and (min-height:760px){.xm-hang{display:block}}

/* snow drift along the bottom edge (the white blends into the page below) */
.xm-drift{position:absolute;left:0;bottom:-1px;width:100%;height:84px;display:block}

/* ---------- Chinese New Year ---------- */
[data-season=cny] .season--cny,[data-season=cny] .season-ring--cny{display:block}
[data-season=cny] .season-banner--cny{display:flex}
[data-season=cny] .hero__glow{background:radial-gradient(closest-side,rgba(226,58,58,.36),transparent 70%)}
[data-season=cny] .cstl::before{background:radial-gradient(closest-side,rgba(242,197,92,.22),rgba(226,58,58,.08) 62%,transparent)}

.season-banner--cny{background:linear-gradient(90deg,#A80F26,#D42A2D);border:1px solid rgba(242,197,92,.6);color:#FFE7A8;box-shadow:0 12px 30px -14px rgba(110,0,10,.7)}
.season-ring--cny{left:28%;top:28%;width:44%;height:44%;border-radius:50%;border:2px solid rgba(242,197,92,.75);box-shadow:0 0 0 7px rgba(242,197,92,.1),0 0 0 9px rgba(242,197,92,.4),0 0 60px rgba(226,58,58,.35),inset 0 0 50px rgba(226,58,58,.3)}

.cny-lantern{position:absolute;top:0;width:72px;padding-top:var(--str,24px);transform-origin:50% 0;will-change:transform;animation:cnySwing 5.5s ease-in-out infinite}
.cny-lantern::before{content:"";position:absolute;left:50%;top:0;width:2px;margin-left:-1px;height:calc(var(--str,24px) + 4px);background:#E9B949}
.cny-lantern svg{display:block;width:100%;height:auto;aspect-ratio:72/132;margin-top:-6%;filter:drop-shadow(0 10px 22px rgba(255,70,50,.35))}
.cny-lantern--1{right:4.5%;--str:22px}
.cny-lantern--2{right:10.5%;width:56px;--str:58px;animation-delay:-1.8s}
.cny-lantern--3{right:15.5%;width:46px;--str:10px;animation-delay:-3.4s}
@keyframes cnySwing{0%,100%{transform:rotate(-3deg)}50%{transform:rotate(3deg)}}
.cny-plum{position:absolute;left:-24px;top:-8px;width:320px;height:150px;opacity:.85}

/* ---------- tablet / phone ---------- */
@media (max-width:1024px){
  [data-season] .hero__in{padding-top:72px}
  .xm-flake--3{display:none}
}
@media (min-width:721px) and (max-width:1199px){
  .xm-hang{display:block;left:auto;right:6%;margin-left:0;width:84px;padding-top:44px}
  .xm-hang::before{height:50px}
  .xm-hang svg{width:84px;height:84px}
}
@media (max-width:720px){
  [data-season] .hero__in{padding-top:58px}
  .season-banner{font-size:13px;padding:6px 14px 6px 7px;gap:8px;max-width:calc(100% - 72px);margin-bottom:16px}
  .season-banner__ic{width:22px;height:22px}
  .xm-hang{display:block;left:auto;right:10px;margin-left:0;width:60px;padding-top:30px}
  .xm-hang::before{height:34px;width:5px;margin-left:-2.5px}
  .xm-hang svg{width:60px;height:60px}
  .xm-flake--1{width:150px;height:150px;left:-50px;top:30%}
  .xm-flake--2{width:110px;height:110px;bottom:8%}
  .xm-drift{height:38px}
  .cny-lantern--1{right:12px;width:40px;--str:6px}
  .cny-lantern--2{right:56px;width:30px;--str:18px}
  .cny-lantern--3{display:none}
  .cny-plum{width:210px;height:98px;left:-46px;top:-12px;opacity:.5}
}

@media (prefers-reduced-motion:reduce){
  .xm-lg,.xm-flake,.xm-hang,.cny-lantern{animation:none}
  .season__fx{transition:none}
}
