/* ============================================================================
   CreditFreeHomeBuying.com — styles
   System-font stack (no web-font download = faster LCP, no third-party cost).
   Mobile-first. Targets WCAG AA contrast.
   ============================================================================ */

:root {
  --navy: #0e3a5a;
  --navy-deep: #0a2c45;
  --green: #0f6b3e;        /* CTA — white text on this is ~4.9:1 */
  --green-dark: #0b5432;
  --ink: #1f2933;
  --ink-soft: #46535f;
  --line: #d7dee4;
  --bg: #ffffff;
  --bg-alt: #f4f7f9;
  --bg-card: #ffffff;
  --accent-bg: #eef4f1;
  --err: #b4231f;
  --err-bg: #fdf0ef;
  --focus: #1573c4;
  --radius: 10px;
  --shadow: 0 2px 8px rgba(14, 58, 90, .08), 0 12px 32px rgba(14, 58, 90, .10);
  --wrap: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 5vw, 2.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1rem; }
a { color: var(--navy); }
img, svg { max-width: 100%; height: auto; display: block; }

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

.skip-link {
  position: absolute; left: 8px; top: -64px; z-index: 200;
  background: #fff; color: var(--navy); padding: 10px 16px; border-radius: 8px;
  border: 2px solid var(--navy); transition: top .15s;
}
.skip-link:focus { top: 8px; }

