/* ============================================================
   ClosingMath sales page — closingmath.com
   Mobile-first, single-purpose: convert to a $49 purchase.
   ============================================================ */

:root {
  --accent: #2563EB;
  --accent-dark: #1D4ED8;
  --accent-tint: #EFF6FF;
  --ink: #0F172A;
  --ink-soft: #334155;
  --ink-mute: #64748B;
  --line: #E2E8F0;
  --line-soft: #F1F5F9;
  --bg: #FFFFFF;
  --bg-soft: #F8FAFC;
  --good: #047857;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  --display: "SF Pro Display", -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--display);
  letter-spacing: -0.02em;
  margin: 0 0 16px 0;
  line-height: 1.15;
}
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 700; }

p { margin: 0 0 16px 0; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================ buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 28px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  cursor: pointer;
  border: none;
}
.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.btn-primary.big { padding: 20px 40px; font-size: 19px; }

/* ============================================ hero */
.hero {
  background: linear-gradient(180deg, var(--accent-tint) 0%, #FFFFFF 100%);
  padding-bottom: 72px;
}
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 18px;
}
.brand-mark { color: var(--accent); font-size: 22px; }
.nav-cta {
  padding: 10px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s ease;
}
.nav-cta:hover { background: var(--accent); }

.hero-inner {
  max-width: 880px;
  margin: 40px auto 0 auto;
  padding: 0 24px;
  text-align: center;
}
.hero-inner h1 { margin-bottom: 24px; }
.hero-sub {
  font-size: clamp(17px, 2.2vw, 21px);
  color: var(--ink-soft);
  margin-bottom: 32px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta { margin-bottom: 28px; }
.hero-meta {
  margin-top: 14px;
  font-size: 14px;
  color: var(--ink-mute);
}
.hero-trust {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 16px;
}
.hero-trust span { white-space: nowrap; }

/* ============================================ sections */
.section { padding: 80px 0; }
.section-sub {
  font-size: 17px;
  color: var(--ink-mute);
  margin-bottom: 40px;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ============================================ problem */
.problem { background: var(--bg-soft); }
.problem .eyebrow.center,
.problem h2.center { display: block; text-align: center; }
.problem h2 { margin-bottom: 48px; }
.problem-line {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.6;
}

/* Narrative vignettes */
.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 760px) {
  .story-grid { grid-template-columns: 1fr; }
}
.story-card {
  background: #fff;
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  position: relative;
  border: 1px solid var(--line);
}
.story-card::before {
  content: "“";
  position: absolute;
  top: 8px;
  left: 20px;
  font-family: Georgia, serif;
  font-size: 72px;
  line-height: 1;
  color: var(--accent-tint);
  z-index: 0;
}
.story-tag {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-tint);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.story-text {
  font-size: 16px;
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
  position: relative;
  z-index: 1;
}
.story-text strong {
  color: var(--ink);
  font-weight: 700;
}

/* ============================================ deliverables */
.inside h2 { text-align: center; }
.inside .section-sub { text-align: center; }

.grid-deliverables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 48px;
  margin-bottom: 40px;
}
.deliverable {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.deliverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}
.deliverable.highlight {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border-color: var(--accent);
  grid-column: span 2;
}
.deliverable.highlight .d-pages { color: rgba(255,255,255,0.85); }
.deliverable.highlight p { color: rgba(255,255,255,0.95); }
@media (max-width: 760px) {
  .deliverable.highlight { grid-column: span 1; }
}
.d-num {
  display: inline-block;
  width: 32px;
  height: 32px;
  line-height: 32px;
  text-align: center;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 16px;
  font-size: 14px;
}
.deliverable.highlight .d-num {
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 18px;
}
.d-pages {
  font-size: 13px;
  color: var(--ink-mute);
  margin-bottom: 12px;
  font-weight: 500;
}
.deliverable p {
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0;
}

.inline-cta { text-align: center; }

/* ============================================ app preview */
.app-preview { background: var(--bg-soft); }
.app-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 760px) {
  .app-preview-grid { grid-template-columns: 1fr; gap: 32px; }
}
.checklist {
  list-style: none;
  padding: 0;
  margin: 24px 0 0 0;
}
.checklist li {
  padding-left: 28px;
  position: relative;
  margin-bottom: 12px;
  font-size: 16px;
  color: var(--ink-soft);
}
.checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--good);
  font-weight: 700;
}

.mock-card {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  font-family: var(--display);
  font-size: 14px;
}
.mock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
}
.mock-row:last-child { border-bottom: none; }
.mock-headline {
  background: var(--accent-tint);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-bottom: none;
  color: var(--ink);
  font-weight: 600;
}
.mock-big {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
}
.mock-footer {
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  text-align: center;
}

