/* Custom Typography and Transitions for Carpet Experts Ltd */

/* Scroll behavior overrides */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for sticky navigation */
}

/* Custom selection styling */
::selection {
    background-color: #D4AF37; /* brand.accent */
    color: #0B132B;            /* brand.dark */
}

/* Scroll reveal initial states */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

/* Scroll reveal triggered states */
.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}

/* Helper animation delays */
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* Sticky Header Active State */
#main-header.scrolled {
    background-color: rgba(11, 19, 43, 0.9); /* Deepest Dark Blue with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Nav links underlinings */
nav a {
    position: relative;
}
nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #D4AF37; /* brand-accent */
    transition: width 0.3s ease;
}
nav a:hover::after, nav a.active::after {
    width: 100%;
}

/* Testimonial slider transitions */
.testimonial-slide {
    will-change: opacity, transform;
}

/* Custom form elements focusing glow */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

/* Styling the SVG map dots overlay */
@keyframes mapPulse {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: scale(0.95);
        opacity: 0.5;
    }
}
.map-dot-pulse {
    animation: mapPulse 3s infinite ease-in-out;
}
