/* Custom Styles for M.A.D.E.M.S. Upholstery */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #c45d46;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #e8654a;
}

/* Animation keyframes */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s ease-out forwards;
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Service card hover */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c45d46, #e8654a);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Process step hover */
.process-step {
    transition: transform 0.3s ease;
}

.process-step:hover {
    transform: translateY(-5px);
}

/* Navigation active state */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c45d46;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link {
    position: relative;
}

/* Mobile menu active state */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu {
    transform: translateX(100%);
}

/* Hamburger animation */
#menu-icon.active #line1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-icon.active #line2 {
    opacity: 0;
}

#menu-icon.active #line3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

#navbar.scrolled .nav-link {
    color: #2a2a2a;
}

#navbar.scrolled .nav-link:hover {
    color: #c45d46;
}

#navbar.scrolled .font-serif {
    color: #1a1a1a;
}

#navbar.scrolled #mobile-menu {
    background: rgba(255, 255, 255, 0.98);
}

#navbar.scrolled .mobile-link {
    color: #2a2a2a;
}

#navbar.scrolled #menu-icon span {
    background: #2a2a2a;
}

/* Selection color */
::selection {
    background: #c45d46;
    color: white;
}

/* Focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #c45d46;
    outline-offset: 2px;
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Image hover zoom container */
.service-card img,
#craft img {
    will-change: transform;
}

/* Subtle grain overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.015;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
