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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(252, 179, 47, 0.3);
    color: #4a2832;
}

/* ===== Floating Card Animations ===== */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

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

.floating-card-1 {
    animation: float-1 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float-2 5s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* ===== Scroll Reveal Animations ===== */
/* Default: always visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Only animate when JS is active and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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; }
}

/* ===== Navbar Scrolled State ===== */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(74, 40, 50, 0.08);
}

.nav-scrolled .font-serif {
    color: #4a2832 !important;
}

.nav-scrolled a:not(.bg-plum-800) {
    color: #6f3b4c !important;
}

.nav-scrolled a:not(.bg-plum-800):hover {
    color: #d4900a !important;
}

/* ===== Service Card Hover Glow ===== */
.group:hover .w-14 {
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* ===== Custom Select Arrow ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236f3b4c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Button Ripple Effect ===== */
button, a {
    position: relative;
    overflow: hidden;
}

/* ===== Smooth Image Loading ===== */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ===== Focus Visible ===== */
:focus-visible {
    outline: 2px solid #fcb32f;
    outline-offset: 2px;
}

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* ===== Decorative Divider ===== */
.section-divider {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, #fcb32f, #d4900a);
    border-radius: 2px;
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .floating-card-1,
    .floating-card-2 {
        display: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    nav, #contact, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
