/* ==========================================================================
   Loan-type pages (first home buyer, refinance, investment, etc.)
   One shared stylesheet so every loan page looks the same.
   The header, menu and sticky Call / Book bar come from css/site.css.
   ========================================================================== */

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

:root {
  --sand: #faf7f2;
  --sand-dark: #f0ebe1;
  --sand-border: #e2d9cc;
  --ink: #1c1a17;
  --ink-mid: #5a5650;
  --ink-soft: #6f6a64;
  --brand: #455a8c;
  --brand-dark: #374a75;
  --brand-pale: #dce4f2;
  --forest: #2d5a3d;
  --warm-white: #fffefb;
  --radius-md: 12px;
  --radius-lg: 20px;
  --max: 1120px;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px; line-height: 1.7;
  color: var(--ink); background: var(--warm-white);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
img { max-width: 100%; height: auto; }

/* ---------- Shared type ---------- */
.lp-section { padding: 80px 48px; }
.lp-section.alt { background: var(--sand); }
.lp-inner { max-width: var(--max); margin: 0 auto; }
.lp-narrow { max-width: 780px; }
.lp-label {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand);
}
.lp-label::before { content: ''; width: 20px; height: 2px; border-radius: 1px; background: currentColor; }
.lp-section h2 {
  font-family: 'Lora', serif; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2;
  font-size: clamp(28px, 3vw, 40px); margin-bottom: 14px;
}
.lp-intro { max-width: 640px; color: var(--ink-mid); font-size: 17px; margin-bottom: 40px; }

