/* ============================================
   May Custom Homes And Cabinets
   Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background-color: #7B2D3B;
    color: #FDFBF9;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* ============================================
   Section Components
   ============================================ */

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7B2D3B;
}

.section-eyebrow::before {
    content: '';
    display: inline-block;
    width: 2rem;
    height: 1.5px;
    background-color: #7B2D3B;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.25rem, 5vw, 4rem);
    font-weight: 500;
    line-height: 1.05;
    color: #1A1714;
}

.section-desc {
    font-family: 'Crimson Pro', Georgia, serif;
    font-size: 1.25rem;
    line-height: 1.7;
    color: #2D2A26;
}

/* ============================================
   Hero Animations
   ============================================ */

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.animate-fade-in {
    animation: fadeIn 1s ease-out both;
}

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

/* ============================================
   Scroll Reveal
   ============================================ */

.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal[data-reveal],
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-fade-in-up,
    .animate-fade-in {
        animation: none;
        opacity: 1;
    }
    .animate-scroll-line {
        animation: none;
    }
}

/* ============================================
   Service Cards
   ============================================ */

.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Gallery Items
   ============================================ */

.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(123, 45, 59, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* ============================================
   Testimonial Cards
   ============================================ */

.testimonial-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(123, 45, 59, 0.12);
}

/* ============================================
   Navbar
   ============================================ */

#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 251, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 23, 20, 0.08);
}

#navbar.scrolled .font-display,
#navbar.scrolled .text-warmgray-900 {
    color: #1A1714 !important;
}

#navbar.scrolled .menu-line {
    background-color: #1A1714 !important;
}

/* ============================================
   Mobile Menu
   ============================================ */

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-link:nth-child(6) { transition-delay: 0.35s; }

/* Menu button active state */
#menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* ============================================
   Form Styles
   ============================================ */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #7B2D3B !important;
    box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.1);
}

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='%237B2D3B' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   Smooth Image Loading
   ============================================ */

img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ============================================
   Utility
   ============================================ */

.no-scroll {
    overflow: hidden;
}

/* ============================================
   Print
   ============================================ */

@media print {
    #navbar,
    #mobile-menu {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
