/* ---------------------------------------------------------------
   Shared navigation + footer (loaded on every page).
   Relies on the brand tokens defined in style.css / site.css.
--------------------------------------------------------------- */
/* ---- custom cursor (shared on every page) ---- */
@media (pointer: fine) {
  body, a, button { cursor: none; }
}
.cursor-dot, .cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 200;
  pointer-events: none; opacity: 0; will-change: transform;
}
.cursor-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lavender, #c9bcff);
  box-shadow: 0 0 10px rgba(201, 188, 255, 0.9);
  margin: -3.5px 0 0 -3.5px;
  transition: opacity 0.3s, width 0.25s, height 0.25s, margin 0.25s;
}
.cursor-glow {
  width: 46px; height: 46px; border-radius: 50%;
  margin: -23px 0 0 -23px;
  border: 1px solid rgba(201, 188, 255, 0.35);
  background: radial-gradient(circle at 35% 35%,
    rgba(139, 108, 255, 0.28), rgba(79, 125, 255, 0.12) 55%, transparent 72%);
  mix-blend-mode: screen;
  transition: opacity 0.3s, border-color 0.25s, background 0.25s;
}
body.cursor-active .cursor-dot, body.cursor-active .cursor-glow { opacity: 1; }
body.cursor-hover .cursor-dot { width: 4px; height: 4px; margin: -2px 0 0 -2px; }
body.cursor-hover .cursor-glow {
  border-color: rgba(240, 166, 200, 0.5);
  background: radial-gradient(circle at 35% 35%,
    rgba(139, 108, 255, 0.42), rgba(240, 166, 200, 0.16) 55%, transparent 72%);
}
body.cursor-down .cursor-glow { border-color: rgba(201, 188, 255, 0.7); }
@media (pointer: coarse) { .cursor-dot, .cursor-glow { display: none; } }

.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; gap: 26px;
  padding: 16px clamp(20px, 4vw, 56px);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, border-color 0.35s, padding 0.35s,
    transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-bottom: 1px solid transparent;
}
/* auto-hide (all screens): the bar slides fully up on scroll-down, back on scroll-up.
   !important beats any inline transform GSAP may leave on the header. */
.site-nav.nav-hidden { transform: translateY(-100%) !important; }
.nav-cta-mobile { display: none; } /* the in-drawer CTA; shown only on mobile */
.nav-drawer { display: none; } /* body-level mobile drawer; shown only on mobile */
.site-nav.scrolled {
  background: rgba(14, 11, 26, 0.72);
  backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: rgba(201, 188, 255, 0.12);
  padding-top: 12px; padding-bottom: 12px;
}
.site-nav.solid {
  background: rgba(14, 11, 26, 0.72);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom-color: rgba(201, 188, 255, 0.12);
}
/* the drawer is now a body child (not inside the header), so the old containing-
   block clipping is gone. we only keep the header visible + opaque while the
   drawer is open, so the burger stays reachable as the close (X). */
