/* ===== JSL Associates — shared styles ===== */
:root {
  --brand: #002458;
  --brand-dark: #001a42;
  --gold: #ffae00;
  --gold-dark: #e69c00;
  --ink: #14181f;
  --muted: #5b6472;
  --line: #e6e8ec;
  --subtle: #f6f7f9;
}

html { scroll-behavior: smooth; }
body { font-family: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif; }

.text-balance { text-wrap: balance; }
.text-pretty { text-wrap: pretty; }

/* Hero heading gradient (the one allowed gradient, on text only) */
.hero-title {
  background: linear-gradient(90deg, #000000, #555555);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title.on-dark {
  background: linear-gradient(90deg, #ffffff, #b9c4d6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Fluid easing for interactive transitions (B7) */
.fluid { transition: all .4s cubic-bezier(0.32, 0.72, 0, 1); }

/* Scroll reveal (B7) */
.reveal {
  opacity: 0;
  transform: translateY(48px);
  filter: blur(10px);
  transition: opacity .8s cubic-bezier(0.32,0.72,0,1),
              transform .8s cubic-bezier(0.32,0.72,0,1),
              filter .8s cubic-bezier(0.32,0.72,0,1);
}
.reveal.in { opacity: 1; transform: none; filter: none; }

/* Tagline word reveal (B11) */
.word { opacity: .30; transition: opacity .6s cubic-bezier(0.32,0.72,0,1); }
.word.in { opacity: 1; }

/* ===== Nav: floating glass island ===== */
.nav-shell {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
  padding: 0 12px;
}
.nav-pill {
  margin-top: 24px;
  width: max-content; max-width: 100%;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 30px rgba(0,0,0,.06);
  padding: 8px;
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--muted);
  padding: 8px 12px; border-radius: 9999px; white-space: nowrap;
  transition: all .3s cubic-bezier(0.32,0.72,0,1);
}
.nav-link:hover { background: var(--subtle); color: var(--ink); }
.nav-link[aria-current="page"] { background: var(--subtle); color: var(--ink); }

/* Services dropdown (desktop) */
.has-dropdown { position: relative; }
/* invisible bridge so the cursor can cross the gap without closing the menu */
.has-dropdown::after { content: ""; position: absolute; left: -20px; right: -20px; top: 100%; height: 18px; }
.dropdown {
  position: absolute; top: calc(100% + 12px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 320px; background: #fff; border: 1px solid var(--line);
  border-radius: 20px; padding: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.12);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .35s cubic-bezier(0.32,0.72,0,1), transform .35s cubic-bezier(0.32,0.72,0,1);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0);
}
.dropdown a {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: 12px; transition: background .25s ease;
}
.dropdown a:hover { background: var(--subtle); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; border-radius: 9999px; transition: all .4s cubic-bezier(0.32,0.72,0,1); }
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--brand); color: #fff; padding: 12px 20px; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-gold { background: var(--gold); color: var(--brand); padding: 12px 20px; }
.btn-gold:hover { background: var(--gold-dark); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 12px 20px; }
.btn-ghost:hover { background: var(--subtle); }
.btn-sm { padding: 8px 16px; font-size: 14px; }

/* Eyebrow (gold pill, dark text = accessible) */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--brand); background: rgba(255,174,0,.16); padding: 6px 14px; border-radius: 9999px; }
/* On dark backgrounds: solid gold pill with navy text so it never blends in */
.eyebrow.on-dark { color: var(--brand); background: var(--gold); }

/* Cards */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.card-hover { transition: all .4s cubic-bezier(0.32,0.72,0,1); }
.card-hover:hover { box-shadow: 0 18px 40px rgba(0,0,0,.10); transform: translateY(-4px); }

/* Image / video hero overlay (solid navy, not a gradient) */
.img-hero { position: relative; isolation: isolate; }
.img-hero > img, .img-hero > video { z-index: 0; }
.img-hero::after { content: ""; position: absolute; inset: 0; background: rgba(0,26,66,.66); z-index: 1; }
.img-hero > *:not(img):not(video) { position: relative; z-index: 2; }

/* Section background variations */
.bg-gold-tint { background: #fff8ea; }
.bg-navy-tint { background: #eef3f9; }
.bg-navy { background: var(--brand); }
.bg-deep { background: #14294c; }

/* Gold accent bar under headings */
.accent-bar { display: block; height: 4px; width: 56px; background: var(--gold); border-radius: 9999px; }
.accent-bar.center { margin-left: auto; margin-right: auto; }

/* Icon tile variants */
.icon-tile { height: 3.5rem; width: 3.5rem; display: grid; place-items: center; border-radius: 0.75rem; background: var(--brand); color: #fff; }
.icon-tile.gold { background: var(--gold); color: var(--brand); }

/* Xero Gold Partner badge (official, transparent PNG, no box) */
.xero-logo { display: block; height: 56px; width: auto; }
.xero-logo.sm { height: 46px; }
.xero-logo.lg { height: 72px; }
.xero-logo.xl { height: 120px; }

/* ===== Mobile menu ===== */
.hamburger { position: relative; height: 36px; width: 36px; display: grid; place-items: center; border-radius: 9999px; transition: background .3s ease; }
.hamburger:hover { background: var(--subtle); }
.bar { position: absolute; left: 8px; height: 2px; width: 20px; background: var(--ink); border-radius: 9999px;
  transition: transform .4s cubic-bezier(0.32,0.72,0,1), opacity .3s ease; }
.bar-top { top: 13px; } .bar-mid { top: 17px; } .bar-bot { top: 21px; }
.menu-open .bar-top { transform: translateY(4px) rotate(45deg); }
.menu-open .bar-mid { opacity: 0; }
.menu-open .bar-bot { transform: translateY(-4px) rotate(-45deg); }

#mobileMenu { position: fixed; inset: 0; z-index: 40; background: rgba(255,255,255,.85);
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
  opacity: 0; visibility: hidden; transition: opacity .5s cubic-bezier(0.32,0.72,0,1), visibility .5s; overflow-y: auto; }
#mobileMenu.open { opacity: 1; visibility: visible; }
#mobileMenu .m-link { opacity: 0; transform: translateY(40px);
  transition: opacity .6s cubic-bezier(0.32,0.72,0,1), transform .6s cubic-bezier(0.32,0.72,0,1); }
#mobileMenu.open .m-link { opacity: 1; transform: none; }

/* Focus + reduced motion */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .word { opacity: 1 !important; transform: none !important; filter: none !important; transition: none; }
  .fluid, .bar, .btn, .card-hover, .dropdown, #mobileMenu, #mobileMenu .m-link { transition: none !important; }
}
