/* ==========================================================================
   FinMighty — Design System (Phase 0)
   Shared across every page. Do not fork this file per-page — extend it.
   ========================================================================== */

:root {
  /* ---- Brand colors ---- */
  --color-navy: #14245c;          /* logo text / darkest headings */
  --color-primary: #1a3fb0;       /* primary blue - buttons, links, active states */
  --color-primary-dark: #122c80;  /* hover state for primary */
  --color-primary-light: #eef3fd; /* pale blue section backgrounds */

  /* ---- Accent colors (Investment / Loan / Insurance) ---- */
  --color-invest: #1a5fd0;        /* investment blue */
  --color-invest-bg: #eaf1fd;
  --color-loan: #e23b6e;          /* loan pink/red */
  --color-loan-bg: #fdecf1;
  --color-insurance: #12875a;     /* insurance green */
  --color-insurance-bg: #e9f7f1;

  /* ---- Neutrals ---- */
  --color-text: #222b3a;
  --color-text-muted: #5c6579;
  --color-text-faint: #8891a3;
  --color-border: #e4e8f0;
  --color-bg: #ffffff;
  --color-bg-alt: #f6f9fd;
  --color-footer-bg: #202b52;
  --color-footer-text: #b9c2df;
  --color-footer-border: #24316e;

  /* ---- Typography ---- */
  --font-heading: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;

  /* ---- Radius / shadow ---- */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --shadow-card: 0 4px 24px rgba(20, 36, 92, 0.07);
  --shadow-card-hover: 0 10px 32px rgba(20, 36, 92, 0.12);

  /* ---- Layout ---- */
  --container-width: 1360px;
  --header-height: 80px;
}

