/* ============================================
   Majestic Homes — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Selection */
::selection {
    background-color: #1a3c2a;
    color: #fdfcf8;
}

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

#navbar.scrolled {
    background-color: rgba(253, 252, 248, 0.97);
    box-shadow: 0 1px 20px rgba(26, 60, 42, 0.08);
    backdrop-filter: blur(10px);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: #1a3c2a;
    transition: width 0.3s ease;
}

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

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

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

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

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

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

/* ============================================
   Hero Animations
   ============================================ */
.hero-tagline {
    animation: slideUp 0.8s ease forwards;
}

.hero-headline {
    animation: slideUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: slideUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-cta {
    animation: slideUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

.hero-stats {
    animation: slideUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
    box-shadow: 0 4px 20px rgba(26, 60, 42, 0.25);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(26, 60, 42, 0.35);
    transform: translateY(-2px);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* ============================================
   Section Headers
   ============================================ */
.section-tag {
    display: inline-block;
}

.section-title {
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #1a3c2a, #5c7a5e);
    margin-top: 16px;
}

.section-header.text-center .section-title::after {
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    line-height: 1.8;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    box-shadow: 0 2px 20px rgba(26, 60, 42, 0.06);
    transition: all 0.5s ease;
}

.service-card:hover {
    box-shadow: 0 12px 40px rgba(26, 60, 42, 0.2);
    transform: translateY(-6px);
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    box-shadow: 0 2px 20px rgba(26, 60, 42, 0.08);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 2px transparent;
    transition: box-shadow 0.3s ease;
}

.gallery-item:hover::after {
    box-shadow: inset 0 0 0 2px rgba(253, 252, 248, 0.4);
}

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
    box-shadow: 0 2px 20px rgba(26, 60, 42, 0.06);
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    box-shadow: 0 8px 30px rgba(26, 60, 42, 0.12);
    transform: translateY(-4px);
}

.testimonial-text {
    position: relative;
    z-index: 1;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* ============================================
   Form Styles
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f0e8;
}

::-webkit-scrollbar-thumb {
    background: #5c7a5e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1a3c2a;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    html {
        scroll-padding-top: 70px;
    }

    .hero-headline {
        font-size: 2.5rem !important;
    }

    .hero-stats {
        gap: 8px !important;
    }

    .section-title {
        font-size: 2rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .hero-headline {
        font-size: 3.5rem !important;
    }
}
