/* Cyber Tech Luxury Custom Styles */

/* Base overrides for true black */
.dark body {
    background-color: #050505;
    color: #f3f4f6;
}

/* Glassmorphism & Neon Glow */
.cyber-glass {
    background: rgba(10, 10, 12, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-glass:hover {
    border-color: rgba(0, 229, 255, 0.3);
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.1), inset 0 0 20px rgba(0, 229, 255, 0.05);
}

/* Word Reveal Animation */
.word-reveal {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}
.word-reveal span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes revealUp {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Asymmetrical Bento Grid Adjustments */
/* We will use utility classes in HTML mostly, but need specific hover logic here */

.bento-card {
    position: relative;
    overflow: hidden;
}

/* Specific Card Hovers */
/* 1. Web Dev: Code typing effect */
.hover-code-lines .code-overlay {
    opacity: 0;
    transition: opacity 0.3s;
}
.hover-code-lines:hover .code-overlay {
    opacity: 1;
}

/* 2. CCTV: Red recording pulse */
.hover-cctv-pulse .rec-dot {
    opacity: 0.2;
    transition: opacity 0.3s;
}
.hover-cctv-pulse:hover .rec-dot {
    animation: urgentPulse 1s infinite;
}
@keyframes urgentPulse {
    0% { opacity: 1; box-shadow: 0 0 10px red; }
    50% { opacity: 0.3; box-shadow: 0 0 0px red; }
    100% { opacity: 1; box-shadow: 0 0 10px red; }
}

/* 3. Hardware: Component Glow */
.hover-hardware-glow img, .hover-hardware-glow svg {
    filter: drop-shadow(0 0 0px rgba(157, 0, 255, 0));
    transition: filter 0.5s ease;
}
.hover-hardware-glow:hover img, .hover-hardware-glow:hover svg {
    filter: drop-shadow(0 0 15px rgba(157, 0, 255, 0.8));
}

/* 4. Software: Dashboard Flicker */
.hover-software-flicker .ui-mockup {
    opacity: 0.8;
    transition: opacity 0.2s;
}
.hover-software-flicker:hover .ui-mockup {
    animation: cyberpunkFlicker 2s infinite;
}
@keyframes cyberpunkFlicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% { opacity: 1; }
    20%, 22%, 24%, 55% { opacity: 0.4; }
}

/* Button Morphing (Contact Submit) */
.btn-morph {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow: hidden;
    position: relative;
}
.btn-morph.loading {
    width: 50px !important;
    border-radius: 50px;
    color: transparent;
    pointer-events: none;
}
.btn-morph.success {
    background: #10B981; /* Green */
    color: white;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Depth / Parallax Layers */
.layer-bg { transform: translateZ(-200px) scale(1.5); }
.layer-mid { transform: translateZ(-100px) scale(1.2); }
.layer-fg { transform: translateZ(0); }

/* Floating Labels */
.cyber-input {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}
.cyber-input:focus {
    background: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.5);
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.floating-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    transition: all 0.2s ease-out;
}
.cyber-input:focus ~ .floating-label,
.cyber-input:not(:placeholder-shown) ~ .floating-label {
    top: 0;
    transform: translateY(-50%) scale(0.85);
    background: #050505;
    padding: 0 0.5rem;
    color: #00e5ff;
}

textarea.cyber-input ~ .floating-label {
    top: 1.5rem;
}
textarea.cyber-input:focus ~ .floating-label,
textarea.cyber-input:not(:placeholder-shown) ~ .floating-label {
    top: 0;
}

/* Marquee Animation */
.marquee-container {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}
.marquee-content {
    display: flex;
    animation: marquee 30s linear infinite;
    gap: 4rem;
    padding-right: 4rem;
}
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}
.brand-logo {
    font-family: 'Space Grotesk', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-weight: 800;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}
.brand-logo:hover {
    color: rgba(212, 175, 55, 1);
}

/* ============================================
   MOBILE OVERRIDES (max-width: 767px)
   Force hover/active states to always show
   on mobile since touch devices can't hover
   ============================================ */

@media (max-width: 767px) {

    /* --- Portfolio / Deployments Cards --- */
    /* Always show the overlay (opacity-0 → 1) */
    .portfolio-card-overlay {
        opacity: 1 !important;
        background: rgba(5, 5, 5, 0.78) !important;
    }
    /* Always slide text into view */
    .portfolio-card-overlay h3,
    .portfolio-card-overlay .tech-tags {
        transform: translateY(0) !important;
    }

    /* --- Cyber Glass Hover Effect (Default on Mobile for Services & Team) --- */
    .bento-card, #core-team .cyber-glass {
        border-color: rgba(0, 229, 255, 0.3) !important;
        box-shadow: 0 0 40px rgba(0, 229, 255, 0.1), inset 0 0 20px rgba(0, 229, 255, 0.05) !important;
    }

    /* --- Core Services Cards --- */
    /* Software card: always show gold icon border */
    .bento-card:nth-child(1) .border-white\/10,
    .group-hover\:border-primary-500\/50 {
        border-color: rgba(212, 175, 55, 0.5) !important;
    }
    
    /* Security card: always show red icon border */
    .bento-card:nth-child(2) .border-white\/10,
    .group-hover\:border-red-500\/50 {
        border-color: rgba(239, 68, 68, 0.5) !important;
    }
    
    /* Hardware card: always show accent icon border */
    .bento-card:nth-child(3) .border-white\/10,
    .group-hover\:border-accent-500\/50 {
        border-color: rgba(255, 26, 26, 0.5) !important;
    }

    /* Software card: bottom glow always visible */
    .bento-card:nth-child(1) .bg-primary-500\/10,
    .group-hover\:bg-primary-500\/20 {
        background-color: rgba(212, 175, 55, 0.18) !important;
    }
    
    /* Hardware card: top glow always visible */
    .bento-card:nth-child(3) .bg-accent-500\/10,
    .group-hover\:bg-accent-500\/20 {
        background-color: rgba(255, 26, 26, 0.15) !important;
    }

    /* CCTV card: rec dot always pulses on mobile */
    .hover-cctv-pulse .rec-dot {
        opacity: 1 !important;
        animation: urgentPulse 1s infinite !important;
    }

    /* Hardware card: SVG icon always glows on mobile */
    .hover-hardware-glow svg {
        filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.65)) !important;
    }

    /* Make the text slightly brighter by default for readability */
    .bento-card h4 {
        color: #fff !important;
    }

    /* --- Our Core Team Cards --- */
    /* Make images colored and scaled by default */
    #core-team .group img.grayscale {
        filter: grayscale(0) !important;
        transform: scale(1.1) !important;
    }
    
    /* Make names colored by default. */
    #core-team .group h4.group-hover\:text-primary-400 {
        color: #D4AF37 !important;
    }
    #core-team .group h4.group-hover\:text-red-400 {
        color: #ef4444 !important;
    }
    #core-team .group h4.group-hover\:text-accent-400 {
        color: #ff1a1a !important;
    }
}
