/* MG Funding Group — site styles */
:root {
  --navy: #0B1F33;
  --navy-mid: #14304A;
  --green: #1E4D45;
  --green-mid: #2A6359;
  --green-light: #E7F0EE;
  --gold: #D4A84B;
  --gold-dark: #B8903A;
  --gold-soft: #F7F1E4;
  --cream: #FAF8F4;
  --white: #FFFFFF;
  --gray-50: #F5F6F8;
  --gray-100: #E8EBEF;
  --gray-300: #C5CCD6;
  --gray-500: #6B7785;
  --gray-700: #3A4553;
  --text: #1A2330;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(11, 31, 51, 0.08);
  --shadow-lg: 0 12px 40px rgba(11, 31, 51, 0.12);
  --max: 1120px;
  --font: "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--green-mid); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--gold-dark); }
ul { list-style: none; }
button, input, select, textarea { font: inherit; }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-100);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
  gap: 1.5rem;
}

.logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
}
.logo:hover { color: inherit; }
.logo img { height: 48px; width: auto; display: block; }
.logo-wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}
.logo-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.logo-group {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--green);
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.nav a:hover { color: var(--green-mid); }


.nav-phone {
  color: var(--green-mid) !important;
  font-weight: 600 !important;
  white-space: nowrap;
}
.nav-phone:hover { color: var(--gold-dark) !important; }

.nav-cta {
  background: var(--green) !important;
  color: var(--white) !important;
  padding: 0.55rem 1.15rem;
  border-radius: 999px;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--green-mid) !important; color: var(--white) !important; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--navy);
}
.menu-toggle svg { width: 24px; height: 24px; }

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--gold);
  color: var(--navy);
}
.btn-primary:hover { background: var(--gold-dark); color: var(--navy); }
.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.45);
}
.btn-secondary:hover { background: rgba(255,255,255,0.1); color: var(--white); border-color: var(--white); }
.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover { background: var(--green); color: var(--white); }

/* —— Hero —— */
.hero {
  position: relative;
  padding: 5rem 0 5.5rem;
  overflow: hidden;
  background: linear-gradient(145deg, var(--navy) 0%, var(--navy-mid) 45%, var(--green) 100%);
  color: var(--white);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 85% 20%, rgba(212, 168, 75, 0.18), transparent),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(30, 77, 69, 0.35), transparent);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -5%;
  bottom: -20%;
  width: 55%;
  height: 90%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cpath d='M200 40 L360 160 L360 360 L40 360 L40 160 Z' fill='none' stroke='rgba(255,255,255,0.06)' stroke-width='2'/%3E%3Cpath d='M200 80 L320 170 L320 320 L80 320 L80 170 Z' fill='none' stroke='rgba(212,168,75,0.12)' stroke-width='1.5'/%3E%3C/svg%3E") center/contain no-repeat;
  pointer-events: none;
  opacity: 0.9;
}

.hero .container { position: relative; z-index: 1; }

.hero-eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.15;
  max-width: 16ch;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  font-size: 1.1rem;
  max-width: 38ch;
  color: rgba(255,255,255,0.82);
  margin-bottom: 2rem;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
}
.hero-trust strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

/* —— Section shared —— */
.section {
  padding: 4.5rem 0;
}
.section-alt { background: var(--white); }
.section-green {
  background: var(--green-light);
}

.section-header {
  max-width: 560px;
  margin-bottom: 2.75rem;
}
.section-header.centered {
  text-align: center;
  margin-inline: auto;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 0.65rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-header p {
  color: var(--gray-500);
  font-size: 1.05rem;
}

/* —— Loan cards —— */
.loan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.loan-card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.loan-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.loan-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  margin-bottom: 0.35rem;
}
.loan-icon svg { width: 22px; height: 22px; }

.loan-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
}

.loan-card p {
  font-size: 0.925rem;
  color: var(--gray-500);
  flex-grow: 1;
}

.loan-meta {
  font-size: 0.8rem;
  color: var(--green-mid);
  font-weight: 600;
  padding-top: 0.5rem;
  border-top: 1px solid var(--gray-100);
}

/* —— Audience split —— */
.audience-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.audience-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.audience-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.audience-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 0.6rem;
}
.audience-card p {
  color: var(--gray-500);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.audience-card ul {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.audience-card li {
  font-size: 0.9rem;
  color: var(--gray-700);
  padding-left: 1.35rem;
  position: relative;
}
.audience-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* —— How it works —— */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-100);
  position: relative;
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.15rem;
}

