/* ============================================
   Grace Kayah Asian Market — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: color-mix(in srgb, #2D5A3D 80%, white);
    color: #FDFCFA;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 252, 250, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(45, 90, 61, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2D5A3D;
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    position: relative;
}

.mobile-link:active {
    color: #2D5A3D;
}

/* ============================================
   Hero Floating Cards
   ============================================ */
.card-float {
    animation: floatUp 0.8s ease-out both;
}

.card-float:nth-child(1) { animation-delay: 0.1s; }
.card-float:nth-child(2) { animation-delay: 0.2s; }
.card-float:nth-child(3) { animation-delay: 0.3s; }
.card-float:nth-child(4) { animation-delay: 0.4s; }
.card-float:nth-child(5) { animation-delay: 0.5s; }
.card-float:nth-child(6) { animation-delay: 0.6s; }

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero floating animation */
.hero-float-1 {
    animation: heroFloat1 6s ease-in-out infinite;
}

.hero-float-2 {
    animation: heroFloat2 7s ease-in-out infinite;
}

.hero-float-3 {
    animation: heroFloat3 5s ease-in-out infinite;
}

@keyframes heroFloat1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

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

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

/* ============================================
   Scroll Animations
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ============================================
   Buttons
   ============================================ */
button, a[type="submit"] {
    cursor: pointer;
}

/* ============================================
   Form Styles
   ============================================ */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

/* ============================================
   Utility / Misc
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* Smooth focus visible */
:focus-visible {
    outline: 2px solid #2D5A3D;
    outline-offset: 2px;
}

/* Remove outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.2;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
