/* ============================================
   SHOONER CONSTRUCTION - Animations
   ============================================ */

/* --- Scroll Reveal Base --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Fade Up --- */
.fade-up {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Fade Down --- */
.fade-down {
    opacity: 0;
    transform: translateY(-60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-down.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Slide Left --- */
.slide-left {
    opacity: 0;
    transform: translateX(-80px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* --- Slide Right --- */
.slide-right {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.slide-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* --- Scale --- */
.scale-in {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

/* --- Rotate In --- */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.rotate-in.active {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* --- Stagger Children --- */
.stagger-children>* {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stagger-children.active>*:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.active>*:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.active>*:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.active>*:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children.active>*:nth-child(5) {
    transition-delay: 0.5s;
}

.stagger-children.active>*:nth-child(6) {
    transition-delay: 0.6s;
}

.stagger-children.active>*:nth-child(7) {
    transition-delay: 0.7s;
}

.stagger-children.active>*:nth-child(8) {
    transition-delay: 0.8s;
}

.stagger-children.active>*:nth-child(9) {
    transition-delay: 0.9s;
}

.stagger-children.active>*:nth-child(10) {
    transition-delay: 1.0s;
}

.stagger-children.active>*:nth-child(11) {
    transition-delay: 1.1s;
}

.stagger-children.active>*:nth-child(12) {
    transition-delay: 1.2s;
}

.stagger-children.active>* {
    opacity: 1;
    transform: translateY(0);
}

/* --- Delay Utilities --- */
.delay-1 {
    transition-delay: 0.1s !important;
}

.delay-2 {
    transition-delay: 0.2s !important;
}

.delay-3 {
    transition-delay: 0.3s !important;
}

.delay-4 {
    transition-delay: 0.4s !important;
}

.delay-5 {
    transition-delay: 0.5s !important;
}

.delay-6 {
    transition-delay: 0.6s !important;
}

.delay-7 {
    transition-delay: 0.7s !important;
}

.delay-8 {
    transition-delay: 0.8s !important;
}

/* --- Parallax --- */
.parallax-element {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* --- Floating Animation --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes float-slow {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-15px) rotate(3deg);
    }
}

@keyframes float-reverse {

    0%,
    100% {
        transform: translateY(-20px);
    }

    50% {
        transform: translateY(0px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

.float-slow {
    animation: float-slow 8s ease-in-out infinite;
}

.float-reverse {
    animation: float-reverse 7s ease-in-out infinite;
}

/* --- Pulse Animation --- */
@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 168, 79, 0.4);
    }

    50% {
        box-shadow: 0 0 0 20px rgba(212, 168, 79, 0);
    }
}

.pulse {
    animation: pulse 3s ease-in-out infinite;
}

.pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* --- Shimmer --- */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

.shimmer {
    background: linear-gradient(90deg, transparent, rgba(212, 168, 79, 0.1), transparent);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* --- Rotate --- */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-reverse {
    from {
        transform: rotate(360deg);
    }

    to {
        transform: rotate(0deg);
    }
}

.spin-slow {
    animation: spin-slow 20s linear infinite;
}

.spin-reverse {
    animation: spin-reverse 15s linear infinite;
}

/* --- Counter Animation --- */
.counter {
    display: inline-block;
}

/* --- Progress Bar Animation --- */
.progress-animate {
    width: 0%;
    transition: width 1.5s ease-in-out;
}

.progress-animate.active {
    width: var(--progress-width, 100%);
}

/* --- Typewriter --- */
@keyframes typewriter {
    from {
        width: 0;
    }

    to {
        width: 100%;
    }
}

@keyframes blink-caret {

    from,
    to {
        border-color: transparent;
    }

    50% {
        border-color: var(--secondary);
    }
}

/* --- Background Shape Animations --- */
@keyframes morph {

    0%,
    100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

.morph-shape {
    animation: morph 8s ease-in-out infinite;
}

/* --- Gradient Animation --- */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

/* --- Slide In from Bottom (Hero) --- */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(80px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content>* {
    animation: slideInUp 0.8s ease forwards;
    opacity: 0;
}

.hero-content>*:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-content>*:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-content>*:nth-child(3) {
    animation-delay: 0.6s;
}

.hero-content>*:nth-child(4) {
    animation-delay: 0.8s;
}

.hero-content>*:nth-child(5) {
    animation-delay: 1.0s;
}

/* --- Hover Lift --- */
.hover-lift {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
}

/* --- Hover Glow --- */
.hover-glow {
    transition: box-shadow 0.4s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(212, 168, 79, 0.2);
}

/* --- Image Zoom on Hover --- */
.img-zoom {
    overflow: hidden;
}

.img-zoom img,
.img-zoom svg {
    transition: transform 0.6s ease;
}

.img-zoom:hover img,
.img-zoom:hover svg {
    transform: scale(1.08);
}

/* --- Magnetic Button Effect --- */
.magnetic-btn {
    transition: transform 0.3s ease;
}

/* --- Text Reveal --- */
@keyframes text-reveal {
    from {
        clip-path: inset(0 100% 0 0);
    }

    to {
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: text-reveal 1s ease forwards;
}

/* --- Line Draw --- */
@keyframes line-draw {
    from {
        stroke-dashoffset: 1000;
    }

    to {
        stroke-dashoffset: 0;
    }
}

.line-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: line-draw 2s ease forwards;
}

/* --- Bounce --- */
@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.bounce-subtle {
    animation: bounce-subtle 2s ease-in-out infinite;
}

/* --- Fade In --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

/* --- Scale Bounce --- */
@keyframes scale-bounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.scale-bounce {
    animation: scale-bounce 0.6s ease forwards;
}

/* --- Mouse Follow Effect --- */
.mouse-follow {
    transition: transform 0.15s ease-out;
}

/* --- Particle Float --- */
@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* --- Wave Animation --- */
@keyframes wave {

    0%,
    100% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }

    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.55);
    }
}

/* --- Reduce Motion --- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .reveal,
    .fade-up,
    .fade-down,
    .slide-left,
    .slide-right,
    .scale-in {
        opacity: 1;
        transform: none;
    }

    .hero-content>* {
        opacity: 1;
        animation: none;
    }
}

/* --- Animated Construction Scene --- */
@keyframes craneHook {

    0%,
    100% {
        height: 60px;
    }

    50% {
        height: 100px;
    }
}

@keyframes buildUp {
    0% {
        height: 0;
        opacity: 0;
    }

    50% {
        height: 200px;
        opacity: 1;
    }

    100% {
        height: 200px;
        opacity: 1;
    }
}

@keyframes workerMove {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(20px);
    }
}

@keyframes particleFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-30px) scale(1.5);
        opacity: 1;
    }
}

/* --- Static Content: disable scroll-triggered reveals --- */
.reveal,
.fade-up,
.fade-down,
.slide-left,
.slide-right,
.scale-in,
.rotate-in,
.stagger-children,
.stagger-children>* {
    opacity: 1 !important;
    transform: none !important;
}

.hero-content>* {
    opacity: 1 !important;
    animation: none !important;
}