/* Custom styles for Pine Belt Insulation */

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background: rgba(212, 160, 23, 0.3);
    color: #fef3c7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #030a05;
}
::-webkit-scrollbar-thumb {
    background: #1a3a2a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5a3d;
}

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out both;
}

/* Pulse slow for decorative orbs */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Scroll reveal base — content always visible by default */
.reveal {
    /* Default: visible. JS adds .revealed class for animation. */
}

.reveal.revealed {
    animation: revealIn 0.7s ease-out both;
}

@keyframes revealIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card glow effect */
.card-glow:hover {
    box-shadow: 0 0 60px -15px rgba(212, 160, 23, 0.08);
}

/* Navbar glass effect */
.nav-scrolled {
    background: rgba(3, 10, 5, 0.92) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 160, 23, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

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

/* Reduced motion */
@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;
    }
    
    .reveal.revealed {
        animation: none;
        opacity: 1;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #d4a017;
    outline-offset: 2px;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d4a017' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Gold accent line under section headers */
.section-accent {
    position: relative;
}
.section-accent::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #d4a017, #b8860b);
    margin-top: 1rem;
    border-radius: 2px;
}

/* Tablet and up adjustments */
@media (min-width: 768px) {
    .section-accent::after {
        width: 80px;
    }
}