.step h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.step p {
  font-size: 0.925rem;
  color: var(--gray-500);
}

/* —— About —— */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 3rem;
  align-items: center;
}

.about-visual {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, var(--green) 0%, var(--navy) 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 30%, rgba(212,168,75,0.35), transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(255,255,255,0.08), transparent 40%);
}
.about-monogram {
  position: relative;
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  letter-spacing: -0.03em;
}

.about-content h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  color: var(--navy);
  margin-bottom: 1rem;
}
.about-content p {
  color: var(--gray-500);
  margin-bottom: 1rem;
  font-size: 1rem;
}
.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--gold-soft);
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  margin-top: 0.5rem;
}

/* —— FAQ —— */
.faq-list {
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1.15rem 1.35rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.975rem;
}
.faq-q:hover { color: var(--green-mid); }

.faq-q svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  transition: transform 0.25s;
  color: var(--gold-dark);
}
.faq-item.open .faq-q svg { transform: rotate(180deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.35rem;
  color: var(--gray-500);
  font-size: 0.925rem;
}
.faq-item.open .faq-a {
  max-height: 300px;
  padding: 0 1.35rem 1.25rem;
}

/* —— Contact / Form —— */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 2.5rem;
  align-items: start;
}

.contact-info h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.2rem);
  color: var(--navy);
  margin-bottom: 0.85rem;
}
.contact-info > p {
  color: var(--gray-500);
  margin-bottom: 1.75rem;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.contact-detail dt {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 0.15rem;
}
.contact-detail dd {
  color: var(--gray-700);
  font-size: 0.95rem;
}

.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-group.full { grid-column: 1 / -1; }

.form-group label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: var(--gray-50);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(30, 77, 69, 0.15);
  background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 100px; }

.form-note {
  font-size: 0.8rem;
  color: var(--gray-500);
  margin-top: 0.75rem;
  margin-bottom: 1.25rem;
}

.form-card .btn { width: 100%; }


/* —— Footer —— */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.75);
  padding: 3.5rem 0 2rem;
  font-size: 0.875rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

.footer-brand .logo,
.logo-footer {
  display: inline-flex;
  background: var(--cream);
  border-radius: 12px;
  padding: 0.65rem 0.8rem 0.55rem;
  margin-bottom: 1rem;
}
.footer-brand .logo:hover,
.logo-footer:hover {
  color: inherit;
}
.footer-brand .logo img,
.logo-footer img {
  height: 120px;
  width: auto;
  filter: none;
}
.footer-brand p {
  max-width: 28ch;
  line-height: 1.55;
  margin-bottom: 1rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-col a {
  color: rgba(255,255,255,0.7);
}
.footer-col a:hover { color: var(--gold); }

.ehl-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.85);
}
.ehl-badge svg { width: 28px; height: 28px; flex-shrink: 0; }

.footer-disclaimer {
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  max-width: 85ch;
  margin-bottom: 1.5rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.5); }
.footer-bottom a:hover { color: var(--gold); }

.placeholder {
  background: rgba(212, 168, 75, 0.15);
  color: var(--gold);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-style: italic;
}
.site-footer .placeholder {
  background: rgba(212, 168, 75, 0.2);
  color: var(--gold);
}

/* —— Legal pages —— */
.legal-page {
  padding: 4rem 0 5rem;
  background: var(--white);
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.legal-page .notice {
  background: var(--gold-soft);
  border-left: 4px solid var(--gold);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
  font-size: 0.925rem;
  color: var(--navy);
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--navy);
  margin: 1.75rem 0 0.65rem;
}
.legal-page p, .legal-page li {
  color: var(--gray-500);
  margin-bottom: 0.75rem;
  max-width: 70ch;
}
.legal-page ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

/* —— Responsive —— */
@media (max-width: 1100px) and (min-width: 721px) {
  .nav-phone { display: none; }
}

@media (max-width: 900px) {
  .audience-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .about-visual { max-width: 280px; aspect-ratio: 4/3; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .menu-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-100);
    gap: 0;
    box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--gray-100);
  }
  .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
    border-bottom: none !important;
  }
  .hero { padding: 3.5rem 0 4rem; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; gap: 2rem; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
}

@media (max-width: 480px) {
  .loan-grid { grid-template-columns: 1fr; }
  .container { width: min(100% - 1.75rem, var(--max)); }
}
