/* Festive page transition between the homepage and /christmas-minis/
   Christmas Minis: a frosted window at night looking out at falling snow and out-of-focus Christmas lights.
   Back to the homepage: the logo on black. */
#pt{
  position:fixed;inset:0;z-index:2147483000;
  display:flex;align-items:center;justify-content:center;text-align:center;
  opacity:0;visibility:hidden;pointer-events:none;overflow:hidden;
  background:radial-gradient(125% 100% at 50% 0%,#17403f 0%,#0c2628 46%,#061214 100%);
  transition:opacity 1.1s ease,visibility 0s linear 1.1s;
}
html[data-pt="home"] #pt{background:#0a0a0a;}
html[data-pt="home"] #pt .pt-scene{display:none;}

#pt .pt-scene{position:absolute;inset:0;pointer-events:none;}

/* Out-of-focus Christmas lights */
#pt .pt-lights{position:absolute;inset:0;background-repeat:no-repeat;will-change:opacity;animation:pt-twinkle 3.4s ease-in-out infinite alternate;}
#pt .pt-la{background-image:
    radial-gradient(circle 22px at -2.0% 5.4%,rgba(236,72,72,0.95) 0,rgba(236,72,72,0.59) 38%,rgba(236,72,72,0.19) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 24px at 12.9% 9.5%,rgba(92,208,132,0.95) 0,rgba(92,208,132,0.59) 38%,rgba(92,208,132,0.19) 74%,rgba(92,208,132,0) 100%),
    radial-gradient(circle 24px at 27.7% 13.5%,rgba(120,172,255,0.95) 0,rgba(120,172,255,0.59) 38%,rgba(120,172,255,0.19) 74%,rgba(120,172,255,0) 100%),
    radial-gradient(circle 17px at 42.6% 14.3%,rgba(255,198,98,0.95) 0,rgba(255,198,98,0.59) 38%,rgba(255,198,98,0.19) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 21px at 57.4% 15.4%,rgba(255,198,98,0.95) 0,rgba(255,198,98,0.59) 38%,rgba(255,198,98,0.19) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 24px at 72.3% 12.6%,rgba(255,238,205,0.95) 0,rgba(255,238,205,0.59) 38%,rgba(255,238,205,0.19) 74%,rgba(255,238,205,0) 100%),
    radial-gradient(circle 15px at 87.1% 9.5%,rgba(236,72,72,0.95) 0,rgba(236,72,72,0.59) 38%,rgba(236,72,72,0.19) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 22px at 102.0% 4.8%,rgba(236,72,72,0.95) 0,rgba(236,72,72,0.59) 38%,rgba(236,72,72,0.19) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 18px at 58.5% 67.9%,rgba(236,72,72,0.95) 0,rgba(236,72,72,0.59) 38%,rgba(236,72,72,0.19) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 18px at 71.5% 76.8%,rgba(92,208,132,0.95) 0,rgba(92,208,132,0.59) 38%,rgba(92,208,132,0.19) 74%,rgba(92,208,132,0) 100%),
    radial-gradient(circle 15px at 84.5% 77.1%,rgba(255,198,98,0.95) 0,rgba(255,198,98,0.59) 38%,rgba(255,198,98,0.19) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 22px at 97.5% 67.6%,rgba(255,238,205,0.95) 0,rgba(255,238,205,0.59) 38%,rgba(255,238,205,0.19) 74%,rgba(255,238,205,0) 100%);}
#pt .pt-lb{animation-duration:4.2s;animation-delay:-1.7s;background-image:
    radial-gradient(circle 22px at 5.4% 7.6%,rgba(255,198,98,0.95) 0,rgba(255,198,98,0.59) 38%,rgba(255,198,98,0.19) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 23px at 20.3% 11.7%,rgba(255,238,205,0.95) 0,rgba(255,238,205,0.59) 38%,rgba(255,238,205,0.19) 74%,rgba(255,238,205,0) 100%),
    radial-gradient(circle 16px at 35.1% 14.1%,rgba(236,72,72,0.95) 0,rgba(236,72,72,0.59) 38%,rgba(236,72,72,0.19) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 15px at 50.0% 15.1%,rgba(236,72,72,0.95) 0,rgba(236,72,72,0.59) 38%,rgba(236,72,72,0.19) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 24px at 64.9% 14.4%,rgba(92,208,132,0.95) 0,rgba(92,208,132,0.59) 38%,rgba(92,208,132,0.19) 74%,rgba(92,208,132,0) 100%),
    radial-gradient(circle 23px at 79.7% 11.2%,rgba(120,172,255,0.95) 0,rgba(120,172,255,0.59) 38%,rgba(120,172,255,0.19) 74%,rgba(120,172,255,0) 100%),
    radial-gradient(circle 18px at 94.6% 7.8%,rgba(255,198,98,0.95) 0,rgba(255,198,98,0.59) 38%,rgba(255,198,98,0.19) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 17px at 52.0% 60.0%,rgba(255,198,98,0.95) 0,rgba(255,198,98,0.59) 38%,rgba(255,198,98,0.19) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 15px at 65.0% 73.4%,rgba(255,238,205,0.95) 0,rgba(255,238,205,0.59) 38%,rgba(255,238,205,0.19) 74%,rgba(255,238,205,0) 100%),
    radial-gradient(circle 22px at 78.0% 78.6%,rgba(120,172,255,0.95) 0,rgba(120,172,255,0.59) 38%,rgba(120,172,255,0.19) 74%,rgba(120,172,255,0) 100%),
    radial-gradient(circle 19px at 91.0% 73.8%,rgba(236,72,72,0.95) 0,rgba(236,72,72,0.59) 38%,rgba(236,72,72,0.19) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 15px at 104.0% 60.1%,rgba(92,208,132,0.95) 0,rgba(92,208,132,0.59) 38%,rgba(92,208,132,0.19) 74%,rgba(92,208,132,0) 100%);}
