/* JRMortgageBroker — black + dark sapphire */
:root {
  --black: #000;
  --ink: #04060b;
  --panel: #080e1c;
  --panel-2: #0b1428;
  --sapphire-900: #061331;
  --sapphire-700: #0d2a6b;
  --sapphire-500: #1d4fc4;
  --sapphire-300: #8aa8ff;
  --orange: #ff8a1a;
  --orange-2: #ff6a00;
  --text: #eef2fb;
  --muted: #9ba7c0;
  --line: rgba(138, 168, 255, 0.14);
  --line-strong: rgba(138, 168, 255, 0.28);
  --radius: 18px;
  --wrap: 1160px;
  --head: "Sora", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--head); line-height: 1.12; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }

.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 30px;
  border-radius: 999px;
  font-family: var(--head); font-weight: 600; font-size: 16px;
  text-decoration: none; border: 0; cursor: pointer;
  color: #120700;
  background: linear-gradient(135deg, var(--orange), var(--orange-2));
  box-shadow: 0 10px 30px -10px rgba(255, 122, 20, 0.6);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(255, 122, 20, 0.75); }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sapphire-300); outline-offset: 3px;
}
.btn-lg { padding: 20px 38px; font-size: 18px; }
.btn-sm { padding: 11px 20px; font-size: 14px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 14px; height: 76px; }
.brand { display: flex; align-items: center; flex-shrink: 0; margin-right: auto; }
.brand img { height: 34px; width: auto; mix-blend-mode: screen; }

/* Menu button (3 lines -> X) */
.menu-toggle {
  width: 46px; height: 46px; flex-shrink: 0;
  display: grid; place-content: center; gap: 5px;
  background: transparent; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color .25s, background .25s;
}
.menu-toggle span {
  display: block; width: 20px; height: 2px; border-radius: 2px;
  background: var(--text);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .2s, width .3s;
}
.menu-toggle span:nth-child(2) { width: 14px; justify-self: end; }
.menu-toggle:hover { border-color: var(--sapphire-300); background: rgba(29, 79, 196, 0.15); }
.menu-toggle:hover span:nth-child(2) { width: 20px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Slide-out menu */
.menu-backdrop {
  position: fixed; inset: 76px 0 0 0; z-index: 40;
  background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity .35s;
}
.menu {
  position: fixed; top: 76px; right: 0; bottom: 0; z-index: 45;
  width: min(440px, 100%);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 28px 40px 40px; overflow-y: auto;
  background:
    radial-gradient(80% 50% at 100% 0%, rgba(29, 79, 196, 0.28), transparent 70%),
    linear-gradient(180deg, #050a16, var(--black));
  border-left: 1px solid var(--line);
  transform: translateX(100%); visibility: hidden;
  transition: transform .5s cubic-bezier(.2,.8,.2,1), visibility 0s linear .5s;
}
body.menu-open { overflow: hidden; }
body.menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
body.menu-open .menu { transform: none; visibility: visible; transition-delay: 0s; }

.menu-links { list-style: none; margin: 0; padding: 0; }
.menu-links li, .menu-foot {
  opacity: 0; transform: translateX(28px);
  transition: opacity .4s, transform .5s cubic-bezier(.2,.8,.2,1);
}
body.menu-open .menu-links li, body.menu-open .menu-foot {
  opacity: 1; transform: none;
  transition-delay: calc(0.12s + var(--i) * 0.06s);
}
.menu-links a {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-family: var(--head); font-size: 30px; font-weight: 600; letter-spacing: -0.02em;
  color: var(--muted);
  transition: color .3s;
}
.menu-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--sapphire-500), var(--sapphire-300) 60%, var(--orange));
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.mnum {
  font-size: 13px; font-weight: 600; color: var(--orange); letter-spacing: .04em;
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.mtext { transition: transform .4s cubic-bezier(.2,.8,.2,1); }
.marrow {
  width: 26px; height: 26px; margin-left: auto; color: var(--sapphire-300);
  opacity: 0; transform: translateX(-14px);
  transition: opacity .3s, transform .4s cubic-bezier(.2,.8,.2,1);
}
.menu-links a:hover, .menu-links a:focus-visible { color: var(--text); outline: none; }
.menu-links a:hover::after, .menu-links a:focus-visible::after { transform: scaleX(1); }
.menu-links a:hover .mtext, .menu-links a:focus-visible .mtext { transform: translateX(10px); }
.menu-links a:hover .mnum, .menu-links a:focus-visible .mnum { transform: translateY(-6px); }
.menu-links a:hover .marrow, .menu-links a:focus-visible .marrow { opacity: 1; transform: none; }

.menu-foot .btn { width: 100%; }
.menu-foot .btn + .btn { margin-top: 12px; }
/* Secondary button: outlined, used for "Apply Online" */
.btn.btn-outline {
  background: transparent; color: var(--text); box-shadow: none;
  border: 1.5px solid var(--orange); gap: 8px;
}
.btn.btn-outline svg { width: 18px; height: 18px; }
.btn.btn-outline:hover { background: rgba(255, 138, 26, 0.12); box-shadow: none; }
.apply-box {
  margin-top: 32px; padding: 22px 24px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line);
}
.apply-box p { color: var(--muted); margin-bottom: 16px; }

