/* ========================================
   Steelner Inovahouse - Animations
   ======================================== */

/* ========== Fade In Animations ========== */
@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);
    }
}

/* ========== Scale Animations ========== */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.05);
    }
}

/* ========== Slide Animations ========== */
@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* ========== Bounce Animation ========== */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

/* ========== Pulse Animation ========== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ========== Shake Animation ========== */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* ========== Rotate Animation ========== */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ========== Gradient Animation ========== */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========== Wave Animation ========== */
@keyframes wave {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-3px);
    }
}

/* ========== Glow Animation ========== */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(63, 192, 185, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(63, 192, 185, 0.8);
    }
}

/* ========== Animation Classes ========== */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.fade-in-down {
    opacity: 0;
    animation: fadeInDown 0.8s ease-out forwards;
}

.fade-in-left {
    opacity: 0;
    animation: fadeInLeft 0.8s ease-out forwards;
}

.fade-in-right {
    opacity: 0;
    animation: fadeInRight 0.8s ease-out forwards;
}

.scale-in {
    animation: scaleIn 0.5s ease-out forwards;
}

.bounce {
    animation: bounce 2s infinite;
}

.pulse {
    animation: pulse 2s infinite;
}

.shake {
    animation: shake 0.5s;
}

.rotate {
    animation: rotate 2s linear infinite;
}

/* ========== Animation Delays ========== */
[data-delay="0.1"] {
    animation-delay: 0.1s;
}

[data-delay="0.2"] {
    animation-delay: 0.2s;
}

[data-delay="0.3"] {
    animation-delay: 0.3s;
}

[data-delay="0.4"] {
    animation-delay: 0.4s;
}

[data-delay="0.5"] {
    animation-delay: 0.5s;
}

[data-delay="0.6"] {
    animation-delay: 0.6s;
}

[data-delay="0.7"] {
    animation-delay: 0.7s;
}

[data-delay="0.8"] {
    animation-delay: 0.8s;
}

[data-delay="0.9"] {
    animation-delay: 0.9s;
}

[data-delay="1"] {
    animation-delay: 1s;
}

/* ========== Scroll-triggered Animations ========== */
.card-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.card-animate.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Hover Effects ========== */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.02);
}

.hover-glow {
    transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(63, 192, 185, 0.5);
}

/* ========== Loading Animation ========== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(63, 192, 185, 0.2);
    border-top-color: var(--color-primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* ========== Text Animations ========== */
.text-glow {
    animation: textGlow 2s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(63, 192, 185, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(63, 192, 185, 0.8);
    }
}

/* ========== Stagger Animations ========== */
.stagger-item {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-item:nth-child(1) {
    animation: fadeInUp 0.6s ease-out 0.1s forwards;
}

.stagger-item:nth-child(2) {
    animation: fadeInUp 0.6s ease-out 0.2s forwards;
}

.stagger-item:nth-child(3) {
    animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.stagger-item:nth-child(4) {
    animation: fadeInUp 0.6s ease-out 0.4s forwards;
}

.stagger-item:nth-child(5) {
    animation: fadeInUp 0.6s ease-out 0.5s forwards;
}

.stagger-item:nth-child(6) {
    animation: fadeInUp 0.6s ease-out 0.6s forwards;
}

/* ========== Counter Animation ========== */
.counter {
    transition: all 0.5s ease;
}

/* ========== Parallax Effect ========== */
.parallax {
    transition: transform 0.3s ease-out;
}

/* ========== Gradient Background Animation ========== */
.animated-gradient {
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-400), var(--color-primary-500));
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* ========== Skeleton Loading ========== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ========== Reveal Animations ========== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ========== Typewriter Effect ========== */
@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--color-primary-500);
    animation: typewriter 3s steps(40) 1s forwards, blink 0.75s step-end infinite;
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

/* ========== Smooth Scroll ========== */
html {
    scroll-behavior: smooth;
}

/* ========== Float Animation ========== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

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

/* ========== Gradient Border Animation ========== */
@keyframes borderGradient {
    0% { border-image-source: linear-gradient(0deg, var(--color-primary-500), var(--color-primary-500)); }
    50% { border-image-source: linear-gradient(180deg, var(--color-primary-500), var(--color-primary-500)); }
    100% { border-image-source: linear-gradient(360deg, var(--color-primary-500), var(--color-primary-500)); }
}

.gradient-border-animated {
    border: 2px solid transparent;
    border-image: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-500)) 1;
    animation: borderGradient 4s linear infinite;
}

/* ========== Text Reveal with Clip Path ========== */
@keyframes textReveal {
    from { clip-path: inset(0 100% 0 0); }
    to { clip-path: inset(0 0 0 0); }
}

.text-reveal {
    clip-path: inset(0 100% 0 0);
}

.text-reveal.active {
    animation: textReveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* Magnetic hover - REMOVED (excessive effect) */

/* 3D Tilt Card - REMOVED (excessive effect) */

/* ========== Shine Sweep Effect ========== */
@keyframes shineSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

.shine-sweep {
    position: relative;
    overflow: hidden;
}

.shine-sweep::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: skewX(-20deg);
    animation: shineSweep 4s ease-in-out infinite;
    pointer-events: none;
}

/* ========== Dot Grid Background ========== */
.dot-grid-bg {
    background-image: radial-gradient(circle, rgba(63,192,185,0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ========== Count Up Number ========== */
.count-up {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
}

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

.reveal-stagger.in-view > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.reveal-stagger.in-view > *:nth-child(7) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ========== Glowing Dot ========== */
@keyframes dotGlow {
    0%, 100% { box-shadow: 0 0 4px rgba(63,192,185,0.4), 0 0 12px rgba(63,192,185,0.2); }
    50% { box-shadow: 0 0 8px rgba(63,192,185,0.8), 0 0 24px rgba(63,192,185,0.4); }
}

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

/* ========== Progress Bar Fill ========== */
@keyframes progressFill {
    from { width: 0; }
    to { width: var(--progress, 100%); }
}

.progress-fill {
    animation: progressFill 1.5s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

/* ========== Card Entrance - Scale Up ========== */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.card-entrance {
    opacity: 0;
}

.card-entrance.in-view {
    animation: cardEntrance 0.6s cubic-bezier(0.33, 1, 0.68, 1) forwards;
}

/* ========== Icon Spin on Hover ========== */
.icon-spin-hover:hover i,
.icon-spin-hover:hover svg {
    animation: rotate 0.6s cubic-bezier(0.33, 1, 0.68, 1);
}

/* ========== Underline Grow ========== */
.underline-grow {
    position: relative;
    display: inline-block;
}

.underline-grow::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.4s cubic-bezier(0.33, 1, 0.68, 1);
}

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

/* ========== Blur In ========== */
@keyframes blurIn {
    from {
        opacity: 0;
        filter: blur(10px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

.blur-in {
    opacity: 0;
}

.blur-in.in-view {
    animation: blurIn 0.8s ease-out forwards;
}

/* ========== Wall Layer Highlight ========== */
@keyframes layerPulse {
    0%, 100% { transform: scaleX(1); }
    50% { transform: scaleX(1.02); }
}

.wall-layer:hover {
    animation: layerPulse 0.6s ease;
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
