/* =========================================================
   header.css
   The floating nav pill.

   The lockup is wide (roughly 1.6:1, compass + goose + wordmark), so it is
   ABSOLUTELY positioned and centred: its height must not drive the height of
   the bar. The pill reserves room for it with its own padding. This is the
   Wildridge lesson, where a 100px badge in normal flow sized the whole bar.

   Because the mark is wide rather than a compact badge, the links run out of
   room earlier than they would on a circular logo, so the drawer takes over
   at 1100px instead of the usual 900.
   ========================================================= */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: var(--z-nav);
  padding: 14px clamp(12px, 3vw, 28px);
  pointer-events: none;          /* the pill takes the pointer, not the gutter */
}

.nav-shell {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 56px;
  padding: 10px clamp(16px, 2.4vw, 26px);
  background: var(--bg-frame);
  border: 1px solid var(--border-frame);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-nav);
  transition: box-shadow var(--transition-medium), background var(--transition-medium);
}
.site-header.is-scrolled .nav-shell {
  box-shadow: var(--shadow-nav-scrolled);
}

/* ---------- the lockup ---------- */
.nav-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  line-height: 0;
}
/* Sized by HEIGHT, never width. The lockup is 1.28:1, so a width-driven
   rule lets its height size the pill, which is the Wildridge bug: a logo in
   normal flow drove the whole bar. Height-first keeps the pill predictable
   whether the mark is absolute (desktop) or in flow (phone). */
.nav-logo img {
  height: 46px;
  width: auto;
}
.nav-wordmark {
  font-family: var(--display);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--text-on-frame);
  white-space: nowrap;
  line-height: 1;
}

/* ---------- link groups ---------- */
.nav-group {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 30px);
}
.nav-group--end { margin-left: auto; }

.nav-link {
  font-family: var(--display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-on-frame);
  text-decoration: none;
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-fast), border-color var(--transition-fast);
}
.nav-link:hover { color: var(--wheat); }
.nav-link[aria-current="page"] {
  color: var(--wheat);
  border-bottom-color: var(--wheat);
}

/* The booking link is the one call to action in the bar. */
.nav-book {
  font-family: var(--display);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-on-brand);
  background: var(--brand);
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background var(--transition-fast);
}
.nav-book:hover { background: var(--brand-hover); color: var(--text-on-brand); }

/* ---------- hamburger ---------- */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 22px; height: 2px;
  background: var(--text-on-frame);
  border-radius: 2px;
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}
.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- drawer ---------- */
.nav-drawer {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  background: var(--bg-frame);
  border: 1px solid var(--border-frame);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-nav-scrolled);
  padding: var(--space-sm);
}
.nav-drawer.is-open { display: block; }
.nav-drawer a {
  display: block;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-on-frame);
  text-decoration: none;
  padding: 14px 18px;
  border-radius: var(--radius-md);
}
.nav-drawer a:hover { background: rgba(237, 230, 214, .08); color: var(--wheat); }
.nav-drawer a[aria-current="page"] { color: var(--wheat); }
.nav-drawer .nav-drawer-book {
  margin-top: var(--space-xs);
  background: var(--brand);
  color: var(--text-on-brand);
  text-align: center;
}
.nav-drawer .nav-drawer-book:hover { background: var(--brand-hover); color: var(--text-on-brand); }

/* ---------- the switch ---------- */
@media (max-width: 1100px) {
  .nav-group, .nav-book { display: none; }
  .nav-toggle { display: block; }
  .nav-shell { justify-content: space-between; }
  /* Logo stops being centred once the bar is just logo + burger, so it can
     take the space rather than sitting under the burger on a narrow phone. */
  .nav-logo {
    position: static;
    transform: none;
    margin-inline: auto;
  }
  .nav-logo img { height: 40px; }
  .nav-wordmark { font-size: 0.8rem; letter-spacing: 0.16em; }
}

/* No-JS: the drawer is closed and cannot be opened, so surface the links
   as a plain wrapped row instead of hiding the navigation entirely. */
.no-js .nav-toggle { display: none; }
@media (max-width: 1100px) {
  .no-js .nav-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    width: 100%;
    justify-content: center;
  }
  .no-js .nav-shell { flex-wrap: wrap; border-radius: var(--radius-lg); }
  .no-js .nav-logo { margin-inline: auto; }
}

/* Below 380px the wordmark and the burger collide; the mark carries it. */
/* Below 380px the wordmark and the burger collide, and at 320px the pill
   overflowed. Measured, not guessed: dropping the wordmark clears it. */
@media (max-width: 400px) {
  .nav-wordmark { display: none; }
}
