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

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

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

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

/* ===== Scroll Reveal Animations ===== */
/* Content is visible by default; JS adds the animated state */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    .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; }
}

/* ===== Selection ===== */
::selection {
    background: rgba(61, 138, 88, 0.2);
    color: #1a5231;
}

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

/* ===== Custom scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #faf8f0;
}
::-webkit-scrollbar-thumb {
    background: #c3e2cc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #95c9a8;
}

/* ===== Navbar transition states ===== */
.navbar-scrolled {
    background: rgba(15, 49, 29, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

/* ===== Subtle gradient border for cards ===== */
.card-gradient-border {
    position: relative;
    background: white;
    border-radius: 1rem;
}

.card-gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1rem;
    padding: 1px;
    background: linear-gradient(135deg, rgba(195, 226, 204, 0.5), rgba(61, 138, 88, 0.2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}