#pt .pt-lc{animation-duration:6s;animation-delay:-2.5s;background-image:
    radial-gradient(circle 47px at 8.0% 84.0%,rgba(255,198,98,0.5) 0,rgba(255,198,98,0.31) 38%,rgba(255,198,98,0.1) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 56px at 20.0% 94.0%,rgba(236,72,72,0.5) 0,rgba(236,72,72,0.31) 38%,rgba(236,72,72,0.1) 74%,rgba(236,72,72,0) 100%),
    radial-gradient(circle 47px at 92.0% 10.0%,rgba(92,208,132,0.5) 0,rgba(92,208,132,0.31) 38%,rgba(92,208,132,0.1) 74%,rgba(92,208,132,0) 100%),
    radial-gradient(circle 53px at 97.0% 34.0%,rgba(255,198,98,0.5) 0,rgba(255,198,98,0.31) 38%,rgba(255,198,98,0.1) 74%,rgba(255,198,98,0) 100%),
    radial-gradient(circle 56px at 4.0% 48.0%,rgba(255,238,205,0.5) 0,rgba(255,238,205,0.31) 38%,rgba(255,238,205,0.1) 74%,rgba(255,238,205,0) 100%);}
@keyframes pt-twinkle{from{opacity:.45}to{opacity:1}}

