/* ============================================================
   Shared styles - all pages
   Colors injected from config.js via CSS custom properties
   set in each page's <script> block
   ============================================================ */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg);
  color: var(--headline);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 20px 80px;
}

@media (min-width: 768px) {
  body {
    padding: 56px 48px 80px;
  }
}

/* ---- Logo ---- */
.logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}
.logo-wrap img {
  width: var(--logo-width, 140px);
  max-width: 180px;
  height: auto;
  display: inline-block;
}

/* ---- Hero ---- */
.hero {
  max-width: 760px;
  width: 100%;
  text-align: center;
}

@media (min-width: 768px) {
  .hero {
    max-width: 820px;
  }

  .hero .cta-btn { padding: 20px 56px; font-size: 19px; }
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.headline {
  font-size: clamp(32px, 4.6vw, 56px);
  font-weight: 900;
  line-height: 1.1;
  color: var(--headline);
  margin-bottom: 22px;
  letter-spacing: -0.025em;
}

.divider {
  width: 80px;
  height: 4px;
  background: var(--accent);
  border: none;
  border-radius: 2px;
  margin: 0 auto 28px;
}

.subheadline {
  font-size: clamp(15px, 1.5vw, 19px);
  line-height: 1.7;
  color: var(--subtext);
  margin-bottom: 40px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

/* ---- Input error message ---- */
.input-error {
  display: none;
  color: #c0392b;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
  padding: 8px 12px;
  background: #fdf0ef;
  border-radius: 6px;
  border-left: 3px solid #c0392b;
}
.input-error.visible { display: block; }

/* ---- CTA Button ---- */
.cta-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  padding: 18px 40px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  width: 100%;
  max-width: 360px;
  text-align: center;
  text-decoration: none;
  transition: background 0.18s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  letter-spacing: 0.01em;
}
.cta-btn:hover  { background: var(--accent-hover); }
.cta-btn:active { transform: scale(0.98); }

.reassurance {
  margin-top: 14px;
  font-size: 13px;
  color: var(--subtext);
  font-style: italic;
  opacity: 0.8;
}

/* ============================================================
   POPUP OVERLAY
   ============================================================ */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.overlay.active { display: flex; }

.popup {
  background: var(--bg);
  width: 100%;
  max-width: 500px;
  border-radius: 18px;
  padding: 32px 24px 40px;
  position: relative;
  max-height: 88dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: popIn 0.25s cubic-bezier(0.34, 1.1, 0.64, 1) both;
}

@media (min-width: 540px) {
  .popup {
    padding: 40px 36px 44px;
  }
}

@keyframes popIn {
  from { transform: scale(0.94); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}

.popup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  color: var(--subtext);
  cursor: pointer;
  padding: 6px;
  -webkit-tap-highlight-color: transparent;
}

/* ---- Progress bar ---- */
.progress-wrap {
  margin-bottom: 28px;
}
.progress-label {
  font-size: 12px;
  color: var(--subtext);
  margin-bottom: 7px;
  font-weight: 500;
}
.progress-bar {
  height: 4px;
  background: rgba(0,0,0,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s ease;
}

/* ---- Form steps ---- */
.step { display: none; }
.step.active { display: block; }

.step-label {
  font-size: clamp(17px, 5vw, 22px);
  font-weight: 700;
  color: var(--headline);
  margin-bottom: 20px;
  line-height: 1.3;
}

.step-input {
  width: 100%;
  font-size: 17px;
  padding: 16px 14px;
  border: 2px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  background: #fff;
  color: var(--headline);
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.step-input:focus { border-color: var(--accent); }

.optional-tag {
  font-size: 12px;
  color: var(--subtext);
  margin-top: 6px;
  opacity: 0.75;
}

.continue-btn {
  margin-top: 20px;
  width: 100%;
  background: var(--accent);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  padding: 17px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.continue-btn:hover  { background: var(--accent-hover); }
.continue-btn:active { transform: scale(0.98); }

.skip-link {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  color: var(--subtext);
  text-decoration: underline;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* ---- Revenue options (qualifying question) ---- */
.revenue-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
}

.revenue-option {
  width: 100%;
  background: #fff;
  border: 2px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 17px;
  font-weight: 600;
  color: var(--headline);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.revenue-option:hover  { border-color: var(--accent); background: #fffaf2; }
.revenue-option:active { transform: scale(0.98); }
.revenue-option.selected {
  border-color: var(--accent);
  background: #fffaf2;
}

/* ---- Calendly step ---- */
.calendly-step { display: none; }
.calendly-step.active { display: block; }

.calendly-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--headline);
  margin-bottom: 10px;
  text-align: center;
}

.calendly-embed-wrap {
  width: 100%;
  overflow: hidden;
  background: transparent;
  border-radius: 8px;
}

/* Expand popup when showing Calendly */
.popup.calendly-mode {
  padding: 20px 14px 14px;
  max-height: 96dvh;
}

.popup.calendly-mode .calendly-inline-widget {
  min-width: unset !important;
}

/* ============================================================
   received.html / thankyou.html shared
   ============================================================ */
.page-card {
  max-width: 540px;
  width: 100%;
  text-align: center;
}

.page-headline {
  font-size: clamp(24px, 6vw, 40px);
  font-weight: 900;
  color: var(--headline);
  margin-bottom: 20px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.page-body {
  font-size: clamp(15px, 4vw, 18px);
  color: var(--subtext);
  line-height: 1.65;
  margin-bottom: 32px;
}

/* ---- YouTube embeds (thankyou.html) ---- */
.video-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

@media (min-width: 640px) {
  .video-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .video-grid .yt-wrap {
    flex: 1 1 calc(50% - 12px);
  }
}

/* Responsive 16:9 wrapper */
.yt-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}

.yt-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ---- FAQ (thankyou.html) ---- */
.faq-section {
  width: 100%;
  max-width: 640px;
  margin-top: 48px;
  text-align: left;
}

.faq-section h2 {
  font-size: clamp(18px, 5vw, 26px);
  font-weight: 800;
  color: var(--headline);
  margin-bottom: 20px;
  text-align: center;
}

.faq-item {
  border-top: 1px solid rgba(0,0,0,0.1);
}
.faq-item:last-child { border-bottom: 1px solid rgba(0,0,0,0.1); }

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 16px;
  font-weight: 700;
  color: var(--headline);
  padding: 18px 8px 18px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  font-size: 20px;
  color: var(--accent);
  transition: transform 0.2s;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
  display: none;
  font-size: 15px;
  line-height: 1.65;
  color: var(--subtext);
  padding: 0 8px 18px 0;
}
.faq-item.open .faq-answer { display: block; }

/* ============================================================
   Exit-intent bar
   ============================================================ */
.exit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--headline);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.1, 0.64, 1);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.18);
}

.exit-bar.visible { transform: translateY(0); }

.exit-bar-text {
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
}

.exit-bar-text span {
  color: var(--accent);
}

.exit-bar-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.exit-bar-btn:hover  { background: var(--accent-hover); }
.exit-bar-btn:active { transform: scale(0.97); }

.exit-bar-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 20px;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}
.exit-bar-close:hover { color: #fff; }

@media (max-width: 480px) {
  .exit-bar { padding: 14px 44px 14px 16px; gap: 10px; }
  .exit-bar-text { font-size: 14px; }
  .exit-bar-btn  { width: 100%; text-align: center; padding: 13px; }
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: auto;
  padding-top: 40px;
  text-align: center;
  font-size: 12px;
  color: var(--subtext);
  opacity: 0.6;
  width: 100%;
}

.site-footer a {
  color: var(--subtext);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover { opacity: 1; }

/* ============================================================
   Utility
   ============================================================ */
.text-center { text-align: center; }
