/* GHL-style ad funnel (go.lifeinsuranceforvets.com construction) */

:root {
  --ghl-blue: #005595;
  --ghl-blue-dark: #0c3c60;
  --ghl-back: rgba(0, 85, 149, 0.45);
  --ghl-back-hover: rgba(0, 85, 149, 0.6);
  --ghl-red: #c0392b;
  --ghl-text: #10192d;
  --ghl-muted: #a2a2a2;
  --ghl-border: #d8d8d8;
  --ghl-max: 725px;
  --ghl-pad: clamp(14px, 4vw, 24px);
  --font: "Avenir Next", Avenir, "Montserrat", ui-sans-serif, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body.ghl-funnel {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ghl-text);
  background: #fff;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: -999px;
  top: 10px;
  background: #fff;
  padding: 10px;
  z-index: 100;
}

.skip:focus {
  left: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ghl-main {
  padding: var(--ghl-pad) var(--ghl-pad) calc(var(--ghl-pad) + env(safe-area-inset-bottom, 0px));
}

.ghl-wrap {
  width: min(var(--ghl-max), 100%);
  margin: 0 auto;
}

/* ---------- Bordered cards ---------- */
.ghl-card {
  background: #fff;
  border: 2px solid #000;
  border-radius: 25px;
  padding: clamp(22px, 5vw, 36px) clamp(16px, 5vw, 44px);
  margin-bottom: clamp(20px, 5vw, 32px);
}

/* ---------- Attention headlines ---------- */
.ghl-attention-tag {
  margin: 0 0 16px;
  text-align: center;
  font-size: clamp(1.05rem, 3.5vw, 1.3rem);
  font-weight: 900;
  font-style: italic;
  color: var(--ghl-text);
  line-height: 1.25;
}

.ghl-card-headline {
  text-align: center;
}

.ghl-headline {
  margin: 0 0 14px;
  font-size: clamp(1.35rem, 4.6vw, 2rem);
  font-weight: 800;
  font-style: normal;
  line-height: 1.25;
  color: var(--ghl-text);
}

.ghl-headline strong {
  font-weight: 900;
}

.ghl-headline-sub {
  margin: 0 0 18px;
  font-size: clamp(0.95rem, 3.2vw, 1.15rem);
  font-weight: 600;
  font-style: normal;
  line-height: 1.35;
  color: #4a5568;
}

.ghl-headline-secondary {
  margin: 0 0 14px;
  font-size: clamp(0.95rem, 3.2vw, 1.1rem);
  font-weight: 600;
  font-style: normal;
  line-height: 1.4;
}

.ghl-headline-secondary strong {
  font-weight: 900;
}

.ghl-headline-urgency {
  margin: 0;
  font-size: clamp(0.9rem, 3vw, 1.05rem);
  font-weight: 700;
  font-style: normal;
  line-height: 1.35;
  color: var(--ghl-red);
}

/* ---------- Quiz card ---------- */
.ghl-quiz-logo {
  display: flex;
  justify-content: center;
  margin: 0 auto 18px;
}

.ghl-quiz-logo img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: contain;
}

.quiz-progress {
  height: 6px;
  margin: 0 0 8px;
  background: #e8eef5;
  border-radius: 999px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--ghl-blue) 0%, #4da3e0 100%);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.quiz-progress-label {
  margin: 0 0 16px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ghl-muted);
}

.quiz-form {
  position: relative;
}

.quiz-step {
  display: none;
}

.quiz-step.is-active {
  display: block;
  animation: ghl-fade 0.25s ease;
}

@keyframes ghl-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.quiz-q {
  margin: 0 0 18px;
  font-size: clamp(1.2rem, 3.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
  color: var(--ghl-text);
}

.quiz-hint {
  margin: -10px 0 18px;
  text-align: center;
  font-size: 15px;
  color: var(--ghl-muted);
}

/* Full-width light-blue back bar */
.quiz-back {
  display: block;
  width: 100%;
  margin: 0 0 18px;
  padding: 13px 16px;
  border: none;
  border-radius: 3px;
  background: var(--ghl-back);
  color: #fff;
  font: inherit;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.quiz-back:hover,
.quiz-back:focus-visible {
  background: var(--ghl-back-hover);
  outline: none;
}

.quiz-back[hidden] {
  display: none;
}

.choice-grid {
  display: grid;
  gap: 16px;
}

.choice-row-2 {
  grid-template-columns: 1fr 1fr;
  max-width: 540px;
  margin: 0 auto;
}

.choice {
  display: block;
  width: 100%;
  margin: 0;
  min-height: 54px;
  padding: 17px 16px;
  border: none;
  border-radius: 3px;
  background: var(--ghl-blue);
  color: #fff;
  font: inherit;
  font-family: var(--font);
  font-size: 17px;
  font-weight: 700;
  text-align: center;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.1s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.choice:hover,
.choice:focus-visible {
  background: var(--ghl-blue-dark);
  outline: none;
}

.choice:active {
  transform: scale(0.99);
}

.choice.selected {
  background: var(--ghl-blue-dark);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35);
}

/* ---------- Typed steps ---------- */
.field-row {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ghl-text);
}

input,
select {
  width: 100%;
  min-height: 50px;
  padding: 13px 14px;
  border: 1px solid var(--ghl-border);
  border-radius: 3px;
  font: inherit;
  font-family: var(--font);
  font-size: 16px;
  color: var(--ghl-text);
  background: #fff;
}

input:focus,
select:focus {
  border-color: var(--ghl-blue);
  outline: none;
  box-shadow: 0 0 0 2px rgba(84, 143, 179, 0.25);
}

input::placeholder {
  color: #9aa3af;
}

.field-error {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--ghl-red);
}

