/* ============================================================
   Jetterfly landing — full-width mega menu (monday.com-style) +
   cookie consent. Panels are children of .nav so they span the
   full viewport width; content is centered in a max-width band
   with a bottom CTA strip. Click-activated.
============================================================ */

.nav__link { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.nav__chev {
  width: 9px; height: 9px; margin-top: 1px; opacity: .6;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav__link[aria-expanded="true"] .nav__chev { transform: rotate(180deg); opacity: 1; }
.nav__links a[aria-expanded="true"] { color: var(--ink); }
.nav__links a[aria-expanded="true"]::after { right: 0; }   /* keep the active underline */

/* ---- Full-width panel, anchored to the fixed header (.nav) ---- */
.mega {
  position: absolute;
  /* Full-bleed from the very top of the viewport so the dark panel tucks in
     BEHIND the floating nav pill (z-60). The pill appears to float on the
     panel; content is pushed clear of it via .mega__inner's top padding. */
  top: 0; left: 0; right: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0; visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .24s var(--ease), transform .24s var(--ease), visibility .24s;
  background-color: rgba(16, 11, 36, 0.98);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 34px 60px -30px rgba(0, 0, 0, 0.72);
}
.mega.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: none; }

/* Editorial aviation backdrops behind each mega panel — one image per panel,
   under a heavy black tint so the menu stays fully legible. Menu structure
   is unchanged; this only paints the panel background. */
#mega-platform {
  background-image:
    linear-gradient(rgba(8, 5, 16, 0.82), rgba(8, 5, 16, 0.92)),
    url("/assets/mega/mega-bg-15.jpg");
  /* This panel is taller (4-row columns), so `cover` would otherwise reveal
     the image's dark tarmac foreground at the bottom and crop awkwardly.
     Bias the framing up toward the sky + horizon + jet. */
  background-position: center 32%;
}
#mega-practices {
  background-image:
    linear-gradient(rgba(8, 5, 16, 0.82), rgba(8, 5, 16, 0.92)),
    url("/assets/mega/mega-bg-16.jpg");
}

/* Centered content band */
.mega__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  /* Top padding clears the floating nav pill (≈56px tall incl. its 16px top
     gap) so the menu columns sit neatly below it, with breathing room. */
  padding: 92px var(--pad-x) 42px;
  display: flex;
}
.mega__col { padding: 0 60px; min-width: 0; }
.mega__col:first-child { padding-left: 0; }
.mega__col + .mega__col { border-left: 1px solid var(--line); }
.mega__col--full { flex: 1; padding-right: 0; }

.mega__head {
  margin: 0 0 24px;
  font-family: var(--serif);
  font-size: 23px; font-weight: 400; letter-spacing: -0.01em;
  color: var(--ink);
}

.mega__list { display: flex; flex-direction: column; gap: 2px; }

.mega__row {
  display: flex; gap: 15px; align-items: flex-start;
  padding: 13px 14px; margin: 0 -14px; border-radius: 12px;
  text-decoration: none; transition: background .18s var(--ease);
}
.mega__row:hover { background: rgba(244, 238, 249, 0.05); }
.mega__ic {
  flex: none; width: 36px; height: 36px;
  display: grid; place-items: center; border-radius: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line);
  color: var(--ink-2);
}
.mega__ic svg { width: 18px; height: 18px; }
.mega__rt h4 { margin: 1px 0 3px; font: 600 15px/1.2 var(--sans); color: var(--ink); }
.mega__rt p  { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink-3); }

/* Integrations — partner chips grid in one wide column */
.mega__intg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.mega__chip {
  display: flex; flex-direction: column; gap: 2px;
  padding: 15px 16px; border-radius: 12px; border: 1px solid var(--line);
  text-decoration: none; transition: background .18s var(--ease), border-color .18s var(--ease);
}
.mega__chip:hover { background: rgba(244, 238, 249, 0.05); border-color: var(--line-2); }
.mega__chip b { font: 600 14px/1.2 var(--sans); color: var(--ink); }
.mega__chip span { font-size: 12px; color: var(--ink-3); }

/* Bottom CTA strip — full-width subtle bg, content right-aligned */
.mega__cta { background: rgba(0, 0, 0, 0.22); border-top: 1px solid var(--line); }
.mega__cta-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 17px var(--pad-x);
  display: flex; justify-content: flex-end; gap: 40px;
}
.mega__cta-inner a {
  font: 600 14px/1 var(--sans); color: var(--ink); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px; transition: color .18s var(--ease);
}
.mega__cta-inner a:hover { color: var(--light-lav); }
.mega__cta-inner a i { font-style: normal; transition: transform .25s var(--ease); }
.mega__cta-inner a:hover i { transform: translateX(3px); }

/* panel links never carry the nav-link underline */
.mega a::after { display: none !important; }

@media (max-width: 880px) { .mega { display: none; } }  /* desktop nav hides < 880 */

