html.impax-welcome-pending,
html.impax-welcome-pending body {
  overflow: hidden !important;
  background: #000 !important;
}

html.impax-welcome-pending body > *:not(.impax-welcome) {
  visibility: hidden !important;
}

html.impax-welcome-pending .impax-welcome {
  visibility: visible !important;
}

.impax-welcome {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: 32px 24px;
  background: #000;
  color: #fff;
  font-family: "Poppins", Arial, sans-serif;
  overflow: hidden;
  isolation: isolate;
  opacity: 1;
  visibility: visible;
  transition: opacity .38s ease, visibility .38s ease;
}

.impax-welcome.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Subtle IMPAX red/blue light passes: the screen stays black, but feels alive. */
.impax-welcome::before,
.impax-welcome::after {
  content: "";
  position: absolute;
  z-index: 0;
  left: -28%;
  width: 156%;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  transform: rotate(-22deg) translateX(-24%);
  filter: blur(.2px);
}

.impax-welcome::before {
  top: 34%;
  background: linear-gradient(90deg, transparent 15%, rgba(15,86,255,0) 30%, rgba(15,86,255,.62) 50%, rgba(15,86,255,0) 70%, transparent 85%);
  box-shadow: 0 0 22px rgba(15,86,255,.28);
  animation: impaxLightPass 4.8s .12s cubic-bezier(.2,.7,.2,1) infinite;
}

.impax-welcome::after {
  top: 66%;
  background: linear-gradient(90deg, transparent 15%, rgba(235,33,46,0) 30%, rgba(235,33,46,.62) 50%, rgba(235,33,46,0) 70%, transparent 85%);
  box-shadow: 0 0 22px rgba(235,33,46,.25);
  animation: impaxLightPass 4.8s 2.52s cubic-bezier(.2,.7,.2,1) infinite;
}

.impax-welcome__inner {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.impax-welcome__mark {
  display: block;
  width: clamp(150px, 20vw, 235px);
  height: auto;
  margin: 0 auto 34px;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: 50% 50%;
  animation:
    impaxMarkIn .95s .18s cubic-bezier(.16,1,.3,1) both,
    impaxMarkBreath 4.6s 1.25s ease-in-out infinite alternate;
}

.impax-welcome__brand {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: .28em;
  text-indent: .28em;
  animation: impaxTextIn .65s .58s cubic-bezier(.16,1,.3,1) both;
}

.impax-welcome__prompt {
  margin: 18px 0 34px;
  color: rgba(255,255,255,.62);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.7;
  letter-spacing: .13em;
  text-transform: uppercase;
  animation: impaxTextIn .65s .72s cubic-bezier(.16,1,.3,1) both;
}

.impax-welcome__languages {
  width: min(620px, 100%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.impax-welcome__language {
  position: relative;
  isolation: isolate;
  appearance: none;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.34);
  border-radius: 999px;
  background: rgba(255,255,255,.018);
  color: #fff;
  min-height: 54px;
  padding: 15px 20px;
  cursor: pointer;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  transition: border-color .28s ease, background .28s ease, color .28s ease, transform .28s ease, box-shadow .28s ease;
  animation:
    impaxLanguageIn .52s cubic-bezier(.16,1,.3,1) both,
    impaxLanguageIdle 5.2s ease-in-out infinite;
}

.impax-welcome__language::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2px;
  background: linear-gradient(105deg, transparent 25%, rgba(255,255,255,.14) 48%, transparent 71%);
  transform: translateX(-125%);
  animation: impaxPillShimmer 5.2s ease-in-out infinite;
  pointer-events: none;
}

.impax-welcome__language:nth-child(1) { animation-delay: .84s, 1.5s; }
.impax-welcome__language:nth-child(2) { animation-delay: .94s, 1.85s; }
.impax-welcome__language:nth-child(3) { animation-delay: 1.04s, 2.2s; }
.impax-welcome__language:nth-child(1)::before { animation-delay: 1.5s; }
.impax-welcome__language:nth-child(2)::before { animation-delay: 1.85s; }
.impax-welcome__language:nth-child(3)::before { animation-delay: 2.2s; }

.impax-welcome__language:hover,
.impax-welcome__language:focus-visible {
  border-color: rgba(255,255,255,.92);
  background: #fff;
  color: #000;
  box-shadow: 0 0 0 4px rgba(255,255,255,.07);
  transform: translateY(-2px);
  outline: none;
}

.impax-welcome__language.is-selected {
  background: #fff;
  border-color: #fff;
  color: #000;
  transform: scale(.97);
}

@keyframes impaxMarkIn {
  0% { opacity: 0; transform: scale(.72) rotate(-3deg); filter: blur(12px); }
  55% { opacity: 1; filter: blur(0); }
  78% { transform: scale(1.035) rotate(.35deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
}

@keyframes impaxMarkBreath {
  0% { opacity: .94; filter: drop-shadow(0 0 0 rgba(255,255,255,0)); }
  50% { opacity: 1; filter: drop-shadow(0 0 12px rgba(255,255,255,.08)); }
  100% { opacity: .97; filter: drop-shadow(0 0 24px rgba(255,255,255,.13)); }
}

@keyframes impaxLanguageIdle {
  0%, 100% { border-color: rgba(255,255,255,.30); }
  50% { border-color: rgba(255,255,255,.52); }
}

@keyframes impaxPillShimmer {
  0%, 58% { transform: translateX(-125%); opacity: 0; }
  64% { opacity: 1; }
  82% { opacity: .7; }
  100% { transform: translateX(125%); opacity: 0; }
}

@keyframes impaxTextIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes impaxLanguageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes impaxLightPass {
  0%, 12% { opacity: 0; transform: rotate(-22deg) translateX(-32%); }
  24% { opacity: .68; }
  46% { opacity: .24; }
  60% { opacity: 0; transform: rotate(-22deg) translateX(32%); }
  100% { opacity: 0; transform: rotate(-22deg) translateX(32%); }
}

@media (max-width: 620px) {
  .impax-welcome { padding: 24px 20px; }
  .impax-welcome__mark { width: 145px; margin-bottom: 28px; }
  .impax-welcome__brand { font-size: 25px; }
  .impax-welcome__prompt { margin: 16px 0 28px; font-size: 9px; }
  .impax-welcome__languages {
    grid-template-columns: 1fr;
    width: min(330px, 100%);
    gap: 11px;
  }
  .impax-welcome__language { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .impax-welcome { transition: none; }
  .impax-welcome::before,
  .impax-welcome::after,
  .impax-welcome__mark,
  .impax-welcome__brand,
  .impax-welcome__prompt,
  .impax-welcome__language { animation: none !important; }
  .impax-welcome__language::before { animation: none !important; }
  .impax-welcome__language { transition: none; }
}
