/* Shared site navigation — Quiet Light */

:root {
  --site-header-h: 90px;
  --site-footer-h: 44px;
}

body.has-site-header {
  padding-top: var(--site-header-h);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 247, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #E8E8E5;
}

.site-header-main {
  border-bottom: 1px solid #F0F0EB;
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  max-width: 960px;
  margin: 0 auto;
  padding: 8px 20px;
  flex-wrap: wrap;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #1A1A1A;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  margin-right: auto;
}

.site-brand:hover {
  opacity: 0.85;
}

.site-brand-icon {
  border-radius: 8px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.site-nav-link {
  padding: 8px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: #8A8A8A;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav-link:hover {
  color: #1A1A1A;
  background: #F5F5F0;
}

.site-nav-link.is-active {
  color: #1A1A1A;
  background: #FFFFFF;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-social {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 12px;
  background: #F5F5F0;
  border: 1px solid #E8E8E5;
  border-radius: 999px;
}

.site-social-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #1A1A1A;
  letter-spacing: 0.03em;
  margin-right: 2px;
  white-space: nowrap;
}

.site-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #8A8A8A;
  border-radius: 50%;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.site-social-link:hover {
  color: #1A1A1A;
  background: #FFFFFF;
  transform: scale(1.06);
}

.site-social-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

.site-cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #FAFAF7;
  background: #1A1A1A;
  text-decoration: none;
  border-radius: 999px;
  white-space: nowrap;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Secondary row — all pages reachable without scrolling */
.site-header-sub {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 12px;
}

.site-subnav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px 4px;
  padding: 4px 0 6px;
}

.site-subnav-link {
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #8A8A8A;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-subnav-link:hover {
  color: #1A1A1A;
  background: #F5F5F0;
}

.site-subnav-link.is-active {
  color: #1A1A1A;
  background: #FFFFFF;
}

.site-support {
  position: relative;
  display: inline-flex;
}

.site-support-trigger {
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: #8A8A8A;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.site-support-trigger:hover,
.site-support-trigger[aria-expanded="true"] {
  color: #1A1A1A;
  background: #F5F5F0;
}

.site-support-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1002;
  width: min(280px, calc(100vw - 32px));
  padding: 14px 16px;
  background: #FFFFFF;
  border: 1px solid #E8E8E5;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.site-support-popover[hidden] {
  display: none;
}

.site-support-hint {
  margin: 0 0 10px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #8A8A8A;
}

.site-support-email-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-support-email {
  display: block;
  padding: 8px 10px;
  font-size: 0.82rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #1A1A1A;
  background: #F5F5F0;
  border: 1px solid #E8E8E5;
  border-radius: 8px;
  word-break: break-all;
  user-select: all;
}

.site-support-copy {
  padding: 8px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  color: #FAFAF7;
  background: #1A1A1A;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.site-support-copy:hover {
  opacity: 0.9;
}

.site-support-status {
  margin: 8px 0 0;
  min-height: 1.2em;
  font-size: 0.75rem;
  color: #1A1A1A;
}

.site-footer {
  padding: 14px 20px;
  background: #F5F5F0;
  border-top: 1px solid #E8E8E5;
  text-align: center;
  flex-shrink: 0;
}

.site-footer-tagline {
  margin: 0;
  font-size: 0.85rem;
  color: #8A8A8A;
  font-style: italic;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 1001;
  padding: 8px 16px;
  background: #1A1A1A;
  color: #FAFAF7;
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
}

.skip-link:focus {
  left: 16px;
}

#root {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

body.has-site-header > main {
  flex: 1;
}

@media (max-width: 640px) {
  :root {
    --site-header-h: 128px;
  }

  body.has-site-header {
    padding-top: var(--site-header-h);
  }

  .site-header-inner {
    padding: 10px 16px;
  }

  .site-brand {
    width: 100%;
    margin-right: 0;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .site-header-actions {
    width: 100%;
    justify-content: space-between;
  }

  .site-cta {
    flex: 1;
    justify-content: center;
    text-align: center;
  }

  .site-subnav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px 4px 8px;
  }

  .site-subnav::-webkit-scrollbar {
    display: none;
  }

  .site-subnav-link,
  .site-support {
    flex-shrink: 0;
  }

  .site-support-popover {
    left: 0;
    transform: none;
  }

  .site-social-label {
    font-size: 0.72rem;
  }
}