/* Motion layer styles. Everything is scoped to .has-motion, which
   motion.js adds only when the libraries load and the visitor has not asked
   for reduced motion. */

/* Lenis needs native smooth scrolling switched off */
html.has-motion {
    scroll-behavior: auto;
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--brand-green);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 1100;
    pointer-events: none;
}

/* Split-text headline */
.has-motion .hero-content h1,
.has-motion .process-hero h1 {
    perspective: 600px;
}

.split-word {
    display: inline-block;
    will-change: transform, opacity;
}

/* Photo reveal frame */
.has-motion .motion-frame {
    overflow: hidden;
    border-radius: 8px;
}

.has-motion .motion-frame img,
.has-motion .feature-image:hover img {
    transition: none;
    will-change: transform;
}

/* Heading underline that draws in */
.has-motion .motion-heading {
    position: relative;
    display: inline-block;
    padding-bottom: 0.6rem;
}

.has-motion .motion-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: var(--brand-green);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}

.has-motion .text-center .motion-heading::after,
.has-motion .cta-band .motion-heading::after {
    transform-origin: center;
    left: 25%;
    width: 50%;
}

.has-motion .motion-heading.is-in::after {
    transform: scaleX(1);
}

/* Spotlight cards */
.spotlight-card {
    position: relative;
    overflow: hidden;
}

.spotlight-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(320px circle at var(--spot-x, 50%) var(--spot-y, 50%), rgba(0, 210, 106, 0.16), transparent 65%);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.spotlight-card:hover::before {
    opacity: 1;
}

.spotlight-card > * {
    position: relative;
}

/* Magnetic buttons: GSAP owns the transform, CSS keeps the colour fades */
.btn.is-magnetic {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    will-change: transform;
}
