/* ============================================================
   THE PEARL EDITION — navigation
   Single source of truth for the site header + mobile menu.
   Loaded on EVERY page (the main pages get it via an @import in
   styles.css; the ceylon-based pages link it directly) so the
   navigation is pixel-identical site-wide.

   The nav owns its own design tokens and font here rather than
   inheriting page-level ones, so it renders the same regardless
   of which stylesheet a page is otherwise built on.
   ============================================================ */

.nav, .mobile-menu {
  --cream: #FAF8F4;
  --ink: #1A1612;
  --ink-70: rgba(26,22,18,0.7);
  --ink-40: rgba(26,22,18,0.4);
  --ink-15: rgba(26,22,18,0.12);
  --ink-06: rgba(26,22,18,0.06);
  --gold: #C9A86C;
  --gold-light: #E0BF80;
  --white: #FFFFFF;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, sans-serif;
  --r: 3px;
  font-family: var(--sans);
}

/* NAV */
.nav { position: sticky; top: 0; z-index: 200; background: var(--cream); border-bottom: 1px solid var(--ink-15); height: 60px; display: flex; align-items: center; padding: 0 56px; gap: 0; }
.nav-logo { display: flex; align-items: center; flex-shrink: 0; margin-right: 36px; }
.nav-logo em { font-style: italic; font-weight: 300; }
.nav-logo-img { display: block; width: auto; height: 26px; }
.nav-links { display: flex; align-items: center; gap: 2px; list-style: none; flex: 1; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-70); padding: 8px 12px; border-radius: var(--r); transition: color 0.15s, background 0.15s; white-space: nowrap; }
.nav-link:hover { color: var(--ink); background: var(--ink-06); }
.nav-link.is-active { color: var(--ink); }
.nav-link svg { opacity: 0.5; transition: transform 0.2s; }
.nav-item:hover .nav-link svg { transform: rotate(180deg); }
.nav-drop { position: absolute; top: calc(100% + 8px); left: 0; background: var(--white); border: 1px solid var(--ink-15); border-radius: 6px; box-shadow: 0 8px 32px rgba(26,22,18,0.10); padding: 20px; min-width: 460px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease; transition-delay: 0.18s; }
/* Invisible bridge across the 8px gap so the cursor stays "inside" the item
   while travelling from the nav link down to the dropdown panel. */
.nav-drop::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.nav-item:hover .nav-drop { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s; }
.nav-drop-title { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-40); margin-bottom: 10px; }
.nav-drop-list { list-style: none; }
.nav-drop-list li { margin-bottom: 7px; }
.nav-drop-list a { font-size: 13px; color: var(--ink-70); transition: color 0.15s; }
.nav-drop-list a:hover { color: var(--ink); }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-search { background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink-40); display: flex; align-items: center; transition: color 0.15s; }
.nav-search:hover { color: var(--ink); }
.nav-cta { background: var(--gold); color: var(--ink); font-family: 'Inter', system-ui, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; padding: 11px 22px; border-radius: 100px; transition: background 0.2s, transform 0.2s, box-shadow 0.2s; }
.nav-cta:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(201,168,108,0.9); }
.nav-burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; color: var(--ink); }

