/* ============================================================
   NorthPulse header: full-width and transparent at the top of the
   page, condenses into a centred glass pill on scroll. Ported from
   the North theme header; colours read from tokens.css.
   ============================================================ */

:root {
  --hdr-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hdr-x: clamp(1.25rem, 4vw, 4rem);
  --hdr-h: 88px;
}

/* Override the old sticky header rules from site.css */
.site-header { position: fixed; inset-inline: 0; top: 0; z-index: 60; background: transparent; backdrop-filter: none; border-bottom: 0; }
body { padding-top: var(--hdr-h); }
.hero { padding-top: var(--s-6); }

.header-pill {
  position: relative; display: flex; align-items: center; justify-content: space-between; overflow: hidden;
  margin-inline: auto; margin-top: 0; height: var(--hdr-h); max-width: 1600px; padding-inline: var(--hdr-x);
  border: 1px solid transparent; border-radius: 0; background: transparent;
  /* Same shapes as the condensed state, at zero, so the glass and shadow fade instead of popping */
  box-shadow: inset 0 1px 0 rgba(255,255,255,0), 0 20px 50px -30px rgba(0,0,0,0);
  -webkit-backdrop-filter: blur(0px) saturate(100%); backdrop-filter: blur(0px) saturate(100%);
  transition: max-width .5s var(--hdr-ease), height .5s var(--hdr-ease), margin .5s var(--hdr-ease), padding .5s var(--hdr-ease), border-radius .5s var(--hdr-ease), background-color .5s var(--hdr-ease), border-color .5s var(--hdr-ease), box-shadow .5s var(--hdr-ease), -webkit-backdrop-filter .5s var(--hdr-ease), backdrop-filter .5s var(--hdr-ease);
}
.header-pill.is-condensed {
  margin-top: .75rem; height: 60px; max-width: 980px; padding: 0 .75rem 0 1rem; border-radius: 9999px;
  border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.045);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 20px 50px -30px rgba(0,0,0,.95);
}

/* Cursor-following light inside the pill */
.header-pill__light { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .3s ease;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(111,242,216,.16), transparent 70%); }
.header-pill:hover .header-pill__light { opacity: 1; }

/* Top edge highlight, appears when condensed */
.header-pill__edge { position: absolute; inset: 0 0 auto 0; height: 1px; opacity: 0; pointer-events: none; transition: opacity .5s var(--hdr-ease);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28) 20%, rgba(111,242,216,.4) 50%, rgba(255,255,255,.28) 80%, transparent); }
.header-pill.is-condensed .header-pill__edge { opacity: 1; }

/* Brand */
.brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .625rem; border-radius: 9999px; color: var(--text-1); }
.mark { display: block; flex: none; }
.brand__mark { width: 2.25rem; height: 2.25rem; transition: width .5s var(--hdr-ease), height .5s var(--hdr-ease); }
.header-pill.is-condensed .brand__mark { width: 1.75rem; height: 1.75rem; }
.brand__word { display: block; overflow: hidden; white-space: nowrap; font-size: 1.3rem; line-height: 1; max-width: 220px; opacity: 1; transition: max-width .5s var(--hdr-ease), opacity .5s var(--hdr-ease); }
.brand__wordmark { display: block; height: .76em; width: auto; }
.header-pill.is-condensed .brand__word { max-width: 0; opacity: 0; }
.np-pulse { stroke: var(--mint); }
.np-pulse-fill { fill: var(--mint); }

/* Nav */
.header-nav { position: relative; z-index: 1; display: none; }
.header-nav > ul { position: relative; display: flex; align-items: center; gap: .375rem; list-style: none; margin: 0; padding: 0; transition: gap .5s var(--hdr-ease); }
.header-nav > ul > li { margin: 0; }
.header-pill.is-condensed .header-nav > ul { gap: .125rem; }
.header-nav__indicator { position: absolute; top: 0; bottom: 0; z-index: -1; left: 0; width: 0; opacity: 0; border-radius: 9999px; pointer-events: none;
  background: linear-gradient(180deg, rgba(111,242,216,.2), rgba(46,200,173,.1));
  box-shadow: inset 0 0 0 1px rgba(111,242,216,.22), 0 0 22px -4px rgba(46,200,173,.55);
  transition: left .5s var(--hdr-ease), width .5s var(--hdr-ease), opacity .5s var(--hdr-ease); }
.header-nav a { display: block; border-radius: 9999px; padding: .625rem 1rem; font-size: .9rem; font-weight: 500; color: var(--text-2); font-family: var(--font-sans); transition: color .5s var(--hdr-ease), padding .5s var(--hdr-ease); }
.header-pill.is-condensed .header-nav a { padding: .5rem .875rem; }
.header-nav a:hover, .header-nav a[aria-current] { color: var(--text-1); }

