/* ==========================================================================
   Sign in / Get started pop-up — loaded by assets/js/auth-modal.js, which
   every page with the nav already gets through site.js.

   The look is the new navige.ai direction from Framer, not the teal-era
   site: a royal-blue dome hanging from the top, a magenta dome rising from
   the bottom, grain over both, fine white meridians converging on the centre
   and sparkles drifting through. The wordmark is brand/navige-wordmark.svg.

   Everything is namespaced .nva- so nothing here can restyle a page, and no
   page rule can reach in: the pop-up is injected at the end of <body>.
   ========================================================================== */

.nva {
  --nva-blue: #1845c2;
  --nva-blue-2: #3f66d0;
  --nva-magenta: #a92962;
  --nva-magenta-d: #86204e;
  --nva-paper: #eeede8;
  --nva-ink: #0b0b10;
  --nva-ink-2: #2a2a33;
  --nva-muted: #5d5d68;
  --nva-line: rgba(11, 11, 16, 0.12);
  --nva-field: #ffffff;
  --nva-red: #c81e3a;
  --nva-green: #0f8a4a;
  --nva-font: "Inter", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --nva-ease: cubic-bezier(0.22, 1, 0.36, 1);

  position: fixed;
  inset: 0;
  z-index: 2147483600; /* above the page's chat bubble and contact modal */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--nva-font);
  color: var(--nva-ink);
  -webkit-font-smoothing: antialiased;
  visibility: hidden;
  pointer-events: none;
}
.nva *, .nva *::before, .nva *::after { box-sizing: border-box; }
.nva.is-open { visibility: visible; pointer-events: auto; }

/* The page's own floating "Need help?" card would otherwise sit, dimmed,
   beside the pop-up and compete with it. */
html.nva-lock #sales-popup { visibility: hidden; }

/* ── Scrim: the page stays visible, dimmed and softened behind ── */
.nva-scrim {
  position: absolute;
  inset: 0;
  background: rgba(8, 10, 30, 0.42);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.nva.is-open .nva-scrim { opacity: 1; }

/* ── Panel: large, not full-screen ── */
.nva-panel {
  position: relative;
  width: min(1120px, 100%);
  height: min(800px, 100%);
  border-radius: 28px;
  overflow: hidden;
  background: var(--nva-paper);
  box-shadow: 0 40px 120px -20px rgba(10, 14, 60, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  opacity: 0;
  transform: translateY(18px) scale(0.965);
  transition: opacity 0.45s var(--nva-ease), transform 0.6s var(--nva-ease);
}
.nva.is-open .nva-panel { opacity: 1; transform: none; }

/* ── Backdrop ── */
.nva-bg { position: absolute; inset: 0; overflow: hidden; }
/* Brand colours: Blue #1845C2 and Raspberry #A92962. Every blue and pink in
   this file is one of the two, or a paler mix of it toward the beige.

   Two domes that meet at the centre. Measured off the Framer frame: each
   boundary reaches the side edges about 28% of the way from its own edge and
   touches the other dome in the middle, which leaves the beige wedges at the
   sides. An ellipse 129% wide and 128% tall, centred 10% beyond the edge,
   gives that boundary and lets the two just overlap in the middle. Deepest colour at the edge, paling to the rim. */
.nva-dome {
  position: absolute;
  left: 50%;
  width: 129%;
  height: 128%;
  transform: translateX(-50%);
  will-change: transform;
}
.nva-dome--top {
  top: -74%;
  background: radial-gradient(closest-side, #1845c2 0%, #1845c2 48%, #3f66d0 72%, #7d97df 86%, #bccaef 95%, rgba(238, 237, 232, 0) 100%);
  animation: nva-breathe-top 12s ease-in-out infinite alternate;
}
.nva-dome--bottom {
  bottom: -74%;
  background: radial-gradient(closest-side, #a92962 0%, #a92962 48%, #b94a7c 72%, #d084a6 86%, #ebc3d4 95%, rgba(238, 237, 232, 0) 100%);
  animation: nva-breathe-bottom 14s ease-in-out infinite alternate;
}
@keyframes nva-breathe-top {
  from { transform: translateX(-50%) scale(1); }
  to   { transform: translateX(-50%) scale(1.025); }
}
@keyframes nva-breathe-bottom {
  from { transform: translateX(-50%) scale(1.02); }
  to   { transform: translateX(-50%) scale(1); }
}
.nva-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Film grain. Static on purpose — animated grain reads as video noise. */
.nva-grain {
  position: absolute;
  inset: 0;
  opacity: 0.42;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 1.6 -0.25'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  pointer-events: none;
}

/* ── Top bar inside the panel ── */
.nva-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
}
.nva-logo { display: block; height: 24px; width: auto; }
.nva-close {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--nva-ink);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.3s var(--nva-ease);
}
.nva-close:hover { background: rgba(255, 255, 255, 0.85); transform: rotate(90deg); }
.nva-close:focus-visible { outline: 2px solid var(--nva-blue); outline-offset: 2px; }

/* ── Stage: centres the card and scrolls if the viewport is short ── */
.nva-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  padding: 76px 20px 28px;
}
.nva-card {
  margin: auto;
  width: 100%;
  max-width: 440px;
  padding: 34px 34px 28px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.3));
  border: 1px solid rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 24px 60px -24px rgba(20, 20, 70, 0.35), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  transition: max-width 0.45s var(--nva-ease);
}
.nva-card--wide { max-width: 520px; }

