/* ============================================================
   RangerLead — Denver homeowner landing page
   Design system: "Front Range trust"
   Dusk-blue + sunset gold, Fraunces + Figtree, mountain motif.
   ============================================================ */

:root {
  /* Sky blues */
  --sky-900: #14314F;
  --sky-800: #1B416B;
  --sky-700: #235286;
  --sky-500: #2E6FB0;
  --sky-100: #E8F1F9;

  /* Sunset gold */
  --gold: #E7A33A;
  --gold-dark: #C9871F;
  --gold-soft: #FBEED6;

  /* Neutrals */
  --ink: #16222E;
  --muted: #566573;
  --line: #E2E8EE;
  --bg: #FBFCFD;
  --bg-soft: #F1F6FA;
  --white: #FFFFFF;
  --err: #C0392B;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Figtree", system-ui, -apple-system, sans-serif;

  --maxw: 1140px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(20, 49, 79, .06), 0 6px 18px rgba(20, 49, 79, .06);
  --shadow-md: 0 10px 34px rgba(20, 49, 79, .14);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { font-family: var(--font-display); line-height: 1.14; margin: 0; font-weight: 600; }
p { margin: 0; }
a { color: var(--sky-700); text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }
.container-narrow { max-width: 760px; }
.section { padding: 84px 0; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin: 0 0 14px;
}
.eyebrow-center { text-align: center; }
.section-title { font-size: clamp(1.9rem, 4.2vw, 2.7rem); }
.section-title.center { text-align: center; }
.section-intro { max-width: 620px; color: var(--muted); font-size: 1.1rem; margin-top: 16px; }
.section-intro.center { margin-inline: auto; text-align: center; }

/* ---------- a11y ---------- */
.skip-link { position: absolute; left: -999px; top: 0; background: var(--sky-900); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100; }
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 10px 18px; font-size: .95rem; }
.btn-lg { padding: 17px 30px; font-size: 1.08rem; }
.btn-block { width: 100%; }

.btn-gold { background: var(--gold); color: #3A2708; }
.btn-gold:hover { background: var(--gold-dark); color: #fff; box-shadow: var(--shadow-md); }

.btn-blue { background: var(--sky-800); color: #fff; }
.btn-blue:hover { background: var(--sky-700); box-shadow: var(--shadow-md); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 253, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.22rem; color: var(--ink); }
.brand-sub { font-size: .74rem; color: var(--muted); font-weight: 600; letter-spacing: .02em; }

/* ---------- Hero ---------- */
.hero { position: relative; background: linear-gradient(180deg, var(--sky-100) 0%, var(--bg) 62%); padding-bottom: 60px; overflow: hidden; }
.hero-inner {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 48px;
  align-items: start;
  padding-top: 62px;
  padding-bottom: 40px;
}
.hero-copy h1 { font-size: clamp(2.1rem, 4.8vw, 3.3rem); font-weight: 600; letter-spacing: -0.01em; margin-bottom: 18px; }
.hero-sub { font-size: 1.16rem; color: #33475A; max-width: 46ch; }
.hero-points { margin-top: 22px; display: grid; gap: 10px; }
.hero-points li { position: relative; padding-left: 30px; font-weight: 500; }
.hero-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: #fff; background: var(--sky-700);
  width: 20px; height: 20px; border-radius: 50%;
  font-size: .72rem; font-weight: 800;
  display: grid; place-items: center;
}
.hero-clarify {
  margin-top: 22px; padding: 14px 16px;
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  border-radius: 0 10px 10px 0;
  font-size: .96rem; color: #5A4415;
}

/* ---------- Form card ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 26px;
  scroll-margin-top: 90px;
}
.form-head h2 { font-size: 1.5rem; font-weight: 600; }
.form-head p { color: var(--muted); font-size: .98rem; margin-top: 6px; }
#lead-form[hidden] { display: none; }
#lead-form { margin-top: 20px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field label { font-weight: 600; font-size: .92rem; }
.field input, .field select {
  font-family: inherit;
  font-size: 16px; /* prevents iOS zoom */
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--sky-500); box-shadow: 0 0 0 3px rgba(46,111,176,.16); }
.field input.invalid, .field select.invalid, .consent.invalid input { border-color: var(--err); }
.err { color: var(--err); font-size: .82rem; font-weight: 600; min-height: 0; }
.err:empty { display: none; }

.consent { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; padding: 4px 2px; }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sky-700); flex: none; }
.consent label { font-size: .82rem; color: var(--muted); font-weight: 500; line-height: 1.45; }
.consent .err { grid-column: 1 / -1; }

