/* ============================================================
   MADE GLOW — site nav (mega menu + mobile drawer)
   ============================================================ */

/* Top promo strip — gradient bar that grounds the header to the page */
.mg-promo {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 201;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: linear-gradient(90deg, #6354A5 0%, #E879C2 50%, #FF8C42 100%);
  background-size: 200% 100%;
  animation: mg-promo-shimmer 12s ease-in-out infinite;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
}
@keyframes mg-promo-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
.mg-promo-inner {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mg-promo a {
  color: #fff;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  font-weight: 600;
}
.mg-promo a:hover { text-decoration-thickness: 2px; }
.mg-promo-spark {
  display: inline-block;
  animation: mg-promo-pulse 2s ease-in-out infinite;
}
@keyframes mg-promo-pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}
.mg-promo-close {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  color: #fff;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mg-promo-close:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.mg-promo-close svg { width: 14px; height: 14px; }

body.mg-promo-on .mg-nav { top: 38px; }
body.mg-promo-on .mg-mega { top: 116px; }

@media (max-width: 540px) {
  .mg-promo { font-size: 12px; height: 36px; }
  body.mg-promo-on .mg-nav { top: 36px; }
  body.mg-promo-on .mg-mega { top: 110px; }
  .mg-promo-close { right: 6px; }
  .mg-promo-inner { padding-right: 28px; }
}

.mg-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 200;
  padding: 14px 0;
  transition: padding 0.25s ease, background 0.25s ease, top 0.25s ease;
}
.mg-nav-shell {
  background: #ffffff;
  border-radius: 9999px;
  padding: 10px 16px 10px 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 0 0 1px rgba(99,84,165,0.10),
    0 12px 40px -12px rgba(99,84,165,0.25),
    0 4px 12px -4px rgba(232,121,194,0.18);
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Scrolled state — solid pill with shadow for legibility on any bg */
.mg-nav.scrolled { padding: 10px 0; }
.mg-nav.scrolled .mg-nav-shell {
  background: #ffffff;
  border-radius: 9999px;
  padding: 10px 16px 10px 20px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 0 0 1px rgba(99,84,165,0.10),
    0 12px 40px -12px rgba(99,84,165,0.25),
    0 4px 12px -4px rgba(232,121,194,0.18);
}

/* Logo */
.mg-logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: 'Bebas Neue', system-ui, sans-serif;
  font-size: 22px; letter-spacing: 0.08em;
  color: var(--mg-header, #2A1B4F);
  text-decoration: none;
  flex-shrink: 0;
}
.mg-logo img { width: 40px; height: 40px; }
.mg-nav.scrolled .mg-logo img { width: 36px; height: 36px; }

/* Desktop nav links */
.mg-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0; padding: 0;
}
.mg-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--mg-header, #2A1B4F);
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.mg-nav-link:hover,
.mg-nav-link[aria-expanded="true"] {
  background: rgba(99,84,165,0.08);
  color: var(--mg-purple-deep, #3D2D8C);
}
.mg-nav-link .caret {
  width: 10px; height: 10px;
  transition: transform 0.2s;
}
.mg-nav-link[aria-expanded="true"] .caret { transform: rotate(180deg); }

/* CTA cluster */
.mg-nav-cta { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.mg-nav-cta .mg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.mg-nav-cta .mg-btn-ghost {
  color: var(--mg-header, #2A1B4F);
  background: transparent;
}
.mg-nav-cta .mg-btn-ghost:hover { background: rgba(99,84,165,0.08); }
.mg-nav-cta .mg-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #E879C2 0%, #6354A5 100%);
  box-shadow: 0 4px 14px -4px rgba(99,84,165,0.45);
}
.mg-nav-cta .mg-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -4px rgba(99,84,165,0.5);
}

/* Hamburger (mobile only) */
.mg-burger {
  display: none;
  width: 44px; height: 44px;
  border: 0; background: transparent;
  border-radius: 12px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}
.mg-burger:hover { background: rgba(99,84,165,0.08); }
.mg-burger svg { width: 22px; height: 22px; color: var(--mg-header, #2A1B4F); }

/* ============================================================
   MEGA MENU (desktop)
   ============================================================ */
.mg-mega {
  position: fixed;
  top: 78px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  width: min(960px, calc(100vw - 32px));
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(99,84,165,0.08),
    0 30px 80px -20px rgba(42,27,79,0.25),
    0 12px 30px -10px rgba(232,121,194,0.18);
  padding: 28px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 199;
}
.mg-mega.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.mg-mega-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}
.mg-mega-feature {
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(135deg, rgba(232,121,194,0.10) 0%, rgba(99,84,165,0.10) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s;
}
.mg-mega-feature:hover { transform: translateY(-2px); }
.mg-mega-feature .eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mg-purple-deep, #3D2D8C);
  margin-bottom: 8px;
}
.mg-mega-feature h4 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--mg-header, #2A1B4F);
  margin: 0 0 8px;
  line-height: 1.05;
}
.mg-mega-feature p {
  font-size: 13px;
  color: var(--mg-body, #5A4E7A);
  margin: 0;
  line-height: 1.5;
}
.mg-mega-feature .arrow {
  margin-top: 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mg-purple-deep, #3D2D8C);
  display: inline-flex; align-items: center; gap: 4px;
}

.mg-mega-col h5 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mg-body, #5A4E7A);
  margin: 0 0 12px;
}
.mg-mega-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mg-mega-col a {
  display: block;
  padding: 8px 10px;
  margin-left: -10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--mg-header, #2A1B4F);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.mg-mega-col a:hover {
  background: rgba(99,84,165,0.06);
  color: var(--mg-purple-deep, #3D2D8C);
}
.mg-mega-col a small {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--mg-body, #5A4E7A);
  margin-top: 2px;
}

/* ============================================================
   MOBILE DRAWER
   ============================================================ */
.mg-drawer {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mg-drawer.open { transform: translateX(0); }
.mg-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(99,84,165,0.08);
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 2;
}
.mg-drawer-close {
  width: 44px; height: 44px;
  border: 0; background: transparent;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mg-drawer-close:hover { background: rgba(99,84,165,0.08); }
.mg-drawer-close svg { width: 22px; height: 22px; color: var(--mg-header, #2A1B4F); }

.mg-drawer-body { padding: 12px 20px 32px; }
.mg-drawer-section {
  border-bottom: 1px solid rgba(99,84,165,0.08);
}
.mg-drawer-section:last-of-type { border-bottom: 0; }
.mg-drawer-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 4px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 600;
  color: var(--mg-header, #2A1B4F);
  list-style: none;
  user-select: none;
  min-height: 44px;
}
.mg-drawer-summary::-webkit-details-marker { display: none; }
.mg-drawer-summary .chev {
  transition: transform 0.2s;
}
details[open] .mg-drawer-summary .chev { transform: rotate(180deg); }

.mg-drawer-section a.mg-drawer-link {
  display: block;
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--mg-header, #2A1B4F);
  text-decoration: none;
  min-height: 44px;
}

.mg-drawer-sublist {
  list-style: none;
  margin: 0 0 16px;
  padding: 0 0 0 4px;
  display: grid;
  gap: 2px;
}
.mg-drawer-sublist a {
  display: block;
  padding: 12px 12px;
  margin-left: -8px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--mg-header, #2A1B4F);
  text-decoration: none;
  min-height: 44px;
}
.mg-drawer-sublist a small {
  display: block;
  font-size: 13px;
  font-weight: 400;
  color: var(--mg-body, #5A4E7A);
  margin-top: 2px;
}
.mg-drawer-sublist a:active { background: rgba(99,84,165,0.06); }

.mg-drawer-cta {
  margin-top: 24px;
  display: grid;
  gap: 10px;
}
.mg-drawer-cta .mg-btn {
  display: block;
  text-align: center;
  padding: 16px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}
.mg-drawer-cta .mg-btn-ghost {
  color: var(--mg-header, #2A1B4F);
  background: rgba(99,84,165,0.06);
}
.mg-drawer-cta .mg-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #E879C2 0%, #6354A5 100%);
  box-shadow: 0 8px 20px -4px rgba(99,84,165,0.4);
}

.mg-scrim {
  position: fixed;
  inset: 0;
  background: rgba(42,27,79,0.4);
  backdrop-filter: blur(4px);
  z-index: 198;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.mg-scrim.open { opacity: 1; pointer-events: auto; }

/* Lock body scroll when drawer open */
body.mg-nav-locked { overflow: hidden; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
  .mg-nav-links,
  .mg-nav-cta { display: none; }
  .mg-burger { display: inline-flex; }
  .mg-nav.scrolled .mg-nav-shell {
    padding: 8px 8px 8px 16px;
  }
}

@media (min-width: 961px) {
  .mg-drawer, .mg-scrim { display: none; }
}

/* ============================================================
   STICKY MOBILE APP CTA — high-conversion bottom bar
   Only shown on mobile, only when scrolled past hero, dismissible
   ============================================================ */
.mg-app-cta {
  position: fixed;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 150;
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 14px;
  background: #fff;
  border-radius: 18px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.9) inset,
    0 0 0 1px rgba(99,84,165,0.12),
    0 18px 50px -10px rgba(42,27,79,0.35),
    0 6px 20px -4px rgba(232,121,194,0.25);
  transform: translateY(120%);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.mg-app-cta.show { transform: translateY(0); }
.mg-app-cta-icon {
  width: 44px; height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #E879C2, #6354A5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.mg-app-cta-icon img {
  width: 30px; height: 30px;
  filter: brightness(0) invert(1);
}
.mg-app-cta-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mg-app-cta-text strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--mg-header, #2A1B4F);
  line-height: 1.1;
}
.mg-app-cta-text span {
  font-size: 12px;
  color: var(--mg-body, #5A4E7A);
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mg-app-cta-text .stars {
  color: #FFB347;
  letter-spacing: -1px;
  font-size: 11px;
}
.mg-app-cta-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #E879C2, #6354A5);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px -2px rgba(99,84,165,0.4);
}
.mg-app-cta-close {
  flex-shrink: 0;
  width: 28px; height: 28px;
  margin-right: -2px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  color: var(--mg-body, #5A4E7A);
  opacity: 0.5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.mg-app-cta-close:hover { opacity: 1; background: rgba(99,84,165,0.08); }
.mg-app-cta-close svg { width: 14px; height: 14px; }

@media (max-width: 720px) {
  .mg-app-cta { display: flex; }
  body.mg-app-cta-on { padding-bottom: 84px; }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .mg-nav, .mg-mega, .mg-drawer, .mg-scrim,
  .mg-nav-link, .mg-nav-cta .mg-btn, .mg-mega-feature,
  .mg-promo, .mg-app-cta {
    transition: none !important;
    animation: none !important;
  }
}

/* ============================================================
   Dark page support — for-pros uses <body class="dark">.
   Keep the white nav pill but adapt link colors if it's transparent.
   ============================================================ */
body.dark .mg-nav-link { color: #2A1B4F; }
body.dark .mg-nav-link:hover,
body.dark .mg-nav-link[aria-expanded="true"] { background: rgba(99,84,165,0.08); }
