/* ============================================
   TEANBRIS STUDIO - Premium Animations
   Extracted & Enhanced from AddizTech
   ============================================ */

/* =============================================
   CUSTOM CURSOR EFFECTS
   ============================================= */

/* Small cursor dot */
.cursor-small {
    position: fixed;
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10001;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, opacity 0.3s ease;
    mix-blend-mode: difference;
}

/* Large cursor circle */
.cursor-big {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transform: translate(-50%, -50%);
    transition: transform 0.15s ease-out, width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}

.cursor-big.hover {
    width: 60px;
    height: 60px;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

.cursor-big.click {
    transform: translate(-50%, -50%) scale(0.9);
}

/* Hide custom cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    .cursor-small,
    .cursor-big {
        display: none !important;
    }
}

/* =============================================
   SCROLL REVEAL ANIMATIONS
   ============================================= */

/* Fade In Up */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade In Left */
.animate-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade In Right */
.animate-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Zoom In */
.animate-zoom {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-zoom.is-visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger animation delays */
.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

/* =============================================
   ROTATING TEXT CIRCLE (SVG Animation)
   ============================================= */

.rotating-text-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

.rotating-text-circle svg {
    width: 100%;
    height: 100%;
    animation: rotateText 15s linear infinite;
}

@keyframes rotateText {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotating-text-circle .center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

/* =============================================
   MARQUEE / INFINITE SCROLL TEXT
   ============================================= */

.marquee-wrapper {
    overflow: hidden;
    white-space: nowrap;
    padding: 40px 0;
}

.marquee-track {
    display: inline-flex;
    animation: marqueeScroll 40s linear infinite;
}

.marquee-track span {
    font-size: clamp(48px, 8vw, 80px);
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    line-height: 1.3;
    margin-right: 3rem;
    white-space: nowrap;
    font-family: var(--font-display);
    letter-spacing: 8px;
}

.marquee-track .highlight {
    color: rgba(255, 255, 255, 0.4);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Reverse direction */
.marquee-track.reverse {
    animation-direction: reverse;
}

/* =============================================
   HOVER BORDER ANIMATION (Info Cards)
   ============================================= */

.animated-border-card {
    position: relative;
    overflow: hidden;
}

.animated-border-card::before,
.animated-border-card::after {
    content: '';
    position: absolute;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Top border animation */
.animated-border-card::before {
    top: 0;
    left: -100%;
    width: 100%;
    height: 1px;
    transition: left 0.5s ease;
}

/* Bottom border animation */
.animated-border-card::after {
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 1px;
    transition: right 0.5s ease;
}

.animated-border-card:hover::before {
    left: 100%;
}

.animated-border-card:hover::after {
    right: 100%;
}

/* Side borders */
.animated-border-card .border-left,
.animated-border-card .border-right {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

.animated-border-card .border-left {
    left: 0;
    top: -100%;
    transition: top 0.5s ease 0.1s;
}

.animated-border-card .border-right {
    right: 0;
    bottom: -100%;
    transition: bottom 0.5s ease 0.1s;
}

.animated-border-card:hover .border-left {
    top: 100%;
}

.animated-border-card:hover .border-right {
    bottom: 100%;
}

/* =============================================
   BUTTON RIPPLE EFFECT
   ============================================= */

.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:hover::before {
    width: 300%;
    height: 300%;
}

/* =============================================
   GLOWING BORDER ANIMATION
   ============================================= */

.glow-border {
    position: relative;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, 
        transparent, 
        rgba(255, 255, 255, 0.1), 
        transparent, 
        rgba(255, 255, 255, 0.1));
    background-size: 400% 400%;
    border-radius: inherit;
    z-index: -1;
    animation: glowMove 3s ease infinite;
}

@keyframes glowMove {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* =============================================
   FLOATING ANIMATION
   ============================================= */

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

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.float-delayed {
    animation: floatAnimation 6s ease-in-out infinite;
    animation-delay: 2s;
}

/* =============================================
   SCALE UP ON HOVER
   ============================================= */

.scale-on-hover {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-on-hover:hover {
    transform: scale(1.05);
}

/* =============================================
   IMAGE PARALLAX EFFECT
   ============================================= */

.parallax-container {
    overflow: hidden;
}

.parallax-image {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* =============================================
   GRADIENT TEXT ANIMATION
   ============================================= */

.gradient-text {
    background: linear-gradient(
        90deg,
        var(--text-primary) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        var(--text-primary) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* =============================================
   TYPEWRITER EFFECT
   ============================================= */

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--text-primary);
    animation: typing 3.5s steps(40, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--text-primary); }
}

/* =============================================
   PULSE ANIMATION
   ============================================= */

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

@keyframes pulseAnimation {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* =============================================
   SHAKE ON HOVER
   ============================================= */

.shake-on-hover:hover {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* =============================================
   SMOOTH UNDERLINE ANIMATION
   ============================================= */

.animated-underline {
    position: relative;
    display: inline-block;
}

.animated-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.3s ease;
}

.animated-underline:hover::after {
    width: 100%;
}

/* =============================================
   ICON ROTATE ON HOVER
   ============================================= */

.rotate-on-hover {
    transition: transform 0.4s ease;
}

.rotate-on-hover:hover {
    transform: rotate(45deg);
}

/* =============================================
   COUNTER ANIMATION (Number Increment)
   ============================================= */

.counter-animate {
    font-variant-numeric: tabular-nums;
}

/* =============================================
   SKELETON LOADING
   ============================================= */

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================
   FADE IN ANIMATION CLASSES
   ============================================= */

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

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-down {
    animation: fadeInDown 0.6s ease forwards;
}

.fade-in-left {
    animation: fadeInLeft 0.6s ease forwards;
}

.fade-in-right {
    animation: fadeInRight 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =============================================
   SCROLL PROGRESS BAR
   ============================================= */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.3), rgba(255,255,255,0.8));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* =============================================
   MOUSE SCROLL INDICATOR
   ============================================= */

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transform: translateX(-50%);
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0%, 100% {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(10px);
    }
}

/* =============================================
   MAGNETIC BUTTON EFFECT (JS Required)
   ============================================= */

.magnetic-btn {
    transition: transform 0.3s ease;
}

/* =============================================
   BLUR IN ANIMATION
   ============================================= */

.blur-in {
    animation: blurIn 0.6s ease forwards;
}

@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* =============================================
   FLIP ANIMATION
   ============================================= */

.flip-container {
    perspective: 1000px;
}

.flip-card {
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.flip-container:hover .flip-card {
    transform: rotateY(180deg);
}

/* =============================================
   RESPONSIVE ADJUSTMENTS
   ============================================= */

@media (max-width: 768px) {
    .marquee-track span {
        font-size: clamp(32px, 6vw, 48px);
        letter-spacing: 4px;
    }
    
    .rotating-text-circle {
        width: 100px;
        height: 100px;
    }
}