/* ---------- Instagram ---------- */
.ig-card {
  margin-top: 28px; display: flex; align-items: center; gap: 22px; padding: 24px 28px;
  border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(29, 79, 196, 0.22), var(--panel) 55%);
}
.ig-icon {
  flex: none; width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, #ff8a1a, #d6249f 60%, #285aeb);
  box-shadow: 0 14px 30px -14px rgba(214, 36, 159, 0.7);
}
.ig-icon svg { width: 30px; height: 30px; }
.ig-text { flex: 1; }
.ig-text h3 { font-family: var(--head); font-size: 20px; font-weight: 600; }
.ig-text p { color: var(--muted); margin-top: 4px; font-size: 15px; }
.ig-card .btn { white-space: nowrap; }
.g-card { margin-top: 16px; }
.g-card .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: auto; }
.g-card .btn[aria-disabled="true"]:hover { transform: none; background: transparent; }
.g-icon { background: linear-gradient(135deg, #ffb547, #ff8a1a 60%, #e8590c); box-shadow: 0 14px 30px -14px rgba(255, 138, 26, 0.7); }
.g-icon svg { width: 28px; height: 28px; }
.g-widget:has(*) { margin-top: 24px; }
/* Google reviews pulled in by reviews.js */
.gr-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 18px; }
.gr-score { font-family: var(--head); font-size: 30px; font-weight: 800; line-height: 1; }
.gr-stars { color: var(--orange); letter-spacing: 2px; font-size: 18px; }
.gr-count { color: var(--muted); font-size: 15px; }
.gr-all { margin-left: auto; color: var(--sapphire-300); font-weight: 600; font-size: 15px; text-underline-offset: 3px; }
.gr-all:hover { color: #fff; }
.gr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gr-review { padding: 26px 26px 24px; gap: 12px; }
.gr-text {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6; line-clamp: 6; overflow: hidden;
  line-height: 1.6; white-space: pre-line;
}
.gr-text.open { display: block; -webkit-line-clamp: unset; }
.gr-more { align-self: flex-start; margin-top: -4px; }
.gr-who { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 6px; }
.gr-who > div { display: flex; flex-direction: column; }
.gr-photo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.gr-name { font-weight: 700; font-size: 15px; color: var(--text); text-decoration: none; }
a.gr-name:hover { text-decoration: underline; }
.gr-when { font-size: 13px; color: var(--muted); }
.gr-note { margin-top: 14px; font-size: 13px; color: var(--muted); }
@media (max-width: 680px) { .gr-all { margin-left: 0; width: 100%; } }
.ig-link { display: inline-flex; align-items: center; gap: 8px; }
.ig-link svg { width: 18px; height: 18px; }
.menu-ig { margin-top: 18px; color: var(--muted); text-decoration: none; font-size: 15px; }
.menu-ig:hover { color: var(--text); }
@media (max-width: 680px) {
  .ig-card { flex-direction: column; text-align: center; padding: 26px 22px; }
  .ig-text h3 { font-size: 18px; overflow-wrap: anywhere; }
}
.menu-foot p { margin-top: 20px; font-size: 15px; line-height: 1.9; color: var(--muted); }
.menu-foot p a { text-decoration: none; }
.menu-foot p a:hover { color: var(--text); }

/* Language switch */
.lang {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px 0 12px;
  text-decoration: none; font-family: var(--head); font-size: 14px; font-weight: 600;
  color: var(--text);
  background: linear-gradient(135deg, rgba(29, 79, 196, 0.45), rgba(13, 42, 107, 0.55));
  border: 1px solid rgba(138, 168, 255, 0.55); border-radius: 999px;
  box-shadow: 0 0 0 0 rgba(138, 168, 255, 0.35);
  transition: background .25s, border-color .25s, transform .25s, box-shadow .25s;
}
.lang svg { width: 18px; height: 18px; color: var(--sapphire-300); transition: transform .6s cubic-bezier(.2,.8,.2,1), color .25s; }
.lang:hover {
  background: linear-gradient(135deg, var(--sapphire-500), var(--sapphire-700));
  border-color: var(--sapphire-300);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px -8px rgba(29, 79, 196, 0.8);
}
.lang:hover svg { transform: rotate(180deg); color: #fff; }
.lang-short { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 76px);
  display: grid; place-items: center; text-align: center;
  padding: 96px 0 110px;
  background: var(--black);
}
/* Photo layer: slow zoom for a little life */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("../assets/hero-house.jpg") center 40% / cover no-repeat;
  animation: hero-zoom 24s ease-out both;
}
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
/* Dark sapphire overlay so the headline stays easy to read */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 55% at 50% 42%, rgba(4, 6, 11, 0.55), rgba(4, 6, 11, 0.25) 75%),
    linear-gradient(180deg, rgba(4, 6, 11, 0.75) 0%, rgba(10, 26, 66, 0.55) 45%, rgba(4, 6, 11, 0.95) 100%);
}
@media (prefers-reduced-motion: reduce) { .hero::before { animation: none; } }

/* Opening animation (plays once on load): lights come up, headline rises word by word
   (js/hero.js), subline and button fade up, button shines once, scroll arrow appears */
