/* HolyGlow R29 first-Gift spotlight and committed welcome. */

html.hg-first-gift-welcome-active,
body.hg-first-gift-welcome-active {
  overflow: hidden !important;
  overscroll-behavior: none;
}

html.hg-first-gift-welcome-active #bottom-nav,
body.hg-first-gift-welcome-active #bottom-nav {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate3d(0, 120%, 0) !important;
}

.hg-r29-first-gift-guide {
  position: fixed;
  inset: 0;
  z-index: 2147483400;
  pointer-events: none;
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hg-r29-first-gift-shade {
  position: fixed;
  z-index: 0;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.84);
  -webkit-backdrop-filter: blur(5px) saturate(0.72);
  backdrop-filter: blur(5px) saturate(0.72);
}

.hg-r29-first-gift-ring {
  position: fixed;
  z-index: 2;
  box-sizing: border-box;
  pointer-events: none;
  border: 2px solid #ffd54d;
  border-radius: 18px;
  box-shadow:
    0 0 0 5px rgba(255, 213, 77, 0.2),
    0 0 26px 9px rgba(255, 190, 45, 0.7),
    inset 0 0 18px rgba(255, 235, 150, 0.24);
  animation: hgR29GiftRing 1.45s ease-in-out infinite;
}

.hg-r29-first-gift-ring > span {
  position: absolute;
  top: -20px;
  right: -16px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 238, 170, 0.82);
  border-radius: 999px;
  background: #17120b;
  box-shadow: 0 0 18px rgba(255, 213, 77, 0.72);
  font-size: 18px;
}

.hg-r29-first-gift-card {
  position: fixed;
  z-index: 3;
  box-sizing: border-box;
  pointer-events: auto;
  max-width: calc(100vw - 28px);
  padding: 20px 20px 17px;
  border: 1px solid rgba(255, 214, 77, 0.75);
  border-radius: 22px;
  background:
    radial-gradient(circle at 82% 0%, rgba(255, 200, 55, 0.17), transparent 42%),
    linear-gradient(155deg, rgba(25, 23, 30, 0.98), rgba(7, 10, 15, 0.98));
  box-shadow: 0 22px 65px rgba(0, 0, 0, 0.68), 0 0 28px rgba(255, 202, 45, 0.16);
  text-align: center;
}

