/* AEC Windows and Guttering - Custom Animations and Effects */

/* Floating animation for background orbs */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Slide-in animation for hero content */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.8s ease-out;
}

/* Glass effect for navigation and cards */
.glass-effect {
    background: rgba(255, 255, 255, 0.9); /* Fallback */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Text gradient utility */
.text-gradient {
    background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent; /* Fallback */
}

/* Gradient border effect */
.gradient-border {
    position: relative;
    background: white;
    border-radius: 1rem;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 2px;
    background: linear-gradient(135deg, #14b8a6, #06b6d4);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Reduced motion support for accessibility */
@media (prefers-reduced-motion: reduce) {
    .float-animation,
    .slide-in {
        animation: none;
    }
}

/* Button loading state - show/hide content based on HTMX request state */
.btn-loading {
    display: none;
}

.btn-text {
    display: inline;
}

/* When form is submitting (htmx-request class is added by HTMX) */
form.htmx-request .btn-loading {
    display: inline;
}

form.htmx-request .btn-text {
    display: none;
}

/* Disable button during submission */
form.htmx-request button[type="submit"] {
    opacity: 0.75;
    cursor: not-allowed;
    pointer-events: none;
}
