/* DFW Home Buyers — landing page styles (mobile-first) */

:root {
  --navy-900: #0d1b2a;
  --navy-800: #13293d;
  --navy-700: #1b3a57;
  --teal-600: #0f766e;
  --teal-500: #14918a;
  --gold-500: #d9a441;
  --ink: #16202b;
  --ink-soft: #4a5a6a;
  --line: #dfe6ee;
  --bg: #ffffff;
  --bg-alt: #f5f8fb;
  --ok-bg: #e7f6ee;
  --ok-ink: #14663f;
  --err: #b3261e;
  --shadow-sm: 0 1px 2px rgba(13, 27, 42, .06), 0 2px 8px rgba(13, 27, 42, .06);
  --shadow-md: 0 6px 24px rgba(13, 27, 42, .10);
  --radius: 14px;
  --radius-sm: 10px;
  --container: 1120px;
  --space: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

/* Keep in-page anchor targets clear of the sticky header */
[id] { scroll-margin-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { line-height: 1.2; color: var(--navy-900); margin: 0 0 .5em; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.85rem, 1.2rem + 3.2vw, 3.1rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 1.05rem + 1.6vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.075rem; font-weight: 700; }
p { margin: 0 0 1rem; }
a { color: var(--teal-600); }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: clamp(1rem, 0.4rem + 2.4vw, 2rem); }
.container.narrow { max-width: 760px; }
.section { padding-block: clamp(2.5rem, 1.5rem + 4vw, 4.5rem); }
.section > .container, .hero-inner { scroll-margin-top: 88px; }
.section-alt { background: var(--bg-alt); }
.section-sub { color: var(--ink-soft); max-width: 60ch; margin-bottom: 1.5rem; }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }

.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;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy-900); color: #fff; padding: .7rem 1rem; border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 2px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--navy-900); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--navy-900); color: #fff; flex: 0 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 1rem; }
.brand-text small { color: var(--ink-soft); font-size: .78rem; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--line); background: #fff;
  border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--navy-900); border-radius: 2px; position: relative;
}
.nav-toggle-bar::before { position: absolute; top: -6px; }
.nav-toggle-bar::after { position: absolute; top: 6px; }

.nav-list {
  list-style: none; margin: 0; padding: 0;
  display: none; flex-direction: column; gap: .25rem;
  position: absolute; left: 0; right: 0; top: 100%;
  background: #fff; border-bottom: 1px solid var(--line); padding: 1rem clamp(1rem, 0.4rem + 2.4vw, 2rem) 1.25rem;
  box-shadow: var(--shadow-md);
}
.nav-list.is-open { display: flex; }
.nav-list a { text-decoration: none; color: var(--navy-800); font-weight: 600; padding: .55rem 0; display: inline-block; }
.nav-list a:hover { color: var(--teal-600); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  padding: .8rem 1.35rem; transition: transform .12s ease, background-color .15s ease, box-shadow .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--teal-600); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--teal-500); }
.btn-ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost:hover { background: rgba(255,255,255,.24); }
.btn-lg { padding: .95rem 1.7rem; font-size: 1.02rem; }
.btn-sm { padding: .55rem 1.05rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero-media {
  position: absolute; inset: 0; z-index: -2;
  background: url("../img/hero-dallas-skyline.jpg") center 35% / cover no-repeat;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(9,20,32,.72), rgba(9,20,32,.86));
}
.hero-inner { padding-block: clamp(3.5rem, 2rem + 9vw, 7rem); max-width: 780px; }
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700;
  color: var(--gold-500); margin-bottom: 1rem;
}
.hero h1 { color: #fff; text-wrap: balance; }
.lede { font-size: clamp(1.02rem, .95rem + .5vw, 1.2rem); color: #e8eef5; max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.hero-note { margin-top: 1rem; color: #c9d6e3; font-size: .9rem; }
.hero-phone { color: #fff; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.hero-phone:hover { color: var(--gold-500); }

.nav-phone { white-space: nowrap; }

.contact-strip {
  background: #eef5f4; border: 1px solid #cfe3e1; border-left: 4px solid var(--teal-600);
  border-radius: var(--radius-sm); padding: .75rem .95rem; font-size: .95rem; margin-bottom: 1.25rem;
}
.contact-strip a { font-weight: 700; }

/* ---------- Cards ---------- */
.card-grid { display: grid; gap: 1rem; grid-template-columns: 1fr; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: .35rem; }
.card p { margin: 0; color: var(--ink-soft); }
.card-icon {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px;
  background: #e8f2f1; color: var(--teal-600); margin-bottom: .9rem;
}

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; counter-reset: step; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow-sm); }
.step-num {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-900); color: #fff; font-weight: 800; margin-bottom: .7rem; font-size: .95rem;
}
.steps h3 { margin-bottom: .3rem; }
.steps p { margin: 0; color: var(--ink-soft); }

