/* RAN DESSERT website, Christmas layer for the v2 design ( webv2xmas ). Loaded after v2.css, only while views/_winter_flag.ejs says "on".
   Everything here is prefixed x2-. The layer is drawn by /v2/xmas/xmas.js; this sheet also switches the older Christmas visuals off
   ( the bulb strip, hanging ornaments, pill, drifts and button caps of /xmas.js and the CSS snow of winter.css ).
   Art, replaceable by file name: hero.webp / hero.jpg / hero-sm.webp / hero-sm.jpg, festival.webp / festival.jpg / festival-sm.webp.
   Motion uses transform and opacity only. Reduced motion: a still, festive page. */

/* ---------- the older Christmas visuals: off ---------- */
.wf-snow,#xm-snow,.xm-lights,.xm-baubles,.xm-pill-wrap,.xm-drift,.xm-cap,.xm-hat{display:none!important}

:root{--x2-ice:#dff4ff;--x2-ice2:#a9dcf5;--x2-green:#3fe6a4}

/* ---------- hero painting: the campus plaza with the Christmas tree ----------
   The painting keeps its own shape ( nothing is cut off the tree ): it starts under the bar and the notice, its top edge melts into the night sky
   and the animated aurora carries the painted one on above it. Phones get a crop around the tree and the student. */
.hero{--x2-top:136px;--x2-shift:clamp(0px,(100vw - 1440px) * .17,90px);background:#050917}   /* wider than 1440: the painting moves right a little, so the tree stays between the headline and the panel */
.hero-layers .l-far{inset:0}
.hero-layers .hero-bg{inset:auto;left:50%;top:var(--x2-top);width:max(100% + 60px,1500px);margin-left:min(-50% - 30px,-750px);aspect-ratio:1920/1072;opacity:1;animation:none;transform:translateX(var(--x2-shift));
  background:url(/v2/xmas/hero.jpg?v=1) 0 0/100% 100% no-repeat;background-image:image-set(url(/v2/xmas/hero.webp?v=1) type("image/webp"),url(/v2/xmas/hero.jpg?v=1) type("image/jpeg"));
  -webkit-mask-image:linear-gradient(180deg,transparent 0,#000 5.5%,#000 84%,transparent 100%);mask-image:linear-gradient(180deg,transparent 0,#000 5.5%,#000 84%,transparent 100%)}
.hero::before{background:linear-gradient(90deg,rgba(4,6,12,.9) 0,rgba(4,6,12,.68) 22%,rgba(4,6,12,.12) 43%,rgba(4,6,12,0) 60%,rgba(4,6,12,.4) 100%),linear-gradient(180deg,rgba(4,6,12,.5) 0,transparent 24%)}
.hero-fog{opacity:.2}
#sparks{display:none}
@media (max-width:1099px){
  .hero::before{background:linear-gradient(180deg,rgba(4,6,12,.4) 0,rgba(4,6,12,.22) 30%,rgba(4,6,12,.6) 70%,rgba(4,6,12,.94) 100%)}
}
@media (max-width:700px){
  .hero{--x2-top:250px}
  .hero-layers .hero-bg{width:max(100%,640px);margin-left:min(-50%,-320px);aspect-ratio:902/1072;background-image:url(/v2/xmas/hero-sm.jpg?v=1);
    background-image:image-set(url(/v2/xmas/hero-sm.webp?v=1) type("image/webp"),url(/v2/xmas/hero-sm.jpg?v=1) type("image/jpeg"))}
}

/* aurora ( canvas, drawn small and stretched: soft by itself ) and the lights of the painted tree */
.x2-aurora{position:absolute;left:50%;top:var(--x2-top);width:max(100% + 60px,1500px);margin-left:min(-50% - 30px,-750px);aspect-ratio:1920/911.2;transform:translate(var(--x2-shift),-29.41%);pointer-events:none;mix-blend-mode:screen;opacity:0;transition:opacity 2.4s ease}
@media (max-width:700px){.x2-aurora{width:max(100%,640px);margin-left:min(-50%,-320px);aspect-ratio:902/911.2}}
.x2-aurora.on{opacity:.92}
.x2-gl{position:absolute;width:var(--s,14px);height:var(--s,14px);margin:calc(var(--s,14px) / -2) 0 0 calc(var(--s,14px) / -2);pointer-events:none;border-radius:50%;
  background:radial-gradient(closest-side,#fff 0,var(--c,#ffe7a3) 26%,transparent 70%);opacity:.15;will-change:opacity,transform;animation:x2-tw var(--t,3.2s) ease-in-out var(--d,0s) infinite}
.x2-gl.star{--s:92px;opacity:.9;background:radial-gradient(closest-side,rgba(255,255,255,.95) 0,rgba(255,231,163,.5) 22%,transparent 70%);animation:x2-star 4.6s ease-in-out infinite}
.x2-gl.star::before,.x2-gl.star::after{content:"";position:absolute;left:50%;top:50%;width:170%;height:2px;margin:-1px 0 0 -85%;background:linear-gradient(90deg,transparent,rgba(255,244,210,.95),transparent)}
.x2-gl.star::after{transform:rotate(90deg)}
.x2-gl.warm{--c:#ffb45a;opacity:.2;background:radial-gradient(closest-side,rgba(255,196,110,.6),transparent 70%);animation-name:x2-warm}
.x2-gl.nose{--c:#ff3b4a;background:radial-gradient(closest-side,#fff 0,#ff3b4a 30%,transparent 72%);animation-name:x2-warm}
@keyframes x2-tw{0%,100%{opacity:.12;transform:scale(.6)}50%{opacity:1;transform:scale(1.15)}}
@keyframes x2-star{0%,100%{opacity:.6;transform:scale(.82) rotate(0deg)}50%{opacity:1;transform:scale(1.12) rotate(12deg)}}
@keyframes x2-warm{0%,100%{opacity:.25;transform:scale(.9)}50%{opacity:.95;transform:scale(1.1)}}

/* ---------- snow ( one canvas over the page ) ---------- */
.x2-snow{position:fixed;left:0;top:0;width:100%;height:100%;z-index:55;pointer-events:none}

/* ---------- garland of lights under the floating bar ---------- */
header.top .wrap{position:relative}
.x2-garland{position:absolute;left:0;top:calc(100% - 4px);width:100%;height:52px;z-index:-1;pointer-events:none}

/* ---------- the page-load sequence ( home, once a session ) ---------- */
.x2-intro{position:fixed;inset:0;z-index:90;pointer-events:none;overflow:hidden;contain:strict}
.x2-in-ice{position:absolute;inset:0;transform-origin:50% 50%;will-change:transform,opacity}
.x2-in-ice::before{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 50%,rgba(200,235,255,0) 34%,rgba(190,230,255,.2) 62%,rgba(215,240,255,.6) 100%)}
.x2-in-ice canvas{position:absolute;inset:0;width:100%;height:100%}
.x2-intro.melt .x2-in-ice{transform:scale(2.1);opacity:0;transition:transform 1.5s cubic-bezier(.5,0,.75,.4),opacity 1.5s ease-in}
.x2-in-veil{position:absolute;inset:0;background:rgba(214,238,255,.2);opacity:1;transition:opacity 1.3s ease .15s}
.x2-intro.go .x2-in-veil{opacity:0}
.x2-in-sweep{position:absolute;left:-60%;top:-30%;width:46%;height:160%;transform:translateX(0) rotate(18deg);opacity:0;mix-blend-mode:screen;
  background:linear-gradient(90deg,transparent,rgba(190,235,255,.22) 30%,rgba(255,255,255,.62) 50%,rgba(255,170,235,.2) 70%,transparent)}
.x2-intro.go .x2-in-sweep{opacity:1;transform:translateX(480%) rotate(18deg);transition:transform 1.25s cubic-bezier(.4,0,.2,1) .35s,opacity .3s ease .35s}

/* ---------- Christmas countdown lockup in the hero ---------- */
.x2-advent{display:flex;align-items:center;gap:16px;width:min(100%,470px);margin:0 0 20px;animation:v2up .9s var(--ease-out) .25s both}
.x2-adv-n{position:relative;flex:none;min-width:58px;padding:0 2px;font-family:var(--poster);font-size:60px;line-height:.92;letter-spacing:.01em;text-align:center;
  background:linear-gradient(180deg,#fff 34%,var(--x2-ice2));-webkit-background-clip:text;background-clip:text;color:transparent}
.x2-adv-n svg{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px 0 0 -22px;animation:x2-spin 18s linear infinite}
.x2-adv-n.ico{height:56px}
.x2-adv-t{flex:none;display:flex;flex-direction:column;gap:5px;padding-left:16px;border-left:1px solid var(--line2);font-family:var(--serif);text-transform:uppercase;line-height:1}
.x2-adv-t i{font-style:normal;font-size:12.5px;font-weight:700;letter-spacing:.34em;color:var(--cyan)}
.x2-adv-t b{font-size:21px;font-weight:700;letter-spacing:.14em;color:#fff}
.x2-adv-track{position:relative;flex:1 1 0;min-width:40px;height:2px;margin-right:12px;background:rgba(255,255,255,.2)}
.x2-adv-track i{position:absolute;inset:0;transform-origin:0 50%;transform:scaleX(var(--p,0));background:linear-gradient(90deg,var(--pink),var(--cyan))}
.x2-adv-track svg{position:absolute;right:-12px;top:50%;width:22px;height:22px;margin-top:-11px;filter:drop-shadow(0 0 6px rgba(242,196,90,.9));animation:x2-star 4.6s ease-in-out infinite}
@keyframes x2-spin{to{transform:rotate(360deg)}}
@media (max-width:560px){.x2-advent{gap:12px;margin-bottom:16px}.x2-adv-n{font-size:50px;min-width:48px}.x2-adv-t{padding-left:12px}.x2-adv-t i{font-size:11.5px;letter-spacing:.28em}.x2-adv-t b{font-size:18px;letter-spacing:.1em}}

/* ---------- Grand Opening panel: frosted glass, snow on the roof and on the number tiles ---------- */
body .hero #grand-opening{background:linear-gradient(180deg,rgba(10,18,36,.74),rgba(5,9,19,.9));border-color:rgba(190,230,255,.3);
  box-shadow:0 50px 110px -50px #000,0 0 0 1px rgba(0,0,0,.4),inset 0 1px 0 rgba(223,244,255,.28),inset 0 0 44px rgba(150,210,255,.07)}
.x2-frost{position:absolute;pointer-events:none;opacity:.8}
.x2-frost.tr{right:0;top:0}.x2-frost.bl{left:0;bottom:0}.x2-frost.br{right:0;bottom:0}.x2-frost.tl{left:0;top:0}
#grand-opening>*:not(.x2-frost):not(.x2-roof):not(.x2-glint){position:relative;z-index:1}
.x2-roof{position:absolute;left:8px;right:8px;bottom:calc(100% - 4px);height:19px;z-index:2;pointer-events:none;transform-origin:50% 100%;animation:x2-settle 1.6s var(--ease-out) 1.5s both}
.x2-roof svg,.x2-cap svg{display:block;width:100%;height:100%;overflow:visible}
body .go-count .u{position:relative}
.x2-cap{position:absolute;left:-1px;right:-1px;bottom:calc(100% - 2px);height:9px;pointer-events:none;transform-origin:50% 100%;animation:x2-settle 1.2s var(--ease-out) 2s both}
.x2-cap.puff{animation:x2-puff .6s var(--ease-out)}
.x2-fl{position:absolute;top:-3px;width:4px;height:4px;border-radius:50%;background:#fff;pointer-events:none;opacity:0;animation:x2-fall 1s ease-in forwards}
@keyframes x2-settle{from{opacity:0;transform:scaleY(0)}}
@keyframes x2-puff{0%{transform:scaleY(1)}35%{transform:scaleY(.55)}100%{transform:scaleY(1)}}
@keyframes x2-fall{0%{opacity:.95;transform:translate(0,0)}100%{opacity:0;transform:translate(var(--dx,4px),46px)}}
body .go-count b.v2-tick{animation:x2-flip .5s var(--ease-out)}
@keyframes x2-flip{0%{opacity:.2;transform:perspective(240px) rotateX(-78deg) translateY(-18%)}100%{opacity:1;transform:perspective(240px) rotateX(0) translateY(0)}}
.x2-glint{position:absolute;width:12px;height:12px;margin:-6px 0 0 -6px;pointer-events:none;opacity:0;animation:x2-glint 5s ease-in-out var(--d,0s) infinite;
  background:radial-gradient(closest-side,#fff,transparent 70%)}
.x2-glint::before,.x2-glint::after{content:"";position:absolute;left:50%;top:50%;width:22px;height:1px;margin:-.5px 0 0 -11px;background:linear-gradient(90deg,transparent,#fff,transparent)}
.x2-glint::after{transform:rotate(90deg)}
@keyframes x2-glint{0%,62%,100%{opacity:0;transform:scale(.4) rotate(0deg)}76%{opacity:1;transform:scale(1) rotate(45deg)}}
@media (min-width:1100px){body .hero #grand-opening{-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2)}}

/* snow that settles on cards when they scroll into view */
.x2-lid{position:absolute;left:6px;right:6px;bottom:calc(100% - 3px);height:13px;z-index:3;pointer-events:none;opacity:0;transform:scaleY(0);transform-origin:50% 100%;transition:transform 1.4s var(--ease-out),opacity .6s ease}
.x2-lid{display:flex}
.x2-lid svg{display:block;flex:1 1 0;min-width:0;height:100%}
.x2-lid svg:nth-child(even){transform:scaleX(-1)}
.schools>.x2-lid{left:0;right:0;height:15px}
.x2-lid.in{opacity:1;transform:none}

/* ---------- Winter Festival: a scene ---------- */
html.x2 body .wf-art img{opacity:0;aspect-ratio:2/1;max-height:86vh}
html.x2 body .wf-card{overflow:hidden}
.x2-scene{position:absolute;left:0;right:0;top:0;height:100%;overflow:hidden;pointer-events:none;background:#070b14}
.x2-sc-art{position:absolute;left:0;right:0;top:-7%;height:114%;will-change:transform;background:#070b14 50% 34%/cover no-repeat url(/v2/xmas/festival.jpg?v=1);
  background-image:image-set(url(/v2/xmas/festival.webp?v=1) type("image/webp"),url(/v2/xmas/festival.jpg?v=1) type("image/jpeg"))}
.x2-sc-light{position:absolute;right:-6%;top:-20%;width:70%;height:120%;mix-blend-mode:screen;opacity:.5;will-change:transform,opacity;
  background:radial-gradient(closest-side,rgba(255,196,120,.34),rgba(255,150,90,.1) 50%,transparent 72%);animation:x2-drift 13s ease-in-out infinite alternate}
.x2-sc-ray{position:absolute;left:30%;top:-30%;width:26%;height:170%;mix-blend-mode:screen;opacity:0;transform:rotate(24deg);will-change:transform,opacity;
  background:linear-gradient(90deg,transparent,rgba(170,225,255,.16) 40%,rgba(255,255,255,.2) 50%,rgba(255,170,235,.12) 62%,transparent);animation:x2-ray 15s ease-in-out 2s infinite}
@keyframes x2-drift{0%{opacity:.32;transform:translate(-5%,3%) scale(.94)}100%{opacity:.72;transform:translate(4%,-3%) scale(1.08)}}
@keyframes x2-ray{0%{opacity:0;transform:translateX(-160%) rotate(24deg)}18%{opacity:1}52%{opacity:.8}70%,100%{opacity:0;transform:translateX(330%) rotate(24deg)}}
.x2-sc-snow{position:absolute;inset:0;width:100%;height:100%}
.x2-bank{position:absolute;left:-2%;width:104%;bottom:-16px;pointer-events:none;will-change:transform}
.x2-bank svg{display:block;width:100%;height:100%}
.x2-sc-b1{height:clamp(46px,7.5vw,120px);opacity:.8}
.x2-sc-b2{height:clamp(34px,5.6vw,92px)}
.x2-partners{position:absolute;right:max(var(--pad),calc((100vw - var(--max)) / 2 + var(--pad)));top:clamp(14px,2.4vw,30px);z-index:3;display:flex;align-items:center;gap:16px;padding:9px 18px;
  background:rgba(4,8,16,.62);border:1px solid rgba(255,255,255,.2);border-radius:999px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.x2-partners img{display:block;height:34px;width:auto}
html.x2 body .wf-top::after{display:none}
html.x2 body .wf-top::before{background:linear-gradient(90deg,rgba(4,6,12,.72) 0,rgba(4,6,12,.3) 34%,transparent 56%)}
html.x2 body .wf-head h2{background:linear-gradient(180deg,#fff 36%,#bfeaff);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 6px 26px rgba(0,0,0,.7))}
html.x2 body .wf-lead{text-shadow:0 1px 12px rgba(3,6,14,.95),0 0 2px rgba(3,6,14,.9)}
@media (max-width:900px){
  html.x2 body .wf-art img{aspect-ratio:4/3;max-height:none}
  .x2-sc-art{background-position:50% 40%;background-image:url(/v2/xmas/festival.jpg?v=1);background-image:image-set(url(/v2/xmas/festival-sm.webp?v=1) type("image/webp"),url(/v2/xmas/festival.jpg?v=1) type("image/jpeg"))}
  .x2-partners{right:12px;top:12px;gap:12px;padding:7px 14px}.x2-partners img{height:28px}
}

/* ---------- closing scene above the footer ---------- */
.x2-eve{position:relative;height:clamp(250px,25vw,350px);overflow:hidden;background:linear-gradient(180deg,#020308 0,#071127 46%,#0c1c3c 100%);border-bottom:1px solid rgba(190,230,255,.16)}
.x2-eve svg.sky{position:absolute;inset:0;width:100%;height:100%}
.x2-eve .hill{position:absolute;left:-3%;width:106%;bottom:-28px;will-change:transform}
.x2-eve .h3{bottom:-2px}
.x2-eve .hill svg{display:block;width:100%;height:100%;overflow:visible}
.x2-eve .h1{height:calc(56% + 28px)}.x2-eve .h2{height:calc(44% + 28px)}.x2-eve .h3{height:22%}
.x2-eve .tw{animation:x2-tw2 var(--t,3s) ease-in-out var(--d,0s) infinite}
@keyframes x2-tw2{0%,100%{opacity:.25}50%{opacity:1}}
.x2-eve-txt{position:absolute;left:0;right:0;top:clamp(26px,3.4vw,50px);z-index:2;max-width:var(--max);margin:0 auto;padding:0 var(--pad)}
.x2-eve-txt b{display:block;font-family:var(--poster);font-weight:400;font-size:clamp(44px,7.4vw,112px);line-height:.94;letter-spacing:.01em;text-transform:uppercase;
  background:linear-gradient(180deg,#fff 30%,#a9dcf5);-webkit-background-clip:text;background-clip:text;color:transparent}
.x2-eve-txt span{display:flex;align-items:center;flex-wrap:wrap;gap:8px 14px;margin-top:12px;font-family:var(--serif);font-size:clamp(13px,1.1vw,15.5px);font-weight:700;letter-spacing:.3em;text-transform:uppercase;color:var(--fg2)}
.x2-eve-txt span::before{content:"";width:34px;height:2px;background:var(--pink)}
.x2-eve-txt em{font-style:normal;color:var(--reward)}

/* ---------- inner pages: frost on the page head ---------- */
.page-head{position:relative}
.page-head>.x2-frost{z-index:0;opacity:.75}

/* ---------- pauses ---------- */
html.x2-idle .x2-gl,html.x2-idle .x2-glint,html.x2-idle .x2-sc-light,html.x2-idle .x2-sc-ray,html.x2-idle .x2-eve .tw,html.x2-idle .x2-adv-n svg,html.x2-idle .x2-adv-track svg{animation-play-state:paused}
html.x2-nohero .hero .x2-gl{animation-play-state:paused}

@media (prefers-reduced-motion:reduce){
  .x2-gl,.x2-glint,.x2-sc-light,.x2-sc-ray,.x2-eve .tw,.x2-adv-n svg,.x2-adv-track svg,.x2-roof,.x2-cap,.x2-advent,body .go-count b.v2-tick{animation:none!important}
  .x2-gl{opacity:.7}.x2-glint{opacity:.8}.x2-sc-ray{display:none}
  .x2-aurora{transition:none}.x2-lid{transition:none}
}
