/* Shared sub-page top navigation — mirrors the landing page topbar.
   Brand (left) + "Join Waitlist" pill + hamburger dropdown (right), at all sizes.
   Depends on legal.css only for the page body; this file owns the nav. */

.subnav-topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 20px clamp(20px, 4vw, 56px);
  background: linear-gradient(180deg, rgba(3, 3, 5, .66), rgba(3, 3, 5, .16) 72%, rgba(3, 3, 5, 0));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.subnav-topbar .brand {
  display: inline-flex;
  align-items: center;
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.subnav-topbar .brand::after {
  content: "TM";
  position: absolute;
  top: -1px;
  right: -13px;
  color: rgba(255, 253, 248, .84);
  font-size: 6.5px;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 800;
  letter-spacing: .015em;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .4);
  transform: scale(1.14, .88);
  transform-origin: left top;
}

.subnav-topbar .atula-logo-wordmark {
  display: block;
  height: 26px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 18px rgba(244, 123, 194, .22));
}

.subnav-right {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
}

.subnav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.5vw, 42px);
}

.subnav-links a {
  color: rgba(255, 253, 248, .82);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.subnav-links a:hover,
.subnav-links a[aria-current="page"] { color: #fff; }

.subnav-waitlist {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .52);
  border-radius: 999px;
  padding: 11px 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .035));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .58),
    inset 0 -1px 0 rgba(255, 255, 255, .14),
    0 9px 24px rgba(0, 0, 0, .1);
  backdrop-filter: blur(9px) saturate(150%) brightness(1.06);
  -webkit-backdrop-filter: blur(9px) saturate(150%) brightness(1.06);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.subnav-waitlist::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% -20%, rgba(255, 255, 255, .48), transparent 43%),
    radial-gradient(circle at 86% 130%, rgba(155, 221, 255, .14), transparent 46%),
    linear-gradient(112deg, rgba(255, 255, 255, .08), transparent 40%, rgba(255, 255, 255, .05));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .12),
    inset 8px 10px 22px rgba(255, 255, 255, .08);
}

.subnav-waitlist > span { position: relative; z-index: 1; }

.subnav-waitlist:hover {
  transform: translateY(-1px) scale(1.012);
  background: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .075));
}

.subnav-waitlist:active { transform: scale(.985); }

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 50%;
  padding: 10px;
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .035));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .52), 0 9px 24px rgba(0, 0, 0, .1);
  backdrop-filter: blur(9px) saturate(150%);
  -webkit-backdrop-filter: blur(9px) saturate(150%);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 17px;
  height: 1.5px;
  margin: 3px auto;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }

.subnav-menu {
  position: fixed;
  top: 70px;
  right: 14px;
  z-index: 80;
  display: none;
  width: min(240px, calc(100vw - 28px));
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 20px;
  padding: 8px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, .2), transparent 42%),
    linear-gradient(145deg, rgba(25, 19, 36, .82), rgba(8, 8, 15, .72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), 0 24px 64px rgba(0, 0, 0, .5);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}

.subnav-menu.open { display: grid; }

.subnav-menu a {
  border: 0;
  border-radius: 10px;
  padding: 12px 13px;
  color: rgba(255, 253, 248, .86);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  background: transparent;
}

.subnav-menu a:hover { background: rgba(255, 253, 248, .08); color: #fff; }

.subnav-menu a[aria-current="page"] {
  color: #fff;
  background: rgba(155, 85, 255, .16);
}

@media (max-width: 900px) {
  .subnav-links { display: none; }
  .menu-toggle { display: block; width: 36px; height: 36px; padding: 9px; }
  .subnav-right { gap: 10px; }
  .subnav-topbar { gap: 10px; padding: calc(12px + env(safe-area-inset-top)) 14px 12px; }
  .subnav-topbar .atula-logo-wordmark { height: 20px; }
  .subnav-topbar .brand::after { top: -1px; right: -11px; font-size: 6px; }
  .subnav-waitlist { padding: 9px 13px; font-size: 12px; white-space: nowrap; }
  .subnav-menu { top: 60px; }
}
