/* ============================================
   BUTTERFLY HOME — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

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

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

::-webkit-scrollbar-thumb {
    background: #99c896;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6aad6a;
}

/* Selection */
::selection {
    background: #c5dfc2;
    color: #1c451c;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 112, 45, 0.1);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: #6aad6a;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.92) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(45, 112, 45, 0.08);
}

.nav-scrolled .nav-link {
    color: #2d702d !important;
}

.nav-scrolled .font-serif {
    color: #2d702d !important;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
    transition: all 0.3s ease;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.reveal-delay {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.15s;
}

.reveal-delay.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-2 {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

.reveal-delay-2.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-3 {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.45s;
}

.reveal-delay-3.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   FLOATING ANIMATIONS
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes butterfly-float {
    0%, 100% { transform: translateY(0) rotate(-5deg) scale(1); }
    25% { transform: translateY(-10px) rotate(5deg) scale(1.02); }
    50% { transform: translateY(-5px) rotate(-3deg) scale(0.98); }
    75% { transform: translateY(-15px) rotate(3deg) scale(1.01); }
}

@keyframes butterfly-float-delay {
    0%, 100% { transform: translateY(0) rotate(5deg) scale(1); }
    25% { transform: translateY(-8px) rotate(-5deg) scale(0.98); }
    50% { transform: translateY(-12px) rotate(3deg) scale(1.02); }
    75% { transform: translateY(-6px) rotate(-2deg) scale(1); }
}

@keyframes bounce-slow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 10s ease-in-out infinite;
}

.animate-butterfly-float {
    animation: butterfly-float 7s ease-in-out infinite;
}

.animate-butterfly-float-delay {
    animation: butterfly-float-delay 9s ease-in-out infinite;
}

.animate-bounce-slow {
    animation: bounce-slow 2.5s ease-in-out infinite;
}

/* ============================================
   INPUT FOCUS STATES
   ============================================ */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(106, 173, 106, 0.15);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}

/* ============================================
   PRINT
   ============================================ */
@media print {
    .animate-float,
    .animate-float-delay,
    .animate-float-slow,
    .animate-butterfly-float,
    .animate-butterfly-float-delay,
    .animate-bounce-slow {
        animation: none;
    }
}
