/* Welcome after login — one flight, then the coin lives in the header. */

body.nc-greet-on { overflow: hidden; }

body.l2-world > #nc-greet {
  position: fixed !important;
  inset: 0 !important;
  z-index: 100002 !important;
  pointer-events: none;
}

.nc-greet__veil {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--nc-header-h, 72px);
  bottom: 0;
  z-index: 0;
  background:
    radial-gradient(90% 70% at 50% 42%, rgba(201, 162, 39, .22), transparent 58%),
    rgba(5, 4, 6, .78);
  opacity: 0;
  pointer-events: auto;
  cursor: pointer;
  animation: ncVeil 3.8s ease forwards;
}

.nc-greet__glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(70vw, 640px);
  height: min(70vw, 640px);
  transform: translate(-50%, -50%) scale(.4);
  border-radius: 50%;
  border: 1px solid rgba(243, 217, 138, .35);
  box-shadow: 0 0 80px rgba(232, 197, 71, .25), inset 0 0 60px rgba(232, 197, 71, .08);
  z-index: 1;
  opacity: 0;
  animation: ncRing 3.8s ease forwards;
  pointer-events: none;
}

.nc-greet__dust {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.nc-greet__dust i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #f3d98a;
  box-shadow: 0 0 8px rgba(243, 217, 138, .8);
  opacity: 0;
  animation: ncDust 3.4s ease forwards;
}
.nc-greet__dust i:nth-child(odd) { width: 2px; height: 2px; }
.nc-greet__dust i:nth-child(1) { left: 12%; top: 70%; animation-delay: .15s; }
.nc-greet__dust i:nth-child(2) { left: 22%; top: 30%; animation-delay: .28s; }
.nc-greet__dust i:nth-child(3) { left: 78%; top: 24%; animation-delay: .1s; }
.nc-greet__dust i:nth-child(4) { left: 86%; top: 62%; animation-delay: .36s; }
.nc-greet__dust i:nth-child(5) { left: 48%; top: 78%; animation-delay: .22s; }
.nc-greet__dust i:nth-child(6) { left: 64%; top: 18%; animation-delay: .44s; }
.nc-greet__dust i:nth-child(7) { left: 8%; top: 42%; animation-delay: .5s; }
.nc-greet__dust i:nth-child(8) { left: 92%; top: 40%; animation-delay: .18s; }
.nc-greet__dust i:nth-child(9) { left: 36%; top: 16%; animation-delay: .32s; }
.nc-greet__dust i:nth-child(10) { left: 58%; top: 84%; animation-delay: .4s; }
.nc-greet__dust i:nth-child(11) { left: 18%; top: 84%; animation-delay: .26s; }
.nc-greet__dust i:nth-child(12) { left: 72%; top: 72%; animation-delay: .48s; }
.nc-greet__dust i:nth-child(13) { left: 30%; top: 48%; animation-delay: .12s; }
.nc-greet__dust i:nth-child(14) { left: 82%; top: 12%; animation-delay: .38s; }
.nc-greet__dust i:nth-child(15) { left: 44%; top: 36%; animation-delay: .2s; }
.nc-greet__dust i:nth-child(16) { left: 6%; top: 18%; animation-delay: .46s; }

.nc-greet__copy {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: calc(var(--nc-header-h, 72px) + 3.5vh);
  transform: translateX(-50%);
  width: min(640px, calc(100% - 40px));
  text-align: center;
  pointer-events: none;
  opacity: 0;
  animation: ncCopy 3.8s ease forwards;
}
.nc-greet__kicker {
  margin: 0 0 10px;
  font-family: Cinzel, Georgia, serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e8c547;
}
.nc-greet__hello {
  margin: 0;
  font-family: Cinzel, Georgia, serif;
  font-weight: 700;
  font-size: clamp(1.8rem, 5vw, 3.4rem);
  letter-spacing: 0.04em;
  text-transform: none !important;
  color: #fff8e8;
  text-shadow: 0 10px 40px rgba(0, 0, 0, .55), 0 0 28px rgba(232, 197, 71, .35);
}
.nc-greet__hello span {
  color: #f3d98a;
}
.nc-greet__line {
  margin: 14px auto 0;
  max-width: 28rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 1.5;
  color: rgba(245, 236, 214, .82);
}

