/*
 * StartUpStars — Mobile menu overlay
 *
 * Dropped in on top of every page. Triggers when `.nav-menu-btn` is clicked
 * and `html.mobile-menu-open` is set.
 */

/* ── Hamburger nav button for mobile ── */
@media (max-width: 900px) {
  .nav-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    min-height: 42px;
    padding: 0 !important;
    font-size: 0 !important;             /* hide any existing "Menü" text */
    color: transparent !important;       /* also hide text */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    cursor: pointer;
    position: relative;
    transition: border-color 250ms cubic-bezier(0.23, 1, 0.32, 1),
                background 250ms cubic-bezier(0.23, 1, 0.32, 1),
                transform 160ms;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    overflow: visible;
  }
  .nav.scrolled .nav-menu-btn {
    background: transparent;
    border-color: rgba(0, 0, 0, 0.14);
  }
  .nav-menu-btn:hover { border-color: rgba(255, 255, 255, 0.3); }
  .nav.scrolled .nav-menu-btn:hover { border-color: rgba(0, 0, 0, 0.25); }
  .nav-menu-btn:active { transform: scale(0.92); }

  /* Hamburger icon: 3 lines wrapped in a box */
  .nav-menu-btn .hamburger-lines {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 12px;
    transform: translate(-50%, -50%);
    display: block;
    pointer-events: none;
  }
  .nav-menu-btn .hamburger-lines span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: #fff;
    border-radius: 1px;
    transform-origin: center;
    transition: transform 320ms cubic-bezier(0.23, 1, 0.32, 1),
                opacity 200ms cubic-bezier(0.23, 1, 0.32, 1),
                top 320ms cubic-bezier(0.23, 1, 0.32, 1);
  }
  .nav-menu-btn .hamburger-lines span:nth-child(1) { top: 0; }
  .nav-menu-btn .hamburger-lines span:nth-child(2) { top: 50%; transform: translateY(-50%); }
  .nav-menu-btn .hamburger-lines span:nth-child(3) { top: 100%; transform: translateY(-100%); }

  .nav.scrolled .nav-menu-btn .hamburger-lines span { background: var(--dark, #0a0a0f); }

  /* Open state: morph to X */
  html.mobile-menu-open .nav-menu-btn .hamburger-lines span:nth-child(1) {
    top: 50%;
    transform: translateY(-50%) rotate(45deg);
  }
  html.mobile-menu-open .nav-menu-btn .hamburger-lines span:nth-child(2) {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
  }
  html.mobile-menu-open .nav-menu-btn .hamburger-lines span:nth-child(3) {
    top: 50%;
    transform: translateY(-50%) rotate(-45deg);
  }

  /* When open: always show white lines regardless of scrolled state */
  html.mobile-menu-open .nav-menu-btn .hamburger-lines span { background: #fff; }

  /* Hide desktop nav links on mobile across all pages */
  .nav-links {
    display: none !important;
  }
}

/* When menu is open, float the button ABOVE the overlay so user can close it */
@media (max-width: 900px) {
  /* When menu is open: hide the original nav button, show a dedicated close button */
  html.mobile-menu-open .nav-menu-btn {
    opacity: 0;
    pointer-events: none;
  }
}

.sus-mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 400ms cubic-bezier(0.23, 1, 0.32, 1),
              visibility 400ms cubic-bezier(0.23, 1, 0.32, 1);
}

html.mobile-menu-open .sus-mobile-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

html.mobile-menu-open {
  overflow: hidden;
}

.sus-mobile-menu__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 6rem 2rem 2.5rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Close button inside the overlay — hamburger morphed to X */
.sus-mobile-menu__close {
  position: absolute;
  top: 1.35rem;
  right: 1.35rem;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  transition: all 250ms cubic-bezier(0.23, 1, 0.32, 1);
}
.sus-mobile-menu__close:hover { border-color: rgba(255, 255, 255, 0.4); }
.sus-mobile-menu__close:active { transform: scale(0.92); }
.sus-mobile-menu__close::before,
.sus-mobile-menu__close::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  background: #fff;
  border-radius: 1px;
  transform-origin: center;
}
.sus-mobile-menu__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.sus-mobile-menu__close::after  { transform: translate(-50%, -50%) rotate(-45deg); }

.sus-mobile-menu__close {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.sus-mobile-menu__close:hover { background: rgba(255, 255, 255, 0.12); }
.sus-mobile-menu__close:active { transform: scale(0.94); }
.sus-mobile-menu__close svg { width: 18px; height: 18px; stroke-width: 1.8; }

.sus-mobile-menu__links {
  list-style: none;
  margin: auto 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sus-mobile-menu__links li {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 520ms cubic-bezier(0.23, 1, 0.32, 1),
              transform 520ms cubic-bezier(0.23, 1, 0.32, 1);
}

html.mobile-menu-open .sus-mobile-menu__links li {
  opacity: 1;
  transform: translateY(0);
}

html.mobile-menu-open .sus-mobile-menu__links li:nth-child(1) { transition-delay: 100ms; }
html.mobile-menu-open .sus-mobile-menu__links li:nth-child(2) { transition-delay: 150ms; }
html.mobile-menu-open .sus-mobile-menu__links li:nth-child(3) { transition-delay: 200ms; }
html.mobile-menu-open .sus-mobile-menu__links li:nth-child(4) { transition-delay: 250ms; }
html.mobile-menu-open .sus-mobile-menu__links li:nth-child(5) { transition-delay: 300ms; }
html.mobile-menu-open .sus-mobile-menu__links li:nth-child(6) { transition-delay: 350ms; }
html.mobile-menu-open .sus-mobile-menu__links li:nth-child(7) { transition-delay: 400ms; }

.sus-mobile-menu__links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 1.1rem 1.25rem;
  font-family: 'Outfit', -apple-system, sans-serif;
  font-size: 1.75rem;
  font-weight: 300;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  letter-spacing: -0.01em;
  transition: color 300ms cubic-bezier(0.23, 1, 0.32, 1),
              padding-left 300ms cubic-bezier(0.23, 1, 0.32, 1);
}
.sus-mobile-menu__links a:hover,
.sus-mobile-menu__links a:active {
  color: #7ebec5;
  padding-left: 1.75rem;
}
.sus-mobile-menu__links a::after {
  content: '\2192';
  color: rgba(126, 190, 197, 0.45);
  font-size: 1.1rem;
  transition: transform 300ms cubic-bezier(0.23, 1, 0.32, 1), color 300ms;
}
.sus-mobile-menu__links a:hover::after,
.sus-mobile-menu__links a:active::after {
  color: #7ebec5;
  transform: translateX(4px);
}
.sus-mobile-menu__links li.active a {
  color: #7ebec5;
}

.sus-mobile-menu__footer {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  font-family: 'Outfit', -apple-system, sans-serif;
}
.sus-mobile-menu__footer a {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.sus-mobile-menu__footer a:hover { color: #7ebec5; }

/* Hide mobile menu entirely on desktop */
@media (min-width: 901px) {
  .sus-mobile-menu { display: none; }
}

@media (max-width: 480px) {
  .sus-mobile-menu__links a { font-size: 1.45rem; padding: 1rem 1rem; }
  .sus-mobile-menu__inner { padding: 5rem 1.5rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .sus-mobile-menu,
  .sus-mobile-menu__links li,
  .sus-mobile-menu__links a { transition: none !important; }
}
