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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Scroll Reveal (progressive enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ===== Navbar Scroll State ===== */
.nav-scrolled {
    background: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(27, 67, 50, 0.08);
}

.nav-scrolled .font-serif {
    color: #1B4332 !important;
}

.nav-scrolled a:not([class*="bg-"]) {
    color: #1B4332 !important;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF7F0;
}
::-webkit-scrollbar-thumb {
    background: #8fb89e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5f9474;
}

/* ===== Selection ===== */
::selection {
    background: #dce8e1;
    color: #1B4332;
}

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

/* ===== Button ripple feel ===== */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Subtle floating animation for hero cards ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

@media (prefers-reduced-motion: no-preference) {
    .float-card-1 { animation: float 4s ease-in-out infinite; }
    .float-card-2 { animation: float-delayed 5s ease-in-out infinite 0.5s; }
    .float-card-3 { animation: float 4.5s ease-in-out infinite 1s; }
}

/* ===== Hero image rotation fix on hover ===== */
.group:hover .transform {
    transform: rotate(0deg) scale(1.02);
}
