/* RezSoulution intro / splash */
:root{
  --night:#030915;
  --deep:#071833;
  --blue:#1e8bff;
  --ice:#cfe8ff;
  --silver:#c9d3de;
  --white:#f5f7fa;
  --yellow:#ffc400;
  --red:#e8202a;
  --black:#0a0a0a;
  /* logo geometry: wheel center sits at 52.07% x / 29.95% y of the logo; disc radius 8.43% of logo width */
  --L:min(88vw, 760px, calc((96svh - 210px) / .6864));
  --top:max(4svh, calc((100svh - var(--L) * .6864 - 210px) / 2));
  --wheelY:calc(var(--top) + var(--L) * .2056);
  --lake:74svh;
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%;background:var(--night);overflow:hidden}
body{font-family:"Saira",system-ui,sans-serif;color:var(--white);-webkit-font-smoothing:antialiased}

/* ---------- Scene ---------- */
#sky{position:fixed;inset:0;width:100%;height:100%;display:block}
.aurora{position:fixed;inset:-20% -10% auto;height:70%;pointer-events:none;opacity:0;
  background:
    radial-gradient(40% 50% at 30% 40%, rgba(30,139,255,.22), transparent 70%),
    radial-gradient(35% 45% at 70% 30%, rgba(80,200,255,.14), transparent 70%);
  filter:blur(30px);transition:opacity 3s ease}
.s1 .aurora{opacity:1;animation:drift 18s ease-in-out infinite alternate}
@keyframes drift{to{transform:translateX(6%) translateY(3%) scale(1.08)}}

.land{position:fixed;left:0;right:0;top:calc(var(--lake) - 22svh);height:22svh;opacity:0;transform:translateY(20px);
  transition:opacity 1.6s ease, transform 1.6s ease}
.land svg{width:100%;height:100%;display:block}
.s1 .land{opacity:1;transform:none}
.lake{position:fixed;left:0;right:0;top:var(--lake);bottom:0;opacity:0;transition:opacity 1.6s ease;
  background:linear-gradient(to bottom, rgba(30,139,255,.18), rgba(3,9,21,0) 35%), var(--night)}
.lake::before{content:"";position:absolute;inset:0;opacity:.35;
  background:repeating-linear-gradient(to bottom, rgba(207,232,255,.07) 0 1px, transparent 1px 9px);
  animation:shimmer 6s linear infinite}
