/* ==========================================================================
   Demo-site navigation (mega menu) + footer columns
   Loads after style.css so it only adds what the ported menu needs.
   ========================================================================== */

/* --- Primary nav: Services trigger --------------------------------------- */

.nav-item--mega {
  position: static;
}

/* NOTE: do not use `font: inherit` here — it resets the .text-nav typography
   (20px / medium) back to the surrounding body font. */
.nav-mega__trigger {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  line-height: inherit;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

/* Chevron drawn with borders so it stays crisp at any size (the ▾ glyph
   rendered as a dot at small sizes). */
.nav-caret {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
  transition: transform var(--duration, 0.25s) var(--ease, ease);
}

.nav-item--mega:hover .nav-caret,
.nav-item--mega:focus-within .nav-caret {
  transform: rotate(225deg) translate(-2px, -2px);
}

/* --- Mega menu panel ----------------------------------------------------- */

/* Kept in the DOM (visibility, not display) so the pointer can travel from the
   trigger down into the panel across the header padding without it closing. */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: var(--z-header, 100);
  display: block;
  padding-block: 18px 22px;
  background-color: var(--color-charcoal, #191919);
  border-top: 1px solid var(--color-border-card, #363636);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition:
    opacity 0.18s var(--ease, ease),
    transform 0.18s var(--ease, ease),
    visibility 0s linear 0.2s;
}

/* Invisible bridge across the gap between the nav item and the panel. */
.mega-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 100%;
  height: 56px;
}

.nav-item--mega:hover .mega-menu,
.nav-item--mega:focus-within .mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

/* No inner scrollbar — the panel grows to its content height. */
.mega-menu__inner {
  max-height: none;
  overflow: visible;
}

.mega-menu__title {
  margin: 0 0 10px;
  font-family: var(--font-heading, "Syne", sans-serif);
  font-size: 12px;
  font-weight: var(--font-weight-semibold, 600);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--color-lime, #c7ff2e);
}

.mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-40, 40px);
  align-items: start;
}

.mega-menu__heading {
  margin: 0 0 6px;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 12px;
  font-weight: var(--font-weight-semibold, 600);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-pure, #fff);
}

.mega-menu__links {
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mega-menu__links:last-child {
  margin-bottom: 0;
}

.mega-menu__links a {
  display: inline-block;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-size: 13px;
  line-height: 1.35;
  color: var(--color-white, #f5f5f0);
  opacity: var(--opacity-link, 0.85);
  text-decoration: none;
  transition: color var(--duration, 0.25s) var(--ease, ease), opacity var(--duration, 0.25s) var(--ease, ease);
}

.mega-menu__links a:hover,
.mega-menu__links a:focus-visible {
  color: var(--color-lime, #c7ff2e);
  opacity: 1;
}

/* --- Mobile nav: services list ------------------------------------------ */

.mobile-nav__services {
  margin-top: var(--space-24, 24px);
}

.mobile-nav__list--sub a {
  font-size: var(--font-size-14, 14px);
  opacity: 0.78;
}

/* --- Footer -------------------------------------------------------------- */

.footer-text {
  margin: 0;
  max-width: 363px;
  font-family: var(--font-body, "DM Sans", sans-serif);
  font-weight: var(--font-weight-light, 300);
  font-size: var(--font-size-14, 14px);
  line-height: 1.65;
  color: var(--color-text-cool, #f2f8ff);
  opacity: 0.75;
}

.footer-col {
  min-width: 148px;
}

.footer-col--contact {
  min-width: 240px;
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.footer-contact img,
.footer-contact svg {
  flex: 0 0 auto;
  width: 20px;
  height: 16px;
  object-fit: contain;
  color: currentColor;
}

.footer-follow {
  margin-top: var(--space-32, 32px);
}

/* .footer-col ul forces a column layout; the social row must stay horizontal. */
.site-footer .footer-col .footer-social--inline,
.site-footer .footer-social--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-12, 12px);
  margin-top: var(--space-16, 16px);
}

.icon-social__glyph {
  display: block;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: var(--space-24, 24px);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* --- Responsive ---------------------------------------------------------- */

@media (max-width: 1199.98px) {
  .mega-menu__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-32, 32px);
  }

  .nav-primary {
    gap: var(--space-16, 16px);
  }

  .nav-primary .text-nav {
    font-size: var(--font-size-16, 16px);
  }
}

@media (max-width: 991.98px) {
  .mega-menu {
    display: none !important;
  }
}

/* Short viewports only: let the panel scroll instead of overflowing. */
@media (max-height: 780px) {
  .mega-menu {
    max-height: calc(100vh - 96px);
    overflow-y: auto;
  }
}