/* PETRION AI — Animations & Transitions */

/* === KEYFRAME ANIMATIONS === */

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

    to {
        opacity: 1;
    }
}

/* Fade in with slide up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Slide in from left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

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

/* Slide in from right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

/* Pulse glow */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.2), inset 0 0 20px rgba(0, 229, 255, 0.05);
    }

    50% {
        box-shadow: 0 0 30px rgba(0, 229, 255, 0.4), inset 0 0 30px rgba(0, 229, 255, 0.1);
    }
}

/* Glow border animation */
@keyframes glowBorder {

    0%,
    100% {
        border-color: rgba(0, 229, 255, 0.3);
        box-shadow: 0 0 10px rgba(0, 229, 255, 0.1);
    }

    50% {
        border-color: rgba(0, 229, 255, 0.6);
        box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
    }
}

/* Float animation */
@keyframes float {

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

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

/* Underline slide */
@keyframes underlineSlide {
    from {
        width: 0;
        left: 0;
    }

    to {
        width: 100%;
        left: 0;
    }
}

/* Scale pulse */
@keyframes scalePulse {

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

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

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

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

/* Text shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

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

/* Section fade in on scroll */
.scroll-reveal {
    animation: fadeInUp 0.6s var(--ease-out) both;
}

.scroll-reveal.delayed-1 {
    animation-delay: 0.1s;
}

.scroll-reveal.delayed-2 {
    animation-delay: 0.2s;
}

.scroll-reveal.delayed-3 {
    animation-delay: 0.3s;
}

/* === UTILITY ANIMATIONS === */

/* Smooth transitions for interactive elements */
.transition-all {
    transition: all var(--duration-200) var(--ease-in-out);
}

.transition-colors {
    transition: color var(--duration-200) var(--ease-in-out),
        border-color var(--duration-200) var(--ease-in-out),
        background-color var(--duration-200) var(--ease-in-out);
}

.transition-transform {
    transition: transform var(--duration-200) var(--ease-in-out);
}

.transition-opacity {
    transition: opacity var(--duration-200) var(--ease-in-out);
}

/* === SPECIFIC ELEMENT ANIMATIONS === */

/* Hero entrance */
.hero-headline {
    animation: fadeInUp 0.8s var(--ease-out) 0.1s both;
}

.hero-subheadline {
    animation: fadeInUp 0.8s var(--ease-out) 0.25s both;
}

.hero-ctas {
    animation: fadeInUp 0.8s var(--ease-out) 0.4s both;
}

.trust-bar {
    animation: fadeInUp 0.8s var(--ease-out) 0.55s both;
}

/* Service cards stagger */
.service-card {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.15s;
}

.service-card:nth-child(3) {
    animation-delay: 0.2s;
}

.service-card:nth-child(4) {
    animation-delay: 0.25s;
}

.service-card:nth-child(5) {
    animation-delay: 0.3s;
}

.service-card:nth-child(6) {
    animation-delay: 0.35s;
}

.service-card:nth-child(7) {
    animation-delay: 0.4s;
}

/* Pricing card entrance */
.pricing-card {
    animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.pricing-card:nth-child(1) {
    animation-delay: 0.1s;
}

.pricing-card:nth-child(2) {
    animation-delay: 0.2s;
}

.pricing-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Button hover effects */
.btn {
    transition: all var(--duration-200) var(--ease-in-out);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

/* Card hover lift */
.service-card,
.pricing-card {
    transition: all var(--duration-200) var(--ease-in-out);
}

.service-card:hover {
    transform: translateY(-6px);
}

.pricing-card:hover {
    transform: translateY(-4px);
}

/* Nav link underline */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan);
    transition: width var(--duration-300) var(--ease-out);
}

.nav-link:hover::after {
    width: 100%;
}

/* Loading spinner for solutions finder */
@keyframes spinner {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 2px solid rgba(0, 229, 255, 0.2);
    border-top: 2px solid #00E5FF;
    border-radius: 50%;
    animation: spinner 1s linear infinite;
}

/* === MOBILE MENU === */

/* Hamburger animation */
.hamburger span {
    transition: all var(--duration-300) var(--ease-in-out);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile nav slide in */
.mobile-nav {
    animation: slideInRight 0.3s var(--ease-out);
}

/* === MODAL / OVERLAY === */

.overlay {
    animation: fadeIn 0.2s var(--ease-out);
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Scroll-triggered fade-in-up */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.fade-in-up:nth-child(2) {
    transition-delay: 0.15s;
}

.fade-in-up:nth-child(3) {
    transition-delay: 0.3s;
}

/* === SUCCESS STATE ANIMATIONS === */

@keyframes successFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes contentFadeOut {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

/* Animated SVG checkmark */
@keyframes checkCircle {
    0% {
        stroke-dashoffset: 251;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes checkStroke {
    0% {
        stroke-dashoffset: 50;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

/* === INTERSECTION OBSERVER - ADD IN JS === */
/* When elements enter viewport, they'll be assigned 'active' class */
/* .scroll-reveal.active { animation: ... } */