/* Heritage Crest - interaction kit (27 Oct), a port of the TRS hover kit used on Andover Groundworks and the newer TRS builds.
   js/hcb-fx.js drives it by class name, so no page markup needs changing. Pointer effects run only for a real mouse;
   with reduced motion nothing moves. Gold #ac8d56. */
:root { --hfx-gold: #ac8d56; --hfx-ink: #141414; --hfx-ease: cubic-bezier(.22, .61, .36, 1); }

/* thin gold reading line along the top */
.hfx-progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 10050; pointer-events: none;
  background: linear-gradient(90deg, rgba(172, 141, 86, .55), var(--hfx-gold)); transform-origin: 0 50%; transform: scaleX(0); }

/* "View" label that trails the cursor over anything that opens photos */
.hfx-cursor { position: fixed; left: 0; top: 0; z-index: 10040; pointer-events: none; transform: translate3d(-100px, -100px, 0); }
.hfx-cursor > span { display: inline-flex; align-items: center; gap: 8px; padding: 9px 15px 9px 11px; border-radius: 999px;
  background: rgba(20, 20, 20, .9); color: #fff; font: 600 12px/1 'Urbanist', sans-serif; letter-spacing: .08em; text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
  opacity: 0; transform: scale(.6); transition: opacity .25s var(--hfx-ease), transform .3s var(--hfx-ease); }
.hfx-cursor i { width: 7px; height: 7px; border-radius: 50%; background: var(--hfx-gold); }
.hfx-cursor.is-on > span { opacity: 1; transform: scale(1); }

html.hfx-on .kp-proj-view, html.hfx-on .kp-card-view, html.hfx-on .kp-style-zoom, html.hfx-on .kp-style-zoom-label { display: none !important; }

/* soft light that follows the cursor across cards (a layer the script adds, so the cards keep their own ::before/::after) */
.hfx-spot { position: relative; }
.hfx-light { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(172, 141, 86, .16), transparent 62%);
  transition: opacity .35s var(--hfx-ease); }
.hfx-spot.is-hot > .hfx-light { opacity: 1; }

/* gentle 3D tilt on photo blocks that do not already move on hover */
.hfx-tilt { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .5s var(--hfx-ease); will-change: transform; }
.hfx-tilt.is-active { transition: transform .12s linear; }

/* buttons lean towards the cursor (the translate property adds to each button's own hover lift) */
.hfx-mag { translate: var(--mgx, 0px) var(--mgy, 0px); transition: translate .45s var(--hfx-ease); }
.hfx-mag.is-active { transition: translate .12s linear; }

/* headings rise in word by word; a gold rule draws in beneath */
.hfx-w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.hfx-wi { display: inline-block; transform: translateY(105%); transition: transform .9s var(--hfx-ease); transition-delay: var(--d, 0s); }
.is-in .hfx-wi, .is-in.hfx-wi { transform: none; }
.hfx-rule { display: block; height: 1px; width: 64px; margin: 18px auto 0; background: var(--hfx-gold); transform: scaleX(0); transform-origin: 50% 50%;
  transition: transform 1.1s var(--hfx-ease) .25s; }
.is-in > .hfx-rule { transform: scaleX(1); }

/* call button for phones (both numbers), bottom left so it clears the back-to-top circle */
.hfx-call { position: fixed; left: 16px; bottom: 18px; z-index: 9990; display: none; }
.hfx-call > button { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--hfx-ink); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, .6); cursor: pointer; }
.hfx-call > button svg { width: 22px; height: 22px; }
.hfx-call > button::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--hfx-gold); opacity: .0; animation: hfx-ring 2.8s ease-out infinite; }
@keyframes hfx-ring { 0% { opacity: .6; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(1.55); } }
.hfx-call-menu { position: absolute; left: 0; bottom: 64px; min-width: 230px; background: #fff; border-radius: 14px; padding: 8px;
  box-shadow: 0 22px 50px -18px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .25s, transform .25s; }
.hfx-call.is-open .hfx-call-menu { opacity: 1; transform: none; pointer-events: auto; }
.hfx-call-menu a { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 10px; color: var(--hfx-ink);
  text-decoration: none; font: 600 15px 'Urbanist', sans-serif; }
.hfx-call-menu a small { display: block; font-weight: 500; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--hfx-gold); }
.hfx-call-menu a:hover, .hfx-call-menu a:focus-visible { background: #f7f5f1; outline: none; }
html.hfx-deep .hfx-call { display: block; animation: hfx-in .4s var(--hfx-ease) both; }
@keyframes hfx-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (min-width: 992px) { html.hfx-deep .hfx-call { display: none; } }

/* "Open now" on the Contact page */
.hfx-open { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 12px; border-radius: 999px; font: 600 12px/1.2 'Urbanist', sans-serif;
  letter-spacing: .04em; background: #f1efe9; color: #333; }
.hfx-open i { width: 8px; height: 8px; border-radius: 50%; background: #9a9a9a; }
.hfx-open.is-open i { background: #3f9b5b; box-shadow: 0 0 0 0 rgba(63, 155, 91, .5); animation: hfx-live 2s infinite; }
@keyframes hfx-live { 0% { box-shadow: 0 0 0 0 rgba(63, 155, 91, .5); } 70% { box-shadow: 0 0 0 7px rgba(63, 155, 91, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 155, 91, 0); } }

@media (prefers-reduced-motion: reduce) {
  .hfx-wi { transform: none !important; transition: none !important; }
  .hfx-rule { transform: scaleX(1) !important; transition: none !important; }
  .hfx-tilt, .hfx-mag { transform: none !important; translate: none !important; }
  .hfx-call > button::after, .hfx-open.is-open i { animation: none !important; }
}