body.nav-open .site-nav {
  transform: none !important; /* override auto-hide so the header can't be hidden while open */
  background: rgba(12, 9, 22, 0.98);
  backdrop-filter: none; -webkit-backdrop-filter: none;
}
.nav-brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  letter-spacing: 0.01em; color: var(--ink); text-decoration: none; flex: none;
}
.nav-brand-icon {
  width: 30px; height: 30px; object-fit: contain; flex: none;
  filter: drop-shadow(0 2px 7px rgba(139, 108, 255, 0.4));
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-brand:hover .nav-brand-icon { transform: translateY(-1px) scale(1.05); }
.site-nav.scrolled .nav-brand-icon { width: 27px; height: 27px; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav-link {
  position: relative;
  font-size: 14.5px; color: var(--ink-dim); text-decoration: none;
  padding: 9px 14px; border-radius: 10px; letter-spacing: 0.01em;
  transition: color 0.22s, background 0.22s;
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-item.has-mega > .nav-link::after {
  content: "⌄"; margin-left: 6px; font-size: 11px; opacity: 0.6; position: relative; top: -1px;
}
.nav-cta {
  margin-left: auto; flex: none;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  color: #fff; text-decoration: none;
  padding: 10px 22px; border-radius: 100px;
  background: linear-gradient(135deg, var(--violet), var(--blue));
  box-shadow: 0 8px 30px -12px rgba(139, 108, 255, 0.7), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform 0.3s cubic-bezier(0.2,0.8,0.2,1), box-shadow 0.3s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 44px -14px rgba(139,108,255,0.85); }

/* ---- mega menus ---- */
.nav-item { position: relative; }
.mega {
  position: absolute; top: calc(100% + 14px); left: 0; transform: translateY(8px);
  max-width: calc(100vw - 40px);
  opacity: 0; visibility: hidden; pointer-events: none;
  background: rgba(18, 14, 32, 0.92);
  backdrop-filter: blur(26px) saturate(1.2); -webkit-backdrop-filter: blur(26px) saturate(1.2);
  border: 1px solid rgba(201, 188, 255, 0.14);
  border-radius: 22px; padding: 16px;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,0.8);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
.mega::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-item.has-mega:hover .mega,
.nav-item.has-mega:focus-within .mega {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
.mega-services { width: 620px; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mega-card {
  display: flex; flex-direction: column; gap: 3px;
  padding: 14px 16px; border-radius: 14px; text-decoration: none;
  border: 1px solid transparent; transition: background 0.2s, border-color 0.2s;
}
.mega-card strong { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: var(--ink); }
.mega-card span { font-size: 12.5px; color: var(--ink-dim); line-height: 1.4; }
.mega-card:hover { background: rgba(139, 108, 255, 0.1); border-color: rgba(139, 108, 255, 0.28); }
.mega-all {
  display: inline-block; margin: 10px 6px 2px;
  font-size: 13px; color: var(--lavender); text-decoration: none; font-weight: 600;
}
.mega-all:hover { color: var(--ink); }

.mega-industries { width: 640px; display: grid; grid-template-columns: 220px 1fr; gap: 10px; }
.mega-cats { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid rgba(201,188,255,0.1); padding-right: 10px; }
.mega-cat {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-body); font-size: 14px; color: var(--ink-dim);
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 11px 14px; border-radius: 12px; transition: background 0.2s, color 0.2s;
}
.mega-cat span { opacity: 0.5; font-size: 16px; }
.mega-cat:hover, .mega-cat.on { background: rgba(139, 108, 255, 0.12); color: var(--ink); }
.mega-panels { position: relative; padding: 6px; }
.mega-panel { display: none; flex-direction: column; gap: 2px; }
.mega-panel.on { display: flex; animation: megaFade 0.25s ease; }
@keyframes megaFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.mega-panel a {
  font-size: 14.5px; color: var(--lavender); text-decoration: none;
  padding: 10px 14px; border-radius: 10px; transition: background 0.2s, color 0.2s;
}
.mega-panel a:hover { background: rgba(139, 108, 255, 0.1); color: var(--ink); }

.mega-depts { width: 500px; }
.mega-depts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.mega-depts-grid a {
  font-size: 13.5px; color: var(--lavender); text-decoration: none;
  padding: 10px 12px; border-radius: 10px; transition: background 0.2s, color 0.2s;
}
.mega-depts-grid a:hover { background: rgba(139, 108, 255, 0.1); color: var(--ink); }

/* ---- burger (mobile) ---- */
.nav-burger { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; width: 30px; height: 30px; }
.nav-burger span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--ink); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
body.nav-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-burger span:nth-child(2) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 940px) {
  .nav-cta { display: none; } /* CTA moves into the drawer on mobile */
  .nav-burger { display: block; margin-left: auto; }
  .nav-cta-mobile {
    display: flex; justify-content: center; align-items: center;
    margin-top: 24px; padding: 16px; border-radius: 100px; text-decoration: none;
    font-family: var(--font-display); font-weight: 600; font-size: 17px; color: #fff;
    background: linear-gradient(135deg, var(--violet), var(--blue));
    box-shadow: 0 10px 30px -12px rgba(139, 108, 255, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  }
  .nav-menu { display: none; } /* the desktop horizontal nav is not used on mobile */
  /* the drawer is a direct child of <body> and sits above everything; nothing in
     the header can clip it. it fills the screen below the bar and scrolls. */
  .nav-drawer {
    position: fixed; inset: 62px 0 0; z-index: 130;
    margin: 0; padding: 12px 24px 60px;
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: rgba(12, 9, 22, 0.98);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.2,0.8,0.2,1);
  }
  body.nav-open .nav-drawer { transform: translateX(0); }
  .nav-item { display: block; }
  /* every top-level row identical height: flex row, label left, chevron right */
  .nav-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 17px 6px; font-size: 18px; line-height: 1.2; border-radius: 0;
    border-bottom: 1px solid rgba(201, 188, 255, 0.09);
  }
  .nav-item.has-mega > .nav-link::after {
    float: none; margin: 0; font-size: 13px; opacity: 0.55; top: 0;
    transition: transform 0.25s ease;
  }
  .nav-item.has-mega.open > .nav-link::after { transform: rotate(180deg); }
  .mega {
    position: static; transform: none; opacity: 1; visibility: visible; pointer-events: auto;
    width: auto !important; background: none; border: 0; box-shadow: none; padding: 0;
    display: none; margin: 4px 0 10px;
  }
  .nav-item.has-mega.open .mega { display: block; }
  .mega-grid, .mega-depts-grid { grid-template-columns: 1fr 1fr; }
  .mega-cats { flex-direction: row; flex-wrap: wrap; border: 0; padding: 0; }
  .mega-panel { display: flex !important; }
  .mega-cats { display: none; }
}

/* ---- footer ---- */
.site-footer {
  position: relative; z-index: 10;
  border-top: 1px solid rgba(201, 188, 255, 0.12);
  padding: 70px clamp(20px, 5vw, 80px) 40px;
  background: rgba(10, 8, 18, 0.6);
  backdrop-filter: blur(10px);
}
.foot-top {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: 1.3fr 2fr; gap: 50px;
}
.foot-brand p { color: var(--ink-dim); font-size: 14.5px; max-width: 320px; margin-top: 14px; line-height: 1.6; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.foot-col h4 {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.12em; color: var(--lavender); margin-bottom: 14px;
}
.foot-col a { display: block; font-size: 14px; color: var(--ink-dim); text-decoration: none; padding: 5px 0; transition: color 0.2s; }
.foot-col a:hover { color: var(--ink); }
.foot-bottom {
  max-width: 1160px; margin: 44px auto 0; padding-top: 24px;
  border-top: 1px solid rgba(201, 188, 255, 0.09);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-size: 13px; color: var(--ink-dim);
}
.foot-bottom a { color: var(--ink-dim); text-decoration: none; }
.foot-bottom a:hover { color: var(--lavender); }
@media (max-width: 760px) {
  .foot-top { grid-template-columns: 1fr; gap: 34px; }
  .foot-cols { grid-template-columns: 1fr 1fr; }
}
