/* ============================================================
   TechRyon - Animations Stylesheet
   Keyframes, transitions, scroll effects
   ============================================================ */

/* ============================================================
   KEYFRAME ANIMATIONS
   ============================================================ */

@keyframes glowPulse {
    0% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.5;
        transform: scale(1);
    }
}

@keyframes pulseDot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.5);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(0, 212, 255, 0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 200%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderGlow {

    0%,
    100% {
        border-color: rgba(0, 212, 255, 0.2);
    }

    50% {
        border-color: rgba(0, 212, 255, 0.6);
    }
}

@keyframes rotateGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes typeCursor {

    0%,
    100% {
        border-right-color: var(--color-neon-blue);
    }

    50% {
        border-right-color: transparent;
    }
}

@keyframes scanLine {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}

@keyframes gridSlide {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(60px);
    }
}

@keyframes counterUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes neonFlicker {

    0%,
    19%,
    21%,
    23%,
    25%,
    54%,
    56%,
    100% {
        text-shadow:
            0 0 8px rgba(0, 212, 255, 0.8),
            0 0 16px rgba(0, 212, 255, 0.6),
            0 0 32px rgba(0, 212, 255, 0.4);
    }

    20%,
    22%,
    24%,
    55% {
        text-shadow: none;
    }
}

@keyframes borderScan {
    0% {
        clip-path: polygon(0 0, 100% 0, 100% 2%, 0 2%);
    }

    25% {
        clip-path: polygon(98% 0, 100% 0, 100% 100%, 98% 100%);
    }

    50% {
        clip-path: polygon(0 98%, 100% 98%, 100% 100%, 0 100%);
    }

    75% {
        clip-path: polygon(0 0, 2% 0, 2% 100%, 0 100%);
    }

    100% {
        clip-path: polygon(0 0, 100% 0, 100% 2%, 0 2%);
    }
}

/* ============================================================
   ANIMATED GRID BACKGROUND
   ============================================================ */
.animated-grid {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.animated-grid-inner {
    position: absolute;
    inset: -60px;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridSlide 8s linear infinite;
}

/* ============================================================
   ANIMATED SCAN LINE
   ============================================================ */
.scan-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    animation: scanLine 4s linear infinite;
    pointer-events: none;
}

/* ============================================================
   FLOATING ELEMENT
   ============================================================ */
.float-anim {
    animation: float 5s ease-in-out infinite;
}

.float-anim-slow {
    animation: float 8s ease-in-out infinite;
}

/* ============================================================
   NEON TEXT GLOW
   ============================================================ */
.neon-text {
    text-shadow:
        0 0 8px rgba(0, 212, 255, 0.7),
        0 0 16px rgba(0, 212, 255, 0.5),
        0 0 32px rgba(0, 212, 255, 0.3);
}

.neon-text-green {
    text-shadow:
        0 0 8px rgba(0, 255, 135, 0.7),
        0 0 16px rgba(0, 255, 135, 0.5),
        0 0 32px rgba(0, 255, 135, 0.3);
}

/* ============================================================
   CARD BORDER GLOW ANIMATION
   ============================================================ */
.border-glow-anim {
    animation: borderGlow 3s ease-in-out infinite;
}

/* ============================================================
   HERO CONTENT ENTRANCE
   ============================================================ */
.hero-animate .hero-badge {
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-animate .hero-title {
    animation: fadeInUp 0.7s ease 0.25s both;
}

.hero-animate .hero-sub {
    animation: fadeInUp 0.7s ease 0.4s both;
}

.hero-animate .hero-actions {
    animation: fadeInUp 0.7s ease 0.55s both;
}

.hero-animate .hero-stats {
    animation: fadeInUp 0.7s ease 0.7s both;
}

/* ============================================================
   PAGE HERO ENTRANCE
   ============================================================ */
.page-hero-animate .section-label {
    animation: fadeInUp 0.5s ease 0.1s both;
}

.page-hero-animate .page-hero-title {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.page-hero-animate .page-hero-sub {
    animation: fadeInUp 0.6s ease 0.35s both;
}

.page-hero-animate .page-hero-actions {
    animation: fadeInUp 0.6s ease 0.5s both;
}

/* ============================================================
   CARD HOVER: SCAN BORDER EFFECT
   ============================================================ */
.card-scan {
    position: relative;
}

.card-scan::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid rgba(0, 212, 255, 0);
    pointer-events: none;
    transition: border-color var(--transition-slow);
}

.card-scan:hover::after {
    border-color: rgba(0, 212, 255, 0.2);
    animation: borderGlow 2s ease-in-out infinite;
}

/* ============================================================
   SPINNER / LOADER
   ============================================================ */
.spinner {
    width: 32px;
    height: 32px;
    border: 2px solid rgba(0, 212, 255, 0.1);
    border-top-color: var(--color-neon-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   METRIC COUNTER (JS-driven)
   ============================================================ */
.counter-animated {
    animation: counterUp 0.6s ease both;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar-wrap {
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-full);
    height: 6px;
    overflow: hidden;
    margin-top: var(--space-2);
}

.progress-bar-fill {
    height: 100%;
    background: var(--grad-primary);
    border-radius: var(--radius-full);
    transform-origin: left;
    transform: scaleX(0);
    transition: transform 1.2s ease;
}

.progress-bar-fill.animated {
    transform: scaleX(1);
}

/* ============================================================
   PARTICLE ORBS (decoration)
   ============================================================ */
.orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.2;
}

.orb-blue {
    background: var(--color-neon-blue);
    animation: float 10s ease-in-out infinite;
}

.orb-green {
    background: var(--color-neon-green);
    animation: float 14s ease-in-out infinite reverse;
}

.orb-purple {
    background: var(--color-neon-purple);
    animation: float 12s ease-in-out infinite 2s;
}

/* ============================================================
   TYPING CURSOR
   ============================================================ */
.typing-cursor {
    border-right: 2px solid var(--color-neon-blue);
    padding-right: 4px;
    animation: typeCursor 1s step-start infinite;
}

/* ============================================================
   SCROLL REVEAL STAGGER CHILDREN
   ============================================================ */
.stagger-children>*:nth-child(1) {
    transition-delay: 0s;
}

.stagger-children>*:nth-child(2) {
    transition-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    transition-delay: 0.2s;
}

.stagger-children>*:nth-child(4) {
    transition-delay: 0.3s;
}

.stagger-children>*:nth-child(5) {
    transition-delay: 0.4s;
}

.stagger-children>*:nth-child(6) {
    transition-delay: 0.5s;
}

.stagger-children>*:nth-child(7) {
    transition-delay: 0.6s;
}

.stagger-children>*:nth-child(8) {
    transition-delay: 0.7s;
}

/* Media: Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}