.hero::after { animation: hero-undim 1.6s ease .1s both; }
@keyframes hero-undim { from { background-color: rgba(0, 0, 0, 0.55); } to { background-color: rgba(0, 0, 0, 0); } }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; mix-blend-mode: screen; opacity: 0;
  background:
    radial-gradient(38% 30% at 52% 52%, rgba(255, 176, 84, 0.30), rgba(255, 138, 26, 0) 70%),
    radial-gradient(22% 18% at 70% 40%, rgba(255, 190, 110, 0.22), rgba(255, 138, 26, 0) 70%);
  animation: hero-lights 1.8s ease .25s forwards;
}
@keyframes hero-lights { 0% { opacity: 0; } 55% { opacity: 1; } 100% { opacity: .75; } }
.hero h1 .hero-w { display: inline-block; opacity: 0; filter: blur(10px); transform: translateY(28px); animation: hero-word .9s cubic-bezier(.16, 1, .3, 1) forwards; }
@keyframes hero-word { to { opacity: 1; filter: blur(0); transform: none; } }
.hero-inner > p, .hero-inner > .btn { opacity: 0; transform: translateY(16px); animation: hero-up .8s cubic-bezier(.16, 1, .3, 1) forwards; }
.hero-inner > p { animation-delay: 1.05s; }
.hero-inner > .btn { animation-delay: 1.3s; position: relative; overflow: hidden; }
@keyframes hero-up { to { opacity: 1; transform: none; } }
.hero-inner > .btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.55), transparent); transform: skewX(-20deg);
  animation: hero-shine 1.1s ease 1.9s forwards;
}
@keyframes hero-shine { to { left: 130%; } }
.hero-cue {
  position: absolute; left: 50%; bottom: 26px; z-index: 1; transform: translateX(-50%);
  color: rgba(238, 242, 251, 0.75); opacity: 0; animation: hero-fade .6s ease 2.3s forwards;
}
.hero-cue:hover { color: #fff; }
.hero-cue svg { display: block; width: 28px; height: 28px; animation: hero-bob 1.8s ease-in-out 2.9s infinite; }
@keyframes hero-fade { to { opacity: 1; } }
@keyframes hero-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }
@media (prefers-reduced-motion: reduce) {
  .hero::after, .hero-glow, .hero-inner > p, .hero-inner > .btn, .hero-inner > .btn::after, .hero-cue, .hero-cue svg, .hero h1 .hero-w { animation: none !important; }
  .hero-inner > p, .hero-inner > .btn, .hero-cue, .hero h1 .hero-w { opacity: 1; transform: none; filter: none; }
  .hero-glow { opacity: .75; }
}
.hero-inner { position: relative; z-index: 1; max-width: 920px; }
.hero h1 {
  font-size: clamp(44px, 7.6vw, 92px);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-wrap: balance;
  background: linear-gradient(180deg, #fff 30%, #b9c9f5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p { margin: 26px auto 42px; font-size: clamp(18px, 2.1vw, 22px); color: var(--muted); max-width: 620px; }

/* ---------- Sections ---------- */
.section { padding: 112px 0; }
.section-alt { background: linear-gradient(180deg, var(--black), var(--sapphire-900) 160%); }
.section-head { max-width: 640px; margin-bottom: 56px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 18px; }

/* ---------- Loan cards ---------- */
.loan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.loan {
  position: relative;
  padding: 32px 30px 34px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  transition: border-color .25s, transform .25s;
}
.loan:hover { border-color: var(--line-strong); transform: translateY(-4px); }
.loan .icon {
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 22px;
  background: rgba(29, 79, 196, 0.18); color: var(--sapphire-300);
  border: 1px solid var(--line);
}
.loan .icon svg { width: 24px; height: 24px; }
.loan h3 { font-size: 21px; font-weight: 600; margin-bottom: 8px; }
.loan p { color: var(--muted); font-size: 16px; }

/* ---------- Homebuyer cheat sheet ---------- */
.cs-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 28px; align-items: start; }
.cs-basics, .cs-pmi {
  padding: 30px 32px; border-radius: 20px; border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--panel-2), var(--panel));
}
.cs-eyebrow {
  font-family: var(--head); font-size: 13px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--orange);
}
.cs-list { list-style: none; margin: 14px 0 0; padding: 0; }
.cs-list li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.cs-list li:first-child { border-top: 0; padding-top: 10px; }
.cs-list li:last-child { padding-bottom: 0; }
.cs-num { font-family: var(--head); font-size: 28px; font-weight: 700; line-height: 1; color: var(--sapphire-300, #8aa8ff); }
.cs-list h3 { font-family: var(--head); font-size: 17px; font-weight: 600; line-height: 1.35; }
.cs-list p { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.cs-table { display: grid; grid-template-columns: auto 1fr; margin: 14px 0 0; }
.cs-table dt, .cs-table dd { padding: 13px 0; border-top: 1px solid var(--line); margin: 0; }
.cs-table dt { font-weight: 700; font-size: 14.5px; padding-right: 18px; }
.cs-table dd { color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.cs-table dt:first-of-type, .cs-table dt:first-of-type + dd { border-top: 0; padding-top: 6px; }
.cs-note { margin-top: 14px; font-size: 13px; font-style: italic; color: var(--muted); }
.cs-close { margin-top: 44px; text-align: center; }
.cs-close p { font-size: clamp(18px, 2vw, 21px); font-style: italic; margin-bottom: 20px; }
.cs-legal { margin: 28px auto 0; max-width: 760px; text-align: center; font-size: 12.5px; color: var(--muted); opacity: .8; }
@media (max-width: 900px) { .cs-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .cs-basics, .cs-pmi { padding: 24px 20px; }
  .cs-list li { grid-template-columns: 30px 1fr; gap: 10px; }
  .cs-num { font-size: 22px; }
  .cs-table { grid-template-columns: 1fr; }
  .cs-table dd { border-top: 0; padding-top: 0; }
  .cs-table dt:first-of-type + dd { padding-top: 0; }
}

/* ---------- Loan programs: groups, key facts, more programs ---------- */
.lp-label {
  display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
  font-family: var(--head); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--orange);
}
.lp-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.lp-label + .loan-grid { margin-bottom: 44px; }
.lp-note { margin: -28px 0 44px; font-size: 13px; color: var(--muted); }

.loan-grid.core-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
.core-grid .loan { padding: 26px 22px 24px; display: flex; flex-direction: column; }
.core-grid .loan .icon { margin-bottom: 16px; }
.core-grid .loan h3 { font-size: 20px; }
.core-grid .loan > p { font-size: 15px; }
.loan-grid.nqm-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
.nqm-grid .loan { padding: 26px 24px 24px; }
.nqm-grid .facts { grid-template-columns: repeat(2, 1fr); gap: 14px 20px; }

.facts { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.facts div { display: grid; gap: 2px; }
.facts dt { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.4; }
.facts dd small { display: block; font-weight: 500; font-size: 13px; color: var(--muted); }

.more-programs {
  padding: 28px 30px; border-radius: 20px;
  border: 1px solid var(--line); background: var(--panel);
}
.mp-head h3 { font-family: var(--head); font-size: 20px; font-weight: 600; }
.mp-head p { margin-top: 4px; color: var(--muted); font-size: 15px; }
.mp-groups { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 28px; }
.mp-group h4 { font-family: var(--head); font-size: 14px; font-weight: 600; color: var(--sapphire-300); margin-bottom: 6px; }
.mp-group details { border-bottom: 1px solid var(--line); }
.mp-group summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 0; font-size: 15px; font-weight: 600; color: var(--text);
}
.mp-group summary::-webkit-details-marker { display: none; }
.mp-group summary::after { content: "+"; color: var(--orange); font-weight: 700; }
.mp-group details[open] summary::after { content: "\2212"; }
.mp-group summary:hover { color: var(--sapphire-300); }
.mp-group summary:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.mp-facts { margin: -4px 0 0; padding: 0 0 12px; display: grid; gap: 4px; animation: mp-in .3s cubic-bezier(.2,.8,.2,1); }
.mp-facts div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; line-height: 1.4; }
.mp-facts dt { color: var(--muted); }
.mp-facts dd { margin: 0; color: var(--text); font-weight: 600; text-align: right; }
.mp-note { margin-top: 18px; font-size: 13px; color: var(--muted); }
.mp-group details p { padding: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--muted); animation: mp-in .3s cubic-bezier(.2,.8,.2,1); }
@keyframes mp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 1000px) {
  .loan-grid.core-grid { grid-template-columns: repeat(2, 1fr); }
  .mp-groups { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .loan-grid.core-grid, .loan-grid.nqm-grid, .mp-groups { grid-template-columns: 1fr; }
  .nqm-grid .facts { grid-template-columns: 1fr; }
  .more-programs { padding: 22px 18px; }
}

/* ---------- Services ---------- */
.services { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--line); }
.service {
  display: grid; grid-template-columns: 64px 1fr; gap: 8px 20px; align-content: start;
  padding: 36px 32px 36px 0;
  border-bottom: 1px solid var(--line);
}
.service:nth-child(odd) { border-right: 1px solid var(--line); }
.service:nth-child(even) { padding-left: 40px; }
.service:last-child:nth-child(odd) {
  grid-column: 1 / -1; justify-self: center; width: 50%;
  border-right: 0; padding-left: 20px; padding-right: 20px;
}
@media (max-width: 680px) {
  .service:last-child:nth-child(odd) { width: 100%; padding-left: 0; padding-right: 0; }
}
.service .num { font-family: var(--head); font-size: 15px; font-weight: 600; color: var(--orange); padding-top: 6px; }
.service h3 { font-size: 24px; font-weight: 600; }
.service p { grid-column: 2; color: var(--muted); }

