/* Explore dropdown — compact ~700×386 panel: scrollable left list + right preview.
   Left edge aligns with Explore trigger (JS). Hidden scrollbar + fade hint. */

html body .explore,
html body .explore.is-open {
  position: fixed !important;
  /* Above the floating nav pill (z-index 95) so the panel never hides under it. */
  z-index: 96 !important;
  /* Default sits below the floating nav pill; JS sets --explore-top / top on open. */
  top: var(
    --explore-top,
    calc(var(--nav-island-top, 0.9rem) + var(--nav-h) + 0.9rem)
  ) !important;
  left: var(--explore-left, 0.75rem) !important;
  right: auto !important;
  width: var(--explore-width, min(43.75rem, calc(100vw - 1.5rem))) !important;
  max-width: min(43.75rem, calc(100vw - 1.5rem)) !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 0.85rem !important;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  overflow: visible !important;
  max-height: none !important;
  clip-path: none !important;
  box-sizing: border-box !important;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.32s !important;
}

html body .explore.is-open::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -0.85rem;
  height: 0.85rem;
}

html body .explore:not(.is-open) {
  opacity: 0 !important;
  transform: translate3d(0, -0.45rem, 0) !important;
  pointer-events: none !important;
  visibility: hidden;
  clip-path: none !important;
}

html body .explore.is-open {
  opacity: 1 !important;
  transform: translate3d(0, 0, 0) !important;
  visibility: visible;
  pointer-events: auto !important;
  clip-path: none !important;
  transition:
    opacity 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s !important;
}

.explore__mega {
  display: grid;
  grid-template-columns: 12.5rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  height: 24.125rem; /* ~386px — keep panel compact, list scrolls inside */
  max-height: 24.125rem;
  padding: 0.55rem;
  box-sizing: border-box;
  overflow: hidden;
}

.explore__side {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.02rem;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.35rem 0.15rem 0.45rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  /* Soft bottom fade only — keep the first heading fully readable at scrollTop 0 */
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 1.1rem),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    #000 0,
    #000 calc(100% - 1.1rem),
    transparent 100%
  );
}

.explore__side::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

.explore__cat {
  display: block;
  margin: 0.55rem 0.45rem 0.2rem;
  padding: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--muted, #6b6b6b);
  line-height: 1.2;
  text-decoration: none;
  text-transform: none;
}

.explore__cat:first-child {
  margin-top: 0.1rem;
}

.explore__cat:hover,
.explore__cat:focus-visible {
  color: #0a0a0a;
  outline: none;
}

.explore__item {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  padding: 0.38rem 0.5rem 0.4rem !important;
  border-radius: 0.45rem !important;
  opacity: 1 !important;
  transform: none !important;
  transition: background 0.2s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) !important;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

html body .explore.is-open .explore__item,
html body .explore.is-open .explore__item:hover {
  opacity: 1 !important;
  transform: none !important;
}

.explore__item-name {
  display: block;
  font-size: 0.86rem;
  font-weight: 560;
  letter-spacing: -0.01em;
  line-height: 1.25;
  color: #0a0a0a;
}

.explore__soon {
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(10, 10, 10, 0.38);
  white-space: nowrap;
}

.explore__item--soon {
  cursor: default;
  pointer-events: auto; /* still hover for preview */
}

.explore__item--soon .explore__item-name {
  color: rgba(10, 10, 10, 0.42);
  font-weight: 500;
}

.explore__item.is-on,
.explore__item:hover,
.explore__item:focus-visible,
.explore__cat.is-on {
  background: rgba(0, 0, 0, 0.045) !important;
  outline: none;
}

.explore__cat.is-on {
  border-radius: 0.35rem;
  margin-left: 0.2rem;
  margin-right: 0.2rem;
  padding: 0.2rem 0.3rem;
}

/* Right preview — fills fixed panel height */
.explore__stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch;
  border-radius: 0.65rem;
  background: #f3f3f3;
  overflow: hidden;
}

.explore__shots {
  position: absolute;
  inset: 0;
}

.explore__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.35s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform 0.55s var(--ease, cubic-bezier(0.22, 1, 0.36, 1));
  pointer-events: none;
}

.explore__shot.is-on {
  opacity: 1;
  transform: scale(1);
}

.explore__shot--mark {
  object-fit: contain;
  object-position: center;
  padding: 18%;
  background: #f6f6f6;
  filter: brightness(0);
}

.explore__grid,
.explore__col {
  display: contents;
}

.explore__col > h3 {
  display: none;
}