/* Services dropdown, hangs under the Services link */
.header-nav .has-menu { position: relative; display: flex; align-items: center; }
.header-nav .has-menu > a { padding-right: .35rem; }
.header-nav .menu { position: absolute; top: calc(100% + 10px); left: 0; min-width: 320px; padding: .5rem; display: none;
  background: rgba(10,11,20,.94); -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid rgba(255,255,255,.09); border-radius: 18px; box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 30px 60px -20px rgba(0,0,0,.8); }
.header-nav .has-menu:hover .menu, .header-nav .has-menu.open .menu { display: block; }
@media (hover: none) { .header-nav .has-menu:hover .menu { display: none; } .header-nav .has-menu.open .menu { display: block; } }
.header-nav .menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 1.6rem; height: 1.6rem; margin-left: 0; margin-right: .4rem; border: 0; background: transparent; color: var(--text-2); border-radius: 50%; cursor: pointer; }
.header-nav .menu-toggle:hover { color: var(--text-1); }
.header-nav .menu-toggle svg { width: 12px; height: 12px; transition: transform .3s var(--hdr-ease); }
.header-nav .has-menu.open .menu-toggle svg { transform: rotate(180deg); }
.header-nav .has-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; pointer-events: none; }
.header-nav .has-menu:hover::after { pointer-events: auto; }
/* The pill clips overflow for its own animation; release it while a dropdown is open */
.header-pill:has(.has-menu:hover), .header-pill:has(.has-menu.open) { overflow: visible; }
html { scroll-padding-top: calc(var(--hdr-h) + 16px); }
.header-nav a:focus-visible, .brand:focus-visible, .icon-btn:focus-visible, .btn-solid:focus-visible, .btn-line:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.header-nav .menu a { display: block; padding: .7rem .9rem; border-radius: 12px; color: var(--text-1); font-weight: 600; font-size: .92rem; }
.header-nav .menu a:hover { background: rgba(111,242,216,.1); color: var(--text-1); }
.header-nav .menu small { display: block; color: var(--text-3); font-weight: 500; font-size: .78rem; margin-top: .1rem; }

/* Actions */
.header-actions { position: relative; z-index: 1; display: flex; align-items: center; gap: .5rem; }
.btn-solid { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .625rem; overflow: hidden; border-radius: 9999px;
  background: var(--text-1); color: #111a2c; font-weight: 500; font-family: var(--font-sans); text-transform: none; letter-spacing: 0;
  box-shadow: 0 0 0 1px rgba(10,127,121,0), 0 8px 30px -4px rgba(10,127,121,0), 0 18px 44px -10px rgba(139,124,255,0), 0 4px 14px -6px rgba(0,0,0,0);
  transition: background-color .3s var(--hdr-ease), color .3s var(--hdr-ease), box-shadow .3s var(--hdr-ease); }
.btn-solid:hover, .btn-solid:focus-visible { background: #fff; color: #060b14;
  box-shadow: 0 0 0 1px rgba(111,242,216,.42), 0 8px 30px -4px rgba(111,242,216,.42), 0 18px 44px -10px rgba(139,124,255,.26), 0 4px 14px -6px rgba(0,0,0,.5); }
.btn-solid > span { position: relative; z-index: 1; }
.btn-solid__sheen { position: absolute; inset: 0; z-index: 0; transform: translateX(-100%); background: linear-gradient(to right, transparent, rgba(172,236,232,.6), transparent); transition: transform .7s var(--hdr-ease); }
.btn-solid:hover .btn-solid__sheen, .btn-solid:focus-visible .btn-solid__sheen { transform: translateX(100%); }
.header-cta { display: none; height: 2.75rem; padding-inline: 1.25rem; font-size: .9rem;
  transition: height .5s var(--hdr-ease), padding .5s var(--hdr-ease), font-size .5s var(--hdr-ease), background-color .3s var(--hdr-ease), color .3s var(--hdr-ease), box-shadow .3s var(--hdr-ease); }
.header-pill.is-condensed .header-cta { height: 2.25rem; padding-inline: 1rem; font-size: .85rem; }
.btn-line { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 9999px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.03);
  color: var(--text-1); font-weight: 500; font-family: var(--font-sans); white-space: nowrap;
  transition: border-color .3s var(--hdr-ease), color .3s var(--hdr-ease), background-color .3s var(--hdr-ease), height .5s var(--hdr-ease), padding .5s var(--hdr-ease), font-size .5s var(--hdr-ease); }