/* ---------- Buttons ---------- */
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 100px; border: 1.5px solid var(--brand);
  font-size: 15px; font-weight: 600; text-decoration: none; line-height: 1.2;
  transition: background 0.2s, transform 0.15s;
}
.lp-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.lp-btn-primary { background: var(--brand); color: #fff; }
.lp-btn-primary:hover { background: var(--brand-dark); transform: translateY(-2px); }
.lp-btn-ghost { background: #fff; color: var(--brand); }
.lp-btn-ghost:hover { background: var(--sand); transform: translateY(-2px); }
.lp-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */
.lp-hero { background: var(--sand); padding: 56px 48px 72px; }
.lp-hero-inner { max-width: var(--max); margin: 0 auto; display: grid; grid-template-columns: 1fr 400px; gap: 64px; align-items: start; }
.lp-breadcrumb { font-size: 13px; color: var(--ink-soft); margin-bottom: 24px; }
.lp-breadcrumb a { color: var(--ink-mid); text-decoration: none; }
.lp-breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.lp-breadcrumb span[aria-hidden] { margin: 0 6px; }
.lp-hero h1 {
  font-family: 'Lora', serif; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15;
  font-size: clamp(36px, 4.5vw, 54px); margin-bottom: 20px;
}
.lp-hero h1 em { font-style: italic; color: var(--brand); }
.lp-hero-sub { font-size: 18px; color: var(--ink-mid); max-width: 560px; margin-bottom: 32px; }
.lp-hero-note { margin-top: 18px; font-size: 13px; color: var(--ink-soft); }

.lp-facts {
  background: #fff; border: 1px solid var(--sand-border); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: 0 12px 40px rgba(28, 26, 23, 0.06);
}
.lp-facts h2 { font-family: 'Lora', serif; font-size: 20px; font-weight: 600; margin-bottom: 4px; }
.lp-facts-asat { font-size: 12px; color: var(--ink-soft); margin-bottom: 16px; }
.lp-facts ul { list-style: none; }
.lp-facts li { display: flex; gap: 14px; padding: 14px 0; border-top: 1px solid var(--sand-border); }
.lp-facts li:first-child { border-top: 0; }
.lp-fact-num { flex: 0 0 76px; font-family: 'Lora', serif; font-size: 22px; font-weight: 600; color: var(--brand); line-height: 1.2; }
.lp-fact-text { font-size: 14px; color: var(--ink-mid); line-height: 1.5; }
.lp-fact-text strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 2px; }

/* ---------- Scheme cards ---------- */
.lp-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lp-card { background: #fff; border: 1px solid var(--sand-border); border-radius: var(--radius-lg); padding: 28px; }
.lp-card h3 { font-family: 'Lora', serif; font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.lp-card-tag { display: inline-block; margin-bottom: 14px; padding: 3px 10px; border-radius: 100px; background: var(--brand-pale); color: var(--brand-dark); font-size: 12px; font-weight: 600; }
.lp-card p { color: var(--ink-mid); font-size: 15px; margin-bottom: 12px; }
.lp-card ul { margin: 0 0 14px 18px; color: var(--ink-mid); font-size: 15px; }
.lp-card li { margin-bottom: 6px; }
.lp-card .lp-source { font-size: 13px; }

/* ---------- Comparison table ---------- */
.lp-table-wrap { overflow-x: auto; border: 1px solid var(--sand-border); border-radius: var(--radius-md); background: #fff; }
.lp-table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.lp-table th, .lp-table td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--sand-border); }
.lp-table thead th { background: var(--sand-dark); font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-mid); }
.lp-table tbody th { font-weight: 600; width: 34%; }
.lp-table tr:last-child th, .lp-table tr:last-child td { border-bottom: 0; }
.lp-yes { color: var(--forest); font-weight: 600; }
.lp-no { color: #9a3b2a; font-weight: 600; }
.lp-table-note { margin-top: 14px; font-size: 14px; color: var(--ink-mid); }

/* ---------- Steps ---------- */
.lp-steps { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.lp-steps li { counter-increment: step; background: #fff; border: 1px solid var(--sand-border); border-radius: var(--radius-md); padding: 22px 20px; }
.lp-steps li::before {
  content: counter(step); display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%;
  background: var(--sand); border: 1.5px solid var(--sand-border);
  font-family: 'Lora', serif; font-weight: 600; color: var(--brand);
}
.lp-steps strong { display: block; font-size: 16px; margin-bottom: 6px; }
.lp-steps span { font-size: 14px; color: var(--ink-mid); line-height: 1.55; }

/* ---------- Checklist ---------- */
.lp-checklist { list-style: none; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
.lp-checklist li { position: relative; padding-left: 30px; color: var(--ink-mid); }
.lp-checklist li strong { color: var(--ink); }
.lp-checklist li::before {
  content: ''; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand-pale) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374a75' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
}

/* ---------- FAQ ---------- */
.lp-faq { border-top: 1px solid var(--sand-border); }
.lp-faq details { border-bottom: 1px solid var(--sand-border); }
.lp-faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 44px 22px 0; font-size: 17px; font-weight: 600;
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after {
  content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 26px; font-weight: 400; color: var(--brand); transition: transform 0.2s;
}
.lp-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.lp-faq .lp-answer { padding: 0 0 22px; color: var(--ink-mid); max-width: 720px; }
.lp-faq .lp-answer p + p { margin-top: 10px; }

/* ---------- Closing call to action ---------- */
.lp-cta { background: var(--forest); color: #fff; border-radius: 24px; padding: 56px; text-align: center; }
.lp-cta h2 { color: #fff; }
.lp-cta p { color: rgba(255, 255, 255, 0.85); max-width: 560px; margin: 0 auto 30px; }
.lp-cta .lp-actions { justify-content: center; }
.lp-cta .lp-btn-primary { background: #fff; color: var(--forest); border-color: #fff; }
.lp-cta .lp-btn-primary:hover { background: #f1f1ee; }
.lp-cta .lp-btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.6); }
.lp-cta .lp-btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

.lp-disclaimer { margin-top: 40px; padding: 20px 24px; border-radius: var(--radius-md); background: var(--sand); font-size: 13px; color: var(--ink-mid); line-height: 1.65; }
.lp-disclaimer p + p { margin-top: 8px; }

/* ---------- Footer (matches the homepage footer) ---------- */
footer { background: var(--ink); padding: 64px 48px 40px; }
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1.6fr; gap: 48px; margin-bottom: 56px; }
.footer-logo { margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.footer-logo .logo-mark img { width: 48px; height: 48px; object-fit: contain; }
.footer-logo .logo-text { font-family: 'Lora', serif; font-size: 18px; font-weight: 600; line-height: 1.2; color: rgba(255, 255, 255, 0.9); }
.footer-logo .logo-text span { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }
.footer-brand p { font-size: 14px; color: rgba(255, 255, 255, 0.6); line-height: 1.7; max-width: 260px; }
.footer-col h4 { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); margin-bottom: 18px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col ul li a { font-size: 14px; color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color 0.2s; overflow-wrap: anywhere; }
.footer-col ul li a:hover { color: #fff; }
.social-link { display: inline-flex; align-items: center; gap: 7px; }
.social-link svg { width: 16px; height: 16px; fill: currentColor; flex-shrink: 0; }
.footer-fine { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 24px; margin-bottom: 24px; font-size: 12px; color: rgba(255, 255, 255, 0.55); line-height: 1.65; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: 28px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, 0.55); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-legal a { color: rgba(255, 255, 255, 0.55); text-decoration: none; }
.footer-legal a:hover { color: #fff; }

/* ---------- Tablet and phone ---------- */
@media (max-width: 1080px) {
  .lp-steps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .lp-section { padding: 60px 20px; }
  .lp-hero { padding: 36px 20px 56px; }
  .lp-hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .lp-cards, .lp-checklist { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr; }
  .lp-cta { padding: 40px 24px; }
  footer { padding: 56px 20px 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 36px; }
}
@media (max-width: 600px) {
  /* Comparison table becomes one card per scheme, so nothing hides off-screen */
  .lp-table-wrap { overflow: visible; border: 0; background: none; }
  .lp-table { min-width: 0; }
  .lp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .lp-table, .lp-table tbody, .lp-table tr, .lp-table th, .lp-table td { display: block; width: 100%; }
  .lp-table tr { margin-bottom: 12px; border: 1px solid var(--sand-border); border-radius: var(--radius-md); background: #fff; overflow: hidden; }
  .lp-table tbody th { width: 100%; background: var(--sand-dark); padding: 12px 16px; }
  .lp-table td { padding: 10px 16px; border-bottom: 1px solid var(--sand-border); }
  .lp-table td::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2px; }
  .lp-table tr td:last-child { border-bottom: 0; }
  .lp-table tr:last-child td:not(:last-child) { border-bottom: 1px solid var(--sand-border); }
  .lp-actions .lp-btn { flex: 1 1 100%; }
  .footer-top { grid-template-columns: 1fr; }
  .lp-fact-num { flex-basis: 64px; font-size: 20px; }
}

/* ---------- Added for the refinance page (reusable) ---------- */
.lp-facts-btn { width: 100%; margin-top: 18px; }
.lp-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-mini { background: #fff; border: 1px solid var(--sand-border); border-radius: var(--radius-md); padding: 22px; }
.lp-mini h3 { font-size: 17px; margin-bottom: 6px; }
.lp-mini p { font-size: 15px; color: var(--ink-mid); line-height: 1.6; }
.lp-form-layout { display: grid; grid-template-columns: 1fr 1.15fr; gap: 56px; align-items: start; }
.lp-subhead { font-size: 17px; margin: 8px 0 12px; }
.lp-next { margin: 0 0 20px 20px; color: var(--ink-mid); }
.lp-next li { margin-bottom: 10px; padding-left: 4px; }
.lp-form-wrap { background: #fff; border: 1px solid var(--sand-border); border-radius: var(--radius-lg); overflow: hidden; }
.lp-form-wrap iframe { display: block; width: 100%; height: 1650px; border: 0; }
@media (max-width: 920px) {
  .lp-grid3 { grid-template-columns: 1fr; }
  .lp-form-layout { grid-template-columns: 1fr; gap: 28px; }
  .lp-form-wrap { margin: 0 -8px; }
}
