/* =============================================================================
   AI Knowledge Signal — Shared Nav + Footer Styles
   Included on every page via <link rel="stylesheet" href="/shared.css">
   ============================================================================= */

/* ── Design tokens — single source of truth ── */
:root {
  --ink:       #1a1a1a;
  --ink-muted: #5a5a5a;
  --page:      #fafaf8;
  --rule:      #e0ddd8;
  --navy:      #1e3a5f;
  --gold:      #b8913a;
  --good:      #2d6a4f;
  --warn:      #b5451b;
  --mid:       #7a5c10;
}

/* ── Layout utility ── */
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }

/* ── Dev-stage banner — temporary; remove block + shared.js injection when site goes live ── */
.dev-stage-banner {
  background: var(--gold);
  color: #fff;
  text-align: center;
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 16px;
  line-height: 1.4;
  border-bottom: 1px solid rgba(0,0,0,0.12);
}
@media print { .dev-stage-banner { display: none; } }

/* ── Nav ── */
nav {
  background: var(--navy);
  padding: 0;
  position: sticky; top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
nav .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  max-width: 1200px;
}
.nav-brand {
  font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase;
  color: #fff; text-decoration: none;
  font-family: system-ui, sans-serif; font-weight: 700;
  flex-shrink: 0;
}
.nav-brand:hover { color: var(--gold); }

.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  font-family: system-ui, sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.75); text-decoration: none;
  transition: color 0.15s; white-space: nowrap;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }

.nav-cta {
  font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: white !important; background: var(--navy); border: 1px solid var(--gold); text-decoration: none;
  padding: 8px 16px; border-radius: 2px; transition: background 0.15s, color 0.15s; white-space: nowrap;
  cursor: pointer;
}
.nav-cta:hover { background: var(--gold); color: var(--navy) !important; }

.nav-secondary-cta {
  background: var(--gold);
  border-color: var(--gold);
  color: white !important;
}
.nav-secondary-cta:hover {
  background: #9a7a2e !important;
  color: white !important;
  border-color: #9a7a2e;
}

/* Dropdown */
.nav-dropdown-wrap { position: relative; }

