/* =========================================================
   Mema Financial Services — Premium Institutional Theme
   Pure HTML5 + CSS3, no JS
   ========================================================= */

:root {
  /* Brand */
  --navy: #0B1F3A;
  --navy-2: #13315c;
  --navy-deep: #081530;
  --gold: #C9A227;
  --gold-2: #e0bd4a;
  --gold-soft: rgba(201, 162, 39, 0.12);

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f7f8fa;
  --gray-100: #eef1f5;
  --gray-200: #dde2ea;
  --gray-400: #9aa3b2;
  --gray-600: #4a5568;
  --gray-800: #1f2a3d;

  /* Type */
  --serif: "Playfair Display", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Layout */
  --container: 1200px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 6px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 12px 32px -12px rgba(11, 31, 58, 0.18);
  --shadow-lg: 0 30px 60px -20px rgba(11, 31, 58, 0.35);

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; margin: 0; }
button { font: inherit; cursor: pointer; }

/* Responsive type */
h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--navy);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  font-weight: 600;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.75rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1rem; letter-spacing: 0.04em; text-transform: uppercase; font-family: var(--sans); font-weight: 600; }
p  { margin: 0 0 1em; color: var(--gray-600); }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section-alt { background: var(--gray-50); }

.section-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section-head.light h2 { color: var(--white); }
.section-head.light .section-sub { color: rgba(255,255,255,0.7); }
.section-sub { font-size: 1.05rem; color: var(--gray-600); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 16px;
}
.eyebrow.dark { color: var(--navy); }
.eyebrow.gold { color: var(--gold); }

.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition: transform 0.35s var(--ease), background 0.35s var(--ease),
              color 0.3s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s var(--ease);
  white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: var(--navy);
  box-shadow: 0 10px 24px -8px rgba(201, 162, 39, 0.55);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -10px rgba(201,162,39,0.7); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}
.btn-outline:hover { background: rgba(255,255,255,0.08); border-color: var(--gold); color: var(--gold); }
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn-outline-light:hover { background: rgba(255,255,255,0.08); }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.25);
  padding: 10px 18px;
  font-size: 0.85rem;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Navigation ---------- */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 31, 58, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  gap: 24px;
}
.logo { display: flex; align-items: center; gap: 12px; color: var(--white); }
.logo-text { font-family: var(--serif); font-size: 1.15rem; line-height: 1; display: flex; flex-direction: column; }
.logo-text strong { font-weight: 700; letter-spacing: 0.01em; }
.logo-text span { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255,255,255,0.6); margin-top: 4px; }

.nav-links {
  display: flex;
  gap: 36px;
}
.nav-links a {
  position: relative;
  color: rgba(255,255,255,0.85);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 6px 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--gold);
  transition: right 0.4s var(--ease);
}
.nav-links a:hover { color: var(--white); }
.nav-links a:hover::after { right: 0; }

.nav-cta { display: inline-flex; }

@media (max-width: 820px) {
  .nav-links { display: none; }
  .logo-text span { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  color: var(--white);
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(201,162,39,0.18), transparent 60%),
    linear-gradient(180deg, rgba(11,31,58,0.4) 0%, rgba(11,31,58,0.85) 100%);
}
.hero-grid { width: 100%; height: 100%; }

.hero-inner {
  padding: 120px 24px 100px;
  max-width: 980px;
  animation: rise 1s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero h1 { color: var(--white); margin-bottom: 24px; }
.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  color: rgba(255,255,255,0.78);
  max-width: 660px;
  margin-bottom: 40px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 80px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 32px;
}
.hero-stats li {
  display: flex; flex-direction: column;
  padding-right: 16px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.hero-stats li:last-child { border-right: none; }
.hero-stats strong {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--gold);
  font-weight: 600;
}
.hero-stats span {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
}
@media (max-width: 720px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .hero-stats li:nth-child(2) { border-right: none; }
}

