/*
 * Site navigation (js/site-nav.js). Plain CSS, so it looks the same on every page
 * whichever Tailwind build the page uses. Everything is scoped under .sn.
 */

.sn {
  --sn-ink: #141a2a;
  --sn-text: #475569;
  --sn-muted: #64748b;
  --sn-line: rgba(15, 23, 42, 0.08);
  --sn-blue: #2346c9;
  --sn-blue-dark: #1a37b5;
  --sn-tint: rgba(35, 70, 201, 0.08);
  --sn-bar-h: 60px;

  position: fixed;
  inset: 0 0 auto;
  z-index: 60;
  font-family: 'Google Sans Flex', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sn *,
.sn *::before,
.sn *::after {
  box-sizing: border-box;
}

/* Keep the nav's typeface even where a page styles links or paragraphs itself
   (e.g. osirt-iii sets a font on every <a> and <p>) */
.sn :where(a, p, span, small, strong, button, select) {
  font-family: inherit;
}

/* Scrolling down on a page with sections: only the section bar stays */
.sn--tucked {
  transform: translateY(calc(-1 * var(--sn-bar-h)));
}

.sn-spacer {
  height: 60px;
}

.sn-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .sn-inner {
    padding: 0 2rem;
  }
}

/* ---- Main bar -------------------------------------------------------------- */
.sn-bar {
  position: relative;
  z-index: 3;
  border-bottom: 1px solid transparent;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
  transition: border-color 0.25s ease, background-color 0.25s ease;
}

.sn--scrolled .sn-bar,
.sn--open .sn-bar {
  border-bottom-color: var(--sn-line);
}

.sn--open .sn-bar {
  background: #fff;
}

.sn-bar .sn-inner {
  height: 60px;
}

.sn-logo {
  display: flex;
  flex-shrink: 0;
  align-items: center;
}

.sn-logo img {
  display: block;
  width: auto;
  height: 30px;
}

.sn-links {
  display: none;
  align-items: center;
  gap: 0.125rem;
  margin-inline-start: auto;
}

.sn-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--sn-text);
  font: inherit;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sn-link:hover,
.sn-drop-btn[aria-expanded='true'] {
  background: rgba(15, 23, 42, 0.04);
  color: var(--sn-ink);
}

.sn-link[aria-current='page'],
.sn-drop-btn[data-current] {
  color: var(--sn-ink);
  font-weight: 500;
}

.sn-link[aria-current='page']::after,
.sn-drop-btn[data-current]::after {
  position: absolute;
  inset: auto 12px 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--sn-blue);
  content: '';
}

.sn-drop-btn i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.sn-drop-btn[aria-expanded='true'] i {
  transform: rotate(180deg);
}

/* Products dropdown */
.sn-drop {
  position: relative;
}

.sn-drop-panel {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: -0.5rem;
  display: grid;
  gap: 2px;
  width: 21rem;
  padding: 0.5rem;
  border-radius: 20px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(15, 23, 42, 0.06),
    0 24px 48px -16px rgba(20, 26, 42, 0.25);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Invisible bridge so the mouse can travel from the button to the panel */
.sn-drop-panel::before {
  position: absolute;
  inset: -12px 0 auto;
  height: 12px;
  content: '';
}

.sn-drop-panel.is-in {
  opacity: 1;
  transform: none;
}

.sn-drop-item {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem;
  border-radius: 14px;
  color: var(--sn-ink);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.sn-drop-item:hover,
.sn-drop-item[aria-current='page'] {
  background: rgba(35, 70, 201, 0.05);
}

.sn-drop-icon,
.sn-sheet-icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--sn-tint);
  color: var(--sn-blue);
  font-size: 17px;
}

.sn-drop-text {
  display: grid;
  gap: 2px;
}

.sn-drop-text strong {
  font-size: 15px;
  font-weight: 500;
}

.sn-drop-text small {
  color: var(--sn-muted);
  font-size: 13px;
}

