/* Scroll-reveal + hover polish. Additive only — no existing rules are overridden. */

[data-reveal] {
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* JS adds this class before observing; if JS never runs, this class never gets added
   and the element simply stays at its normal, fully visible state. */
[data-reveal].reveal-pending {
    opacity: 0;
    transform: translateY(28px);
}

[data-reveal="left"].reveal-pending {
    transform: translateX(-36px);
}

[data-reveal="right"].reveal-pending {
    transform: translateX(36px);
}

[data-reveal="zoom"].reveal-pending {
    transform: scale(0.92);
}

[data-reveal="fade"].reveal-pending {
    transform: none;
}

[data-reveal-delay="1"] { transition-delay: 0.1s; }
[data-reveal-delay="2"] { transition-delay: 0.2s; }
[data-reveal-delay="3"] { transition-delay: 0.3s; }
[data-reveal-delay="4"] { transition-delay: 0.4s; }

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        transition: none !important;
    }
    [data-reveal].reveal-pending {
        opacity: 1;
        transform: none;
    }
}

/* Small hover polish on already-existing interactive elements.
   Explicitly re-list opacity here too, otherwise this shorthand would
   silently override the opacity transition set by the [data-reveal] rule above. */
.stat-item {
    transition: transform 0.3s ease, opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.stat-item:hover {
    transform: translateY(-4px);
}

/* Hero entrance animation. The hero is always visible on first paint, so it plays
   via plain CSS @keyframes on load instead of the scroll-triggered [data-reveal]
   system above — no IntersectionObserver timing to race against, so it's guaranteed
   to actually be seen, and it can be a bit punchier since it only runs once. */
@keyframes heroRise {
    from { opacity: 0; transform: translateY(42px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes heroPop {
    from { opacity: 0; transform: translateY(26px) scale(0.88); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes heroSlide {
    from { opacity: 0; transform: translateX(70px) scale(0.94); }
    to   { opacity: 1; transform: translateX(0) scale(1); }
}

.hero-anim {
    opacity: 0;
    animation-duration: 0.9s;
    animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
    animation-fill-mode: forwards;
}
.hero-anim.hero-up { animation-name: heroRise; }
.hero-anim.hero-pop {
    animation-name: heroPop;
    animation-duration: 0.7s;
    animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hero-anim.hero-slide {
    animation-name: heroSlide;
    animation-duration: 1s;
}

/* Left-to-right wipe reveal (e.g. the strip banner). Uses clip-path instead of
   opacity/transform, so it explicitly resets opacity to 1 and sets its own resting
   clip — otherwise it would inherit .hero-anim's static opacity:0 and never appear,
   since a clip-path-only @keyframes animation never touches the opacity property. */
@keyframes heroWipe {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
}
.hero-anim.hero-wipe {
    opacity: 1;
    clip-path: inset(0 100% 0 0);
    animation-name: heroWipe;
    animation-duration: 1s;
    animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
}

.hero-anim.hero-delay-1 { animation-delay: 0.15s; }
.hero-anim.hero-delay-2 { animation-delay: 0.35s; }
.hero-anim.hero-delay-3 { animation-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
    .hero-anim {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        clip-path: none !important;
    }
}

/* Always-on animated glow behind primary orange CTA buttons, in the site's own
   orange/purple theme colors. A blurred, oversized gradient sits furthest back
   (::before, z-index: -2) and its background-position drifts continuously, so a
   soft colored halo peeks out around the edge at all times — no :hover required.
   ::after is a solid occluding layer the same size as the button (z-index: -1,
   so it sits above the glow but still below the button's own text): a box's own
   background always paints *below* its negative z-index pseudo-elements per the
   CSS stacking spec, so without ::after here the blurred glow would bleed across
   the whole face instead of just showing past its edges. background-color: inherit
   pulls the button's actual current color (including its :hover shade) automatically. */
.btn-glow {
    position: relative;
    z-index: 0;
}
.btn-glow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: calc(100% + 4px);
    height: calc(100% + 4px);
    z-index: -2;
    border-radius: inherit;
    background: linear-gradient(45deg, #FF5627, #4B008D, #FF5627, #4B008D, #FF5627);
    background-size: 400%;
    animation: btnGlowSpin 20s linear infinite;
}
.btn-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background-color: inherit;
}

@keyframes btnGlowSpin {
    0%   { background-position: 0 0; }
    50%  { background-position: 400% 0; }
    100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .btn-glow::before {
        animation: none;
    }
}

/* Brand logo marquee. Pure CSS, no JS/library: the track is the logo list
   rendered twice back to back (second copy is aria-hidden), sitting at
   translateX(0) — animating to translateX(-50%) slides the whole track
   left by exactly one copy's width, so the loop point is invisible and
   the motion reads as continuous right-to-left. */
.brands-marquee {
    overflow: hidden;
    width: 100%;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.brands-marquee__track {
    display: flex;
    width: max-content;
    will-change: transform;
    animation: brandsMarqueeRTL 26s linear infinite;
}
.brands-marquee__group {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.brands-marquee__item {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0 22px;
}

@keyframes brandsMarqueeRTL {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* Pause on hover/focus so logos can be read — desktop pointer only, so it
   doesn't stick "paused" on touch devices that lack real hover. */
@media (hover: hover) {
    .brands-marquee:hover .brands-marquee__track,
    .brands-marquee:focus-within .brands-marquee__track {
        animation-play-state: paused;
    }
}

@media (min-width: 640px) {
    .brands-marquee__item { padding: 0 32px; }
    .brands-marquee__track { animation-duration: 32s; }
}

@media (min-width: 1024px) {
    .brands-marquee__item { padding: 0 44px; }
    .brands-marquee__track { animation-duration: 38s; }
}

@media (prefers-reduced-motion: reduce) {
    .brands-marquee__track {
        animation: none;
        transform: none;
    }
    .brands-marquee__group[aria-hidden="true"] {
        display: none;
    }
}

/* FAQ "Get Free Consultation" card. A drifting dual-tone glow sits behind the card
   (attached to its parent wrapper, not the card itself, since the card needs
   overflow:hidden to clip the bleeding photo below — a ::before on the clipping
   element would get clipped too). The card itself gets a gentle hover lift, the
   pointing photo gets a small idle nudge so it reads as alive, and the CTA gets an
   expanding ring pulse layered via an extra span (btn-glow already owns ::before/
   ::after on the anchor for its spinning border glow). */
.faq-glow-wrap {
    position: relative;
    isolation: isolate;
}
.faq-glow-wrap::before {
    content: '';
    position: absolute;
    inset: -30px;
    z-index: -1;
    border-radius: 40px;
    background:
        radial-gradient(circle at 25% 15%, rgba(255, 86, 39, 0.4), transparent 60%),
        radial-gradient(circle at 85% 85%, rgba(75, 0, 141, 0.55), transparent 55%);
    filter: blur(36px);
    animation: faqGlowDrift 7s ease-in-out infinite alternate;
    pointer-events: none;
}
@keyframes faqGlowDrift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(8px, -10px) scale(1.08); }
}

.faq-card {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}
@media (hover: hover) {
    .faq-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 30px 60px -18px rgba(75, 0, 141, 0.5);
    }
}

.faq-point-anim {
    animation: faqPointNudge 2.6s ease-in-out infinite;
    transform-origin: 65% 30%;
}
@keyframes faqPointNudge {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-4px, -7px) rotate(-3deg); }
}

.faq-cta {
    position: relative;
}
.faq-cta__ring {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 2px solid rgba(255, 255, 255, 0.7);
    opacity: 0;
    animation: faqCtaPulse 2.4s ease-out infinite;
    pointer-events: none;
}
@keyframes faqCtaPulse {
    0%   { transform: scale(1); opacity: 0.55; }
    75%  { transform: scale(1.22); opacity: 0; }
    100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .faq-glow-wrap::before { animation: none; }
    .faq-card { transition: none; }
    .faq-card:hover { transform: none; }
    .faq-point-anim { animation: none; }
    .faq-cta__ring { animation: none; opacity: 0; }
}

/* Reviews page cards. Lift + glow shadow on hover (matches .faq-card's language),
   plus the quote icon and avatar get a small extra nudge so hover reads as one
   cohesive motion rather than a flat lift. */
.review-card {
    border: 1px solid transparent;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease, border-color 0.45s ease;
}
@media (hover: hover) {
    .review-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 28px 56px -20px rgba(255, 86, 39, 0.4);
        border-color: rgba(255, 86, 39, 0.2);
    }
    .review-card:hover .review-card__quote-icon {
        transform: rotate(180deg) scale(1.15);
        opacity: 0.35;
    }
    .review-card:hover .review-card__avatar {
        transform: scale(1.08);
    }
}
.review-card__quote-icon {
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}
.review-card__avatar {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-reduced-motion: reduce) {
    .review-card { transition: none; }
    .review-card:hover { transform: none; box-shadow: none; }
    .review-card:hover .review-card__quote-icon,
    .review-card:hover .review-card__avatar { transform: none; }
}
