/* kimrenquest.com — shared shell styles (Phase 0 foundation)
   Tokens from page-build-style-guide.md: dark navy, cyan #1ecdf1, pink
   #f472b6, Outfit font, bold headings, bright cyan buttons, no gray buttons.
   NO entrance animations anywhere — every section is static. */

:root {
  --bg: #071222;
  --bg-2: #0a1930;
  --card: #101f38;
  --card-2: #0c1a30;
  --field: #1b2c47;
  --line: rgba(148, 180, 220, 0.18);
  --text: #eef4fb;
  --muted: #9db2c8;
  --faint: #7186a0;
  --cyan: #1ecdf1;
  --cyan-hover: #55d8f5;
  --cyan-dark: #06222e;
  --pink: #f472b6;
  --pink-dark: #33122e;
  --radius: 18px;
  --header-h: 72px;
  --cta-bar-h: 60px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* Room for the fixed Get Started bar at the bottom. */
  padding-bottom: var(--cta-bar-h);
}

a { color: var(--cyan); }
a:hover { color: var(--cyan-hover); }

h1, h2, h3 { font-weight: 800; line-height: 1.15; margin: 0 0 12px; }
p { margin: 0 0 14px; }
.muted { color: var(--muted); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ---------- Sticky header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 18, 34, 0.97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); flex: none; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  border: 2px solid var(--cyan); color: var(--cyan);
  display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: .5px;
}
.brand-name { font-weight: 800; font-size: 19px; line-height: 1.15; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; }

/* ---------- Desktop nav ---------- */
.main-nav { margin-left: auto; }
.nav-list {
  display: flex; align-items: center; gap: 4px;
  list-style: none; margin: 0; padding: 0;
}
.nav-list > li { position: relative; }
.nav-link, .nav-drop-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px;
  background: none; border: none; font: inherit; cursor: pointer; white-space: nowrap;
}
.nav-link:hover, .nav-drop-btn:hover, .nav-link:focus-visible, .nav-drop-btn:focus-visible {
  color: var(--cyan); background: rgba(30, 205, 241, 0.08); outline: none;
}
.caret { font-size: 11px; color: var(--muted); }

/* Dropdown menus (hover + keyboard focus; click also toggles for touch) */
.submenu {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-submenu:hover > .submenu,
.has-submenu:focus-within > .submenu,
.has-submenu.open > .submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu .nav-cat {
  padding: 10px 12px 4px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--pink);
}
.submenu .nav-cat + li a { margin-top: 0; }
.submenu a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 14.5px;
}
.submenu a:hover, .submenu a:focus-visible { background: rgba(30, 205, 241, 0.1); color: var(--cyan); outline: none; }
.submenu li { position: relative; }

/* Nested flyout (Mortgage Calculators submenu, desktop) */
.submenu .has-flyout > a, .submenu .has-flyout > .nav-drop-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  width: 100%; padding: 8px 12px; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 14.5px;
  background: none; border: none; font: inherit; cursor: pointer; text-align: left;
}
.submenu .has-flyout > a:hover, .submenu .has-flyout > .nav-drop-btn:hover,
.submenu .has-flyout > a:focus-visible, .submenu .has-flyout > .nav-drop-btn:focus-visible {
  background: rgba(30, 205, 241, 0.1); color: var(--cyan); outline: none;
}
.flyout {
  position: absolute; top: -10px; left: calc(100% + 10px); min-width: 260px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
  list-style: none; margin: 0;
  opacity: 0; visibility: hidden; transform: translateX(6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.has-flyout:hover > .flyout, .has-flyout:focus-within > .flyout, .has-flyout.open > .flyout {
  opacity: 1; visibility: visible; transform: translateX(0);
}

/* Apply Now button in the header */
.btn-apply {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cyan); color: var(--cyan-dark);
  font-weight: 800; font-size: 15px; text-decoration: none;
  padding: 10px 20px; border-radius: 999px; border: none; cursor: pointer;
  white-space: nowrap;
}
.btn-apply:hover { background: var(--cyan-hover); color: var(--cyan-dark); }

/* ---------- Mobile nav ---------- */
.nav-toggle {
  display: none; margin-left: auto;
  background: none; border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font-size: 22px; line-height: 1;
  padding: 8px 12px; cursor: pointer;
}
.mobile-panel { display: none; }

/* ---------- Page body ---------- */
.page { padding: 48px 0 64px; }
.page h1 { font-size: clamp(30px, 5vw, 44px); }
.page h1 .accent { color: var(--cyan); }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--pink); margin-bottom: 10px;
}
.lede { color: var(--muted); font-size: 17px; max-width: 680px; }