.hg-r29-first-gift-kicker,
.hg-r29-welcome-kicker {
  display: block;
  margin: 0 0 7px;
  color: #79edff;
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.hg-r29-first-gift-card h2 {
  margin: 0 0 8px;
  color: #ffe58a;
  font-family: Unbounded, Inter, system-ui, sans-serif;
  font-size: clamp(1.25rem, 5vw, 1.65rem);
  line-height: 1.16;
}

.hg-r29-first-gift-card p {
  margin: 0 auto 10px;
  color: #f7f7fb;
  font-size: 0.96rem;
  line-height: 1.48;
}

.hg-r29-first-gift-card .hg-r29-first-gift-promise {
  color: #cbd3df;
  font-size: 0.78rem;
}

.hg-r29-first-gift-later {
  min-height: 44px;
  margin-top: 2px;
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.hg-r29-first-gift-later:focus-visible,
.hg-r29-welcome-continue:focus-visible {
  outline: 3px solid #79edff;
  outline-offset: 3px;
}

html.hg-first-gift-welcome-active .hg-r29-first-gift-focus-target:focus {
  outline: 4px solid #79edff !important;
  outline-offset: 5px !important;
}

@media (forced-colors: active) {
  html.hg-first-gift-welcome-active .hg-r29-first-gift-focus-target:focus,
  .hg-r29-first-gift-later:focus-visible,
  .hg-r29-welcome-continue:focus-visible {
    outline-color: Highlight !important;
  }
}

.hg-r29-welcome {
  position: fixed;
  inset: 0;
  z-index: 2147483450;
  display: grid;
  box-sizing: border-box;
  min-height: 100dvh;
  padding:
    max(24px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(255, 211, 73, 0.24), transparent 31%),
    radial-gradient(circle at 20% 14%, rgba(0, 225, 255, 0.16), transparent 27%),
    linear-gradient(150deg, #020307 0%, #071217 51%, #130d05 100%);
  color: #fff;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  opacity: 0;
  transition: opacity 360ms ease;
}

.hg-r29-welcome.is-on {
  opacity: 1;
}

.hg-r29-welcome.is-leaving {
  opacity: 0;
}

.hg-r29-welcome-aura {
  position: absolute;
  width: min(86vw, 680px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 230, 140, 0.24);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 12deg, rgba(255, 221, 108, 0.12) 0 3deg, transparent 3deg 18deg);
  filter: blur(0.2px) drop-shadow(0 0 35px rgba(255, 203, 52, 0.2));
  animation: hgR29WelcomeAura 16s linear infinite;
}

.hg-r29-welcome-stars {
  position: absolute;
  inset: -30%;
  background-image:
    radial-gradient(circle, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle, #ffe68a 0 1.2px, transparent 1.7px),
    radial-gradient(circle, #72ecff 0 1px, transparent 1.6px);
  background-position: 0 0, 33px 55px, 78px 18px;
  background-size: 91px 91px, 133px 133px, 171px 171px;
  opacity: 0.58;
  transform: translate3d(0, 5%, 0) rotate(-4deg);
  animation: hgR29WelcomeStars 8s ease-in-out infinite alternate;
}

.hg-r29-welcome-stage {
  position: relative;
  z-index: 2;
  width: min(680px, 94vw);
  padding: clamp(30px, 7vw, 64px) clamp(20px, 7vw, 54px);
  border: 1px solid rgba(255, 219, 101, 0.42);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 2%, rgba(255, 214, 77, 0.18), transparent 32%),
    linear-gradient(155deg, rgba(16, 21, 29, 0.9), rgba(8, 8, 12, 0.94));
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.72),
    0 0 50px rgba(255, 202, 57, 0.14),
    inset 0 1px rgba(255, 255, 255, 0.11);
  text-align: center;
  transform: perspective(1100px) translate3d(0, 42px, -180px) rotateX(11deg) scale(0.76);
  opacity: 0;
}

.hg-r29-welcome.is-on .hg-r29-welcome-stage {
  animation: hgR29WelcomeStage 1.05s cubic-bezier(0.16, 1, 0.3, 1) 80ms forwards;
}

.hg-r29-welcome-dove {
  margin-bottom: 7px;
  font-size: clamp(3.8rem, 17vw, 7rem);
  filter: drop-shadow(0 0 21px rgba(255, 230, 145, 0.64));
  transform-origin: center;
  animation: hgR29WelcomeDove 2.8s ease-in-out infinite;
}

.hg-r29-welcome h1 {
  margin: 0;
  font-family: Unbounded, Inter, system-ui, sans-serif;
  line-height: 0.98;
  text-transform: uppercase;
  text-shadow: 0 8px 30px rgba(0, 0, 0, 0.7);
}

.hg-r29-welcome h1 span {
  display: block;
  color: #f7f9ff;
  font-size: clamp(1.35rem, 5.5vw, 2.5rem);
  letter-spacing: 0.08em;
}

.hg-r29-welcome h1 strong {
  display: block;
  margin-top: 7px;
  color: #ffd849;
  font-size: clamp(2.35rem, 10vw, 5.4rem);
  letter-spacing: -0.055em;
  text-shadow: 0 0 25px rgba(255, 205, 54, 0.54), 0 8px 30px rgba(0, 0, 0, 0.76);
}

.hg-r29-welcome-copy {
  max-width: 500px;
  margin: 22px auto 25px;
  color: #eef4fb;
  font-size: clamp(0.98rem, 3.6vw, 1.2rem);
  line-height: 1.55;
}

.hg-r29-welcome-continue {
  min-height: 50px;
  padding: 13px 28px;
  border: 1px solid #ffe990;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffe46b, #e9a914);
  box-shadow: 0 9px 30px rgba(238, 172, 20, 0.35), inset 0 1px rgba(255, 255, 255, 0.65);
  color: #171004;
  font: inherit;
  font-weight: 950;
  letter-spacing: 0.035em;
  cursor: pointer;
}

.hg-r29-welcome-orbit {
  position: absolute;
  inset: 8% 11%;
  z-index: -1;
  border: 1px solid rgba(109, 235, 255, 0.22);
  border-radius: 50%;
  transform: perspective(700px) rotateX(67deg) rotateZ(-8deg);
  animation: hgR29WelcomeOrbit 6s linear infinite;
}

.hg-r29-welcome-orbit span {
  position: absolute;
  color: #79edff;
  text-shadow: 0 0 13px currentColor;
}

.hg-r29-welcome-orbit span:nth-child(1) { top: -8px; left: 20%; }
.hg-r29-welcome-orbit span:nth-child(2) { right: -5px; bottom: 31%; }
.hg-r29-welcome-orbit span:nth-child(3) { bottom: -8px; left: 34%; }

@keyframes hgR29GiftRing {
  0%, 100% { box-shadow: 0 0 0 4px rgba(255, 213, 77, 0.16), 0 0 20px 6px rgba(255, 190, 45, 0.52); }
  50% { box-shadow: 0 0 0 8px rgba(255, 213, 77, 0.05), 0 0 34px 12px rgba(255, 190, 45, 0.82); }
}

@keyframes hgR29WelcomeStage {
  0% { opacity: 0; transform: perspective(1100px) translate3d(0, 42px, -180px) rotateX(11deg) scale(0.76); }
  65% { opacity: 1; transform: perspective(1100px) translate3d(0, -5px, 22px) rotateX(-1.5deg) scale(1.018); }
  100% { opacity: 1; transform: perspective(1100px) translate3d(0, 0, 0) rotateX(0) scale(1); }
}

@keyframes hgR29WelcomeAura { to { transform: rotate(1turn); } }
@keyframes hgR29WelcomeStars { to { transform: translate3d(2%, -3%, 0) rotate(3deg) scale(1.04); } }
@keyframes hgR29WelcomeOrbit { to { transform: perspective(700px) rotateX(67deg) rotateZ(352deg); } }
@keyframes hgR29WelcomeDove {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-2deg); }
  50% { transform: translate3d(0, -9px, 0) rotate(2deg); }
}

@media (max-height: 610px) {
  .hg-r29-welcome-stage { padding-block: 24px; }
  .hg-r29-welcome-dove { font-size: 3.2rem; }
  .hg-r29-welcome-copy { margin-block: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hg-r29-first-gift-ring,
  .hg-r29-welcome-aura,
  .hg-r29-welcome-stars,
  .hg-r29-welcome-dove,
  .hg-r29-welcome-orbit,
  .hg-r29-welcome.is-on .hg-r29-welcome-stage {
    animation: none !important;
  }

  .hg-r29-welcome,
  .hg-r29-welcome-stage {
    transition-duration: 80ms !important;
  }

  .hg-r29-welcome-stage,
  .hg-r29-welcome.is-on .hg-r29-welcome-stage {
    opacity: 1;
    transform: none;
  }
}
