/* ============================================
   Logan Martin Recycling — Custom Styles
   ============================================ */

/* --- Base & Reset --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(124, 58, 237, 0.15);
    color: #3b0764;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf5ff;
}
::-webkit-scrollbar-thumb {
    background: #d8b4fe;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a855f7;
}

/* --- Navbar --- */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(124, 58, 237, 0.08);
}

#navbar.scrolled .text-plum-950 {
    color: #3b0764;
}

#navbar.scrolled .text-plum-800\/70 {
    color: rgba(59, 7, 100, 0.7);
}

/* --- Hero floating cards animation --- */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes float-medium {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes float-fast {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
}

.hero-card-1 { animation: float-slow 6s ease-in-out infinite; }
.hero-card-2 { animation: float-medium 5s ease-in-out infinite 0.5s; }
.hero-card-3 { animation: float-fast 4s ease-in-out infinite 1s; }

/* --- Scroll reveal (below the fold only) --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* For 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;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

#menu-toggle.active #bar1 {
    transform: translateY(4px) rotate(45deg);
}
#menu-toggle.active #bar2 {
    opacity: 0;
    transform: scaleX(0);
}
#menu-toggle.active #bar3 {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* --- Service card hover --- */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* --- Material card hover --- */
.group:hover {
    transform: translateY(-2px);
}

/* --- Button focus states --- */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: 2px;
}

/* --- Select dropdown 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='%237c3aed' 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 1rem center;
    padding-right: 2.5rem;
}

/* --- Subtle line decorations --- */
.section-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(to right, #7c3aed, transparent);
}

/* --- Thin divider --- */
.thin-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(124, 58, 237, 0.1), transparent);
}