@keyframes shimmer{to{background-position:0 90px}}
.s1 .lake{opacity:1}
.shoreline{position:fixed;left:0;right:0;top:var(--lake);height:2px;transform:scaleX(0);
  background:linear-gradient(90deg, transparent, var(--blue) 30%, #fff 50%, var(--blue) 70%, transparent);
  box-shadow:0 0 18px 2px rgba(30,139,255,.8)}
.s3 .shoreline{animation:shore 1.4s cubic-bezier(.2,.8,.2,1) forwards}
@keyframes shore{0%{transform:scaleX(0);opacity:1}60%{transform:scaleX(1);opacity:1}100%{transform:scaleX(1);opacity:.35}}

/* ---------- Medicine wheel ---------- */
.wheel{position:fixed;left:50%;top:var(--wheelY);width:calc(var(--L) * .2007);aspect-ratio:1;
  transform:translate(-50%,-50%);z-index:3;pointer-events:none}
.wheel svg{width:100%;height:100%;overflow:visible}
.q{transform-box:fill-box;opacity:0}
.q1{--tx:-140px;--ty:-140px}.q2{--tx:140px;--ty:-140px}.q3{--tx:140px;--ty:140px}.q4{--tx:-140px;--ty:140px}
.s1 .q{animation:qin 1.1s cubic-bezier(.16,1,.3,1) forwards}
.s1 .q2{animation-delay:.12s}.s1 .q3{animation-delay:.24s}.s1 .q4{animation-delay:.36s}
@keyframes qin{from{opacity:0;transform:translate(var(--tx),var(--ty)) rotate(-90deg) scale(.4)}to{opacity:1;transform:none}}
.ring{fill:none;stroke:var(--blue);stroke-width:5;stroke-dasharray:600;stroke-dashoffset:600;filter:url(#glow)}
.ring2{stroke:var(--silver);stroke-width:2}
.s1 .ring{animation:draw 1.4s .5s ease forwards}
.s1 .ring2{animation-delay:.75s}
@keyframes draw{to{stroke-dashoffset:0}}
.points{opacity:0;transform-origin:center}
.s1 .points{animation:pts .9s 1.1s cubic-bezier(.16,1,.3,1) forwards}
@keyframes pts{from{opacity:0;transform:scaleX(.2)}to{opacity:1;transform:none}}
.wheel-spin{transform-origin:center;transform-box:fill-box}
.s1 .wheel-spin{animation:spin 2.2s cubic-bezier(.16,1,.3,1) forwards}
@keyframes spin{from{transform:rotate(-180deg)}to{transform:none}}
.s4 .wheel{animation:wheelOut 1.2s .5s ease forwards}
@keyframes wheelOut{to{opacity:0}}

/* ---------- Feather ---------- */
.feather{position:fixed;left:50%;top:0;width:clamp(26px,3.2vw,40px);z-index:4;pointer-events:none;opacity:0;
  transform:translate(-50%, -30svh)}
.feather svg{width:100%;display:block;filter:drop-shadow(0 0 8px rgba(30,139,255,.6))}
.s2 .feather{animation:fall 2.1s cubic-bezier(.45,.05,.4,1) forwards}
@keyframes fall{
  0%{opacity:0;transform:translate(-50%,-30svh) rotate(-18deg)}
  10%{opacity:1}
  30%{transform:translate(calc(-50% + 34px),18svh) rotate(16deg)}
  55%{transform:translate(calc(-50% - 26px),42svh) rotate(-12deg)}
  80%{transform:translate(calc(-50% + 12px),62svh) rotate(6deg)}
  100%{opacity:1;transform:translate(-50%,calc(var(--lake) - 100%)) rotate(0)}
}
.s4 .feather{transition:opacity 1s ease;opacity:0!important}

/* ---------- Ripples ---------- */
.ripple{position:fixed;left:50%;top:var(--lake);width:60px;height:60px;border-radius:50%;
  border:2px solid rgba(207,232,255,.8);transform:translate(-50%,-50%) scale(0,0);opacity:0;z-index:2;
  box-shadow:0 0 14px rgba(30,139,255,.7)}
.s3 .ripple{animation:rip 2.4s cubic-bezier(.1,.7,.3,1) forwards}
.s3 .ripple:nth-of-type(2){animation-delay:.25s}
.s3 .ripple:nth-of-type(3){animation-delay:.5s}
@keyframes rip{0%{opacity:1;transform:translate(-50%,-50%) scale(.2,.05)}100%{opacity:0;transform:translate(-50%,-50%) scale(18,2.2)}}

/* ---------- Logo reveal ---------- */
.logo{position:fixed;left:50%;width:var(--L);z-index:5;
  top:var(--top);
  transform:translateX(calc(-50% + var(--L) * (.5 - .5207)));
  clip-path:circle(0% at 52.07% 29.95%);filter:drop-shadow(0 18px 40px rgba(0,0,0,.6))}
.logo img{width:100%;height:auto;display:block}
.s4 .logo{animation:reveal 1.5s cubic-bezier(.65,0,.35,1) forwards}
@keyframes reveal{to{clip-path:circle(150% at 52.07% 29.95%)}}
.logo::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(105deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  mix-blend-mode:overlay;transform:translateX(-120%);
  -webkit-mask:url(../img/logo.webp) center/100% 100% no-repeat;mask:url(../img/logo.webp) center/100% 100% no-repeat}
.s4 .logo::after{animation:sheen 1.6s 1.3s ease forwards}
@keyframes sheen{to{transform:translateX(120%)}}
.ready .logo{animation:reveal 0s forwards, breathe 6s 1s ease-in-out infinite}
@keyframes breathe{50%{filter:drop-shadow(0 18px 40px rgba(0,0,0,.6)) drop-shadow(0 0 26px rgba(30,139,255,.35))}}

/* ---------- Beadwork loader ---------- */
.loader{position:fixed;left:50%;bottom:calc(7svh + env(safe-area-inset-bottom,0px));transform:translateX(-50%);
  z-index:6;display:flex;flex-direction:column;align-items:center;gap:14px;width:min(560px,88vw);
  opacity:0;transition:opacity .8s ease}
.s5 .loader{opacity:1}
.beads{display:flex;gap:clamp(3px,.7vw,6px);padding:10px 14px;border-radius:999px;
  background:rgba(7,24,51,.65);border:1px solid rgba(30,139,255,.35);backdrop-filter:blur(6px)}
.bead{width:clamp(8px,1.6vw,13px);height:clamp(12px,2.2vw,18px);border-radius:40%;
  background:rgba(207,232,255,.08);border:1px solid rgba(207,232,255,.12);
  transition:background .35s ease, box-shadow .35s ease, transform .35s cubic-bezier(.3,1.6,.5,1)}
.bead.on{background:var(--c);border-color:transparent;transform:translateY(-2px);
  box-shadow:0 0 10px var(--g), inset 0 -3px 0 rgba(0,0,0,.25), inset 0 2px 0 rgba(255,255,255,.45)}
.ready .bead.on{animation:pulse 2.4s ease-in-out infinite;animation-delay:calc(var(--i) * 60ms)}
@keyframes pulse{50%{transform:translateY(-5px)}}
.status{font-size:.95rem;font-weight:500;color:var(--ice);letter-spacing:.02em;min-height:1.5em;text-align:center}
.status span{display:inline-block;animation:swap .45s ease}
@keyframes swap{from{opacity:0;transform:translateY(6px)}}
.pct{font-variant-numeric:tabular-nums;color:var(--blue);margin-left:.5em;font-weight:600}

/* ---------- Enter ---------- */
.enter{font:600 1.05rem "Saira",sans-serif;color:var(--white);cursor:pointer;
  padding:14px 34px;border-radius:999px;border:1.5px solid var(--blue);
  background:linear-gradient(180deg, rgba(30,139,255,.35), rgba(30,139,255,.12));
  box-shadow:0 0 0 0 rgba(30,139,255,.6), 0 10px 30px rgba(30,139,255,.25);
  display:none;transition:transform .2s ease, background .2s ease}
.ready .enter{display:inline-flex;align-items:center;gap:10px;animation:invite 2.4s ease-out infinite}
.enter:hover{transform:translateY(-2px);background:linear-gradient(180deg, rgba(30,139,255,.6), rgba(30,139,255,.25))}
.enter:focus-visible,.skip:focus-visible{outline:2px solid var(--yellow);outline-offset:4px}
@keyframes invite{0%{box-shadow:0 0 0 0 rgba(30,139,255,.55),0 10px 30px rgba(30,139,255,.25)}70%,100%{box-shadow:0 0 0 18px rgba(30,139,255,0),0 10px 30px rgba(30,139,255,.25)}}
.enter svg{width:18px;height:18px}

.skip{position:fixed;top:calc(18px + env(safe-area-inset-top,0px));right:20px;z-index:10;
  font:500 .85rem "Saira",sans-serif;color:var(--silver);background:rgba(7,24,51,.6);
  border:1px solid rgba(201,211,222,.25);border-radius:999px;padding:8px 16px;cursor:pointer;
  transition:color .2s, border-color .2s}
.skip:hover{color:#fff;border-color:var(--blue)}
.ready .skip{opacity:0;pointer-events:none}

/* ---------- Exit transition ---------- */
.portal{position:fixed;inset:0;z-index:20;pointer-events:none;background:var(--night);
  clip-path:circle(0% at 50% var(--wheelY))}
.leaving .portal{animation:close 1s cubic-bezier(.7,0,.3,1) forwards}
@keyframes close{to{clip-path:circle(150% at 50% var(--wheelY))}}
.leaving .logo{animation:none;clip-path:none;transition:transform 1s cubic-bezier(.7,0,.3,1), opacity 1s;
  transform:translateX(calc(-50% + var(--L) * (.5 - .5207))) scale(1.25);opacity:0}

.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}

@media (max-height:560px){.loader{bottom:3svh}}
@media (max-width:700px){.land{top:calc(var(--lake) - 12svh);height:12svh}}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important;transition-duration:.01ms!important}
}

/* ---------- No-JavaScript fallback ---------- */
.nojs{position:fixed;inset:0;z-index:30;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;
  background:var(--night);padding:24px;text-align:center}
.nojs img{width:min(560px,86vw);height:auto}
.nojs a{color:var(--white);border:1.5px solid var(--blue);border-radius:999px;padding:12px 28px;text-decoration:none;font-weight:600}

/* =====================================================================
   v2 upgrades: moon, eagle, constellation, shockwave, parallax
   ===================================================================== */
body{--px:0;--py:0}
#sky{translate:calc(var(--px) * -6px) calc(var(--py) * -4px)}
.land{translate:calc(var(--px) * -14px) 0}
.logo{translate:calc(var(--px) * 8px) calc(var(--py) * 6px)}

.moon{position:fixed;right:clamp(18px,10vw,170px);top:clamp(54px,11svh,120px);width:clamp(64px,11vw,150px);aspect-ratio:1;
  opacity:0;transform:translateY(30px);transition:opacity 2.4s ease, transform 3s cubic-bezier(.16,1,.3,1);
  translate:calc(var(--px) * -10px) calc(var(--py) * -8px)}
.s1 .moon{opacity:1;transform:none}
.moon-disc{position:absolute;inset:0;border-radius:50%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255,255,255,.95), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 62% 58%, rgba(160,190,225,.45) 0 9%, transparent 10%),
    radial-gradient(circle at 40% 68%, rgba(160,190,225,.35) 0 6%, transparent 7%),
    radial-gradient(circle at 70% 32%, rgba(160,190,225,.3) 0 5%, transparent 6%),
    radial-gradient(circle at 50% 50%, #e9f2ff, #b9cde6 70%, #9db4d3);
  box-shadow:0 0 40px 6px rgba(207,232,255,.35), inset -10px -12px 24px rgba(30,60,110,.35)}
