/* ==========================================================================
   Contractor Financing Fit Check — Design System
   Motif: "spec sheet" — mono annotations, rule lines, punch-list fit markers
   Palette: Ink Navy / Warm Paper / Jobsite Amber / Verify Green
   ========================================================================== */

:root {
  --ink: #16233a;
  --ink-soft: #24344f;
  --slate: #44506a;
  --paper: #f7f6f2;
  --white: #ffffff;
  --amber: #e8830c;
  --amber-dark: #c96e06;
  --green: #2f7d5b;
  --red: #b3502d;
  --line: #ddd9ce;
  --line-dark: #c9c4b6;
  --radius: 10px;
  --font-display: "Archivo", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --maxw: 1120px;
  --shadow: 0 2px 10px rgba(22, 35, 58, 0.08);
  --shadow-lg: 0 10px 34px rgba(22, 35, 58, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--ink); }
img { max-width: 100%; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 780px; }

/* Spec-sheet eyebrow: mono label with rule line */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber-dark);
  margin-bottom: 14px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line-dark); max-width: 160px; }

/* Fit markers (signature element) */
.mark { font-family: var(--font-mono); font-weight: 600; margin-right: 8px; }
.mark-yes { color: var(--green); }
.mark-maybe { color: var(--amber-dark); }
.mark-no { color: var(--red); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 1.02rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.logo span { color: var(--amber); }
.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  text-decoration: none; color: var(--slate); font-size: 0.95rem; font-weight: 500;
}
.nav a:hover { color: var(--ink); }
.nav .btn { padding: 9px 18px; font-size: 0.9rem; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); border-radius: 8px; padding: 8px 10px; font-family: var(--font-mono); font-size: 0.8rem; cursor: pointer; color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  text-decoration: none; text-align: center;
  padding: 14px 26px; border-radius: var(--radius);
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.12s ease, background 0.12s ease;
}
.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--amber); outline-offset: 2px;
}
.btn-primary { background: var(--amber); color: #fff; }
.btn-primary:hover { background: var(--amber-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-block { display: block; width: 100%; }

/* ---------- Hero ---------- */
.hero { padding: 64px 0 72px; }
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero .lede { font-size: 1.14rem; max-width: 34em; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 18px; }
.trust-line { font-size: 0.92rem; color: var(--slate); border-left: 3px solid var(--amber); padding-left: 14px; max-width: 34em; }

/* Hero fit-card (spec sheet preview) */
.fit-card {
  background: var(--white); border: 1px solid var(--line);
  border-radius: 14px; box-shadow: var(--shadow-lg); padding: 26px;
}
.fit-card-head {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--slate);
  display: flex; justify-content: space-between; border-bottom: 1px dashed var(--line-dark);
  padding-bottom: 12px; margin-bottom: 14px;
}
.fit-card ul { list-style: none; margin: 0 0 6px; padding: 0; }
.fit-card li {
  padding: 9px 0; border-bottom: 1px solid var(--line);
  font-size: 0.95rem; color: var(--ink-soft); display: flex; align-items: baseline;
}
.fit-card li:last-child { border-bottom: none; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-ink { background: var(--ink); }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-ink p, .section-ink li { color: #cfd6e4; }
.section-ink .eyebrow { color: var(--amber); }
.section-ink .eyebrow::after { background: #3a4a68; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { padding: 8px 0; display: flex; align-items: baseline; }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow);
}
.card h3 { margin-top: 4px; }
.card .kicker { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-dark); }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { position: relative; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-mono); color: var(--amber); font-size: 0.85rem; display: block; margin-bottom: 8px;
}

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.compare { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 0.94rem; }
table.compare th, table.compare td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare thead th {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--slate); background: var(--paper); border-bottom: 2px solid var(--line-dark);
}
table.compare tbody tr:last-child td { border-bottom: none; }
table.compare td strong { color: var(--ink); font-family: var(--font-display); }

/* ---------- VSL ---------- */
.video-frame {
  position: relative; padding-top: 56.25%; background: var(--ink); border-radius: 14px;
  overflow: hidden; box-shadow: var(--shadow-lg);
}
.video-frame iframe, .video-frame .video-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-placeholder { display: flex; align-items: center; justify-content: center; flex-direction: column; color: #93a2bd; font-family: var(--font-mono); font-size: 0.85rem; gap: 10px; text-align: center; padding: 20px; }
.video-placeholder .play { width: 66px; height: 66px; border-radius: 50%; background: var(--amber); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; }
details.transcript { margin-top: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
details.transcript summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; color: var(--ink); }
details.transcript p { margin-top: 1em; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary { cursor: pointer; font-family: var(--font-display); font-weight: 700; color: var(--ink); padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--amber); }
.faq details[open] summary::after { content: "–"; }
.faq div { padding: 0 0 14px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #b9c3d6; padding: 52px 0 90px; font-size: 0.92rem; }
.site-footer a { color: #e6ebf4; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin: 7px 0; }
.disclosure-box {
  border: 1px dashed #3a4a68; border-radius: var(--radius); padding: 16px 18px;
  font-size: 0.86rem; color: #9fabc2; margin-top: 10px;
}
.footer-legal { border-top: 1px solid #2b3a57; padding-top: 18px; font-size: 0.8rem; color: #8592ab; }

/* Inline disclosure near CTAs */
.mini-disclosure { font-size: 0.8rem; color: var(--slate); margin-top: 10px; font-style: italic; }

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  background: var(--ink); padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  display: none; box-shadow: 0 -6px 20px rgba(0,0,0,0.18);
}
.sticky-cta .btn { width: 100%; }

/* ---------- Quiz ---------- */
.quiz-shell { max-width: 660px; margin: 0 auto; padding: 44px 0 90px; }
.progress { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 18px 0 30px; }
.progress-bar { height: 100%; width: 0; background: var(--amber); transition: width 0.25s ease; }
.progress-label { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.1em; color: var(--slate); text-transform: uppercase; }
.q-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 30px; box-shadow: var(--shadow); }
.q-card h2 { font-size: 1.4rem; }
.options { display: grid; gap: 10px; margin-top: 18px; }
.options.two-col { grid-template-columns: 1fr 1fr; }
.opt {
  text-align: left; font-family: var(--font-body); font-size: 1rem; color: var(--ink-soft);
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; cursor: pointer; transition: border-color 0.1s ease, background 0.1s ease;
}
.opt:hover { border-color: var(--amber); }
.opt.selected { border-color: var(--amber); background: #fdf3e5; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 22px; }
.link-btn { background: none; border: none; color: var(--slate); font-size: 0.92rem; cursor: pointer; text-decoration: underline; padding: 8px 0; }

/* Lead form */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 18px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--ink); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink);
  border: 1.5px solid var(--line-dark); border-radius: 8px; padding: 11px 12px; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(232, 131, 12, 0.35); border-color: var(--amber); }
.field-error { color: var(--red); font-size: 0.8rem; margin-top: 4px; }

/* Result page */
.result-hero { padding: 60px 0 30px; }
.result-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 12px; border-radius: 99px; margin-bottom: 16px; }
.tag-a { background: #e4f0ea; color: var(--green); }
.tag-b { background: #fdf0dd; color: var(--amber-dark); }
.tag-c { background: #e7ecf6; color: #2e4b8f; }
.tag-d { background: #ece9e0; color: var(--slate); }
.tag-e { background: #f4e6de; color: var(--red); }

/* ---------- Blog ---------- */
.post-list { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.post-card { display: block; text-decoration: none; }
.post-card h3 { margin-bottom: 6px; }
.post-card p { font-size: 0.94rem; }
article.post { max-width: 760px; margin: 0 auto; padding: 54px 0 80px; }
article.post h2 { margin-top: 1.6em; font-size: 1.5rem; }
article.post h3 { margin-top: 1.3em; }
article.post ul, article.post ol { padding-left: 1.3em; }
article.post li { margin: 6px 0; }
.toc { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; margin: 26px 0; }
.toc strong { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber-dark); }
.toc ol { margin: 10px 0 0; padding-left: 1.2em; font-size: 0.94rem; }
.post-cta { background: var(--ink); border-radius: 14px; padding: 34px; margin: 44px 0 0; text-align: center; }
.post-cta h3 { color: #fff; }
.post-cta p { color: #cfd6e4; }
.related { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line-dark); }
.related ul { padding-left: 1.2em; }

/* ---------- Page header (interior pages) ---------- */
.page-head { padding: 56px 0 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .container, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .post-list { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--white); flex-direction: column; align-items: stretch; padding: 16px 22px; gap: 14px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .sticky-cta { display: block; }
  body { padding-bottom: 74px; }
  .section { padding: 52px 0; }
  .form-grid { grid-template-columns: 1fr; }
  .options.two-col { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .steps { grid-template-columns: 1fr; }
}
