/* ==========================================================================
   GBL Tree — Premium Fintech design system
   Hand-built custom layer on top of Tailwind (CDN). No build step required.
   ========================================================================== */

:root {
  --primary: #1e40af;
  --primary-700: #1d4ed8;
  --secondary: #3b82f6;
  --accent: #fbbf24;
  --accent-600: #f59e0b;
  --ink: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.08);
  --bg: #f7f9fc;
  --brand-gradient: linear-gradient(120deg, #1e40af 0%, #3b82f6 55%, #fbbf24 130%);
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, .display {
  font-family: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.02em;
}

::selection { background: rgba(30, 64, 175, 0.16); }

/* Custom scrollbar (desktop) */
@media (pointer: fine) {
  ::-webkit-scrollbar { width: 11px; height: 11px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 999px;
    border: 3px solid var(--bg);
  }
}

/* --------------------------------------------------------------------------
   Utility primitives
   -------------------------------------------------------------------------- */
.gradient-text {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.brand-gradient { background: var(--brand-gradient); }

.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* Frosted glass card */
.glass {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.65);
  box-shadow: 0 18px 50px -22px rgba(30, 64, 175, 0.45);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Soft elevated surface card */
.surface {
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 30px -18px rgba(15, 23, 42, 0.22);
}

/* Gradient hairline divider */
.divider-gradient {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(30, 64, 175, 0.4), rgba(251, 191, 36, 0.5), transparent);
}

/* Subtle dotted grid background for sections */
.bg-grid {
  background-image: radial-gradient(rgba(30, 64, 175, 0.08) 1px, transparent 1px);
  background-size: 22px 22px;
}

/* Pill badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(30, 64, 175, 0.08);
  color: var(--primary);
  border: 1px solid rgba(30, 64, 175, 0.14);
}

.badge .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.25); }

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  font-weight: 700;
  border-radius: 0.9rem;
  padding: 0.85rem 1.5rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  line-height: 1;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(120deg, var(--primary), var(--secondary));
  box-shadow: 0 14px 30px -12px rgba(30, 64, 175, 0.6);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -14px rgba(30, 64, 175, 0.7); }

.btn-accent {
  color: var(--ink);
  background: linear-gradient(120deg, var(--accent), var(--accent-600));
  box-shadow: 0 14px 30px -12px rgba(245, 158, 11, 0.55);
}
.btn-accent:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -14px rgba(245, 158, 11, 0.7); }

.btn-ghost {
  color: var(--primary);
  background: rgba(255, 255, 255, 0.6);
  border: 1.5px solid rgba(30, 64, 175, 0.35);
}
.btn-ghost:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }

.btn-light { color: var(--primary); background: #fff; box-shadow: 0 14px 30px -14px rgba(0,0,0,0.4); }
.btn-light:hover { transform: translateY(-3px); }

/* Shimmer sweep on hover */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--ease);
}
.btn:hover::after { transform: translateX(120%); }

/* --------------------------------------------------------------------------
   Cards with hover lift + glow
   -------------------------------------------------------------------------- */
.card-lift { transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease); }
.card-lift:hover { transform: translateY(-8px); box-shadow: 0 28px 60px -24px rgba(30, 64, 175, 0.45); border-color: rgba(30, 64, 175, 0.25); }

/* Gradient-ring icon chip */
.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 1rem;
  color: #fff;
  font-size: 1.4rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 26px -12px rgba(30, 64, 175, 0.6);
  transition: transform 0.4s var(--ease);
}
.card-lift:hover .icon-chip { transform: scale(1.08) rotate(-4deg); }
.icon-chip.amber { background: linear-gradient(135deg, var(--accent), var(--accent-600)); box-shadow: 0 12px 26px -12px rgba(245, 158, 11, 0.6); color: var(--ink); }
.icon-chip.emerald { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 12px 26px -12px rgba(5, 150, 105, 0.55); }
.icon-chip.violet { background: linear-gradient(135deg, #8b5cf6, #db2777); }
.icon-chip.rose { background: linear-gradient(135deg, #f43f5e, #db2777); }
.icon-chip.cyan { background: linear-gradient(135deg, #06b6d4, #0ea5e9); }

/* Gradient border card (uses a wrapper) */
.ring-grad {
  position: relative;
  border-radius: 1.5rem;
  background: #fff;
}
.ring-grad::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: var(--brand-gradient);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.55;
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Header / nav
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 60;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease), height 0.35s var(--ease);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.35);
  border-bottom: 1px solid var(--line);
}

.nav-link {
  position: relative;
  color: #334155;
  font-weight: 600;
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: var(--brand-gradient);
  transition: width 0.3s var(--ease);
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.28s var(--ease);
}
.group:hover .nav-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 70;
  background: var(--brand-gradient);
  box-shadow: 0 0 10px rgba(30, 64, 175, 0.5);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.4s var(--ease);
  overflow-y: auto;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-submenu { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.mobile-submenu.open { max-height: 240px; }

/* --------------------------------------------------------------------------
   Hero aurora background
   -------------------------------------------------------------------------- */
.aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.55;
  animation: floatBlob 16s ease-in-out infinite;
}
.aurora .b1 { width: 460px; height: 460px; background: rgba(59, 130, 246, 0.5); top: -120px; left: -80px; }
.aurora .b2 { width: 420px; height: 420px; background: rgba(251, 191, 36, 0.45); bottom: -140px; right: -60px; animation-delay: -5s; }
.aurora .b3 { width: 380px; height: 380px; background: rgba(30, 64, 175, 0.4); top: 30%; right: 20%; animation-delay: -9s; }

@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 25px) scale(0.95); }
}

