/* phones draw a blue flash on every tap; the site's own hover and focus styles replace it */
a, button, [role="button"] { -webkit-tap-highlight-color: transparent; }

/* Homepage motion: hero, sections 02, 03, 06, 08, cursor ring + magnetic buttons (owner: lead).
   Styles for the layers js/home-motion.js injects. Without JS none of these elements exist. */

/* ---------- Masked headline lines ---------- */
.hm-line {
  display: block;
  overflow: hidden;
  /* room for descenders and the gold glow, without changing line spacing */
  padding: 0.04em 0.2em 0.1em 0;
  margin: -0.04em -0.2em -0.1em 0;
}
.hm-line-in {
  display: block;
  transform-origin: 0 100%;
}

/* ---------- 01 Hero layers ---------- */
.hero { overflow: hidden; }
.hm-hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: inherit; /* same photo, same desktop/mobile crop as the hero */
  transform-origin: 50% 35%;
  will-change: transform;
}
.hm-hero-shade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
}
.hero::before { z-index: 1; }
.hm-hero-spot {
  --x: 70;
  --y: 45;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  mix-blend-mode: screen;
  background: radial-gradient(circle 24rem at calc(var(--x) * 1%) calc(var(--y) * 1%),
    rgba(240, 215, 140, 0.2) 0%, rgba(240, 215, 140, 0.06) 45%, rgba(240, 215, 140, 0) 70%);
  transition: opacity 0.6s ease;
}
.hm-has-spot:hover .hm-hero-spot { opacity: 1; }

/* ---------- 03 Parallax background ---------- */
.section-3 { overflow: hidden; }
.section-3 > .hm-s3-bg {
  position: absolute;
  inset: -12% 0;
  z-index: 0;
  background: inherit;
  will-change: transform;
}
/* keep the dark shade (and the soft top fade) above the moving photo */
.section-3::before {
  z-index: 1;
  background: linear-gradient(180deg, #000 0, rgba(0, 0, 0, 0.6) 24px, rgba(0, 0, 0, 0.6) 100%);
}

/* ---------- 08 House lights + spotlight ---------- */
.section-8 > .hm-s8-dim {
  --x: 68;
  --y: 42;
  position: absolute;
  inset: 0;
  z-index: 0;
  display: none;
  pointer-events: none;
  background: radial-gradient(circle at calc(var(--x) * 1%) calc(var(--y) * 1%),
    rgba(0, 0, 0, 0) 0, rgba(0, 0, 0, 0.12) 13rem, rgba(0, 0, 0, 0.84) 30rem);
}
.hm-s8-live > .hm-s8-dim { display: block; }

/* ---------- Magnetic buttons (translate composes with the CSS hover transform) ---------- */
.hm-magnetic {
  translate: calc(var(--mx, 0) * 1px) calc(var(--my, 0) * 1px);
}

/* ---------- Gold cursor ring ---------- */
.hm-cursor {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  border: 1px solid rgba(240, 215, 140, 0.75);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease, scale 0.35s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.3s ease;
}
.hm-cursor.is-on { opacity: 1; }
.hm-cursor.is-link {
  scale: 1.8;
  background-color: rgba(240, 215, 140, 0.1);
  border-color: rgba(240, 215, 140, 0.4);
}

@media (prefers-reduced-motion: reduce) {
  .hm-hero-spot, .hm-cursor { display: none; }
}

/* ============================================================
   Hero "premiere" layer: searchlights, gold dust, living photo,
   shimmering headline. Elements injected by js/home-motion.js.
   ============================================================ */
.hm-decor--hero { z-index: 1; }

/* searchlights sweep up from below the frame, like a red-carpet premiere */
.hm-search {
  position: absolute;
  bottom: -8%;
  width: 26vw;
  min-width: 220px;
  height: 135%;
  background: linear-gradient(0deg, rgba(255, 243, 210, 0.26) 0%, rgba(240, 215, 140, 0.1) 45%, rgba(240, 215, 140, 0) 85%);
  clip-path: polygon(47% 100%, 53% 100%, 100% 0, 0 0);
  transform-origin: 50% 100%;
  filter: blur(8px);
  mix-blend-mode: screen;
  pointer-events: none;
}
.hm-search--a { left: 6%; rotate: -22deg; }
.hm-search--b { left: 38%; rotate: 8deg; opacity: 0.7; }
.hm-search--c { right: 4%; rotate: 20deg; opacity: 0.85; }

.hm-decor--hero .hm-dust { box-shadow: 0 0 10px rgba(255, 236, 180, 1); }

@media (prefers-reduced-motion: no-preference) {
  .hm-search--a { animation: hmSearchA 11s ease-in-out infinite alternate; }
  .hm-search--b { animation: hmSearchB 14s ease-in-out -3s infinite alternate; }
  .hm-search--c { animation: hmSearchC 12s ease-in-out -6s infinite alternate; }

  /* the photo breathes very slowly (stacks with the scroll zoom on `transform`) */
  .hm-hero-media { animation: hmKenBurns 24s ease-in-out infinite alternate; }

  /* a sheen of light runs across the gold word */
  .hero-text h1 .gold {
    background: linear-gradient(105deg, #f0d78c 0 42%, #fff8e1 50%, #f0d78c 58% 100%) 0 0 / 260% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hmGoldSheen 5s ease-in-out 2.4s infinite;
    /* glow moves to a filter: a text-shadow would paint over the clipped gradient */
    text-shadow: none;
    filter: drop-shadow(0 0 14px rgba(240, 215, 140, 0.4));
  }
}

@keyframes hmSearchA  { from { rotate: -30deg; } to { rotate: 4deg; } }
@keyframes hmSearchB  { from { rotate: -12deg; } to { rotate: 18deg; } }
@keyframes hmSearchC  { from { rotate: 30deg; } to { rotate: -6deg; } }
@keyframes hmKenBurns { from { scale: 1; } to { scale: 1.07; } }
@keyframes hmGoldSheen { 0% { background-position: 100% 0; } 55%, 100% { background-position: 0 0; } }

@media (max-width: 900px) {
  .hm-search { width: 60vw; }
  .hm-search--b { display: none; }
}

/* phones / touch: a blurred, screen-blended beam that keeps rotating is re-filtered and
   re-blended every frame; the gradient is already soft, so the beams lose the blur and keep
   turning on the compositor. The gold sheen repaints the headline every frame: it stays still. */
@media (hover: none), (max-width: 900px) {
  .hm-search {
    filter: none;
    mix-blend-mode: normal;
  }
  .hero-text h1 .gold { animation: none; }
}
