/* =========================================================
   Wendy Dabrusin — Edge Home Finance
   Shared stylesheet
   ========================================================= */

:root {
  --navy: #16244a;
  --navy-2: #1a2a5b;
  --blue: #35569e;
  --blue-light: #8eaad3;
  --blue-pale: #eaf0fa;
  --bg: #f6f8fb;
  --white: #ffffff;
  --text: #232a3b;
  --text-soft: #5b6472;
  --border: #e2e7f0;
  --success: #2f8f5b;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(22, 36, 74, 0.08);
  --shadow-lg: 0 12px 32px rgba(22, 36, 74, 0.14);
  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy);
  line-height: 1.25;
  margin: 0 0 16px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.35rem; }

p { margin: 0 0 16px; }

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

.lede {
  font-size: 1.1rem;
  color: var(--text-soft);
  max-width: 640px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--navy);
  color: var(--white);
}
.btn-primary:hover { background: var(--navy-2); box-shadow: var(--shadow); }

.btn-accent {
  background: var(--blue-light);
  color: var(--navy);
}
.btn-accent:hover { box-shadow: var(--shadow); }

.btn-outline {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-outline-navy {
  background: transparent;
  border-color: var(--navy);
  color: var(--navy);
}
.btn-outline-navy:hover { background: var(--blue-pale); }

.btn-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }

/* ===== Top bar (disclosure strip) ===== */
.topbar {
  background: var(--navy);
  color: #cfd9ef;
  font-size: 0.78rem;
  text-align: center;
  padding: 6px 16px;
}
.topbar a { color: #cfd9ef; text-decoration: underline; }

/* ===== Header / Nav ===== */
header.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  gap: 20px;
}
.brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: var(--navy);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .brand-name {
  display: block;
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.15;
}
.brand .brand-title,
.brand .brand-sub {
  display: block;
  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  text-transform: uppercase;
  line-height: 1.3;
}

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
nav.main-nav a {
  color: var(--text);
  font-weight: 600;
  font-size: 0.87rem;
  white-space: nowrap;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--blue-pale);
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
nav.main-nav a:hover { color: var(--blue); text-decoration: none; background: #dde8f9; }
nav.main-nav a.active { color: var(--white); background: var(--blue); }

.nav-ctas { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.nav-ctas .btn { padding: 10px 20px; font-size: 0.85rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--navy);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--navy);
}

@media (max-width: 980px) {
  nav.main-nav {
    display: none;
    width: 100%;
    order: 3;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    margin-top: 14px;
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav a { padding: 10px 14px; width: 100%; border-radius: 10px; text-align: center; }
  .nav-wrap { flex-wrap: wrap; }
  .nav-toggle { display: inline-block; }
  .nav-ctas { margin-left: auto; }
}

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, var(--blue) 100%);
  color: var(--white);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}
.hero .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
.hero h1 { color: var(--white); }
.hero .lede { color: #d7e0f4; }
.hero-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hero .eyebrow { color: var(--blue-light); }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero { padding: 40px 0; }
}

/* Page header (non-home hero, smaller) */
.page-hero {
  background: linear-gradient(120deg, var(--navy), var(--blue));
  color: var(--white);
  padding: 52px 0 46px;
  text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: 10px; }
.page-hero .lede { color: #dbe4f7; margin: 0 auto; }

/* Page hero variant with an illustration/photo alongside the text */
.page-hero-media .container {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
  text-align: left;
}
.page-hero-media .lede { margin: 0; }
.page-hero-media-art {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  line-height: 0;
}
@media (max-width: 860px) {
  .page-hero-media .container { grid-template-columns: 1fr; text-align: center; }
}

/* ===== Sections ===== */
section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.section-alt { background: var(--white); }
.section-navy { background: var(--navy); color: var(--white); }
.section-navy h2, .section-navy h3 { color: var(--white); }
.section-pale { background: var(--blue-pale); }

.section-head { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-head.left { margin: 0 0 36px; text-align: left; }

/* Grids / cards */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: 10px; }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--blue-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 16px;
}

