/* Hamiltonn Home Improvement — cinematic motion layer v3.3.0 (additive) */

/* ---------- Scroll progress ---------- */
.hm-progress{position:fixed;top:0;left:0;height:2px;width:0;background:linear-gradient(90deg,var(--gold,#C9A45D),#E9C763);z-index:1200;pointer-events:none}

/* ---------- Hero: shimmer + Ken Burns + video ---------- */
.hero-title em{background:linear-gradient(100deg,#A8862E 0%,#E9C763 30%,#F6E3A1 50%,#E9C763 70%,#A8862E 100%);background-size:220% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;animation:hmShimmer 7s linear infinite}
@keyframes hmShimmer{to{background-position:-220% 0}}
.hero-slides img.is-active{animation:hmKen 9s ease-out both}
@keyframes hmKen{from{scale:1.09}to{scale:1}}
.hero-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity 1.6s ease .2s;z-index:1}
.hero-video.on{opacity:1}
.hero-slides{overflow:hidden}

/* ---------- Full-screen intro (home, once per session) ---------- */
.hm-intro{position:fixed;inset:0;z-index:1400;background:radial-gradient(900px 620px at 50% 44%,#122036,#070E18 76%);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:22px;animation:hmIntroOut .85s cubic-bezier(.22,.61,.36,1) 2.25s forwards}
.intro-seen .hm-intro{display:none}
.hm-intro-mark{position:relative;width:128px;height:128px;display:grid;place-items:center}
.hm-intro-mark img{width:88px;height:88px;background:#fff;border-radius:50%;padding:9px;box-sizing:border-box;box-shadow:0 0 0 1px rgba(201,164,93,.35),0 14px 40px rgba(0,0,0,.5);opacity:0;transform:scale(.84);animation:hmIntroItem .8s cubic-bezier(.22,.61,.36,1) .25s forwards}
.hm-intro-ring{position:absolute;inset:0;border:1px solid var(--gold,#C9A45D);border-radius:50%;opacity:0;transform:scale(1.22);animation:hmIntroItem .9s cubic-bezier(.22,.61,.36,1) .12s forwards}
.hm-intro-ring::after{content:"";position:absolute;inset:7px;border:1px solid rgba(201,164,93,.35);border-radius:50%}
.hm-intro-word{margin:0;font-family:'Playfair Display',Georgia,serif;font-size:27px;color:#fff;letter-spacing:.42em;text-indent:.42em;opacity:0;animation:hmIntroWord 1.05s cubic-bezier(.22,.61,.36,1) .5s forwards}
.hm-intro-sub{margin:0;font-size:10px;letter-spacing:.34em;text-transform:uppercase;color:#E9C763;opacity:0;animation:hmIntroItem .8s cubic-bezier(.22,.61,.36,1) .9s forwards}
@keyframes hmIntroItem{to{opacity:1;transform:none}}
@keyframes hmIntroWord{from{opacity:0;letter-spacing:.8em}to{opacity:1;letter-spacing:.42em}}
@keyframes hmIntroOut{to{opacity:0;transform:translateY(-3%);visibility:hidden;pointer-events:none}}

/* ---------- Gold button shine sweep ---------- */
.btn-gold{position:relative;overflow:hidden}
.btn-gold::after{content:"";position:absolute;top:0;bottom:0;left:-80%;width:50%;background:linear-gradient(105deg,transparent,rgba(255,255,255,.45),transparent);transform:skewX(-20deg);transition:left .6s cubic-bezier(.22,.61,.36,1);pointer-events:none}
.btn-gold:hover::after{left:130%}

/* ---------- Horizontal services rail (desktop, GSAP-pinned) ---------- */
.hm-rail-wrap{overflow:hidden}
.card-grid.is-rail{display:flex;flex-wrap:nowrap;width:max-content;gap:24px;will-change:transform}
.card-grid.is-rail .media-card{width:432px;flex:none}
.hm-rail-bar{margin:30px auto 0;max-width:520px;height:2px;background:rgba(10,20,32,.14);position:relative;overflow:hidden;border-radius:2px}
.on-dark .hm-rail-bar{background:rgba(255,255,255,.16)}
.hm-rail-bar i{position:absolute;left:0;top:0;bottom:0;width:14%;background:linear-gradient(90deg,var(--gold,#C9A45D),#E9C763);border-radius:2px}

/* ---------- Tilt targets ---------- */
.media-card,.tile,.value{transform-style:preserve-3d}

/* ---------- Reduced motion: disable everything additive ---------- */
@media (prefers-reduced-motion:reduce){
  .hm-intro{display:none}
  .hero-video{display:none}
  .hero-slides img.is-active{animation:none}
  .hero-title em{animation:none;background:none;-webkit-text-fill-color:currentColor;color:var(--gold,#C9A45D)}
  .btn-gold::after{display:none}
}
@media (max-width:1020px){
  .hm-rail-bar{display:none}
}
