/* ===== CUSTOM STYLES FOR RAW JUICE ===== */

/* Smooth scroll offset for fixed header */
html {
    scroll-padding-top: 80px;
}

/* 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;
        scroll-behavior: auto !important;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ===== SCROLL REVEAL ANIMATIONS ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Enhanced state: hidden, revealed by JS (only when JS is available) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
    }
    .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; }
}

/* ===== HEADER SCROLL STATE ===== */
#site-header.scrolled {
    background: rgba(255, 254, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.08);
}

/* ===== CARD HOVER EFFECTS ===== */
.card:hover {
    transform: translateY(-4px);
}

/* ===== CUSTOM SELECTION COLOR ===== */
::selection {
    background: #059669;
    color: #FFFEF9;
}

/* ===== FOCUS VISIBLE ===== */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== MOBILE MENU TRANSITION ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ===== NAV LINK UNDERLINE ANIMATION ===== */
nav a:not(.bg-emerald-550):hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #059669;
    border-radius: 1px;
    animation: underlineGrow 0.3s ease forwards;
}

@keyframes underlineGrow {
    from { width: 0; }
    to { width: 100%; }
}

nav a:not(.bg-emerald-550) {
    position: relative;
}

/* ===== SUBTLE PATTERN BG FOR SECTIONS ===== */
.bg-dot-pattern {
    background-image: radial-gradient(circle, #065F46 1px, transparent 1px);
    background-size: 24px 24px;
    background-opacity: 0.03;
}

/* ===== FOCUS RING FOR CUSTOM SELECT ===== */
select.appearance-none {
    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='%23059669' 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;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FFF9E8;
}
::-webkit-scrollbar-thumb {
    background: #059669;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #047857;
}