.card {
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.card h2 { font-size: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
.stack { display: grid; gap: 22px; }
.note {
  border-left: 4px solid var(--cyan);
  background: rgba(30, 205, 241, 0.07);
  border-radius: 0 12px 12px 0;
  padding: 16px 18px; color: var(--muted);
}
.note strong { color: var(--text); }

/* ---------- Forms ---------- */
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.form-field .req { color: var(--pink); }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; background: var(--field); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); font: inherit; font-size: 16px; font-weight: 500;
  padding: 11px 14px; outline: none;
}
input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(30, 205, 241, 0.18); }
textarea { min-height: 130px; resize: vertical; }
.honeypot { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.btn-submit {
  display: inline-block; background: var(--cyan); color: var(--cyan-dark);
  border: none; border-radius: 12px; font: inherit; font-size: 17px; font-weight: 800;
  padding: 14px 28px; cursor: pointer; min-height: 3.25rem;
}
.btn-submit:hover:not(:disabled) { background: var(--cyan-hover); }
.btn-submit:disabled { opacity: 0.6; cursor: wait; }
.form-status { margin-top: 16px; font-weight: 600; }
.form-status.ok { color: var(--cyan); }
.form-status.err { color: var(--pink); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 44px 0 28px; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.site-footer h3 { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--pink); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer a { color: var(--text); text-decoration: none; font-size: 15px; }
.site-footer a:hover { color: var(--cyan); }
.site-footer .plain { color: var(--text); font-size: 15px; }
.footer-nmls { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.footer-nmls p { margin: 0 0 6px; }
.footer-nmls a { color: var(--muted); }
.footer-nmls a:hover { color: var(--cyan); }

/* ---------- Fixed Get Started bar ----------
   Pinned to the viewport bottom. If Kim prefers the BM behaviour (bar at
   the very bottom of the page, not pinned), change `position: fixed` to
   `position: static` and remove the body padding-bottom above. */
.cta-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #ffffff; color: #0a1930;
  box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.35);
}
.cta-bar-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 20px;
  height: var(--cta-bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.cta-bar a.tel { color: #0a1930; font-weight: 700; font-size: 16px; text-decoration: none; }
.cta-bar a.tel:hover { color: #0b7d99; }
.cta-bar .btn-apply { padding: 9px 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .main-nav { display: none; }
  .nav-toggle { display: inline-block; }
  .header-inner { gap: 12px; }
  .mobile-panel {
    display: block; border-top: 1px solid var(--line);
    background: var(--bg-2); max-height: 0; overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-header.nav-open .mobile-panel { max-height: 80vh; overflow-y: auto; }
  .mobile-panel ul { list-style: none; margin: 0; padding: 10px 20px 20px; display: grid; gap: 2px; }
  .mobile-panel a, .mobile-panel .mob-drop-btn {
    display: block; width: 100%; text-align: left;
    padding: 11px 10px; border-radius: 8px;
    color: var(--text); text-decoration: none; font-weight: 600; font-size: 16px;
    background: none; border: none; font: inherit; cursor: pointer;
  }
  .mobile-panel a:hover, .mobile-panel .mob-drop-btn:hover { color: var(--cyan); background: rgba(30, 205, 241, 0.08); }
  .mobile-panel .mob-sub { display: none; padding-left: 16px; }
  .mobile-panel .mob-sub.open { display: grid; }
  .mobile-panel .mob-cat {
    padding: 10px 10px 2px; font-size: 11.5px; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase; color: var(--pink);
  }
  .mobile-panel .mob-sub a { font-weight: 500; font-size: 15px; }
  .mobile-panel .btn-apply { margin: 10px 20px 20px; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .brand-sub { display: none; }
  .cta-bar a.tel { font-size: 14px; }
}
