body.application-popup-open {
  overflow: hidden;
}

.application-popup[hidden] {
  display: none !important;
}

.application-popup {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(1rem, 3vw, 2.5rem);
  font-family: var(--font-sans, Arial, sans-serif);
  pointer-events: none;
}

.application-popup__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(7, 7, 7, 0.78);
  backdrop-filter: blur(9px);
  cursor: default;
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}

.application-popup__dialog {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 0.96fr) minmax(360px, 1.04fr);
  width: min(880px, calc(100vw - 2rem));
  max-height: min(760px, 91svh);
  overflow: hidden;
  color: #fff;
  background: #070707;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 2px;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.48);
  opacity: 0;
  transform: translateY(22px) scale(0.975);
  transition: opacity 280ms ease, transform 420ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: auto;
}

.application-popup--open .application-popup__backdrop,
.application-popup--open .application-popup__dialog {
  opacity: 1;
}

.application-popup--open .application-popup__dialog {
  transform: translateY(0) scale(1);
}

.application-popup__visual {
  position: relative;
  min-height: 700px;
  margin: 0;
  overflow: hidden;
  background: #ba2b19;
}

.application-popup__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.22) 34%, transparent 57%, rgba(0, 0, 0, 0.28) 100%);
  pointer-events: none;
}

.application-popup__visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  object-position: 50% 50%;
  filter: saturate(0.93) contrast(1.04);
  transform: scale(1);
  transition: transform 7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.application-popup--open .application-popup__visual img {
  transform: scale(1.018);
}

.application-popup__visual figcaption {
  position: absolute;
  z-index: 1;
  right: 1.8rem;
  top: 1.65rem;
  bottom: auto;
  left: 1.8rem;
  color: #fff;
}

.application-popup__visual figcaption span,
.application-popup__visual figcaption strong {
  display: block;
}

.application-popup__visual figcaption span {
  margin-bottom: 0.65rem;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.application-popup__visual figcaption strong {
  max-width: 7ch;
  font-size: clamp(2.15rem, 3.7vw, 3.65rem);
  font-weight: 780;
  line-height: 0.9;
  letter-spacing: -0.065em;
}

.application-popup__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 3.5vw, 3.25rem);
  background: rgba(7, 7, 7, 0.98);
  border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.application-popup__eyebrow {
  margin: 0 0 1.15rem;
  color: #e04332;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.application-popup__content h2 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(2.2rem, 3.7vw, 3.55rem);
  font-weight: 760;
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.application-popup__content > p:not(.application-popup__eyebrow) {
  max-width: 42ch;
  margin: 1.45rem 0 0;
  color: #c7c3bd;
  font-size: 0.94rem;
  line-height: 1.58;
}

.application-popup__deadline {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.18rem 0.75rem;
  margin-top: 1.8rem;
  padding: 1rem 0;
  border-top: 1px solid #343434;
  border-bottom: 1px solid #343434;
}

.application-popup__deadline span,
.application-popup__deadline small {
  color: #8f8b86;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.application-popup__deadline time {
  color: #fff;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.application-popup__deadline small {
  grid-column: 2;
}

.application-popup__countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.application-popup__countdown div {
  padding: 0.78rem 0.3rem 0.68rem;
  text-align: center;
  background: #151515;
  border: 1px solid #2c2c2c;
  color: #fff;
}

.application-popup__countdown strong,
.application-popup__countdown span {
  display: block;
}

.application-popup__countdown strong {
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.application-popup__countdown span {
  margin-top: 0.35rem;
  color: #aaa49e;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.application-popup__actions {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  margin-top: 1.35rem;
}

.application-popup__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 50px;
  padding: 0.85rem 1rem 0.85rem 1.15rem;
  color: #fff;
  background: #b42318;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
  transition: background 180ms ease, transform 180ms ease;
}

.application-popup__cta span:last-child {
  font-size: 1.15rem;
  transition: transform 180ms ease;
}

.application-popup__cta:hover {
  color: #fff;
  background: #8f1d14;
  transform: translateY(-2px);
}

.application-popup__cta:hover span:last-child {
  transform: translate(2px, -2px);
}

.application-popup__later {
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid #696969;
  color: #b8b4af;
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}

.application-popup__close {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(8, 8, 8, 0.9);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}

.application-popup__close:hover {
  background: #b42318;
  transform: rotate(7deg);
}

.application-popup__close span {
  position: absolute;
  top: 20px;
  left: 12px;
  width: 17px;
  height: 1px;
  background: #fff;
}

.application-popup__close span:first-child {
  transform: rotate(45deg);
}

.application-popup__close span:last-child {
  transform: rotate(-45deg);
}

.application-popup :focus-visible {
  outline: 3px solid #f2b544;
  outline-offset: 3px;
}

@media (max-width: 760px) {
  .application-popup {
    padding: max(0.75rem, env(safe-area-inset-top)) 0.75rem max(0.75rem, env(safe-area-inset-bottom));
  }

  .application-popup__dialog {
    grid-template-columns: 1fr;
    width: min(520px, calc(100vw - 1.5rem));
    max-height: 93svh;
    overflow-y: auto;
  }

  .application-popup__visual {
    min-height: 0;
    height: clamp(360px, 54svh, 520px);
  }

  .application-popup__visual img {
    object-position: 50% 50%;
  }

  .application-popup__visual figcaption {
    right: 1rem;
    top: 1rem;
    bottom: auto;
    left: 1rem;
  }

  .application-popup__visual figcaption strong {
    font-size: clamp(2rem, 9.5vw, 3rem);
  }

  .application-popup__content {
    padding: 1.45rem 1.2rem 1.3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-left: 0;
  }

  .application-popup__eyebrow {
    margin-bottom: 0.75rem;
  }

  .application-popup__content h2 {
    max-width: 13ch;
    font-size: clamp(2rem, 10vw, 3.2rem);
  }

  .application-popup__content > p:not(.application-popup__eyebrow) {
    margin-top: 0.9rem;
    font-size: 0.9rem;
  }

  .application-popup__deadline {
    margin-top: 1rem;
    padding: 0.75rem 0;
  }

  .application-popup__countdown {
    margin-top: 0.85rem;
  }

  .application-popup__countdown div {
    padding: 0.62rem 0.15rem 0.55rem;
  }

  .application-popup__actions {
    align-items: stretch;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.9rem;
  }

  .application-popup__cta {
    width: 100%;
  }

  .application-popup__later {
    align-self: center;
  }

  .application-popup__close {
    position: fixed;
    top: max(1rem, env(safe-area-inset-top));
    right: 1rem;
    color: #111;
  }
}

@media (prefers-reduced-motion: reduce) {
  .application-popup__backdrop,
  .application-popup__dialog,
  .application-popup__visual img,
  .application-popup__cta,
  .application-popup__cta span:last-child,
  .application-popup__close {
    transition: none !important;
  }
}
