/* ============================================
   Meg4DA Campaign HQ — Custom Styles
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

::selection {
    background-color: #1a4a28;
    color: #faf8f4;
}

/* --- Scroll Reveal Animations --- */
.reveal-on-scroll {
    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-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-on-scroll.revealed:nth-child(1) { transition-delay: 0.05s; }
.reveal-on-scroll.revealed:nth-child(2) { transition-delay: 0.15s; }
.reveal-on-scroll.revealed:nth-child(3) { transition-delay: 0.25s; }
.reveal-on-scroll.revealed:nth-child(4) { transition-delay: 0.35s; }
.reveal-on-scroll.revealed:nth-child(5) { transition-delay: 0.45s; }
.reveal-on-scroll.revealed:nth-child(6) { transition-delay: 0.55s; }

/* --- Hero Animations --- */
.hero-eyebrow {
    animation: heroFadeUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
}

.hero-headline {
    animation: heroFadeUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s forwards;
}

.hero-subhead {
    animation: heroFadeUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

.hero-ctas {
    animation: heroFadeUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s forwards;
}

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

/* --- Section Label --- */
.section-label {
    position: relative;
}

.section-label::before {
    content: '';
    display: block;
    width: 32px;
    height: 2px;
    background-color: #9bb89e;
    margin-bottom: 12px;
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.section-label:hover::before {
    width: 56px;
}

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

#navbar.scrolled {
    background-color: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 74, 40, 0.08);
}

#navbar.scrolled .font-serif,
#navbar.scrolled a:not(.bg-forest) {
    color: #1a4a28;
}

#navbar.scrolled .menu-line {
    background-color: #1a4a28;
}

/* --- Service Cards --- */
.service-card {
    position: relative;
    overflow: hidden;
    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);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(26, 74, 40, 0.25);
}

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #2d6339, #4e8056);
    transition: width 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover::after {
    width: 100%;
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateX(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 Toggle --- */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.5rem;
}

/* --- Form Styles --- */
input:focus,
select:focus,
textarea:focus {
    border-color: #2d6339;
    box-shadow: 0 0 0 3px rgba(45, 99, 57, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9bb89e;
}

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

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

::-webkit-scrollbar-thumb {
    background: #9bb89e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #709b74;
}

/* --- Responsive Adjustments --- */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.5rem;
    }

    .hero-headline span.block {
        font-size: 2rem;
    }

    blockquote {
        font-size: 1.5rem !important;
    }

    @media (min-width: 768px) {
        blockquote {
            font-size: 2rem !important;
        }
    }
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobile-menu,
    .reveal-on-scroll {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    section {
        page-break-inside: avoid;
    }
}
