/* Public Header 042 — final convergence layer for Forge, tools and demos.
   Loaded after the page-specific sheets so one shared navigation always keeps
   the same hierarchy, proportions and Obsidian-Glass treatment. */
.site-header {
  min-height: 74px;
  gap: 16px;
  padding-inline: clamp(16px, 2.2vw, 38px);
  border-bottom-color: rgba(255, 196, 0, 0.2);
  background:
    linear-gradient(90deg, rgba(2, 3, 2, 0.96), rgba(8, 10, 6, 0.9), rgba(2, 3, 2, 0.96));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3), inset 0 -1px rgba(162, 255, 19, 0.035);
}

.brand {
  grid-template-columns: 62px minmax(0, auto);
  column-gap: 12px;
}

.brand > img {
  width: 62px;
  filter: drop-shadow(0 0 18px rgba(255, 196, 0, 0.24));
}

.brand small {
  font-size: 11px;
  letter-spacing: 0.18em;
}

.main-nav {
  gap: clamp(10px, 1.4vw, 22px);
}

.main-nav > a,
.nav-group > button {
  font-size: 12px;
  letter-spacing: 0.095em;
}

.header-actions {
  gap: 12px;
}

@media (min-width: 1181px) and (max-width: 1350px) {
  .site-header {
    gap: 12px;
    padding-inline: clamp(18px, 1.8vw, 28px);
  }

  .brand {
    grid-template-columns: 54px minmax(0, auto);
    column-gap: 10px;
  }

  .brand > img {
    width: 54px;
  }

  .main-nav {
    gap: clamp(11px, 1.05vw, 14px);
  }

  .main-nav > a,
  .nav-group > button {
    font-size: 11px;
    letter-spacing: 0.075em;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .portal-btn,
  .header-actions .gold-btn {
    padding-inline: 14px;
  }
}

@media (max-width: 1180px) {
  .site-header {
    grid-template-columns: auto auto 1fr;
  }

  .main-nav {
    top: 80px;
  }

  /* On touch screens focus remains on the button after a second tap. The
     explicit ARIA state, rather than :focus-within, therefore owns whether a
     dropdown is visible and can reliably close it again. */
  .nav-group:focus-within > .dropdown {
    display: none;
  }

  .nav-group > button[aria-expanded="true"] + .dropdown {
    display: grid;
  }
}

@media (max-width: 720px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 68px;
    padding-inline: 14px;
  }

  .brand {
    grid-template-columns: 54px minmax(0, auto);
    column-gap: 10px;
  }

  .brand > img {
    width: 54px;
  }

  .brand::after {
    font-size: 18px;
  }

  .brand small {
    font-size: 10px;
    letter-spacing: 0.22em;
  }

  .menu-toggle {
    grid-column: 2;
  }

  .header-actions {
    display: none;
  }

  .main-nav {
    top: 68px;
  }
}
