.kgh-popup {
  --kgh-blue: #345f7d;
  --kgh-blue-deep: #1e3c51;
  --kgh-sand: #b4ac96;
  --kgh-red: #df2a27;
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 24px;
  font-family: Roboto, Arial, sans-serif;
}

.kgh-popup[hidden] {
  display: none;
}

.kgh-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 27, 37, .68);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: kgh-fade-in .45s ease both;
}

.kgh-popup__card {
  position: relative;
  isolation: isolate;
  width: min(920px, 100%);
  min-width: 0;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: 28px;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .98) 0 61%, rgba(235, 239, 238, .96) 61% 100%);
  box-shadow: 0 30px 90px rgba(6, 23, 34, .38);
  animation: kgh-card-in .6s cubic-bezier(.2, .9, .3, 1.08) both;
}

.kgh-popup__card::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -42%;
  right: -9%;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--kgh-blue);
  box-shadow: 0 0 0 38px rgba(52, 95, 125, .10), 0 0 0 76px rgba(180, 172, 150, .13);
}

.kgh-popup__card::after {
  content: "QMP";
  position: absolute;
  z-index: -1;
  right: -18px;
  bottom: -52px;
  color: rgba(52, 95, 125, .055);
  font-family: Teko, Roboto, sans-serif;
  font-size: 260px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -.06em;
}

.kgh-popup__content {
  position: relative;
  z-index: 2;
  width: 68%;
  min-width: 0;
  padding: 54px 58px 50px;
}

.kgh-popup__logo {
  position: absolute;
  top: 46px;
  right: -220px;
  width: 92px;
  height: 92px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.kgh-popup__eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 48px;
  color: var(--kgh-blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.kgh-popup__eyebrow span {
  width: 34px;
  height: 3px;
  border-radius: 3px;
  background: var(--kgh-red);
}

.kgh-popup__kicker {
  margin: 0 0 8px;
  color: var(--kgh-red);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.kgh-popup__title {
  margin: 0;
  color: var(--kgh-blue-deep);
  font-family: Teko, Roboto, sans-serif;
  font-size: clamp(44px, 5vw, 66px);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.02em;
}

.kgh-popup__copy {
  max-width: 560px;
  margin: 18px 0 0;
  color: #52636c;
  font-size: 16px;
  line-height: 1.55;
}

.kgh-popup__details {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: 21px;
  color: var(--kgh-blue-deep);
  font-size: 13px;
  font-weight: 500;
}

.kgh-popup__details i {
  width: 17px;
  color: var(--kgh-red);
  text-align: center;
}

.kgh-popup__countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 500px;
  margin-top: 25px;
}

.kgh-popup__time {
  padding: 12px 8px 10px;
  border: 1px solid rgba(52, 95, 125, .15);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  text-align: center;
}

.kgh-popup__time strong {
  display: block;
  color: var(--kgh-blue);
  font-family: Teko, Roboto, sans-serif;
  font-size: 34px;
  font-weight: 500;
  line-height: .9;
  font-variant-numeric: tabular-nums;
}

.kgh-popup__time span {
  display: block;
  margin-top: 7px;
  color: #6b777d;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.kgh-popup__actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 25px;
}

.kgh-popup__cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 999px;
  background: var(--kgh-red);
  box-shadow: 0 10px 24px rgba(223, 42, 39, .22);
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none !important;
  transition: transform .2s ease, box-shadow .2s ease;
}

.kgh-popup__cta:hover {
  box-shadow: 0 14px 30px rgba(223, 42, 39, .3);
  transform: translateY(-2px);
}

.kgh-popup__continue {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid rgba(52, 95, 125, .35);
  background: transparent;
  color: var(--kgh-blue);
  font-size: 13px;
}

.kgh-popup__close {
  position: absolute;
  z-index: 5;
  top: 20px;
  right: 20px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  background: rgba(23, 57, 80, .28);
  color: #fff;
  transition: background .2s ease, transform .2s ease;
}

.kgh-popup__close:hover {
  background: rgba(23, 57, 80, .58);
  transform: rotate(6deg);
}

.kgh-popup__close span {
  position: absolute;
  top: 19px;
  left: 12px;
  width: 16px;
  height: 2px;
  background: currentColor;
  transform: rotate(45deg);
}

.kgh-popup__close span + span {
  transform: rotate(-45deg);
}

.kgh-popup__orbit {
  position: absolute;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  pointer-events: none;
}

.kgh-popup__orbit::after {
  content: "";
  position: absolute;
  top: 13%;
  left: 13%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--kgh-red);
  box-shadow: 0 0 0 7px rgba(223, 42, 39, .16);
}

.kgh-popup__orbit--one {
  top: -92px;
  right: -72px;
  width: 390px;
  height: 390px;
  animation: kgh-orbit 16s linear infinite;
}

.kgh-popup__orbit--two {
  right: -116px;
  bottom: -190px;
  width: 430px;
  height: 430px;
  border-color: rgba(52, 95, 125, .18);
  animation: kgh-orbit 22s linear infinite reverse;
}

.kgh-popup.is-closing .kgh-popup__backdrop {
  animation: kgh-fade-out .28s ease both;
}

.kgh-popup.is-closing .kgh-popup__card {
  animation: kgh-card-out .28s ease both;
}

body.kgh-popup-open {
  overflow: hidden;
}

@keyframes kgh-fade-in { from { opacity: 0; } }
@keyframes kgh-fade-out { to { opacity: 0; } }
@keyframes kgh-card-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes kgh-card-out { to { opacity: 0; transform: translateY(16px) scale(.98); } }
@keyframes kgh-orbit { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .kgh-popup { padding: 12px; }
  .kgh-popup__card { width: calc(100vw - 24px); min-height: 0; border-radius: 22px; background: rgba(250, 250, 248, .98); }
  .kgh-popup__card::before { top: -120px; right: -90px; width: 260px; }
  .kgh-popup__card::after { right: -7px; bottom: -24px; font-size: 128px; }
  .kgh-popup__content { width: 100%; padding: 31px 24px 28px; }
  .kgh-popup__logo { display: none; }
  .kgh-popup__eyebrow { margin-bottom: 28px; padding-right: 50px; }
  .kgh-popup__title { font-size: clamp(38px, 11vw, 52px); }
  .kgh-popup__copy { font-size: 14px; }
  .kgh-popup__details { display: grid; gap: 8px; }
  .kgh-popup__countdown { gap: 5px; }
  .kgh-popup__time { padding: 10px 3px 8px; }
  .kgh-popup__time strong { font-size: 28px; }
  .kgh-popup__time span { font-size: 8px; letter-spacing: .05em; }
  .kgh-popup__actions { align-items: flex-start; flex-direction: column; gap: 15px; }
  .kgh-popup__close { top: 14px; right: 14px; background: var(--kgh-blue-deep); }
}

@media (max-height: 660px) and (min-width: 761px) {
  .kgh-popup__card { min-height: 0; }
  .kgh-popup__content { padding-top: 32px; padding-bottom: 32px; }
  .kgh-popup__eyebrow { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .kgh-popup *, .kgh-popup *::before, .kgh-popup *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
