/* =========================================================
   Moresource Mortgage & Finance — Stylesheet
   Palette: navy + leaf green, white background, soft blue tint
   Type: Inter for the whole system (clean, finance-appropriate)
   ========================================================= */

:root {
  /* Colour system */
  --navy-900: #0B2447;        /* primary brand navy */
  --navy-800: #122e5c;
  --navy-700: #1b3a73;
  --navy-100: #eaf0f8;        /* hero / process section tint */
  --green-500: #4FB733;       /* brand leaf green */
  --green-600: #3FA226;
  --green-700: #338719;
  --grey-900: #1a1a1a;
  --grey-700: #4a5568;
  --grey-500: #6b7280;
  --grey-300: #d1d5db;
  --grey-100: #f4f6fa;
  --white: #ffffff;
  --shadow-card: 0 4px 18px rgba(11, 36, 71, 0.08);
  --shadow-card-hover: 0 10px 28px rgba(11, 36, 71, 0.14);

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Type scale */
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --container: 1200px;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--grey-900);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-900); text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0 0 var(--space-md);
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, var(--fs-3xl)); }
h2 { font-size: clamp(1.5rem, 3.2vw, var(--fs-2xl)); }
h3 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--space-md); color: var(--grey-700); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--fs-sm);
  border: 2px solid transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: var(--navy-900);
  color: var(--white);
  border-color: var(--navy-900);
}
.btn-primary:hover { background: var(--navy-800); border-color: var(--navy-800); transform: translateY(-1px); }

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

.btn-green {
  background: var(--green-500);
  color: var(--white);
  border-color: var(--green-500);
}
.btn-green:hover { background: var(--green-600); border-color: var(--green-600); transform: translateY(-1px); }

.btn-white {
  background: var(--white);
  color: var(--navy-900);
  border-color: var(--white);
}
.btn-white:hover { background: var(--grey-100); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
  border-bottom: 1px solid var(--grey-100);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 2rem;
}
.brand { display: inline-flex; align-items: center; }
.brand img.brand-mark { height: 56px; width: auto; max-width: 240px; display: block; }
@media (max-width: 640px) { .brand img.brand-mark { height: 44px; } }

.nav { display: flex; align-items: center; gap: 1.75rem; }
.nav a {
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--grey-900);
  padding: 0.5rem 0;
  position: relative;
  transition: color .2s;
}
.nav a:hover { color: var(--navy-900); }
.nav a.active { color: var(--navy-900); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--green-500);
  border-radius: 2px;
}
.nav .has-dropdown { position: relative; }
.nav .has-dropdown > a::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
}
.nav .dropdown-menu {
  position: absolute;
  top: 100%; left: -1rem;
  background: var(--white);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all .2s ease;
}
.nav .has-dropdown:hover .dropdown-menu,
.nav .has-dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav .dropdown-menu a {
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.nav .dropdown-menu a:hover { background: var(--navy-100); color: var(--navy-900); }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  padding: 0.5rem;
}
.nav-toggle span {
  display: block; width: 24px; height: 2px; background: var(--navy-900);
  margin: 5px 0; transition: .2s;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(120deg, #eaf0f8 0%, #f6f9fc 60%, #ffffff 100%);
  padding: var(--space-3xl) 0;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); margin-bottom: 1.25rem; }
.hero h1 .accent { color: var(--green-500); }
.hero p { font-size: var(--fs-md); max-width: 480px; color: var(--grey-700); }
.hero-actions { display: flex; gap: 0.85rem; margin-top: 1.75rem; flex-wrap: wrap; }

.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #d8e0eb, #b4c2d4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* ---------- Sections ---------- */
.section { padding: var(--space-3xl) 0; }
.section-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}
.section-title h2 { margin-bottom: var(--space-sm); }
.section-title::after {
  content: "";
  display: block;
  width: 56px; height: 3px;
  background: var(--green-500);
  border-radius: 3px;
  margin: 0.5rem auto 0;
}
.section-tinted { background: var(--navy-100); }
.section-grey { background: var(--grey-100); }

/* ---------- Services cards ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem 1.75rem;
  box-shadow: var(--shadow-card);
  text-align: center;
  display: flex;
  flex-direction: column;
  transition: transform .2s, box-shadow .2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.service-card .icon {
  width: 56px; height: 56px;
  margin: 0 auto 1.25rem;
  color: var(--navy-900);
}
.service-card .icon svg { width: 100%; height: 100%; }
.service-card h3 { font-size: var(--fs-md); margin-bottom: 0.75rem; }
.service-card p { font-size: var(--fs-sm); flex-grow: 1; }
.service-card .learn-more {
  color: var(--navy-900);
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.service-card .learn-more:hover { color: var(--green-600); }

/* ---------- Process steps ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  position: relative;
}
.process-step { text-align: center; position: relative; }
.process-step .step-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
  color: var(--navy-900);
  box-shadow: var(--shadow-card);
}
.process-step .step-icon svg { width: 36px; height: 36px; }
.process-step .step-num {
  color: var(--green-500);
  font-weight: 700;
  font-size: var(--fs-sm);
  margin-bottom: 0.25rem;
}
.process-step h3 { font-size: var(--fs-base); margin-bottom: 0.5rem; }
.process-step p { font-size: var(--fs-xs); color: var(--grey-700); }
.process-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 36px;
  right: -50%;
  width: 100%;
  border-top: 2px dotted var(--grey-300);
  z-index: 0;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.about-grid h2 { text-align: left; }
.about-grid h2::after { margin: 0.5rem 0 0; }
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, #e6e9ec, #cfd6df);
}

/* ---------- Why Choose ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
}
.why-item { display: flex; gap: 1rem; align-items: flex-start; }
.why-item .icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--navy-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--navy-900);
  flex-shrink: 0;
}
.why-item .icon svg { width: 24px; height: 24px; }
.why-item h3 { font-size: var(--fs-base); margin-bottom: 0.35rem; }
.why-item p { font-size: var(--fs-sm); margin-bottom: 0; }

/* About + Why side by side layout */
.about-why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.about-col h2,
.why-col h2 { text-align: left; }
.about-col h2::after,
.why-col h2::after { margin: 0.5rem 0 var(--space-lg); }

