/* Header styles for ArcadeMachinesPL */
:root {
  --am-midnight: #0b152e;
  --am-ivory: #f7f5ef;
  --am-gold: #c9a227;
  --am-graphite: #1a1a1a;
  --am-amber: #d7a86e;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  z-index: 10000;
  padding: .6rem .9rem;
  background: var(--am-ivory);
  color: var(--am-graphite);
  outline: 2px solid var(--am-gold);
  border-radius: .25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 9990;
  background: linear-gradient(0deg, rgba(11,21,46,.96), rgba(11,21,46,.96));
  backdrop-filter: saturate(120%) blur(6px);
  color: #fff;
  border-bottom: 1px solid rgba(201,162,39,.2);
}

.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  max-width: 1200px;
  margin-inline: auto;
  padding: .75rem 1rem;
}

.brand__link {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 600;
  letter-spacing: .4px;
  color: var(--am-ivory);
  text-decoration: none;
}
.brand__link:focus-visible {
  outline: 2px solid var(--am-gold);
  outline-offset: 3px;
  border-radius: .25rem;
}
.brand__link:hover { color: #fff; text-shadow: 0 0 0 transparent; }

.menu-toggle {
  justify-self: end;
  appearance: none;
  border: 1px solid rgba(201,162,39,.45);
  background: transparent;
  color: #fff;
  border-radius: .5rem;
  padding: .55rem .7rem;
  display: none; /* shown on small screens */
  align-items: center;
  gap: .6rem;
}
.menu-toggle:focus-visible {
  outline: 2px solid var(--am-gold);
  outline-offset: 3px;
}
.menu-toggle__label { font: 500 0.95rem/1 "Inter", system-ui, sans-serif; }
.menu-toggle__bars {
  position: relative;
  width: 22px; height: 2px; background: currentColor; display: inline-block;
}
.menu-toggle__bars::before, .menu-toggle__bars::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor;
}
.menu-toggle__bars::before { top: -6px; }
.menu-toggle__bars::after { top: 6px; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.nav-list { list-style: none; display: flex; align-items: center; gap: .5rem; margin: 0; padding: 0; }
.nav-link {
  font: 500 .975rem/1 "Inter", system-ui, sans-serif;
  color: #e9e9ef;
  text-decoration: none;
  padding: .6rem .8rem;
  border-radius: .4rem;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-link:focus-visible { outline: 2px solid var(--am-gold); outline-offset: 3px; }

.search { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.search input[type="search"] {
  font: 400 .95rem/1.2 "Inter", system-ui, sans-serif;
  color: #101010;
  background: var(--am-ivory);
  border: 1px solid rgba(201,162,39,.35);
  border-radius: .5rem;
  padding: .5rem .6rem;
  min-width: clamp(10rem, 22vw, 16rem);
}
.search input[type="search"]:focus-visible { outline: 2px solid var(--am-gold); outline-offset: 2px; }
.search__btn {
  border: 1px solid rgba(201,162,39,.45);
  background: linear-gradient(180deg, #c9a227, #b18d1f);
  color: #0d0d0d;
  border-radius: .5rem;
  padding: .5rem .6rem;
}
.search__btn:hover { filter: brightness(1.05); }
.search__btn:focus-visible { outline: 2px solid var(--am-gold); outline-offset: 2px; }

.nav-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1;
}

/* Responsive behavior */
@media (max-width: 991.98px) {
  .menu-toggle { display: inline-flex; }
  .header-inner { grid-template-columns: 1fr auto; position: relative; z-index: 2; }
  .site-nav { flex-direction: column; align-items: stretch; gap: .75rem; }
  .nav-list { flex-direction: column; align-items: stretch; gap: .25rem; }
  .nav-link { padding: .9rem 1rem; }
  .search { width: 100%; margin: .25rem 0 0; }
  .search input[type="search"] { flex: 1 1 auto; min-width: 0; width: 100%; }

  /* Progressive enhancement: only hide menu on small screens when JS is enabled */
  html.js-enabled .site-nav { display: none; }
  html.js-enabled .nav-backdrop { display: none; }
  .site-header.is-open .site-nav { display: flex; }
  .site-header.is-open + .nav-backdrop,
  .site-header.is-open .nav-backdrop { display: block; }

  /* Slide-down animation for menu */
  html.js-enabled .site-nav { 
    animation: none; 
    background: rgba(11,21,46,.98);
    border-top: 1px solid rgba(201,162,39,.2);
    padding: .5rem 0 1rem;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .site-header { transition: background-color .2s ease; }
}

/* Utility */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }