/* Nick Bargis Mortgages - Mortgage Edge brand colours */
:root {
  --brand: #8f1622;        /* burgundy */
  --brand-dark: #6d0f19;
  --accent: #d9601c;       /* orange */
  --accent-dark: #b84d12;
  --gold: #f2a531;
  --ink: #23201f;
  --muted: #655f5c;
  --line: #e4ddd8;
  --bg-soft: #faf6f2;
  --max: 1200px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif; font-size: 18px; line-height: 1.62; color: var(--ink); background: #fff; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
a:hover { color: var(--accent-dark); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

/* Brokerage bar: keeps Mortgage Edge and its licence prominent on every page */
.topbar { background: var(--brand-dark); color: #fff; font-size: 14.5px; }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding-top: 7px; padding-bottom: 7px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 700; text-decoration: none; white-space: nowrap; }
.topbar strong { color: var(--gold); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 70px; flex-wrap: wrap; }
.brand { text-decoration: none; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 9px 0; }
.brand img { display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-me { font-family: Georgia, "Times New Roman", serif; font-size: 25px; font-variant: small-caps; color: var(--brand); letter-spacing: .6px; line-height: 1.05; }
.brand-name { font-size: 12.5px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 2.1px; padding-left: 46px; }
.brand-sub { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .9px; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; }
.site-nav a { text-decoration: none; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.site-nav a:hover { color: var(--accent-dark); }
.nav-toggle, .nav-button { display: none; }

/* Buttons */
.btn { display: inline-block; padding: 12px 20px; border-radius: 8px; font-weight: 700; text-decoration: none; font-size: 16px; border: 2px solid transparent; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-outline { border-color: var(--brand); color: var(--brand) !important; background: #fff; }
.btn-outline:hover { background: var(--brand); color: #fff !important; }
.btn-light { background: #fff; color: var(--brand) !important; }
.btn-light:hover { background: #f3e9e2; }
.site-nav .nav-cta { padding: 9px 15px; font-size: 15px; }

/* Hero (home) */
.hero { background: linear-gradient(135deg, var(--brand-dark), var(--brand) 60%, #a8321f); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 54px; padding-bottom: 54px; }
.hero h1 { font-size: 43px; line-height: 1.12; margin: 0 0 16px; }
.hero p.lead { font-size: 20px; color: #f6e6dc; margin: 0 0 24px; max-width: 34em; }
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.hero img { border-radius: 14px; box-shadow: 0 18px 40px rgba(0,0,0,.35); display: block; }
.trust { display: flex; gap: 22px; flex-wrap: wrap; font-size: 15.5px; color: #f6e6dc; padding: 0; margin: 0; list-style: none; }
.trust li { margin: 0; }
.trust strong { color: var(--gold); }

/* Page head */
.page-head { background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 34px 0 24px; }
.page-head h1 { font-size: 36px; line-height: 1.18; margin: 0 0 8px; color: var(--brand); max-width: 23em; }
.byline { margin: 0; font-size: 15px; color: var(--muted); }
.crumb { margin: 0 0 8px; font-size: 14.5px; color: var(--muted); }
.crumb a { color: var(--muted); }

/* Content */
.content { padding: 34px 0 46px; }
.content > .wrap > p, .content > .wrap > ul, .content > .wrap > ol, .content > .wrap > h2, .content > .wrap > h3, .content > .wrap > h4, .content > .wrap > blockquote, .content > .wrap > .table-wrap, .content > .wrap > .lead-form { max-width: 780px; }
.content.wide > .wrap > * { max-width: none; }
.content h2 { font-size: 27px; line-height: 1.25; color: var(--brand); margin: 38px 0 12px; }
.content h3 { font-size: 20.5px; line-height: 1.3; margin: 26px 0 8px; }
.content p { margin: 0 0 16px; }
.content ul, .content ol { margin: 0 0 18px; padding-left: 24px; }
.content li { margin-bottom: 7px; }
.answer { font-size: 20px; line-height: 1.55; border-left: 4px solid var(--accent); padding: 4px 0 4px 18px; margin: 0 0 24px; }
blockquote { margin: 0 0 18px; padding: 16px 20px; background: var(--bg-soft); border-radius: 10px; border-left: 4px solid var(--brand); }
blockquote p { margin: 0; font-style: italic; }
.table-wrap { overflow-x: auto; margin: 0 0 20px; }
table { border-collapse: collapse; width: 100%; font-size: 16px; }
th { background: var(--brand); color: #fff; text-align: left; padding: 10px 12px; }
td { border: 1px solid var(--line); padding: 9px 12px; vertical-align: top; }
tbody tr:nth-child(even) td { background: var(--bg-soft); }
.note { font-size: 15.5px; color: var(--muted); }

/* Cards and sections */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 8px 0 26px; }
.card { border: 1px solid var(--line); border-radius: 12px; padding: 20px; background: #fff; text-decoration: none; color: var(--ink); display: block; }
.card:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(143,22,34,.12); color: var(--ink); }
.card h3 { margin: 0 0 6px; font-size: 19px; color: var(--brand); line-height: 1.3; }
.card p { margin: 0; font-size: 16px; color: var(--muted); }
.section { padding: 44px 0; }
.section.soft { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: 29px; color: var(--brand); margin: 0 0 8px; line-height: 1.22; }
.section .sub { color: var(--muted); margin: 0 0 22px; max-width: 46em; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
.two-col img { border-radius: 12px; }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { border: 1px solid var(--line); border-radius: 12px; padding: 18px; background: #fff; }
.steps li::before { counter-increment: step; content: counter(step); display: inline-block; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; text-align: center; line-height: 30px; font-weight: 700; margin-bottom: 8px; }
.steps strong { display: block; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.stat-row li { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; text-align: center; }
.stat-row .n { display: block; font-size: 30px; font-weight: 800; color: var(--brand); line-height: 1.1; }
.stat-row .l { font-size: 15px; color: var(--muted); }
.story { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: #fff; margin: 0 0 22px; max-width: 860px; }
.story h3 { margin-top: 0; color: var(--brand); font-size: 22px; }
.story .tag { display: inline-block; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 2px 12px; font-size: 13.5px; font-weight: 700; color: var(--brand); margin-bottom: 10px; text-transform: uppercase; letter-spacing: .6px; }
.related { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 34px 0 14px; }
.related h2 { color: var(--brand); margin: 0 0 14px; font-size: 25px; }

/* CTA */
.cta { background: var(--brand); color: #fff; padding: 44px 0; text-align: center; }
.cta h2 { margin: 0 0 8px; font-size: 28px; }
.cta p { margin: 0 0 18px; color: #f6e6dc; }
.cta-buttons { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 0; }

/* Forms */
.lead-form { border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--bg-soft); margin: 26px 0; }
.lead-form h3 { margin: 0 0 14px; font-size: 22px; color: var(--brand); }
.lead-form label { display: block; font-weight: 600; font-size: 15.5px; margin: 0 0 12px; }
.lead-form input, .lead-form textarea, .lead-form select { display: block; width: 100%; padding: 10px 12px; font-size: 17px; border: 1px solid #c9bfb8; border-radius: 8px; margin-top: 4px; background: #fff; font-family: inherit; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-consent, .form-alt { font-size: 14.5px; color: var(--muted); margin: 10px 0; }
.hp { position: absolute; left: -9999px; }

/* Calculators */
.calc { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; border: 1px solid var(--line); border-radius: 14px; padding: 24px; background: var(--bg-soft); max-width: 920px; margin: 0 0 24px; }
.calc label { display: block; font-weight: 600; font-size: 15.5px; margin: 0 0 12px; }
.calc input[type=text], .calc input[type=number], .calc select { display: block; width: 100%; padding: 10px 12px; font-size: 17px; border: 1px solid #c9bfb8; border-radius: 8px; margin-top: 4px; background: #fff; font-family: inherit; }
.calc .check { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.calc .check input { width: 20px; height: 20px; margin: 0; }
.calc-result { background: #fff; border-radius: 12px; padding: 22px; border: 1px solid var(--line); align-self: start; }
.calc-result .cap { font-size: 15px; color: var(--muted); margin: 0; text-transform: uppercase; letter-spacing: .6px; font-weight: 700; }
.calc-result .big { font-size: 40px; font-weight: 800; color: var(--brand); line-height: 1.1; margin: 4px 0 2px; }
.calc-result .sub { color: var(--muted); margin: 0; font-size: 15.5px; }
.calc-result dl { margin: 16px 0 0; display: grid; grid-template-columns: 1fr auto; gap: 7px 14px; font-size: 16px; }
.calc-result dt { color: var(--muted); }
.calc-result dd { margin: 0; font-weight: 700; text-align: right; }
.calc-result .calc-note { font-size: 14.5px; color: var(--muted); margin: 14px 0 0; }
.calc-result .good { color: #1c7a3d; }
.calc-result .bad { color: #a8321f; }

/* Footer */
.site-footer { background: #2a1a1b; color: #d8cbc6; padding: 40px 0 22px; font-size: 15.5px; }
.site-footer a { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.1fr 1fr; gap: 28px; }
.footer-me { font-family: Georgia, "Times New Roman", serif; font-size: 22px; font-variant: small-caps; color: var(--gold); margin: 0; letter-spacing: .5px; }
.footer-name { font-size: 19px; font-weight: 800; color: #fff; margin: 0 0 6px; }
.footer-head { font-weight: 700; color: var(--gold); margin: 0 0 6px; }
.footer-logo { border-radius: 50%; background: #fff; margin-top: 8px; }
.legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 24px; padding-top: 16px; font-size: 13.5px; color: #b9aaa5; }
.legal p { margin: 0 0 7px; }
.legal strong { color: #e9dcd6; }

@media (max-width: 900px) {
  body { font-size: 17px; }
  .hero-grid, .two-col, .calc, .quotes, .form-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 33px; }
  .page-head h1 { font-size: 29px; }
  .cards, .steps { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-button { display: inline-block; padding: 8px 14px; border: 2px solid var(--brand); border-radius: 8px; font-weight: 700; color: var(--brand); cursor: pointer; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: flex-start; gap: 12px; padding: 6px 0 16px; }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .topbar-row { font-size: 13px; }
}
@media print { .site-header, .topbar, .cta, .site-footer, .related { display: none; } }

.eyebrow { text-transform: uppercase; letter-spacing: 1.6px; font-size: 13.5px; font-weight: 700; color: var(--gold); margin: 0 0 10px; }

.footer-wide { display: block; margin: 0 0 8px; }

/* article layout with side card */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 52px; align-items: start; }
.main-col > :first-child { margin-top: 0; }
.side { position: sticky; top: 18px; }
.side-card { border: 1px solid var(--line); border-top: 4px solid var(--brand); border-radius: 14px; padding: 18px; background: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.05); font-size: 15.5px; }
.side-card img { border-radius: 10px; display: block; margin: 0 0 12px; width: 100%; height: 170px; object-fit: cover; object-position: center 20%; }
.side-card p { margin: 0 0 10px; }
.side-name { font-size: 20px; font-weight: 800; color: var(--brand); margin-bottom: 0 !important; }
.side-role { color: var(--muted); font-size: 14px; }
.side-rating strong { color: var(--accent); }
.side-card .btn { display: block; text-align: center; margin: 0 0 9px; }
.side-links { font-size: 14px; margin: 6px 0 0 !important; text-align: center; }
@media (max-width: 980px) { .layout { display: block; } .side { position: static; margin-top: 30px; max-width: 420px; } }
@media print { .side { display: none; } }

/* icons */
.ico { width: 22px; height: 22px; flex: none; }
.card-ico { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px; background: linear-gradient(135deg, #fbe9d8, #fdf3df); color: var(--brand); margin: 0 0 12px; }
.card-ico .ico { width: 25px; height: 25px; }
.card.has-ico:hover .card-ico { background: var(--brand); color: #fff; }
.social { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 22px; }
.social-btn { display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink) !important; text-decoration: none; font-weight: 700; font-size: 15.5px; transition: transform .12s, box-shadow .12s; }
.social-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.10); }
.social-btn img { display: block; border-radius: 4px; }
.s-linkedin .ico { color: #0a66c2; } .s-instagram .ico { color: #d62976; } .s-google .ico { color: #4285f4; } .s-yelp .ico { color: #d32323; }
.social-small { gap: 8px; margin: 8px 0 0; }
.social-small .social-btn { padding: 0; width: 38px; height: 38px; justify-content: center; background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.25); color: #fff !important; }
.social-small .social-btn .ico { color: #fff; width: 19px; height: 19px; }
.social-small .social-btn:hover { background: var(--accent); border-color: var(--accent); }
.btn .ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 7px; }
.trust .ico { width: 18px; height: 18px; vertical-align: -3px; margin-right: 6px; color: var(--gold); }