body.is-xurih.is-explore .nav.is-corner.is-xr-away,
body.is-xurih.is-explore .nav.is-corner.is-solid.is-xr-away,
body.is-xurih.is-explore .nav.is-corner.is-ready.is-xr-away,
body.is-xurih.is-explore .nav.is-corner.is-solid.is-ready.is-xr-away {
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.is-xurih.is-explore .nav.is-corner,
body.is-xurih.is-explore .nav.is-corner.is-solid,
body.is-xurih.is-explore .nav.is-corner.is-ready {
  background: #ffffff !important;
}

/* —— Mobile sheet: bottom-anchored + ONE uniform frosted glass ——
   Glass only on .nav-sheet. Inner panel/links stay transparent (iOS
   breaks nested backdrop-filter). Accordion: no fly transforms. */
html body .nav-sheet,
html body .nav-sheet.is-open {
  background: rgba(255, 255, 255, 0.72) !important;
  background-image: none !important;
  backdrop-filter: blur(28px) saturate(1.55) !important;
  -webkit-backdrop-filter: blur(28px) saturate(1.55) !important;
  box-shadow: none !important;
  /* flex-start + panel margin-top:auto keeps short menus bottom-anchored
     without clipping tall accordion content under the header */
  justify-content: flex-start !important;
  align-items: stretch !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  height: 100% !important;
  height: 100dvh !important;
  min-height: 100% !important;
  min-height: 100dvh !important;
  inset: 0 !important;
  transform: none !important;
  -webkit-transform: none !important;
  filter: none !important;
  /* Keep expanded lists clearly below the header / close control */
  padding-top: calc(
    var(--nav-island-top, 0.7rem) + var(--nav-h, 3.85rem) + 2.5rem
  ) !important;
  padding-right: clamp(1.4rem, 6vw, 2.2rem) !important;
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px) + 1.6rem) !important;
  padding-left: clamp(1.4rem, 6vw, 2.2rem) !important;
  scroll-padding-top: calc(
    var(--nav-island-top, 0.7rem) + var(--nav-h, 3.85rem) + 2.5rem
  ) !important;
}

/* Soften grain while sheet is open so glass reads cleanly */
body.is-nav-sheet .grain,
html.is-nav-sheet .grain {
  opacity: 0.02 !important;
}

/* Header must stay clearly above the frosted sheet (logo / X / globe / CTA).
   Beat page-specific transparent nav rules (e.g. xurih-story .nav.is-corner). */
@media (max-width: 820px) {
  html body.is-nav-sheet .nav,
  html body.is-nav-sheet .nav.is-solid,
  html body.is-nav-sheet .nav:not(.is-solid),
  html body.is-nav-sheet .nav.is-ready,
  html body.is-nav-sheet .nav.is-ready.is-solid,
  html body.is-nav-sheet .nav.is-corner,
  html body.is-nav-sheet .nav.is-corner.is-solid,
  html body.is-nav-sheet .nav.is-corner.is-ready,
  html body.is-nav-sheet:has(.hero) .nav,
  html body.is-nav-sheet:has(.hero) .nav.is-solid,
  html body.is-nav-sheet:has(.hero) .nav:not(.is-solid),
  html body.is-nav-sheet:has(.hero) .nav.is-ready,
  html body.is-nav-sheet:has(.hero) .nav.is-ready.is-solid,
  html body.is-contact.is-nav-sheet .nav,
  html body.is-contact.is-nav-sheet .nav.is-solid,
  html body.is-explore.is-nav-sheet .nav,
  html body.is-explore.is-nav-sheet .nav.is-solid,
  html body.is-xurih.is-nav-sheet .nav.is-corner,
  html body.is-xurih.is-nav-sheet .nav.is-corner.is-solid,
  html body.is-xurih.is-nav-sheet .nav.is-corner.is-ready,
  html body.is-xurih.is-explore.is-nav-sheet .nav.is-corner,
  html body.is-xurih.is-explore.is-nav-sheet .nav.is-corner.is-solid,
  html body.is-xurih.is-explore.is-nav-sheet .nav.is-corner.is-ready,
  html body.is-xurih.is-explore.is-nav-sheet .nav.is-corner.is-solid.is-ready {
    z-index: 98 !important;
    color: #0a0a0a !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border: 1px solid rgba(0, 0, 0, 0.14) !important;
    border-color: rgba(0, 0, 0, 0.14) !important;
    box-shadow: 0 10px 28px rgba(15, 18, 24, 0.16) !important;
    backdrop-filter: blur(18px) saturate(1.2) !important;
    -webkit-backdrop-filter: blur(18px) saturate(1.2) !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }

  html body.is-nav-sheet .nav .logo-mark,
  html body.is-nav-sheet .nav:not(.is-solid) .logo-mark,
  html body.is-nav-sheet .nav.is-solid .logo-mark {
    filter: brightness(0) !important;
    opacity: 1 !important;
  }

  html body.is-nav-sheet .nav__burger,
  html body.is-nav-sheet .lang__btn,
  html body.is-nav-sheet .nav__cta {
    color: #0a0a0a !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  html body.is-nav-sheet .nav__burger {
    z-index: 99 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
  }

  html body.is-nav-sheet .nav__burger-lines,
  html body.is-nav-sheet .nav__burger-lines:before,
  html body.is-nav-sheet .nav__burger-lines:after,
  html body.is-nav-sheet .nav__burger.is-open .nav__burger-lines:before,
  html body.is-nav-sheet .nav__burger.is-open .nav__burger-lines:after {
    background: #0a0a0a !important;
  }

  html body.is-nav-sheet .nav__burger.is-open .nav__burger-lines {
    background: transparent !important;
  }

  html body.is-nav-sheet .nav__cta {
    border-color: #0a0a0a !important;
  }

  html body.is-nav-sheet .nav__cta .btn__fill {
    background: #0a0a0a !important;
  }

  html body.is-nav-sheet .lang__globe,
  html body.is-nav-sheet .lang__btn svg {
    color: #0a0a0a !important;
    stroke: currentColor !important;
    opacity: 1 !important;
  }
}

