/* ============================================
   Purpose Driven Tea — 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 Color */
::selection {
    background-color: rgba(232, 168, 73, 0.3);
    color: #f5eef6;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, backdrop-filter 0.5s ease, box-shadow 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(36, 10, 28, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(107, 39, 82, 0.3);
}

.nav-link {
    position: relative;
}

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

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

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

/* Mobile Menu */
.mobile-link {
    position: relative;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

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

/* Menu Button Animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* ============================================
   Hero Animations
   ============================================ */
.hero-subtitle {
    animation: fadeUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeUp 0.8s ease 0.5s forwards;
    opacity: 0;
}

.hero-tagline {
    animation: fadeUp 0.8s ease 0.7s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeUp 0.8s ease 0.9s forwards;
    opacity: 0;
}

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

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

.reveal-section[data-revealed="false"] {
    opacity: 0;
    transform: translateY(40px);
}

/* 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-section {
        opacity: 1 !important;
        transform: none !important;
    }

    .reveal-section[data-revealed="false"] {
        opacity: 1 !important;
        transform: none !important;
    }
}

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

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

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

::-webkit-scrollbar-track {
    background: #240a1c;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #8c4490;
}

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

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-tagline {
        font-size: 1rem;
    }

    section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }
}
