.newsletter-popup[hidden] {
  display: none !important;
}

.newsletter-popup {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: clamp(10px, 2.4vw, 28px);
  background: rgba(0, 0, 0, 0.84);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 220ms ease;
}

.newsletter-popup.is-open {
  opacity: 1;
}

.newsletter-popup__card {
  position: relative;
  width: min(96vw, 926px);
  max-width: calc((100vh - 24px) * 1.134804);
  aspect-ratio: 926 / 816;
  overflow: hidden;
  isolation: isolate;
  filter: drop-shadow(0 28px 42px rgba(0, 0, 0, 0.8));
  transform: translateY(18px) scale(0.975);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.newsletter-popup.is-open .newsletter-popup__card {
  transform: translateY(0) scale(1);
}

.newsletter-popup__art {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.newsletter-popup__card::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 5.5% 5.9% 11.1% 5.7%;
  pointer-events: none;
  opacity: 0.14;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(203, 157, 70, 0.1) 48%,
    transparent 52%,
    transparent 100%
  );
  background-size: 100% 16px;
  animation: newsletterScan 7s linear infinite;
}

.newsletter-popup__close {
  position: absolute;
  z-index: 5;
  top: 6.4%;
  right: 6.2%;
  width: 7.2%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.newsletter-popup__close:focus-visible {
  outline: 2px solid #ffcf72;
  outline-offset: -4px;
  box-shadow: 0 0 20px rgba(255, 188, 67, 0.85);
}

.newsletter-popup__form {
  position: absolute;
  z-index: 4;
  inset: 0;
}

.newsletter-popup__field {
  position: absolute;
  top: 62.35%;
  left: 66.15%;
  width: 25.4%;
  height: 6.05%;
  margin: 0;
  padding: 0 1.5%;
  border: 0;
  border-radius: 2px;
  outline: 0;
  background: rgba(7, 7, 5, 0.96);
  color: #e8dbc1;
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: clamp(9px, 2.15vw, 21px);
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  caret-color: #f7c65e;
}

.newsletter-popup__field::placeholder {
  color: #8d806b;
  opacity: 1;
}

.newsletter-popup__field:focus {
  box-shadow: 0 0 0 1px rgba(251, 193, 79, 0.9), 0 0 18px rgba(244, 175, 48, 0.35);
}

.newsletter-popup__honeypot {
  position: fixed !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.newsletter-popup__submit {
  position: absolute;
  z-index: 5;
  top: 71.7%;
  left: 59.05%;
  width: 33.25%;
  height: 9.7%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: transparent;
  cursor: pointer;
}

.newsletter-popup__submit::after {
  content: "";
  position: absolute;
  inset: 5%;
  border-radius: 5px;
  box-shadow: 0 0 16px rgba(255, 195, 77, 0.2);
  opacity: 0;
  transition: opacity 160ms ease;
}

.newsletter-popup__submit:hover::after,
.newsletter-popup__submit:focus-visible::after {
  opacity: 1;
}

.newsletter-popup__submit:focus-visible {
  outline: 2px solid #ffcf72;
  outline-offset: -3px;
}

.newsletter-popup__submit[disabled] {
  cursor: wait;
}

.newsletter-popup__submit[disabled]::before {
  content: "ISSUING CODE...";
  position: absolute;
  inset: 4%;
  display: grid;
  place-items: center;
  border: 1px solid #c69841;
  border-radius: 5px;
  background: rgba(8, 8, 6, 0.96);
  color: #ead8b6;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(10px, 2.45vw, 28px);
  letter-spacing: 0.03em;
}

.newsletter-popup__message {
  position: absolute;
  z-index: 5;
  top: 82.3%;
  left: 59%;
  width: 33.2%;
  margin: 0;
  color: #ffcf72;
  font-size: clamp(8px, 1.45vw, 14px);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-shadow: 0 1px 5px #000;
}

.newsletter-popup__success {
  position: absolute;
  z-index: 6;
  top: 6.1%;
  right: 6.2%;
  bottom: 11.6%;
  width: 35.8%;
  display: none;
  align-content: center;
  justify-items: center;
  padding: 4%;
  border-left: 1px solid rgba(168, 126, 52, 0.64);
  background:
    radial-gradient(circle at 50% 42%, rgba(133, 98, 37, 0.25), transparent 48%),
    rgba(6, 6, 5, 0.97);
  text-align: center;
}

.newsletter-popup.is-success .newsletter-popup__form {
  display: none;
}

.newsletter-popup.is-success .newsletter-popup__success {
  display: grid;
}

.newsletter-popup__success-kicker {
  color: #9c7735;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(11px, 2vw, 21px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.newsletter-popup__success h2 {
  margin: 3% 0 4%;
  color: #eee2ca;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(24px, 5.4vw, 58px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.newsletter-popup__success p {
  margin: 0 0 5%;
  color: #cbbda3;
  font-size: clamp(9px, 1.8vw, 18px);
  line-height: 1.35;
}

.newsletter-popup__code {
  width: 100%;
  padding: 5% 3%;
  border: 1px solid #c89a47;
  border-radius: 5px;
  box-shadow: inset 0 0 18px rgba(194, 139, 46, 0.12), 0 0 18px rgba(255, 190, 65, 0.18);
  color: #ffe0a0;
  font-family: Impact, "Arial Narrow", sans-serif;
  font-size: clamp(15px, 3.8vw, 39px);
  letter-spacing: 0.035em;
  overflow-wrap: anywhere;
}

.newsletter-popup__copy {
  margin-top: 5%;
  padding: 3% 7%;
  border: 1px solid #7e6330;
  border-radius: 4px;
  background: rgba(113, 86, 34, 0.2);
  color: #dfd0b2;
  font: 700 clamp(8px, 1.6vw, 15px) Arial, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.newsletter-popup__copy:focus-visible {
  outline: 2px solid #ffcf72;
  outline-offset: 2px;
}

@keyframes newsletterScan {
  from { background-position-y: -16px; }
  to { background-position-y: 16px; }
}

@media (max-width: 620px) {
  .newsletter-popup {
    padding: 4px;
  }

  .newsletter-popup__card {
    width: min(99vw, 926px);
    max-width: calc((100vh - 12px) * 1.134804);
  }

  .newsletter-popup__field {
    padding-inline: 1%;
    font-size: clamp(8px, 2.2vw, 14px);
  }

  .newsletter-popup__message {
    font-size: clamp(7px, 1.75vw, 11px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .newsletter-popup,
  .newsletter-popup__card {
    transition: none;
  }

  .newsletter-popup__card::after {
    animation: none;
  }
}
