﻿/* =========================================================
   TECHNOTECH INNOVATIONS
   GLOBAL WEBSITE ANIMATION SYSTEM
   SAFE + PREMIUM VERSION
   ========================================================= */


/* =========================================================
   1. BASE REVEAL SYSTEM
   ========================================================= */

/*
   IMPORTANT:
   Elements are visible by default.

   JavaScript adds .animations-ready to <html>.
   Only then do reveal animations become active.

   This prevents the entire website from disappearing
   if JavaScript fails or loads late.
*/

.reveal-up,
.reveal-down,
.reveal-left,
.reveal-right,
.reveal-scale,
.stagger-item {
    opacity: 1;
    transform: none;
}


/* =========================================================
   2. JAVASCRIPT-ENABLED REVEALS
   ========================================================= */

html.animations-ready .reveal-up,
html.animations-ready .reveal-down,
html.animations-ready .reveal-left,
html.animations-ready .reveal-right,
html.animations-ready .reveal-scale,
html.animations-ready .stagger-item {
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}


/* Starting positions */

html.animations-ready .reveal-up {
    opacity: 0;
    transform: translate3d(0, 45px, 0);
}

html.animations-ready .reveal-down {
    opacity: 0;
    transform: translate3d(0, -45px, 0);
}

html.animations-ready .reveal-left {
    opacity: 0;
    transform: translate3d(-55px, 0, 0);
}

html.animations-ready .reveal-right {
    opacity: 0;
    transform: translate3d(55px, 0, 0);
}

html.animations-ready .reveal-scale {
    opacity: 0;
    transform: scale(0.92);
}


    /* Visible state */

    html.animations-ready .reveal-up.is-visible,
    html.animations-ready .reveal-down.is-visible,
    html.animations-ready .reveal-left.is-visible,
    html.animations-ready .reveal-right.is-visible,
    html.animations-ready .reveal-scale.is-visible {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }

/* =========================================================
   3. STAGGERED REVEAL
   ========================================================= */

/*
   IMPORTANT:
   Stagger animation controls opacity only.

   It intentionally does NOT control transform.
   This prevents conflicts with page-specific
   card hover and layout styles.
*/

html.animations-ready .stagger-item {
    opacity: 0;
    transition: opacity 0.7s ease;
}

    html.animations-ready .stagger-item.is-visible {
        opacity: 1;
    }


/* =========================================================
   STAGGER TIMING
   ========================================================= */

.stagger-item:nth-child(1) {
    transition-delay: 0.04s;
}

.stagger-item:nth-child(2) {
    transition-delay: 0.09s;
}

.stagger-item:nth-child(3) {
    transition-delay: 0.14s;
}

.stagger-item:nth-child(4) {
    transition-delay: 0.19s;
}

.stagger-item:nth-child(5) {
    transition-delay: 0.24s;
}

.stagger-item:nth-child(6) {
    transition-delay: 0.29s;
}

.stagger-item:nth-child(7) {
    transition-delay: 0.34s;
}

.stagger-item:nth-child(8) {
    transition-delay: 0.39s;
}



/* =========================================================
   4. PREMIUM CARD HOVER
   ========================================================= */

/*
   motion-card provides visual polish only.

   It does NOT define transform.
   Individual pages remain responsible for
   their own card movement.
*/

.motion-card {
    position: relative;
    transition: box-shadow 0.45s ease, border-color 0.45s ease;
}

@media (hover: hover) and (pointer: fine) {

    .motion-card:hover {
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.10);
    }
}

/* =========================================================
   5. IMAGE HOVER ZOOM
   ========================================================= */

