.gt-popup {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: stretch;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(135deg, rgba(46, 49, 146, 0.92) 0%, rgba(22, 24, 58, 0.88) 42%, rgba(212, 178, 74, 0.9) 100%);
  padding: 0;
}

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

.gt-popup-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 1.05fr) minmax(320px, 0.95fr);
  min-height: 100%;
  width: 100%;
  color: var(--gt-white);
}

.gt-popup-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gt-navy);
  border-radius: 50%;
  background: var(--gt-navy);
  color: var(--gt-white);
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(22, 24, 58, 0.2);
}

.gt-popup-close svg {
  display: none;
}

.gt-popup-close::before,
.gt-popup-close::after {
  content: "";
  position: absolute;
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.gt-popup-close::before {
  transform: rotate(45deg);
}

.gt-popup-close::after {
  transform: rotate(-45deg);
}

.gt-popup-close:hover {
  background: var(--gt-indigo);
}

.gt-popup-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: clamp(48px, 8vw, 96px);
  background: linear-gradient(160deg, var(--gt-indigo) 0%, var(--gt-navy) 100%);
}

.gt-popup-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gt-gold);
}

.gt-popup-copy h2,
.gt-popup-success h3 {
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 14ch;
  font-weight: 650;
}

.gt-popup-lede {
  max-width: 42ch;
  font-size: 17px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.84);
}

.gt-popup-points {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.gt-popup-points li {
  position: relative;
  padding-left: 22px;
  font-size: 15px;
  color: var(--gt-gold-light);
}

.gt-popup-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gt-gold);
}

.gt-popup-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.gt-popup-form-wrap {
  display: flex;
  align-items: center;
  background:
    linear-gradient(180deg, var(--gt-gold-bright) 0%, var(--gt-gold) 55%, #c49a3a 100%);
  color: var(--gt-navy);
  padding: clamp(48px, 6vw, 80px) clamp(24px, 5vw, 64px);
  overflow: auto;
}

.gt-popup-form,
.gt-popup-success {
  width: min(520px, 100%);
  margin: 0 auto;
}

.gt-popup-field { margin-bottom: 16px; }

.gt-popup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gt-popup-field label,
.gt-popup-field legend {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--gt-navy);
}

.gt-popup-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.gt-popup-field textarea {
  width: 100%;
  border: 2px solid var(--gt-indigo);
  border-radius: 8px;
  padding: 13px 14px;
  background: var(--gt-white);
  color: var(--gt-navy);
  outline: none;
  caret-color: var(--gt-indigo);
}

.gt-popup-field input::placeholder,
.gt-popup-field textarea::placeholder {
  color: var(--gt-indigo);
  opacity: 0.72;
}

.gt-popup-field input:focus,
.gt-popup-field textarea:focus {
  background: var(--gt-white);
  border-color: var(--gt-navy);
  box-shadow: 0 0 0 3px rgba(46, 49, 146, 0.18);
}

.gt-popup-field input:-webkit-autofill,
.gt-popup-field input:-webkit-autofill:hover,
.gt-popup-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--gt-navy);
  box-shadow: 0 0 0 1000px var(--gt-white) inset;
  transition: background-color 9999s ease-out;
}

.gt-popup-field textarea { resize: vertical; min-height: 84px; }

.gt-popup-intents {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gt-popup-intent {
  margin: 0;
}

.gt-popup-intent input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gt-popup-intent span {
  display: inline-block;
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(22, 24, 58, 0.12);
  color: var(--gt-navy);
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}

.gt-popup-intent input:checked + span,
.gt-popup-intent:hover span {
  background: var(--gt-indigo);
  color: var(--gt-white);
}

.gt-popup-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 6px;
  padding: 14px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--gt-indigo);
  color: var(--gt-white);
  font-size: 15px;
  font-weight: 650;
  cursor: pointer;
  text-decoration: none;
}

.gt-popup-submit:hover { background: var(--gt-navy); }
.gt-popup-submit[disabled] { opacity: 0.7; cursor: wait; }

.gt-popup-error {
  margin: 0 0 10px;
  color: #6b1d1d;
  font-size: 13px;
  font-weight: 600;
}

.gt-popup-success h3 { max-width: 16ch; margin: 8px 0 12px; }
.gt-popup-success p { margin-bottom: 16px; }
.gt-popup-calendly { margin-top: 0; }

.gt-popup-dismiss {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 0;
  background: transparent;
  color: var(--gt-navy);
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
}

body.gt-popup-open { overflow: hidden; }

@media (max-width: 860px) {
  .gt-popup {
    display: block;
    padding: 12px;
    background: rgba(22, 24, 58, 0.88);
  }

  .gt-popup-panel {
    grid-template-columns: 1fr;
    min-height: 0;
    width: min(100%, 680px);
    margin: 0 auto;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(8, 10, 45, 0.35);
  }

  .gt-popup-close {
    position: fixed;
    top: max(22px, calc(env(safe-area-inset-top) + 10px));
    right: max(22px, calc(env(safe-area-inset-right) + 10px));
    z-index: 5;
    width: 42px;
    height: 42px;
  }

  .gt-popup-copy {
    gap: 10px;
    padding: 32px 66px 24px 24px;
    min-height: auto;
  }

  .gt-popup-copy h2 {
    max-width: 18ch;
    font-size: clamp(27px, 7vw, 38px);
    line-height: 1.08;
  }

  .gt-popup-lede {
    font-size: 15px;
    line-height: 1.48;
  }

  .gt-popup-points {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
  }

  .gt-popup-points li {
    padding: 9px 10px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.35;
  }

  .gt-popup-points li::before { display: none; }
  .gt-popup-note { display: none; }

  .gt-popup-form-wrap {
    display: block;
    padding: 24px 20px max(32px, calc(env(safe-area-inset-bottom) + 20px));
    overflow: visible;
    background: linear-gradient(160deg, var(--gt-gold-bright), var(--gt-gold));
  }

  .gt-popup-field { margin-bottom: 13px; }
  .gt-popup-field label,
  .gt-popup-field legend { margin-bottom: 6px; }
  .gt-popup-row { grid-template-columns: 1fr; }

  .gt-popup-field input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
  .gt-popup-field textarea {
    min-height: 46px;
    padding: 11px 12px;
    background-color: #fff !important;
    background-image: none !important;
    color: var(--gt-navy) !important;
    border-color: rgba(22, 24, 58, 0.65);
    font-size: 16px;
  }

  .gt-popup-field textarea { min-height: 72px; }
  .gt-popup-intent span { padding: 8px 11px; font-size: 12px; }
  .gt-popup-submit { min-height: 48px; }
}

@media (max-width: 480px) {
  .gt-popup { padding: 0; }
  .gt-popup-panel { width: 100%; border-radius: 0; }
  .gt-popup-close {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
  }
  .gt-popup-copy { padding: 24px 62px 20px 18px; }
  .gt-popup-eyebrow { font-size: 10px; }
  .gt-popup-copy h2 { font-size: clamp(25px, 8vw, 34px); }
  .gt-popup-points { display: none; }
  .gt-popup-form-wrap { padding-left: 18px; padding-right: 18px; }
}
