/* === Custom Styles for ZHUZI Chinese Restaurant === */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

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

/* Selection Color */
::selection {
    background-color: #d95228;
    color: #fdf0eb;
}

/* === Animations === */

/* Fade-in animation for hero elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll line animation */
@keyframes scrollLine {
    0%, 100% {
        opacity: 0.3;
        transform: scaleY(0.5);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
}

.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Reduced motion */
@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;
    }
}

/* === Navbar === */
#navbar {
    background: rgba(250, 247, 242, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(26, 20, 16, 0.06);
}

#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(26, 20, 16, 0.08);
}

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

/* === Cards === */
.reveal > div {
    transition: transform 0.5s ease-out, box-shadow 0.5s ease-out;
}

/* === Mobile Menu === */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.menu-line {
    transition: all 0.3s ease-in-out;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* === Smooth Image Loading === */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* === Custom Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #faf7f2;
}

::-webkit-scrollbar-thumb {
    background: #e5704a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #c73e1c;
}

/* === Form Styles === */
input, textarea {
    border: 1px solid rgba(26, 20, 16, 0.15);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.6);
    color: #1a1410;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
}

input:focus, textarea:focus {
    outline: none;
    border-color: #d95228;
    box-shadow: 0 0 0 3px rgba(217, 82, 40, 0.1);
}

input::placeholder, textarea::placeholder {
    color: rgba(26, 20, 16, 0.4);
}

/* === Success Message === */
.form-success {
    display: none;
    background: #d95228;
    color: #fdf0eb;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    font-weight: 500;
    animation: fadeInUp 0.5s ease-out;
}

.form-success.show {
    display: block;
}