.stat-row { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 32px; }
.stat-row .stat { min-width: 120px; }
.stat .num { font-family: Georgia, serif; font-size: 2.1rem; color: var(--navy); font-weight: 700; }
.stat .label { color: var(--text-soft); font-size: 0.88rem; }
.hero .stat .num { color: var(--white); }
.hero .stat .label { color: #c9d4ec; }

/* Video cards */
.video-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

/* TikTok embed grid — TikTok's embed has its own minimum width, so give it
   room to breathe instead of forcing a fixed 4-up grid that it overflows. */
.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  justify-items: center;
}
.tiktok-card {
  width: 100%;
  max-width: 340px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 0;
}
.tiktok-card blockquote.tiktok-embed {
  margin: 0 !important;
  width: 100% !important;
}
.video-thumb {
  aspect-ratio: 9 / 16;
  background: linear-gradient(160deg, var(--navy), var(--blue));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--white);
}
.video-thumb .play {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.video-thumb .platform-tag {
  position: absolute;
  top: 12px; left: 12px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.video-card .video-body { padding: 16px 18px 20px; }
.video-card .video-body p { margin: 0; font-size: 0.9rem; color: var(--text-soft); }

.platform-strip { display: flex; gap: 14px; flex-wrap: wrap; }
.platform-btn {
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  color: var(--navy);
  box-shadow: var(--shadow);
}
.platform-btn:hover { text-decoration: none; box-shadow: var(--shadow-lg); }

/* Forms */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 6px;
}
input[type=text], input[type=email], input[type=tel], select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  margin-bottom: 18px;
  font-family: inherit;
  background: var(--bg);
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--blue-light);
  outline-offset: 1px;
}
.form-note {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: -8px;
}
.todo-flag {
  display: inline-block;
  background: #fff4d6;
  border: 1px solid #edc65a;
  color: #7a5c00;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  margin-bottom: 14px;
}

/* Badge / credential blocks */
.badge-row { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; }
.badge {
  display: flex; align-items: center; gap: 10px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  color: var(--navy);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}
.badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--success); }

/* Steps */
.steps { counter-reset: step; }
.step {
  display: flex; gap: 18px;
  margin-bottom: 24px;
}
.step .num {
  counter-increment: step;
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}
.step .num::before { content: counter(step); }

/* Table */
table.simple {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
table.simple th, table.simple td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.92rem;
}
table.simple th {
  background: var(--blue-pale);
  color: var(--navy);
  font-family: Georgia, serif;
}
table.simple tr:last-child td { border-bottom: none; }

/* Calculator */
.calc-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
@media (max-width: 800px) { .calc-wrap { grid-template-columns: 1fr; } }
.calc-result {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 32px;
}
.calc-result .big {
  font-family: Georgia, serif;
  font-size: 2.6rem;
  font-weight: 700;
}
.calc-result .breakdown div {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  font-size: 0.92rem;
}
input[type=range] { width: 100%; accent-color: var(--blue-light); margin-bottom: 18px; }

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--navy), var(--blue));
  color: var(--white);
  border-radius: var(--radius);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner h3 { color: var(--white); margin-bottom: 6px; }
.cta-banner p { color: #dbe4f7; margin: 0; }

/* Newsletter footer block */
.newsletter-block {
  background: var(--navy-2);
  color: var(--white);
  padding: 44px 0;
}
.newsletter-block h3 { color: var(--white); }
.newsletter-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 520px;
}
.newsletter-form input[type=email] {
  flex: 1;
  min-width: 220px;
  margin-bottom: 0;
  background: var(--white);
}

/* Footer */
footer.site-footer {
  background: var(--navy);
  color: #b9c4dd;
  padding: 48px 0 20px;
  font-size: 0.88rem;
}
footer.site-footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
footer.site-footer a { color: #b9c4dd; }
footer.site-footer a:hover { color: var(--white); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-social { display: flex; gap: 12px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 20px;
  font-size: 0.78rem;
  color: #8b98b8;
  line-height: 1.7;
}

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.small { font-size: 0.85rem; color: var(--text-soft); }
