/* Advanced Animations & Dynamic Effects */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   PAGE LOAD ANIMATIONS
   ======================================== */

@keyframes pageLoad {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    animation: pageLoad 0.6s ease-out;
}

/* Hero Title Entrance Animation */
@keyframes heroTitleSlide {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroDescSlide {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroButtonPop {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-title {
    animation: heroTitleSlide 0.8s ease-out 0.2s both;
}

.hero-description {
    animation: heroDescSlide 0.8s ease-out 0.4s both;
}

.hero-buttons {
    animation: heroButtonPop 0.6s ease-out 0.6s both;
}

.hero-visual {
    animation: heroButtonPop 0.8s ease-out 0.5s both;
}

/* ========================================
   ENHANCED BUTTON EFFECTS
   ======================================== */

.btn-primary,
.btn-secondary,
.btn-download,
.btn-primary-large,
.pricing-btn,
.download-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ripple Effect */
.btn-primary::before,
.btn-secondary::before,
.btn-download::before,
.btn-primary-large::before,
.pricing-btn-primary::before,
.download-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-download:hover::before,
.btn-primary-large:hover::before,
.pricing-btn-primary:hover::before,
.download-btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-secondary::before {
    background: rgba(26, 115, 232, 0.1);
}

.btn-secondary:hover::before,
.pricing-btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

/* Glow Effect on Hover */
@keyframes buttonGlow {

    0%,
    100% {
        box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
    }

    50% {
        box-shadow: 0 6px 20px rgba(26, 115, 232, 0.5);
    }
}

.btn-primary:hover,
.btn-download:hover,
.pricing-btn-primary:hover,
.download-btn:hover {
    animation: buttonGlow 1.5s ease-in-out infinite;
}

/* ========================================
   ENHANCED CARD EFFECTS
   ======================================== */

.feature-card,
.blog-card,
.blog-card-landing,
.built-for-card,
.use-case-card,
.pricing-card,
.platform-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Subtle shine effect on hover */
.feature-card::after,
.blog-card::after,
.blog-card-landing::after,
.built-for-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.feature-card:hover::after,
.blog-card:hover::after,
.blog-card-landing:hover::after,
.built-for-card:hover::after {
    transform: translateX(100%);
}

/* Enhanced card lift */
.feature-card:hover,
.blog-card:hover,
.blog-card-landing:hover,
.built-for-card:hover,
.use-case-card:hover,
.platform-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.pricing-card:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 60px rgba(26, 115, 232, 0.2);
}

/* ========================================
   NAVBAR ANIMATIONS
   ======================================== */

@keyframes navSlideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Navbar animations handled in style.css */
.nav-menu li {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.nav-menu li:nth-child(1) {
    animation-delay: 0.1s;
}

.nav-menu li:nth-child(2) {
    animation-delay: 0.15s;
}

.nav-menu li:nth-child(3) {
    animation-delay: 0.2s;
}

.nav-menu li:nth-child(4) {
    animation-delay: 0.25s;
}

.nav-menu li:nth-child(5) {
    animation-delay: 0.3s;
}

/* ========================================
   IMAGE & MEDIA EFFECTS
   ======================================== */

.ide-preview img,
.feature-detail-image img,
.blog-card-image-landing img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        filter 0.3s ease;
}

.ide-window:hover .ide-preview img {
    transform: scale(1.05);
}

.feature-detail-image:hover img {
    transform: scale(1.08) rotate(1deg);
    filter: brightness(1.05);
}

/* ========================================
   TEXT EFFECTS
   ======================================== */

/* Gradient text shimmer */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

.logo-text {
    background-size: 200% auto;
    animation: shimmer 25s linear infinite;
}

/* Section title entrance */
.section-title {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-title.animated {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   FOOTER ANIMATIONS
   ======================================== */

@keyframes footerFadeIn {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    animation: footerFadeIn 0.8s ease-out;
}

.footer-column {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.footer-column:nth-child(1) {
    animation-delay: 0.1s;
}

.footer-column:nth-child(2) {
    animation-delay: 0.2s;
}

.footer-column:nth-child(3) {
    animation-delay: 0.3s;
}

.footer-column:nth-child(4) {
    animation-delay: 0.4s;
}

/* ========================================
   PRICING PAGE EFFECTS
   ======================================== */

.pricing-badge {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* ========================================
   LINK HOVER EFFECTS
   ======================================== */

a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-link,
.blog-read-more {
    position: relative;
    display: inline-block;
}

.blog-link::after,
.blog-read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-blue);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.blog-link:hover::after,
.blog-read-more:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* ========================================
   SCROLL PROGRESS INDICATOR
   ======================================== */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #1a73e8, #34a853);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========================================
   PARALLAX EFFECT
   ======================================== */

.parallax {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Enhanced video placeholder */
.video-placeholder {
    position: relative;
    overflow: hidden;
}

.video-placeholder::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    animation: shimmer 3s linear infinite;
}

/* ========================================
   ENHANCED DOTTED DIVIDER
   ======================================== */

.dot {
    position: relative;
}

.dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    transform: translate(-50%, -50%) scale(0);
    animation: dotRipple 2s ease-out infinite;
    opacity: 0.5;
}

@keyframes dotRipple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0.5;
    }

    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.dot:nth-child(1)::after {
    animation-delay: 0s;
}

.dot:nth-child(2)::after {
    animation-delay: 0.2s;
}

.dot:nth-child(3)::after {
    animation-delay: 0.4s;
}

.dot:nth-child(4)::after {
    animation-delay: 0.6s;
}

.dot:nth-child(5)::after {
    animation-delay: 0.8s;
}

/* ========================================
   RESPONSIVE ANIMATIONS
   ======================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}