/* Limited Homesites promo — homepage strip + sitewide popup */
.ws-homesite-cta {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  overflow: hidden;
  background: var(--gradient-cta, linear-gradient(135deg, hsl(217 74% 31%) 0%, hsl(217 74% 25%) 100%));
  border-top: 4px solid hsl(217 74% 45%);
  border-bottom: 4px solid hsl(217 74% 45%);
  box-shadow:
    0 10px 28px hsl(217 74% 31% / 0.22),
    inset 0 1px 0 hsl(0 0% 100% / 0.12);
  transition: box-shadow 0.25s ease, filter 0.25s ease;
}
.ws-homesite-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 0% 50%, hsl(0 0% 100% / 0.1), transparent 55%),
    radial-gradient(90% 120% at 100% 50%, hsl(0 0% 100% / 0.08), transparent 50%);
}
.ws-homesite-cta::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  z-index: 1;
  background: hsl(var(--primary, 217 74% 31%));
  box-shadow: 0 0 18px hsl(217 74% 31% / 0.45);
}
.ws-homesite-cta:hover {
  filter: brightness(1.05);
  box-shadow:
    0 16px 36px hsl(217 74% 31% / 0.28),
    inset 0 1px 0 hsl(0 0% 100% / 0.14);
}
.ws-homesite-cta:focus-visible {
  outline: 3px solid hsl(var(--primary, 217 74% 31%));
  outline-offset: 3px;
}
.ws-homesite-cta__inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.45rem 1.5rem 1.45rem 1.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.75rem;
}
.ws-homesite-cta__copy {
  flex: 1 1 auto;
  min-width: min(100%, 16rem);
  color: hsl(var(--primary-foreground, 0 0% 100%));
}
.ws-homesite-cta__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: hsl(var(--primary, 217 74% 31%));
  color: #fff;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}
.ws-homesite-cta__title {
  margin: 0;
  font-size: clamp(1.15rem, 2.6vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  color: #fff;
  text-shadow: 0 1px 2px hsl(217 74% 10% / 0.25);
}
.ws-homesite-cta__meta {
  margin: 0.5rem 0 0;
  font-size: 0.95rem;
  line-height: 1.45;
  color: hsl(0 0% 100% / 0.9);
}
.ws-homesite-cta__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: hsl(var(--primary, 217 74% 31%));
  color: hsl(var(--primary-foreground, 0 0% 100%));
  font-weight: 700;
  font-size: 1rem;
  padding: 0.9rem 1.55rem;
  border-radius: 0.5rem;
  border: 2px solid #fff;
  box-shadow:
    0 8px 20px hsl(217 74% 15% / 0.35),
    inset 0 1px 0 hsl(0 0% 100% / 0.2);
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.ws-homesite-cta:hover .ws-homesite-cta__btn {
  background: hsl(217 74% 26%);
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px hsl(217 74% 12% / 0.4),
    inset 0 1px 0 hsl(0 0% 100% / 0.22);
}

@media (prefers-reduced-motion: no-preference) {
  .ws-homesite-cta__btn {
    animation: wsHomesiteBtnPulse 2.4s ease-in-out infinite;
  }
  .ws-homesite-cta:hover .ws-homesite-cta__btn {
    animation: none;
  }
}

@keyframes wsHomesiteBtnPulse {
  0%,
  100% {
    box-shadow:
      0 8px 20px hsl(217 74% 15% / 0.35),
      inset 0 1px 0 hsl(0 0% 100% / 0.2);
  }
  50% {
    box-shadow:
      0 8px 20px hsl(217 74% 15% / 0.35),
      0 0 0 6px hsl(0 0% 100% / 0.22),
      inset 0 1px 0 hsl(0 0% 100% / 0.2);
  }
}

/* Popup */
.ws-homesite-popup {
  position: fixed;
  inset: 0;
  z-index: 99990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-sizing: border-box;
  overflow: hidden;
}
.ws-homesite-popup[hidden] {
  display: none !important;
  pointer-events: none !important;
}
.ws-homesite-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 40, 0.62);
  backdrop-filter: blur(2px);
}
.ws-homesite-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 34rem);
  max-height: min(92vh, 40rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.85rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  animation: wsHomesiteIn 0.28s ease-out;
}
@keyframes wsHomesiteIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.ws-homesite-popup__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ws-homesite-popup__close:hover {
  background: rgba(0, 0, 0, 0.75);
}
.ws-homesite-popup__media {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 16 / 9;
  max-height: min(46vh, 20rem);
  overflow: hidden;
  background: hsl(217 40% 18%);
}
.ws-homesite-popup__img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}
.ws-homesite-popup__body {
  flex: 0 0 auto;
  padding: 0.9rem 1rem 1.05rem;
  text-align: center;
  overflow: hidden;
}
.ws-homesite-popup__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  width: 100%;
  box-sizing: border-box;
  text-decoration: none;
  background: hsl(var(--primary, 217 74% 31%));
  color: hsl(var(--primary-foreground, 0 0% 100%));
  font-weight: 700;
  font-size: clamp(0.92rem, 2.8vw, 1.05rem);
  line-height: 1.3;
  padding: 0.85rem 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px hsl(217 74% 20% / 0.35);
  transition: background 0.2s ease;
}
.ws-homesite-popup__cta-line {
  display: block;
}
.ws-homesite-popup__cta:hover {
  background: hsl(217 74% 26%);
  color: #fff;
}

