/* ═══════════════════════════════════════════════
   PETLY GROOM — Animations (v3 — Ultra Premium)
   ═══════════════════════════════════════════════ */

/* ── Reveal on scroll (base — enhanced by GSAP) ── */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
    opacity: 1;
}

.reveal {
    transform: none;
}

.reveal-left {
    transform: none;
}

.reveal-right {
    transform: none;
}

.reveal-scale {
    transform: none;
}

.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
    opacity: 1;
    transform: none;
}

/* Stagger children */
.stagger>* {
    opacity: 1;
    transform: none;
}

.stagger.visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* ── Gold shimmer text ── */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.gold-shimmer {
    color: var(--petly-gold);
    background: linear-gradient(120deg,
            var(--petly-gold) 0%,
            var(--petly-cream) 25%,
            var(--petly-gold) 50%,
            var(--petly-cream) 75%,
            var(--petly-gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 7s linear infinite;
}

/* ── Floating ── */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(calc(var(--motion-float-y) * -1));
    }
}

.float {
    animation: float 7.5s ease-in-out infinite;
}

/* ── Pulse glow ── */
@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 8px rgba(197, 178, 100, 0.03);
    }

    50% {
        box-shadow: 0 0 14px rgba(197, 178, 100, 0.08);
    }
}

.pulse-glow {
    animation: pulse-glow 4.6s ease-in-out infinite;
}

/* ── Hero specific ── */
@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate {
    animation: hero-fade-in 0.85s var(--ease-smooth) both;
}

.hero-animate:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-animate:nth-child(2) {
    animation-delay: 0.5s;
}

.hero-animate:nth-child(3) {
    animation-delay: 0.8s;
}

.hero-animate:nth-child(4) {
    animation-delay: 1.1s;
}

/* ── Parallax background ── */
@keyframes slow-drift {
    0% {
        transform: scale(1.02) translate(0, 0);
    }

    50% {
        transform: scale(1.04) translate(-0.4%, -0.4%);
    }

    100% {
        transform: scale(1.02) translate(0, 0);
    }
}

.parallax-bg {
    animation: slow-drift 30s ease-in-out infinite;
}


/* ═══════════════════════════════════════════════
   PREMIUM EFFECT 1 — Aurora Gradient Background
   Inspired by: Aceternity UI Aurora Background
   ═══════════════════════════════════════════════ */
@keyframes aurora-shift {
    0% {
        transform: translate(-20%, -20%) rotate(0deg);
    }

    25% {
        transform: translate(10%, -15%) rotate(90deg);
    }

    50% {
        transform: translate(-5%, 10%) rotate(180deg);
    }

    75% {
        transform: translate(15%, 5%) rotate(270deg);
    }

    100% {
        transform: translate(-20%, -20%) rotate(360deg);
    }
}

.aurora {
    position: relative;
    overflow: hidden;
}

.aurora::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(ellipse 600px 600px at 30% 20%,
            rgba(197, 178, 100, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 500px 500px at 70% 80%,
            rgba(197, 178, 100, 0.05) 0%, transparent 50%),
        radial-gradient(ellipse 400px 400px at 50% 50%,
            rgba(255, 240, 200, 0.04) 0%, transparent 50%);
    animation: aurora-shift 38s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

.aurora>* {
    position: relative;
    z-index: 1;
}


/* ═══════════════════════════════════════════════
   PREMIUM EFFECT 2 — Focus Cards
   Inspired by: Aceternity UI Focus Cards
   ═══════════════════════════════════════════════ */
.focus-cards {
    display: grid;
    gap: var(--space-lg);
}

.focus-cards:hover .card {
    filter: blur(1px) brightness(0.84);
    transform: scale(0.985);
}

.focus-cards:hover .card:hover {
    filter: blur(0) brightness(1);
    transform: scale(1);
    z-index: 10;
}

.focus-cards .card {
    transition: filter 0.32s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}


/* ═══════════════════════════════════════════════
   PREMIUM EFFECT 3 — Noise / Film Grain Overlay
   Inspired by: Aceternity UI Noise Background
   ═══════════════════════════════════════════════ */
@keyframes grain-drift {

    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-5%, -10%);
    }

    30% {
        transform: translate(3%, -15%);
    }

    50% {
        transform: translate(12%, 9%);
    }

    70% {
        transform: translate(9%, 4%);
    }

    90% {
        transform: translate(-1%, 7%);
    }
}

.grain::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
    background-repeat: repeat;
    animation: grain-drift 12s steps(8) infinite;
    pointer-events: none;
    z-index: 1;
    opacity: 0.38;
}


/* ═══════════════════════════════════════════════
   PREMIUM EFFECT 4 — Animated Gradient Border
   Inspired by: uiverse.io gradient buttons
   ═══════════════════════════════════════════════ */
@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes border-spin {
    to {
        --border-angle: 360deg;
    }
}

.gradient-border {
    position: relative;
    z-index: 0;
    border: none !important;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: conic-gradient(from var(--border-angle),
            var(--petly-gold),
            var(--petly-cream),
            transparent 30%,
            transparent 70%,
            var(--petly-cream),
            var(--petly-gold));
    animation: border-spin 8s linear infinite;
    z-index: -2;
}

.gradient-border::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--petly-black);
    z-index: -1;
}

/* Glowing variant for primary CTA */
.gradient-border-glow::before {
    filter: blur(3px);
    opacity: 0.18;
}

.gradient-border-glow:hover::before {
    filter: blur(2px);
    opacity: 0.28;
}


