/* NightShift AI: shared layout for every marketing page.
   Design tokens, base reset, site nav and footer. Page-specific styles stay
   in each page's <style> block (loaded after this file, so pages can override
   a token such as --max). Nav/footer markup lives in partials/ and is stamped
   into each page by scripts/sync-layout.mjs. */

:root {
  --bg: #06080f;
  --surface: #0d1117;
  --surface2: #131920;
  --surface3: #1a2230;
  --border: rgba(var(--tint),.08);
  --border2: rgba(var(--tint),.13);
  --text: #f0f4ff;
  --text2: rgba(240,244,255,.65);
  --text3: rgba(240,244,255,.48);
  --accent: #4f8cff;
  --accent2: #38e8a0;
  --accent3: #ff6b35;
  --glow: rgba(79,140,255,.18);
  --glow2: rgba(56,232,160,.12);
  --r: 16px;
  --r2: 12px;
  --font-display: 'Syne', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
.container { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }

/* ── Nav ─────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 100; padding: 0; }
.nav-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(6,8,15,.82);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: -.02em; color: var(--text); }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; }
.nav-links a {
  display: block; padding: 7px 13px; border-radius: 8px;
  font-size: 14px; font-weight: 400; color: var(--text2); text-decoration: none; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--text); background: rgba(var(--tint),.06); }
.nav-links a.active { color: var(--accent); background: rgba(79,140,255,.10); }

/* Mega menu: Product and Resources open a panel of links with short
   descriptions. Buttons toggle it (nav.js); hover opens it on mouse devices. */
.nav-trigger {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 8px;
  font: inherit; font-size: 14px; font-weight: 400; color: var(--text2);
  background: none; border: 0; cursor: pointer; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-trigger svg { width: 12px; height: 12px; transition: transform .2s var(--ease); }
.nav-trigger:hover, .nav-group.open .nav-trigger { color: var(--text); background: rgba(var(--tint),.06); }
.nav-group.open .nav-trigger svg { transform: rotate(180deg); }
.nav-trigger.is-current { color: var(--accent); }
.nav-trigger:focus-visible, .mobile-trigger:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mm-panel {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  width: min(760px, calc(100vw - 32px)); padding-top: 8px;
  visibility: hidden; opacity: 0; pointer-events: none;
  transition: opacity .15s, visibility 0s linear .15s;
}
.nav-group.open .mm-panel { visibility: visible; opacity: 1; pointer-events: auto; transition: opacity .15s; }
.mm-inner {
  display: grid; grid-template-columns: 1fr 230px; gap: 12px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border2); border-radius: var(--r);
  box-shadow: var(--shadow, 0 18px 48px rgba(0,0,0,.45));
}
.mm-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; align-content: start; }
.nav-links .mm-list a, .nav-links .mm-feature {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; border-radius: 10px; white-space: normal;
}
.mm-title { font-size: 14px; font-weight: 500; color: var(--text); }
.mm-desc { font-size: 12.5px; line-height: 1.45; color: var(--text3); }
.nav-links .mm-list a.active { background: rgba(79,140,255,.10); }
.nav-links .mm-list a.active .mm-title { color: var(--accent); }
.nav-links .mm-feature { background: rgba(79,140,255,.08); border: 1px solid rgba(79,140,255,.18); justify-content: flex-start; }
.nav-links .mm-feature:hover { background: rgba(79,140,255,.13); }
.mm-feature-kicker { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink, var(--accent)); }
.mm-feature-go { margin-top: auto; padding-top: 10px; font-size: 13px; font-weight: 500; color: var(--accent-ink, var(--accent)); }
@media (max-width: 1000px) { .mm-list { grid-template-columns: 1fr; } }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-login {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border-radius: 10px;
  background: rgba(var(--tint),.06); border: 1px solid var(--border2);
  color: var(--text); font-size: 13px; font-weight: 400; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.nav-login:hover { background: rgba(var(--tint),.10); border-color: rgba(var(--tint),.2); }
.nav-cta {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 18px; border-radius: 9px;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none;
  transition: opacity .15s, transform .15s var(--ease);
}
.nav-cta:hover { opacity: .88; transform: translateY(-1px); }
.nav-cta svg { width: 14px; height: 14px; }
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text2); border-radius: 2px; transition: all .2s; }
.mobile-menu { display: none; background: var(--surface); border-bottom: 1px solid var(--border); }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 14px 24px; font-size: 15px; color: var(--text2); text-decoration: none; border-bottom: 1px solid var(--border); }
.mobile-menu a:hover { color: var(--text); background: rgba(var(--tint),.03); }
.mobile-menu a.active, .mobile-menu a.mobile-cta { color: var(--accent); }
.mobile-trigger {
  display: flex; width: 100%; align-items: center; justify-content: space-between; padding: 14px 24px;
  font: inherit; font-size: 15px; color: var(--text2); text-align: left;
  background: none; border: 0; border-bottom: 1px solid var(--border); cursor: pointer;
}
.mobile-trigger svg { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.mobile-trigger[aria-expanded="true"] { color: var(--text); }
.mobile-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.mobile-sub { display: none; background: rgba(var(--tint),.02); }
.mobile-trigger[aria-expanded="true"] + .mobile-sub { display: block; }
.mobile-menu .mobile-sub a { padding-left: 40px; font-size: 14px; }
.mobile-menu { max-height: calc(100vh - 64px); overflow-y: auto; }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 480px) { .nav-inner { padding: 0 16px; } }
@media (max-width: 400px) { .brand-name { font-size: 14px; } }

/* ── Footer ──────────────────────────────────────────── */
.footer { border-top: 1px solid var(--border); padding: 40px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -.02em; margin: 8px 0; }
.footer-tagline { font-size: 12px; color: var(--text3); line-height: 1.55; max-width: 200px; }
.footer-social { display: flex; gap: 8px; margin-top: 16px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: rgba(var(--tint),.03);
  display: flex; align-items: center; justify-content: center; color: var(--text3); text-decoration: none;
  transition: color .15s, border-color .15s;
}
.footer-social a:hover { color: var(--text); border-color: var(--border2); }
.footer-social svg { width: 15px; height: 15px; fill: currentColor; }
.footer-col-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text3); margin-bottom: 16px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 13px; color: var(--text2); text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-bottom p { font-size: 12px; color: var(--text3); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { font-size: 12px; color: var(--text3); text-decoration: none; transition: color .15s; }
.footer-bottom-links a:hover { color: var(--text2); }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .footer-bottom { flex-direction: column; gap: 8px; }
  .footer-bottom-links { flex-wrap: wrap; gap: 12px; }
}
@media (max-width: 480px) {
  .footer { padding: 32px 0 24px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
