/* ===== Custom Styles for Charles Johnson Building ===== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f0f1a;
}
::-webkit-scrollbar-thumb {
    background: #2f2f4d;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #ff6b52;
}

/* Selection color */
::selection {
    background: #ff6b52;
    color: #fff;
}

/* Service card stagger animation setup */
.service-card {
    opacity: 1;
    transform: translateY(0);
}

/* Project card stagger animation setup */
.project-card {
    opacity: 1;
    transform: translateY(0);
}

/* Testimonial card stagger animation setup */
.testimonial-card {
    opacity: 1;
    transform: translateY(0);
}

/* Hero entrance animation */
@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content > * {
    animation: heroFadeIn 0.8s ease-out forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.1s; }
.hero-content > *:nth-child(2) { animation-delay: 0.3s; }
.hero-content > *:nth-child(3) { animation-delay: 0.5s; }
.hero-content > *:nth-child(4) { animation-delay: 0.7s; }

/* Geometric shape float animation */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-15px) rotate(12deg); }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 15, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

.nav-scrolled .logo-text {
    color: #fff !important;
}

/* Mobile menu animations */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Coral gradient accent line */
.accent-line {
    background: linear-gradient(90deg, transparent, #ff6b52, transparent);
}

/* Subtle pattern overlay for sections */
.pattern-overlay {
    background-image: radial-gradient(circle, rgba(255, 107, 82, 0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Glow effect for coral elements */
.glow-coral {
    box-shadow: 0 0 40px rgba(255, 107, 82, 0.15);
}

/* Reduced motion preference */
@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;
    }
}

/* ===== Scroll Reveal Animations (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-heading {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
}
