/* ========== Header / Nav ========== */
header.site {
  background: var(--bg-1);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 44px; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(11, 13, 14, 0.92);
}
.nav-row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 32px;
  align-items: center; height: 88px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo { height: 60px; width: auto; filter: drop-shadow(0 0 24px rgba(196,255,61,0.06)); }
nav.primary ul {
  display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; justify-content: center;
}
nav.primary a {
  font-family: 'Oswald', sans-serif;
  text-transform: uppercase; letter-spacing: 0.14em;
  font-size: 16px; font-weight: 500;
  padding: 12px 16px; color: var(--ink-soft);
  position: relative; transition: 0.2s var(--ease);
}
nav.primary a:hover { color: var(--acid); }
nav.primary a::after {
  content:""; position: absolute;
  left: 16px; right: 16px; bottom: 6px; height: 1px;
  background: var(--acid);
  transform: scaleX(0); transform-origin: left; transition: 0.3s var(--ease);
}
nav.primary a:hover::after { transform: scaleX(1); }

/* ========== Responsive: Header & Utility Bar ========== */

@media (max-width: 1100px) {
  .nav-row { 
    grid-template-columns: auto 1fr auto; 
    gap: 16px; 
  }
  nav.primary { 
    display: none; 
  }
}

@media (max-width: 640px) {
  .util-bar { 
    position: static; 
  }
  .util-bar .wrap { 
    flex-direction: column; 
    height: auto; 
    padding: 10px 24px; 
    gap: 8px; 
  }
  .util-left { 
    flex-wrap: wrap; 
    gap: 12px; 
    display: none;
  }
  header.site { 
    top: 0; 
  }
}






/* ========================================================= */
/* Mobile Menu & Hamburger Styles                            */
/* ========================================================= */

/* Desktop State: Group the CTA and Toggle, but hide the Toggle */
.nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}
.mobile-toggle {
  display: none;
}

/* Mobile & Tablet State: 1100px and below */
@media (max-width: 1100px) {
  /* Show and style the hamburger */
  .mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: var(--bg-2);
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    cursor: pointer;
    z-index: 101; /* Keep above the open menu */
    transition: 0.2s var(--ease);
  }
  .mobile-toggle:hover {
    border-color: var(--acid);
  }
  .mobile-toggle .line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
    transform-origin: center;
  }

  /* Hamburger Active State (Turns into an X) */
  .mobile-toggle.is-active {
    border-color: var(--acid);
  }
  .mobile-toggle.is-active .line {
    background: var(--acid);
  }
  .mobile-toggle.is-active .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .mobile-toggle.is-active .line:nth-child(2) {
    opacity: 0;
  }
  .mobile-toggle.is-active .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Override the old "display: none" for the nav */
  nav.primary {
    display: block !important;
    position: fixed;
    top: 0;
    right: -100%; /* Hidden off-screen by default */
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg-0);
    border-left: 1px solid var(--line);
    z-index: 100;
    padding: 120px 40px 40px; /* Push links down below header */
    transition: right 0.4s var(--ease), box-shadow 0.4s var(--ease);
    overflow-y: auto;
  }

  /* Nav Open State */
  nav.primary.is-open {
    right: 0;
    box-shadow: -20px 0 80px rgba(0,0,0,0.6);
  }

  /* Reformat the links for mobile */
  nav.primary ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }
  nav.primary a {
    font-size: 20px;
    padding: 0;
  }
}

/* Very Small Screens: Adjust button padding to prevent overlap */
@media (max-width: 640px) {
  .nav-actions {
    gap: 12px;
  }
  .nav-actions .btn {
    padding: 12px 16px;
    font-size: 14px;
    display: none;
  }
}

/* Mobile & Tablet State: 1100px and below */
@media (max-width: 1100px) {
  
  /* ... [Keep your .mobile-toggle styles exactly as they are] ... */

  /* The Fix: Pop-up Dropdown Menu */
  nav.primary {
    display: block !important;
    position: absolute;
    top: 100%; /* Positions it immediately below the bottom edge of the header */
    left: 0;
    width: 100%;
    max-width: none;
    height: auto; /* Lets the menu hug the links rather than filling the screen */
    background: var(--bg-1); /* Matches the header color */
    border-top: 1px solid var(--line-strong);
    border-bottom: 1px solid var(--line-strong);
    z-index: 99;
    padding: 32px 28px;
    
    /* Initial Hidden State: Faded out and bumped slightly up */
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
  }

  /* Pop-up Open State */
  nav.primary.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0); /* Drops into place */
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  }

  /* Center the links for a clean pop-up look */
  nav.primary ul {
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  
  nav.primary a {
    font-size: 20px;
    padding: 0;
  }
}