.nav-sheet__panel,
.nav-sheet__links,
.nav-sheet__foot,
.nav-sheet__group {
  background: transparent !important;
  background-image: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  filter: none !important;
}

.nav-sheet__panel {
  margin-top: auto !important; /* restore bottom-anchored original */
  margin-bottom: 0 !important;
  overflow: visible !important;
  flex: 0 0 auto !important;
  width: min(100%, 28rem) !important;
  max-width: 100% !important;
  padding-bottom: 0;
}

/* No sticky fade strip (looked like a grey mid-screen panel on iOS) */
.nav-sheet.is-open::after,
.nav-sheet::after,
.nav-sheet__panel::before,
.nav-sheet__panel::after {
  content: none !important;
  display: none !important;
  background: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.nav-sheet__sub,
.nav-sheet__sub--explore {
  transform: none !important;
  will-change: auto !important;
  overflow: hidden !important;
  filter: none !important;
}

.nav-sheet__sub.is-open,
.nav-sheet__sub--explore.is-open {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  /* Prefer natural height once open — avoid iOS transform+overflow bugs */
  overflow: visible !important;
}

.nav-sheet__sublabel,
.nav-sheet__sublink,
.nav-sheet__sublink--soon,
.nav-sheet__sublabel--link {
  transform: none !important;
  filter: none !important;
  transition: color 0.25s var(--ease, cubic-bezier(0.22, 1, 0.36, 1)) !important;
}

/* Visible with the parent — no per-item fade/fly that iOS misplaces */
.nav-sheet__sub.is-open .nav-sheet__sublabel,
.nav-sheet__sub.is-open .nav-sheet__sublink,
.nav-sheet__sub.is-open .nav-sheet__sublabel--link {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}

.nav-sheet__sub.is-open .nav-sheet__sublink--soon {
  opacity: 0.45 !important;
  transform: none !important;
}

.nav-sheet__sublabel--link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.nav-sheet__sublink--soon {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: default;
  pointer-events: none;
}

.nav-sheet__sublink--soon em {
  font-style: normal;
  font-size: 0.65em;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

@media (max-width: 860px) {
  html body .explore,
  html body .explore.is-open {
    width: min(40rem, calc(100vw - 1.5rem)) !important;
    max-width: min(40rem, calc(100vw - 1.5rem)) !important;
  }

  .explore__mega {
    grid-template-columns: 11.25rem minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.45rem;
    height: 20rem;
    max-height: 20rem;
  }
}

@media (max-height: 720px) {
  .explore__mega {
    padding: 0.4rem;
    gap: 0.4rem;
    height: min(20rem, calc(100vh - 5.5rem));
    max-height: min(20rem, calc(100vh - 5.5rem));
  }

  .explore__item {
    padding: 0.28rem 0.4rem 0.3rem !important;
  }

  .explore__item-name {
    font-size: 0.78rem;
  }

  .explore__cat {
    margin: 0.4rem 0.35rem 0.12rem;
    font-size: 0.55rem;
  }
}

/* Desktop explore panel stays; phone uses sheet. Keep panel usable if opened. */
@media (max-width: 560px) {
  html body .explore,
  html body .explore.is-open {
    width: min(21rem, calc(100vw - 1.5rem)) !important;
    max-width: min(21rem, calc(100vw - 1.5rem)) !important;
  }

  .explore__mega {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    padding: 0.4rem;
    height: auto;
    max-height: min(70vh, 28rem);
  }

  .explore__stage {
    order: -1;
    width: 100%;
    height: 7.5rem;
    min-height: 7.5rem;
  }

  .explore__side {
    max-height: min(40vh, 16rem);
    height: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .explore,
  html body .explore.is-open,
  html body .explore:not(.is-open) {
    transition: none !important;
    transform: none !important;
  }

  .explore__shot,
  .explore__item {
    transition: none !important;
  }
}
