/* Juniper Mortgage — Premium, calm, trustworthy */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --navy: #0F1C3F;
  --navy-mid: #1A2A52;
  --navy-soft: #E8ECF5;
  --cream: #F8F5F0;
  --cream-dark: #F0EBE3;
  --white: #FFFFFF;
  --text: #1C2536;
  --muted: #5B6472;
  --line: #E4E8F1;
  --accent: #2A6B5A; /* calm forest green accent */
  --accent-soft: #E6F0ED;
  --orange: #C47A3A; /* warm accent for CTAs */
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(15, 28, 63, 0.18);
  --shadow-sm: 0 6px 16px -8px rgba(15, 28, 63, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }

/* ---------- HEADER ---------- */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 700; font-size: 1.35rem; color: var(--navy);
}
.brand-logo {
  height: 44px; width: auto; display: block;
}
.brand-text { display: none; } /* logo includes wordmark */
@media (max-width: 400px) {
  .brand-logo { height: 36px; }
}
.brand small {
  display: block; font-family: 'Inter', sans-serif;
  font-size: 0.68rem; font-weight: 500; color: var(--muted);
  letter-spacing: 0.04em; text-transform: uppercase;
}
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 0.92rem; font-weight: 500; color: var(--muted);
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-cta {
  background: var(--navy); color: #fff !important;
  padding: 10px 20px; border-radius: 999px; font-size: 0.88rem; font-weight: 600;
  transition: background .2s, transform .2s;
}
.nav-cta:hover { background: var(--navy-mid); transform: translateY(-1px); }

.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  width: 40px; height: 40px; color: var(--navy);
}
.mobile-menu {
  display: none; position: fixed; inset: 76px 0 0 0; z-index: 90;
  background: rgba(255,255,255,0.98); backdrop-filter: blur(12px);
  padding: 24px 28px; flex-direction: column; gap: 6px;
  border-top: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 14px 16px; border-radius: 12px; font-weight: 600; font-size: 1.05rem; color: var(--navy);
}
.mobile-menu a:hover { background: var(--navy-soft); }
.mobile-menu .mobile-cta {
  margin-top: 12px; text-align: center; background: var(--navy); color: #fff !important;
  border-radius: 999px;
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
}


/* ---------- BANNER ---------- */
.brand-banner-wrap {
  width: 100%; line-height: 0; background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.brand-banner {
  width: 100%; height: auto; display: block;
  max-height: 320px; object-fit: cover; object-position: center;
}
@media (max-width: 700px) {
  .brand-banner { max-height: 200px; object-position: left center; }
}

/* ---------- HERO ---------- */
.hero {
  padding: 72px 0 88px;
  background:
    radial-gradient(600px 380px at 90% -5%, rgba(42,107,90,0.08), transparent 60%),
    radial-gradient(500px 320px at 5% 100%, rgba(15,28,63,0.06), transparent 55%),
    var(--cream);
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 40px; } }

.badge-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 13px; font-size: 0.76rem; font-weight: 600; color: var(--navy);
  box-shadow: var(--shadow-sm);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.hero h1 {
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  margin-bottom: 18px;
}
.hero h1 span { color: var(--accent); }
.hero .lede {
  font-size: 1.08rem; color: var(--muted); max-width: 48ch; margin-bottom: 28px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 36px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-size: 0.94rem; font-weight: 600;
  border: 1px solid transparent; transition: all .2s; cursor: pointer;
}
.btn-primary { background: var(--navy); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--navy-mid); transform: translateY(-2px); }
.btn-secondary { background: var(--white); color: var(--navy); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--navy); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { opacity: 0.92; transform: translateY(-1px); }

.hero-stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats .num {
  font-family: 'Cormorant Garamond', serif; font-weight: 700;
  font-size: 1.7rem; color: var(--navy);
}
.hero-stats .lbl { font-size: 0.8rem; color: var(--muted); }

