/* Unified public site header + mobile drawer (UI-UX Phase A) */

.site-header-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  row-gap: 8px;
}

.site-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  flex: none;
}

.site-header-brand .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px 2px rgba(var(--amber-rgb, 255, 166, 43), 0.6);
  flex: none;
}

.site-header-brand .name {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-dim);
  white-space: nowrap;
}

.site-header-brand:hover .name {
  color: var(--ink);
}

.site-header-mount {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  justify-content: flex-end;
  min-width: 0;
}

.site-header-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-header-nav a {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  text-decoration: none;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 4px 2px;
  transition: color 0.15s ease;
}

.site-header-nav a:hover,
.site-header-nav a:focus-visible {
  color: var(--amber-soft);
}

.site-header-nav a[aria-current="page"] {
  color: var(--amber-text, var(--amber));
  font-weight: 600;
}

.site-header-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel, #14181d);
  color: var(--ink-dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.site-header-menu-btn:hover {
  border-color: var(--ink-faint);
  color: var(--ink);
}

.site-header-menu-btn:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.site-header-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.55);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.site-header-overlay[hidden],
.site-header-drawer[hidden] {
  display: none !important;
}

.site-header-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 95;
  width: min(320px, 92vw);
  height: 100dvh;
  background: linear-gradient(180deg, var(--panel, #14181d), var(--bg-2, #101317));
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 18px 24px;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: no-preference) {
  .site-header-drawer {
    animation: siteHeaderDrawerIn 0.22s ease both;
  }
  .site-header-overlay:not([hidden]) {
    animation: siteHeaderFadeIn 0.18s ease both;
  }
}

@keyframes siteHeaderDrawerIn {
  from { transform: translateX(100%); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

@keyframes siteHeaderFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .site-header-drawer,
  .site-header-overlay {
    animation: none !important;
  }
}

.site-header-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.site-header-drawer-title {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

.site-header-drawer-close {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-dim);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.site-header-drawer-close:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.site-header-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  overflow-y: auto;
}

.site-header-drawer-nav a {
  font-family: var(--body);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-dim);
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s, color 0.15s;
}

.site-header-drawer-nav a:hover,
.site-header-drawer-nav a:focus-visible {
  background: rgba(var(--amber-rgb, 255, 166, 43), 0.08);
  color: var(--ink);
}

.site-header-drawer-nav a[aria-current="page"] {
  color: var(--amber-text, var(--amber));
  background: rgba(var(--amber-rgb, 255, 166, 43), 0.1);
}

.site-header-drawer-foot {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  gap: 10px;
}

#site-header-theme-slot-desktop,
#site-header-theme-slot-drawer {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 639px) {
  .site-header-nav,
  #site-header-theme-slot-desktop {
    display: none !important;
  }

  .site-header-menu-btn {
    display: inline-flex;
  }
}

@media (min-width: 640px) {
  .site-header-menu-btn {
    display: none !important;
  }

  #site-header-theme-slot-drawer {
    display: none !important;
  }
}

/* Landing: mount sits in lp-nav beside CTA */
.lp-nav .site-header-mount {
  margin-left: auto;
}

.lp-nav .site-header-nav {
  gap: 20px;
}

.lp-nav .site-header-nav a {
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-dim);
}

@media (max-width: 600px) {
  .lp-nav {
    flex-wrap: wrap;
    row-gap: 10px;
  }

  .lp-nav .site-header-mount {
    margin-left: auto;
  }
}
