/* Frontier FinLab — landing v1
   Palette: deep navy #0A1628 · charcoal #1E293B · cobalt accent #3D7EFF · warm off-white #F6F4EF · gold highlight #F0B429 */

:root {
  --navy: #0A1628;
  --navy-mid: #12233A;
  --charcoal: #1E293B;
  --muted: #5B6B7C;
  --line: #D8DEE6;
  --bg: #F6F4EF;
  --bg-soft: #EEF2F7;
  --white: #FFFFFF;
  --accent: #3D7EFF;
  --accent-hover: #2B6AED;
  --accent-soft: rgba(61, 126, 255, 0.12);
  --gold: #F0B429;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(10, 22, 40, 0.04), 0 8px 24px rgba(10, 22, 40, 0.06);
  --shadow-lg: 0 4px 12px rgba(10, 22, 40, 0.06), 0 24px 48px rgba(10, 22, 40, 0.1);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --max: 1120px;
  --header-h: 68px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--charcoal);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 1px 0 rgba(10,22,40,0.03);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 1rem;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--navy); text-decoration: none; font-weight: 700;
  letter-spacing: -0.02em; font-size: 1.05rem;
}
.wordmark:hover { color: var(--navy); }
.wordmark-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--navy); color: var(--accent);
  display: grid; place-items: center; font-weight: 800; font-size: 0.85rem;
  flex-shrink: 0;
}
.wordmark-mark span { color: var(--gold); font-size: 0.55rem; position: relative; top: -6px; left: 1px; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: 0.45rem 0.6rem; cursor: pointer; color: var(--navy);
}
.nav-toggle svg { width: 22px; height: 22px; }

.nav {
  display: flex; align-items: center; gap: 0.25rem 1.35rem;
}
.nav a {
  color: var(--charcoal); text-decoration: none; font-size: 0.92rem; font-weight: 500;
}
.nav a:hover { color: var(--accent); }
.nav .btn { margin-left: 0.35rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1.25rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  font-family: inherit; line-height: 1.2;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: var(--white); border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--white); border-color: var(--accent-hover); }
.btn-secondary {
  background: transparent; color: var(--navy); border-color: var(--line);
}
.btn-secondary:hover { border-color: var(--navy); color: var(--navy); background: var(--white); }
.btn-ghost {
  background: rgba(255,255,255,0.08); color: var(--white); border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover { background: rgba(255,255,255,0.16); color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 1rem; }

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 4.5rem;
  background:
    radial-gradient(ellipse 80% 60% at 85% 10%, rgba(61,126,255,0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(240,180,41,0.08), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid; gap: 2.5rem; align-items: end;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.35fr 0.85fr; gap: 3rem; align-items: center; }
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 1rem;
}
.eyebrow::before {
  content: ""; width: 1.5rem; height: 2px; background: var(--accent); border-radius: 1px;
}
.hero h1 {
  margin: 0 0 1.15rem; font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  line-height: 1.15; letter-spacing: -0.03em; color: var(--navy); font-weight: 750;
  max-width: 18ch;
}
.hero-lead {
  margin: 0 0 1.75rem; font-size: 1.125rem; color: var(--muted); max-width: 42rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.hero-proof {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; font-size: 0.85rem; color: var(--muted);
}
.hero-proof strong { color: var(--charcoal); font-weight: 600; }

.hero-card {
  background: var(--navy); color: #C5D0DC; border-radius: var(--radius-lg);
  padding: 1.75rem 1.65rem; box-shadow: var(--shadow-lg);
  position: relative; overflow: hidden;
}
.hero-card::after {
  content: ""; position: absolute; top: -40%; right: -20%;
  width: 60%; height: 80%; border-radius: 50%;
  background: radial-gradient(circle, rgba(61,126,255,0.35), transparent 70%);
  pointer-events: none;
}
.hero-card h2 {
  margin: 0 0 0.75rem; font-size: 1.05rem; color: var(--white);
  letter-spacing: -0.01em; position: relative;
}
.hero-card p { margin: 0 0 1.25rem; font-size: 0.95rem; position: relative; }
.hero-card ul {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; position: relative;
}
.hero-card li {
  display: flex; gap: 0.55rem; align-items: flex-start;
  font-size: 0.9rem; color: #E2E8F0;
}
.hero-card li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); margin-top: 0.5rem; flex-shrink: 0;
}