/* ---------- CALC CARD (hero) ---------- */
.calc-card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px; border: 1px solid var(--line);
}
.calc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.calc-head h3 { font-size: 1.15rem; font-family: 'Inter', sans-serif; font-weight: 600; }
.calc-head span {
  font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--navy-soft); color: var(--navy); padding: 4px 10px; border-radius: 999px; font-weight: 600;
}
.field { margin-bottom: 18px; }
.field label {
  display: flex; justify-content: space-between;
  font-size: 0.82rem; color: var(--muted); margin-bottom: 8px; font-weight: 500;
}
.field label b { color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
input[type="range"] {
  width: 100%; accent-color: var(--navy); height: 5px; border-radius: 4px; background: var(--line);
}
.field-row { display: flex; gap: 14px; }
.field-row .field { flex: 1; }
.calc-result {
  margin-top: 20px; padding: 16px 18px; border-radius: 12px; background: var(--navy-soft);
}
.calc-result .row {
  display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0;
  font-size: 0.86rem; color: var(--muted);
}
.calc-result .row span:last-child { color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-result .row.total {
  margin-top: 6px; padding-top: 12px; border-top: 1px dashed rgba(15,28,63,0.15);
  font-size: 1rem; color: var(--navy); font-weight: 600;
}
.calc-result .row.total span:last-child {
  color: var(--accent); font-size: 1.4rem;
  font-family: 'Cormorant Garamond', serif; font-weight: 700;
}
.calc-note { font-size: 0.72rem; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ---------- SECTIONS ---------- */
section { padding: 80px 0; }
section.tight { padding: 64px 0; }
section.cream { background: var(--cream); }
.section-head { max-width: 560px; margin-bottom: 40px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.eyebrow {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px; display: block;
}
.section-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-bottom: 12px; }
.section-head p { color: var(--muted); font-size: 1.02rem; }

/* ---------- SERVICES GRID ---------- */
.services-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.service-card .idx {
  width: 34px; height: 34px; border-radius: 9px; background: var(--navy-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 700; margin-bottom: 14px;
}
.service-card h3 { font-size: 1.15rem; margin-bottom: 8px; font-family: 'Inter', sans-serif; font-weight: 600; }
.service-card p { font-size: 0.9rem; color: var(--muted); }

/* ---------- TRUST / LENDERS ---------- */
.lender-strip {
  background: var(--navy-soft); padding: 28px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.lender-label {
  display: block; text-align: center; font-size: 0.74rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 18px;
}
.lender-marquee {
  display: flex; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.lender-track {
  display: flex; flex-shrink: 0; align-items: center; gap: 14px; padding-right: 14px;
  animation: scroll 55s linear infinite;
}
.lender-logo {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 120px; height: 46px; padding: 0 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  font-size: 0.78rem; font-weight: 600; color: var(--navy); white-space: nowrap;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}
.lender-marquee:hover .lender-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .lender-track { animation: none; }
}

/* ---------- PROCESS ---------- */
.process-list { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }
.process-item {
  display: grid; grid-template-columns: 52px 1fr; gap: 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px 24px; align-items: start;
}
.process-item .step {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(145deg, var(--navy), var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.1rem;
}
.process-item h3 { font-size: 1.08rem; margin-bottom: 4px; font-family: 'Inter', sans-serif; font-weight: 600; }
.process-item p { color: var(--muted); font-size: 0.92rem; }

/* ---------- WHY / ABOUT TEASER ---------- */
.why-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
@media (max-width: 860px) { .why-grid { grid-template-columns: 1fr; gap: 32px; } }
.why-list { display: flex; flex-direction: column; gap: 18px; }
.why-list li { display: flex; gap: 14px; }
.why-list .tick {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
}
.why-list h4 { font-size: 1rem; margin-bottom: 3px; font-family: 'Inter', sans-serif; font-weight: 600; }
.why-list p { font-size: 0.9rem; color: var(--muted); }

/* ---------- HEALTH CHECK CTA ---------- */
.health-check {
  background: linear-gradient(155deg, var(--navy), var(--navy-mid));
  color: #fff; border-radius: var(--radius); padding: 36px 40px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.health-check h3 { color: #fff; font-size: 1.4rem; margin-bottom: 6px; }
.health-check p { color: rgba(255,255,255,0.8); font-size: 0.95rem; max-width: 46ch; }
.health-check .btn { background: var(--orange); color: #fff; border: none; }
.health-check .btn:hover { opacity: 0.92; }

/* ---------- BOOKING ---------- */
.booking {
  background: linear-gradient(155deg, var(--navy), var(--navy-mid)); color: #fff;
  padding: 80px 0;
}
.booking-grid {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 40px; align-items: center;
}
@media (max-width: 900px) { .booking-grid { grid-template-columns: 1fr; gap: 32px; } }
.booking h2 { color: #fff; font-size: clamp(1.8rem, 3vw, 2.3rem); margin-bottom: 14px; }
.booking p { color: rgba(255,255,255,0.78); font-size: 1.02rem; margin-bottom: 22px; max-width: 44ch; }
.booking-perks { display: flex; flex-direction: column; gap: 10px; }
.booking-perks div { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; color: rgba(255,255,255,0.9); }
.booking-perks .tick { color: var(--orange); font-weight: 800; }
.booking-frame {
  background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  min-height: 700px;
}
.booking-frame iframe { border: none; width: 100%; height: 700px; }
.booking-frame .calendly-inline-widget { min-width: 320px; height: 700px; }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 10px; padding: 0 22px;
}
.faq-q {
  width: 100%; text-align: left; background: none; border: none;
  padding: 20px 0; font-family: 'Inter', sans-serif; font-weight: 600; font-size: 1rem;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer; color: var(--navy);
}
.faq-q .plus { color: var(--accent); font-size: 1.25rem; font-weight: 700; transition: transform .2s; }
.faq-item[data-open="true"] .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.faq-a p { padding-bottom: 20px; color: var(--muted); font-size: 0.94rem; max-width: 62ch; }

/* ---------- CONTACT FORM ---------- */
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
@media (max-width: 860px) { .cta-grid { grid-template-columns: 1fr; gap: 32px; } }
.cta-details { margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.cta-details a {
  display: flex; align-items: center; gap: 12px;
  font-weight: 600; font-size: 0.98rem; color: var(--navy);
}
.cta-details .ico {
  width: 36px; height: 36px; border-radius: 10px; background: var(--navy-soft); color: var(--navy);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 0.9rem;
}
.cta-fine { font-size: 0.78rem; color: var(--muted); margin-top: 22px; line-height: 1.55; max-width: 44ch; }

.form-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.form { display: flex; flex-direction: column; gap: 16px; }
.form label { font-size: 0.8rem; font-weight: 600; color: var(--navy); margin-bottom: 5px; display: block; }
.form input, .form select, .form textarea {
  width: 100%; background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
  color: var(--text); padding: 12px 14px; font-family: 'Inter', sans-serif; font-size: 0.95rem;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: 2px solid var(--navy); outline-offset: 1px;
}
.form button {
  margin-top: 4px; align-self: flex-start;
  background: var(--navy); color: #fff; border: none; border-radius: 999px;
  padding: 13px 28px; font-size: 0.94rem; font-weight: 700; cursor: pointer;
  transition: background .2s, transform .2s;
}
.form button:hover { background: var(--navy-mid); transform: translateY(-1px); }

/* ---------- PAGE HERO (inner pages) ---------- */
.page-hero {
  padding: 56px 0 48px; background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2rem, 3.5vw, 2.8rem); margin-bottom: 12px; }
.page-hero p { color: var(--muted); font-size: 1.05rem; max-width: 52ch; }

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: start;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } }
.about-photo {
  aspect-ratio: 4/5; border-radius: var(--radius);
  background: var(--navy-soft);
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.about-photo img {
  width: 100%; height: 100%; object-fit: cover; object-position: center 15%;
}
.about-photo .initials { display: none; }
.cred-chips {
  display: flex; gap: 8px; flex-wrap: wrap; position: absolute;
  bottom: 16px; left: 16px; right: 16px;
}
.cred-chip {
  background: rgba(255,255,255,0.95); color: var(--navy);
  font-size: 0.7rem; font-weight: 700; padding: 5px 11px; border-radius: 999px;
}
.about-facts {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 24px;
}
@media (max-width: 560px) { .about-facts { grid-template-columns: 1fr 1fr; } }
.about-facts div {
  background: var(--cream); border: 1px solid var(--line); border-radius: 12px; padding: 14px;
}
.about-facts .num {
  font-family: 'Cormorant Garamond', serif; font-weight: 700;
  color: var(--accent); font-size: 1.3rem;
}
.about-facts .lbl { font-size: 0.76rem; color: var(--muted); }

/* ---------- CALCULATORS PAGE ---------- */
.calc-page-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
}
@media (max-width: 860px) { .calc-page-grid { grid-template-columns: 1fr; } }
.calc-full {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-sm);
}
.calc-full h3 { font-size: 1.2rem; margin-bottom: 6px; font-family: 'Inter', sans-serif; font-weight: 600; }
.calc-full .sub { font-size: 0.88rem; color: var(--muted); margin-bottom: 20px; }
.calc-full input[type="text"], .calc-full input[type="number"] {
  width: 100%; background: var(--cream); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 14px; font-size: 0.95rem; font-family: 'Inter', sans-serif;
}
.calc-full .field label { display: block; margin-bottom: 6px; }

/* ---------- FOOTER ---------- */
footer {
  padding: 40px 0 32px; border-top: 1px solid var(--line); background: var(--cream);
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; margin-bottom: 28px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }
.footer-brand {
  font-family: 'Cormorant Garamond', serif; font-weight: 700; font-size: 1.25rem; color: var(--navy);
  margin-bottom: 8px;
}
.footer-grid p { font-size: 0.86rem; color: var(--muted); line-height: 1.55; }
.footer-grid h4 {
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--navy); margin-bottom: 12px;
}
.footer-grid ul li { margin-bottom: 8px; }
.footer-grid ul a { font-size: 0.88rem; color: var(--muted); }
.footer-grid ul a:hover { color: var(--navy); }
.footer-bottom {
  padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 0.76rem; color: var(--muted); line-height: 1.6;
}

/* ---------- UTILS ---------- */
:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.text-muted { color: var(--muted); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
