:root {
  --ink: #061b31;
  --slate: #50617a;
  --accent: #533afd;
  --line: #e5edf5;
  --layout: 1266px;
  --gutter: 80px;
  --nav-h: 76px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, "SF Pro Display", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- nav ---------- */
.nav {
  --ease: cubic-bezier(0.45, 0.05, 0.55, 0.95);
  --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 10;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  position: relative;
  z-index: 2;
  width: min(1262px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
}
/* The bar turns into a card while a menu is open. */
.nav__card {
  position: absolute;
  inset: 6px 0;
  background: #fff;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 30px 60px -50px rgba(0, 0, 0, 0.1), 0 30px 60px -10px rgba(50, 50, 93, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s var(--ease);
}
.nav.is-open .nav__card { opacity: 1; }
.nav__brand, .nav__list, .nav__actions, .nav__menu { position: relative; }
.nav__brand {
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -0.06em;
}
.nav__list { display: flex; align-items: center; margin-left: 28px; }
.nav__trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: color 0.24s var(--ease);
}
.nav__trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* With a menu open, everything but the active trigger recedes. */
.nav.is-open .nav__trigger:not([aria-expanded="true"]) { color: #64748d; }
.nav.is-open .nav__trigger:not([aria-expanded="true"]):hover { color: var(--ink); }
.caret {
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.24s var(--ease);
}
.nav__trigger[aria-expanded="true"] .caret { transform: translateY(2px) rotate(225deg); }
.nav__actions { margin-left: auto; display: flex; gap: 8px; }

.nav__overlay {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease);
}
.nav.is-open .nav__overlay { opacity: 1; pointer-events: auto; }

/* One shared panel: clips open, then resizes to whichever menu is showing. */
.nav__popup {
  position: absolute;
  top: 70px;
  left: 0;
  width: 100%;
  height: 0;
  background: #fff;
  border-top: 1px solid var(--line);
  border-radius: 0 0 6px 6px;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.1), 0 30px 45px -30px rgba(50, 50, 93, 0.25);
  opacity: 0;
  overflow: hidden;
  clip-path: inset(0 -80px 100% -80px);
  pointer-events: none;
  transition: clip-path 0.2s var(--ease), height 0.2s var(--ease), opacity 0.3s var(--ease);
}
.nav.is-open .nav__popup { opacity: 1; clip-path: inset(0 -80px -100px -80px); pointer-events: auto; }
.nav__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  display: flex;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), transform 0.5s var(--ease-out), visibility 0s 0.25s;
}
.nav__panel.is-active { opacity: 1; visibility: visible; transition-delay: 0s; }