/* Sections common */
section { padding: 4.25rem 0; }
.section-head { max-width: 40rem; margin-bottom: 2.25rem; }
.section-head h2 {
  margin: 0 0 0.85rem; font-size: clamp(1.5rem, 2.8vw, 1.95rem);
  letter-spacing: -0.025em; color: var(--navy); line-height: 1.2;
}
.answer-first {
  margin: 0; color: var(--muted); font-size: 1.05rem;
}
.kicker {
  font-size: 1.56rem; line-height: 1.2; font-weight: 700; letter-spacing: normal; text-transform: uppercase;
  color: var(--accent); margin: 0 0 0.55rem;
}

/* Who we serve */
.serve { background: var(--white); border-block: 1px solid var(--line); }
.serve-grid {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.serve-card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem 1.15rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.serve-card:hover { border-color: #B8C7DC; box-shadow: var(--shadow); }
.serve-card h3 {
  margin: 0 0 0.35rem; font-size: 1rem; color: var(--navy); letter-spacing: -0.01em;
}
.serve-card p { margin: 0; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }

/* Services */
.services-grid {
  display: grid; gap: 1.15rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}
.service-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.65rem;
  height: 100%;
}
.service-num {
  font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--accent);
  letter-spacing: 0.04em;
}
.service-card h3 {
  margin: 0; font-size: 1.1rem; color: var(--navy); letter-spacing: -0.015em;
}
.service-card p { margin: 0; font-size: 0.95rem; color: var(--muted); flex: 1; }
.service-tags {
  display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.35rem;
}
.tag {
  font-size: 0.72rem; font-weight: 600; padding: 0.25rem 0.55rem;
  border-radius: 999px; background: var(--accent-soft); color: #1E4FB8;
  letter-spacing: 0.01em;
}

/* Topics strip */
.topics {
  background: var(--navy); color: #A8B8C8; padding: 3.5rem 0;
}
.topics .section-head h2 { color: var(--white); }
.topics .answer-first { color: #A8B8C8; }
.topics-strip {
  display: flex; flex-wrap: wrap; gap: 0.65rem;
}
.topic-chip {
  display: inline-flex; align-items: center;
  padding: 0.65rem 1.05rem; border-radius: 999px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: var(--white); font-weight: 600; font-size: 0.92rem;
  text-decoration: none;
}
.topic-chip:hover { background: rgba(61,126,255,0.25); border-color: var(--accent); color: var(--white); }
.topic-chip.emphasis {
  background: var(--accent-soft); border-color: rgba(61,126,255,0.45); color: #C5D8FF;
}

/* Why */
.why-grid {
  display: grid; gap: 1.15rem;
}
@media (min-width: 768px) {
  .why-grid { grid-template-columns: repeat(3, 1fr); }
}
.why-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 1.65rem 1.4rem;
  border: 1px solid var(--line); border-top: 3px solid var(--accent);
}
.why-card h3 { margin: 0 0 0.55rem; font-size: 1.1rem; color: var(--navy); }
.why-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Evidence */
.evidence {
  background: linear-gradient(180deg, var(--bg-soft), var(--bg));
}
.evidence-panel {
  display: grid; gap: 2rem; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem 1.75rem; box-shadow: var(--shadow);
}
@media (min-width: 800px) {
  .evidence-panel { grid-template-columns: 1.2fr 0.8fr; padding: 2.5rem; }
}
.evidence-panel h2 { margin: 0 0 0.75rem; color: var(--navy); font-size: 1.55rem; letter-spacing: -0.02em; }
.evidence-panel p { margin: 0 0 1rem; color: var(--muted); }
.evidence-list {
  list-style: none; margin: 0 0 1.5rem; padding: 0; display: grid; gap: 0.5rem;
}
.evidence-list li {
  padding-left: 1.35rem; position: relative; font-size: 0.95rem; color: var(--charcoal);
}
.evidence-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 8px; height: 8px; border-radius: 2px; background: var(--gold);
}
.evidence-aside {
  background: var(--navy); color: #C5D0DC; border-radius: var(--radius);
  padding: 1.5rem; text-align: center;
}
.evidence-aside .stat {
  font-size: 2.4rem; font-weight: 750; color: var(--white); letter-spacing: -0.03em;
  line-height: 1; margin-bottom: 0.35rem;
}
.evidence-aside .stat span { color: var(--gold); }
.evidence-aside p { margin: 0 0 1.25rem; font-size: 0.9rem; }
.badge-free {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--navy); background: var(--gold);
  padding: 0.3rem 0.65rem; border-radius: 999px; margin-bottom: 0.85rem;
}