/* parallax accents driven by JS (--py set in main.js) */
.parallax { will-change: transform; transform: translate3d(0, var(--py, 0), 0); }

/* --------------------------------------------------------------------------
   Scroll reveal
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="left"]  { transform: translateX(-34px); }
[data-reveal="right"] { transform: translateX(34px); }
[data-reveal="zoom"]  { transform: scale(0.92); }
[data-reveal].in {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}

/* --------------------------------------------------------------------------
   Partner banks marquee
   -------------------------------------------------------------------------- */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 1.25rem; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.bank-tile {
  flex: 0 0 auto;
  width: 180px;
  height: 110px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.bank-tile:hover { transform: translateY(-6px); box-shadow: 0 20px 40px -20px rgba(30, 64, 175, 0.4); }
.bank-tile img { max-height: 46px; max-width: 120px; object-fit: contain; }
.bank-tile span { font-size: 0.72rem; font-weight: 600; color: var(--muted); }
.bank-tile .initials {
  width: 46px; height: 46px; border-radius: 0.7rem; display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--primary), var(--secondary)); font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Testimonials slider
   -------------------------------------------------------------------------- */
.slider-viewport { overflow: hidden; }
.slider-track { display: flex; transition: transform 0.6s var(--ease); }
.slide { flex: 0 0 100%; padding: 0 0.5rem; }
.slider-dot { width: 10px; height: 10px; border-radius: 999px; background: rgba(30, 64, 175, 0.25); transition: all 0.3s var(--ease); }
.slider-dot.active { width: 30px; background: var(--brand-gradient); }
.slider-btn {
  width: 48px; height: 48px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--primary); border: 1px solid var(--line); box-shadow: 0 12px 26px -14px rgba(15,23,42,0.35);
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease);
}
.slider-btn:hover { background: var(--primary); color: #fff; transform: scale(1.08); }
.stars { color: var(--accent); letter-spacing: 2px; }

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq-item { transition: box-shadow 0.3s var(--ease), border-color 0.3s var(--ease); }
.faq-item.open { border-color: rgba(30, 64, 175, 0.3); box-shadow: 0 20px 44px -26px rgba(30, 64, 175, 0.5); }
.faq-body { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); }
.faq-toggle .chev { transition: transform 0.35s var(--ease); }
.faq-item.open .faq-toggle .chev { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   Timeline (Journey / How We Process)
   -------------------------------------------------------------------------- */
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 27px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(var(--primary), var(--secondary), var(--accent));
  opacity: 0.35;
}
@media (min-width: 1024px) {
  .timeline.center::before { left: 50%; transform: translateX(-50%); }
}
.timeline-node {
  width: 56px; height: 56px; border-radius: 999px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 0 0 6px rgba(255,255,255,0.9), 0 12px 26px -10px rgba(30,64,175,0.6);
  z-index: 1;
}

/* --------------------------------------------------------------------------
   Calculator range sliders
   -------------------------------------------------------------------------- */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent);
  border: 4px solid #fff;
  box-shadow: 0 6px 16px -4px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
.range::-webkit-slider-thumb:hover { transform: scale(1.15); }
.range::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 999px; background: var(--accent);
  border: 4px solid #fff; box-shadow: 0 6px 16px -4px rgba(0,0,0,0.4); cursor: pointer;
}

/* result figure pop animation hook */
.result-pop { animation: popIn 0.45s var(--ease); }
@keyframes popIn { 0% { transform: scale(0.9); opacity: 0.4; } 100% { transform: scale(1); opacity: 1; } }

/* --------------------------------------------------------------------------
   Floating WhatsApp + back-to-top
   -------------------------------------------------------------------------- */
.whatsapp-float {
  position: fixed;
  width: 60px; height: 60px;
  bottom: 30px; right: 28px;
  background: #25d366;
  color: #fff;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  z-index: 90;
  text-decoration: none;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, 0.6);
  animation: pulseRing 2.4s infinite;
  transition: transform 0.3s var(--ease);
}
.whatsapp-float:hover { transform: scale(1.1); }
@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.to-top {
  position: fixed;
  bottom: 100px; right: 30px;
  width: 50px; height: 50px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--primary);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px -12px rgba(15,23,42,0.4);
  z-index: 88;
  opacity: 0; visibility: hidden; transform: translateY(14px);
  transition: all 0.35s var(--ease);
  cursor: pointer;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary); color: #fff; }

@media (max-width: 640px) {
  .whatsapp-float { width: 54px; height: 54px; font-size: 26px; bottom: 22px; right: 18px; }
  .to-top { bottom: 86px; right: 20px; }
}

/* Count-up number tabular alignment */
.counter { font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .aurora .blob { animation: none !important; }
  .marquee-track { animation: none !important; }
  .whatsapp-float { animation: none !important; }
}
