#navbar, #ai-ribbon {
  --ink: #f0eaff;
  --ink-dim: #a898c8;
  --line: #ffffff12;
  --line-hi: #ffffff21;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: Manrope, system-ui, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --grad: linear-gradient(115deg, #e879f9, #a855f7 35%, #7c3aed 60%, #3b82f6);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.5;
  color-scheme: dark;
}
:where(#navbar, #ai-ribbon) :where(*, *::before, *::after) { box-sizing: border-box; margin: 0; padding: 0; }
:where(#navbar) a { color: inherit; text-decoration: none; }
:where(#navbar, #ai-ribbon) button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
:where(#navbar) img { display: block; max-width: 100%; }
#navbar [hidden], #ai-ribbon[hidden] { display: none !important; }

/* ── NAV ──────────────────────────────────────────────────── */
#navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(8, 5, 16, .55);
  border-bottom: 1px solid var(--line);
  transition: background .35s ease, box-shadow .35s ease;
}

#navbar.scrolled {
  background: rgba(8, 5, 16, .85);
  box-shadow: 0 1px 0 var(--line-hi), 0 8px 36px rgba(0, 0, 0, .45);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  max-width: 1240px;
  margin: 0 auto
}

.logo {
  display: flex;
  align-items: center;
  gap: 0px;
  font-family: var(--display);
  font-weight: 800;
  font-size: 28px;
  letter-spacing: -.040em;
}

.logo-text {
  background: linear-gradient(180deg, #e8e6f0 0%, #a8a5b8 50%, #c8c6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: -10px;
}

.logo-mark {
  height: 60px;
  width: auto;
  object-fit: contain;
  transition: transform .3s var(--ease-spring);
}

.logo:hover .logo-mark {
  transform: rotate(-8deg) scale(1.1);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14.5px;
  color: var(--ink-dim);
  font-weight: 500
}

.nav-links a,
.use-cases-trigger {
  position: relative;
  padding-bottom: 2px;
  transition: color .2s ease;
  color: inherit;
  font: inherit;
  line-height: inherit;
}

.nav-links a::after,
.use-cases-trigger::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--grad);
  transition: width .3s var(--ease-out);
  border-radius: 2px;
}

.nav-links a:hover,
.use-cases-trigger:hover,
.use-cases-trigger[aria-expanded="true"] {
  color: var(--ink)
}

.nav-links a:hover::after,
.use-cases-trigger:hover::after,
.use-cases-trigger[aria-expanded="true"]::after {
  width: 100%
}

.use-cases-menu { position: relative; }

.products-trigger {
  font: inherit;
  cursor: pointer;
}

.use-cases-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 0 2px;
  border: 0;
  background: none;
  cursor: pointer;
}

.use-cases-trigger svg {
  width: 13px;
  height: 13px;
  transition: transform .2s var(--ease-out);
}

.use-cases-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }

#primary-navigation .nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-dim);
  font: 500 14px/18px var(--body);
  white-space: nowrap;
  text-decoration: none;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

#primary-navigation .nav-item::after { display: none; }
#primary-navigation .nav-item:hover,
#primary-navigation .nav-item[aria-expanded="true"] {
  background: #a585ff16;
  color: var(--ink);
}
#primary-navigation .nav-item:focus-visible {
  outline: 2px solid #b69aff;
  outline-offset: 3px;
}
.nav-chevron {
  width: 6px;
  height: 6px;
  margin: -3px 2px 0;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform .18s ease;
}
[aria-expanded="true"] .nav-chevron { transform: translateY(3px) rotate(225deg); }

.use-cases-popover {
  position: absolute;
  top: calc(100% + 16px);
  left: 50%;
  z-index: 80;
  display: grid;
  grid-template-columns: repeat(2, minmax(132px, 1fr));
  gap: 4px;
  width: 328px;
  padding: 10px;
  border: 1px solid rgba(240, 234, 255, .14);
  border-radius: 18px;
  background: rgba(21, 14, 38, .96);
  box-shadow: 0 24px 56px rgba(0, 0, 0, .42);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity .18s ease, transform .18s var(--ease-out), visibility .18s;
}