/* Mortgage process: documents heads-up and timeline */
.proc-note {
  margin-top: 28px; display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(255, 138, 26, 0.10), rgba(29, 79, 196, 0.12)); border: 1px solid rgba(255, 138, 26, 0.28);
}
.proc-note svg { flex: 0 0 26px; width: 26px; height: 26px; color: var(--orange); margin-top: 2px; }
.proc-note h3 { font-family: var(--head); font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.proc-note p { color: #c9d3ea; font-size: 15.5px; line-height: 1.6; }
.proc-note p + p { margin-top: 8px; }
.proc-note strong { color: var(--text); }
.proc-time { margin-top: 16px; font-size: 14px; color: var(--muted); }
@media (max-width: 600px) { .proc-note { padding: 18px; gap: 12px; } }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 72px; align-items: center; }
/* About background: Florida pool home, darker so the bio stays easy to read */
#about { position: relative; overflow: hidden; }
#about::before, #about::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
#about::before { background: url("../assets/about-house.jpg") center 60% / cover no-repeat; }
#about::after {
  background:
    linear-gradient(90deg, rgba(4, 6, 11, 0.72) 0%, rgba(4, 6, 11, 0.86) 50%, rgba(4, 6, 11, 0.93) 100%),
    linear-gradient(180deg, var(--black) 0%, rgba(10, 26, 66, 0.35) 30%, rgba(10, 26, 66, 0.35) 70%, var(--black) 100%);
}
#about > .wrap { position: relative; z-index: 1; }
.portrait {
  aspect-ratio: 4 / 5; border-radius: 24px; overflow: hidden;
  display: grid; place-items: center;
  background:
    radial-gradient(70% 60% at 50% 35%, rgba(29, 79, 196, 0.5), transparent 70%),
    linear-gradient(180deg, var(--sapphire-900), var(--black));
  border: 1px solid var(--line);
}
.portrait img.mark { width: 58%; mix-blend-mode: screen; opacity: .95; }
.portrait img.photo { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.portrait { position: relative; box-shadow: 0 40px 80px -40px rgba(29, 79, 196, 0.6); }
/* Slide-in on scroll (classes added by js/reveal.js) */
.portrait.slide-ready {
  opacity: 0; transform: translateX(-110%);
  transition: transform 1.1s cubic-bezier(.16, 1, .3, 1), opacity .9s ease;
}
.portrait.slide-ready.slide-in { opacity: 1; transform: none; }
.slide-ready-r {
  opacity: 0; transform: translateX(90px);
  transition: transform .9s cubic-bezier(.16, 1, .3, 1) var(--d, 0s), opacity .7s ease var(--d, 0s);
}
.slide-ready-r.slide-in { opacity: 1; transform: none; }
/* Gentler slide-in for the rest of the site (classes added by js/reveal.js) */
main { overflow-x: clip; }
.sr { opacity: 0; transition: transform .9s cubic-bezier(.16, 1, .3, 1) var(--sr-d, 0s), opacity .7s ease var(--sr-d, 0s); }
.sr.sr-l { transform: translateX(-48px); }
.sr.sr-r { transform: translateX(48px); }
.sr.sr-in { opacity: 1; transform: none; }
.portrait::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, transparent 70%, rgba(4, 6, 11, 0.35));
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.about-copy h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; }
.about-copy .lead { margin-top: 18px; color: var(--muted); font-size: 17px; max-width: 580px; }
.about-copy .lead + .lead { margin-top: 12px; }
.about-title {
  margin-top: 10px; font-family: var(--head); font-size: 14px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--orange);
}
.about-title::after {
  content: ""; display: block; width: 56px; height: 2px; margin-top: 14px;
  background: linear-gradient(90deg, var(--orange), transparent);
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 40px 0 40px; }
.stat { padding: 22px 20px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.stat strong {
  display: block; font-family: var(--head); font-size: clamp(30px, 3.4vw, 42px); font-weight: 700; line-height: 1;
  background: linear-gradient(180deg, #fff, var(--sapphire-300)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat span { display: block; margin-top: 10px; color: var(--muted); font-size: 14px; line-height: 1.4; }

/* ---------- Reviews ---------- */
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review {
  padding: 32px 30px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 14px;
}
.review .stars { color: var(--orange); letter-spacing: 3px; font-size: 16px; }
.review h3 { font-size: 20px; font-weight: 600; }
.review p { color: var(--muted); font-size: 16px; }
.review cite { margin-top: auto; font-style: normal; font-weight: 700; font-size: 15px; }

/* ---------- Contact / booking ---------- */
.contact { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 56px; align-items: start; }
.contact-info { position: sticky; top: 116px; }
.contact-info h2 { font-size: clamp(32px, 4.4vw, 50px); font-weight: 700; }
.contact-info > p { margin-top: 14px; color: var(--muted); font-size: 18px; }
.contact-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list a { text-decoration: none; font-weight: 600; }
.contact-list a:hover { color: var(--sapphire-300); }
.contact-list .ci {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; color: var(--sapphire-300);
  background: rgba(29, 79, 196, 0.16); border: 1px solid var(--line);
}
.contact-list .ci svg { width: 20px; height: 20px; }

.form-card {
  padding: 40px; border-radius: 24px;
  background: linear-gradient(170deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -40px rgba(29, 79, 196, 0.45);
}
.form-card fieldset { border: 0; padding: 0; margin: 0 0 30px; }
.form-card legend {
  font-family: var(--head); font-weight: 600; font-size: 18px; padding: 0; margin-bottom: 16px;
}
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.grid-2 .field { margin-bottom: 0; }
.grid-2 + .grid-2, .grid-2 + .field, .field + .grid-2 { margin-top: 14px; }
.field label { font-size: 14px; font-weight: 600; color: #c9d3ea; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--text);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-strong); border-radius: 12px;
  padding: 13px 14px;
  transition: border-color .2s, background .2s;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--sapphire-300); background: rgba(0,0,0,.7); outline: none; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { background: var(--panel); }
.field input[type="date"] { color-scheme: dark; }
/* Numbered question lines */
.q-list {
  list-style: none; margin: 0; padding: 0;
  counter-reset: q;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--line-strong); border-radius: 12px;
  overflow: hidden;
  transition: border-color .2s;
}
.q-list:focus-within { border-color: var(--sapphire-300); }
.q-list li {
  counter-increment: q;
  display: flex; align-items: center;
  border-top: 1px solid var(--line);
}
.q-list li:first-child { border-top: 0; }
.q-list li[hidden] { display: none; }
.q-list li::before {
  content: counter(q);
  flex: 0 0 44px; align-self: stretch;
  display: grid; place-items: center;
  font-family: var(--head); font-size: 13px; font-weight: 600;
  color: var(--sapphire-300);
  border-right: 1px solid var(--line);
}
.field .q-list input {
  border: 0; border-radius: 0; background: transparent;
  padding: 12px 14px;
}
.field .q-list input:focus { background: rgba(29, 79, 196, 0.12); }
.field .q-list input::placeholder, .field textarea::placeholder { color: #5f6b86; }

.prep-note {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 20px; padding: 16px 18px; border-radius: 14px;
  background: rgba(29, 79, 196, 0.12); border: 1px solid var(--line-strong);
}
.prep-note > svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px; color: var(--sapphire-300); }
.prep-note p { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.prep-note p + p { margin-top: 8px; }
.prep-note strong { color: var(--text); font-weight: 700; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); line-height: 1.5; margin-bottom: 24px; }
.consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--orange); flex-shrink: 0; }
.form-card .btn { width: 100%; }
.form-status { margin-top: 16px; font-size: 15px; min-height: 1.5em; }
.form-status.ok { color: #7fe0a6; }
.form-status.err { color: #ff9b8a; }
/* Booking confirmation (shown after a successful booking) */
.bk-done { text-align: left; animation: mp-in .4s cubic-bezier(.2,.8,.2,1); }
.bk-done:focus { outline: none; }
.bk-check {
  width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px;
  background: rgba(29, 79, 196, 0.2); border: 1px solid var(--line-strong); color: var(--sapphire-300);
}
.bk-check svg { width: 28px; height: 28px; }
.bk-done h3 { font-family: var(--head); font-size: 28px; font-weight: 700; }
.bk-lead { margin-top: 6px; color: #c9d3ea; }
.bk-when { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.bk-when span {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(138, 168, 255, 0.08); border: 1px solid var(--line); font-weight: 600; font-size: 15px; color: var(--text);
}
.bk-when svg { width: 16px; height: 16px; color: var(--orange); }
.bk-block { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.bk-block h4 { font-family: var(--head); font-size: 16px; font-weight: 600; margin-bottom: 10px; color: var(--text); }
.bk-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bk-steps li { display: flex; gap: 12px; font-size: 15px; color: #c9d3ea; line-height: 1.5; }
.bk-steps li b { color: var(--text); font-weight: 600; word-break: break-word; }
.bk-steps .n {
  flex: 0 0 24px; height: 24px; border-radius: 999px; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; color: var(--orange); border: 1px solid rgba(255, 138, 26, 0.45);
}
.bk-prep { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bk-prep li { position: relative; padding-left: 26px; font-size: 15px; color: #c9d3ea; }
.bk-prep li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 12px; height: 7px;
  border-left: 2px solid var(--sapphire-300); border-bottom: 2px solid var(--sapphire-300); transform: rotate(-45deg);
}
.bk-safe {
  margin-top: 24px; display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: rgba(255, 138, 26, 0.08); border: 1px solid rgba(255, 138, 26, 0.3); font-size: 14px; color: #ffd9b8; line-height: 1.5;
}
.bk-safe svg { flex: 0 0 20px; width: 20px; height: 20px; color: var(--orange); margin-top: 1px; }
.bk-apply {
  margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 20px; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line);
}
.bk-apply p { font-size: 15px; color: #c9d3ea; max-width: 330px; }
.bk-apply p b { color: var(--text); }

/* ---------- Calculator motion: rolling numbers + sliding bars (js/odometer.js) ---------- */
.odo { display: inline-flex; align-items: flex-start; white-space: nowrap; }
.odo-c { display: inline-block; height: 1.15em; line-height: 1.15em; overflow: hidden; vertical-align: top; font-variant-numeric: tabular-nums; }
.odo-s { display: block; transition: transform .6s cubic-bezier(.2,.8,.2,1); will-change: transform; }
.odo-s > span, .odo-x { display: block; height: 1.15em; line-height: 1.15em; }
.odo-x { display: inline-block; }
.odo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cr-total.odo-on { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text); }
.cr-total .odo-s > span, .cr-total .odo-x {
  background: linear-gradient(180deg, #fff, var(--sapphire-300)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cr-bar.bar-slide { gap: 0; }
.cr-bar.bar-slide span { flex-basis: 0; transition: flex-grow .6s cubic-bezier(.2,.8,.2,1), margin .6s cubic-bezier(.2,.8,.2,1); }
@media (prefers-reduced-motion: reduce) {
  .odo-s, .cr-bar.bar-slide span { transition: none !important; }
}

/* ---------- Rate watch ---------- */
.section[hidden] { display: none; }
.rw-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.rw-card {
  padding: 24px 24px 22px; border-radius: var(--radius);
  background: linear-gradient(160deg, var(--panel-2), var(--panel)); border: 1px solid var(--line);
}
.rw-card[hidden] { display: none; }
.rw-label { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #c9d3ea; }
.rw-label i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.rw-value {
  font-family: var(--head); font-weight: 800; font-size: clamp(36px, 4vw, 46px); line-height: 1.1; margin: 10px 0 8px;
  background: linear-gradient(180deg, #fff, var(--sapphire-300)); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-variant-numeric: tabular-nums;
}
.rw-change {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--text);
  padding: 4px 10px; border-radius: 999px; background: rgba(138,168,255,.08); border: 1px solid var(--line);
}
.rw-change svg { width: 14px; height: 14px; }
.rw-asof { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.rw-fed {
  margin-top: 16px; padding: 24px 26px; border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(29, 79, 196, 0.16), rgba(8, 14, 28, 0.9)); border: 1px solid var(--line-strong);
}
.rw-fed[hidden] { display: none; }
.rw-fed-head h3 { font-family: var(--head); font-size: 20px; font-weight: 600; }
.rw-fed-head .rw-sub { max-width: 760px; font-size: 14px; }
.rw-fed-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(3, 1fr); }
.rw-fed-item { padding: 0 22px; border-left: 1px solid var(--line); }
.rw-fed-item:first-child { padding-left: 0; border-left: 0; }
.rw-k { font-size: 13px; font-weight: 600; color: #c9d3ea; }
.rw-big { margin: 6px 0 4px; font-family: var(--head); font-size: 26px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.rw-s { font-size: 13px; color: var(--muted); line-height: 1.5; }
.rw-watch {
  margin-top: 10px; display: inline-flex; align-items: flex-start; gap: 8px; font-size: 13px; font-weight: 600; line-height: 1.45;
  color: var(--sapphire-300); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(138,168,255,.4);
}
.rw-watch:hover { color: #fff; text-decoration-color: currentColor; }
.rw-watch svg { flex: 0 0 18px; width: 18px; height: 18px; color: var(--orange); margin-top: -1px; }
.rw-f-upcoming { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.rw-f-upcoming span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: rgba(138,168,255,.06); color: #c9d3ea; font-weight: 600; }
.rw-chart { margin-top: 16px; padding: 26px 26px 20px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.rw-chart-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 20px; }
.rw-chart-head h3 { font-family: var(--head); font-size: 20px; font-weight: 600; }
.rw-sub { margin-top: 2px; font-size: 13px; color: var(--muted); }
.rw-legend { display: flex; gap: 18px; font-size: 13.5px; color: #c9d3ea; }
.rw-legend span { display: inline-flex; align-items: center; gap: 8px; }
.rw-legend i { width: 18px; height: 2px; border-radius: 2px; background: var(--c); }
.rw-plot { position: relative; margin-top: 14px; touch-action: pan-y; }
.rw-plot svg { display: block; width: 100%; height: 300px; overflow: visible; }
.rw-grid line { stroke: rgba(138,168,255,.12); stroke-width: 1; }
.rw-axis text { fill: var(--muted); font-size: 12px; font-family: var(--body); }
.rw-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rw-end { font-size: 12.5px; font-weight: 700; fill: var(--text); font-family: var(--body); }
.rw-cross { stroke: rgba(238,242,251,.35); stroke-width: 1; }
.rw-dot { stroke: var(--panel); stroke-width: 2; }
.rw-tip {
  position: absolute; top: 0; pointer-events: none; min-width: 170px; padding: 10px 12px; border-radius: 10px;
  background: #0d1730; border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0,0,0,.5);
  font-size: 13px; color: #c9d3ea; transform: translateX(-50%); z-index: 2;
}
.rw-tip b { display: block; color: var(--text); font-size: 13px; margin-bottom: 6px; }
.rw-tip div { display: flex; justify-content: space-between; gap: 14px; }
.rw-tip div span { display: inline-flex; align-items: center; gap: 6px; }
.rw-tip div i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.rw-tip em { font-style: normal; color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }
.rw-tip[hidden] { display: none; }
.rw-explain { margin-top: 14px; font-size: 15px; color: #c9d3ea; }
.rw-explain strong { color: var(--text); }
.rw-table { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.rw-table summary { cursor: pointer; color: var(--sapphire-300); font-weight: 600; }
.rw-table table { margin-top: 10px; width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.rw-table th, .rw-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; }
.rw-table th:first-child, .rw-table td:first-child { text-align: left; }
.rw-table thead th { color: #c9d3ea; }
.rw-scroll { max-height: 260px; overflow: auto; }
.rw-foot { margin-top: 22px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.rw-note { max-width: 720px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
@media (max-width: 760px) {
  .rw-cards { grid-template-columns: 1fr; }
  .rw-fed { padding: 20px 18px; }
  .rw-fed-grid { grid-template-columns: 1fr; gap: 16px; }
  .rw-fed-item { padding: 16px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .rw-fed-item:first-child { padding-top: 0; border-top: 0; }
  .rw-chart { padding: 20px 16px 16px; }
  .rw-plot svg { height: 240px; }
}

/* ---------- Mortgage calculator ---------- */
:root {
  --k-pi: #2f63e0;
  --k-tax: #8aa8ff;
  --k-ins: #46c2b4;
  --k-mi: #ff8a1a;
  --k-hoa: #b79cff;
}
.section-calc {
  background:
    radial-gradient(60% 40% at 85% 10%, rgba(29, 79, 196, 0.22), transparent 70%),
    var(--ink);
  border-top: 1px solid var(--line);
}
.calc { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 24px; align-items: start; }
.calc-form, .calc-result {
  padding: 32px; border-radius: 24px;
  background: linear-gradient(170deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
}
.calc-form .field { margin-bottom: 18px; }
.field[hidden] { display: none; }
.calc-form .grid-2 { margin-top: 0; }
.calc-form .grid-2 + .grid-2 { margin-top: 18px; }
.calc-form .grid-2 .field { margin-bottom: 0; align-content: start; }
.flabel { font-size: 14px; font-weight: 600; color: #c9d3ea; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 28px; }

/* Segmented toggles */
.seg {
  display: inline-flex; padding: 3px; gap: 2px;
  background: rgba(0, 0, 0, 0.5); border: 1px solid var(--line-strong); border-radius: 999px;
}
.seg button {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  background: transparent; border: 0; border-radius: 999px; padding: 5px 11px; cursor: pointer;
  transition: background .2s, color .2s;
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--sapphire-500); color: #fff; }
/* Sliding highlight (added by calculator.js) */
.seg { position: relative; }
.seg button { position: relative; z-index: 1; }
.seg.has-pill button[aria-pressed="true"] { background: transparent; }
.seg-pill {
  position: absolute; top: 3px; bottom: 3px; left: 0; z-index: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #2a5ee0, var(--sapphire-500));
  box-shadow: 0 6px 18px -6px rgba(47, 99, 224, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition: transform .45s cubic-bezier(.65, 0, .35, 1), width .45s cubic-bezier(.65, 0, .35, 1);
}
.seg-pill.no-anim { transition: none; }
.seg-type { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg-type button { font-family: var(--head); font-size: 15px; padding: 11px 8px; }
.seg-sm button { padding: 4px 10px; font-size: 12px; }

/* Inputs with $ / % */
.affix { position: relative; display: flex; align-items: center; }
.affix > span {
  position: absolute; left: 14px; color: var(--muted); font-weight: 600; pointer-events: none;
}
.field .affix input { padding-left: 30px; }
.affix-end > span { left: auto; right: 14px; }
.field .affix-end input { padding-left: 14px; padding-right: 32px; }
.affix input::-webkit-outer-spin-button, .affix input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.affix input[type="number"] { -moz-appearance: textfield; }

/* Results */
.calc-result { position: sticky; top: 100px; }
.cr-label { color: var(--muted); font-size: 15px; font-weight: 600; }
.cr-total {
  font-family: var(--head); font-weight: 800; font-size: clamp(40px, 5vw, 56px); line-height: 1.1; margin: 6px 0 20px;
  background: linear-gradient(180deg, #fff, var(--sapphire-300)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.cr-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(255,255,255,.04); margin-bottom: 20px; }
.cr-bar span { display: block; height: 100%; transition: flex-grow .45s cubic-bezier(.2,.8,.2,1); min-width: 0; }
.cr-list { list-style: none; margin: 0; padding: 0; }
.cr-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: 15px; color: #c9d3ea; }
.cr-list li[hidden] { display: none; }
.cr-list i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex-shrink: 0; }
.cr-list b { margin-left: auto; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.cr-list .cr-sub { border-top: 1px dashed var(--line-strong); color: var(--text); font-weight: 700; padding-left: 20px; }
.cr-list .cr-sum {
  margin-top: 6px; padding: 12px 14px; border-radius: 12px;
  background: rgba(29, 79, 196, 0.18); border: 1px solid var(--line-strong);
  color: var(--text); font-weight: 700;
}
.cr-loan {
  display: grid; grid-template-columns: 1fr auto; gap: 6px 12px;
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}
.cr-loan-title {
  margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line);
  font-size: 13.5px; font-weight: 700; color: var(--text);
}
.cr-loan-title + .cr-loan { margin-top: 8px; padding-top: 0; border-top: 0; }
.cr-loan dd { margin: 0; text-align: right; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.cr-warn {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px;
  color: #ffc9a3; background: rgba(255, 138, 26, 0.1); border: 1px solid rgba(255, 138, 26, 0.3);
}
.tip {
  margin-top: 18px; padding: 16px 18px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 138, 26, 0.12), rgba(29, 79, 196, 0.12));
  border: 1px solid rgba(255, 138, 26, 0.28);
}
.tip-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.tip-head span { font-family: var(--head); font-weight: 700; font-size: 14px; color: var(--orange); }
.tip-next {
  width: 30px; height: 30px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
  color: var(--text); background: rgba(0,0,0,.35); border: 1px solid var(--line-strong);
  transition: transform .25s, border-color .25s;
}
.tip-next svg { width: 15px; height: 15px; }
.tip-next:hover { transform: translateX(3px); border-color: var(--orange); }
.tip p { font-size: 14.5px; line-height: 1.55; color: #dfe6f7; transition: opacity .25s; }
.tip p.fade { opacity: 0; }

/* Calculator tabs */
.seg-tabs { margin: -24px 0 28px; }
.seg-tabs button { font-family: var(--head); font-size: 15px; padding: 11px 22px; }
.calc-panel[hidden] { display: none; }
.calc-panel.from-right { animation: panel-in-r .45s cubic-bezier(.2, .8, .2, 1); }
.calc-panel.from-left { animation: panel-in-l .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes panel-in-r { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes panel-in-l { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .calc-panel.from-right, .calc-panel.from-left { animation: none; } }
#calculator { overflow-x: clip; }

/* HELOC calculator */
.seg-cltv { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; }
.seg-cltv button { font-family: var(--head); font-size: 15px; padding: 11px 8px; }
.field-hint { margin-top: 8px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.field-hint strong { color: #c9d3ea; font-weight: 600; }
.field-hint.hint-after { margin-top: 12px; }
.field-hint.hint-pick { margin-top: 10px; }
.calc-intro { margin: 0 0 20px; font-size: 15px; line-height: 1.55; color: #c9d3ea; }

/* DTI calculator */
.link-btn {
  font: inherit; font-size: 13px; font-weight: 600; color: var(--sapphire-300);
  background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.link-btn:hover { color: #fff; }
.debts { margin-top: 6px; padding-top: 20px; border-top: 1px solid var(--line); }
.debt-hint { margin: 6px 0 16px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.debt-cols, .debt-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr 40px; gap: 10px; align-items: center; }
.debt-cols { font-size: 12.5px; font-weight: 600; color: #8f9bb6; margin-bottom: 8px; }
.debt-row { margin-bottom: 10px; animation: debt-in .35s cubic-bezier(.2,.8,.2,1); }
@keyframes debt-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.debt-row select, .debt-row input {
  width: 100%; font: inherit; font-size: 15px; color: var(--text);
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--line-strong); border-radius: 12px; padding: 11px 12px;
}
.debt-row select {
  appearance: none; padding-right: 30px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat;
}
.debt-row select option { background: var(--panel); }
.debt-row .affix input { padding-left: 26px; }
.debt-row .affix > span { left: 11px; }
.debt-row input::placeholder { color: #5f6b86; font-size: 13px; }
.debt-row select:focus, .debt-row input:focus { outline: none; border-color: var(--sapphire-300); }
.debt-x {
  width: 40px; height: 44px; display: grid; place-items: center; cursor: pointer;
  color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 12px;
  transition: color .2s, border-color .2s, background .2s;
}
.debt-x svg { width: 16px; height: 16px; }
.debt-x:hover { color: #ff9b8a; border-color: rgba(255, 155, 138, 0.5); background: rgba(255, 155, 138, 0.08); }
.add-debt {
  width: 100%; margin-top: 4px; padding: 12px; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--sapphire-300);
  background: rgba(29, 79, 196, 0.08); border: 1px dashed var(--line-strong); border-radius: 12px;
  transition: background .2s, color .2s, border-color .2s;
}
.add-debt:hover { background: rgba(29, 79, 196, 0.18); color: #fff; border-color: var(--sapphire-300); }

.dti-meter { margin-bottom: 26px; }
.dti-track { position: relative; height: 12px; border-radius: 999px; overflow: hidden;
  background: linear-gradient(90deg, rgba(70,194,180,.18) 0 60%, rgba(138,168,255,.18) 60% 71.67%, rgba(255,138,26,.18) 71.67% 83.33%, rgba(255,107,107,.2) 83.33%); }
.dti-fill { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .5s cubic-bezier(.2,.8,.2,1), background .3s; background: #46c2b4; }
.dti-fill[data-zone="1"] { background: var(--sapphire-300); }
.dti-fill[data-zone="2"] { background: var(--orange); }
.dti-fill[data-zone="3"] { background: #ff6b6b; }
.dti-scale { position: relative; height: 18px; margin-top: 6px; font-size: 11.5px; color: #8f9bb6; }
.dti-scale span { position: absolute; transform: translateX(-50%); }
.dti-scale span:first-child { transform: none; }
.dti-status { margin: -8px 0 12px; font-size: 14.5px; font-weight: 600; color: #46c2b4; }
.dti-status[data-zone="1"] { color: var(--sapphire-300); }
.dti-status[data-zone="2"] { color: var(--orange); }
.dti-status[data-zone="3"] { color: #ff8f8f; }

.calc-note { margin-top: 28px; font-size: 13px; color: #6f7b95; }

@media (max-width: 980px) {
  .calc { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}
@media (max-width: 680px) {
  .calc-form, .calc-result { padding: 22px 18px; }
  .calc-form .grid-2 { gap: 18px; }
  .seg-tabs { display: grid; grid-template-columns: 1fr 1fr .72fr; width: 100%; }
  .seg-tabs button { padding: 11px 6px; font-size: 13.5px; white-space: nowrap; }
  .seg-tabs .tab-x { display: none; }
  .debt-cols { display: none; }
  .debt-row { grid-template-columns: 1fr 1fr 40px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
  .debt-row select { grid-column: 1 / 3; }
  .debt-row .debt-x { grid-column: 3; grid-row: 1; }
  .label-row { flex-wrap: wrap; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--black); border-top: 1px solid var(--line); padding: 64px 0 40px; font-size: 14px; color: var(--muted); }
.footer-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-top img { height: 32px; width: auto; mix-blend-mode: screen; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.legal { padding-top: 28px; display: grid; gap: 10px; line-height: 1.6; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a, .consent a { color: var(--sapphire-300); text-underline-offset: 3px; }
.legal a:hover, .consent a:hover { color: #fff; }
/* Privacy policy page */
.policy { padding: 140px 0 96px; }
.policy .wrap { max-width: 780px; }
.policy h1 { font-size: clamp(34px, 5vw, 48px); }
.policy .updated { color: var(--muted); margin-top: 10px; }
.policy h2 { font-size: 22px; margin: 40px 0 12px; }
.policy p, .policy li { color: #c9d3ea; }
.policy p + p, .policy ul + p { margin-top: 14px; }
.policy ul { padding-left: 22px; margin: 10px 0 0; display: grid; gap: 6px; }
.policy a { color: var(--sapphire-300); text-underline-offset: 3px; }
.policy .back { margin-top: 48px; }
.eho { display: inline-flex; align-items: center; gap: 8px; }
.eho svg { width: 22px; height: 22px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .loan-grid, .review-grid { grid-template-columns: 1fr 1fr; }
  .about, .contact { grid-template-columns: 1fr; gap: 48px; }
  .contact-info { position: static; }
  .portrait { max-width: 420px; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .nav { height: 66px; gap: 10px; }
  html { scroll-padding-top: 72px; }
  .brand img { height: 22px; }
  .nav .btn-sm { padding: 10px 14px; font-size: 13px; }
  .menu-toggle { width: 42px; height: 42px; }
  .menu, .menu-backdrop { top: 66px; }
  .menu { padding: 16px 24px 32px; }
  .menu-links a { font-size: 26px; padding: 18px 0; }
  .hero { min-height: auto; padding: 88px 0 96px; }
  .section { padding: 80px 0; }
  .section-head { margin-bottom: 40px; }
  .loan-grid, .review-grid, .grid-2 { grid-template-columns: 1fr; }
  .grid-2 .field + .field { margin-top: 0; }
  .services { grid-template-columns: 1fr; }
  .service, .service:nth-child(even) { padding: 28px 0; grid-template-columns: 44px 1fr; }
  .service:nth-child(odd) { border-right: 0; }
  .stats { grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .stat { padding: 18px 14px; }
  .form-card { padding: 26px 20px; }
}
@media (max-width: 520px) {
  .nav-cta { display: none; }
  .lang { padding: 0 14px 0 11px; }
  .brand img { height: 24px; }
}
@media (max-width: 400px) {
  .brand img { height: 20px; }
  .stats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