.motion-image {
    overflow: hidden;
}

    .motion-image img {
        transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

@media (hover: hover) and (pointer: fine) {

    .motion-image:hover img {
        transform: scale(1.06);
    }
}


/* =========================================================
   6. FLOATING ELEMENTS
   ========================================================= */

.float-slow {
    animation: technotechFloat 6s ease-in-out infinite;
}

.float-medium {
    animation: technotechFloat 4.5s ease-in-out infinite;
}

@keyframes technotechFloat {

    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}


/* =========================================================
   7. SOFT PULSE
   ========================================================= */

.soft-pulse {
    animation: technotechPulse 3s ease-in-out infinite;
}

@keyframes technotechPulse {

    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.025);
    }
}


/* =========================================================
   8. DECORATIVE MOVING SHAPES
   ========================================================= */

.motion-shape {
    animation: technotechShapeMove 10s ease-in-out infinite;
}

@keyframes technotechShapeMove {

    0%, 100% {
        transform: translate3d(0, 0, 0) rotate(0deg);
    }

    50% {
        transform: translate3d(12px, -15px, 0) rotate(4deg);
    }
}


/* =========================================================
   9. BUTTON MICRO INTERACTION
   ========================================================= */

.motion-button {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .motion-button::before {
        content: "";
        position: absolute;
        top: 0;
        left: -110%;
        width: 70%;
        height: 100%;
        background: rgba(255, 255, 255, 0.16);
        transform: skewX(-20deg);
        transition: left 0.55s ease;
        pointer-events: none;
    }

    .motion-button span,
    .motion-button i {
        position: relative;
        z-index: 2;
    }

@media (hover: hover) and (pointer: fine) {

    .motion-button:hover {
        transform: translateY(-3px);
    }

        .motion-button:hover::before {
            left: 130%;
        }
}


/* =========================================================
   10. ICON MICRO MOVEMENT
   ========================================================= */

/*
   Icons should not receive a global transform.
   Individual pages can control icon movement when needed.
*/

.motion-icon {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   11. LINK UNDERLINE
   ========================================================= */

.motion-link {
    position: relative;
    text-decoration: none;
}

    .motion-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -4px;
        width: 0;
        height: 2px;
        background: currentColor;
        transition: width 0.35s ease;
    }

@media (hover: hover) and (pointer: fine) {

    .motion-link:hover::after {
        width: 100%;
    }
}


/* =========================================================
   12. HERO ANIMATION
   ========================================================= */

.hero-motion {
    opacity: 0;
    transform: translate3d(0, 35px, 0);
    animation: heroReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-motion-delay-1 {
    animation-delay: 0.12s;
}

.hero-motion-delay-2 {
    animation-delay: 0.24s;
}

.hero-motion-delay-3 {
    animation-delay: 0.36s;
}

@keyframes heroReveal {

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}


/* =========================================================
   13. PAGE ENTRANCE
   ========================================================= */

.page-transition {
    animation: pageEnter 0.55s ease both;
}

@keyframes pageEnter {

    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}


/* =========================================================
   14. SAFE PARALLAX
   ========================================================= */

.parallax-image {
    will-change: transform;
}


/* =========================================================
   15. MOBILE SAFETY
   ========================================================= */

@media (max-width: 767px) {

    html.animations-ready .reveal-left {
        transform: translate3d(-30px, 0, 0);
    }

    html.animations-ready .reveal-right {
        transform: translate3d(30px, 0, 0);
    }

    html.animations-ready .reveal-up {
        transform: translate3d(0, 25px, 0);
    }

    html.animations-ready .reveal-down {
        transform: translate3d(0, -25px, 0);
    }
}


/* =========================================================
   16. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }

    .reveal-up,
    .reveal-down,
    .reveal-left,
    .reveal-right,
    .reveal-scale,
    .stagger-item,
    .hero-motion {
        opacity: 1 !important;
        transform: none !important;
    }
}
/* =========================================================
   17. HERO IMAGE MOTION
   ========================================================= */

.hero-image-motion {
    opacity: 0;
    transform: scale(1.04);
    animation: heroImageReveal 1.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heroImageReveal {
    from {
        opacity: 0;
        transform: scale(1.04);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}