/* ==========================================
   BLACK ROCKS International - Animations
   ========================================== */

/* ---- Scroll Indicator Line ---- */
@keyframes scrollLine {
    0% {
        top: -100%;
    }

    100% {
        top: 100%;
    }
}

/* ---- Background Lines Drift ---- */
@keyframes lineDrift {

    0%,
    100% {
        opacity: 0;
        transform: translateY(-100%);
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(100%);
    }
}

.bg-lines span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.05), transparent);
    animation: lineDrift 8s infinite ease-in-out;
}

.bg-lines span:nth-child(1)::after {
    animation-delay: 0s;
}

.bg-lines span:nth-child(2)::after {
    animation-delay: 1.5s;
}

.bg-lines span:nth-child(3)::after {
    animation-delay: 3s;
}

.bg-lines span:nth-child(4)::after {
    animation-delay: 4.5s;
}

.bg-lines span:nth-child(5)::after {
    animation-delay: 6s;
}

/* Dark section bg lines */
.services__bg-lines span::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.03), transparent);
    animation: lineDrift 10s infinite ease-in-out;
}

.services__bg-lines span:nth-child(1)::after {
    animation-delay: 0s;
}

.services__bg-lines span:nth-child(2)::after {
    animation-delay: 2s;
}

.services__bg-lines span:nth-child(3)::after {
    animation-delay: 4s;
}

/* ---- Hero Shape Floating ---- */
@keyframes shapeFloat {

    0%,
    100% {
        transform: rotate(45deg) translate(0, 0);
    }

    50% {
        transform: rotate(48deg) translate(-10px, 10px);
    }
}

@keyframes shapeFloat2 {

    0%,
    100% {
        transform: rotate(30deg) translate(0, 0);
    }

    50% {
        transform: rotate(33deg) translate(8px, -8px);
    }
}

@keyframes shapeFloat3 {

    0%,
    100% {
        transform: rotate(60deg) translate(0, 0);
    }

    50% {
        transform: rotate(57deg) translate(-12px, 6px);
    }
}

.hero__shape--1 {
    animation: shapeFloat 8s infinite ease-in-out;
}

.hero__shape--2 {
    animation: shapeFloat2 10s infinite ease-in-out;
}

.hero__shape--3 {
    animation: shapeFloat3 12s infinite ease-in-out;
}

/* ---- Pulse Glow for Value Cards ---- */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.05);
    }

    50% {
        box-shadow: 0 0 30px 5px rgba(0, 0, 0, 0.04);
    }
}

.value-card:hover {
    animation: pulseGlow 2s infinite;
}

/* ---- Social Icon Bounce ---- */
@keyframes socialBounce {

    0%,
    100% {
        transform: translateY(-3px);
    }

    50% {
        transform: translateY(-7px);
    }
}

.footer__social-link:hover {
    animation: socialBounce 0.4s ease;
}

/* ---- Reveal Element Base States ---- */
.reveal-element {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-element.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Service Card Stagger Delays ---- */
.services__grid .service-card:nth-child(1) {
    transition-delay: 0s;
}

.services__grid .service-card:nth-child(2) {
    transition-delay: 0.08s;
}

.services__grid .service-card:nth-child(3) {
    transition-delay: 0.16s;
}

.services__grid .service-card:nth-child(4) {
    transition-delay: 0.24s;
}

.services__grid .service-card:nth-child(5) {
    transition-delay: 0.32s;
}

.services__grid .service-card:nth-child(6) {
    transition-delay: 0.4s;
}

.services__grid .service-card:nth-child(7) {
    transition-delay: 0.48s;
}

.services__grid .service-card:nth-child(8) {
    transition-delay: 0.56s;
}

.services__grid .service-card:nth-child(9) {
    transition-delay: 0.64s;
}

/* ---- Value Card Stagger ---- */
.values__grid .value-card:nth-child(1) {
    transition-delay: 0s;
}

.values__grid .value-card:nth-child(2) {
    transition-delay: 0.1s;
}

.values__grid .value-card:nth-child(3) {
    transition-delay: 0.2s;
}

.values__grid .value-card:nth-child(4) {
    transition-delay: 0.3s;
}

.values__grid .value-card:nth-child(5) {
    transition-delay: 0.4s;
}

.values__grid .value-card:nth-child(6) {
    transition-delay: 0.5s;
}

/* ---- Link Hover Underline ---- */
@keyframes slideRight {
    from {
        width: 0;
        right: 0;
    }

    to {
        width: 100%;
        right: 0;
    }
}

/* ---- Preloader Logo Shapes ---- */
@keyframes logoShapeReveal {
    from {
        stroke-dashoffset: 400;
        opacity: 0;
    }

    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.preloader__logo-svg .logo-shape {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
}

/* ---- Counter Glow ---- */
@keyframes counterGlow {

    0%,
    100% {
        text-shadow: 0 0 0 transparent;
    }

    50% {
        text-shadow: 0 0 30px rgba(255, 255, 255, 0.15);
    }
}

.preloader__counter {
    animation: counterGlow 2s infinite ease-in-out;
}

/* ---- Magnetic Button Micro Interaction ---- */
.magnetic-btn {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* ---- Smooth Section Transitions ---- */
.section {
    will-change: transform;
}

/* ---- Image Parallax Depth ---- */
.parallax-img {
    will-change: transform;
    transition: none;
}

/* ---- Card Lift Shadow ---- */
@keyframes cardShadowPulse {

    0%,
    100% {
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    }
}

/* ---- Stats Counter Animation ---- */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Micro Interactions ---- */
/* Subtle scale on all interactive elements */
a:active,
button:active {
    transform: scale(0.97);
}

/* Smooth focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 3px;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .hero__word {
        opacity: 1 !important;
        transform: none !important;
    }

    .hero__buttons {
        opacity: 1 !important;
        transform: none !important;
    }

    .reveal-element {
        opacity: 1 !important;
        transform: none !important;
    }
}