/* Custom Styles & Overrides */
html {
    scroll-behavior: smooth;
}

body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Typography refinements */
h1, h2, h3, h4 {
    letter-spacing: -0.02em;
}

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

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

::-webkit-scrollbar-thumb {
    background: #047857;
}

::-webkit-scrollbar-thumb:hover {
    background: #065f46;
}

/* Reveal Animation Classes */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Active state for reveals */
.reveal-active.reveal-up,
.reveal-active.reveal-left,
.reveal-active.reveal-right,
.reveal-active.reveal-text {
    opacity: 1;
    transform: translate(0);
}

/* Staggered delays for children */
.reveal-up:nth-child(1) { transition-delay: 0ms; }
.reveal-up:nth-child(2) { transition-delay: 100ms; }
.reveal-up:nth-child(3) { transition-delay: 200ms; }

/* Hero text animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-text {
    animation: fadeInUp 0.8s ease-out forwards;
}

.reveal-text:nth-child(2) { animation-delay: 0.2s; }
.reveal-text:nth-child(3) { animation-delay: 0.4s; }
.reveal-text:nth-child(4) { animation-delay: 0.6s; }
.reveal-text:nth-child(5) { animation-delay: 0.8s; }

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

#navbar.scrolled .text-charcoal {
    color: #1c1917;
}

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Image hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Focus states for accessibility */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* Button hover effects */
button:hover,
a:hover {
    transition: all 0.3s ease;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu-btn,
    .animate-bounce {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-emerald-900,
    .bg-charcoal {
        background: #fff !important;
        color: #000 !important;
    }
}