/* ---------- Testimonial / CTA ---------- */
.cta-band {
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  margin: 3rem 0;
}
.cta-band .testimonial { display: flex; gap: 1.25rem; }
.cta-band .quote-mark {
  font-size: 3rem; line-height: 1; color: var(--green-500); font-family: Georgia, serif;
}
.cta-band .testimonial p {
  color: var(--white); font-size: var(--fs-sm); margin-bottom: 0.5rem;
}
.cta-band .testimonial .attrib { color: var(--green-500); font-weight: 600; font-size: var(--fs-sm); }
.cta-band .cta-text h2 { color: var(--white); text-align: left; margin-bottom: 0.5rem; font-size: var(--fs-xl); }
.cta-band .cta-text h2::after { display: none; }
.cta-band .cta-text p { color: rgba(255,255,255,0.85); margin-bottom: 1.25rem; }
.cta-band .cta-actions { display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-grid h4 {
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 700;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 0.5rem; }
.footer-grid a { color: rgba(255,255,255,0.8); }
.footer-grid a:hover { color: var(--green-500); }
.footer-contact li {
  display: flex; align-items: flex-start; gap: 0.6rem;
}
.footer-contact svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 4px; color: var(--green-500); }
.footer-brand .brand { background: #fff; padding: 10px 14px; border-radius: 8px; }
.footer-brand .brand img.brand-mark { height: 48px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.25rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.6);
}

/* ---------- Inner page hero ---------- */
.page-hero {
  background: linear-gradient(120deg, #eaf0f8 0%, #f6f9fc 100%);
  padding: var(--space-2xl) 0;
  text-align: center;
}
.page-hero h1 { margin-bottom: 0.5rem; }
.page-hero p { font-size: var(--fs-md); max-width: 680px; margin: 0 auto; }
.breadcrumb {
  font-size: var(--fs-sm);
  color: var(--grey-500);
  margin-bottom: 1rem;
}
.breadcrumb a { color: var(--grey-500); }
.breadcrumb a:hover { color: var(--navy-900); }

/* ---------- Content blocks ---------- */
.content-block {
  max-width: 820px;
  margin: 0 auto;
}
.content-block h2 { text-align: left; margin-top: 2.5rem; }
.content-block h2::after { margin: 0.5rem 0 0; }
.content-block ul { padding-left: 1.25rem; color: var(--grey-700); }
.content-block li { margin-bottom: 0.5rem; }

/* ---------- Forms ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 3rem;
}
.form-card {
  background: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { margin-bottom: 1rem; }
.form-field label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--navy-900);
  margin-bottom: 0.4rem;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--grey-300);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--fs-sm);
  color: var(--grey-900);
  background: var(--white);
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(11,36,71,0.08);
}
.form-field textarea { resize: vertical; min-height: 120px; }
.contact-info-card {
  background: var(--navy-900);
  color: var(--white);
  padding: 2rem;
  border-radius: var(--radius-md);
}
.contact-info-card h3 { color: var(--white); }
.contact-info-card ul { list-style: none; padding: 0; margin: 1.5rem 0; }
.contact-info-card li { display: flex; gap: 0.75rem; margin-bottom: 1rem; align-items: flex-start; }
.contact-info-card svg { width: 20px; height: 20px; color: var(--green-500); flex-shrink: 0; margin-top: 3px; }
.contact-info-card p { color: rgba(255,255,255,0.85); margin: 0; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--grey-300);
  padding: 1.25rem 0;
}
.faq-item summary {
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--green-500);
  font-weight: 400;
  line-height: 1;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0.75rem 0 0; color: var(--grey-700); }

/* ---------- Calculators teaser ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.tool-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  text-align: left;
  border-top: 4px solid var(--green-500);
}
.tool-card h3 { font-size: var(--fs-md); }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .process-grid { grid-template-columns: repeat(3, 1fr); row-gap: 2rem; }
  .process-step:not(:last-child)::after { display: none; }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
  .footer-contact { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-card);
    gap: 0;
    transform: translateY(-200%);
    transition: transform .25s ease;
  }
  .nav.is-open { transform: translateY(0); }
  .nav a { padding: 0.75rem 0; border-bottom: 1px solid var(--grey-100); }
  .nav .has-dropdown > a::after { display: none; }
  .nav .dropdown-menu {
    position: static;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; padding: 0 0 0 1rem;
  }
  .header-inner .btn { display: none; }

  .hero { padding: var(--space-2xl) 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-image { order: -1; }

  .services-grid { grid-template-columns: 1fr; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }

  .about-grid,
  .about-why-grid,
  .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
  .why-grid { grid-template-columns: 1fr; }

  .cta-band { grid-template-columns: 1fr; padding: 1.75rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .tool-grid { grid-template-columns: 1fr; }

  .section { padding: var(--space-2xl) 0; }
}

@media (max-width: 480px) {
  .process-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--green-500);
  outline-offset: 2px;
  border-radius: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
