/* Header & Navbar — Arkanis RSPS */
:root {
  --header-height: 68px;
  --container-max-width: 1340px;
  --steel: #997a7a;
  --stone-shadow: 0 2px 16px 0 rgba(0,0,0,0.7);
  --white: #f8fafc;
  --turquoise: #c1121f;
  --bg-900: #0c0808;
  --glow-gradient: linear-gradient(90deg, #e63946 0%, #c1121f 100%);
  --font-display: 'Poppins', 'Segoe UI', Arial, sans-serif;
}

/* === HEADER SHELL === */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(12,8,8,0.97);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(153,122,122,0.35);
  z-index: 1000;
  transition: box-shadow 250ms;
  box-shadow: var(--stone-shadow);
}

.header-content.split-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 clamp(1rem, 3vw, 2.5rem);
  position: relative;
}

/* === NAV HALVES === */
.nav-left,
.nav-right {
  flex: 1;
  display: flex;
  align-items: center;
}
.nav-left  { justify-content: flex-end; }
.nav-right { justify-content: flex-start; }

/* === LOGO === */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  z-index: 2;
  padding: 0 clamp(1rem, 3vw, 3rem);
  text-decoration: none;
}
.logo-img {
  height: clamp(52px, 8vh, 100px);
  width: auto;
  transition: filter 0.25s cubic-bezier(.4,0,.2,1);
  display: block;
}
.logo:hover .logo-img {
  filter: brightness(1.18) contrast(1.08) drop-shadow(0 0 8px rgba(230,57,70,0.5));
}

/* === NAV LINKS === */
.nav-list {
  display: flex;
  align-items: center;
  gap: clamp(1.2rem, 2.5vw, 3rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-link {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.85rem, 1.1vw, 1.05rem);
  padding: 0.4rem 0.1rem;
  position: relative;
  transition: color 220ms cubic-bezier(.4,0,.2,1);
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.nav-link::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 100%;
  height: 2px;
  background: var(--glow-gradient);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.28s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.nav-link.active,
.nav-link:hover,
.nav-link:focus {
  color: #ff6b6b;
}
.nav-link:hover::after,
.nav-link.active::after,
.nav-link:focus::after {
  transform: scaleX(1);
}

/* === HAMBURGER BUTTON === */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1100;
  flex-shrink: 0;
  border-radius: 6px;
  transition: background 180ms;
}
.mobile-menu-toggle:hover {
  background: rgba(230,57,70,0.1);
}
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.25s, background 180ms;
}
.mobile-menu-toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: #e63946;
}
.mobile-menu-toggle.is-active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.mobile-menu-toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: #e63946;
}

/* === MOBILE NAV OVERLAY (injected by nav.js) === */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--header-height);
  background: rgba(8,4,4,0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.mobile-nav.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2rem);
  padding: 1rem 2rem;
  width: 100%;
  text-align: center;
  transition: color 200ms, background 200ms;
  border-bottom: 1px solid rgba(153,122,122,0.15);
  letter-spacing: 0.04em;
}
.mobile-nav a:first-child {
  border-top: 1px solid rgba(153,122,122,0.15);
}
.mobile-nav a:hover,
.mobile-nav a.active {
  color: #e63946;
  background: rgba(230,57,70,0.07);
}

/* === 4K / LARGE DISPLAY SCALING === */
@media (min-width: 1920px) {
  :root {
    --header-height: 78px;
    --container-max-width: 1600px;
  }
  .nav-link { font-size: 1.1rem; }
}
@media (min-width: 2560px) {
  :root {
    --header-height: 90px;
    --container-max-width: 2000px;
  }
  .nav-link { font-size: 1.2rem; }
  .logo-img { height: 120px; }
}

/* === TABLET (≤1024px) === */
@media (max-width: 1024px) {
  .nav-list { gap: clamp(0.8rem, 2vw, 1.8rem); }
  .logo { padding: 0 clamp(0.5rem, 2vw, 2rem); }
}

/* === MOBILE (≤768px) === */
@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .nav-left,
  .nav-right {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .mobile-nav {
    display: flex;
  }
  .logo {
    padding: 0 0.75rem;
    flex: 1;
    justify-content: center;
  }
  .header-content.split-nav {
    padding: 0 0.75rem;
    justify-content: space-between;
  }
}

/* === SMALL MOBILE (≤480px) === */
@media (max-width: 480px) {
  :root { --header-height: 56px; }
  .logo-img { height: 42px; }
  .mobile-nav a { font-size: 1.3rem; padding: 0.85rem 1.5rem; }
}