/* Right-hand actions */
.sn-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-inline-start: auto;
}

.sn-extras {
  display: none;
  align-items: center;
}

.sn-extras:empty {
  display: none !important;
}

/* A <select> in the extras (e.g. the homepage language switcher), in the bar or the menu */
.sn-extras select,
.sn-sheet-extras select {
  height: 40px;
  padding: 0 2rem 0 0.875rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%2364748b' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E")
    no-repeat right 0.85rem center;
  color: var(--sn-ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.sn-extras select {
  max-width: 9rem;
}

[dir='rtl'] .sn-extras select,
[dir='rtl'] .sn-sheet-extras select {
  padding: 0 0.875rem 0 2rem;
  background-position: left 0.85rem center;
}

.sn-cta {
  display: none;
  align-items: center;
  height: 40px;
  padding: 0 1.25rem;
  border-radius: 999px;
  background: var(--sn-blue);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 10px 20px -12px rgba(35, 70, 201, 0.7);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.sn-cta:hover {
  background: var(--sn-blue-dark);
}

/* Menu button: two lines that turn into a cross */
.sn-menu-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-inline-end: -0.375rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--sn-ink);
  cursor: pointer;
}

.sn-menu-btn:active {
  background: rgba(15, 23, 42, 0.05);
}

.sn-burger {
  position: relative;
  display: block;
  width: 18px;
  height: 10px;
}

.sn-burger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s ease, top 0.3s ease;
}

.sn-burger span:first-child {
  top: 0;
}

.sn-burger span:last-child {
  top: 8.5px;
}

.sn--open .sn-burger span:first-child {
  top: 4.25px;
  transform: rotate(45deg);
}

.sn--open .sn-burger span:last-child {
  top: 4.25px;
  transform: rotate(-45deg);
}

@media (min-width: 1024px) {
  .sn {
    --sn-bar-h: 72px;
  }

  .sn-spacer {
    height: 72px;
  }

  .sn-bar .sn-inner {
    height: 72px;
  }

  .sn-logo img {
    height: 36px;
  }

  .sn-links,
  .sn-cta,
  .sn-extras {
    display: flex;
  }

  /* Links push themselves right; the actions sit just after them */
  .sn-links + .sn-actions {
    margin-inline-start: 0.5rem;
  }

  .sn-menu-btn {
    display: none;
  }
}

@media (min-width: 1024px) and (max-width: 1199px) {
  .sn-link {
    padding: 8px 9px;
    font-size: 14px;
  }
}

/* ---- Section bar ------------------------------------------------------------ */
.sn-sub {
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--sn-line);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(1.6) blur(18px);
  backdrop-filter: saturate(1.6) blur(18px);
}

.sn-sub .sn-inner {
  height: 48px;
}