@media (max-height: 700px) {
  .ws-homesite-popup__media {
    max-height: min(36vh, 14rem);
  }
  .ws-homesite-popup__body {
    padding: 0.7rem 0.85rem 0.85rem;
  }
  .ws-homesite-popup__cta {
    font-size: 0.88rem;
    padding: 0.7rem 0.85rem;
  }
}

@media (max-width: 640px) {
  .ws-homesite-cta::after {
    width: 4px;
  }
  .ws-homesite-cta__inner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 1.15rem 1rem 1.2rem 1.15rem;
    gap: 0.85rem;
  }
  .ws-homesite-cta__copy {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }
  .ws-homesite-cta__title {
    font-size: clamp(1.05rem, 4.6vw, 1.25rem);
  }
  .ws-homesite-cta__meta {
    font-size: 0.82rem;
    line-height: 1.4;
  }
  .ws-homesite-cta__btn {
    width: 100%;
    flex: 0 0 auto;
    min-height: 2.75rem;
    font-size: 0.95rem;
    padding: 0.8rem 1.1rem;
  }

  .ws-homesite-popup {
    padding: max(0.6rem, env(safe-area-inset-top, 0px))
      max(0.6rem, env(safe-area-inset-right, 0px))
      max(0.6rem, env(safe-area-inset-bottom, 0px))
      max(0.6rem, env(safe-area-inset-left, 0px));
    align-items: center;
  }
  .ws-homesite-popup__dialog {
    width: min(100%, 22.5rem);
    max-height: min(88vh, 34rem);
  }
  .ws-homesite-popup__media {
    max-height: min(38vh, 13.5rem);
  }
  .ws-homesite-popup__close {
    top: 0.45rem;
    right: 0.45rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.5rem;
  }
  .ws-homesite-popup__body {
    padding: 0.75rem 0.8rem 0.9rem;
  }
  .ws-homesite-popup__cta {
    min-height: 3rem;
    font-size: 0.9rem;
    padding: 0.75rem 0.7rem;
  }
}

@media (max-width: 380px) {
  .ws-homesite-cta__meta {
    font-size: 0.78rem;
  }
  .ws-homesite-popup__media {
    max-height: 11rem;
  }
  .ws-homesite-popup__cta {
    font-size: 0.84rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ws-homesite-popup__dialog {
    animation: none;
  }
  .ws-homesite-cta__btn {
    animation: none;
  }
}