/* ---- Reset ---- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
[id] { scroll-margin-top: var(--header-height); }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.25;
  font-weight: 600;
}
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 48px 0;
}
.section--tight { padding: 32px 0; }
.section--alt { background: var(--color-bg-alt); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}

.section-title {
  text-align: center;
  font-size: 30px;
  margin-bottom: 8px;
}
.section-subtitle {
  text-align: center;
  color: var(--color-text-muted);
  font-size: 16px;
  max-width: 560px;
  margin: 0 auto 30px;
}
.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}
.section-heading-row .rule {
  width: 40px;
  height: 2px;
  background: var(--color-border);
}
.section-heading-row h2 { font-size: 26px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1.5px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary-light); }
.btn-white {
  background: #fff;
  color: var(--color-primary);
}
.btn-white:hover { background: #eef3fd; }
.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-block { width: 100%; }

/* ---- Global card hover styling ---- */
.service-card,
.solution-card,
.value-card,
.contact-info-card,
.insight-card,
.reach-card,
.insurer-badge,
.store-badge,
.trust-item {
  transition: background-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  border: 1px solid transparent;
}
.service-card:hover,
.solution-card:hover,
.value-card:hover,
.contact-info-card:hover,
.insight-card:hover,
.reach-card:hover,
.insurer-badge:hover,
.store-badge:hover,
.trust-item:hover {
  background-color: var(--color-primary-light) !important;
  border-color: rgba(26, 63, 176, 0.18);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
/* Icon chips keep their own accent color even while the card behind them turns light blue */
.service-card:hover .service-card__icon,
.solution-card:hover .solution-card__icon {
  transform: scale(1.06);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.site-logo__mark {
  width: 65px;
  height: 65px; 
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}
.site-logo__text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.site-logo__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 21px;
  color: var(--color-navy);
}
.site-logo__tagline {
  font-size: 11px;
  color: var(--color-text-faint);
  font-weight: 500;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 30px;
}
.site-nav a {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  position: relative;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
.site-nav a:hover { color: var(--color-primary); }
.site-nav a.is-active { color: var(--color-primary); }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -22px;
  height: 2px;
  background: var(--color-primary);
}

.header-cta { flex-shrink: 0; }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

@media (max-width: 1024px) {
  .site-header {
    height: auto;
    padding: 14px 0;
    position: sticky;
  }
  .site-header .container {
    position: relative;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card-hover);
    padding: 8px;
    max-height: calc(100vh - var(--header-height) - 24px);
    overflow-y: auto;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    flex: none;
    text-align: left;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
  }
  .site-nav a:hover, .site-nav a.is-active { background: var(--color-bg-alt); }
  .site-nav a.is-active::after { display: none; }
  .nav-toggle {
    display: flex;
    flex-shrink: 0;
  }
  .header-cta {
    width: auto;
    margin-top: 0;
    flex-shrink: 0;
  }
  .header-cta .btn {
    padding: 10px 16px;
    border-radius: var(--radius-md);
    min-width: 0;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .site-header .container { gap: 8px; }
  .header-cta .btn span { display: none; }
  .header-cta .btn { padding: 10px; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
  background: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 8px 0 16px;
  position: relative;
  overflow: visible;
}
.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: linear-gradient(135deg, var(--color-navy) 0%, #1b2f78 100%);
  border: 1px solid var(--color-footer-border);
  border-radius: var(--radius-lg);
  padding: 34px 40px;
  min-height: 128px;
  margin: -70px 0 32px;
  box-shadow: 0 16px 40px rgba(13, 26, 75, 0.28);
  position: relative;
  width: 100%;
  z-index: 2;
  flex-wrap: wrap;
}
@media (max-width: 900px) {
  .footer-top {
    margin: -56px 0 28px;
    padding: 26px 24px;
    flex-direction: column;
    align-items: flex-start;
  }
}
@media (max-width: 560px) {
  .footer-top { margin: -44px 0 24px; }
}
.footer-top__text h3 { color: #fff; font-size: 24px; margin-bottom: 6px; line-height: 1.15; }
.footer-top__text p { color: var(--color-footer-text); font-size: 13.5px; line-height: 1.4; margin: 0; }
.footer-top__contact {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-top__contact-item { display: flex; align-items: center; gap: 8px; }
.footer-top__contact-item strong { display: block; color: #fff; font-size: 13.5px; }
.footer-top__contact-item span { font-size: 11.5px; line-height: 1.2; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 16px;
  padding-bottom: 12px;
}
.footer-brand .site-logo__name { color: #fff; }
.footer-brand .site-logo__tagline { color: var(--color-footer-text); }
.footer-brand p {
  font-size: 12.8px;
  margin-top: 8px;
  color: var(--color-footer-text);
}
.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
.footer-social a {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.footer-social a:hover { background: var(--color-primary); }

.footer-col h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 12px;
  font-family: var(--font-heading);
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a {
  font-size: 13px;
  color: var(--color-footer-text);
  transition: color 0.2s ease;
}
.footer-col ul li a:hover { color: #fff; }

.footer-col--contact ul li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--color-footer-text);
}

.footer-bottom {
  border-top: 1px solid var(--color-footer-border);
  padding: 10px 0;
}
.footer-bottom__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--color-footer-text);
}
.footer-bottom__row a { color: var(--color-footer-text); }
.footer-bottom__row a:hover { color: #fff; }
.footer-disclaimer {
  font-size: 10px;
  color: #7d88ab;
  padding: 8px 0 4px;
  line-height: 1.4;
  border-top: 1px solid var(--color-footer-border);
  margin: 0 auto 0;
  text-align: center;
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  max-width: 100%;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-top { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FORM FIELDS (shared — used by Contact page form + Contact popup modal)
   ========================================================================== */
.form-field { margin-bottom: 18px; }
.form-field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--color-text); margin-bottom: 6px;
}
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%; padding: 13px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 14px;
  background: var(--color-bg-alt);
  color: var(--color-text);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { outline: 2px solid var(--color-primary); background: #fff; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

/* ==========================================================================
   FORM VALIDATION HELPERS (shared)
   ========================================================================== */
.form-field--error input,
.form-field--error select,
.form-field--error textarea {
  border-color: #e23b6e !important;
  background: #fdecf1 !important;
}
.form-field__error-msg {
  display: none;
  color: #e23b6e;
  font-size: 12px;
  margin-top: 5px;
}
.form-field--error .form-field__error-msg { display: block; }

/* ==========================================================================
   SUCCESS MODAL (shared — leads / query submission confirmation)
   ========================================================================== */
.fm-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 26, 75, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.fm-modal-overlay.is-open { opacity: 1; visibility: visible; }
.fm-modal {
  background: #fff;
  border-radius: var(--radius-lg);
  max-width: 380px;
  width: 100%;
  padding: 36px 32px 30px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(13, 26, 75, 0.3);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.25s ease;
}
.fm-modal-overlay.is-open .fm-modal { transform: translateY(0) scale(1); }
.fm-modal__icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: var(--color-insurance-bg);
  color: var(--color-insurance);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px;
}
.fm-modal h3 { font-size: 20px; margin-bottom: 8px; }
.fm-modal p { color: var(--color-text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 22px; }
.fm-modal button { min-width: 140px; }

/* ==========================================================================
   CONTACT POPUP MODAL (shared — opened from any "Explore" button)
   ========================================================================== */
.fm-modal--form {
  max-width: 560px;
  text-align: left;
  padding: 36px 36px 32px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  position: relative;
}
.fm-modal--form h3 { font-size: 22px; }
.fm-modal--form > p.fm-modal-form__intro { margin-bottom: 24px; }
.fm-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.fm-modal__close:hover { background: var(--color-bg-alt); color: var(--color-text); }
@media (max-width: 560px) {
  .fm-modal--form { padding: 30px 22px 26px; }
}
