/* Shared header, mobile menu and footer.
   Markup is written into every page by scripts/build-chrome.mjs; this file is the
   only place these components are styled. Colour tokens come from each page's :root. */

/* ── Header ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--nav-h); z-index: 200;
  background: rgba(7,17,28,0.94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
  transition: background 0.4s, backdrop-filter 0.4s, box-shadow 0.4s;
}
/* Homepage: lighter over the hero video until the page scrolls */
.nav.nav--over-hero:not(.scrolled) {
  background: rgba(7,17,28,0.55); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: none;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto; padding: 0 48px;
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.nav-logo { font-size: 1.25rem; font-weight: 700; letter-spacing: -0.04em; color: var(--cream); transition: color 0.2s; white-space: nowrap; }
.nav-logo:hover { color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { display: flex; align-items: center; }
.nav-links a { font-size: 0.875rem; font-weight: 600; color: rgba(247,245,242,0.72); transition: color 0.2s; white-space: nowrap; }
.nav-links a:hover { color: var(--cream); }
.nav-links a[aria-current="page"], .nav-links a.is-current-section { color: var(--gold); }

/* Two-line hover: default label slides up, italic gold copy slides in */
.nav-link { position: relative; display: inline-block; overflow: hidden; line-height: 1.1; vertical-align: middle; }
.nav-link .nl-default, .nav-link .nl-hover { display: block; transition: transform 0.42s cubic-bezier(0.16,1,0.3,1); }
.nav-link .nl-hover { position: absolute; top: 100%; left: 0; font-style: italic; font-weight: 400; color: var(--gold); white-space: nowrap; }
.nav-link:hover .nl-default, .nav-link:hover .nl-hover { transform: translateY(-100%); }
.nl-hover span { display: inline-block; transform: translateY(8px); opacity: 0; transition: transform 0.38s cubic-bezier(0.16,1,0.3,1), opacity 0.28s ease; }
.nav-link:hover .nl-hover span { transform: translateY(0); opacity: 1; }

/* Services: real link + separate toggle button */
.nav-item { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; margin-right: -6px; padding: 0;
  background: none; border: 0; border-radius: 4px; cursor: pointer;
  color: rgba(247,245,242,0.72); transition: color 0.2s, background 0.2s;
}
.nav-menu-toggle:hover, .nav-menu-toggle[aria-expanded="true"] { color: var(--cream); background: rgba(247,245,242,0.06); }
.nav-menu-toggle svg { transition: transform 0.25s ease; }
.nav-menu-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-menu-toggle:focus-visible, .nav-links a:focus-visible, .nav-hamburger:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.nav-menu {
  position: absolute; top: calc(100% + 22px); left: -18px; min-width: 248px;
  list-style: none; margin: 0; padding: 8px;
  background: rgba(13,27,41,0.98); border: 1px solid rgba(247,245,242,0.09); border-radius: 8px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.45);
}
.nav-menu[hidden] { display: none; }
.nav-menu a { display: block; padding: 11px 14px; border-radius: 6px; font-size: 0.875rem; font-weight: 500; }
.nav-menu a:hover { background: rgba(247,245,242,0.05); }
.nav-menu li.nav-menu-all { margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(247,245,242,0.07); }

.nav-cta {
  display: inline-flex; align-items: center; padding: 10px 22px;
  background: var(--gold); color: #07111C !important; font-size: 0.875rem; font-weight: 700; white-space: nowrap;
  border-radius: 4px; cursor: pointer; transition: background 0.2s, transform 0.15s;
}
.nav-cta:hover { background: var(--gold-light) !important; transform: translateY(-1px); }

.nav-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; align-items: center; cursor: pointer; padding: 0; background: none; border: none; }
.nav-hamburger span { display: block; width: 22px; height: 1.5px; background: var(--muted); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ── Mobile menu ── */
.nav-mobile {
  display: none; position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 199;
  max-height: calc(100vh - var(--nav-h)); max-height: calc(100dvh - var(--nav-h)); overflow-y: auto; overscroll-behavior: contain;
  background: rgba(7,17,28,0.97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  padding: 24px 28px 32px; flex-direction: column;
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}
.nav-mobile.open { display: flex; }
.nav-mobile-heading { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 0 0 4px; }
.nav-mobile-list { list-style: none; margin: 0 0 22px; padding: 0; }
.nav-mobile-list a { display: block; padding: 10px 0; font-size: 1rem; font-weight: 500; color: rgba(247,245,242,0.62); transition: color 0.2s; }
.nav-mobile-list a:hover { color: var(--cream); }
.nav-mobile-list a[aria-current="page"] { color: var(--gold); }
.nav-mobile .nav-cta { align-self: flex-start; padding: 13px 24px; font-size: 0.9375rem; }

/* ── Footer ── */
.footer { padding: 80px 0 40px; background: var(--surface); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 48px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
.footer-logo { display: inline-block; font-size: 1.25rem; font-weight: 700; letter-spacing: -0.04em; color: var(--cream); margin-bottom: 14px; transition: color 0.2s; }
.footer-logo:hover { color: var(--gold); }
.footer-tagline { font-size: 0.875rem; line-height: 1.7; color: var(--muted); max-width: 300px; margin: 0 0 24px; }
.footer-heading { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin: 0 0 18px; line-height: 1.4; }
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-list a { font-size: 0.875rem; font-weight: 500; color: rgba(247,245,242,0.62); transition: color 0.2s; }
.footer-list a:hover { color: var(--cream); }
.footer-list a[aria-current="page"] { color: var(--gold); }
.footer-note { font-size: 0.8125rem; line-height: 1.7; color: var(--muted); margin: 14px 0 0; max-width: 220px; }
.footer-divider { height: 1px; background: var(--border); margin-bottom: 28px; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-copy { font-size: 0.8125rem; color: rgba(247,245,242,0.32); margin: 0; }
.footer-legal { font-size: 0.8125rem; color: rgba(247,245,242,0.45); transition: color 0.2s; }
.footer-legal:hover, .footer-legal[aria-current="page"] { color: var(--cream); }

/* ── Responsive ── */
@media (max-width: 1080px) {
  .nav-links { gap: 28px; }
  .nav-inner { padding: 0 36px; }
}
@media (max-width: 900px) {
  .nav-inner { padding: 0 28px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; margin-right: -9px; }
  .footer-inner { padding: 0 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .nav-inner { padding: 0 20px; }
  .nav-mobile { padding: 20px 20px 28px; }
  .footer { padding: 64px 0 36px; }
  .footer-inner { padding: 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; margin-bottom: 44px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-menu-toggle svg, .nav-link .nl-default, .nav-link .nl-hover { transition: none; }
}
