/* ============================================
   Cup of Coffee Clinic — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(52, 184, 136, 0.3);
    color: #f0f4f8;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: #334e68;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #34b888;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.nav.scrolled {
    background: rgba(10, 22, 40, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(52, 184, 136, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #f0f4f8 !important;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

.mobile-menu.hidden {
    animation: slideUp 0.25s ease forwards;
}

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

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

.mobile-nav-link {
    position: relative;
    display: block;
    padding: 4px 0;
}

/* Menu toggle animation */
.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* ============================================
   Hero
   ============================================ */
.hero-orb {
    animation: float 8s ease-in-out infinite;
}

.hero-orb:nth-child(2) {
    animation-delay: -3s;
    animation-duration: 10s;
}

.hero-orb:nth-child(3) {
    animation-delay: -5s;
    animation-duration: 12s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-15px, 15px) scale(0.95); }
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* ============================================
   Product Cards
   ============================================ */
.product-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover {
    transform: translateY(-6px);
}

.product-card:hover img {
    filter: brightness(1.05);
}

/* ============================================
   Contact Form
   ============================================ */
.contact-form:focus-within {
    border-color: rgba(52, 184, 136, 0.3);
}

/* ============================================
   Utility
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    /* All reveal animations handled by JS for progressive enhancement */
}

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