/* Falling snow: three depths. Outer layer sways, inner layer falls. */
#pt .pt-snow{position:absolute;top:0;bottom:0;left:-60px;right:-60px;will-change:transform;}
#pt .pt-snow::before{content:"";position:absolute;left:0;right:0;bottom:0;will-change:transform;}
#pt .pt-s1{animation:pt-sway-1 7s ease-in-out infinite alternate;}
#pt .pt-s1::before{top:-260px;background-size:260px 260px;animation:pt-fall-1 15s linear infinite;
  background-image:
    radial-gradient(1.9px 1.9px at 34px 8px,rgba(255,255,255,0.6) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.6px 1.6px at 107px 26px,rgba(255,255,255,0.84) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.4px 1.4px at 203px 214px,rgba(255,255,255,0.76) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.4px 1.4px at 138px 172px,rgba(255,255,255,0.68) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.4px 1.4px at 209px 60px,rgba(255,255,255,0.78) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.6px 1.6px at 5px 30px,rgba(255,255,255,0.72) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.7px 1.7px at 96px 229px,rgba(255,255,255,0.85) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.8px 1.8px at 67px 214px,rgba(255,255,255,0.62) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.3px 1.3px at 215px 108px,rgba(255,255,255,0.82) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.4px 1.4px at 155px 10px,rgba(255,255,255,0.7) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(2.0px 2.0px at 51px 21px,rgba(255,255,255,0.65) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.8px 1.8px at 132px 4px,rgba(255,255,255,0.68) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.4px 1.4px at 151px 197px,rgba(255,255,255,0.62) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.7px 1.7px at 124px 7px,rgba(255,255,255,0.69) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(2.0px 2.0px at 232px 65px,rgba(255,255,255,0.72) 45%,rgba(255,255,255,0) 60%),
    radial-gradient(1.4px 1.4px at 69px 197px,rgba(255,255,255,0.63) 45%,rgba(255,255,255,0) 60%);}
#pt .pt-s2{animation:pt-sway-2 5.5s ease-in-out infinite alternate;}
#pt .pt-s2::before{top:-340px;background-size:340px 340px;animation:pt-fall-2 10s linear infinite;
  background-image:
    radial-gradient(3.4px 3.4px at 116px 312px,rgba(255,255,255,0.61) 0,rgba(255,255,255,0.34) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.3px 3.3px at 322px 283px,rgba(255,255,255,0.79) 0,rgba(255,255,255,0.43) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.1px 3.1px at 247px 309px,rgba(255,255,255,0.57) 0,rgba(255,255,255,0.31) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.8px 3.8px at 55px 19px,rgba(255,255,255,0.62) 0,rgba(255,255,255,0.34) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.7px 3.7px at 200px 131px,rgba(255,255,255,0.78) 0,rgba(255,255,255,0.43) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.8px 3.8px at 251px 150px,rgba(255,255,255,0.78) 0,rgba(255,255,255,0.43) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.4px 3.4px at 35px 64px,rgba(255,255,255,0.69) 0,rgba(255,255,255,0.38) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.1px 3.1px at 315px 314px,rgba(255,255,255,0.61) 0,rgba(255,255,255,0.34) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.1px 3.1px at 104px 8px,rgba(255,255,255,0.66) 0,rgba(255,255,255,0.36) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(3.1px 3.1px at 127px 30px,rgba(255,255,255,0.63) 0,rgba(255,255,255,0.35) 40%,rgba(255,255,255,0) 100%);}
#pt .pt-s3{animation:pt-sway-3 4.5s ease-in-out infinite alternate;}
#pt .pt-s3::before{top:-520px;background-size:520px 520px;animation:pt-fall-3 6.5s linear infinite;
  background-image:
    radial-gradient(10.8px 10.8px at 134px 94px,rgba(255,255,255,0.58) 0,rgba(255,255,255,0.32) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(11.9px 11.9px at 338px 143px,rgba(255,255,255,0.59) 0,rgba(255,255,255,0.32) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(12.5px 12.5px at 486px 366px,rgba(255,255,255,0.59) 0,rgba(255,255,255,0.32) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(11.4px 11.4px at 21px 76px,rgba(255,255,255,0.55) 0,rgba(255,255,255,0.3) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(14.0px 14.0px at 326px 139px,rgba(255,255,255,0.43) 0,rgba(255,255,255,0.24) 40%,rgba(255,255,255,0) 100%),
    radial-gradient(13.5px 13.5px at 376px 45px,rgba(255,255,255,0.55) 0,rgba(255,255,255,0.3) 40%,rgba(255,255,255,0) 100%);}
@keyframes pt-fall-1{to{transform:translate3d(0,260px,0)}}
@keyframes pt-fall-2{to{transform:translate3d(0,340px,0)}}
@keyframes pt-fall-3{to{transform:translate3d(0,520px,0)}}
@keyframes pt-sway-1{from{transform:translate3d(-14px,0,0)}to{transform:translate3d(14px,0,0)}}
@keyframes pt-sway-2{from{transform:translate3d(-26px,0,0)}to{transform:translate3d(26px,0,0)}}
@keyframes pt-sway-3{from{transform:translate3d(-38px,0,0)}to{transform:translate3d(38px,0,0)}}

/* Window: soft frosted edges and a faint glass sheen (no lines) */
#pt .pt-frost{
  position:absolute;inset:0;pointer-events:none;
  box-shadow:inset 0 0 110px 26px rgba(214,232,240,.20);
  background:
    linear-gradient(115deg,transparent 38%,rgba(255,255,255,.05) 50%,transparent 62%),
    radial-gradient(ellipse at center,transparent 58%,rgba(220,236,242,.12) 100%);
}

/* Title and logo */
#pt .pt-title,#pt .pt-logo{
  display:none;position:relative;z-index:3;margin:0;
  opacity:0;transform:translateY(12px);
  transition:opacity .9s ease,transform .9s ease;
}
#pt .pt-title{
  padding:0 24px;font-family:Georgia,'Times New Roman',serif;font-style:italic;font-weight:400;
  font-size:clamp(2.4rem,8vw,5.4rem);line-height:1.1;letter-spacing:-.01em;color:#f5f0e3;
  text-shadow:0 2px 30px rgba(0,0,0,.5);
}
#pt .pt-title::after{content:"";display:block;width:64px;height:1px;background:#c49a4f;margin:28px auto 0;}
#pt .pt-logo{width:min(60vw,300px);height:auto;}
html[data-pt="xmas"] #pt .pt-title{display:block;}
html[data-pt="home"] #pt .pt-logo{display:block;}

/* Leaving the current page: overlay fades in, then the title or logo */
html.pt-on #pt{opacity:1;visibility:visible;pointer-events:all;transition:opacity .6s ease,visibility 0s;}
html.pt-on #pt .pt-title,html.pt-on #pt .pt-logo{opacity:1;transform:none;transition:opacity .9s ease .3s,transform .9s ease .3s;}

/* Arriving on the new page: overlay already covers it, then fades away */
html.pt-arriving #pt{opacity:1;visibility:visible;pointer-events:all;transition:none;}
html.pt-arriving #pt .pt-title,html.pt-arriving #pt .pt-logo{opacity:1;transform:none;transition:none;}

/* Opening /christmas-minis/ directly (a shared link): same scene, with the title fading in */
html.pt-direct #pt .pt-title{opacity:0;transform:translateY(12px);transition:none;}
html.pt-direct.pt-title-in #pt .pt-title{opacity:1;transform:none;transition:opacity .9s ease .3s,transform .9s ease .3s;}

/* Safety net: if the script never runs, the cover still goes away */
html.pt-arriving #pt{animation:pt-failsafe .01s linear 7s forwards;}
@keyframes pt-failsafe{to{opacity:0;visibility:hidden;pointer-events:none;}}

@media (prefers-reduced-motion:reduce){
  #pt{display:none !important;}
}
