/*==========================================================
  ORIGAMI — Site header  (the ONE header, used on every page)
  Markup: layouts/header.jsp · behaviour: horizontal.js (home) / site-nav.js (other pages)
==========================================================*/

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 var(--gutter);
  background: #fff;               /* solid — no backdrop-filter: blur() on a fixed element over
                                      GPU-animated content (the Vegas ken-burns hero) flickers on
                                      scroll on many mobile GPUs; a solid fill is also cheaper */
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  transition: box-shadow 0.25s;
  transform: translateZ(0);       /* own compositor layer — stops it repainting with the page */
  backface-visibility: hidden;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }

/* Logo — line-height leaves room for the descender of the "g" (it used to be clipped) */
.site-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo img { height: 4rem; width: auto; display: block; }
.site-logo-text {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.35;
  padding-bottom: 0.2rem;
  color: var(--ink);
  background: none;
  -webkit-text-fill-color: currentColor;
}

/* Navigation */
.site-nav { display: flex; align-items: center; gap: 0.4rem; }
.nav-link {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
}
.nav-link:hover  { color: var(--teal); background: var(--teal-soft); }
.nav-link.active { color: var(--teal); background: var(--teal-soft); }
.nav-link:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.nav-link.nav-cta {
  margin-left: 0.8rem;
  padding: 1rem 2.2rem;
  background: var(--teal);
  color: #fff !important;
  box-shadow: none;
}
.nav-link.nav-cta:hover,
.nav-link.nav-cta.active { background: var(--teal-dark) !important; color: #fff !important; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 4.4rem;
  height: 4.4rem;
  padding: 0.9rem;
  background: none;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  z-index: 1002;
  transition: background 0.2s;
}
.hamburger:hover { background: var(--teal-soft); }
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s, opacity 0.2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu — light, full screen */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 998;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: calc(var(--header-h) + 1rem) 2rem 2rem;
  overflow-y: auto;
  background: #fff;
}
.mobile-menu.open { display: flex; }
.mobile-menu.visible { animation: menuIn 0.25s ease forwards; }
.mobile-menu.closing { animation: menuOut 0.18s ease forwards; }
@keyframes menuIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes menuOut { from { opacity: 1; } to { opacity: 0; } }

.mobile-nav-link {
  display: block;
  padding: 1rem 3rem;
  font-family: var(--font-head);
  font-size: 2.8rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--r-md);
  opacity: 0;
  transform: translateY(14px);
  transition: color 0.18s, background 0.18s;
}
.mobile-menu.visible .mobile-nav-link {
  animation: navLinkUp 0.38s cubic-bezier(0.23,1,0.32,1) forwards;
}
.mobile-menu.visible .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.visible .mobile-nav-link:nth-child(2) { animation-delay: 0.10s; }
.mobile-menu.visible .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.visible .mobile-nav-link:nth-child(4) { animation-delay: 0.20s; }
.mobile-menu.visible .mobile-nav-link:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu.visible .mobile-nav-link:nth-child(6) { animation-delay: 0.30s; }
@keyframes navLinkUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.mobile-nav-link:hover,
.mobile-nav-link.active { color: var(--teal); background: var(--teal-soft); }
.mobile-cta-row { margin-top: 2.4rem; opacity: 0; transform: translateY(14px); }
.mobile-menu.visible .mobile-cta-row { animation: navLinkUp 0.38s cubic-bezier(0.23,1,0.32,1) 0.34s forwards; }
.mobile-cta {
  display: inline-block;
  padding: 1.4rem 3.6rem;
  background: var(--teal);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: none;
}
.mobile-cta:hover { background: var(--teal-dark); transform: translateY(-2px); }
.mobile-cta { transition: background 0.2s, transform 0.18s; }

/* Switch to the hamburger below 1024px, and on short landscape screens */
@media (max-width: 1024px), (max-height: 520px) {
  .site-nav  { display: none; }
  .hamburger { display: flex; }
}
@media (max-width: 480px) {
  .site-logo img { height: 3.4rem; }
  .site-logo-text { font-size: 2.1rem; }
}
