/* ==========================================================================
   Viador Homeowner Advisory (VHA) substyle
   Scoped to /homeowner-equity-review and /hemr only. Coexists with the
   institutional dark-dominant styles.css; those two pages do NOT load
   styles.css, so everything needed is defined here explicitly.
   Light cream base, editorial type, restrained motion. No pure black.
   ========================================================================== */

:root {
  --vha-base: #FAF7F2;
  --vha-surface: #FFFFFF;
  --vha-text: #1C2321;
  --vha-text-muted: #4A5352;
  --vha-primary: #1F3A2E;
  --vha-primary-hover: #2A5140;
  --vha-accent: #B8935A;
  --vha-success: #3D6B4E;
  --vha-border: #E8E2D5;
  --vha-shadow: 0 2px 8px rgba(28, 35, 33, 0.06);
  --vha-shadow-hover: 0 4px 16px rgba(28, 35, 33, 0.10);
  --vha-maxw: 1120px;
}

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

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--vha-base);
  color: var(--vha-text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography (mobile-first; desktop overrides at >=768px) ------------- */
h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  color: var(--vha-text);
}
h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: 32px; line-height: 1.15; }
h3 { font-size: 24px; line-height: 1.25; }

p { color: var(--vha-text); }

a { color: var(--vha-primary); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: color 220ms ease; }
a:hover { color: var(--vha-accent); }

.vha-body-lg { font-size: 18px; line-height: 1.55; color: var(--vha-text); }
.vha-small { font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--vha-text-muted); }
.vha-muted { color: var(--vha-text-muted); }

/* ---- Layout helpers ------------------------------------------------------ */
.vha-inner { max-width: var(--vha-maxw); margin: 0 auto; padding: 0 20px; }
.vha-section { padding: 72px 0; }
.vha-section > .vha-inner { }
.vha-prose { max-width: 68ch; }
.vha-wide { max-width: 84ch; }
.vha-center { text-align: center; }

/* ---- Nav ----------------------------------------------------------------- */
.vha-nav {
  background: var(--vha-base);
  border-bottom: 1px solid var(--vha-border);
}
.vha-nav-inner {
  max-width: var(--vha-maxw);
  margin: 0 auto;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.vha-wordmark {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--vha-primary);
  text-decoration: none;
}
.vha-wordmark:hover { color: var(--vha-primary); }
.vha-nav-phone {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--vha-primary);
  text-decoration: none;
  white-space: nowrap;
}
.vha-nav-phone:hover { color: var(--vha-accent); }

/* ---- Buttons ------------------------------------------------------------- */
.vha-btn {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.01em;
  padding: 18px 32px;
  border-radius: 4px;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 220ms ease;
  border: 1.5px solid transparent;
}
.vha-btn-primary {
  background: var(--vha-primary);
  color: var(--vha-base);
  border-color: var(--vha-primary);
}
.vha-btn-primary:hover {
  background: var(--vha-primary-hover);
  border-color: var(--vha-primary-hover);
  color: var(--vha-base);
  transform: translateY(-1px);
  box-shadow: var(--vha-shadow-hover);
}
.vha-btn-secondary {
  background: transparent;
  color: var(--vha-primary);
  border: 1.5px solid var(--vha-primary);
}
.vha-btn-secondary:hover {
  transform: translateY(-1px);
  box-shadow: var(--vha-shadow-hover);
  color: var(--vha-primary);
}
.vha-btn:focus-visible { outline: 2px solid var(--vha-accent); outline-offset: 2px; }
.vha-btn-row { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 8px; }

/* ---- Cards --------------------------------------------------------------- */
.vha-card {
  background: var(--vha-surface);
  border: 1px solid var(--vha-border);
  border-radius: 8px;
  box-shadow: var(--vha-shadow);
  padding: 28px;
}
.vha-card h3 { color: var(--vha-primary); margin-bottom: 16px; }
.vha-card-interactive { transition: all 220ms ease; }
.vha-card-interactive:hover { box-shadow: var(--vha-shadow-hover); transform: translateY(-2px); }

/* ---- Check-bullet lists -------------------------------------------------- */
.vha-checks { list-style: none; margin: 24px 0; padding: 0; }
.vha-checks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--vha-text);
  font-size: 16px;
  line-height: 1.6;
}
.vha-check { flex: 0 0 24px; width: 24px; height: 24px; color: var(--vha-primary); margin-top: 1px; }
.vha-list { list-style: none; margin: 24px 0; padding: 0; }
.vha-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 12px;
  color: var(--vha-text);
  line-height: 1.6;
}
.vha-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 11px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--vha-accent);
}

