/* Shared header for every page. Hand-written so case-study pages
   (which do not load Tailwind) get the same bar as the homepage. */
.site-header,
.site-header * {
  box-sizing: border-box;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #0f172a;
}

.site-header-bar {
  max-width: 80rem;
  height: 4rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-logo {
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.3em;
  font-size: 0.875rem;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav {
  display: none;
  align-items: center;
  gap: 1.75rem;
  font-size: 0.875rem;
}

.site-nav a {
  color: #475569;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: #0f172a;
}

.site-header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
  flex-shrink: 0;
}

.site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  background: #0f172a;
  color: #ffffff;
  padding: 0.5rem 0.9rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.site-cta:hover {
  background: #475569;
}

.site-header-actions .site-cta {
  display: none;
}

.site-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #0f172a;
  cursor: pointer;
}

.site-menu-bars {
  position: relative;
  display: block;
  width: 1.125rem;
  height: 1px;
  background: #0f172a;
}

.site-menu-bars::before,
.site-menu-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 1.125rem;
  height: 1px;
  background: #0f172a;
}

.site-menu-bars::before { top: -6px; }
.site-menu-bars::after { top: 6px; }

.site-menu-btn.is-open .site-menu-bars { background: transparent; }
.site-menu-btn.is-open .site-menu-bars::before { top: 0; transform: rotate(45deg); }
.site-menu-btn.is-open .site-menu-bars::after { top: 0; transform: rotate(-45deg); }

.site-menu {
  position: absolute;
  top: 4rem;
  left: 0;
  right: 0;
  max-height: calc(100vh - 4rem);
  overflow: auto;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.25rem 1.5rem 1.25rem;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.site-menu a {
  display: block;
  padding: 0.9rem 0;
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
  font-size: 1rem;
  text-decoration: none;
}

.site-menu a:hover,
.site-menu a[aria-current="page"] {
  color: #0f172a;
}

.site-menu .site-cta {
  display: flex;
  width: 100%;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
}

@media (min-width: 720px) {
  .site-header-actions .site-cta { display: inline-flex; }
  .site-cta { font-size: 0.875rem; padding: 0.55rem 1rem; }
}

@media (min-width: 1024px) {
  .site-header-bar { padding: 0 2rem; }
  .site-nav { display: flex; }
  .site-menu-btn { display: none; }
  .site-menu { display: none !important; }
}

/* The bar is fixed, so reserve its height. Pages should not add their own top offset. */
body { padding-top: 4rem; }

section[id],
#built,
#narrative {
  scroll-margin-top: 4.5rem;
}

body.site-menu-open { overflow: hidden; }