.use-cases-menu:hover .use-cases-popover,
.use-cases-menu:focus-within .use-cases-popover,
.use-cases-trigger[aria-expanded="true"] + .use-cases-popover {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.use-cases-popover a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  padding: 8px 9px;
  border-radius: 11px;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.15;
}

.use-cases-popover a::after { display: none; }

.use-cases-popover a:hover,
.use-cases-popover a:focus-visible {
  background: rgba(168, 85, 247, .16);
  color: var(--ink);
}

.use-case-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  font-size: 14px;
}

/* Log in sits beside "Get the app" as the secondary action: the app is
   the primary conversion, this is for people who already have an account.
   Ghost styling keeps that hierarchy. */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-login {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid rgba(240, 234, 255, .28);
  color: var(--ink);
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  transition: border-color .2s ease, background .2s ease;
}

.nav-login:hover {
  border-color: rgba(240, 234, 255, .55);
  background: rgba(240, 234, 255, .08);
}

.nav-cta {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #12062a;
  font-weight: 700;
  font-size: 14px;
  transition: transform .2s var(--ease-spring), box-shadow .2s ease;
  box-shadow: 0 2px 12px rgba(240, 234, 255, .15);
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(240, 234, 255, .25)
}

@media(max-width:780px) {
  .nav-links {
    display: none
  }

  /* Both pills stay — losing "Log in" on phones would strand returning
     users — but they tighten so the logo keeps its room. */
  .nav-actions {
    gap: 8px;
  }

  .nav-login,
  .nav-cta {
    padding: 9px 14px;
    font-size: 13px;
  }
}