/* ---- Hero ---------------------------------------------------------------- */
.vha-hero { padding: 72px 0; }
.vha-hero-grid { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: start; }
.vha-hero h1 { margin-bottom: 24px; }
.vha-hero .vha-sub { margin-bottom: 8px; }
.vha-aside-card {
  background: var(--vha-surface);
  border: 1px solid var(--vha-border);
  border-radius: 8px;
  box-shadow: var(--vha-shadow);
  padding: 28px;
}
.vha-aside-card h3 { color: var(--vha-primary); margin-bottom: 16px; font-size: 22px; }

/* ---- Section headings and body ------------------------------------------ */
.vha-section h2 { margin-bottom: 24px; }
.vha-section p { color: var(--vha-text); margin-bottom: 16px; line-height: 1.6; }
.vha-section p.vha-muted { color: var(--vha-text-muted); }
.vha-eyebrow {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--vha-accent);
  margin-bottom: 12px;
}

/* Alternating surface tint for rhythm (still cream family, never pure white full-bleed) */
.vha-section-tint { background: #F5F1E9; }

/* ---- Qualifier 2x2 grid -------------------------------------------------- */
.vha-grid-2 { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }

/* ---- Comparison cards ---------------------------------------------------- */
.vha-compare { display: grid; grid-template-columns: 1fr; gap: 24px; margin-top: 32px; }
.vha-compare .vha-card h3 { margin-bottom: 8px; }
.vha-compare .vha-compare-sub { color: var(--vha-text-muted); font-size: 16px; margin-bottom: 16px; line-height: 1.5; }
.vha-disclosure {
  margin-top: 24px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--vha-text-muted);
  font-style: italic;
}

/* ---- Pull quote ---------------------------------------------------------- */
.vha-pullquote {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 1.4;
  color: var(--vha-primary);
  border-left: 1px solid var(--vha-accent);
  padding-left: 24px;
  margin: 32px 0 0;
  max-width: 68ch;
}

/* ---- Process steps ------------------------------------------------------- */
.vha-steps { list-style: none; counter-reset: vha-step; margin: 32px 0 0; padding: 0; }
.vha-steps li {
  counter-increment: vha-step;
  position: relative;
  padding-left: 56px;
  margin-bottom: 32px;
}
.vha-steps li::before {
  content: counter(vha-step);
  position: absolute;
  left: 0; top: 0;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--vha-primary);
  color: var(--vha-base);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 17px;
}
.vha-steps .vha-step-title { font-weight: 600; color: var(--vha-text); font-size: 18px; margin-bottom: 6px; display: block; }
.vha-steps p { color: var(--vha-text-muted); margin: 0; }

/* ---- Bottom CTA ---------------------------------------------------------- */
.vha-cta { padding: 120px 0; text-align: center; }
.vha-cta h2 { margin-bottom: 16px; }
.vha-cta .vha-btn-row { justify-content: center; margin-top: 32px; }

/* ---- Footer -------------------------------------------------------------- */
.vha-footer {
  background: var(--vha-text);
  color: var(--vha-base);
  padding: 48px 0;
}
.vha-footer .vha-inner { text-align: center; }
.vha-footer p { color: var(--vha-base); margin-bottom: 10px; font-size: 13px; line-height: 1.6; }
.vha-footer .vha-footer-addr { color: var(--vha-base); font-size: 13px; margin-bottom: 10px; }
.vha-footer .vha-footer-fine { color: rgba(250, 247, 242, 0.62); font-size: 12px; font-style: italic; line-height: 1.6; margin-bottom: 0; max-width: 84ch; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   Intake form (/hemr) restyle. JS depends on: form#hemrForm, .step,
   [data-step], .active, #hemrMsg, button onclick hemrNext/hemrBack.
   Those hooks are preserved; only presentation changes here.
   ========================================================================== */
.vha-intake-wrap { max-width: 640px; margin: 0 auto; padding: 0 20px; }
.vha-intake-head { padding: 56px 0 24px; text-align: left; }
.vha-intake-head h1 { margin-bottom: 12px; }
.vha-intake-head .vha-sub { color: var(--vha-text-muted); }

.vha-form {
  background: var(--vha-surface);
  border: 1px solid var(--vha-border);
  border-radius: 8px;
  box-shadow: var(--vha-shadow);
  padding: 28px;
  margin-bottom: 56px;
  color: var(--vha-text);
}
.vha-form h2 { font-size: 24px; margin-bottom: 24px; color: var(--vha-primary); }

/* Progress indicator */
.vha-progress { display: flex; gap: 8px; margin-bottom: 24px; }
.vha-progress span { flex: 1; height: 4px; border-radius: 2px; background: var(--vha-border); }
.vha-progress span.filled { background: var(--vha-accent); }

.vha-form .step { display: none; }
.vha-form .step.active { display: block; }

.vha-form label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--vha-text-muted);
  margin: 20px 0 8px;
}
.vha-form input,
.vha-form select {
  display: block;
  width: 100%;
  background: var(--vha-surface);
  border: 1.5px solid var(--vha-border);
  border-radius: 4px;
  padding: 16px 18px;
  min-height: 56px;
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  color: var(--vha-text);
}
.vha-form input:focus,
.vha-form select:focus {
  outline: none;
  border-color: var(--vha-primary);
  box-shadow: 0 0 0 3px rgba(31, 58, 46, 0.12);
}

