/* Shared by the homepage, generated blog, legal/support pages, and invites.
   Palette and type match the Den app. Keep the header in the document so it
   scrolls away; only the open menu uses the browser's native popover layer. */
:root {
  --den-header-height: 72px;
  --den-header-inset: max(40px, calc((100% - 1120px) / 2));
}

.den-site-header,
.den-site-header * {
  box-sizing: border-box;
}

.den-site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  color: #fff7ee;
  font-family: var(--font-ui);
}

.den-site-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--den-header-height);
  margin-inline: var(--den-header-inset);
}

.den-site-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: inherit;
  font-family: var(--font-wordmark);
  font-size: 25px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}

.den-site-heart {
  color: #ff6fae;
  font-family: var(--font-ui);
}

.den-menu-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.den-menu-toggle:hover {
  color: #ff6fae;
}

.den-menu-close {
  display: none;
}

.den-site-header:has(.den-site-menu:popover-open) .den-menu-bars {
  display: none;
}

.den-site-header:has(.den-site-menu:popover-open) .den-menu-close {
  display: block;
}

.den-site-menu {
  /* Absolute positioning keeps even an open menu attached to the page top. */
  position: absolute;
  inset: calc(var(--den-header-height) - 4px) var(--den-header-inset) auto auto;
  width: min(200px, calc(100% - 40px));
  max-height: calc(100svh - var(--den-header-height) - 16px);
  overflow-y: auto;
  margin: 0;
  padding: 16px;
  border: 1px solid #5a413b;
  border-radius: 24px;
  background: #2a1b18;
  color: #fff7ee;
  font-family: var(--font-ui);
  box-shadow: 0 16px 40px rgb(8 4 3 / 28%);
}

.den-site-menu ul {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.den-site-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 12px;
  color: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  text-decoration: none;
}

.den-site-menu a:hover {
  background: #432c27;
}

.den-site-menu .den-site-download {
  color: #ff6fae;
}

.den-site-header :focus-visible {
  outline: 2px solid #ff6fae;
  outline-offset: 4px;
}

@media (max-width: 1023px) {
  :root {
    --den-header-inset: 32px;
  }
}

@media (max-width: 767px) {
  :root {
    --den-header-height: 68px;
    --den-header-inset: 20px;
  }

  .den-site-brand {
    font-size: 24px;
  }
}
