/* ==========================================================================
   Onyx site chrome — shared header + footer
   --------------------------------------------------------------------------
   The header and footer are identical across every landing page, but the
   pages themselves run on three different stylesheets (legal-doc.css,
   legal-pages.css, styles.css). This file carries only the chrome, so a page
   can adopt it without inheriting a foreign page layout.

   The eight legal pages already get these rules from legal-doc.css and do not
   load this file; the declarations here are kept byte-identical to that copy
   so the two never drift apart visually.

   Custom properties are declared on the chrome roots rather than :root, so a
   host page's own token names are left untouched.
   ========================================================================== */

header.nav,
footer.ft {
  --sc-ink: #0E1016;
  --sc-muted: #6b6f7b;
  --sc-line: #E7E8EE;
  --sc-line-2: #eff0f4;
  --sc-indigo: #2D2F6E;
  --sc-indigo-3: #6C6FB3;
  --sc-tint: #F2F3FB;
  --sc-sans: "DM Sans", system-ui, sans-serif;
  --sc-mono: "JetBrains Mono", ui-monospace, monospace;
  --sc-maxw: 1160px;

  font-family: var(--sc-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}
header.nav *,
footer.ft * { box-sizing: border-box; }

header.nav a,
footer.ft a { color: inherit; text-decoration: none; }
header.nav a:hover,
footer.ft a:hover { color: var(--sc-indigo); }

header.nav img,
footer.ft img { max-width: 100%; display: block; }

/* ---------- Header ---------- */

header.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--sc-line-2);
}

header.nav .nav-in {
  max-width: var(--sc-maxw);
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 26px;
}

header.nav .brand img { height: 96px; width: auto; }

header.nav .nav-links { display: flex; gap: 26px; margin-left: 8px; }
header.nav .nav-links a { font-size: 15px; color: #2c2f3a; font-weight: 500; }
header.nav .nav-links a:hover,
header.nav .nav-links a.active { color: var(--sc-indigo); }

header.nav .nav-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }

header.nav .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sc-sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: 999px;
  padding: 13px 24px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
header.nav .btn-primary { background: var(--sc-indigo); color: #fff; }
header.nav .btn-primary:hover { background: #25264f; transform: translateY(-1px); color: #fff; }

/* Language switch. On the legal pages each language is its own URL, so the
   inactive side is a link; on pages with an in-place JS toggle it is a button.
   Both are styled here. */
header.nav .lang {
  display: inline-flex;
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--sc-mono);
  font-size: 12px;
  font-weight: 500;
}
header.nav .lang a,
header.nav .lang span,
header.nav .lang button {
  padding: 7px 12px;
  color: var(--sc-muted);
  letter-spacing: .05em;
  transition: background .18s, color .18s;
  line-height: 1.4;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}
header.nav .lang a:hover,
header.nav .lang button:hover { background: var(--sc-tint); color: var(--sc-indigo); }
header.nav .lang .active { background: var(--sc-indigo); color: #fff; }

/* Contact sits outside the primary nav, next to the demo button, as a plain
   link rather than a button — it is a destination, not the page's main call
   to action. */
header.nav .nav-contact { font-size: 15px; color: #2c2f3a; font-weight: 500; }
header.nav .nav-contact:hover { color: var(--sc-indigo); }

header.nav .ft-li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--sc-line);
  border-radius: 999px;
  color: #2c2f3a;
  transition: color .18s, border-color .18s;
}
header.nav .ft-li:hover { color: var(--sc-indigo); border-color: var(--sc-indigo-3); }

header.nav .burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 6px;
}
header.nav .burger span { width: 22px; height: 2px; background: var(--sc-ink); border-radius: 2px; transition: .2s; }
header.nav .burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
header.nav .burger.open span:nth-child(2) { opacity: 0; }
header.nav .burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

header.nav .mnav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 8px 20px 16px;
  border-bottom: 1px solid var(--sc-line-2);
  background: #fff;
}
header.nav .mnav a { padding: 11px 12px; border-radius: 10px; font-weight: 600; color: #2c2f3a; }
header.nav .mnav a:hover { background: var(--sc-tint); color: var(--sc-indigo); }
header.nav .mnav.open { display: flex; }

/* ---------- Footer ---------- */

footer.ft { border-top: 1px solid var(--sc-line); padding: 64px 0 40px; background: #fff; }
footer.ft .wrap { max-width: var(--sc-maxw); margin: 0 auto; padding: 0 28px; }
footer.ft .ft-top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
footer.ft .ft-brand img { height: 96px; margin-bottom: 16px; }
footer.ft .ft-sum { color: var(--sc-muted); font-size: 14px; max-width: 40ch; }
footer.ft .ft-col h4 {
  font-family: var(--sc-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #9aa0ad;
  font-weight: 500;
  margin-bottom: 16px;
}
footer.ft .ft-col a { display: block; font-size: 15px; color: #2c2f3a; margin-bottom: 11px; }
footer.ft .ft-col a:hover { color: var(--sc-indigo); }
footer.ft .ft-bot {
  margin-top: 52px;
  padding-top: 24px;
  border-top: 1px solid var(--sc-line-2);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--sc-mono);
  font-size: 12.5px;
  color: #9aa0ad;
  letter-spacing: .02em;
}

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  header.nav .nav-links { display: none; }
  header.nav .burger { display: flex; }
  /* Contact folds into the drawer along with the primary links. */
  header.nav .nav-contact { display: none; }
}

@media (max-width: 560px) {
  header.nav .nav-in { padding-left: 20px; padding-right: 20px; gap: 12px; }
  footer.ft .wrap { padding-left: 20px; padding-right: 20px; }
  footer.ft .ft-top { grid-template-columns: 1fr 1fr; }

  /* The brand mark, demo button, LinkedIn badge and burger together overflow
     a phone-width row. The burger is the one control that must stay reachable,
     so the two optional items step aside — both are repeated in the drawer
     and in the footer. */
  header.nav .brand img { height: 64px; }
  header.nav .btn-primary,
  header.nav .ft-li { display: none; }
}

@media print {
  header.nav, footer.ft { display: none !important; }
}