/* ============================================ realtors (MLS comparison) */
.realtors {
  background: var(--bg);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.realtors .eyebrow.center,
.realtors h2.center,
.realtors .section-sub.center {
  text-align: center;
}
.realtors .section-sub {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 48px 0 32px 0;
}
@media (max-width: 760px) {
  .compare-grid { grid-template-columns: 1fr; }
}
.compare-col {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 2px solid var(--line);
  position: relative;
}
.compare-mls {
  background: var(--bg-soft);
  border-color: var(--line);
}
.compare-mls h3 { color: var(--ink-mute); }
.compare-cm {
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.12);
}
.compare-tag {
  position: absolute;
  top: -14px;
  left: 32px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 14px;
  border-radius: 999px;
}
.compare-col h3 {
  margin-bottom: 20px;
  font-size: 18px;
}
.compare-col ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}
.compare-col li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--ink-soft);
  line-height: 1.45;
}
.compare-col li:last-child { border-bottom: none; }
.compare-col li.missing {
  color: var(--ink-mute);
  text-decoration: line-through;
  text-decoration-color: rgba(100, 116, 139, 0.4);
}
.compare-cm li {
  color: var(--ink);
}
.compare-bottom {
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.compare-bottom strong { color: var(--ink); }
.missing-total strong { color: #B91C1C; }

.realtor-line {
  text-align: center;
  max-width: 640px;
  margin: 32px auto;
  color: var(--ink-soft);
  font-size: 16px;
}

/* ============================================ audience */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.audience-grid.audience-two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  max-width: 760px;
  margin: 0 auto;
}
.audience-card {
  text-align: center;
  padding: 32px 24px;
  background: var(--bg-soft);
  border-radius: var(--radius-lg);
}
.aud-icon {
  font-size: 42px;
  display: block;
  margin-bottom: 16px;
}
.audience-card p {
  font-size: 15px;
  color: var(--ink-soft);
  margin: 0;
}

/* ============================================ author */
.author { background: var(--bg-soft); }
.author-inner {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: center;
  max-width: 880px;
}
@media (max-width: 760px) {
  .author-inner { grid-template-columns: 1fr; text-align: center; gap: 24px; }
}
.author-photo .photo-placeholder {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 56px;
  font-weight: 700;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
.author-bio p { font-size: 16px; color: var(--ink-soft); }
.author-bio .author-role {
  font-size: 14px;
  color: var(--ink-mute);
  margin-top: -8px;
  margin-bottom: 20px;
}

/* ============================================ FAQ */
.faq { background: #fff; }
.faq h2 { text-align: center; margin-bottom: 48px; }
.faq details {
  background: var(--bg-soft);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  transition: border-color .15s ease;
}
.faq details[open] { border-color: var(--line); }
.faq summary {
  padding: 18px 24px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-size: 24px;
  color: var(--ink-mute);
  font-weight: 400;
  transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p {
  padding: 0 24px 18px 24px;
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ============================================ final CTA */
.final-cta {
  background: linear-gradient(135deg, var(--ink) 0%, #1E293B 100%);
  color: #fff;
  text-align: center;
  padding: 96px 0;
}
.final-cta h2 { color: #fff; margin-bottom: 32px; }
.price-tag {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}
.price-amount {
  font-family: var(--display);
  font-size: 88px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  color: #fff;
}
.price-amount .cents {
  font-size: 0.42em;
  vertical-align: top;
  margin-left: 4px;
  letter-spacing: 0;
  font-weight: 600;
  position: relative;
  top: 0.15em;
}
.price-meta {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 8px;
}
.final-meta {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
}

/* ============================================ footer */
.site-footer {
  background: #FFFFFF;
  border-top: 1px solid var(--line);
  padding: 48px 0;
  font-size: 13px;
  color: var(--ink-mute);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
}
.footer-brand strong { display: block; font-size: 16px; color: var(--ink); }
.footer-brand span { display: block; margin-top: 4px; }
.footer-links { display: flex; gap: 16px; }
.footer-links a {
  color: var(--ink-mute);
  font-weight: 500;
}
.footer-links a:hover { color: var(--accent); }
.footer-fine {
  flex-basis: 100%;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}

/* ============================================ sticky mobile CTA */
.sticky-cta {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 50;
  display: none;
  padding: 16px;
  background: var(--accent);
  color: #fff;
  text-align: center;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}
@media (max-width: 760px) {
  .sticky-cta { display: block; }
  body { padding-bottom: 80px; }
}

/* ============================================ small screens */
@media (max-width: 640px) {
  .topnav .nav-cta { display: none; } /* sticky-cta handles mobile */
  .section { padding: 56px 0; }
  .hero { padding-bottom: 48px; }
  .hero-trust { gap: 12px; font-size: 12px; }
  .hero-trust span { flex-basis: 100%; text-align: center; }
}