/* View swap: the old view leaves, the new one's rows rise in turn */
.nva-view { transition: opacity 0.18s ease, transform 0.18s ease, filter 0.18s ease; }
.nva-view.is-leaving { opacity: 0; transform: translateY(-6px); filter: blur(4px); }
.nva-in {
  opacity: 0;
  transform: translateY(12px);
  filter: blur(6px);
  animation: nva-rise 0.6s var(--nva-ease) forwards;
  animation-delay: calc(var(--i, 0) * 55ms + 60ms);
}
@keyframes nva-rise { to { opacity: 1; transform: none; filter: none; } }

/* ── Type ── */
.nva-h {
  margin: 0;
  font-size: 32px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--nva-ink);
  text-align: center;
}
.nva-sub {
  margin: 10px 0 24px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--nva-ink-2);
  text-align: center;
}

/* ── Buttons ── */
.nva-btn {
  position: relative;
  width: 100%;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 0;
  font: 600 15px/1 var(--nva-font);
  letter-spacing: -0.01em;
  cursor: pointer;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.25s var(--nva-ease), box-shadow 0.25s ease, background 0.2s ease, opacity 0.2s ease;
}
.nva-btn:active { transform: scale(0.985); }
.nva-btn:focus-visible { outline: 2px solid var(--nva-blue); outline-offset: 3px; }
.nva-btn[disabled] { cursor: default; opacity: 0.7; }

.nva-btn--social {
  background: var(--nva-field);
  color: var(--nva-ink);
  box-shadow: 0 1px 2px rgba(15, 15, 40, 0.06), 0 0 0 1px rgba(15, 15, 40, 0.06);
}
.nva-btn--social:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -12px rgba(15, 15, 60, 0.35), 0 0 0 1px rgba(15, 15, 40, 0.08);
}
.nva-btn--social svg { width: 18px; height: 18px; flex: none; }

.nva-btn--primary {
  color: #fff;
  background: linear-gradient(100deg, #bd3c76 0%, #a92962 55%, #86204e 100%);
  box-shadow: 0 12px 26px -12px rgba(169, 41, 98, 0.75), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
}
.nva-btn--primary:hover:not([disabled]) {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px -14px rgba(169, 41, 98, 0.85), 0 1px 0 rgba(255, 255, 255, 0.28) inset;
}
/* A sheen that crosses the button on hover */
.nva-btn--primary::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  left: -40%;
  width: 35%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-18deg) translateX(-120%);
  pointer-events: none;
}
.nva-btn--primary:hover:not([disabled])::after { animation: nva-sheen 0.9s var(--nva-ease); }
@keyframes nva-sheen { to { transform: skewX(-18deg) translateX(520%); } }
.nva-btn .nva-arrow { transition: transform 0.25s var(--nva-ease); }
.nva-btn:hover .nva-arrow { transform: translateX(3px); }

