/* Jeff Harris Books: motion layer styles. Pairs with assets/js/animations.js.
   GSAP writes translate/scale/rotate: none inline on animated elements, so the
   hover values for those properties carry !important. */

.jhb-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 100001;
  pointer-events: none;
  background: linear-gradient(90deg, #F2A93B, #FFD58C);
  box-shadow: 0 0 12px rgba(242, 169, 59, 0.6);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* Room for Anton caps and descenders inside SplitText line masks. */
.jhb-line-mask { padding-block: 0.1em; margin-block: -0.1em; }
.jhb-num { font-variant-numeric: tabular-nums; }
/* Split headlines must never break inside a word. */
.jhb-wordwrap { white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {

  /* Pill buttons: lift, glow, shine sweep, arrow nudge. */
  .jhb-btn {
    overflow: hidden;
    isolation: isolate;
    transition: translate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease, background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
  }
  .jhb-btn:not([style*="position"]) { position: relative; }
  .jhb-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.5) 50%, transparent 70%);
    transform: translateX(-130%);
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
  }
  .jhb-btn svg { transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .jhb-btn:hover { translate: 0 -3px !important; box-shadow: 0 14px 30px -12px rgba(242, 169, 59, 0.6); }
  .jhb-btn:hover::before { transform: translateX(130%); }
  .jhb-btn:hover > svg:last-child { transform: translateX(5px); }
  .jhb-btn:active { translate: 0 0 !important; transition-duration: 0.1s; }
  .jhb-ghost:hover { border-color: #F2A93B !important; background-color: rgba(242, 169, 59, 0.1) !important; }

  /* Header nav links: gold underline grows from the left. */
  .jhb-nav {
    background: linear-gradient(#F2A93B, #F2A93B) no-repeat 0 100% / 0% 2px;
    transition: background-size 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease;
  }
  .jhb-nav:hover { background-size: 100% 2px; color: #FFFFFF !important; }

  /* Footer and breadcrumb links slide and turn gold. */
  .jhb-flink { transition: translate 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), color 0.3s ease; }
  .jhb-flink:hover { translate: 6px 0 !important; color: #F2A93B !important; }

  /* Round social icons spin and fill. */
  .jhb-icon { transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, rotate 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .jhb-icon:hover { rotate: 360deg !important; background-color: #F2A93B !important; border-color: #F2A93B !important; color: #0F1115 !important; }

  /* Cards: lift, gold hairline, spotlight that follows the mouse (tilt is in JS). */
  .jhb-card { transition: translate 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease; }
  .jhb-card:not([style*="position"]) { position: relative; }
  .jhb-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(242, 169, 59, 0.16), transparent 45%);
  }
  .jhb-card:hover { translate: 0 -8px !important; box-shadow: 0 28px 50px -26px rgba(10, 12, 16, 0.45), 0 0 0 1px rgba(242, 169, 59, 0.45); }
  .jhb-card:hover::after { opacity: 1; }

  /* Format picker tiles in the hero. */
  .jhb-pick { transition: translate 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease; }
  .jhb-pick:hover { translate: 0 -4px !important; box-shadow: 0 0 0 1px rgba(242, 169, 59, 0.6), 0 16px 30px -16px rgba(242, 169, 59, 0.5); }

  /* Images: zoom inside rounded frames, lift elsewhere. */
  .jhb-zoom { transition: scale 1s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.6s ease; }
  .jhb-zoom-wrap:hover .jhb-zoom, .jhb-card:hover .jhb-zoom { scale: 1.06 !important; filter: saturate(1.08); }
  .jhb-photo { transition: translate 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.6s ease, filter 0.6s ease; }
  .jhb-photo:hover { translate: 0 -6px !important; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.55); filter: saturate(1.08) contrast(1.03); }

  /* Trailer play button: pulsing rings. */
  .jhb-play { transition: scale 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
  .jhb-play:not([style*="position"]) { position: relative; }
  .jhb-play::before, .jhb-play::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(242, 169, 59, 0.75);
    pointer-events: none;
    animation: jhb-ring 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
  }
  .jhb-play::after { animation-delay: 1.2s; }
  .jhb-play:hover { scale: 1.08 !important; }
  @keyframes jhb-ring {
    from { transform: scale(1); opacity: 0.9; }
    to { transform: scale(1.9); opacity: 0; }
  }

  /* Form fields: gold focus ring. */
  .jhb-field { transition: box-shadow 0.3s ease, border-color 0.3s ease; }
  .jhb-field:focus { border-color: #F2A93B !important; box-shadow: 0 0 0 4px rgba(242, 169, 59, 0.22); outline: 2px solid transparent; }
}

/* Custom cursor ring (mouse and trackpad only). */
.jhb-cursor { display: none; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .jhb-cursor {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(242, 169, 59, 0.9);
    border-radius: 50%;
    pointer-events: none;
    z-index: 100002;
    opacity: 0;
    transition: width 0.3s ease, height 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
  }
  .jhb-cursor.is-on { opacity: 1; }
  .jhb-cursor.is-link { width: 64px; height: 64px; background-color: rgba(242, 169, 59, 0.14); border-color: rgba(242, 169, 59, 0.5); }
  .jhb-cursor.is-text { opacity: 0; }
}