/* ═══════════════════════════════════════════════
   PREMIUM EFFECT 5 — Text Clip Reveal
   Inspired by: Magic UI Text Reveal + GSAP
   ═══════════════════════════════════════════════ */
.text-reveal {
    overflow: hidden;
}

.text-reveal .line {
    display: block;
    overflow: hidden;
}

.text-reveal .line-inner {
    display: block;
    transform: translateY(110%);
    will-change: transform;
}


/* ═══════════════════════════════════════════════
   PREMIUM EFFECT 6 — Image Parallax Zoom
   Inspired by: Aceternity Parallax Scroll
   ═══════════════════════════════════════════════ */
.parallax-zoom {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.parallax-zoom img {
    will-change: transform;
    transition: none;
    /* GSAP handles this */
}


/* ═══════════════════════════════════════════════
   EXISTING EFFECTS — Preserved & Enhanced
   ═══════════════════════════════════════════════ */

/* ── Moving Gold Border (v2 buttons) ── */
@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes border-rotate {
    0% {
        --angle: 0deg;
    }

    100% {
        --angle: 360deg;
    }
}

.moving-border {
    position: relative;
    z-index: 0;
}

.moving-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: var(--radius-pill);
    background: conic-gradient(from var(--angle),
            var(--petly-gold),
            var(--petly-cream),
            transparent 40%,
            transparent 60%,
            var(--petly-cream),
            var(--petly-gold));
    animation: border-rotate 11s linear infinite;
    z-index: -1;
}

.moving-border::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-pill);
    background: var(--petly-black);
    z-index: -1;
}

/* ── Text Generate (word-by-word appearance) ── */
.text-generate .word {
    display: inline-block;
    opacity: 0.1;
    filter: blur(3px);
    transition: opacity 0.42s ease, filter 0.42s ease;
}

.text-generate.visible .word {
    opacity: 1;
    filter: blur(0);
}

/* ── Infinite Marquee ── */
@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.marquee {
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.marquee::before,
.marquee::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}

.marquee::before {
    left: 0;
    background: linear-gradient(to right, var(--petly-black), transparent);
}

.marquee::after {
    right: 0;
    background: linear-gradient(to left, var(--petly-black), transparent);
}

.marquee-track {
    display: inline-flex;
    gap: var(--space-xl);
    animation: marquee-scroll 36s linear infinite;
    align-items: center;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    flex-shrink: 0;
    font-family: var(--font-brand);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.15);
    transition: color var(--tr-fast);
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.marquee-item:hover {
    color: var(--petly-gold);
}

.marquee-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--petly-gold);
    opacity: 0.28;
    flex-shrink: 0;
}

/* ── 3D Tilt Card ── */
.card-3d {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-3d .card-inner {
    transition: transform 0.28s ease-out;
    transform-style: preserve-3d;
}

.card-3d .card-body {
    transform: translateZ(30px);
}

.card-3d .card-img {
    transition: transform 0.3s ease;
}

.card-3d:hover .card-img {
    transform: scale(1.02);
}

/* ── Spotlight / Cursor Glow ── */
.spotlight-container {
    position: relative;
    overflow: hidden;
}

.spotlight {
    position: absolute;
    width: 520px;
    height: 520px;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(197, 178, 100, 0.05) 0%,
            rgba(197, 178, 100, 0.015) 30%,
            transparent 70%);
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.26s ease;
    opacity: 0;
}

.spotlight-container:hover .spotlight {
    opacity: var(--motion-spotlight-opacity);
}

/* ── Card Spotlight (radial glow follows mouse) ── */
.card-spotlight {
    position: relative;
    overflow: hidden;
}

.card-spotlight::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle,
            rgba(197, 178, 100, 0.05) 0%,
            transparent 72%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.26s ease;
    left: var(--mouse-x, 50%);
    top: var(--mouse-y, 50%);
}

a.card-spotlight:hover::before,
button.card-spotlight:hover::before {
    opacity: var(--motion-spotlight-opacity);
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
    .card-spotlight::before {
        display: none;
    }
}

/* ── Magnetic hover ── */
.magnetic {
    transition: transform 0.28s ease-out;
}

/* ── Counter animation ── */
.counter {
    display: inline-block;
    font-family: var(--font-brand);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}


/* ═══════════════════════════════════════════════
   SMOOTH SCROLL PROGRESS BAR
   ═══════════════════════════════════════════════ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg,
            var(--petly-gold),
            var(--petly-cream),
            var(--petly-gold));
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    will-change: transform;
}


/* ═══════════════════════════════════════════════
   SMOOTH HOVER LINE (nav links underline)
   ═══════════════════════════════════════════════ */
.hover-line {
    position: relative;
}

.hover-line::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1.5px;
    background: var(--petly-gold);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.hover-line:hover::after,
.hover-line.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ── AURORA BACKGROUND (Premium) ── */
.aurora-bg::before,
.aurora-bg::after {
    content: '';
    position: absolute;
    filter: blur(80px);
    opacity: 0.28;
    animation: aurora-move 10s ease-in-out infinite alternate;
}

.aurora-bg::before {
    top: -20%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, var(--petly-gold-dim), transparent 70%);
    animation-duration: 20s;
}

.aurora-bg::after {
    bottom: -20%;
    right: -10%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(147, 112, 219, 0.15), transparent 70%);
    /* Subtle purple hint */
    animation-duration: 18s;
    animation-direction: alternate-reverse;
}

@keyframes aurora-move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(6%, 6%) scale(1.05);
    }
}
