/* Shared marketing styles, isolated to marketing pages only. */

.mkt-skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  transform: translateY(-140%);
  z-index: 120;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #111827;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}

.mkt-skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.mkt-nav a:focus-visible,
.mkt-nav button:focus-visible,
.mobile-menu a:focus-visible,
a.mkt-btn-primary:focus-visible,
a.mkt-btn-primary-lg:focus-visible,
a.mkt-btn-outline:focus-visible,
a.mkt-btn-outline-light:focus-visible,
a.mkt-btn-white-outline:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
  border-radius: 0.5rem;
}

.mkt-nav .mega-menu-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.mkt-nav .mega-menu-trigger {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.15s ease;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
}

.mkt-nav .mega-menu-trigger:hover,
.mkt-nav .mega-menu-group:hover .mega-menu-trigger {
  color: #ffffff;
}

.mkt-nav .mega-menu-trigger.nav-link-active {
  color: #ffffff;
}

.mkt-nav .mega-menu-chevron {
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.55);
  transition: transform 0.15s ease, color 0.15s ease;
  margin-top: 1px;
}

.mkt-nav .mega-menu-group.open .mega-menu-chevron,
.mkt-nav .mega-menu-group:hover .mega-menu-chevron {
  transform: rotate(180deg);
  color: rgba(255, 255, 255, 0.85);
}

.mkt-nav .mega-menu-panel {
  --mega-cols: 3;
  position: absolute;
  top: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  width: min(calc(var(--mega-cols) * 260px + (var(--mega-cols) - 1) * 1.25rem + 2.5rem), 92vw);
  border-radius: 0.9rem;
  border: 1px solid var(--cw-border-subtle);
  background: var(--cw-surface-low);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 70;
}

.mkt-nav .mega-menu-panel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
  background: transparent;
}

.mkt-nav .mega-menu-group.open .mega-menu-panel,
.mkt-nav .mega-menu-group:hover .mega-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.mkt-nav .mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(var(--mega-cols, 3), minmax(0, 1fr));
  gap: 1.25rem;
  padding: 1.25rem;
}

.mkt-nav .mega-menu-col-title {
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cw-text-faint);
}

.mkt-nav .mega-menu-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mkt-nav .mega-menu-link {
  display: block;
  border-radius: 0.45rem;
  padding: 0.45rem 0.55rem;
  color: var(--cw-on-surface);
  font-size: 0.875rem;
  line-height: 1.3;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.mkt-nav .mega-menu-link:hover {
  background: rgba(37, 99, 235, 0.15);
  color: var(--cw-heading);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mkt-nav .mega-menu-panel,
  .mkt-nav .mega-menu-chevron,
  .mkt-skip-link {
    transition: none;
  }
}
