/* ===================================================================
   NEXBRIDGE — Design System (the default design language)
   Canonical stylesheet for the NexBridge website. Every page links this
   file and builds from the tokens + component classes defined here.
   - Written spec:     design-system.md
   - Living reference:  styleguide.html
   =================================================================== */

:root {
  /* ---- Brand ---- */
  --ink: #0E2A3D;        /* primary text, dark pill/button */
  --navy: #0A3A5E;       /* deep band background */
  --navy-deep: #072E4B;  /* footer background */
  --blue: #0071BC;       /* primary accent, links, focus */
  --lime: #8CC63F;       /* brand accent, primary CTAs */
  --green: #5F9216;      /* eyebrow labels, icon green */

  /* ---- Greens on lime surfaces ---- */
  --green-deep: #2C4A14;
  --green-ink: #2C4A1E;
  --green-ink-2: #244A1A;

  /* ---- Surfaces & tints ---- */
  --mist: #EEF4F9;       /* light section background */
  --lime-tint: #F0F7E2;
  --blue-tint: #E2EFF9;
  --lime-line: #DCEBC6;

  /* ---- Lines & muted text ---- */
  --line: #E2E8EE;
  --line-2: #D6DEE6;
  --ink-2: #243748;      /* body emphasis */
  --slate: #44586A;      /* nav, labels */
  --muted: #51677A;      /* body copy */
  --muted-2: #93A4B2;    /* captions, placeholders */
  --on-navy: #BCD0E0;    /* text on footer navy */
  --error: #C0392B;

  /* ---- Radii ---- */
  --r-sm: 8px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --pill: 999px;

  /* ---- Elevation ---- */
  --shadow-card: 0 24px 50px -28px rgba(8,38,60,.24);
  --shadow-pop:  0 24px 46px -22px rgba(140,198,63,.55);  /* lime glow */
  --shadow-lift: 0 22px 44px -22px rgba(8,38,60,.26);

  /* ---- Layout & motion ---- */
  --container: 1240px;
  --gutter: 32px;
  --ease: cubic-bezier(.22,.61,.36,1);

  /* ---- Signature gradient (deep "platforms" band) ---- */
  --grad-band: linear-gradient(150deg, #0C5184 0%, #0A3A5E 42%, #06243A 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5 {
  font-family: 'DM Sans', 'Plus Jakarta Sans', sans-serif;
  margin: 0;
}

::selection { background: var(--lime); color: var(--ink); }

a { color: inherit; }

input, select, textarea, button { font-family: inherit; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }

img { max-width: 100%; }

/* ------------------------------------------------------------------
   Scroll reveal
   ------------------------------------------------------------------ */
[data-reveal] {
  transform: translateY(16px);
  transition: transform .7s cubic-bezier(.22,.61,.36,1);
  will-change: transform;
}
[data-reveal="in"] { transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { transform: none; transition: none; }
}

/* ------------------------------------------------------------------
   Header / navigation
   ------------------------------------------------------------------ */
.nav-link {
  font-weight: 600;
  font-size: 15px;
  color: #44586A;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color .15s ease, background .15s ease;
}
.nav-link:hover { color: var(--blue); background: var(--mist); }

.dropdown-menu { display: none; }
.dropdown.open .dropdown-menu { display: flex; }
/* invisible bridge across the gap between trigger and menu so moving the
   cursor down to the items doesn't register as leaving the dropdown */
.dropdown-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 16px; }

.dropdown-item { transition: background .15s ease; }
.dropdown-item:hover { background: #F0F7E2; }

.dropdown-caret { transition: transform .2s ease; }
.dropdown.open .dropdown-caret { transform: rotate(180deg); }

/* Floating header: transparent over the hero, solid frosted-white on scroll */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px -18px rgba(8,38,60,.4);
}

