/* =============================================================================
   Shared header (partials/header.ejs): sticky bar, brand, nav links, dropdown menus, mobile panel.
   Loaded after the page stylesheet on every page.
   ============================================================================= */

/* Base rules the header relies on. style.css has the same ones for the inner pages; the home page
   (home.css) has not, so they are repeated here scoped to the header. */
.site-header { font-family: var(--font-body); font-size: 16px; line-height: 1.65; }
.site-header .container { width: min(100% - 32px, var(--maxw)); margin-inline: auto; }
:where(.site-header) ul { margin: 0; padding: 0; }
.site-header img, .site-header svg { max-width: 100%; display: block; }
.site-header .btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 12px 20px; border-radius: 14px; font-weight: 700; font-size: 15px; line-height: 1; border: 1.5px solid transparent; cursor: pointer; font-family: inherit; white-space: nowrap; transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease; }
.site-header .btn:hover { text-decoration: none; transform: translateY(-2px); }
.site-header .btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
.site-header .btn-primary { background: #0f70ee; color: #fff; }
.site-header .btn-primary:hover { background: #0b5fd6; }
body.nav-open { overflow: hidden; }

.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--font-heading); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand-warm { color: #e06a0b; }
.logo-mark { flex: 0 0 auto; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; }
.nav-links a:not(.btn) { color: var(--text); font-weight: 500; font-size: 15px; display: inline-flex; align-items: center; gap: 7px; }
.nav-links a:not(.btn):hover, .nav-links a.is-active { color: var(--brand-link); text-decoration: none; }
.nav-ico { display: inline-grid; place-items: center; color: var(--muted); transition: color 0.15s ease; }
.nav-ico svg { width: 16px; height: 16px; }
.nav-links a:hover .nav-ico, .nav-links a.is-active .nav-ico { color: var(--brand); }
.nav-ico--tile { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand-link); flex: 0 0 auto; }
.nav-ico--tile svg { width: 16px; height: 16px; }
.menu li a { display: flex; align-items: center; gap: 10px; }
.menu li a:hover .nav-ico--tile, .menu li a.is-active .nav-ico--tile { background: var(--brand); color: #fff; }
.nav-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle__close, .nav-toggle[aria-expanded="true"] .nav-toggle__open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle__close { display: block; }
@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: -16px; right: -16px; top: 100%; flex-direction: column; align-items: stretch; gap: 0; max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; background: var(--surface); border-bottom: 1px solid var(--border); padding: 8px 32px 18px; box-shadow: var(--shadow); }
  .nav-links.open { display: flex; }
  .nav-links li a:not(.btn) { display: flex; align-items: center; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--border); font-size: 16px; }
  .nav-links .menu li a { padding: 9px 10px; border-bottom: 0; font-size: 15px; }
  .nav-links .nav-cta { padding-top: 14px; }
  .nav-links .nav-cta .btn { width: 100%; }
}

.has-menu { position: relative; display: flex; align-items: center; gap: 2px; }
.menu-trigger { background: none; border: 0; padding: 4px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; border-radius: 6px; }
.menu-trigger svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.menu { display: none; position: absolute; top: calc(100% + 14px); left: -10px; min-width: 250px; padding: 10px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); z-index: 70; }
.menu::before { content: ""; position: absolute; left: 0; right: 0; top: -16px; height: 16px; }
.has-menu--wide .menu { min-width: 560px; display: none; grid-template-columns: 1fr 1fr; }
.menu li a { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text) !important; font-weight: 500; font-size: 14px; white-space: nowrap; }
.menu li a:hover, .menu li a.is-active { background: var(--brand-tint); color: var(--brand-link) !important; text-decoration: none; }
@media (min-width: 961px) {
  .has-menu:hover > .menu, .has-menu:focus-within > .menu, .has-menu.open > .menu { display: block; }
  .has-menu--wide:hover > .menu, .has-menu--wide:focus-within > .menu, .has-menu--wide.open > .menu { display: grid; }
  .has-menu.open .menu-trigger svg { transform: rotate(180deg); }
}
@media (max-width: 960px) {
  .has-menu { flex-wrap: wrap; border-bottom: 1px solid var(--border); }
  .has-menu > .menu-link { flex: 1; border-bottom: 0 !important; }
  .menu, .has-menu--wide .menu { position: static; flex-basis: 100%; width: 100%; min-width: 0; box-shadow: none; border: 0; padding: 0 0 10px 4px; display: none; }
  .has-menu.open > .menu { display: block; }
  .has-menu.open .menu-trigger svg { transform: rotate(180deg); }
  .menu li a { white-space: normal; }
}

@media (max-width: 720px) {
  :root { --header-h: 64px; }
  .nav { min-height: 64px; }
  .brand-name { font-size: 17px; }
  .brand .logo-mark { width: 32px; height: 32px; }
}
