/* =============================================================================
   ATHENE — site navigation (shared by index.html, booking.html, terms.html)
   -----------------------------------------------------------------------------
   One copy of the top gold rule + navigation bar, so every page's nav is
   identical. Loaded after each page's inline <style>. Uses the palette
   variables every page defines (--ivory, --ink, --merlot, --gold…, --line).

   Desktop: links | logo | links, transparent over the hero, gaining a frosted
            ivory background once the page scrolls (nav.top.scrolled, toggled
            by a few lines of script on each page).
   Mobile (≤760px): logo on top, every link in a scrolling rail beneath it.
   ============================================================================= */

/* Thin gold-foil rule fixed along the very top of the window */
.top-rule {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--gold-deep) 0%,
    var(--gold-light) 30%,
    var(--gold) 50%,
    var(--gold-light) 70%,
    var(--gold-deep) 100%);
  z-index: 110;
  opacity: 0.85;
}

nav.top {
  position: fixed;
  top: 2px; left: 0; right: 0;
  z-index: 100;
  padding: 16px 56px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 32px;
  transition: background 0.4s ease, padding 0.4s ease;
}
nav.top::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.4s ease;
}
nav.top.scrolled {
  background: rgba(253, 248, 244, 0.88);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  padding: 12px 56px;
}
nav.top.scrolled::after { opacity: 1; }

/* ---- Links either side of the logo ---- */
.nav-links {
  display: flex; gap: 36px;
  font-family: var(--body);
  font-size: 11.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 400;
}
.nav-links.left  { justify-content: flex-end; }
.nav-links.right { justify-content: flex-start; align-items: center; }
.nav-links a {
  position: relative;
  white-space: nowrap;
  padding: 4px 0;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 50%; right: 50%; bottom: -2px;
  height: 1px;
  background: var(--merlot);
  transition: left 0.4s cubic-bezier(.7,0,.3,1), right 0.4s cubic-bezier(.7,0,.3,1);
}
.nav-links a:hover { color: var(--merlot); }
.nav-links a:hover::after { left: 0; right: 0; }

/* ---- "Book" call to action with a drawn arrow ---- */
.nav-cta {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--merlot);
}
.nav-links a.nav-cta { color: var(--merlot); }
.nav-links a.nav-cta::after { display: none; }      /* the arrow is its hover cue */
.nav-cta .arrow {
  width: 16px; height: 1px;
  background: currentColor;
  position: relative;
  transition: width 0.3s;
}
.nav-cta .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: -3px;
  width: 6px; height: 6px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.nav-cta:hover .arrow { width: 28px; }

/* ---- Logo + tagline (centre column) ---- */
.logo-mark {
  display: flex; align-items: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}
.logo-mark .nav-logo {
  height: 62px;                      /* was 30px: larger logo per client note */
  width: auto;
  display: block;
  margin: 0 auto 2px;
  transition: height 0.4s ease;
}
nav.top.scrolled .logo-mark .nav-logo { height: 46px; }
.logo-mark .tagline {
  font-family: "Catchy Mager", "Cormorant Garamond", "Cormorant", serif;
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--merlot);
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  nav.top { padding: 18px 32px; }
  nav.top.scrolled { padding: 12px 32px; }
  .logo-mark .nav-logo { height: 56px; }
  nav.top.scrolled .logo-mark .nav-logo { height: 44px; }
  /* Mid widths: tighten spacing so every link stays on one line */
  nav.top { gap: 24px; }
  .nav-links { gap: 24px; letter-spacing: 0.18em; }
}
@media (max-width: 960px) {
  nav.top { padding: 18px 20px; gap: 16px; }
  nav.top.scrolled { padding: 12px 20px; }
  .nav-links { gap: 16px; font-size: 10.5px; letter-spacing: 0.12em; }
  .nav-cta { font-size: 10.5px; letter-spacing: 0.12em; gap: 6px; }
  .logo-mark .nav-logo { height: 48px; }
  nav.top.scrolled .logo-mark .nav-logo { height: 40px; }
  .logo-mark .tagline { font-size: 9px; letter-spacing: 0.24em; }
}

/* ---- Mobile: logo on top, links in a scrolling rail ---- */
.nav-bar-wrap { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  nav.top {
    grid-template-columns: 1fr;
    justify-items: center;
    padding: 14px 0 0;
    gap: 0;
  }
  nav.top.scrolled { padding: 10px 0 0; }
  .logo-mark .nav-logo { height: 48px; }
  nav.top.scrolled .logo-mark .nav-logo { height: 38px; }
  .logo-mark .tagline { font-size: 9px; }

  .nav-bar-wrap {
    display: block;
    position: relative;
    width: 100%;
    min-width: 0;          /* lets the rail clip instead of stretching the grid */
    margin-top: 11px;
  }
  /* The fade that signals more links to the right. It fades the links
     themselves (a mask) rather than laying an ivory strip on top, which showed
     as a pale box over the pink hero before the nav turns solid. */
  .nav-bar {
    display: flex;
    gap: 26px;
    padding: 9px 24px 10px;
    border-top: 1px solid var(--line);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 44px), transparent);
  }
  .nav-bar::-webkit-scrollbar { display: none; }
  .nav-bar a {
    flex: 0 0 auto;
    font-family: var(--body);
    font-size: 10px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-weight: 400;
    color: var(--ink-soft);
    text-decoration: none;
    white-space: nowrap;
    padding: 3px 0;
    border-bottom: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
  }
  .nav-bar a.bar-cta { color: var(--merlot); font-weight: 500; }
  .nav-bar a.is-current {
    color: var(--merlot);
    border-bottom-color: var(--merlot);
  }
}

/* Phone/tablet rail: when every link fits, centre the row under the logo.
   (Auto margins collapse to 0 once the rail overflows, so scrolling is unchanged.) */
@media (max-width: 760px) {
  .nav-bar > :first-child { margin-left: auto; }
  .nav-bar > :last-child  { margin-right: auto; }
}
/* No fade on the right when every link already fits (set by each page's script). */
nav.top .nav-bar.fits { -webkit-mask-image: none; mask-image: none; }
