/* ===== SPOTLIGHT CARD SYSTEM - Silicon Valley Founder Style ===== */

/* Spotlight Container - Applied to cards that need spotlight effect */
.spotlight-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    /* Create stacking context */
}

/* Spotlight Layer - Radial gradient that follows mouse */
.spotlight-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0;
    background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.06),
            transparent 40%);
    transition: opacity 300ms ease;
    pointer-events: none;
    z-index: 1;
}

.spotlight-card:hover::before {
    opacity: 1;
}

/* Noise Texture Overlay - Premium Grain Effect */
.spotlight-card::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    mix-blend-mode: overlay;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    z-index: 2;
}

/* Spotlight Card Content - Above spotlight layer */
.spotlight-card>* {
    position: relative;
    z-index: 3;
}

/* ===== BORDER BEAM EFFECT ===== */
.border-beam {
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.border-beam::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--accent-secondary),
            transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 400ms ease;
    pointer-events: none;
}

.border-beam:hover::before {
    opacity: 1;
    animation: border-beam-rotation 3s linear infinite;
}

@keyframes border-beam-rotation {
    0% {
        transform: rotate(0deg);
    }

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

/* ===== TILT EFFECT (3D Hover) ===== */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tilt-card:hover {
    transform:
        perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
}

/* ===== BACKDROP BLUR REFINEMENT ===== */
.glass-premium {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ===== GLOW EFFECT ON HOVER ===== */
.glow-on-hover {
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.glow-on-hover:hover {
    box-shadow:
        0 0 20px rgba(6, 182, 212, 0.3),
        0 0 40px rgba(6, 182, 212, 0.15),
        0 20px 40px -10px rgba(0, 0, 0, 0.8);
}

/* ===== SHIMMER BUTTON (for CTA) ===== */
.shimmer-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.shimmer-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transition: left 600ms ease;
}

.shimmer-btn:hover::before {
    left: 100%;
}

/* ===== SMOOTH REVEAL ANIMATION ===== */
@keyframes smooth-reveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

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

.reveal-smooth {
    animation: smooth-reveal 800ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Stagger children for cascade effect */
.cascade-parent>* {
    opacity: 0;
    animation: smooth-reveal 600ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cascade-parent>*:nth-child(1) {
    animation-delay: 0ms;
}

.cascade-parent>*:nth-child(2) {
    animation-delay: 100ms;
}

.cascade-parent>*:nth-child(3) {
    animation-delay: 200ms;
}

.cascade-parent>*:nth-child(4) {
    animation-delay: 300ms;
}

.cascade-parent>*:nth-child(5) {
    animation-delay: 400ms;
}

.cascade-parent>*:nth-child(6) {
    animation-delay: 500ms;
}

/* ===== TEXT GRADIENT SHIMMER ===== */
.text-shimmer {
    background: linear-gradient(90deg,
            var(--text-secondary) 0%,
            var(--accent-secondary) 50%,
            var(--text-secondary) 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: text-shimmer-animation 3s ease-in-out infinite;
}

@keyframes text-shimmer-animation {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}