/* ==========================================================================
   APEX MEDIA — HEADER & NAVIGATION
   Fixed header, desktop nav, and a full-screen animated mobile menu.
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background 0.4s ease, border-color 0.4s ease, backdrop-filter 0.4s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(14, 16, 23, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 640px)  { .header-inner { padding: 0 2rem; } }
@media (min-width: 1280px) { .header-inner { padding: 0 3rem; } }

.header-logo { display: flex; align-items: center; transition: opacity 0.3s ease, transform 0.3s ease; }
.header-logo:hover { opacity: 0.85; transform: translateY(-1px); }
.header-logo img { height: 2.15rem; width: auto; }

.header-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}
@media (min-width: 1280px) { .header-nav { display: flex; } }
.header-nav a:not(.btn) {
  position: relative;
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-foreground);
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}
.header-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease-smooth);
}
.header-nav a:not(.btn):hover,
.header-nav a.active { color: var(--foreground); }
.header-nav a:not(.btn):hover::after,
.header-nav a.active::after { transform: scaleX(1); }
.header-nav .btn { min-height: 2.5rem; padding: 0.5rem 1.25rem; font-size: 0.6rem; }

.header-progress {
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #6f8db3);
  transition: width 0.12s linear;
  width: 0%;
}

/* ── Hamburger toggle ── */
.mobile-toggle {
  display: flex;
  flex-direction: column;
  gap: 0.36rem;
  align-items: center;
  justify-content: center;
  width: 3.1rem;
  height: 3.1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  z-index: 210;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.mobile-toggle:hover { border-color: var(--border-strong); background: rgba(176,196,222,0.06); }
@media (min-width: 1280px) { .mobile-toggle { display: none; } }
.mobile-toggle span {
  display: block;
  width: 1.35rem;
  height: 2px;
  border-radius: 2px;
  background: var(--foreground);
  transition: transform 0.35s var(--ease-smooth), opacity 0.25s ease, width 0.3s ease;
}
.mobile-toggle span:nth-child(2) { width: 0.9rem; align-self: flex-end; margin-right: 0.55rem; }
.mobile-toggle.open span { background: var(--steel-soft); }
.mobile-toggle.open span:nth-child(1) { transform: translateY(4.2px) rotate(45deg); width: 1.35rem; }
.mobile-toggle.open span:nth-child(2) { transform: translateY(-4.2px) rotate(-45deg); width: 1.35rem; margin-right: 0; align-self: center; }

/* ══════════════════════════════════════════════
   FULL-SCREEN MOBILE MENU — "killer" version
   ══════════════════════════════════════════════ */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(8, 9, 13, 0.88);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.mobile-menu-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(176,196,222,0.14), transparent 60%),
    radial-gradient(50rem 30rem at -10% 110%, rgba(176,196,222,0.08), transparent 60%),
    var(--surface-deep);
  padding: 7.5rem 1.25rem 2rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.55s var(--ease-smooth);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 640px) { .mobile-menu { padding: 8rem 3rem 2.5rem; } }
.mobile-menu.open { transform: translateX(0); }

.mobile-menu .menu-bg-mark {
  position: absolute;
  top: -6rem;
  right: -6rem;
  width: 24rem;
  height: 24rem;
  opacity: 0.05;
  pointer-events: none;
  animation: menu-spin 40s linear infinite;
}
@keyframes menu-spin { to { transform: rotate(360deg); } }

.mobile-menu nav.menu-links { max-width: 46rem; margin: 0 auto; width: 100%; position: relative; }
.mobile-menu nav.menu-links > p {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.25rem;
}
.mobile-menu nav.menu-links ol li {
  border-bottom: 1px solid var(--border);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.5s var(--ease-smooth), transform 0.5s var(--ease-smooth);
}
.mobile-menu.open nav.menu-links ol li { opacity: 1; transform: translateX(0); }
.mobile-menu.open nav.menu-links ol li:nth-child(1)  { transition-delay: 0.08s; }
.mobile-menu.open nav.menu-links ol li:nth-child(2)  { transition-delay: 0.13s; }
.mobile-menu.open nav.menu-links ol li:nth-child(3)  { transition-delay: 0.18s; }
.mobile-menu.open nav.menu-links ol li:nth-child(4)  { transition-delay: 0.23s; }
.mobile-menu.open nav.menu-links ol li:nth-child(5)  { transition-delay: 0.28s; }
.mobile-menu.open nav.menu-links ol li:nth-child(6)  { transition-delay: 0.33s; }
.mobile-menu.open nav.menu-links ol li:nth-child(7)  { transition-delay: 0.38s; }
.mobile-menu.open nav.menu-links ol li:nth-child(8)  { transition-delay: 0.43s; }
.mobile-menu.open nav.menu-links ol li:nth-child(9)  { transition-delay: 0.48s; }

.mobile-menu nav.menu-links ol li a {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0.6rem 0;
  font-size: clamp(1.5rem, 8vw, 2.75rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1;
  color: var(--foreground);
  transition: color 0.3s ease, padding-left 0.3s var(--ease-smooth);
}
.mobile-menu nav.menu-links ol li a:hover,
.mobile-menu nav.menu-links ol li a:focus-visible {
  color: var(--primary);
  padding-left: 0.5rem;
}
.mobile-menu nav.menu-links ol li a.active { color: var(--primary); }
.mobile-menu nav.menu-links ol li a .num {
  width: 2rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--primary);
  flex-shrink: 0;
}
.mobile-menu nav.menu-links ol li a .arrow {
  margin-left: auto;
  font-size: 1.35rem;
  color: var(--primary);
  transition: transform 0.35s var(--ease-smooth);
  flex-shrink: 0;
}
.mobile-menu nav.menu-links ol li a:hover .arrow { transform: translate(0.3rem, -0.3rem) rotate(0deg) scale(1.1); }

.mobile-menu-footer {
  position: relative;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted-foreground);
  max-width: 46rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease 0.4s, transform 0.6s var(--ease-smooth) 0.4s;
}
.mobile-menu.open .mobile-menu-footer { opacity: 1; transform: translateY(0); }
@media (min-width: 640px) { .mobile-menu-footer { grid-template-columns: 1fr 1fr; } }
.mobile-menu-footer a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  transition: color 0.3s ease;
}
.mobile-menu-footer a:hover { color: var(--primary); }
.mobile-menu-footer .socials { grid-column: 1 / -1; display: flex; gap: 1rem; padding-top: 0.75rem; }
.mobile-menu-footer .socials a {
  width: 2.75rem; height: 2.75rem; min-height: auto;
  border: 1px solid var(--border-strong); border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
}
.mobile-menu-footer .socials a:hover { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

body.menu-open { overflow: hidden; }
