/* === Custom Styles for Ponce Electric Inc === */

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

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fff5f0;
}
::-webkit-scrollbar-thumb {
    background: #ff9166;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #f05118;
}

/* === Scroll Reveal Animations === */
/* Default state: visible (no JS progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS adds .revealed, animate to final state */
.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* If JS is enabled, set initial hidden state via a class */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(30px);
}

.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .js-enabled .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-bounce {
        animation: none;
    }
    
    .animate-pulse {
        animation: none;
    }
}

/* === Navbar scroll state === */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.navbar-scrolled .text-charcoal-900 {
    color: #1e1e24 !important;
}

/* === Mobile menu === */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Selection color === */
::selection {
    background: #ff9166;
    color: #1e1e24;
}

/* === Focus styles === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff6b35;
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Image loading placeholder === */
img {
    background-color: #ffe8dd;
}

/* === Print styles === */
@media print {
    nav, #mobile-menu-btn, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-charcoal-900, .bg-charcoal-950 {
        background: #333 !important;
        color: #fff !important;
    }
}