.nva-spin {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: nva-spin 0.7s linear infinite;
}
@keyframes nva-spin { to { transform: rotate(360deg); } }

.nva-stack { display: grid; gap: 10px; }

.nva-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  font-size: 13px;
  color: var(--nva-muted);
}
.nva-or::before, .nva-or::after { content: ""; flex: 1; height: 1px; background: rgba(11, 11, 16, 0.14); }

/* ── Fields ── */
.nva-form { display: grid; gap: 14px; }
.nva-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.nva-field { display: grid; gap: 6px; min-width: 0; }
.nva-label { font-size: 13.5px; font-weight: 500; color: var(--nva-ink); padding-left: 4px; }
.nva-req { color: var(--nva-magenta); margin-left: 2px; }
.nva-input-wrap { position: relative; }
.nva-input {
  width: 100%;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  background: var(--nva-field);
  font: 400 15px/1 var(--nva-font);
  color: var(--nva-ink);
  outline: none;
  box-shadow: 0 1px 2px rgba(15, 15, 40, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.25s ease;
}
.nva-input::placeholder { color: #9a9aa4; }
.nva-input:hover { border-color: rgba(24, 69, 194, 0.25); }
.nva-input:focus { border-color: var(--nva-blue); box-shadow: 0 0 0 4px rgba(24, 69, 194, 0.14); }
.nva-input[aria-invalid="true"] { border-color: var(--nva-red); box-shadow: 0 0 0 4px rgba(200, 30, 58, 0.12); }
.nva-input--pw { padding-right: 64px; }
.nva-peek {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: 500 12.5px/1 var(--nva-font);
  color: var(--nva-muted);
  cursor: pointer;
}
.nva-peek:hover { color: var(--nva-ink); background: rgba(11, 11, 16, 0.05); }

/* Password checklist: dots fill as each rule is met */
.nva-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 2px 4px 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--nva-muted);
}
.nva-rules li { display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s ease; }
.nva-rules li::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.3s var(--nva-ease);
}
.nva-rules li.is-met { color: var(--nva-green); }
.nva-rules li.is-met::before { background: currentColor; transform: scale(1.15); }

.nva-error {
  margin: 0;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(200, 30, 58, 0.28);
  color: var(--nva-red);
  font-size: 13.5px;
  line-height: 1.45;
  animation: nva-shake 0.42s var(--nva-ease);
}
.nva-error button {
  border: 0; padding: 0; background: none;
  font: inherit; font-weight: 600; color: inherit;
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
@keyframes nva-shake {
  0%, 100% { transform: none; }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

.nva-note { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--nva-muted); text-align: center; }

/* ── Terms checkbox: unticked, required, gates every route to an account ── */
.nva-terms {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.95);
  font-size: 13px;
  line-height: 1.5;
  color: var(--nva-ink-2);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.25s ease, background 0.2s ease;
}
.nva-form .nva-terms { margin: 2px 0 0; }
.nva-terms:hover { border-color: rgba(24, 69, 194, 0.3); }
.nva-terms input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.nva-check {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 0;
  display: grid; place-items: center;
  border-radius: 7px;
  border: 1.5px solid rgba(11, 11, 16, 0.28);
  background: #fff;
  color: transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.3s var(--nva-ease);
}
.nva-terms input:checked + .nva-check {
  background: var(--nva-blue);
  border-color: var(--nva-blue);
  color: #fff;
  transform: scale(1.06);
}
.nva-terms input:checked + .nva-check path { stroke-dasharray: 16; stroke-dashoffset: 16; animation: nva-draw 0.35s var(--nva-ease) forwards; }
.nva-terms input:focus-visible + .nva-check { outline: 2px solid var(--nva-blue); outline-offset: 2px; }
.nva-terms a { color: var(--nva-blue); font-weight: 600; text-decoration: none; }
.nva-terms a:hover { text-decoration: underline; text-underline-offset: 2px; }
/* Its own animation replaces the rise-in one, so the end state of the
   rise is restated here or the box would shake while invisible. */