/* ── AI RIBBON ───────────────────────────────────────────── */
.ai-ribbon {
  background: linear-gradient(90deg, #9333ea, #3b82f6);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 12px 28px;
  font-size: 14.5px;
  position: relative;
  z-index: 101;
  font-family: var(--body);
  min-height: 50px;
}

.ribbon-content {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 6px;
}

.ribbon-left {
  display: flex;
  align-items: center;
  font-weight: 500;
}

.ticket-label {
  background: rgba(255, 255, 255, 0.2);
  border: 1px dashed rgba(255, 255, 255, 0.5);
  padding: 4px 12px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.ribbon-dynamic-wrap {
  position: relative;
  height: 32px;
  overflow: hidden;
  flex: 0 1 auto;
}

.ribbon-dynamic {
  display: flex;
  flex-direction: column;
  transition: transform 0.5s var(--ease-spring);
}

.ribbon-dynamic span {
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.ribbon-close {
  background: transparent;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.ribbon-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 861px) {
  .ribbon-left {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
  }

  .ribbon-close {
    position: absolute;
    right: 28px;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 0;
  }
}

@media (max-width: 860px) {
  .ai-ribbon {
    padding: 10px 16px;
  }

  .ribbon-content {
    flex-direction: column;
    text-align: center;
    gap: 2px;
  }

  .ribbon-dynamic span {
    justify-content: center;
    text-align: center;
    white-space: normal;
    height: 44px;
    line-height: 1.3;
    font-size: 16px;
  }

  .ribbon-dynamic-wrap {
    height: 44px;
    width: 100%;
  }
}

.nav-toggle, .mobile-login { display: none; }
.nav-cta { white-space: nowrap; }
@media (max-width: 860px) {
  .nav-inner { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .logo { font-size: 24px; }
  .logo-mark { height: 44px; }
  .nav-actions { margin-left: auto; }
  .nav-actions .nav-login { display: none; }
  .nav-cta { padding: 10px 14px; font-size: 13px; }
  .nav-toggle { display: block; order: 2; width: 44px; height: 44px; border: 1px solid var(--line-hi); border-radius: 10px; font-size: 23px; }
  .nav-links { display: none; order: 3; width: 100%; gap: 0; flex-direction: column; padding-top: 8px; }
  .nav-links.is-open { display: flex; }
  .nav-links { align-items: stretch; }
  #primary-navigation .nav-item { width: 100%; min-height: 44px; justify-content: space-between; text-align: left; }
  .nav-links { max-height: calc(100dvh - 112px); overflow-y: auto; }
  .products-trigger { width: 100%; min-height: 44px; text-align: left; border-radius: 10px; }
  .nav-links a, .use-cases-trigger { display: block; width: 100%; padding: 12px; min-height: 44px; text-align: left; }
  .use-cases-menu { width: 100%; }
  .use-cases-trigger { display: flex; align-items: center; justify-content: space-between; }
  .use-cases-popover { position: static; display: none; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: 0; padding: 4px; border-radius: 12px; opacity: 1; visibility: visible; box-shadow: none; background: rgba(255,255,255,.035); }
  .use-cases-menu:hover .use-cases-popover,
  .use-cases-menu:focus-within .use-cases-popover,
  .use-cases-trigger[aria-expanded="true"] + .use-cases-popover { transform: none; }
  .use-cases-trigger[aria-expanded="true"] + .use-cases-popover { display: grid; }
  .use-cases-popover a { min-height: 42px; padding: 8px; font-size: 12px; }
  .ai-ribbon { padding: 0 8px; min-height: 40px; }
  .ribbon-content { flex: 1; min-width: 0; }
  .ribbon-dynamic-wrap { display: none; }
  .ticket-label { font-size: 10px; white-space: nowrap; padding: 0; border: 0; background: none; letter-spacing: 0; }
  .ribbon-close { min-width: 32px; min-height: 40px; margin-left: 4px; }
}

/* Luminous ribbon trails frame the announcement without covering the copy. */
.ai-ribbon {
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 0%, #23133c 0%, #0b0812 65%);
  border-bottom: 1px solid #b19be52b;
  padding: 2px 40px;
  min-height: 42px;
}
.ai-ribbon::before, .ai-ribbon::after {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -20px;
  width: clamp(130px, 20vw, 300px);
  pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 110'%3E%3Cdefs%3E%3ClinearGradient id='a' x2='1' y2='.4'%3E%3Cstop stop-color='%23f472ec'/%3E%3Cstop offset='.45' stop-color='%237c4dff'/%3E%3Cstop offset='1' stop-color='%232dd4fa'/%3E%3C/linearGradient%3E%3ClinearGradient id='b'%3E%3Cstop stop-color='%232dd4fa'/%3E%3Cstop offset='.5' stop-color='%23a78bfa'/%3E%3Cstop offset='1' stop-color='%23fb88d5'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M-30 99C22 77 40 5 78 20S74 114 47 72S119-18 164 25S232 82 330-25' stroke='url(%23a)' stroke-width='7'/%3E%3Cpath d='M-20 33C38-12 87 65 151 25S215-15 272 6' stroke='url(%23b)' stroke-width='4'/%3E%3Cpath d='M-30 97C22 75 40 3 78 18S74 112 47 70S119-20 164 23S232 80 330-27' stroke='%23ffffff' stroke-opacity='.35' stroke-width='1.2'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
  filter: drop-shadow(0 0 6px #8d56f766);
}
.ai-ribbon::before { left: -35px; }
.ai-ribbon::after { right: -35px; transform: rotate(180deg); }
.ai-ribbon .ribbon-content { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 0; }
.ai-ribbon .ribbon-left { position: static; transform: none; margin: 0; }
.ai-ribbon .ticket-label {
  border: 0; background: none; box-shadow: none; padding: 0;
  font-size: 10px; letter-spacing: .12em; color: #cfb9f5;
}
.ai-ribbon .ticket-label { line-height: 14px; }
.ai-ribbon .ribbon-dynamic-wrap { height: 20px; }
.ai-ribbon .ribbon-dynamic span { font-size: 14px; height: 20px; white-space: nowrap; }
.ai-ribbon .ribbon-close { z-index: 2; }
@media (max-width: 860px) {
  .ai-ribbon { min-height: 42px; padding: 2px 36px; }
  .ai-ribbon::before, .ai-ribbon::after { width: 100px; opacity: .45; }
  .ai-ribbon .ticket-label { font-size: 9px; letter-spacing: .035em; }
}
@media (max-width: 600px) {
  .ai-ribbon { min-height: 32px; }
  .ai-ribbon .ribbon-dynamic-wrap { display: none; }
}

/* Shared navigation surface for Products and Use cases. */
#navbar .nav-inner { position: relative; }
#navbar:has(.nav-glass-panel:not([hidden])) {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#navbar .use-cases-menu, #navbar .products-menu { position: static; }
#navbar .nav-glass-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  width: min(760px, calc(100% - 32px));
  padding: 16px;
  display: grid;
  gap: 16px;
  border: 1px solid #e6dcff40;
  border-radius: 18px;
  background: linear-gradient(115deg, #29233dd9, #18142dce);
  backdrop-filter: blur(32px) saturate(145%);
  -webkit-backdrop-filter: blur(32px) saturate(145%);
  box-shadow: inset 0 1px 0 #ffffff26, 0 24px 64px #05031055;
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
  z-index: 81;
}
#navbar .nav-glass-panel[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  #navbar .nav-glass-panel:not([hidden]) { animation: nav-panel-enter .16s var(--ease-out) both; }
}
@keyframes nav-panel-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}
#navbar .products-panel {
  left: max(16px, calc(50% - 370px));
  width: min(238px, calc(100% - 32px));
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  transform: none;
}
#navbar .products-panel:has(.product-features:not([hidden])) {
  width: min(740px, calc(100% - 32px));
  grid-template-columns: 204px minmax(0, 1fr);
}
.product-list { display: grid; gap: 4px; }
.product-choice { display: flex; align-items: stretch; border-radius: 10px; }
.product-choice:has([aria-expanded="true"]) { background: #d3bdff15; }
#navbar .product-choice a {
  display: flex;
  align-items: center;
  flex: 1;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 700;
}
.product-feature-toggle {
  flex: 0 0 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-dim);
  font: inherit;
  cursor: pointer;
}
.product-feature-toggle:hover, .product-feature-toggle:focus-visible { background: #d3bdff1f; color: var(--ink); }
.product-feature-toggle:focus-visible { outline: 2px solid #c5a5ff; outline-offset: -2px; }
.product-features { padding-left: 16px; border-left: 1px solid #ffffff1f; }
.product-features[hidden] { display: none; }
.product-features h2 { margin: 4px 8px 6px; color: #d4cbe4; font: 700 12px/1.5 var(--body); }
.product-features { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 180px); align-items: start; gap: 14px; }
.product-features ul { list-style: none; margin: 0; padding: 0; }
.product-features li { padding: 6px 8px; }
.product-menu-art {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e4d3ff26;
  border-radius: 14px;
  background: radial-gradient(ellipse at 50% 26%, #bc83ff32, transparent 72%), #110c2161;
}
.product-menu-art img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; }
.product-menu-art figcaption { padding: 0 12px 12px; }
@media (max-width: 460px) {
  .product-features { grid-template-columns: minmax(0, 1fr); }
  .product-menu-art { display: grid; grid-template-columns: 86px minmax(0, 1fr); align-items: center; }
  .product-menu-art figcaption { padding: 6px 8px 6px 0; }
}
.product-features strong { display: block; color: var(--ink); }
.product-features small { display: block; margin-top: 2px; color: #d4cbe4; font-size: 12px; line-height: 1.5; }
#navbar .products-panel a::after { display: none; }
#navbar .use-cases-popover { grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; gap: 8px; }
.use-cases-heading { grid-column: 1 / -1; margin: 0 0 2px; color: var(--ink); font: 750 20px/1.2 var(--display); }
#navbar .use-cases-popover a {
  grid-template-columns: 26px minmax(0, 1fr);
  min-height: 46px;
  padding: 8px;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 600;
  border: 1px solid #ffffff12;
  border-radius: 10px;
  background: #ffffff05;
}
#navbar .use-case-icon { width: 26px; height: 26px; font-size: 15px; border-radius: 7px; background: #ffffff0c; }
#navbar .nav-glass-panel a:hover { background: #d3bdff1f; }
#navbar .nav-glass-panel a:focus-visible { outline: 2px solid #c5a5ff; outline-offset: 2px; }
@supports not (backdrop-filter: blur(1px)) {
  #navbar .nav-glass-panel { background: #211b34; }
}
@media (max-width: 860px) {
  #navbar .nav-glass-panel {
    position: static;
    transform: none;
    width: 100%;
    margin: 8px 0 12px;
    padding: 10px;
    gap: 10px;
    border-radius: 16px;
  }
  #navbar .products-panel,
  #navbar .products-panel:has(.product-features:not([hidden])) {
    position: static;
    left: auto;
    right: auto;
    width: 100%;
    max-width: 100%;
    grid-template-columns: minmax(0, 1fr);
  }
  .product-features { padding: 8px 0 0; border-left: 0; border-top: 1px solid #ffffff1f; }
  #navbar .use-cases-popover { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #navbar .use-cases-popover a { gap: 6px; padding: 6px; font-size: 12px; }
  #navbar .nav-links { max-height: calc(100dvh - 150px); overscroll-behavior: contain; }
}

/* Light palettes are scoped to the dropdowns. */
#navbar .nav-glass-panel {
  --ink: #211731;
  --ink-dim: #534861;
  --line: #21173116;
  --line-hi: #2117312a;
  --nav-hover: #582ba315;
  color: var(--ink);
}
#navbar .nav-glass-panel a:focus-visible,
#navbar .product-feature-toggle:focus-visible { outline-color: #673ab7; }
#navbar .nav-glass-panel {
  border-color: var(--line-hi);
  background: linear-gradient(125deg, #fffdfaf2, #f2ebfff0);
  box-shadow: inset 0 1px 0 #fff, 0 18px 40px #10062730;
}
#navbar .product-features { border-color: var(--line); }
#navbar .product-features h2,
#navbar .product-features small { color: var(--ink-dim); }
#navbar .product-choice:has([aria-expanded="true"]),
#navbar .nav-glass-panel a:hover,
#navbar .product-feature-toggle:hover { background: var(--nav-hover); }
#navbar .product-menu-art {
  border-color: #7354a222;
  background: radial-gradient(ellipse at 50% 25%, #dcc9ff, transparent 78%), #fbf8ff;
}
#navbar .use-cases-popover a { background: #fff8; border-color: var(--line); }
#navbar .use-cases-popover a:hover { background: var(--nav-hover); }
#navbar .use-case-icon { background: #6e43a910; }
@supports not (backdrop-filter: blur(1px)) {
  #navbar .nav-glass-panel { background: #f9f4ff; }
}

#navbar { background: linear-gradient(110deg, #0d1024, #0b0814 47%, #160c24); }
#navbar.scrolled { background: linear-gradient(110deg, #101329, #0d0918 47%, #190f29); }
#navbar .nav-cta { color: #12062a; }
#navbar .product-choice a[aria-current="page"] { font-weight: 800; }
@media (max-width: 860px) {
  #navbar .nav-links.is-open .mobile-login { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  #navbar *, #ai-ribbon * { transition: none !important; }
}