.nav-dropdown-btn {
  background: none; border: none; cursor: pointer; padding: 0;
  font-family: system-ui, sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.75); white-space: nowrap;
  display: flex; align-items: center; gap: 5px;
  transition: color 0.15s;
}
.nav-dropdown-btn:hover,
.nav-dropdown-btn.active,
.nav-dropdown-btn.is-open { color: #fff; }

.nav-dropdown-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.nav-dropdown-btn.is-open .nav-dropdown-arrow { transform: rotate(180deg); }

.nav-dropdown {
  display: none;
  position: absolute; top: calc(100% + 14px); left: 50%;
  transform: translateX(-50%);
  background: #162d4a;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 3px;
  min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  z-index: 200;
  overflow: hidden;
}
.nav-dropdown.is-open { display: block; }
.nav-dropdown::before {
  content: '';
  position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid rgba(255,255,255,0.12);
}
.nav-dropdown::after {
  content: '';
  position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 6px solid #162d4a;
}

.nav-dropdown-item {
  display: block;
  font-family: system-ui, sans-serif; font-size: 12px; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.75); text-decoration: none;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.nav-dropdown-item:last-child { border-bottom: none; }
.nav-dropdown-item:hover,
.nav-dropdown-item.active { background: rgba(255,255,255,0.06); color: #fff; }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px; background: #fff;
  border-radius: 2px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  transform-origin: center;
}
.nav-hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-mobile {
  display: none; background: #162d4a;
  border-top: 1px solid rgba(255,255,255,0.1);
  overflow: hidden; max-height: 0;
  transition: max-height 0.28s ease, padding 0.28s ease;
}
.nav-mobile.is-open {
  max-height: 90vh;
  padding: 12px 0 16px;
  overflow-y: auto;
}
.nav-mobile a {
  display: block; font-family: system-ui, sans-serif; font-size: 13px;
  font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,255,255,0.8); text-decoration: none;
  padding: 13px 24px; border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.12s, color 0.12s;
}
.nav-mobile a:last-child { border-bottom: none; }
.nav-mobile a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-mobile a.active { background: rgba(255,255,255,0.06); color: #fff; }
.nav-mobile .nav-mobile-cta { color: var(--gold); font-weight: 700; }

/* Mobile sub-group (accordion) */
.nav-mobile-group-btn {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%;
  font-family: system-ui, sans-serif; font-size: 13px;
  font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  background: none; border: none; cursor: pointer;
  padding: 13px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-align: left;
  transition: background 0.12s, color 0.12s;
}
.nav-mobile-group-btn:hover,
.nav-mobile-group-btn.is-open { background: rgba(255,255,255,0.06); color: #fff; }
.nav-mobile-group-arrow {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 8px;
}
.nav-mobile-group-btn.is-open .nav-mobile-group-arrow { transform: rotate(180deg); }
.nav-mobile-group-items {
  background: rgba(0,0,0,0.18);
  max-height: 0; overflow: hidden;
  transition: max-height 0.22s ease;
}
.nav-mobile-group-items.is-open { max-height: 400px; }
.nav-mobile-group-items a {
  padding-left: 40px;
  font-size: 12px;
  color: rgba(255,255,255,0.7);
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-mobile { display: block; }
}

/* ── Footer ── */
footer {
  padding: 36px 0;
  background: #fff;
  border-top: 1px solid var(--rule);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-inner a { text-decoration: none; }
.footer-logo {
  height: 132px;
  width: auto;
  display: block;
}
.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.footer-links {
  display: flex; gap: 20px; list-style: none; flex-wrap: wrap; justify-content: flex-end;
}
.footer-links a {
  color: var(--gold); text-decoration: none;
  font-size: 13px; font-family: system-ui, sans-serif;
  font-weight: 500;
  transition: color 0.15s;
}
.footer-links a:hover { color: var(--navy); }
.footer-copy {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  color: var(--ink-muted);
}

@media (max-width: 640px) {
  .footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .footer-logo { height: 80px; }
  .footer-right { align-items: center; }
  .footer-links { justify-content: center; gap: 12px; }
  .footer-copy { text-align: center; }
}

/* ── Anchor scroll offset — clears sticky nav ── */
section[id] { scroll-margin-top: 72px; }

/* ── Sticky Book Now Banner ── */
.sticky-book-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--navy);
  border-top: 2px solid var(--gold);
  padding: 12px 0;
  z-index: 90;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.15);
}

/* Dismissal × — absolutely positioned so the main flex layout (text + CTA)
   is unaffected on desktop and on mobile (column stack). */
.sticky-banner-close {
  position: absolute; top: 4px; right: 8px;
  background: transparent; border: none;
  color: rgba(255,255,255,0.6);
  font-family: system-ui, sans-serif;
  font-size: 20px; line-height: 1;
  width: 28px; height: 28px;
  cursor: pointer;
  padding: 0;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.sticky-banner-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.sticky-banner-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.sticky-banner-content {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
}

.sticky-banner-text {
  color: #fff; font-family: system-ui, sans-serif; font-size: 13px;
  font-weight: 500; letter-spacing: 0.05em;
  white-space: nowrap;
}

.sticky-banner-btn {
  font-family: system-ui, sans-serif; font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--navy) !important; background: var(--gold); border: none;
  padding: 8px 20px; border-radius: 2px; cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap; flex-shrink: 0;
}
.sticky-banner-btn:hover {
  background: #9a7a2e;
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .sticky-banner-content {
    flex-direction: column; gap: 12px;
  }
  .sticky-banner-text { white-space: normal; }
  .sticky-banner-btn { width: 100%; }
}