.btn-line:hover, .btn-line:focus-visible { border-color: rgba(111,242,216,.55); color: var(--mint); background: rgba(111,242,216,.06); }
.header-cal { display: none; height: 2.75rem; padding-inline: 1.15rem; font-size: .9rem; }
.header-pill.is-condensed .header-cal { height: 2.25rem; padding-inline: .9rem; font-size: .85rem; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; border-radius: 9999px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); color: var(--text-1); cursor: pointer; transition: background-color .3s ease; }
.icon-btn:hover { background: rgba(255,255,255,.08); }

/* Mobile menu */
.mobile-menu { position: fixed; inset: 0; z-index: 80; display: flex; flex-direction: column; background: rgba(7,7,13,.86);
  -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%); opacity: 0; transition: opacity .28s var(--hdr-ease); }
.mobile-menu[hidden] { display: none !important; }
.mobile-menu.is-open { opacity: 1; }
.mobile-menu__top { display: flex; align-items: center; justify-content: space-between; flex: none; height: var(--hdr-h); padding-inline: var(--hdr-x); }
.mobile-menu__top .brand__mark { width: 2rem; height: 2rem; }
.mobile-menu__top .brand__word { font-size: 1.25rem; }
.mobile-menu__nav { flex: 1; overflow-y: auto; padding: 1.5rem var(--hdr-x) 0; }
.mobile-menu__nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu__nav li { margin: 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.mobile-menu__nav a { display: block; padding: 1.1rem 0; font-family: var(--font-display); font-size: 1.9rem; font-weight: 500; letter-spacing: -.035em; color: var(--text-1); opacity: 0; transform: translateY(22px); transition: opacity .6s var(--hdr-ease), transform .6s var(--hdr-ease); }
.mobile-menu__nav li.sub a { font-size: 1.05rem; font-family: var(--font-sans); color: var(--text-2); padding: .7rem 0 .7rem 1.25rem; }
.mobile-menu.is-open .mobile-menu__nav a { opacity: 1; transform: none; }
.mobile-menu__foot { flex: none; padding: 1.5rem var(--hdr-x) max(2rem, env(safe-area-inset-bottom)); }
.mobile-menu__cta { display: flex; width: 100%; height: 3.5rem; font-size: 1rem; }
.mobile-menu__cal { display: flex; width: 100%; height: 3.5rem; font-size: 1rem; margin-top: .75rem; }
.mobile-menu__email { display: block; margin-top: 1rem; text-align: center; font-family: var(--font-mono); font-size: var(--fs-0); letter-spacing: .14em; text-transform: uppercase; color: var(--text-2); }

@media (min-width: 640px) { .header-cta, .header-cal { display: inline-flex; } }
@media (min-width: 1024px) { .menu-btn { display: none; } .header-nav { display: block; } }
/* 1024–1199px: the full-width header holds six links and two buttons, so tighten its spacing to keep
   everything on one row. The condensed pill and wider screens keep the normal spacing. */
@media (min-width: 1024px) and (max-width: 1199px) {
  .header-pill:not(.is-condensed) { padding-inline: 1.5rem; }
  .header-pill:not(.is-condensed) .header-nav > ul { gap: .125rem; }
  .header-pill:not(.is-condensed) .header-nav > ul > li > a { padding-inline: .7rem; }
  .header-pill:not(.is-condensed) .header-nav > ul > li.has-menu > a { padding-right: .3rem; }
  .header-pill:not(.is-condensed) .header-cal, .header-pill:not(.is-condensed) .header-cta { padding-inline: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .header-pill, .header-pill *, .mobile-menu, .mobile-menu__nav a { transition: none !important; }
}

/* Light mode (default) */
  .brand {
    --np-north: #0B1F45;
    --np-pulse: #0A7F79;
    color: var(--np-north);           /* "North" parts use currentColor */
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
  }

  /* Dark mode (follows system setting) */
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .brand {
      --np-north: #FFFFFF;
      --np-pulse: #3CC9BB;
    }
  }

  /* Dark mode (manual toggle: <html data-theme="dark">) */
  :root[data-theme="dark"] .brand {
    --np-north: #FFFFFF;
    --np-pulse: #3CC9BB;
  }

  /* "Pulse" parts */
  .brand .np-pulse {
    stroke: var(--np-pulse);          /* heartbeat line in the icon */
  }
  .brand .np-pulse-fill {
    fill: var(--np-pulse);            /* "Pulse" word */
  }

  /* Sizes (change as needed) */
  .brand__mark {
    height: 44px;
    width: auto;
    flex-shrink: 0;
  }
  .brand__word {
    display: inline-flex;
  }
  .brand__wordmark {
    height: 30px;
    width: auto;
  }