/* ============================================
   Wonderland Tap — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: rgba(20, 184, 166, 0.3);
    color: #f0fdfa;
}

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement: content is visible
   by default; JS adds the animated state.
   ============================================ */

/* Default: all content visible */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* When JS adds the 'revealed' class */
.reveal-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Initial states for JS-triggered animation (gated by prefers-reduced-motion) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }
}

/* ============================================
   Navbar
   ============================================ */

#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    transition: backdrop-filter 0.5s ease,
                -webkit-backdrop-filter 0.5s ease,
                background-color 0.5s ease,
                box-shadow 0.5s ease;
}

#navbar.scrolled {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background-color: rgba(8, 14, 26, 0.85);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Nav link underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #14b8a6, #5eead4);
    transition: width 0.3s ease;
}

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

/* ============================================
   Mobile Menu
   ============================================ */

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
#menu-toggle.active #line1 {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active #line2 {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.active #line3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Mobile link fade-in */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* ============================================
   Hero Section
   ============================================ */

#hero {
    position: relative;
}

/* Subtle parallax on hero image */
#hero .absolute.inset-0 img {
    will-change: transform;
}

/* ============================================
   Buttons & Interactive Elements
   ============================================ */

button, a {
    cursor: pointer;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
}

/* ============================================
   Form Styles
   ============================================ */

select {
    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='%2394a3b8' stroke-width='2' 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: #080e1a;
}

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

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

/* ============================================
   Responsive adjustments
   ============================================ */

@media (max-width: 768px) {
    .font-serif {
        /* Prevent overly large text on small screens */
    }
}

/* ============================================
   Print styles
   ============================================ */

@media print {
    #navbar,
    #contact-form,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
