/* VibeFix - Custom Styles */
/* Styles that extend Tailwind CSS */

/* ===== Base ===== */
html {
    scroll-behavior: smooth;
}

::selection {
    background-color: #00ffa3;
    color: #0a0a0a;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
}

::-webkit-scrollbar-thumb {
    background: #1a1a1a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00ffa3;
}

/* ===== Grid Background ===== */
.grid-background {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ===== Animations ===== */
@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 255, 163, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 255, 163, 0.2);
    }
}

.animate-fade-in {
    animation: fade-in 0.6s ease-out forwards;
}

.animate-fade-in-up {
    animation: fade-in-up 0.6s ease-out forwards;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-600 {
    animation-delay: 600ms;
}

/* Initial state for animated elements */
.animate-fade-in,
.animate-fade-in-up {
    opacity: 0;
}

/* ===== Service Cards ===== */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 163, 0), transparent);
    transition: background 0.3s ease;
}

.service-card:hover::before {
    background: linear-gradient(90deg, transparent, rgba(0, 255, 163, 0.5), transparent);
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(0, 255, 163, 0.1);
}

/* ===== Form Styles ===== */
input, textarea, select {
    font-family: inherit;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 3rem;
}

/* Form validation styles */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: rgba(239, 68, 68, 0.5);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: rgba(0, 255, 163, 0.3);
}

/* ===== Button Effects ===== */
button, a {
    position: relative;
}

/* Terminal cursor blink */
@keyframes blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ===== Scroll Reveal ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Mobile Menu ===== */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    max-height: 300px;
}

/* ===== Header Scroll Effect ===== */
#header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

#header.scrolled .backdrop-blur-md {
    background-color: rgba(10, 10, 10, 0.95);
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .grid-background {
        background-size: 30px 30px;
    }

    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #00ffa3;
    outline-offset: 2px;
}

/* ===== Loading State ===== */
.loading {
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #0a0a0a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
