/* header — hero nav, search pill, floating nav, mega menu */

/* search icon that opens into a field */
.search-pill {
  width: 40px;
  overflow: hidden;
  cursor: pointer;
  background-color: rgba(255,255,255,.12) !important;
  box-shadow: none !important;
  transition: width .45s var(--ease-out), background-color .25s ease;
}
.search-pill::before { display: none !important; }
.search-pill input {
  width: 0;
  min-width: 0;
  flex: 1;
  padding: 0;
  opacity: 0;
  outline: none;
  transition: opacity .3s ease .1s, padding .45s ease;
}
.search-pill input::-webkit-search-cancel-button { display: none; }
.search-pill:hover,
.search-pill:focus-within { width: 260px; background-color: rgba(255,255,255,.18) !important; cursor: text; }
.search-pill:hover input,
.search-pill:focus-within input { opacity: 1; padding-left: 18px; }


/* ---- floating nav ----
   built in nav.js from the hero nav. top bar fades out, pill fades in */
#site-nav, #hero-topbar { transition: opacity .5s ease, transform .6s var(--ease-out), filter .5s ease; }
body.has-float-nav #site-nav,
body.has-float-nav #hero-topbar {
  opacity: 0 !important;
  transform: translateY(-14px) scale(.98);
  filter: blur(6px) !important;
  pointer-events: none;
}

#float-nav {
  position: fixed;
  top: 16px;
  left: 50%;
  z-index: 60;
  width: max-content;
  max-width: calc(100vw - 32px);
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 7px 7px 7px 22px;
  border-radius: 9999px;
  background: rgba(22,21,20,.5);
  -webkit-backdrop-filter: blur(32px) saturate(150%);
  backdrop-filter: blur(32px) saturate(150%);
  box-shadow: 0 12px 40px -12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -20px) scale(.97);
  clip-path: inset(0 22% 0 22% round 9999px);
  transition: opacity .45s ease, transform .7s var(--ease-out), clip-path .8s var(--ease-out);
}
body.has-float-nav #float-nav {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
  clip-path: inset(0 0 0 0 round 9999px);
}

.float-nav__logo img { height: 26px; width: auto; display: block; }
.float-nav__links { display: none; align-items: center; gap: 22px; }
.float-nav__links a { font-size: 12.5px; color: rgba(255,255,255,.75); white-space: nowrap; transition: color .2s ease; }
.float-nav__links a:hover { color: #fff; }
.float-nav__right { display: flex; align-items: center; gap: 14px; }
.float-nav__socials { display: none; align-items: center; gap: 14px; }
.float-nav__socials svg { width: 16px; height: 16px; }
.float-nav__account { font-size: 13px; padding: 8px 18px; }

#float-nav .search-pill { height: 36px; width: 36px; }
#float-nav .search-pill__icon { width: 36px; height: 36px; }
#float-nav .search-pill:hover,
#float-nav .search-pill:focus-within { width: 220px; }

@media (min-width: 1024px) {
  .float-nav__links, .float-nav__socials { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  #float-nav, #site-nav, #hero-topbar { transition: none; }
}


/* ---- mega menu ----
   one panel for all menus. --w/--h size it, --x/--y place it (set from nav.js).
   the bg is a big fixed box clipped down to size, animating clip-path is way smoother than width/height with backdrop-filter */
#mega {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 70;
  pointer-events: none;
  opacity: 0;
  transform: translate3d(var(--x, 0px), calc(var(--y, 0px) + 8px), 0) scale(.98);
  transform-origin: var(--origin, 50%) 0;
  transition: opacity .3s ease, transform .65s cubic-bezier(.32,.72,0,1);
}
#mega.is-open { opacity: 1; pointer-events: auto; transform: translate3d(var(--x, 0px), var(--y, 0px), 0) scale(1); }

.mega__bg {
  position: absolute;
  left: 0;
  top: 0;
  width: 1100px;
  height: 760px;
  clip-path: inset(0 calc(1100px - var(--w, 400px)) calc(760px - var(--h, 200px)) 0 round 24px);
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: clip-path;
  background: linear-gradient(160deg, rgba(30,28,26,.42) 0%, rgba(20,19,17,.52) 55%, rgba(14,13,12,.6) 100%);
  -webkit-backdrop-filter: blur(26px) saturate(170%) brightness(.92);
  backdrop-filter: blur(26px) saturate(170%) brightness(.92);
  transition: clip-path .65s cubic-bezier(.32,.72,0,1);
}
.mega__shadow {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--w, 400px);
  height: var(--h, 200px);
  border-radius: 24px;
  pointer-events: none;
  box-shadow: 0 30px 70px -24px rgba(0,0,0,.45);
  transition: width .65s cubic-bezier(.32,.72,0,1), height .65s cubic-bezier(.32,.72,0,1);
}
.mega__view {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  width: var(--w, 400px);
  height: var(--h, 200px);
  transition: width .65s cubic-bezier(.32,.72,0,1), height .65s cubic-bezier(.32,.72,0,1);
}

.mega__pane {
  position: absolute;
  left: 0;
  top: 0;
  width: max-content;
  padding: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
  backface-visibility: hidden;
  transition: opacity .35s ease, transform .65s cubic-bezier(.32,.72,0,1);
}
.mega__pane.is-on { opacity: 1; pointer-events: auto; transition: opacity .5s ease .08s, transform .65s cubic-bezier(.32,.72,0,1); }
.mega__pane.from-right { transform: translateX(70px); }
.mega__pane.from-left { transform: translateX(-70px); }

.mega__split { display: flex; gap: 12px; align-items: stretch; }
.mega__list { position: relative; width: 230px; display: flex; flex-direction: column; gap: 2px; }
.mega__hl {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 60px;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  pointer-events: none;
  transition: transform .5s var(--ease-out), height .5s var(--ease-out);
}
.mega__item { position: relative; z-index: 1; display: block; padding: 12px 14px; border-radius: 14px; transition: background-color .3s ease; }
.mega__item b { display: block; font-weight: 500; font-size: 14px; color: rgba(255,255,255,.72); transition: color .3s ease; }
.mega__item span { display: block; margin-top: 3px; font-size: 12px; line-height: 1.4; color: rgba(255,255,255,.42); transition: color .3s ease; }
.mega__item.is-on b { color: #fff; }
.mega__item.is-on span { color: rgba(255,255,255,.62); }

.mega__media { position: relative; border-radius: 16px; overflow: hidden; min-height: 220px; background: rgba(0,0,0,.2); }
.mega__shot {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(var(--shift, 0%)) scale(1.04);
  transition: opacity .7s var(--ease-out), transform 1s var(--ease-out);
}
.mega__shot.is-on { opacity: 1; transform: translateY(var(--shift, 0%)) scale(1); }
.mega__shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega__shot--ph { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: rgba(255,255,255,.25); }
.mega__shot--ph em { font-style: normal; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: rgba(255,255,255,.35); }

/* dim the other nav links while a menu is open */
.has-mega { transition: opacity .35s ease, color .35s ease !important; }
body.mega-open #site-nav ul a:not(.is-mega-active),
body.mega-open .float-nav__links a:not(.is-mega-active) { opacity: .4; }
.has-mega.is-mega-active { color: #fff !important; opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  #mega, #mega * { transition-duration: .01s !important; }
}
