/* Site promo popup — adapted from HTML template popup.css (mobile-first) */

.promo {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 12px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
  z-index: 1200;
}

.promo:not([open]) {
  display: none;
}

.promo::backdrop {
  background: rgba(10, 14, 24, 0);
  backdrop-filter: blur(0);
  transition: background-color 350ms ease, backdrop-filter 350ms ease;
}

.promo.is-open::backdrop {
  background: rgba(10, 14, 24, 0.58);
  backdrop-filter: blur(16px);
}

@supports not (backdrop-filter: blur(1px)) {
  .promo.is-open::backdrop {
    background-color: rgba(10, 14, 24, 0.78);
  }
}

.promo-card {
  position: relative;
  width: min(900px, 100%, calc((100dvh - 24px) * 900 / 506));
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  transition: opacity 400ms ease, transform 500ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.promo.is-open .promo-card {
  opacity: 1;
  transform: none;
}

.promo-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.promo-image {
  display: block;
  width: 100%;
  height: auto;
}

.promo-close {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.promo-close span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #319b42;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: transform 200ms ease, background-color 200ms;
}

.promo-close svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.promo-close:hover span {
  background: #267a34;
  transform: rotate(90deg);
}

.promo-close:focus-visible {
  outline: none;
}

.promo-close:focus-visible span {
  box-shadow: 0 0 0 3px #fff, 0 0 0 5px #319b42, 0 4px 12px rgba(0, 0, 0, 0.3);
}

@media (min-width: 576px) {
  .promo {
    padding: 20px;
  }

  .promo-card {
    border-radius: 18px;
    width: min(900px, 100%, calc((100dvh - 40px) * 900 / 506));
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-card,
  .promo::backdrop,
  .promo-close span {
    transition: none;
  }
}