:where(a, button, input, select, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------- Buttons -------------------------------- */
.btn {
  display: inline-block;
  font: inherit; font-weight: 700;
  text-decoration: none; text-align: center;
  border: 2px solid transparent; border-radius: var(--radius);
  padding: .8rem 1.4rem; cursor: pointer;
  transition: background-color .15s, transform .05s;
}
.btn--primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn--primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn--primary:active { transform: translateY(1px); }
.btn--primary[disabled] { opacity: .65; cursor: progress; }
.btn--lg { padding: 1rem 1.8rem; font-size: 1.075rem; }
.btn--sm { padding: .55rem 1rem; font-size: .95rem; }
.btn--block { display: block; width: 100%; }

/* --------------------------------- Header --------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; gap: 12px;
  min-height: 60px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 800; color: var(--navy); }
.brand__name { font-size: 1.05rem; letter-spacing: -.01em; }
.brand__name span { color: var(--green); }
.site-nav { display: none; gap: 20px; margin-left: auto; align-items: center; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.site-nav a:hover { color: var(--navy); }
.site-nav .tel-link { color: var(--navy); }

/* Header CTA hidden on the smallest screens (the sticky bottom bar + hero CTA
   cover mobile); shown from tablet up. */
.header-cta { display: none; margin-left: auto; }

@media (min-width: 600px) {
  .header-cta { display: inline-block; }
}
@media (min-width: 860px) {
  .site-nav { display: flex; }
  .header-cta { margin-left: 24px; }
}

/* ---------------------------------- Hero ---------------------------------- */
.hero {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #eaf1f6;
  padding: 40px 0 48px;
}
.hero__grid { display: grid; gap: 32px; }
@media (min-width: 900px) {
  .hero { padding: 64px 0 72px; }
  .hero__grid { grid-template-columns: 1fr 430px; gap: 48px; align-items: start; }
}
.hero__copy h1 { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: #9ec7e0; margin: 0 0 .6rem; }
.lede { font-size: 1.12rem; color: #d5e2ec; }
.trust-strip { list-style: none; margin: 1.25rem 0; padding: 0; display: grid; gap: 8px; }
.trust-strip li { position: relative; padding-left: 28px; color: #eaf1f6; font-weight: 600; }
.trust-strip li::before {
  content: ""; position: absolute; left: 0; top: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--green);
}
.trust-strip li::after {
  content: ""; position: absolute; left: 6px; top: 7px;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.hero__cta { margin-top: 8px; }
.hero__reassure { font-size: .9rem; color: #b9cedd; margin-top: .6rem; }

/* ------------------------------- Form card -------------------------------- */
.form-card {
  background: var(--bg-card); color: var(--ink);
  border-radius: 14px; box-shadow: var(--shadow);
  padding: 22px;
}
.form-card__proof {
  background: var(--accent-bg); border: 1px solid #d4e6dd;
  border-radius: var(--radius); padding: 12px 14px; font-size: .92rem;
  margin-bottom: 16px;
}
.placeholder-note {
  display: block; margin-top: 6px; font-size: .8rem; color: #8a5a00;
  background: #fff6e5; border: 1px dashed #e0b357; border-radius: 6px; padding: 4px 8px;
}
.form-card h2 { font-size: 1.35rem; }

.row { display: grid; gap: 14px; }
@media (min-width: 420px) { .row { grid-template-columns: 1fr 1fr; } }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 5px; color: var(--navy); }
.field .opt { font-weight: 500; color: var(--ink-soft); }
.field input,
.field select {
  width: 100%; font: inherit; color: var(--ink);
  padding: .7rem .8rem; border: 1.5px solid var(--line);
  border-radius: 8px; background: #fff;
}
.field input:hover, .field select:hover { border-color: #a9b6c0; }
.field__hint { font-size: .82rem; color: var(--ink-soft); margin: 5px 0 0; }
.field__err {
  display: none; font-size: .84rem; color: var(--err); font-weight: 600; margin: 5px 0 0;
}
.field--error input, .field--error select { border-color: var(--err); background: var(--err-bg); }
.field--error .field__err { display: block; }

.field--check { margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: .88rem; color: var(--ink-soft); cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--green); }
.check span { line-height: 1.45; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-microcopy { font-size: .82rem; color: var(--ink-soft); margin: 12px 0 0; text-align: center; }

.form-status { margin: 12px 0 0; font-weight: 600; text-align: center; min-height: 1.2em; }
.form-status--pending { color: var(--navy); }
.form-status--error { color: var(--err); }

.form-fallback {
  margin-top: 16px; padding: 14px; border-radius: var(--radius);
  background: var(--err-bg); border: 1px solid #eabfbd; font-size: .92rem;
}
.form-fallback__contact { font-weight: 700; font-size: 1.05rem; }
.form-fallback__contact a { color: var(--navy); }

.form-success { text-align: center; padding: 8px 4px 4px; }
.form-success h2 { color: var(--green-dark); }
.form-success .tick {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--green); position: relative;
}
.form-success .tick::after {
  content: ""; position: absolute; left: 19px; top: 15px;
  width: 12px; height: 22px; border: solid #fff; border-width: 0 4px 4px 0; transform: rotate(45deg);
}

/* -------------------------------- Sections -------------------------------- */
.section { padding: 48px 0; }
.section--alt { background: var(--bg-alt); }
.section__lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 60ch; }
@media (min-width: 820px) { .section { padding: 68px 0; } }

.cards { display: grid; gap: 16px; margin: 24px 0 28px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 940px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 8px;
}
.card h3 { color: var(--navy); }
.card--quote { background: #fff; }
.card--quote p:first-child { font-size: 1.02rem; }
.card__attr { font-size: .88rem; color: var(--ink-soft); font-weight: 600; }

.callout {
  background: var(--accent-bg); border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: 16px 18px; font-size: 1.02rem;
  max-width: 70ch; margin: 8px 0 24px;
}

/* --------------------------------- Steps --------------------------------- */
.steps { list-style: none; counter-reset: s; margin: 26px 0 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 780px) { .steps { grid-template-columns: repeat(2, 1fr); gap: 24px; } }
.steps li {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; position: relative;
}
.section--alt .steps li { background: #fff; }
.steps__n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 800; margin-bottom: 8px;
}
.steps h3 { margin-top: 0; }
.steps p { margin-bottom: 0; color: var(--ink-soft); }

/* ------------------------------ Straight talk ---------------------------- */
.straight-talk { margin: 22px 0 0; padding: 0 0 0 0; list-style: none; display: grid; gap: 12px; max-width: 72ch; }
.straight-talk li {
  padding: 14px 16px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius);
}
.straight-talk strong { color: var(--navy); }

.placeholder-banner {
  background: #fff6e5; border: 1px dashed #e0b357; border-radius: var(--radius);
  padding: 14px 16px; font-size: .95rem; color: #7a5200; max-width: 72ch;
}

/* --------------------------------- About --------------------------------- */
.about { max-width: 72ch; }
.about__contact {
  background: var(--accent-bg); border-radius: var(--radius); padding: 16px 18px;
  line-height: 1.9;
}

/* ---------------------------------- FAQ ---------------------------------- */
#faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 4px 18px; margin-bottom: 10px;
}
#faq summary {
  cursor: pointer; font-weight: 700; color: var(--navy);
  padding: 14px 0; list-style: none; position: relative; padding-right: 28px;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::after {
  content: "+"; position: absolute; right: 0; top: 12px; font-size: 1.4rem;
  font-weight: 400; color: var(--green); line-height: 1;
}
#faq details[open] summary::after { content: "\2013"; }
#faq details p { margin: 0 0 14px; color: var(--ink-soft); }
.faq-cta { margin-top: 24px; }

/* -------------------------------- Footer --------------------------------- */
.site-footer { background: var(--navy-deep); color: #c4d4e0; padding: 40px 0 90px; font-size: .9rem; }
@media (min-width: 720px) { .site-footer { padding-bottom: 44px; } }
.site-footer a { color: #dceaf4; }
.site-footer__brand { font-weight: 800; color: #fff; font-size: 1.05rem; margin-bottom: 6px; }
.site-footer__legal { margin-bottom: 12px; }
.site-footer__disclaimer { color: #91a8ba; line-height: 1.55; max-width: 78ch; }
.site-footer__links { margin: 12px 0 4px; font-weight: 600; }
.site-footer__copy { color: #7f97aa; }

/* ------------------------------ Sticky CTA ------------------------------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: block; text-align: center; text-decoration: none;
  background: var(--green); color: #fff; font-weight: 800;
  padding: 14px 16px; box-shadow: 0 -2px 12px rgba(0, 0, 0, .18);
}
.sticky-cta:hover { background: var(--green-dark); }
@media (min-width: 720px) { .sticky-cta { display: none; } }

/* --------------------------- Placeholder inline -------------------------- */
.placeholder-banner strong { color: #7a5200; }
