/* ============================================
   Thai-Am — Custom Styles
   Classic & Elegant Thai Restaurant
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

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

::-webkit-scrollbar-track {
    background: #0f172a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #14b8a6;
}

/* Navigation */
.nav-logo-text {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(2, 6, 23, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(13, 148, 136, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile Menu */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu-link {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

#mobile-menu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.3s; }
#mobile-menu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.4s; }

/* Hero Section */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(2, 6, 23, 0.4) 0%,
        rgba(2, 6, 23, 0.2) 40%,
        rgba(2, 6, 23, 0.5) 70%,
        rgba(2, 6, 23, 0.85) 100%
    );
    z-index: 1;
}

#hero > .relative {
    z-index: 2;
}

/* Scroll indicator animation */
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

#hero .absolute.bottom-10 {
    animation: scrollBounce 2s ease-in-out infinite;
}

/* Fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }

/* Image hover effects */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Menu card hover */
.rounded-3xl {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.rounded-3xl:hover {
    transform: translateY(-2px);
}

/* Button hover glow */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* Selection color */
::selection {
    background: #0d9488;
    color: #f0fdfa;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print styles */
@media print {
    nav, #experience, footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

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

/* High contrast */
@media (prefers-contrast: high) {
    .text-slate-400 {
        color: #94a3b8;
    }
    
    .text-slate-500 {
        color: #64748b;
    }
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Touch device optimizations */
@media (hover: none) {
    .group:hover .group-hover\:scale-110 {
        transform: none;
    }
    
    .rounded-3xl:hover {
        transform: none;
    }
}