.nc-greet__stage {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 62%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.nc-greet__coin {
  position: absolute;
  left: 0;
  top: 0;
  width: 168px;
  height: 168px;
  margin: -84px 0 0 -84px;
  perspective: 900px;
  opacity: 0;
  transform: translate3d(62vw, 18vh, 0) scale(.25);
}
.nc-greet.is-run .nc-greet__coin {
  animation: ncGreetFly 3.15s cubic-bezier(.45, .05, .2, 1) forwards;
}
.nc-greet__coin { transform-style: preserve-3d; }
.nc-greet__spin {
  display: block;
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  animation: ncGreetSpin 3.15s linear forwards;
}
.nc-greet__face,
.nc-greet__rib {
  position: absolute;
}
.nc-greet__face {
  inset: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: Cinzel, Georgia, serif;
  font-size: 72px;
  font-weight: 700;
  color: #3a2808;
  background:
    radial-gradient(circle at 32% 28%, #fff8dc 0%, #ffe08a 24%, #d7a63a 55%, #7a5416 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .8),
    inset 0 -18px 24px rgba(70, 40, 6, .45),
    inset 0 0 0 8px rgba(92, 58, 12, .35);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.nc-greet__face--front { transform: rotateX(90deg) translateZ(14px); }
.nc-greet__face--back { transform: rotateX(-90deg) translateZ(14px); }
.nc-greet__rib {
  display: block;
  left: 50%;
  top: 50%;
  width: 23px;
  height: 30px;
  margin-left: -11.5px;
  margin-top: -15px;
  border-radius: 2px;
  background: linear-gradient(180deg, #fff6d2 0%, #e8c15a 42%, #7a5014 100%);
  transform: rotateY(calc(var(--i) * 15deg)) translateZ(84px);
}
.nc-greet__rib:nth-child(even) {
  background: linear-gradient(180deg, #f0d48a 0%, #a87828 46%, #5c3a10 100%);
}

.nc-greet.is-done .nc-greet__veil,
.nc-greet.is-done .nc-greet__glow,
.nc-greet.is-done .nc-greet__copy,
.nc-greet.is-done .nc-greet__dust,
.nc-greet.is-done .nc-greet__coin {
  animation: ncGreetOut .45s ease forwards;
}

@keyframes ncVeil {
  0% { opacity: 0; }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes ncRing {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.35); }
  18% { opacity: .9; }
  55% { opacity: .45; transform: translate(-50%, -50%) scale(1.15); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.45); }
}
@keyframes ncDust {
  0% { opacity: 0; transform: translateY(12px) scale(.6); }
  20% { opacity: .9; }
  100% { opacity: 0; transform: translateY(-80px) scale(1); }
}
@keyframes ncCopy {
  0% { opacity: 0; transform: translateX(-50%) translateY(16px); }
  16% { opacity: 1; transform: translateX(-50%) translateY(0); }
  70% { opacity: 1; }
  88% { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes ncGreetFly {
  0% { opacity: 0; transform: translate3d(58vw, 28vh, 0) scale(.2) rotateZ(-16deg); }
  14% { opacity: 1; transform: translate3d(6vw, 8vh, 0) scale(1.05) rotateZ(4deg); }
  34% { opacity: 1; transform: translate3d(0, 2vh, 0) scale(1.85) rotateZ(0deg); }
  52% { transform: translate3d(-20vw, -8vh, 0) scale(1.45) rotateZ(8deg); }
  68% { transform: translate3d(16vw, 10vh, 0) scale(1.05) rotateZ(-6deg); }
  84% { transform: translate3d(-4vw, -2vh, 0) scale(.55) rotateZ(2deg); }
  100% { opacity: 1; transform: translate3d(var(--land-x), var(--land-y), 0) scale(.16) rotateZ(0deg); }
}
@keyframes ncGreetSpin {
  0% { transform: rotateX(46deg) rotateZ(-16deg) rotateY(-28deg); }
  34% { transform: rotateX(50deg) rotateZ(6deg) rotateY(400deg); }
  100% { transform: rotateX(42deg) rotateZ(0deg) rotateY(1400deg); }
}
@keyframes ncGreetOut {
  to { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .nc-greet__coin,
  .nc-greet__spin,
  .nc-greet__dust i,
  .nc-greet__glow { animation: none !important; display: none; }
  .nc-greet__veil { animation: ncVeil 1.4s ease forwards; }
  .nc-greet__copy { animation: ncCopy 1.4s ease forwards; }
}
