/* ========================================
   Anderson Ice Co — Custom Styles
   ======================================== */

/* Base */
*, *::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-color: #FFC4BA;
    color: #1E1D26;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFF9ED;
}
::-webkit-scrollbar-thumb {
    background: #D4D4DC;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #828193;
}

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

#navbar.scrolled {
    background: rgba(255, 254, 249, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* ========================================
   Hero
   ======================================== */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards;
}

.hero-image {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease 0.2s forwards;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Products
   ======================================== */
.product-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease;
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:nth-child(1) { transition-delay: 0s; }
.product-card:nth-child(2) { transition-delay: 0.1s; }
.product-card:nth-child(3) { transition-delay: 0.2s; }
.product-card:nth-child(4) { transition-delay: 0.3s; }
.product-card:nth-child(5) { transition-delay: 0.4s; }
.product-card:nth-child(6) { transition-delay: 0.5s; }

/* ========================================
   About
   ======================================== */
.about-images {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-images.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   Services
   ======================================== */
.service-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.service-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.service-item:nth-child(1) { transition-delay: 0s; }
.service-item:nth-child(2) { transition-delay: 0.1s; }
.service-item:nth-child(3) { transition-delay: 0.2s; }
.service-item:nth-child(4) { transition-delay: 0.3s; }

/* ========================================
   Community
   ======================================== */
/* Community cards handled by JS intersection observer */
/* ========================================
   Contact Form
   ======================================== */
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='%23636274' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========================================
   Floating cards animation
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.hero-image .absolute:nth-child(2) {
    animation: float 4s ease-in-out infinite;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    nav, #contact, footer, .hero-image .absolute {
        display: none;
    }
    
    body {
        color: #1E1D26;
        background: white;
    }
}
