/* =====================================================
   Prepzfy — Mobile Menu (editorial takeover style)
   Shared across all pages. Single source of truth.
   ===================================================== */

/* === Burger button === */
.mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  position: relative;
  z-index: 1001;
  transition: border-color 0.25s, background 0.25s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-toggle:hover,
.mobile-toggle:focus-visible {
  border-color: rgba(37, 99, 196, 0.5);
  background: rgba(37, 99, 196, 0.04);
}
.mobile-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: #E8ECF3;
  border-radius: 2px;
  transition: transform 0.35s cubic-bezier(0.65, 0, 0.35, 1),
              opacity 0.25s ease;
}
.mobile-toggle.open {
  border-color: rgba(37, 99, 196, 0.5);
  background: rgba(37, 99, 196, 0.06);
}
.mobile-toggle.open span:nth-child(1) {
  transform: translateY(3.75px) rotate(45deg);
}
.mobile-toggle.open span:nth-child(2) {
  transform: translateY(-3.75px) rotate(-45deg);
}

@media (max-width: 900px) {
  .mobile-toggle { display: inline-flex; }
}

/* === Mobile menu overlay === */
.mobile-menu {
  display: block; /* override any legacy inline rules that set display:none */
  position: fixed;
  inset: 0;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(28px) saturate(1.6);
  -webkit-backdrop-filter: blur(28px) saturate(1.6);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              visibility 0.4s;
  overflow-y: auto;
  overscroll-behavior: contain;
  pointer-events: none;
}
.mobile-menu.open {
  pointer-events: auto;
}
.mobile-menu.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* fine gold accent line at top — masthead signature */
.mobile-menu::before {
  content: "";
  position: absolute;
  top: 0;
  left: 30%;
  right: 30%;
  height: 1px;
  background: linear-gradient(90deg, transparent, #d4a537, transparent);
  opacity: 0.6;
}

.mobile-menu-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 22px 28px 36px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* === Header : logo + close === */
.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mobile-menu-header .logo {
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: #E8ECF3;
  text-decoration: none;
  display: inline-flex;
  align-items: baseline;
}
.mobile-menu-header .logo .fy {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 400;
  color: #2563C4;
  letter-spacing: 0;
}
.mobile-menu-close {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 50%;
  color: #E8ECF3;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, transform 0.35s;
  -webkit-tap-highlight-color: transparent;
}
.mobile-menu-close:hover,
.mobile-menu-close:focus-visible {
  border-color: #2563C4;
  color: #2563C4;
  transform: rotate(90deg);
}
.mobile-menu-close svg {
  width: 18px;
  height: 18px;
}

/* === Nav list (TOC style) === */
.mobile-menu-list {
  display: flex;
  flex-direction: column;
  padding: 34px 0 24px;
  flex-grow: 1;
}
.mobile-menu-item {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  color: #c0c9d6;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
              color 0.2s ease;
}
.mobile-menu.open .mobile-menu-item {
  opacity: 1;
  transform: translateY(0);
}
.mobile-menu.open .mobile-menu-item:nth-child(1) { transition-delay: 0.10s; }
.mobile-menu.open .mobile-menu-item:nth-child(2) { transition-delay: 0.16s; }
.mobile-menu.open .mobile-menu-item:nth-child(3) { transition-delay: 0.22s; }
.mobile-menu.open .mobile-menu-item:nth-child(4) { transition-delay: 0.28s; }
.mobile-menu.open .mobile-menu-item:nth-child(5) { transition-delay: 0.34s; }
.mobile-menu.open .mobile-menu-item:nth-child(6) { transition-delay: 0.40s; }
.mobile-menu.open .mobile-menu-item:nth-child(7) { transition-delay: 0.46s; }

.mobile-menu-item:hover,
.mobile-menu-item:active,
.mobile-menu-item:focus-visible {
  color: #E8ECF3;
}
.mobile-menu-item.active {
  color: #E8ECF3;
}
.mobile-menu-item.active .mobile-menu-label::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2563C4;
  margin-left: 12px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(37, 99, 196, 0.5);
}

.mobile-menu-number {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 400;
  color: #2563C4;
  font-size: 13px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  min-width: 26px;
  padding-top: 8px;
  opacity: 0.85;
}
.mobile-menu-label {
  flex-grow: 1;
}
/* Live signal on the Jobs item · green board identity */
.mobile-menu-live {
  flex-shrink: 0;
  align-self: center;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34b27b;
  box-shadow: 0 0 0 0 rgba(52, 178, 123, 0.5);
  animation: menuJobsPulse 2s infinite;
}
@keyframes menuJobsPulse {
  0%   { box-shadow: 0 0 0 0 rgba(52, 178, 123, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(52, 178, 123, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 178, 123, 0); }
}

/* === Footer: contact + CTA === */
.mobile-menu-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}
.mobile-menu.open .mobile-menu-footer { opacity: 1; }

.mobile-menu-contact {
  font-size: 13px;
  color: #8A97AC;
  letter-spacing: 0.01em;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-contact-label {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  color: #5a6578;
  font-size: 12px;
}
.mobile-menu-contact a {
  color: #c0c9d6;
  text-decoration: none;
  transition: color 0.2s;
  font-weight: 500;
}
.mobile-menu-contact a:hover { color: #E8ECF3; }

.mobile-menu-cta {
  width: 100%;
  justify-content: center;
  padding: 15px 20px !important;
  font-size: 15px !important;
  min-height: 50px !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  color: white;
  background: #2563C4;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 10px 30px -10px rgba(37, 99, 196, 0.5);
  transition: background 0.2s, transform 0.2s;
}
.mobile-menu-cta:hover {
  background: #1d52a8;
  transform: translateY(-1px);
}
.mobile-menu-cta .logo-inline {
  font-weight: 800;
  color: inherit;
}
.mobile-menu-cta .logo-inline .fy {
  font-family: "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.92);
}

/* === Body scroll lock === */
body.menu-open {
  overflow: hidden;
}

/* === Reduced motion === */
@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu-item,
  .mobile-menu-footer,
  .mobile-toggle span,
  .mobile-menu-close { transition: none !important; }
}
