/* ==========================================================================
   ForenSecure site header: brand, primary navigation with the Products menu,
   and the mobile drawer. Shared by the marketing site and the customer area:
   the site build copies this file, header.js and the rendered header into
   Forensecure.Portal/wwwroot/site/ (scripts/sync-portal-header.js), so both
   always show the same header. Edit it here, not in the portal copy.
   ========================================================================== */

@font-face { font-family: 'Manrope'; font-weight: 200 800; font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 300 800; font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2'); }

/* Tokens the header needs, scoped to it so the header looks the same on pages
   whose own stylesheet defines these names differently (the customer area is
   dark-themed and uses --text for light text). Values mirror main.css :root. */
.site-header {
  --header-h: 70px;
  --container: 1240px;
  --ink-900: #0a1220;
  --paper: #f5f7fb;
  --white: #ffffff;
  --text: #0d1526;
  --text-3: #5f6c81;
  --line: #dfe5ee;
  --on-dark: #eef3fb;
  --on-dark-2: #aebbd0;
  --line-dark: rgba(150, 175, 215, 0.14);
  --line-dark-strong: rgba(150, 175, 215, 0.24);
  --blue: #1f6feb;
  --blue-wash: #e8f1ff;
  --amber: #e39b25;
  --radius: 14px;
  --font-display: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  --font-text: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  font-family: var(--font-text);
  line-height: 1.5;
}
.site-header *, .site-header *::before, .site-header *::after { box-sizing: border-box; }
.site-header ul { list-style: none; margin: 0; padding: 0; }
.site-header a, .site-header a:hover { text-decoration: none; }
.site-header button { font: inherit; }
.site-header .site-header__inner { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.site-header .icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; display: inline-block; }
.site-header .icon--sm { width: 0.95em; height: 0.95em; }
.site-header .pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px; font: 600 0.74rem/1 var(--font-mono); letter-spacing: 0.04em; }
.site-header .pill--dev { background: rgba(227, 155, 37, 0.14); color: var(--amber); }

.site-header {
  position: fixed; inset: 0 0 auto; z-index: 100; height: var(--header-h);
  color: var(--on-dark);
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled, .site-header.is-open {
  background: rgba(8, 14, 26, 0.88);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--line-dark);
}
.site-header__inner { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 750 1.12rem/1 var(--font-display); letter-spacing: -0.02em; }
.brand:hover { color: inherit; }
.brand img { width: 26px; height: auto; }
.primary-nav { flex: 1; }
.primary-nav ul { list-style: none; display: flex; align-items: center; gap: 2px; }
.primary-nav li { position: relative; }
.primary-nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; border-radius: 8px; border: 0; background: none; cursor: pointer;
  font: 500 0.93rem/1 var(--font-text); color: var(--on-dark-2); text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.primary-nav__link:hover, .primary-nav__link[aria-expanded="true"] { color: var(--on-dark); background: rgba(255, 255, 255, 0.06); }
.primary-nav__link.is-active { color: var(--on-dark); }
.primary-nav__link .icon { transition: transform 0.2s; opacity: 0.7; }
.primary-nav__link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.mega {
  position: absolute; top: calc(100% + 10px); left: -12px; width: 560px;
  background: var(--white); color: var(--text); border-radius: var(--radius);
  box-shadow: 0 24px 60px -16px rgba(4, 10, 24, 0.45), 0 0 0 1px rgba(13, 21, 38, 0.06);
  padding: 10px; opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0.18s;
}
.has-menu.is-open .mega { opacity: 1; visibility: visible; transform: none; }
.mega__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.mega__item { display: block; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--text); }
.mega__item:hover, .mega__item[aria-current="page"] { background: var(--paper); color: var(--text); }
.mega__item strong { display: block; font: 650 0.95rem/1.3 var(--font-display); letter-spacing: -0.01em; }
.mega__item span { display: block; font-size: 0.84rem; color: var(--text-3); margin-top: 2px; line-height: 1.4; }
.mega__foot { display: block; margin-top: 6px; padding: 11px 14px; border-top: 1px solid var(--line); font-size: 0.84rem; color: var(--text-3); text-decoration: none; }
.mega__foot:hover { color: var(--blue); }
.mega--products { width: 600px; }
.mega__product + .mega__product { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--line); }
.mega__head { display: flex; gap: 14px; align-items: center; padding: 12px 14px; border-radius: 10px; text-decoration: none; color: var(--text); }
.mega__head:hover, .mega__head[aria-current="page"] { background: var(--paper); color: var(--text); }
.mega__head strong { display: flex; align-items: center; gap: 10px; font: 700 1rem/1.3 var(--font-display); letter-spacing: -0.01em; }
.mega__head strong .pill { font-style: normal; font-size: 0.62rem; padding: 3px 8px; }
.mega__head > span:last-child > span { display: block; font-size: 0.84rem; color: var(--text-3); margin-top: 2px; }
.mega__icon { flex: none; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--blue-wash); color: var(--blue); }
.mega__product .mega__grid { padding-left: 52px; }
.mega__product .mega__item { padding: 8px 12px; }
.mega__product .mega__item strong { font-size: 0.88rem; }
.mega__product .mega__item span { font-size: 0.8rem; }
.site-header__actions { display: flex; align-items: center; gap: 14px; }
.header-link { color: var(--on-dark-2); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.header-link:hover { color: var(--on-dark); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark-strong); color: var(--on-dark); border-radius: 9px; padding: 7px; cursor: pointer; }
.drawer { background: var(--ink-900); border-top: 1px solid var(--line-dark); padding: 12px 24px 28px; max-height: calc(100vh - var(--header-h)); overflow-y: auto; }
.drawer ul { list-style: none; margin-bottom: 18px; }
.drawer a:not(.btn) { display: block; padding: 12px 0; color: var(--on-dark); text-decoration: none; border-bottom: 1px solid var(--line-dark); font-weight: 500; }
.drawer .btn { width: 100%; }
.drawer__sub a:not(.btn) { padding-left: 16px; font-weight: 400; color: var(--on-dark-2); font-size: 0.95rem; }

/* Pages with no hero behind the header (the customer area) keep it solid. */
.site-header[data-solid] {
  background: rgba(8, 14, 26, 0.96);
  border-bottom-color: var(--line-dark);
}

@media (max-width: 1080px) {
  .primary-nav, .header-link { display: none; }
  .nav-toggle { display: inline-flex; }
  .site-header__inner { justify-content: space-between; }
}