.menu__main { flex: 1; min-width: 0; }
.menu__grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 40px;
  padding: 32px;
}
.menu__heading {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  font-weight: 400;
}
.menu__item { display: block; margin-bottom: 16px; font-size: 14px; line-height: 1.45; }
.menu__item-title { display: block; color: var(--accent); transition: color 0.15s; }
.menu__item-desc { display: block; color: #273951; font-weight: 300; }
.menu__item:hover .menu__item-title { color: var(--ink); }
.menu__aside {
  flex: 0 0 258px;
  padding: 32px;
  background: #f8fafd;
  border-left: 1px solid var(--line);
}
.menu__footer {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  padding: 24px 32px 12px;
  border-top: 1px solid var(--line);
}
.menu__footer-note { margin: 0; font-size: 14px; }

/* ---------- mobile menu ---------- */
.mnav {
  position: fixed;
  inset: 8px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 30px 60px -10px rgba(50, 50, 93, 0.3), 0 0 0 1px rgba(6, 27, 49, 0.05);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.96);
  transform-origin: top right;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0s 0.22s;
  overflow: hidden;
}
.mnav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.has-mnav { overflow: hidden; }
.mnav__bar { display: flex; align-items: center; justify-content: space-between; height: 60px; padding: 0 10px 0 20px; }
.mnav__back, .mnav__close { border: 0; background: none; font: inherit; cursor: pointer; }
.mnav__back {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 0;
  color: var(--accent); font-size: 16px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s var(--ease);
}
.mnav__back span { font-size: 22px; line-height: 1; transform: translateY(-1px); }
.mnav.is-detail .mnav__back { opacity: 1; pointer-events: auto; }
.mnav__close { position: relative; width: 44px; height: 44px; margin-left: auto; }
.mnav__close::before, .mnav__close::after {
  content: ""; position: absolute; left: 13px; top: 21px;
  width: 18px; height: 2px; border-radius: 1px; background: var(--accent);
}
.mnav__close::before { transform: rotate(45deg); }
.mnav__close::after { transform: rotate(-45deg); }
/* Two views side by side; drilling in slides the pair left. */
.mnav__views { position: relative; flex: 1; overflow: hidden; }
.mnav__root, .mnav__detail {
  position: absolute; inset: 0;
  padding: 4px 20px 20px;
  overflow-y: auto;
  transition: transform 0.35s var(--ease-out), opacity 0.25s var(--ease-out);
}
.mnav__detail { transform: translateX(100%); opacity: 0; }
.mnav.is-detail .mnav__root { transform: translateX(-30%); opacity: 0; pointer-events: none; }
.mnav.is-detail .mnav__detail { transform: none; opacity: 1; }
.mnav__row {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 0;
  border: 0; border-bottom: 1px solid var(--line);
  background: none; color: var(--ink);
  font: inherit; font-size: 20px; font-weight: 300; text-align: left; cursor: pointer;
}
.mnav__chev { color: var(--accent); font-size: 24px; line-height: 1; }
.mnav__title { margin: 6px 0 22px; font-size: 26px; font-weight: 300; letter-spacing: -0.02em; }
.mnav__detail .menu__col { margin-bottom: 26px; }
.mnav__foot { display: flex; gap: 10px; padding: 14px 20px 20px; border-top: 1px solid var(--line); }
.mnav__foot .btn { flex: 1; justify-content: center; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}
.btn--lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn--primary { background: var(--accent); color: #fff; }
.btn--ghost { background: #fff; color: #e8850c; }
.btn--outline { background: #fff; color: var(--accent); border: 1px solid #c9cfe0; }
.chev { font-size: 1.15em; line-height: 1; transform: translateY(-1px); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  height: 685px;
  padding: 0 16px;
  background: #fff;
}
.hero__layout {
  position: relative;
  max-width: var(--layout);
  margin: 0 auto;
}

/* Background reaches up behind the nav, clipped at the hero's bottom edge. */
.hero__background {
  position: absolute;
  inset: calc(-1 * var(--nav-h)) 0 0 0;
  padding: 0 16px;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}
.hero__background .hero__layout {
  height: 100%;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.hero__wave {
  position: absolute;
  inset: 0 -376px 0 250px;
}
.hero__wave canvas { display: block; width: 100%; height: 100%; }

.hero__content {
  padding: 112px 0 0 120px;
}
.hero__stat {
  position: relative;
  z-index: 2;
  margin: 0 0 40px;
  font-size: 14px;
  font-weight: 500;
}
.hero__stat span { color: var(--slate); font-weight: 400; margin-left: 4px; font-variant-numeric: tabular-nums; }

.hero__titles { display: grid; max-width: 960px; }
.hero__title {
  grid-area: 1 / 1;
  position: relative;
  margin: 0;
  font-size: 48px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.hero__title em { font-style: normal; }

/* Under the wave: ink + a green that the blended blue above turns into slate. */
.hero__title--base { z-index: 0; color: rgb(129, 184, 26); }
.hero__title--base em { color: var(--ink); }

/* Over the wave: hard-light keeps it dark on white and tints it where the ribbon passes. */
.hero__title--blend { z-index: 2; mix-blend-mode: hard-light; color: rgba(0, 14, 255, 0.5); }
.hero__title--blend em { color: rgb(45, 37, 100); }

.hero__cta {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 10px;
  margin-top: 40px;
}

.hero__logos {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 80px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: #1a2b3c;
}

.nav__menu { display: none; }
@media (min-width: 901px) { .mnav { display: none; } }

/* Tablet: tighter gutters, wave pushed further right so copy stays readable. */
@media (max-width: 1100px) {
  :root { --gutter: 0px; }
  .hero__content { padding-left: 40px; padding-right: 24px; }
  .hero__title { font-size: 40px; }
  .hero__titles { max-width: 640px; }
  .hero__wave { inset: 0 -376px 0 18%; }
  .hero__logos span:nth-child(n + 6) { display: none; }
}

@media (max-width: 900px) {
  .nav__list { display: none; }
  .nav__popup, .nav__overlay, .nav__card { display: none; }
  .nav__actions { margin-right: 10px; }
  .nav__menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(6, 27, 49, 0.12);
    cursor: pointer;
  }
  .nav__menu span { width: 18px; height: 2px; border-radius: 1px; background: var(--accent); }
  .hero__wave { inset: 0 -376px 0 4%; }
  .hero__logos span:nth-child(n + 5) { display: none; }
}

/* Phone: main headline only, full-bleed wave, hamburger nav. */
@media (max-width: 720px) {
  .nav { border-bottom: 0; }
  .nav__inner { width: 100%; padding: 0 14px 0 22px; }
  .nav__actions { display: none; }
  .nav__menu { margin-left: auto; }

  .hero { height: auto; padding: 0 4px; }
  .hero__background { padding: 0 4px; bottom: 70px; }
  .hero__wave { inset: 0; }
  .hero__content { padding: 88px 18px 98px; }
  .hero__stat { margin-bottom: 30px; }
  .hero__title { font-size: 34px; line-height: 1.03; letter-spacing: -0.01em; }
  .hero__title span { display: none; }
  .hero__cta { margin-top: 44px; gap: 9px; }
  .hero__cta .btn { height: 48px; padding: 0 12px; justify-content: center; }
  .hero__cta .btn--primary { flex: 0 0 40%; }
  .hero__cta .btn--outline { flex: 1; background: rgba(255, 255, 255, 0.8); }

  .hero__logos {
    position: relative;
    left: auto;
    right: auto;
    height: 70px;
    justify-content: space-between;
    gap: 40px;
    padding: 0 28px;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--line);
  }
  .hero__logos span:nth-child(n + 4) { display: none; }
}

@media (max-width: 360px) {
  .hero__title { font-size: 30px; }
  .hero__cta .btn { font-size: 14px; }
}