/* LANDING HEADER — dark variant */
.nav--dark { background: #14110C; border-bottom: 1px solid rgba(255,255,255,0.08); }
.nav--dark .nav-links { justify-content: center; gap: 6px; }
.nav--dark .nav-link { color: rgba(255,255,255,0.66); }
.nav--dark .nav-link:hover { color: #fff; background: rgba(255,255,255,0.07); }
.nav--dark .nav-link.is-active { color: #fff; }
.nav--dark .nav-burger { color: #fff; }
.nav--dark .nav-cta { background: var(--gold); color: var(--ink); }
.nav--dark .nav-cta:hover { background: var(--gold-light); }
.nav-link--live { color: var(--gold); }
.nav-link--live:hover { color: var(--gold-light); }
.nav-live-dot { width: 6px; height: 6px; margin-left: 2px; border-radius: 50%; background: #46d27e; box-shadow: 0 0 0 0 rgba(70,210,126,0.55); animation: navLivePulse 1.9s ease-out infinite; }
@keyframes navLivePulse { 0% { box-shadow: 0 0 0 0 rgba(70,210,126,0.5); } 70% { box-shadow: 0 0 0 6px rgba(70,210,126,0); } 100% { box-shadow: 0 0 0 0 rgba(70,210,126,0); } }

/* MOBILE MENU */
.mobile-menu { position: fixed; inset: 0; z-index: 1000; background: var(--cream); transform: translateX(100%); transition: transform 0.28s ease; display: flex; flex-direction: column; overflow-y: auto; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; height: 60px; border-bottom: 1px solid var(--ink-15); flex-shrink: 0; }
.mobile-menu-close { background: none; border: none; cursor: pointer; font-size: 26px; line-height: 1; color: var(--ink); padding: 4px 8px; }
.mobile-menu-body { padding: 16px 20px 40px; }
.mobile-menu-body a { display: block; font-family: var(--serif); font-size: 22px; font-weight: 400; color: var(--ink); padding: 13px 0; border-bottom: 1px solid var(--ink-06); }
.mobile-menu-body a.sub { font-family: var(--sans); font-size: 14px; color: var(--ink-70); padding: 9px 0 9px 14px; }
.mobile-menu-body .grp-t { font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-40); margin: 22px 0 4px; }
.mobile-menu .nav-cta { display: inline-block; margin-top: 22px; }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 768px) {
  .nav { padding: 0 20px; }
}

/* FLOATING QUICK NAV
   The pill-shaped quick navigation pinned to the bottom of every page.
   Lives here (rather than in a single page stylesheet) so it renders
   identically whether a page is built on styles.css or ceylon.css. */
.float-nav { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 999; background: #1A1612; border: 1px solid rgba(201,168,108,0.25); border-radius: 50px; padding: 10px 20px; display: flex; align-items: center; gap: 6px; box-shadow: 0 8px 32px rgba(0,0,0,0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.float-nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 16px; border-radius: 40px; text-decoration: none; transition: background 0.2s; cursor: pointer; min-width: 56px; }
.float-nav-item:hover { background: rgba(201,168,108,0.12); }
.float-nav-item.active { background: rgba(201,168,108,0.18); }
.float-nav-icon { width: 22px; height: 22px; stroke: rgba(240,235,227,0.55); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.2s; }
.float-nav-item:hover .float-nav-icon { stroke: #C9A86C; }
.float-nav-item.active .float-nav-icon { stroke: #C9A86C; }
.float-nav-label { font-family: 'Inter', system-ui, sans-serif; font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(240,235,227,0.45); transition: color 0.2s; }
.float-nav-item:hover .float-nav-label { color: #C9A86C; }
.float-nav-item.active .float-nav-label { color: #C9A86C; }

/* ============================================================
   MOBILE OPTIMISATION LAYER — The Pearl Edition
   Loaded site-wide via nav.css (imported by styles.css and linked
   directly by the ceylon pages) so the mobile experience is a
   single source of truth. Desktop rendering is untouched.
   ============================================================ */

/* No horizontal scrolling anywhere. body (not html) is clipped so the
   sticky header keeps working; images never push past the viewport. */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
img, svg, video { max-width: 100%; }
a, button, .float-nav-item, .nav-burger, .nav-search { -webkit-tap-highlight-color: rgba(201,168,108,0.18); }

@media (max-width: 600px) {
  /* Comfortable 44px touch targets for the header controls. */
  .nav-burger { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 10px; }
  .nav-search { min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 10px; }
  .mobile-menu-close { min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; }
  .mobile-menu-body a { padding-top: 14px; padding-bottom: 14px; }

  /* Header CTA — a proper pill that stays on one line (never a circular
     badge). Same font and colours as desktop. */
  .nav-cta { border-radius: 999px; padding: 9px 16px; white-space: nowrap; }

  /* Keep the header on one row at every width down to 320px: the wordmark
     yields space (scaling down gracefully) so the search, CTA and menu
     controls always keep their full 44px touch targets and never clip. */
  .nav-logo { margin-right: 12px; min-width: 0; flex-shrink: 1; }
  .nav-logo-img { height: auto; width: 135px; max-width: 100%; }
  .nav-right { flex-shrink: 0; }

  /* Reserve space so the floating bottom navigation never covers content. */
  body { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }

  /* ---- BOTTOM NAVIGATION — floating pill (Instagram-style) ----
     A rounded, glassy bar that floats clear of both edges and the
     home indicator. Icon-only; the active tab sits inside a circular
     capsule. Fixed above content and never covered while scrolling. */
  .float-nav {
    left: 16px; right: 16px;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    top: auto;
    transform: none;
    width: auto;
    gap: 0;
    padding: 7px 10px;
    border: 0.5px solid rgba(244,239,227,0.12);
    border-radius: 999px;
    background: rgba(20,20,18,0.72);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 34px rgba(0,0,0,0.45);
    justify-content: space-around;
    align-items: center;
  }
  .float-nav-item {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    gap: 0;
    border-radius: 50%;
    background: transparent;
    justify-content: center;
    position: relative;
  }
  /* Active tab: solid circular capsule behind the icon. */
  .float-nav-item.active { background: rgba(244,239,227,0.16); border-radius: 50%; }
  .float-nav-icon { width: 23px; height: 23px; }
  /* Icon-only — no text labels under the icons. */
  .float-nav-label { display: none; }
  /* Optional notification indicator: a 6px red dot at the top-right of an
     icon. Add the `has-dot` class to any .float-nav-item to show it. */
  .float-nav-item.has-dot::after {
    content: "";
    position: absolute;
    top: 8px; right: 8px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: #E4322B;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