.sn-sub-title {
  display: none;
  flex-shrink: 0;
  color: var(--sn-ink);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.sn-sub-links {
  display: none;
  align-items: center;
  gap: 0.25rem;
  margin-inline-start: auto;
}

.sn-sub-link {
  flex-shrink: 0;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--sn-muted);
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sn-sub-link:hover {
  color: var(--sn-ink);
}

.sn-sub-link.is-current {
  background: var(--sn-tint);
  color: var(--sn-blue);
}

/* A page's own main button (data-cta-* on the nav script, e.g. "Apply", "Get Free Trial"):
   beside the menu button on phones and tablets; on desktop it replaces Contact in the bar */
.sn-bar-cta {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  height: 32px;
  padding: 0 0.95rem;
  border-radius: 999px;
  background: var(--sn-blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease;
}

.sn-bar-cta:hover {
  background: var(--sn-blue-dark);
}

@media (min-width: 1024px) {
  .sn-bar-cta {
    display: none;
  }
}

/* Phones and tablets: one button that drops down the section list */
.sn-jump {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--sn-ink);
  font: inherit;
  text-align: start;
  cursor: pointer;
}

.sn-jump-title {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 500;
}

.sn-jump-current {
  overflow: hidden;
  color: var(--sn-muted);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sn-jump-title:empty,
.sn-sub-title:empty {
  display: none !important;
}

/* "Title / Section" when the page has a title; just the section otherwise */
.sn-jump.has-current .sn-jump-title:not(:empty) + .sn-jump-current::before {
  margin-inline-end: 0.5rem;
  color: #cbd5e1;
  content: '/';
}

.sn-jump-title:empty + .sn-jump-current {
  color: var(--sn-ink);
  font-size: 15px;
  font-weight: 500;
}

.sn-jump i {
  margin-inline-start: auto;
  color: var(--sn-muted);
  font-size: 12px;
  transition: transform 0.2s ease;
}

.sn-jump[aria-expanded='true'] i {
  transform: rotate(180deg);
}

.sn-jump-list {
  position: absolute;
  inset: 100% 0 auto;
  display: grid;
  max-height: calc(100dvh - 120px);
  padding: 0.5rem 1rem 1rem;
  overflow-y: auto;
  border-bottom: 1px solid var(--sn-line);
  background: #fff;
  box-shadow: 0 24px 40px -24px rgba(20, 26, 42, 0.3);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sn-jump-list.is-in {
  opacity: 1;
  transform: none;
}

.sn-jump-item {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.75rem;
  border-radius: 12px;
  color: var(--sn-text);
  font-size: 16px;
  text-decoration: none;
}

.sn-jump-item.is-current {
  background: var(--sn-tint);
  color: var(--sn-blue);
}

@media (min-width: 900px) {
  .sn-sub .sn-inner {
    height: 52px;
  }

  .sn-sub-title,
  .sn-sub-links {
    display: flex;
  }

  .sn-jump,
  .sn-jump-list {
    display: none !important;
  }
}

/* ---- Phone menu sheet --------------------------------------------------------- */
.sn-sheet {
  position: fixed;
  inset: var(--sn-bar-h) 0 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.sn-sheet.is-in {
  opacity: 1;
}

.sn-sheet[hidden],
.sn-drop-panel[hidden],
.sn-jump-list[hidden] {
  display: none;
}

.sn-sheet-body {
  display: grid;
  gap: 1.75rem;
  padding: 1.25rem 1rem 1.5rem;
}

.sn-sheet-heading {
  margin: 0 0 0.5rem;
  padding: 0 0.75rem;
  color: var(--sn-muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sn-sheet-link {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  min-height: 56px;
  padding: 0.5rem 0.75rem;
  border-radius: 14px;
  color: var(--sn-ink);
  font-size: 17px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(6px);
  transition:
    opacity 0.3s ease calc(var(--i) * 30ms + 40ms),
    transform 0.3s ease calc(var(--i) * 30ms + 40ms),
    background-color 0.2s ease;
}

.sn-sheet.is-in .sn-sheet-link {
  opacity: 1;
  transform: none;
}

.sn-sheet-link:active {
  background: rgba(15, 23, 42, 0.04);
}

.sn-sheet-link[aria-current='page'] {
  background: rgba(35, 70, 201, 0.05);
  color: var(--sn-blue);
}

.sn-sheet-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
}

.sn-sheet-text {
  display: grid;
  gap: 1px;
}

.sn-sheet-text small {
  color: var(--sn-muted);
  font-size: 13px;
}

.sn-sheet-foot {
  position: sticky;
  bottom: 0;
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
  padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--sn-line);
  background: #fff;
}

.sn-sheet-extras:empty {
  display: none;
}

.sn-sheet-extras select {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
}

.sn-sheet-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 52px;
  border-radius: 999px;
  background: var(--sn-blue);
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
}

@media (min-width: 640px) {
  .sn-sheet-body,
  .sn-sheet-foot {
    width: 100%;
    max-width: 36rem;
    margin-inline: auto;
  }
}

@media (min-width: 1024px) {
  .sn-sheet {
    display: none !important;
  }
}

/* While the menu is open the page behind it doesn't scroll */
html.sn-lock,
html.sn-lock body {
  overflow: hidden;
}

.sn a:focus-visible,
.sn button:focus-visible,
.sn select:focus-visible {
  outline: 2px solid var(--sn-blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .sn,
  .sn-sheet,
  .sn-sheet-link,
  .sn-drop-panel,
  .sn-jump-list,
  .sn-burger span {
    transition: none;
  }

  .sn-sheet-link {
    opacity: 1;
    transform: none;
  }
}

/* ======================================================================
   Dark theme: <script src="…/site-nav.js" data-theme="dark"> (osirt-iii).
   Colours follow the osirt-iii page: #030712 background, #071127 surfaces,
   #4C6FFF accent. Fixed per page; there's no toggle.
   ====================================================================== */
.sn--dark {
  --sn-ink: #ffffff;
  --sn-text: rgba(255, 255, 255, 0.74);
  --sn-muted: rgba(255, 255, 255, 0.56);
  --sn-line: rgba(255, 255, 255, 0.08);
  --sn-blue: #4c6fff;
  --sn-blue-dark: #3f5fd8;
  --sn-tint: rgba(76, 111, 255, 0.16);
  color-scheme: dark;
}

.sn--dark .sn-bar {
  background: rgba(3, 7, 18, 0.72);
}

.sn--dark.sn--open .sn-bar {
  background: #030712;
}

.sn--dark .sn-sub {
  background: rgba(3, 7, 18, 0.86);
}

.sn--dark .sn-link:hover,
.sn--dark .sn-drop-btn[aria-expanded='true'] {
  background: rgba(255, 255, 255, 0.06);
}

.sn--dark .sn-link[aria-current='page']::after,
.sn--dark .sn-drop-btn[data-current]::after {
  background: #7d96ff;
}

/* Products dropdown */
.sn--dark .sn-drop-panel {
  background: #071127;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 24px 48px -16px rgba(0, 0, 0, 0.6);
}

.sn--dark .sn-drop-item:hover,
.sn--dark .sn-drop-item[aria-current='page'] {
  background: rgba(255, 255, 255, 0.05);
}

.sn--dark .sn-drop-icon,
.sn--dark .sn-sheet-icon {
  color: #9db0ff;
}

/* Buttons and controls */
.sn--dark .sn-cta,
.sn--dark .sn-bar-cta,
.sn--dark .sn-sheet-cta {
  box-shadow: 0 10px 24px -12px rgba(76, 111, 255, 0.8);
}

.sn--dark .sn-menu-btn:active {
  background: rgba(255, 255, 255, 0.08);
}

.sn--dark .sn-extras select,
.sn--dark .sn-sheet-extras select {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: #071127;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.6' stroke-width='1.5' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  color: #fff;
}

.sn--dark select option {
  background: #071127;
  color: #fff;
}

/* Section bar */
.sn--dark .sn-sub-link.is-current,
.sn--dark .sn-jump-item.is-current {
  color: #a9b9ff;
}

.sn--dark .sn-jump.has-current .sn-jump-title:not(:empty) + .sn-jump-current::before {
  color: rgba(255, 255, 255, 0.25);
}

.sn--dark .sn-jump-list {
  background: #071127;
  box-shadow: 0 24px 40px -24px rgba(0, 0, 0, 0.7);
}

/* Phone menu */
.sn--dark .sn-sheet,
.sn--dark .sn-sheet-foot {
  background: #030712;
}

.sn--dark .sn-sheet-link:active {
  background: rgba(255, 255, 255, 0.05);
}

.sn--dark .sn-sheet-link[aria-current='page'] {
  background: rgba(76, 111, 255, 0.12);
  color: #a9b9ff;
}

/* The space under the fixed nav takes the dark page colour, so no light strip shows */
.sn--dark + .sn-spacer {
  background: #030712;
}
