/* Site-wide subscription offer popup */
.promo-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: grid;
  place-items: center;
  padding: 24px;
  visibility: hidden;
  opacity: 0;
  transition: opacity .3s ease, visibility .3s ease;
}

.promo-modal.is-open {
  visibility: visible;
  opacity: 1;
}

.promo-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 10, 24, .72);
  backdrop-filter: blur(8px);
}

.promo-modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  width: min(940px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden auto;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .35);
  transform: translateY(24px) scale(.97);
  transition: transform .4s cubic-bezier(.2, .75, .25, 1);
}

.promo-modal.is-open .promo-modal__dialog { transform: none; }

.promo-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f0f1f3;
  color: #111;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease;
}

.promo-modal__close:hover { background: #e3e5e9; transform: rotate(90deg); }

/* Left: offer panel */
.promo-modal__offer {
  position: relative;
  padding: 44px 40px;
  color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(0, 229, 255, .28) 0%, transparent 55%),
    radial-gradient(90% 70% at 0% 100%, rgba(29, 111, 216, .55) 0%, transparent 60%),
    linear-gradient(160deg, #0a1f6b 0%, #071340 100%);
  overflow: hidden;
}

.promo-modal__offer::after {
  content: "";
  position: absolute;
  top: -40%;
  right: -30%;
  width: 70%;
  height: 180%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .08), transparent);
  transform: rotate(25deg);
  pointer-events: none;
}

.promo-modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 100px;
  background: rgba(255, 255, 255, .08);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .02em;
}

.promo-modal__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 0 0 rgba(0, 229, 255, .7);
  animation: promoPulse 1.8s infinite;
}

@keyframes promoPulse {
  70% { box-shadow: 0 0 0 10px rgba(0, 229, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 229, 255, 0); }
}

.promo-modal__title {
  margin: 22px 0 14px;
  color: #fff;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 500;
  line-height: 1.12;
}

.promo-modal__title .italic-display { font-weight: 400; color: #8fe9ff; }

.promo-modal__description {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, .78);
  font-size: 16px;
  line-height: 1.55;
}

.promo-modal__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-bottom: 24px;
}

.promo-modal__price-from {
  width: 100%;
  color: rgba(255, 255, 255, .7);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.promo-modal__price-amount {
  font-size: 72px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.03em;
  background: linear-gradient(90deg, #fff 0%, #8fe9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.promo-modal__price-amount sup {
  font-size: .42em;
  top: -1.1em;
  margin-right: 2px;
}

.promo-modal__price-period {
  color: rgba(255, 255, 255, .8);
  font-size: 18px;
}

.promo-modal__perks {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.promo-modal__perks li {
  position: relative;
  padding-left: 30px;
  color: rgba(255, 255, 255, .9);
  font-size: 15px;
  line-height: 1.4;
}

.promo-modal__perks li::before {
  content: "";
  position: absolute;
  top: 1px;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0, 229, 255, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2300e5ff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Right: form */
.promo-modal__form-wrap { padding: 44px 40px 32px; }

.promo-modal__form-title {
  margin: 0 0 6px;
  color: #111;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
}

.promo-modal__form-text {
  margin: 0 0 22px;
  padding-right: 30px;
  color: #5d6270;
  font-size: 14px;
  line-height: 1.5;
}

.promo-modal__form { display: grid; gap: 14px; }

.promo-modal__field label {
  display: block;
  margin-bottom: 6px;
  color: #23262d;
  font-size: 13px;
  font-weight: 500;
}

.promo-modal__field label span { color: #1d6fd8; }

.promo-modal__field input,
.promo-modal__field select {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid #e1e4ea;
  border-radius: 12px;
  background: #f8f9fb;
  color: #111;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
}

.promo-modal__field select { appearance: auto; }

.promo-modal__field input:focus,
.promo-modal__field select:focus {
  border-color: #1d6fd8;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(29, 111, 216, .12);
}

.promo-modal__field.has-error input,
.promo-modal__field.has-error select { border-color: #e5484d; }

.promo-modal__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 4px;
  border: 0;
  border-radius: 100px;
  background: linear-gradient(90deg, #1d4fd8 0%, #1d6fd8 50%, #00b8e6 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.promo-modal__submit:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(29, 111, 216, .35); }
.promo-modal__submit[disabled] { opacity: .65; cursor: wait; transform: none; }

.promo-modal__result { margin: 0; font-size: 14px; line-height: 1.4; }
.promo-modal__result:empty { display: none; }
.promo-modal__result.is-success { color: #12805c; }
.promo-modal__result.is-error { color: #d93036; }

.promo-modal__fineprint { margin: 0; color: #8a8f9c; font-size: 12px; text-align: center; }

body.promo-modal-open { overflow: hidden; }

@media (max-width: 860px) {
  .promo-modal { padding: 12px; align-items: end; }
  .promo-modal__dialog {
    grid-template-columns: 1fr;
    max-height: calc(100vh - 24px);
    border-radius: 22px;
  }
  .promo-modal__offer { padding: 30px 22px 26px; }
  .promo-modal__close { background: rgba(255, 255, 255, .9); }
  .promo-modal__title { margin-top: 16px; }
  .promo-modal__description { margin-bottom: 18px; font-size: 15px; }
  .promo-modal__price { margin-bottom: 16px; }
  .promo-modal__price-amount { font-size: 56px; }
  .promo-modal__perks { grid-template-columns: 1fr 1fr; gap: 8px 12px; }
  .promo-modal__perks li { font-size: 13px; padding-left: 26px; }
  .promo-modal__perks li::before { width: 18px; height: 18px; }
  .promo-modal__form-wrap { padding: 26px 22px 22px; }
}

@media (max-width: 420px) {
  .promo-modal__perks { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   Promo bar: fixed strip above the header, opens the offer popup
---------------------------------------------------------------- */
:root { --promo-bar-h: 40px; }

.promo-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: var(--promo-bar-h);
  padding: 0 16px;
  border: 0;
  background: linear-gradient(90deg, #0a1f6b 0%, #1d4fd8 50%, #0a1f6b 100%);
  background-size: 200% 100%;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  animation: promoBarShift 8s linear infinite;
}

@keyframes promoBarShift {
  from { background-position: 0% 0; }
  to { background-position: 200% 0; }
}

.promo-bar:hover .promo-bar__cta { background: #fff; color: #0a1f6b; }

.promo-bar__tag {
  padding: 4px 8px;
  border-radius: 100px;
  background: #00e5ff;
  color: #071340;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.promo-bar__text strong { color: #8fe9ff; font-weight: 600; }
.promo-bar__text--short { display: none; }

.promo-bar__cta {
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color .2s ease, color .2s ease;
}

/* Push the header (and its sticky clone) below the bar */
.main-header { top: calc(40px + var(--promo-bar-h)); }
.sticky-header--cloned { top: var(--promo-bar-h); }

@media (max-width: 1199px) {
  .main-header { top: calc(30px + var(--promo-bar-h)); }
  .sticky-header--cloned { top: var(--promo-bar-h); }
}

@media (max-width: 767px) {
  :root { --promo-bar-h: 36px; }
  .promo-bar { gap: 8px; font-size: 13px; }
  .promo-bar__text--full { display: none; }
  .promo-bar__text--short { display: inline; }
  .promo-bar__cta { padding: 5px 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .promo-bar { animation: none; }
}
