/* =========================================================
   DARK HEART CITY — SHARED HEADER (standalone)
   Safe to add to ANY page, old or new: everything is scoped to
   .site-top, so it never changes the rest of the page.
   Same look as the header in dhc-system.css.
   ========================================================= */
@font-face { font-family: "DM Serif Display"; src: url("../fonts/dm-serif-display-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../fonts/dm-sans-500.woff2") format("woff2"); font-weight: 500 700; font-style: normal; font-display: swap; }

.site-top {
  --h-ink: #1f141d; --h-on: #f6f2ec; --h-muted: #c9bcc6; --h-violet: #b99bd6;
  --h-serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --h-sans: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  --h-safe: env(safe-area-inset-top, 0px);
  position: sticky; top: 0; z-index: 1000;
  background: var(--h-ink); color: var(--h-on);
  padding-top: var(--h-safe);
  font-family: var(--h-sans); font-size: 16px; line-height: 1.4;
  box-sizing: border-box;
}
.site-top *, .site-top *::before, .site-top *::after { box-sizing: border-box; }
.site-top .wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .site-top .wrap { padding: 0 32px; } }
.site-top__bar { display: flex; align-items: center; justify-content: space-between; min-height: 56px; gap: 16px; }
.site-top a { color: var(--h-on); }
.site-top__brand { font-family: var(--h-serif); font-size: 1.125rem; text-decoration: none; letter-spacing: .04em; color: var(--h-on); white-space: nowrap; }
.site-top__links { display: none; gap: 24px; font-size: .9375rem; }
.site-top__links a { text-decoration: none; color: var(--h-muted); letter-spacing: 0; text-transform: none; }
.site-top__links a:hover, .site-top__links a[aria-current] { color: var(--h-on); }
.site-top__actions { display: flex; align-items: center; gap: 12px; }
.site-top__login { min-height: 36px; display: inline-flex; align-items: center; padding: 0 16px; border: 1px solid var(--h-violet); border-radius: 6px; font-size: .9375rem; text-decoration: none; color: var(--h-on); background: transparent; }
.site-top__icon { position: relative; width: 44px; height: 44px; display: grid; place-items: center; background: none; border: 0; color: var(--h-on); cursor: pointer; border-radius: 50%; padding: 0; }
.site-top__icon svg { width: 22px; height: 22px; }
.site-top__icon:hover { background: rgba(255,255,255,.08); }
@media (min-width: 900px) { .site-top__links { display: flex; } }

/* Mobile menu (no JavaScript needed) */
.site-top .site-menu { position: relative; }
.site-top .site-menu > summary { list-style: none; cursor: pointer; width: 44px; height: 44px; display: grid; place-items: center; margin-right: -8px; color: var(--h-on); }
.site-top .site-menu > summary::-webkit-details-marker { display: none; }
.site-top .site-menu__icon, .site-top .site-menu__icon::before, .site-top .site-menu__icon::after { display: block; width: 22px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform .2s ease; }
.site-top .site-menu__icon::before, .site-top .site-menu__icon::after { content: ""; position: absolute; left: 0; }
.site-top .site-menu__icon::before { top: -7px; }
.site-top .site-menu__icon::after { top: 7px; }
.site-top .site-menu[open] .site-menu__icon { background: transparent; }
.site-top .site-menu[open] .site-menu__icon::before { transform: translateY(7px) rotate(45deg); }
.site-top .site-menu[open] .site-menu__icon::after { transform: translateY(-7px) rotate(-45deg); }
.site-top .site-menu__panel { position: fixed; left: 0; right: 0; top: calc(56px + var(--h-safe)); bottom: 0; background: var(--h-ink); padding: 24px 16px calc(48px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; overflow-y: auto; z-index: 1001; }
.site-top .site-menu__panel a { font-family: var(--h-serif); font-size: 1.75rem; text-decoration: none; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); color: var(--h-on); text-transform: none; letter-spacing: 0; }
.site-top .site-menu__panel a[aria-current] { color: var(--h-violet); }
@media (min-width: 900px) { .site-top .site-menu { display: none; } }
@media (prefers-reduced-motion: reduce) { .site-top .site-menu__icon, .site-top .site-menu__icon::before, .site-top .site-menu__icon::after { transition: none; } }

/* Store pages: on phones, "Log in" moves into the menu so the icons fit */
@media (max-width: 479px) { .site-top__actions--icons .site-top__login { display: none; } .site-top__actions--icons { gap: 4px; } }
.site-top .site-menu__panel a.site-menu__login { margin-top: 24px; border: 1px solid var(--h-violet); border-radius: 6px; text-align: center; font-family: var(--h-sans); font-size: 1.125rem; padding: 14px; }

/* Smallest phones (iPhone SE and similar): keep the header inside the screen */
@media (max-width: 359px) {
  .site-top .site-menu > summary { margin-right: 0; }
  .site-top__login { padding: 0 10px; font-size: .875rem; }
  .site-top__brand { font-size: 1rem; }
  .site-top__actions { gap: 6px; }
}
