/* Custom cursor (desktop mouse only — jhotel-cursor.js adds html.jh-cursor-on
   and the .jh-cursor element only when (hover:hover) and (pointer:fine)).
   A small dot tracks the mouse exactly; a ring trails it with easing. Over
   the sliders both give way to a big gold "DRAG" disc; over links/buttons
   the ring grows; over the slider arrows the dot hides.

   The native cursor is hidden everywhere EXCEPT iframes, dialogs and form
   fields, where the script also hides this element — the <dialog> lives in
   the top layer, above any z-index, so a custom cursor there would vanish
   and leave the visitor with no pointer at all. */

html.jh-cursor-on :not(dialog, dialog *, iframe, input, textarea, select, [contenteditable=""], [contenteditable="true"]) {
  cursor: none !important;
}

/* The rule above only skips dialogs; cursor is inherited, so without this they
   inherit "none" from body and the visitor gets no pointer at all. */
html.jh-cursor-on dialog,
html.jh-cursor-on dialog::backdrop {
  cursor: auto;
}

html.jh-cursor-on dialog :is(a[href], button, summary, label, [role="button"]) {
  cursor: pointer;
}

.jh-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 2147483000;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms ease;
}

.jh-cursor.is-visible {
  opacity: 1;
}

.jh-cursor[data-mode="native"] {
  opacity: 0;
}

.jh-cursor__dot,
.jh-cursor__ring,
.jh-cursor__trail {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: 50%;
  will-change: transform;
}

.jh-cursor__dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  background: #D4AF37;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: opacity 350ms ease;
}

.jh-cursor__ring {
  --size: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  box-sizing: border-box;
  border: 1.5px solid #D4AF37;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
  background: transparent;
  color: transparent;
  font-family: var(--font1, inherit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition:
    width 350ms ease,
    height 350ms ease,
    margin 350ms ease,
    background-color 350ms ease,
    border-color 350ms ease,
    color 350ms ease;
}

.jh-cursor__text {
  padding-left: 0.2em; /* re-centres text against its trailing letter-spacing */
}

/* Links and buttons. */
.jh-cursor[data-mode="link"] .jh-cursor__ring {
  --size: 64px;
  background: rgba(212, 175, 55, 0.18);
}

.jh-cursor[data-mode="link"] .jh-cursor__dot {
  opacity: 0;
}

/* Slider arrows. */
.jh-cursor[data-mode="control"] .jh-cursor__ring {
  --size: 72px;
  background: rgba(212, 175, 55, 0.18);
}

.jh-cursor[data-mode="control"] .jh-cursor__dot {
  opacity: 0;
}

/* Over a draggable slider. */
.jh-cursor[data-mode="drag"] .jh-cursor__ring {
  --size: 112px;
  background: #D4AF37;
  border-color: #D4AF37;
  color: #1a1a1a;
}

.jh-cursor[data-mode="drag"] .jh-cursor__dot {
  opacity: 0;
}

/* Second circle under the DRAG disc: a white circle, same size, that follows the mouse faster
   than the disc, so it leads ahead of it while dragging. Hidden otherwise. */
.jh-cursor__trail {
  --size: 112px;
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  box-sizing: border-box;
  background: #fff;
  opacity: 0;
  transition:
    opacity 350ms ease,
    width 350ms ease,
    height 350ms ease,
    margin 350ms ease;
}

.jh-cursor[data-mode="drag"] .jh-cursor__trail {
  --size: 112px;
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .jh-cursor__trail,
  .jh-cursor__ring,
  .jh-cursor__dot,
  .jh-cursor {
    transition: none;
  }
}
