/* BuyHome9 funnel — mobile-first PPC landing styles */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f7fb;
  color: #0f172a;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }

/* Page chrome */
.bh-shell {
  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.bh-top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px env(safe-area-inset-top);
}
.bh-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
}
.bh-brand {
  font-weight: 800;
  font-size: 18px;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.bh-brand span { color: #0a8a4a; }
.bh-back-btn {
  background: transparent;
  border: 0;
  color: #475569;
  font-weight: 600;
  font-size: 14px;
  padding: 6px 8px;
  border-radius: 8px;
}
.bh-back-btn[hidden] { display: none; }
.bh-back-btn:hover { background: #f1f5f9; }

.bh-progress {
  height: 6px;
  background: #e5e7eb;
  border-radius: 99px;
  overflow: hidden;
  max-width: 640px;
  margin: 10px auto 0;
}
.bh-progress > i {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0a8a4a, #14b866);
  transition: width 0.35s cubic-bezier(.2,.8,.2,1);
}

/* Hero / step container */
.bh-main {
  flex: 1;
  padding: 20px 16px 140px;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
}
.bh-step { display: none; }
.bh-step.is-active { display: block; animation: bhFade 0.25s ease-out; }
@keyframes bhFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bh-eyebrow {
  display: inline-block;
  background: #ecfdf5;
  color: #047857;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 99px;
  margin-bottom: 12px;
}
h1.bh-h {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
@media (min-width: 480px) { h1.bh-h { font-size: 32px; } }
.bh-sub {
  color: #475569;
  font-size: 16px;
  margin: 0 0 20px;
}

/* Trust row under hero */
.bh-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 13px;
  color: #475569;
  margin-bottom: 20px;
}
.bh-trust b { color: #0f172a; font-weight: 700; }
.bh-trust span::before { content: "✓ "; color: #0a8a4a; font-weight: 800; }

/* Big choice tiles */
.bh-tiles {
  display: grid;
  gap: 12px;
}
@media (min-width: 520px) { .bh-tiles { grid-template-columns: 1fr 1fr; } }
.bh-tile {
  display: block;
  text-align: left;
  width: 100%;
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px 18px 16px;
  transition: all 0.15s ease;
  position: relative;
}
.bh-tile:hover { border-color: #0a8a4a; transform: translateY(-1px); }
.bh-tile:active { transform: translateY(0); }
.bh-tile[aria-pressed="true"] {
  border-color: #0a8a4a;
  background: #ecfdf5;
  box-shadow: 0 0 0 4px rgba(10,138,74,.12);
}
.bh-tile-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #ecfdf5; color: #047857;
  margin-bottom: 10px;
}
.bh-tile-title { font-weight: 800; font-size: 18px; margin: 0 0 4px; }
.bh-tile-sub   { color: #64748b; font-size: 14px; margin: 0; }

/* Form blocks */
.bh-field { margin-bottom: 16px; }
.bh-label {
  display: block;
  font-weight: 700;
  font-size: 13px;
  color: #334155;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.bh-hint { color: #64748b; font-size: 13px; margin-top: 4px; }
.bh-input, .bh-select {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  padding: 14px 14px;
  font-size: 16px;       /* >=16px stops iOS auto-zoom */
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bh-input:focus, .bh-select:focus {
  border-color: #0a8a4a;
  box-shadow: 0 0 0 4px rgba(10,138,74,.15);
}
.bh-input-prefix {
  position: relative;
}
.bh-input-prefix > span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-weight: 600;
}
.bh-input-prefix > input {
  padding-left: 28px;
}
.bh-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Chip groups */
.bh-chips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 8px;
}
@media (min-width: 520px) { .bh-chips { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.bh-chip {
  position: relative;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 10px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  color: #334155;
  user-select: none;
  transition: all 0.12s ease;
}
.bh-chip:hover { border-color: #94a3b8; }
.bh-chip input { position: absolute; opacity: 0; pointer-events: none; }
.bh-chip.is-on {
  background: #ecfdf5;
  border-color: #0a8a4a;
  color: #065f46;
  box-shadow: 0 0 0 1px #0a8a4a inset;
}
.bh-chip-emph {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #92400e;
}
.bh-chip-emph.is-on {
  background: #fde68a;
  border-color: #b45309;
  color: #7c2d12;
  box-shadow: 0 0 0 1px #b45309 inset;
}

/* Toggle row (yes/no checkbox card) */
.bh-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.bh-toggle input { width: 22px; height: 22px; accent-color: #0a8a4a; }
.bh-toggle.is-on { border-color: #0a8a4a; background: #ecfdf5; }

/* Sticky CTA */
.bh-cta {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245,247,251,0) 0%, rgba(245,247,251,0.85) 30%, rgba(245,247,251,1) 70%);
  z-index: 20;
}
.bh-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}
.bh-btn {
  flex: 1;
  background: #0a8a4a;
  color: #fff;
  border: 0;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 20px rgba(10,138,74,.28);
  min-height: 56px;
  transition: transform .08s ease, box-shadow .15s ease, background .15s ease;
}
.bh-btn:hover  { background: #097a42; }
.bh-btn:active { transform: translateY(1px); box-shadow: 0 4px 10px rgba(10,138,74,.25); }
.bh-btn:disabled {
  background: #cbd5e1;
  color: #fff;
  box-shadow: none;
  cursor: not-allowed;
}
.bh-btn-ghost {
  flex: 0 0 auto;
  background: #fff;
  color: #334155;
  border: 1.5px solid #cbd5e1;
  box-shadow: none;
  font-weight: 700;
  padding: 16px 14px;
}
.bh-btn-ghost:hover { background: #f1f5f9; }

/* Error banner */
.bh-err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}
.bh-err[hidden] { display: none; }

/* Loading state */
.bh-spin {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.5);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bhSpin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 8px;
}
@keyframes bhSpin { to { transform: rotate(360deg); } }

/* Thank-you page */
.bh-thanks { background: #f5f7fb; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.bh-card {
  max-width: 540px;
  background: #fff;
  border-radius: 20px;
  padding: 32px 24px;
  box-shadow: 0 10px 40px rgba(15,23,42,.06);
  text-align: center;
}
.bh-check {
  width: 72px; height: 72px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #0a8a4a;
  display: inline-flex; align-items: center; justify-content: center;
}
.bh-card h1 { font-size: 28px; margin: 0 0 8px; letter-spacing: -0.02em; }
.bh-lead { color: #475569; margin: 0 0 16px; }
.bh-next { text-align: left; padding-left: 20px; color: #334155; }
.bh-next li { margin: 6px 0; }
.bh-back { display: inline-block; margin-top: 16px; color: #0a8a4a; font-weight: 700; text-decoration: none; }