/* over the hero: light nav + white logo */
.site-header .nav-link { color: rgba(255,255,255,.9); }
.site-header .nav-link:hover { color: #fff; background: rgba(255,255,255,.14); }
.site-header .site-logo { filter: brightness(0) invert(1); transition: filter .3s ease; }

/* scrolled: restore the original dark-on-white treatment */
.site-header.scrolled .nav-link { color: #44586A; }
.site-header.scrolled .nav-link:hover { color: var(--blue); background: var(--mist); }
.site-header.scrolled .site-logo { filter: none; }

/* Mobile menu toggle — hidden on desktop */
.nav-toggle { display: none; }
.site-header .nav-toggle { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); color: #fff; }
.site-header.scrolled .nav-toggle { background: #fff; border: 1px solid var(--line); color: #0E2A3D; }

/* ------------------------------------------------------------------
   Buttons & interactive cards
   ------------------------------------------------------------------ */
/* base properties that hover modifies live here so :hover can win over
   the element's inline layout styles. */
.btn-contact {
  box-shadow: 0 6px 16px -4px rgba(140,198,63,.55);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn-contact:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -6px rgba(140,198,63,.6);
}

.btn-hero {
  background: var(--ink);
  transition: transform .15s ease, background .15s ease;
}
.btn-hero:hover { transform: translateY(-2px); background: var(--navy); }

/* ------------------------------------------------------------------
   Fintech hero
   ------------------------------------------------------------------ */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  color: rgba(255,255,255,.92);
}

/* solid-color accent keyword */
.hero-grad { color: var(--lime); }

.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 36px; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 700;
  font-size: 16px;
  padding: 8px 8px 8px 26px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 14px 34px -12px rgba(140,198,63,.7);
  transition: background .35s ease, color .35s ease, transform .15s ease, box-shadow .25s ease;
}
/* hover: invert the whole pill to its counterpart colors */
.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--ink);
  color: var(--lime);
  box-shadow: 0 16px 40px -14px rgba(8,38,60,.7);
}

/* the arrow "coin" inverts and rolls left-and-back while hovering */
.btn-primary .bp-ico {
  background: var(--ink);
  color: var(--lime);
  transition: background .35s ease, color .35s ease;
}
.btn-primary:hover .bp-ico {
  background: var(--lime);
  color: var(--ink);
  animation: bp-spin .6s ease;
}
@keyframes bp-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Same coin spin on hover for every pill CTA with an arrow coin.
   These buttons each hold a single child <span> (the circle + arrow). */
.btn-contact:hover > span,
.lift:hover > span,
.btn-learn:hover > span,
.view-all:hover > span {
  animation: bp-spin .6s ease;
}

/* Full pill color-inversion on hover.
   inv-dark: lime pill -> dark pill.   inv-lime: dark/navy pill -> lime pill.
   (!important is needed because the base colors are set inline.) */
.inv-dark, .inv-lime { transition: background .3s ease, color .3s ease, border-color .3s ease, transform .15s ease, box-shadow .25s ease; }
.inv-dark > span, .inv-lime > span { transition: background .3s ease, color .3s ease; }

