/* ===== TEXT REVEAL ANIMATION ===== */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    animation: textReveal 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

.text-reveal span:nth-child(2) {
    animation-delay: 0.2s;
}

@keyframes textReveal {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ===== GLOW EFFECTS ===== */
.glow-text {
    text-shadow: 
        0 0 10px rgba(230, 57, 70, 0.5),
        0 0 20px rgba(230, 57, 70, 0.3),
        0 0 30px rgba(230, 57, 70, 0.1);
}

.glow-border {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.glow-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, 
        var(--primary-red), 
        #FF6B6B, 
        var(--primary-red));
    border-radius: inherit;
    z-index: -1;
    animation: borderGlow 3s linear infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.8;
        filter: blur(5px);
    }
    50% {
        opacity: 1;
        filter: blur(10px);
    }
}

/* ===== 3D CARD FLIP ===== */
.card-3d {
    perspective: 1000px;
    height: 400px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-3d:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, var(--dark-blue), var(--dark-bg));
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* ===== DIAGONAL SECTIONS ===== */
.diagonal-section {
    position: relative;
    padding: var(--space-xl) 0;
    overflow: hidden;
}

.diagonal-section::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -10%;
    width: 120%;
    height: 200px;
    background: linear-gradient(135deg, 
        transparent 0%, 
        transparent 50%, 
        var(--primary-red) 50%, 
        var(--primary-red) 100%);
    transform: rotate(-5deg);
    z-index: -1;
}

.diagonal-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    right: -10%;
    width: 120%;
    height: 200px;
    background: linear-gradient(135deg, 
        var(--dark-blue) 0%, 
        var(--dark-blue) 50%, 
        transparent 50%, 
        transparent 100%);
    transform: rotate(-5deg);
    z-index: -1;
}

/* ===== PARALLAX LAYERS ===== */
.parallax-layer {
    position: absolute;
    will-change: transform;
}

.layer-1 {
    z-index: 1;
    animation: parallaxSlow 20s infinite linear;
}

.layer-2 {
    z-index: 2;
    animation: parallaxMedium 15s infinite linear;
}

.layer-3 {
    z-index: 3;
    animation: parallaxFast 10s infinite linear;
}

@keyframes parallaxSlow {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(-100px) translateX(100px);
    }
}

@keyframes parallaxMedium {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(-150px) translateX(150px);
    }
}

@keyframes parallaxFast {
    0% {
        transform: translateY(0) translateX(0);
    }
    100% {
        transform: translateY(-200px) translateX(200px);
    }
}

/* ===== NEON GLITCH EFFECT ===== */
.neon-glitch {
    position: relative;
    color: var(--primary-red);
}

.neon-glitch::before,
.neon-glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.neon-glitch::before {
    left: 2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.neon-glitch::after {
    left: -2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }
    100% {
        clip: rect(83px, 9999px, 100px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 41px, 0);
    }
    100% {
        clip: rect(52px, 9999px, 74px, 0);
    }
}

/* ===== PARTICLE EFFECTS ===== */
.particle {
    position: absolute;
    pointer-events: none;
    background: var(--primary-red);
    border-radius: 50%;
    animation: particleFloat 2s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* ===== LOADING BAR ANIMATION ===== */
.loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, 
        var(--primary-red), 
        #FF6B6B, 
        var(--primary-red));
    z-index: 1001;
    transition: width 0.3s ease;
}

/* ===== HOVER SHIMMER ===== */
.shimmer {
    position: relative;
    overflow: hidden;
}

.shimmer::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        transparent 20%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 80%
    );
    transform: rotate(30deg);
    transition: transform 0.6s;
}

.shimmer:hover::after {
    transform: rotate(30deg) translateX(100%);
}

/* ===== MORPHING SHAPES ===== */
.morphing-shape {
    position: absolute;
    background: var(--primary-red);
    opacity: 0.1;
    animation: morph 10s infinite;
    border-radius: 50%;
}

@keyframes morph {
    0%, 100% {
        border-radius: 50%;
        transform: scale(1) rotate(0deg);
    }
    25% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
        transform: scale(1.2) rotate(90deg);
    }
    50% {
        border-radius: 50% 50% 20% 80% / 25% 80% 20% 75%;
        transform: scale(0.8) rotate(180deg);
    }
    75% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
        transform: scale(1.1) rotate(270deg);
    }
}

/* ===== TYPEWRITER CURSOR ===== */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: var(--primary-red);
    margin-left: 2px;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

/* ===== WAVE ANIMATION ===== */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg"><path d="M0 0v46.29c47.79 22.2 103.59 32.17 158 28 70.36-5.37 136.33-33.31 206.8-37.5 73.84-4.36 147.54 16.88 218.2 35.26 69.27 18 138.3 24.88 209.4 13.08 36.15-6 69.85-17.84 104.45-29.34C989.49 25 1113-14.29 1200 52.47V0z" fill="%23E63946" opacity=".25"/></svg>');
    animation: wave 12s linear infinite;
}

@keyframes wave {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1200px;
    }
}