/* ============================================================
   Cookie consent — bottom-left dark-glass card
============================================================ */
.cookie {
  position: fixed; left: 22px; bottom: 22px; z-index: 200;
  width: min(380px, calc(100vw - 32px));
  opacity: 0; transform: translateY(14px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.cookie.is-in { opacity: 1; transform: none; }
.cookie__card {
  border-radius: 18px;
  background: #ffffff;
  border: 1px solid rgba(23, 13, 43, 0.10);
  box-shadow: 0 24px 60px -18px rgba(23, 13, 43, 0.45);
  padding: 20px;
}
.cookie__text { margin: 0 0 16px; font-size: 13px; line-height: 1.5; color: #463f5c; }
.cookie__text a { color: #6d4bd9; text-decoration: underline; text-underline-offset: 2px; }
.cookie__actions { display: flex; gap: 10px; }
.cookie__btn {
  flex: 1; padding: 10px 14px; border-radius: 999px;
  font: 600 12.5px/1 var(--sans); cursor: pointer;
  border: 1px solid transparent;
  transition: transform .2s var(--ease), filter .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.cookie__btn--ghost { background: #fff; border-color: rgba(23, 13, 43, 0.16); color: #4a4463; }
.cookie__btn--ghost:hover { color: #170d2b; border-color: rgba(23, 13, 43, 0.34); background: #f7f5fb; }
.cookie__btn--primary { background: #6d4bd9; color: #fff; }
.cookie__btn--primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
@media (max-width: 520px) { .cookie { left: 12px; right: 12px; bottom: 12px; width: auto; } }

/* ============================================================
   Cookie preferences modal — light, ready-to-use category toggles
============================================================ */
.cookie-modal {
  position: fixed; inset: 0; z-index: 240;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; transition: opacity .25s var(--ease);
}
.cookie-modal.is-in { opacity: 1; }
.cookie-modal[hidden] { display: none; }
.cookie-modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(13, 8, 28, 0.55); backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.cookie-modal__card {
  position: relative; z-index: 1;
  width: min(460px, 100%);
  max-height: calc(100vh - 40px); overflow-y: auto;
  background: #fff; color: #170d2b;
  border-radius: 20px;
  border: 1px solid rgba(23, 13, 43, 0.08);
  box-shadow: 0 40px 90px -24px rgba(23, 13, 43, 0.5);
  padding: 26px 24px 22px;
  transform: translateY(10px) scale(.98);
  transition: transform .25s var(--ease);
}
.cookie-modal.is-in .cookie-modal__card { transform: none; }
.cookie-modal__x {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 999px;
  border: 1px solid rgba(23, 13, 43, 0.12); background: #fff;
  color: #6a6480; font-size: 18px; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.cookie-modal__x:hover { color: #170d2b; border-color: rgba(23, 13, 43, 0.3); }
.cookie-modal__title { margin: 0 0 6px; font: 600 20px/1.2 var(--serif, var(--sans)); color: #170d2b; }
.cookie-modal__sub { margin: 0 0 18px; font-size: 13px; line-height: 1.5; color: #5c5675; }
.cookie-opt {
  display: block; padding: 14px 0; border-top: 1px solid rgba(23, 13, 43, 0.08);
}
.cookie-opt:first-of-type { border-top: 0; }
.cookie-opt__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-opt__name { font: 600 14px/1 var(--sans); color: #170d2b; }
.cookie-opt__badge {
  font: 600 10px/1 var(--mono, var(--sans)); letter-spacing: .12em; text-transform: uppercase;
  color: #6d4bd9; background: rgba(109, 75, 217, 0.10);
  border: 1px solid rgba(109, 75, 217, 0.25); border-radius: 999px; padding: 5px 9px;
}
.cookie-opt__desc { margin: 6px 0 0; font-size: 12.5px; line-height: 1.45; color: #6a6480; }
.cookie-switch { position: relative; display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.cookie-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cookie-switch__track {
  width: 40px; height: 23px; border-radius: 999px;
  background: rgba(23, 13, 43, 0.18); transition: background .2s var(--ease);
}
.cookie-switch__track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 17px; height: 17px; border-radius: 999px; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease);
}
.cookie-switch input:checked + .cookie-switch__track { background: #6d4bd9; }
.cookie-switch input:checked + .cookie-switch__track::after { transform: translateX(17px); }
.cookie-modal__actions { display: flex; gap: 10px; margin-top: 20px; }

/* ============================================================
   Mobile header — hamburger + single-line bar (≤ 880px)
============================================================ */
.nav__burger {
  display: none;
  flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; padding: 0 10px; flex: none;
  border-radius: 10px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05); cursor: pointer;
}
.nav__burger span {
  display: block; height: 2px; width: 100%; border-radius: 2px; background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.nav.is-mobile-open .nav__burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav.is-mobile-open .nav__burger span:nth-child(2) { opacity: 0; }
.nav.is-mobile-open .nav__burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__mobile {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 45;
  display: none; flex-direction: column;
  padding: 6px var(--pad-x) 22px;
  background: rgba(12, 8, 28, 0.98);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line-2);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.nav.is-mobile-open .nav__mobile { display: flex; }
.nav__mobile a {
  padding: 15px 4px; font-family: var(--sans); font-size: 18px;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-d);
  transition: color .2s var(--ease);
}
.nav__mobile a:hover { color: var(--light-lav); }
.nav__mobile-cta {
  margin-top: 16px; border-bottom: none !important;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--light-lav); color: #170d2b !important; border-radius: 999px;
  font-weight: 700;
}

@media (min-width: 881px) {
  .nav__burger { display: none !important; }
  .nav__mobile { display: none !important; }
}
@media (max-width: 880px) {
  .nav__burger { display: flex; }
  /* one line: burger + logo on the left, Login pushed to the right */
  .nav__inner { gap: 10px; flex-wrap: nowrap; }
  .nav__brand { margin-right: auto; }
  .nav__mark--full { height: 26px; }
}