.consent {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  margin: 8px 0 16px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ghl-muted);
}

.consent input {
  min-height: auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
}

.consent.consent-error span {
  color: var(--ghl-red);
}

.consent.consent-error {
  outline: 1px solid var(--ghl-red);
  outline-offset: 4px;
  border-radius: 4px;
  padding: 6px;
  margin-left: -6px;
  margin-right: -6px;
}

.funnel-btn {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  border: none;
  border-radius: 3px;
  background: var(--ghl-blue);
  color: #fff;
  font: inherit;
  font-family: var(--font);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  touch-action: manipulation;
}

.funnel-btn:hover {
  background: var(--ghl-blue-dark);
}

.funnel-btn:focus-visible {
  outline: 2px solid var(--ghl-blue-dark);
  outline-offset: 3px;
}

.funnel-btn:disabled {
  opacity: 0.75;
  cursor: wait;
}

.funnel-btn.is-loading {
  position: relative;
}

.quiz-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 12px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--ghl-muted);
}

.quiz-lock {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--ghl-blue);
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  vertical-align: middle;
}

.icon.star path {
  fill: currentColor;
  stroke: none;
}

/* ---------- Match interstitial ---------- */
.quiz-matching {
  text-align: center;
}

.match-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.match-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid #eee;
  border-top-color: var(--ghl-blue);
  border-radius: 50%;
  animation: ghl-spin 0.8s linear infinite;
}

@keyframes ghl-spin {
  to {
    transform: rotate(360deg);
  }
}

.match-head p {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
}

.match-summary {
  text-align: left;
  border: 1px solid var(--ghl-border);
  border-radius: 3px;
  padding: 14px 16px;
  background: #fafafa;
}

.match-summary .ms-label {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ghl-blue);
}

.match-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.match-summary li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.match-summary li .icon {
  color: var(--ghl-blue);
}

.match-summary li b {
  color: var(--ghl-text);
}

.thanks-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  font-style: italic;
  font-size: 15px;
}

.thanks-line .star {
  color: var(--ghl-red);
}

/* ---------- Social proof ---------- */
.ghl-social-proof {
  margin: 28px 0 4px;
  text-align: center;
  font-size: 16px;
  font-weight: 400;
  color: var(--ghl-muted);
}

/* ---------- Legal footer ---------- */
.ghl-legal {
  margin-top: clamp(28px, 6vw, 44px);
  text-align: center;
  font-style: italic;
  font-size: 12px;
  line-height: 1.6;
  color: #555;
}

.ghl-legal p {
  margin: 0 0 16px;
}

.ghl-legal-links {
  font-weight: 700;
}

.ghl-legal-links a {
  color: #1b88e5;
  text-decoration: none;
}

.ghl-legal-links a:hover {
  text-decoration: underline;
}

.ghl-tcpa {
  font-size: 11px;
  line-height: 1.55;
}

.ghl-legal-note {
  font-size: 11px;
}

/* ---------- Thank-you page ---------- */
.ghl-thankyou {
  text-align: center;
  padding: clamp(32px, 8vw, 56px) 0;
}

.ghl-thankyou-icon {
  margin: 0 auto 16px;
  width: 56px;
  height: 56px;
}

.ghl-thankyou h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 900;
}

.ghl-thankyou-lead {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 15px;
  line-height: 1.55;
  color: #555;
}

.ghl-thankyou-steps {
  display: grid;
  gap: 12px;
  margin: 32px 0 0;
  text-align: left;
}

.ghl-thankyou-step {
  border: 1px solid var(--ghl-border);
  border-radius: 3px;
  padding: 16px;
  background: #fafafa;
}

.ghl-thankyou-step h3 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
}

.ghl-thankyou-step p {
  margin: 0;
  font-size: 13px;
  color: #555;
  line-height: 1.45;
}

.ghl-call-box {
  margin-top: 24px;
  padding: 20px 16px;
  border: 1px solid var(--ghl-border);
  border-radius: 3px;
}

.ghl-call-box h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 800;
}

.ghl-call-box p {
  margin: 0 0 14px;
  font-size: 13px;
  color: #555;
}

.ghl-back-link {
  display: inline-block;
  margin-top: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ghl-blue);
}

.ghl-thankyou-optout {
  margin: 20px auto 0;
  max-width: 42ch;
  font-size: 13px;
  line-height: 1.55;
  color: #555;
}

@media (max-width: 520px) {
  .ghl-card {
    border-radius: 16px;
  }

  .choice-row-2 {
    grid-template-columns: 1fr;
  }

  .choice {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quiz-step.is-active,
  .match-spinner,
  .quiz-progress-bar {
    animation: none !important;
    transition: none !important;
  }
}