/* Radio groups */
.vha-form .radio-group { margin-top: 4px; }
.vha-form .radio-group label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  font-size: 16px;
  color: var(--vha-text);
  margin: 0 0 10px;
  cursor: pointer;
}
.vha-form .radio-group input {
  width: 24px; height: 24px; min-height: 24px;
  margin: 0;
  accent-color: var(--vha-primary);
  flex: 0 0 24px;
}

/* TCPA consent block */
.vha-form .tcpa {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--vha-border);
}
.vha-form .tcpa label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--vha-text-muted);
  margin: 0;
}
.vha-form .tcpa input[type="checkbox"] {
  width: 24px; height: 24px; min-height: 24px;
  flex: 0 0 24px;
  margin-top: 1px;
  accent-color: var(--vha-primary);
}

/* Actions */
.vha-form .actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.vha-form .actions button { flex: 1 1 auto; }
.vha-form button {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.01em;
  padding: 18px 32px;
  border-radius: 4px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 220ms ease;
}
.vha-form button.primary { background: var(--vha-primary); color: var(--vha-base); border-color: var(--vha-primary); }
.vha-form button.primary:hover { background: var(--vha-primary-hover); border-color: var(--vha-primary-hover); transform: translateY(-1px); box-shadow: var(--vha-shadow-hover); }
.vha-form button.secondary { background: transparent; color: var(--vha-primary); border: 1.5px solid var(--vha-primary); }
.vha-form button.secondary:hover { transform: translateY(-1px); box-shadow: var(--vha-shadow-hover); }
.vha-form button:focus-visible { outline: 2px solid var(--vha-accent); outline-offset: 2px; }

.vha-form .msg-ok { color: var(--vha-success); padding: 16px 18px; background: rgba(61, 107, 78, 0.08); border-radius: 4px; }
.vha-form .msg-err { color: #8A2B2B; padding: 16px 18px; background: #F8EBEB; border-radius: 4px; }
.vha-form .compliance { font-size: 12px; color: var(--vha-text-muted); margin-top: 24px; text-align: center; line-height: 1.6; }

/* ---- Desktop overrides --------------------------------------------------- */
@media (min-width: 768px) {
  h1 { font-size: 64px; }
  h2 { font-size: 44px; }
  h3 { font-size: 28px; }
  .vha-body-lg { font-size: 20px; }
  .vha-small { font-size: 14px; }

  .vha-inner { padding: 0 32px; }
  .vha-nav-inner { padding: 20px 32px; }
  .vha-section { padding: 120px 0; }
  .vha-hero { padding: 96px 0; }
  .vha-hero-grid { grid-template-columns: 1.3fr 1fr; gap: 64px; }
  .vha-card { padding: 40px; }
  .vha-aside-card { padding: 40px; }
  .vha-grid-2 { grid-template-columns: 1fr 1fr; }
  .vha-compare { grid-template-columns: 1fr 1fr 1fr; }
  .vha-pullquote { font-size: 28px; padding-left: 32px; }
  .vha-intake-head { padding: 72px 0 24px; }
  .vha-form { padding: 40px; }
  .vha-form .actions button { flex: 0 0 auto; }
  .vha-footer .vha-footer-fine { font-size: 13px; }
}

/* ---- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  * { transition-property: color, background-color, border-color, box-shadow !important; }
  .vha-btn:hover, .vha-btn-primary:hover, .vha-btn-secondary:hover,
  .vha-card-interactive:hover, .vha-form button:hover { transform: none !important; }
}
