/* Mobile navigation for renotechtools.com (shown below 1280px).
   Plain CSS on purpose: the Tailwind build only scans *.html, so classes created by
   mobile-nav.js would otherwise be missing from assets/styles.css. */

.mnav-btn {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin-left: 4px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.9);
  color: #0f172a;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.mnav-btn:hover {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.25);
}

.mnav-btn:active {
  transform: scale(0.94);
}

.mnav-btn:focus-visible {
  outline: 2px solid oklch(var(--p, 0.58 0.2 255));
  outline-offset: 2px;
}

/* Two thin bars that morph into an X. */
.mnav-bar {
  position: absolute;
  left: 13px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.28s cubic-bezier(0.2, 0.8, 0.2, 1), top 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mnav-bar:nth-child(1) {
  top: 16px;
}

.mnav-bar:nth-child(2) {
  top: 25px;
}

.mnav-btn[aria-expanded="true"] .mnav-bar:nth-child(1) {
  top: 20.5px;
  transform: rotate(45deg);
}

.mnav-btn[aria-expanded="true"] .mnav-bar:nth-child(2) {
  top: 20.5px;
  transform: rotate(-45deg);
}

.mnav-backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(15, 23, 42, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.mnav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 12px 16px 20px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0 0 24px 24px;
  box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
}

.mnav-open .mnav-backdrop {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.mnav-open .mnav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

.mnav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mnav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-radius: 14px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: #0f172a;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.15s ease;
}

.mnav-link:hover,
.mnav-link:focus-visible {
  background: rgba(1, 84, 98, 0.08);
  outline: none;
}

.mnav-link[aria-current="page"] {
  background: rgba(1, 84, 98, 0.1);
  color: #015462;
}

.mnav-chevron {
  flex: none;
  width: 18px;
  height: 18px;
  opacity: 0.4;
}

.mnav-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.mnav-cta a {
  display: inline-flex !important;
  width: 100%;
  justify-content: center;
}

/* Subtle stagger when the panel opens. */
.mnav-open .mnav-list li,
.mnav-open .mnav-cta a {
  animation: mnav-in 0.3s ease both;
  animation-delay: calc(var(--i, 0) * 35ms);
}

@keyframes mnav-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1279.98px) {
  .mnav-btn {
    display: inline-block;
  }

  /* The full horizontal menu only appears when it fits; below this width the hamburger is used. */
  header .navbar-center {
    display: none !important;
  }
}

@media (max-width: 639.98px) {
  /* Secondary header buttons live inside the menu panel on phones. */
  .navbar-end a[data-track="nav-talk-to-sales"],
  .navbar-end a[data-track="nav-app-store"] {
    display: none !important;
  }
}

@media (min-width: 1280px) {

  .mnav-btn,
  .mnav-panel,
  .mnav-backdrop {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {

  .mnav-bar,
  .mnav-panel,
  .mnav-backdrop,
  .mnav-btn {
    transition: none;
  }

  .mnav-open .mnav-list li,
  .mnav-open .mnav-cta a {
    animation: none;
  }
}

/* Keep the logo and menu labels on one line at every width. */
header .navbar-start a,
header .menu a {
  white-space: nowrap;
}

/* On mid-width desktops there is no room for the App Store button in the bar (it is also in the hero). */
@media (min-width: 1280px) and (max-width: 1535.98px) {
  .navbar-end a[data-track="nav-app-store"] {
    display: none !important;
  }
}