/* ---------- Split ---------- */
.split-inner { display: grid; gap: 1.5rem; align-items: center; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }

.check-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.check-list li { position: relative; padding-left: 1.85rem; margin-bottom: .55rem; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 1.05rem; height: .55rem;
  border-left: 2.5px solid var(--teal-600); border-bottom: 2.5px solid var(--teal-600);
  transform: rotate(-45deg);
}

/* ---------- Form ---------- */
.lead-form {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.1rem, .8rem + 1.4vw, 1.9rem); box-shadow: var(--shadow-md);
  display: grid; gap: 1rem;
}
.field { display: grid; gap: .35rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
label { font-weight: 600; color: var(--navy-800); font-size: .95rem; }
.req { color: var(--err); }
.optional { color: var(--ink-soft); font-weight: 500; }
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%; font: inherit; color: var(--ink); background: #fff;
  border: 1px solid #c7d2de; border-radius: var(--radius-sm); padding: .75rem .85rem;
}
input:hover, select:hover { border-color: #a9b8c8; }
input:focus, select:focus { border-color: var(--teal-600); }
input[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); background: #fff7f6; }
.error { color: var(--err); font-size: .85rem; margin: .1rem 0 0; }

.checkbox { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; font-size: .92rem; color: var(--ink-soft); }
.checkbox input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; flex: 0 0 auto; accent-color: var(--teal-600); }

.form-status { margin: 0; font-size: .92rem; }
.form-status.ok { background: var(--ok-bg); color: var(--ok-ink); border-radius: var(--radius-sm); padding: .8rem .95rem; }
.form-status.bad { background: #fdecea; color: var(--err); border-radius: var(--radius-sm); padding: .8rem .95rem; }

.form-note {
  background: #eef5f4; border: 1px solid #cfe3e1; border-left: 4px solid var(--teal-600);
  border-radius: var(--radius-sm); padding: .8rem 1rem; font-size: .92rem; color: #24514d;
}

/* Formspree honeypot — hidden from humans, visible to naive bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: #cdd8e3; padding-block: 2.25rem; margin-top: 1rem; }
.footer-inner { display: grid; gap: 1.25rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: #9fd8d2; }
.footer-note p { margin-bottom: .4rem; }
.site-footer .muted { color: #93a4b6; }

.footer-legal {
  border-top: 1px solid rgba(255,255,255,.14);
  margin-top: 1.75rem; padding-top: 1.25rem;
}
.legal-links {
  list-style: none; margin: 0 0 .7rem; padding: 0;
  display: flex; flex-wrap: wrap; gap: .4rem 1.35rem;
}
.legal-links a { color: #9fd8d2; font-size: .875rem; }
.footer-legal a { color: #9fd8d2; }
.footer-legal .muted { color: #93a4b6; }

/* ---------- Larger screens ---------- */
@media (min-width: 640px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .field-row { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(4, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .split-inner { grid-template-columns: 1.1fr 1fr; gap: 2.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; align-items: start; }

  .nav-toggle { display: none; }
  .nav-list {
    display: flex; flex-direction: row; align-items: center; gap: .35rem;
    position: static; box-shadow: none; border: 0; padding: 0; background: transparent;
  }
  .nav-list a { padding: .5rem .75rem; }
  .nav-list .btn { margin-left: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