.form-privacy { font-size: .8rem; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.form-privacy a { color: var(--sky-700); text-decoration: underline; }

/* Form-level error banner (hidden unless a submission fails) */
.form-error {
  background: #FCEBEA;
  border: 1px solid #E4B4AE;
  color: #9A2A1C;
  font-size: .9rem;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 10px;
}
.form-error[hidden] { display: none; }

/* Success state */
.form-success { text-align: center; padding: 20px 6px; }
.success-check {
  width: 60px; height: 60px; margin: 4px auto 14px;
  background: #1E8E5A; color: #fff;
  border-radius: 50%; display: grid; place-items: center;
  font-size: 1.9rem; font-weight: 800;
}
.form-success h3 { font-size: 1.4rem; font-weight: 600; }
.form-success p { color: var(--muted); margin-top: 10px; }
.success-note { font-size: .88rem; }

/* ---------- Front Range silhouette ---------- */
.range { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; line-height: 0; pointer-events: none; }
.range svg { width: 100%; height: 150px; }
.range-flip { top: 0; bottom: auto; transform: scaleY(-1); }
.range-flip svg { height: 100px; }

/* ---------- Why it matters ---------- */
.why { background: var(--bg); }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 44px; }
.why-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.why-icon {
  width: 48px; height: 48px; color: var(--sky-700);
  background: var(--sky-100); border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 16px;
}
.why-icon svg { width: 26px; height: 26px; }
.why-card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.why-card p { color: var(--muted); font-size: .98rem; }
.why-disclaimer { margin-top: 30px; text-align: center; color: var(--muted); font-size: .92rem; max-width: 640px; margin-inline: auto; }

/* ---------- How it works ---------- */
.how { background: var(--bg-soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 46px; }
.step {
  position: relative; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px; box-shadow: var(--shadow-sm);
}
.step-num {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: 16px;
  border-radius: 50%; background: var(--sky-800); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.2rem;
}
.step h3 { font-size: 1.18rem; font-weight: 600; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: .98rem; }
.how-cta { text-align: center; margin-top: 40px; }

/* ---------- What to expect ---------- */
.expect { background: var(--bg); }
.expect-list { margin: 30px auto 0; max-width: 620px; display: grid; gap: 12px; }
.expect-list li {
  position: relative; padding: 14px 18px 14px 50px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-sm); font-weight: 500;
}
.expect-list li::before {
  content: ""; position: absolute; left: 18px; top: 50%;
  width: 14px; height: 14px; margin-top: -7px;
  background: var(--gold); border-radius: 3px;
  clip-path: polygon(43% 0, 100% 0, 57% 100%, 0 100%);
}
.expect-note { margin: 26px auto 0; max-width: 620px; text-align: center; color: var(--muted); font-size: .95rem; }

/* ---------- Who we are ---------- */
.whois { background: var(--sky-900); color: #DCE8F2; }
.whois-card { max-width: 820px; margin-inline: auto; text-align: center; }
.whois-card h2 { color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.2rem); font-weight: 600; margin-bottom: 16px; }
.whois-card p { color: #BFD2E4; font-size: 1.1rem; }
.whois-card strong { color: #fff; }

/* ---------- FAQ ---------- */
.faq { background: var(--bg-soft); }
.faq-list { margin-top: 38px; display: grid; gap: 12px; }
.faq-item { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--ink);
}
.faq-icon { position: relative; width: 16px; height: 16px; flex: none; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--gold-dark); border-radius: 2px; transition: transform .2s ease; }
.faq-icon::before { left: 0; top: 7px; width: 16px; height: 2px; }
.faq-icon::after { left: 7px; top: 0; width: 2px; height: 16px; }
.faq-q[aria-expanded="true"] .faq-icon::after { transform: scaleY(0); }
.faq-a { padding: 0 22px 22px; }
.faq-a p { color: var(--muted); }

/* ---------- Final CTA ---------- */
.final-cta {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, var(--sky-800), var(--sky-900));
  color: #fff; padding: 86px 0; text-align: center;
}
.final-inner { position: relative; z-index: 2; max-width: 680px; margin-inline: auto; }
.final-inner h2 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 2.7rem); font-weight: 600; }
.final-inner > p { color: #C6D7E7; font-size: 1.14rem; margin: 16px auto 28px; max-width: 52ch; }
.final-reassure { margin-top: 22px; color: #AEC4D8; font-size: .92rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--sky-900); color: #AEC4D8; padding: 50px 0 28px; }
.footer-inner { display: grid; grid-template-columns: .8fr 1.6fr; gap: 34px; padding-bottom: 26px; border-bottom: 1px solid rgba(255,255,255,.1); }
.site-footer .brand-name { color: #fff; font-size: 1.3rem; }
.footer-tag { margin-top: 8px; font-size: .92rem; color: #9FB6CB; }
.footer-legal p { font-size: .82rem; line-height: 1.6; color: #A9C0D5; margin-bottom: 12px; }
.footer-legal strong { color: #E8F1F9; }
.footer-bottom { padding-top: 22px; font-size: .82rem; color: #90A9BF; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 940px) {
  .hero-inner { grid-template-columns: 1fr; gap: 34px; padding-top: 44px; }
  .header-cta { display: none; }
  .why-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; }
  .range svg { height: 100px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .section { padding: 58px 0; }
  .form-card { padding: 20px; }
  .field-row { grid-template-columns: 1fr; }
  .hero { padding-bottom: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
