/* Tailwind handles most styling. Custom additions can be placed here. */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Prevents AOS and parallax artifacts causing horizontal scroll */
}

/* Button Shine Effect (Micro-interaction) */
.btn-shine-effect {
    position: relative;
    overflow: hidden;
}

.btn-shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 30%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.4) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-25deg);
    animation: shine 5s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }

    15% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

/* Paint Stroke Reveal Animation */
.bg-paint-reveal {
    animation: paintStroke 1.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: 0.5s;
    transform: scaleX(0);
}

.aos-animate .bg-paint-reveal {
    transform: scaleX(0);
    /* Reset before animation */
}

@keyframes paintStroke {
    0% {
        transform: scaleX(0);
    }

    100% {
        transform: scaleX(1);
    }
}

/* Advanced Preloader Animations */
@keyframes blob-pulse {

    0%,
    100% {
        transform: scale(1);
        border-radius: 50%;
    }

    33% {
        transform: scale(1.1);
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }

    66% {
        transform: scale(0.9);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
}

@keyframes blob-spin {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.2);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

@keyframes blob-spin-reverse {
    0% {
        transform: rotate(360deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(0.8);
    }

    100% {
        transform: rotate(0deg) scale(1);
    }
}

@keyframes paint-drip-complex {
    0% {
        transform: translateY(-100px) scale(0.8);
        opacity: 0;
    }

    30% {
        transform: translateY(30px) scale(1);
        opacity: 1;
    }

    70% {
        transform: translateY(150px) scale(1.6);
        opacity: 1;
    }

    100% {
        transform: translateY(200px) scale(0.5);
        opacity: 0;
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.animate-blob-pulse {
    animation: blob-pulse 3s infinite ease-in-out;
}

.animate-blob-spin {
    animation: blob-spin 4s infinite linear;
}

.animate-blob-spin-reverse {
    animation: blob-spin-reverse 5s infinite linear;
}

.animate-paint-drip-complex {
    animation: paint-drip-complex 3s infinite ease-in;
}

.animate-shimmer {
    animation: shimmer 2.5s infinite linear;
}

/* --------------------------------- 
   TECH PREMIUM UIs: Cursor & Lights
   --------------------------------- */



/* Glassmorphism Glow Card */
.mouse-glow-card {
    position: relative;
    /* transition is handled by Tailwind classes */
}

.mouse-glow-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(circle 350px at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255, 255, 255, 0.08), transparent 80%);
    z-index: 1;
    transition: opacity 0.5s ease;
    opacity: 0;
}

.mouse-glow-card:hover::before {
    opacity: 1;
}

/* Ensure contents of the card sit above the glow */
.mouse-glow-card>* {
    position: relative;
    z-index: 2;
}

/* --------------------------------- 
   HERO BRUSH L-R REVEAL
   --------------------------------- */
.brush-reveal-text,
.brush-reveal-gradient {
    color: rgba(255, 255, 255, 0.03);
    /* Extremely faint outline before reveal */
    background-size: 0% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    animation: brush-reveal 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.brush-reveal-text {
    background-image: linear-gradient(to right, #ffffff, #ffffff);
    animation-delay: 2.8s;
    /* Starts right after the preloader fades (2.5s) */
}

.brush-reveal-gradient {
    background-image: linear-gradient(to right, #be123c, #fecdd3);
    animation-delay: 3.6s;
    /* Starts after the first line finishes */
}

@keyframes brush-reveal {
    0% {
        background-size: 0% 100%;
        color: rgba(255, 255, 255, 0.03);
    }

    1% {
        color: transparent;
    }

    100% {
        background-size: 100% 100%;
        color: transparent;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

/* Concrete Preloader Animation */
@keyframes concrete-build {
    0% {
        height: 0;
        opacity: 0;
    }

    40% {
        opacity: 1;
    }

    100% {
        height: 100%;
        opacity: 1;
    }
}

.animate-concrete-build {
    animation: concrete-build 1s cubic-bezier(0.85, 0, 0.15, 1) forwards infinite alternate;
}

/* Loading Dots Animation */
.loading-dots::after {
    content: '...';
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
    animation: loading-dots-anim 1.5s steps(4, end) infinite;
    width: 0px;
}

@keyframes loading-dots-anim {
    to {
        width: 1.6em;
    }
}

/* Highly Detailed Concrete Wall Structure (Natural & Non-Repeating) */
.cracked-concrete {
    background-image:
        /* 1. Large Vignette / Lighting Gradient */
        radial-gradient(ellipse at center, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.2) 100%),

        /* 2. Concrete Noise Grid (Tiny, repeatable, looks like sand/grain) */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.08'/%3E%3C/svg%3E"),

        /* 3. One Giant Jagged Concrete Crack (Never repeats) */
        url("data:image/svg+xml,%3Csvg viewBox='0 0 1000 500' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='xMidYMid slice'%3E%3Cg opacity='0.65'%3E%3C!-- Highlight bevel --%3E%3Cpath d='M-50 250 L 50 200 L 120 280 L 180 200 L 300 240 L 400 150 L 450 220 L 550 180 L 650 300 L 720 250 L 800 350 L 900 280 L 1050 350 M 300 240 L 250 350 L 280 450 M 650 300 L 680 400 L 620 480 M 800 350 L 850 480' stroke='%23ffffff' stroke-width='2' fill='none' stroke-linejoin='miter' transform='translate(1.5, 1.5)'/%3E%3C!-- Deep black fracture --%3E%3Cpath d='M-50 250 L 50 200 L 120 280 L 180 200 L 300 240 L 400 150 L 450 220 L 550 180 L 650 300 L 720 250 L 800 350 L 900 280 L 1050 350 M 300 240 L 250 350 L 280 450 M 650 300 L 680 400 L 620 480 M 800 350 L 850 480' stroke='%23000000' stroke-width='1.5' fill='none' stroke-linejoin='miter'/%3E%3C/g%3E%3C/svg%3E");

    background-size:
        cover,
        /* Gradient covers everything */
        100px 100px,
        /* Noise tiles cleanly like sand */
        cover;
    /* One giant crack covers the element, NO repeat! */

    background-repeat:
        no-repeat,
        repeat,
        no-repeat;

    background-position:
        center center,
        0 0,
        center center;
}