/* Helpful Home Buyers — shared styles */

:root {
  color-scheme: light;

  --paper:        #FAF9F5;
  --surface:      #FFFFFF;
  --surface-alt:  #F1F0EA;
  --line:         #DFDDD3;
  --line-strong:  #C6C4B8;
  --ink:          #16211F;
  --muted:        #5D6B67;
  --primary:      #0E4F4A;
  --primary-hi:   #0A3B37;
  --primary-soft: #E4EFEC;
  --accent:       #B07C1E;
  --accent-soft:  #F6EEDC;
  --focus:        #0E4F4A;

  --f-display: "Fraunces", Georgia, "Times New Roman", serif;
  --f-body: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 1080px;
  --read: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper:        #111917;
    --surface:      #17211F;
    --surface-alt:  #1D2927;
    --line:         #2C3835;
    --line-strong:  #3D4B47;
    --ink:          #ECEFEC;
    --muted:        #9BAAA5;
    --primary:      #6FBCAF;
    --primary-hi:   #8FD2C6;
    --primary-soft: #1B2E2B;
    --accent:       #DDAF56;
    --accent-soft:  #2A2418;
    --focus:        #6FBCAF;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper:        #111917;
  --surface:      #17211F;
  --surface-alt:  #1D2927;
  --line:         #2C3835;
  --line-strong:  #3D4B47;
  --ink:          #ECEFEC;
  --muted:        #9BAAA5;
  --primary:      #6FBCAF;
  --primary-hi:   #8FD2C6;
  --primary-soft: #1B2E2B;
  --accent:       #DDAF56;
  --accent-soft:  #2A2418;
  --focus:        #6FBCAF;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-hi); }

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

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.15;
  text-wrap: balance;
  margin: 0;
  letter-spacing: -0.012em;
}

h1 { font-size: clamp(2.1rem, 5.2vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.12rem; font-family: var(--f-body); font-weight: 700; letter-spacing: 0; }

p { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.eyebrow {
  font-size: 0.735rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

/* ---------- header ---------- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-head .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  padding-block: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-display);
  font-size: 1.16rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
  margin-right: auto;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: var(--primary);
  color: var(--surface);
  font-family: var(--f-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

:root[data-theme="dark"] .brand-mark,
:root:not([data-theme="light"]) .brand-mark { color: #111917; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .brand-mark { color: #FFFFFF; }
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 0.925rem;
}

.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }

.head-phone {
  font-weight: 700;
  color: var(--ink) !important;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--surface);
  font-family: var(--f-body);
  font-size: 0.97rem;
  font-weight: 700;
  padding: 13px 22px;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

:root[data-theme="dark"] .btn,
:root:not([data-theme="light"]) .btn { color: #111917; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .btn { color: #FFFFFF; }
}

.btn:hover { background: var(--primary-hi); border-color: var(--primary-hi); }
.btn-wide { width: 100%; }

/* ---------- hero ---------- */

.hero { border-bottom: 1px solid var(--line); }

.hero .wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  padding-block: 52px 56px;
  align-items: start;
}

@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1.05fr 0.95fr; gap: 56px; }
}

.hero-copy { display: flex; flex-direction: column; gap: 20px; }
.hero-copy p.lede { font-size: 1.08rem; color: var(--muted); max-width: 46ch; }

.hero-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.97rem;
}

.hero-points li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
}

.hero-points li::before {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: 8px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

/* ---------- form ---------- */

.form-card {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 24px;
}

.form-card h2 { font-size: 1.32rem; }
.form-card > p.sub { font-size: 0.93rem; color: var(--muted); margin-top: 6px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 20px;
}

@media (min-width: 560px) {
  .form-grid .half { grid-column: span 1; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .full { grid-column: 1 / -1; }
}

.field { display: flex; flex-direction: column; gap: 5px; }

.field label {
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  font-family: var(--f-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 11px 12px;
  width: 100%;
}

.field textarea { resize: vertical; min-height: 84px; }

.consent {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  background: var(--surface-alt);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  accent-color: var(--primary);
}

.consent label { font-size: 0.875rem; line-height: 1.55; }
.consent .fine { display: block; margin-top: 7px; font-size: 0.8rem; color: var(--muted); }

.form-note {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- sections ---------- */

.section { border-bottom: 1px solid var(--line); }
.section .wrap { padding-block: 54px; }
.section-head { display: flex; flex-direction: column; gap: 8px; max-width: var(--read); }
.section-head p.sub { color: var(--muted); margin-top: 4px; }

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  margin-top: 32px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

@media (min-width: 760px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  background: var(--surface);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.step .num {
  font-family: var(--f-body);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.step p { font-size: 0.945rem; color: var(--muted); }

.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 30px;
}

@media (min-width: 800px) { .two-col { grid-template-columns: 1fr 1fr; gap: 44px; } }

.plain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 11px;
  font-size: 0.97rem;
}

.plain-list li {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 11px;
  align-items: start;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.plain-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.plain-list li::before { content: "—"; color: var(--accent); font-weight: 700; }

.faq { margin-top: 30px; display: flex; flex-direction: column; gap: 0; max-width: var(--read); }

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 1rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--muted); font-size: 0.95rem; }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 28px;
}

@media (min-width: 700px) { .contact-grid { grid-template-columns: repeat(3, 1fr); } }

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.contact-item .k {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.contact-item .v { font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.contact-item address { font-style: normal; font-size: 0.95rem; line-height: 1.5; }

/* ---------- legal pages ---------- */

.legal .wrap { padding-block: 48px 64px; max-width: 800px; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--muted); font-size: 0.89rem; }

.legal h2 {
  font-size: 1.28rem;
  margin-top: 38px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.legal h3 { margin-top: 24px; font-size: 1.02rem; }
.legal p, .legal li { font-size: 0.975rem; }
.legal p { margin-top: 12px; }
.legal ul, .legal ol { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; }

.callout {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
}

.callout p { margin-top: 0; }
.callout p + p { margin-top: 10px; }

.sms-table { margin-top: 16px; overflow-x: auto; }

.sms-table table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 0.93rem;
}

.sms-table th, .sms-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.sms-table th {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
}

/* ---------- footer ---------- */

.site-foot {
  background: var(--surface);
  border-top: 1px solid var(--line);
}

.site-foot .wrap {
  padding-block: 36px 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
}

@media (min-width: 760px) { .site-foot .wrap { grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; } }

.foot-col { display: flex; flex-direction: column; gap: 9px; font-size: 0.92rem; }
.foot-col .k {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.foot-col a { color: var(--muted); text-decoration: none; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; }
.foot-col address { font-style: normal; color: var(--muted); line-height: 1.55; }

.foot-legal {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.835rem;
  line-height: 1.6;
}

.foot-legal .wrap { padding-block: 18px 26px; display: flex; flex-direction: column; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