.nva-terms.is-invalid { opacity: 1; transform: none; filter: none; border-color: var(--nva-red); box-shadow: 0 0 0 4px rgba(200, 30, 58, 0.12); animation: nva-shake 0.42s var(--nva-ease); }
.nva-terms-error:empty { display: none; }
.nva-terms-error { margin: -4px 0 14px; }
.nva-form .nva-terms-error { margin: 0; }

/* ── Switch line and legal line ── */
.nva-switch { margin: 22px 0 0; text-align: center; font-size: 14.5px; color: var(--nva-ink-2); }
.nva-link {
  border: 0; padding: 0; background: none;
  font: inherit; font-weight: 600;
  color: var(--nva-blue);
  cursor: pointer;
  text-decoration: none;
}
.nva-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.nva-legal {
  margin: 18px 0 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--nva-muted);
  text-align: center;
}
.nva-legal a { color: var(--nva-blue); text-decoration: underline; text-underline-offset: 2px; }

/* ── Account type ── */
.nva-types { display: grid; gap: 12px; }
.nva-type {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px 18px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.82);
  text-align: left;
  font-family: var(--nva-font);
  color: var(--nva-ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 15, 40, 0.05);
  transition: transform 0.3s var(--nva-ease), box-shadow 0.3s ease, border-color 0.2s ease, background 0.2s ease;
}
.nva-type:hover {
  transform: translateY(-2px);
  background: #fff;
  border-color: rgba(24, 69, 194, 0.35);
  box-shadow: 0 16px 34px -18px rgba(18, 52, 146, 0.45);
}
.nva-type:focus-visible { outline: 2px solid var(--nva-blue); outline-offset: 3px; }
.nva-type.is-picked { border-color: var(--nva-blue); box-shadow: 0 0 0 4px rgba(24, 69, 194, 0.14); }
.nva-type-icon {
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 15px;
  color: #fff;
}
.nva-type--personal .nva-type-icon { background: linear-gradient(140deg, #3f66d0, #1845c2); }
.nva-type--business .nva-type-icon { background: linear-gradient(140deg, #bd3c76, #86204e); }
.nva-type-title { display: block; font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }
.nva-type-desc { display: block; margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--nva-muted); }
.nva-type-go { color: var(--nva-muted); transition: transform 0.3s var(--nva-ease), color 0.2s ease; }
.nva-type:hover .nva-type-go { transform: translateX(3px); color: var(--nva-blue); }

/* The chip at the top of a form that names the type, with a way back */
.nva-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 14px;
  width: max-content;
  max-width: 100%;
  padding: 6px 6px 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--nva-ink-2);
}
.nva-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--nva-blue); }
.nva-chip--business .nva-chip-dot { background: var(--nva-magenta); }
.nva-chip button {
  border: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(11, 11, 16, 0.06);
  font: 500 12px/1 var(--nva-font);
  color: var(--nva-ink-2);
  cursor: pointer;
}
.nva-chip button:hover { background: rgba(11, 11, 16, 0.1); }

/* Done state */
.nva-done-mark {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(140deg, #3f66d0, #1845c2);
  color: #fff;
  box-shadow: 0 16px 34px -14px rgba(24, 69, 194, 0.7);
}
.nva-done-mark path { stroke-dasharray: 30; stroke-dashoffset: 30; animation: nva-draw 0.6s 0.25s var(--nva-ease) forwards; }
@keyframes nva-draw { to { stroke-dashoffset: 0; } }

.nva-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Small screens: the pop-up becomes the screen ── */
@media (max-width: 640px) {
  .nva { padding: 0; }
  .nva-panel { width: 100%; height: 100%; border-radius: 0; }
  .nva-stage { padding: 70px 16px 20px; }
  .nva-card { padding: 26px 20px 22px; border-radius: 24px; }
  .nva-h { font-size: 27px; }
  .nva-row { grid-template-columns: 1fr; }
  .nva-dome { width: 200%; }
}

@media (prefers-reduced-motion: reduce) {
  .nva-dome { animation: none; }
  .nva-in { animation: none; opacity: 1; transform: none; filter: none; }
  .nva-panel, .nva-scrim, .nva-view { transition: none; }
  .nva-btn--primary:hover::after { animation: none; }
  .nva-error { animation: none; }
}