/* ---------- Services ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 32px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow-sm);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold-soft);
}
.card:hover::before { transform: scaleX(1); }

.service .icon {
  width: 56px; height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 24px;
  transition: transform 0.5s var(--ease);
}
.card:hover .icon { transform: rotate(-4deg) scale(1.05); }

.card-link {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), gap 0.3s var(--ease);
}
.card-link:hover { color: var(--gold); border-color: var(--gold); gap: 12px; }

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } }

.about-copy h2 { margin-bottom: 24px; }
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.stat {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  text-align: left;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.stat:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
}
.stat strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--navy);
}
.stat span {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
}
@media (max-width: 560px) { .stats { grid-template-columns: 1fr; } }

.about-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.wire-illu { width: 100%; height: auto; display: block; }

/* ---------- Market Insights (dark + glass) ---------- */
.section-dark {
  color: var(--white);
  background: var(--navy-deep);
  overflow: hidden;
  isolation: isolate;
}
.dark-bg {
  position: absolute; inset: 0; z-index: -1;
}
.dark-bg svg { width: 100%; height: 100%; }

.glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.07) 0%, rgba(255,255,255,0.02) 100%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  padding: 36px 30px;
  color: var(--white);
  position: relative;
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s var(--ease), background 0.4s var(--ease);
}
.glass::after {
  content: "";
  position: absolute;
  width: 200px; height: 200px;
  top: -80px; right: -80px;
  background: radial-gradient(circle, rgba(201,162,39,0.25), transparent 70%);
  border-radius: 50%;
  transition: transform 0.6s var(--ease);
}
.glass:hover {
  transform: translateY(-6px);
  border-color: rgba(201,162,39,0.5);
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.03) 100%);
}
.glass:hover::after { transform: scale(1.3); }
.glass h3 { color: var(--white); margin-bottom: 12px; }
.glass p { color: rgba(255,255,255,0.72); }
.tag {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(201,162,39,0.4);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.meta {
  display: block;
  margin-top: 18px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* ---------- Trust ---------- */
.trust { background: var(--gray-50); }
.trust-title {
  text-align: center;
  font-size: 1.05rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-bottom: 48px;
}
.logos {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  align-items: center;
}
.logo-tile {
  height: 70px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gray-400);
  filter: grayscale(100%);
  opacity: 0.7;
  transition: color 0.4s var(--ease), opacity 0.4s var(--ease), transform 0.4s var(--ease), filter 0.4s var(--ease);
  border-radius: var(--radius-sm);
}
.logo-tile:hover {
  color: var(--navy);
  opacity: 1;
  transform: translateY(-2px);
  filter: grayscale(0%);
}
@media (max-width: 900px) { .logos { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .logos { grid-template-columns: repeat(2, 1fr); } }

/* ---------- CTA strip ---------- */
.cta {
  background:
    linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 90% 10%, rgba(201,162,39,0.18), transparent 50%);
}
.cta-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}
.cta h2 { color: var(--white); }
.cta p { color: rgba(255,255,255,0.72); margin-bottom: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
@media (max-width: 820px) {
  .cta-inner { grid-template-columns: 1fr; }
  .cta-actions { justify-content: flex-start; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo { margin-bottom: 18px; }
.footer-logo .logo-text strong { color: var(--white); }
.footer-logo .logo-text span { color: rgba(255,255,255,0.5); }
.footer-about { font-size: 0.92rem; line-height: 1.7; max-width: 360px; color: rgba(255,255,255,0.6); }
.footer h4 { color: var(--white); margin-bottom: 18px; font-size: 0.78rem; letter-spacing: 0.18em; }
.footer ul li { margin-bottom: 10px; font-size: 0.92rem; }
.footer ul li a { color: rgba(255,255,255,0.65); transition: color 0.3s var(--ease), padding-left 0.3s var(--ease); }
.footer ul li a:hover { color: var(--gold); padding-left: 4px; }
.footer ul.plain li { color: rgba(255,255,255,0.6); }

.socials { display: flex; gap: 12px; }
.socials a {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease), background 0.3s var(--ease);
}
.socials a:hover {
  color: var(--navy);
  background: var(--gold);
  border-color: var(--gold);
  transform: translateY(-2px);
}

.copyright {
  display: flex; justify-content: space-between; gap: 16px;
  padding-top: 24px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.45);
  flex-wrap: wrap;
}

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

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