.moon-glow{position:absolute;inset:-70%;border-radius:50%;
  background:radial-gradient(circle, rgba(120,180,255,.22), transparent 62%)}

.eagle{position:fixed;left:0;top:0;width:clamp(56px,7vw,96px);opacity:0;pointer-events:none;z-index:2}
.eagle svg{width:100%;fill:#020611;display:block;transform-origin:50% 70%}
.s1 .eagle{animation:soar 7s 1.2s cubic-bezier(.45,.1,.4,1) forwards}
.s1 .eagle svg{animation:flap 1.1s ease-in-out infinite}
@keyframes soar{
  0%{opacity:0;transform:translate(-12vw,26svh) scale(.7) rotate(-6deg)}
  10%{opacity:1}
  45%{transform:translate(55vw,10svh) scale(.9) rotate(4deg)}
  70%{transform:translate(78vw,14svh) scale(.8) rotate(-3deg)}
  92%{opacity:1}
  100%{opacity:0;transform:translate(112vw,4svh) scale(.6) rotate(6deg)}
}
@keyframes flap{0%,100%{transform:scaleY(1)}45%{transform:scaleY(.45)}}

.constellation{position:fixed;left:50%;top:var(--wheelY);width:calc(var(--L) * .2007 * 2.4);aspect-ratio:1;
  transform:translate(-50%,-50%);z-index:2;pointer-events:none}
.constellation svg{width:100%;height:100%;overflow:visible}
.c-star{fill:#fff;opacity:0;transform-box:fill-box;transform-origin:center}
.c-line{stroke:rgba(207,232,255,.55);stroke-width:.8;stroke-dasharray:60;stroke-dashoffset:60}
.s1 .c-star{animation:twinkleIn .5s ease forwards}
.s1 .c-line{animation:draw 1.2s ease forwards}
@keyframes twinkleIn{0%{opacity:0;transform:scale(0)}60%{opacity:1;transform:scale(1.8)}100%{opacity:.9;transform:scale(1)}}
.s4 .constellation{animation:conOut 1.4s ease forwards}
@keyframes conOut{to{opacity:0;transform:translate(-50%,-50%) scale(1.6) rotate(25deg)}}

.shock{position:fixed;left:50%;top:var(--wheelY);width:calc(var(--L) * .2);aspect-ratio:1;border-radius:50%;
  border:2px solid rgba(207,232,255,.9);box-shadow:0 0 30px rgba(30,139,255,.9), inset 0 0 30px rgba(30,139,255,.6);
  transform:translate(-50%,-50%) scale(0);opacity:0;z-index:6;pointer-events:none}
.s4 .shock{animation:shock 1.3s cubic-bezier(.1,.7,.3,1) forwards}
@keyframes shock{0%{opacity:1;transform:translate(-50%,-50%) scale(.6)}100%{opacity:0;transform:translate(-50%,-50%) scale(9)}}
.flash{position:fixed;inset:0;z-index:7;pointer-events:none;opacity:0;
  background:radial-gradient(40% 40% at 50% var(--wheelY), rgba(207,232,255,.75), transparent 70%)}
.s4 .flash{animation:flash .9s ease-out forwards}
@keyframes flash{15%{opacity:1}100%{opacity:0}}

@media (max-width:700px){.moon{top:clamp(46px,8svh,80px)}}
@media (prefers-reduced-motion:reduce){body{--px:0!important;--py:0!important}.eagle{display:none}}
