/* ============================================
   Love TAP — Custom Styles
   Classic & Elegant · Teal + Slate Grey
   ============================================ */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #0d9488;
    color: #f8fafc;
}

/* --- Scroll Reveal Animations --- */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal-up {
    transform: translateY(0);
}

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

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

/* Progressive enhancement: only animate if JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        transform: translateY(30px);
        opacity: 0;
    }
    
    .reveal-left {
        transform: translateX(-30px);
        opacity: 0;
    }
    
    .reveal-right {
        transform: translateX(30px);
        opacity: 0;
    }
}

/* --- Hero Animations --- */
.hero-subtitle {
    opacity: 0;
    animation: fadeDown 0.8s 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-headline {
    opacity: 0;
    animation: fadeUp 1s 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-desc {
    opacity: 0;
    animation: fadeUp 1s 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-cta {
    opacity: 0;
    animation: fadeUp 1s 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

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

/* --- Navbar Transition --- */
#navbar.scrolled {
    background-color: rgba(4, 47, 46, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

#navbar.scrolled #logo-text,
#navbar.scrolled #logo-line {
    color: #f8fafc;
    background-color: #f8fafc;
}

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

#mobile-menu.open .mobile-nav-link {
    animation: fadeUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

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

/* --- Mobile Menu Button --- */
.menu-line {
    transform-origin: center;
}

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

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

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

/* --- Nav Links Underline --- */
.nav-link {
    position: relative;
}

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

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

/* --- Product Card Hover --- */
.group:hover .aspect-\[4\/3\] {
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.1);
}

/* --- Image Hover Smoothness --- */
img {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* --- Subtle Grain Texture (optional, for depth) --- */
section:not(:last-of-type) {
    position: relative;
}

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

/* --- Mobile Menu Link Animations --- */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
}

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

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobile-menu,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        display: none;
    }
    
    body {
        color: #0f172a;
        background: white;
    }
}