.inv-dark:hover { background: #0E2A3D !important; color: #8CC63F !important; }
.inv-dark:hover > span { background: #8CC63F !important; color: #0E2A3D !important; }

.inv-lime:hover { background: #8CC63F !important; color: #0E2A3D !important; border-color: #8CC63F !important; }
.inv-lime:hover > span { background: #0E2A3D !important; color: #8CC63F !important; }

/* the trust-band button sits on a lime background, so give its inverted
   (lime) state a dark inset ring to stay visible */
#byond .inv-lime:hover { box-shadow: inset 0 0 0 1.5px #0E2A3D; }

/* ------------------------------------------------------------------
   Fintech section background textures — subtle, and intentionally
   different from one another (blueprint grid / rings / diagonal hatch).
   Each keeps the #EEF4F9 mist base.
   ------------------------------------------------------------------ */
.fx-grid {
  background-color: #EEF4F9;
  background-image:
    radial-gradient(900px 480px at 100% 0%, rgba(0,113,188,.10), transparent 60%),
    linear-gradient(rgba(8,38,60,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8,38,60,.045) 1px, transparent 1px);
  background-size: 100% 100%, 34px 34px, 34px 34px;
}
/* One continuous concentric-ring texture spanning the two connected
   sections (testimonials + trust logos). The pattern lives on the wrapper
   so the rings flow across the seam from a single center; the sections
   themselves are transparent. */
.fx-band {
  background-color: #EEF4F9;
  background-image:
    repeating-radial-gradient(circle at 50% 42%, rgba(0,113,188,.06) 0 1px, transparent 1px 30px);
}
.fx-sub { background: transparent; }
@media (prefers-reduced-motion: reduce) {
  .btn-primary:hover .bp-ico { animation: none; }
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-weight: 600;
  font-size: 15.5px;
  padding: 15px 24px;
  border-radius: 999px;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); transform: translateY(-2px); }

.lift { transition: transform .15s ease; }
.lift:hover { transform: translateY(-2px); }

.btn-ethos {
  border: 1.5px solid var(--line-2);
  transition: border-color .15s ease;
}
.btn-ethos:hover { border-color: var(--blue); }

.btn-learn {
  background: rgba(255,255,255,.1);
  transition: background .15s ease;
}
.btn-learn:hover { background: rgba(255,255,255,.18); }

.view-all {
  background: var(--mist);
  color: var(--ink);
  transition: background .15s ease, color .15s ease;
}
.view-all:hover { background: var(--navy); color: #fff; }

.lift-5 { transition: transform .2s ease; }
.lift-5:hover { transform: translateY(-5px); }

.icon-scale { transition: transform .2s ease; }
.icon-scale:hover { transform: scale(1.08); }

/* Platform cards: on hover the image expands to fill the card and the
   text/button invert to white over a black bottom-left gradient. */
.plat-card { position: relative; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.plat-card:hover { transform: translateY(-6px); box-shadow: 0 28px 54px -22px rgba(8,38,60,.55); }

.plat-media {
  position: absolute;
  top: 18px; left: 18px; right: 18px;
  height: 180px;
  border-radius: 14px;
  overflow: hidden;
  z-index: 1;
  transition: top .45s cubic-bezier(.4,0,.2,1), left .45s cubic-bezier(.4,0,.2,1),
              right .45s cubic-bezier(.4,0,.2,1), height .45s cubic-bezier(.4,0,.2,1),
              border-radius .45s ease;
}
.plat-card:hover .plat-media { top: 0; left: 0; right: 0; height: 100%; border-radius: 20px; }
.plat-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.plat-scrim {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .45s ease;
  background: linear-gradient(to top right, rgba(0,0,0,.92) 0%, rgba(0,0,0,.55) 34%, rgba(0,0,0,.12) 62%, transparent 82%);
}
.plat-card:hover .plat-scrim { opacity: 1; }

.plat-spacer { height: 180px; flex: none; }

.plat-eyebrow {
  position: relative;
  z-index: 2;
  margin-top: 18px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #2C4A14;
  transition: color .35s ease;
}
.plat-title { font-size: 19px; font-weight: 800; color: #0E2A3D; transition: color .35s ease, text-shadow .35s ease; }
.plat-desc { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: #2C4A1E; transition: color .35s ease, text-shadow .35s ease; }
.plat-arrow { background: #0E2A3D; color: #8CC63F; transition: background .35s ease, color .35s ease, transform .2s ease; }
.plat-arrow:hover { transform: scale(1.08); }

.plat-card:hover .plat-eyebrow { color: #fff; }
.plat-card:hover .plat-title { color: #fff; text-shadow: 0 2px 14px rgba(0,0,0,.45); }
.plat-card:hover .plat-desc { color: rgba(255,255,255,.9); text-shadow: 0 1px 10px rgba(0,0,0,.4); }
.plat-card:hover .plat-arrow { background: #fff; color: #0E2A3D; }

.serve-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  text-align: center;
  transition: background .25s ease, border-color .25s ease, transform .2s ease, box-shadow .2s ease;
}
.serve-card:hover {
  background: #8CC63F;
  border-color: #8CC63F;
  transform: translateY(-5px);
  box-shadow: 0 24px 46px -22px rgba(140,198,63,.55);
}
.serve-title { margin: 18px 0 0; font-size: 17px; font-weight: 700; color: #0E2A3D; }
.serve-sub { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #93A4B2; transition: color .25s ease; }
.serve-card:hover .serve-sub { color: #2C4A14; }

/* arrow circle pinned to the top-right corner */
.serve-go {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #EEF4F9;
  color: #0E2A3D;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .25s ease, color .25s ease;
}
.serve-card:hover .serve-go { background: #0E2A3D; color: #8CC63F; }

/* permanently-green featured card (State Universities) */
.serve-card--green { background: #8CC63F; border-color: #8CC63F; box-shadow: 0 24px 46px -22px rgba(140,198,63,.55); }
.serve-card--green .serve-sub { color: #2C4A14; }
.serve-card--green .serve-go { background: #0E2A3D; color: #8CC63F; }

.insight-card { transition: transform .2s ease, box-shadow .2s ease; }
.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -22px rgba(8,38,60,.26);
}
.insight-card-feature { transition: transform .2s ease, box-shadow .2s ease; }
.insight-card-feature:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -22px rgba(140,198,63,.5);
}

.footer-link {
  color: #BCD0E0;
  transition: color .15s ease;
}
.footer-link:hover { color: #fff; }

/* Capability cards (lime hover wash) */
.nb-capcard { transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease; }
.nb-capcard:hover {
  background: var(--lime) !important;
  border-color: var(--lime) !important;
  transform: translateY(-5px);
  box-shadow: 0 24px 46px -22px rgba(140,198,63,.55) !important;
}
.nb-capcard:hover .nb-capicon { background: rgba(255,255,255,.5) !important; }
.nb-capcard:hover .nb-capdesc { color: #244A1A !important; }

/* ------------------------------------------------------------------
   Form fields
   ------------------------------------------------------------------ */
/* FAQ panels start hidden; JS reveals the open one (item 1 by default) */
.faq-panel { display: none; }

.field {
  border: 1.5px solid var(--line-2);
  transition: border-color .15s ease;
}
.field:focus { border-color: var(--blue); }

.nl-input {
  border: 1px solid rgba(255,255,255,.25);
  transition: border-color .15s ease;
}
.nl-input:focus { border-color: var(--lime); }

/* ------------------------------------------------------------------
   image-slot replacement (object-fit per shape)
   ------------------------------------------------------------------ */
.img-cover { object-fit: cover; }
.img-circle { object-fit: cover; border-radius: 50%; }

/* ------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
  .hero-title { font-size: 54px !important; }
}

@media (max-width: 820px) {
  /* collapse desktop nav into a toggle (override inline display) */
  .site-nav,
  .header-cta { display: none !important; }
  .nav-toggle { display: inline-flex !important; }

  .mobile-menu.open { display: flex; }

  .split { grid-template-columns: 1fr !important; }
  .split-reverse > .split-media { order: -1; }
}

@media (max-width: 720px) {
  .container { padding-left: 20px !important; padding-right: 20px !important; }
  .grid-4 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr !important; }
  .hero-title { font-size: 40px !important; }
  .hero-inner { padding-top: 96px !important; padding-bottom: 64px !important; }
  .section-pad { padding-top: 56px !important; padding-bottom: 56px !important; }
  h2.h2-fluid { font-size: 28px !important; }
  .newsletter-grid { grid-template-columns: 1fr !important; }
  .newsletter-media { margin: 0 0 24px 0 !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
}

@media (max-width: 460px) {
  .footer-grid { grid-template-columns: 1fr !important; }
  .form-row { grid-template-columns: 1fr !important; }
}

/* ------------------------------------------------------------------
   Mobile menu panel
   ------------------------------------------------------------------ */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 12px 20px 18px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.mobile-menu a {
  font-weight: 600;
  font-size: 15px;
  color: #44586A;
  text-decoration: none;
  padding: 12px 10px;
  border-radius: 8px;
}
.mobile-menu a:hover { color: var(--blue); background: var(--mist); }
@media (min-width: 821px) { .mobile-menu { display: none !important; } }