/* About */
.about { background: var(--white); border-block: 1px solid var(--line); }
.about-grid {
  display: grid; gap: 2rem; align-items: start;
}
@media (min-width: 800px) {
  .about-grid { grid-template-columns: 1fr 1.4fr; }
}
.about-portrait {
  aspect-ratio: 1; border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--navy-mid), var(--navy));
  display: grid; place-items: center; color: #7A8FA8;
  font-size: 0.85rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  border: 1px solid var(--line);
}
.about-body h2 { margin: 0 0 0.75rem; color: var(--navy); font-size: 1.55rem; letter-spacing: -0.02em; }
.about-body p { margin: 0 0 1rem; color: var(--muted); }
.about-links { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; font-size: 0.95rem; }

/* FAQ */
.faq { background: var(--bg); }
.faq-list { display: grid; gap: 0.75rem; max-width: 48rem; }
.faq-item {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 1.1rem 1.25rem; font-weight: 650; color: var(--navy);
  list-style: none; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-weight: 400; font-size: 1.25rem; color: var(--accent); flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a {
  padding: 0 1.25rem 1.2rem; margin: 0; color: var(--muted); font-size: 0.98rem;
  border-top: 1px solid transparent;
}
.faq-item[open] .faq-a { border-top-color: var(--line); padding-top: 1rem; }

/* Contact */
.contact {
  background: var(--navy); color: #A8B8C8; padding: 4.5rem 0;
}
.contact .section-head h2 { color: var(--white); }
.contact .answer-first { color: #A8B8C8; }
.contact-grid {
  display: grid; gap: 2rem;
}
@media (min-width: 800px) {
  .contact-grid { grid-template-columns: 1fr 1.1fr; align-items: start; }
}
.contact-card {
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); padding: 1.75rem;
}
.contact-card h3 { margin: 0 0 0.5rem; color: var(--white); font-size: 1.1rem; }
.contact-card p { margin: 0 0 1rem; font-size: 0.95rem; }
.contact-email {
  display: inline-block; font-size: 1.2rem; font-weight: 700; color: var(--white);
  text-decoration: none; letter-spacing: -0.01em; margin-bottom: 1.25rem;
}
.contact-email:hover { color: #C5D8FF; }
.contact-note { font-size: 0.85rem; color: #7A8FA8; margin: 0; }

.contact-form { display: grid; gap: 0.9rem; }
.form-row { display: grid; gap: 0.9rem; }
@media (min-width: 560px) {
  .form-row { grid-template-columns: 1fr 1fr; }
}
.field label {
  display: block; font-size: 0.8rem; font-weight: 600; color: #C5D0DC;
  margin-bottom: 0.35rem;
}
.field input, .field textarea, .field select {
  width: 100%; padding: 0.75rem 0.9rem; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(0,0,0,0.25);
  color: var(--white); font: inherit; font-size: 0.95rem;
}
.field input::placeholder, .field textarea::placeholder { color: #6B7C8E; }
.field textarea { min-height: 110px; resize: vertical; }
.form-hint { font-size: 0.8rem; color: #7A8FA8; margin: 0; }

/* Footer */
.site-footer {
  background: #060E18; color: #7A8FA8; padding: 2.5rem 0 2rem;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid; gap: 1.5rem; margin-bottom: 2rem;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
.site-footer h3 {
  margin: 0 0 0.75rem; font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.07em; text-transform: uppercase; color: #A8B8C8;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.site-footer a { color: #A8B8C8; text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.footer-brand .wordmark { color: var(--white); margin-bottom: 0.75rem; }
.footer-brand .wordmark:hover { color: var(--white); }
.footer-brand p { margin: 0; max-width: 28ch; line-height: 1.55; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  justify-content: space-between; align-items: center;
  padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08);
}
.footer-quiet { font-size: 0.85rem; }
.footer-quiet a { color: #5B6B7C; }
.footer-quiet a:hover { color: #A8B8C8; }

/* Mobile nav */
@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 1rem 1.25rem 1.25rem; gap: 0.15rem;
    transform: translateY(-120%); opacity: 0; pointer-events: none;
    transition: transform 0.2s, opacity 0.2s; box-shadow: var(--shadow);
  }
  .nav.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a { padding: 0.7rem 0.35rem; }
  .nav .btn { margin: 0.5rem 0 0; width: 100%; }
}

@media (max-width: 480px) {
  .hero { padding: 2.5rem 0 3rem; }
  section { padding: 3.25rem 0; }
}

/* Clients */
.clients { background: linear-gradient(180deg, var(--white) 0%, #F3F6FB 100%); border-block: 1px solid var(--line); padding: 5rem 0; }
.client-grid {
  --cols: 5; --gap: 1.25rem;
  list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap;
  justify-content: center; gap: var(--gap);
}
.client-grid > .client-logo { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); }
.client-logo {
  display: flex; align-items: center; justify-content: center;
  height: 120px; padding: 1.1rem 0.8rem; background: var(--white);
  border: 1px solid #E3E8F0; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(10, 22, 40, 0.04), 0 6px 18px rgba(10, 22, 40, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.client-logo:hover { transform: translateY(-2px); border-color: #C9D6EA; box-shadow: 0 2px 4px rgba(10,22,40,.05), 0 12px 28px rgba(10,22,40,.08); }
.client-logo img { display: block; width: auto; height: auto; max-width: 100%; max-height: 44px; object-fit: contain; }
.client-logo--wb img { max-height: 40px; }
.client-logo--uncdf img { max-height: 60px; }
.client-logo--afi img { max-height: 56px; }
.client-logo--unicef img { max-height: 34px; }
.client-logo--adb img { max-height: 54px; }
.client-logo--pifs img { max-height: 48px; }
.client-logo--ifc img { max-height: 46px; }
.client-logo--btca img { max-height: 46px; }
.client-logo--canada img { max-height: 30px; }
.client-logo--undp img { max-height: 64px; }
@media (max-width: 900px) { .client-grid { --cols: 4; } }
@media (max-width: 520px) { .clients { padding: 3.75rem 0; } .client-grid { --cols: 2; --gap: 0.85rem; } .client-logo { height: 104px; padding: 1rem; } }

/* Stack (product sub-brand) */
.stack { background: linear-gradient(180deg, var(--bg-soft), var(--bg)); }
.stack-panel {
  display: grid; gap: 2rem; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 2rem 1.75rem; box-shadow: var(--shadow);
}
@media (min-width: 800px) { .stack-panel { grid-template-columns: 1.15fr 0.85fr; padding: 2.75rem; gap: 2.75rem; } }
.stack-panel h2 { margin: 0 0 0.85rem; color: var(--navy); font-size: clamp(1.5rem, 2.8vw, 1.95rem); letter-spacing: -0.025em; line-height: 1.2; }
.stack-panel > div > p:not(.kicker) { margin: 0 0 1rem; color: var(--muted); }
.stack-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.5rem; margin-top: 1.5rem; }
.stack-link { font-weight: 600; color: var(--navy); text-decoration: none; border-bottom: 1px solid var(--line); }
.stack-link:hover { color: var(--accent); border-color: var(--accent); }
.stack-card {
  background: var(--navy); color: #C5D0DC; border-radius: var(--radius); padding: 1.75rem;
  box-shadow: 0 12px 32px rgba(10, 22, 40, 0.18);
}
.stack-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--navy); background: var(--gold); padding: 0.3rem 0.65rem; border-radius: 999px;
}
.stack-brand { margin: 1rem 0 0.25rem; font-size: 1.1rem; font-weight: 750; color: var(--white); }
.stack-brand span { color: var(--gold); }
.stack-card h3 { margin: 0 0 0.75rem; color: var(--white); font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.015em; }
.stack-card p { margin: 0 0 0.9rem; font-size: 0.92rem; }
.stack-layers { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.stack-layers li { font-size: 0.8rem; font-weight: 600; color: var(--white); background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); padding: 0.3rem 0.7rem; border-radius: 999px; }
.stack-card .stack-note { margin: 0; font-size: 0.8rem; color: #8EB4FF; }
