/* ============================================
   HHPOKER Landing Page — Custom Styles
   Complements Tailwind CSS utilities
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
    --cyan-600: #0891b2;
    --cyan-700: #0e7490;
    --cyan-800: #155e75;
    --cyan-50: #ecfeff;
    --dark-900: #0f172a;
    --dark-800: #1e293b;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Smooth Scrolling ---------- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

/* ---------- Selection Accent ---------- */
::selection {
    background-color: var(--cyan-600);
    color: #ffffff;
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--cyan-600), var(--cyan-800));
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--cyan-700);
}

/* ============================================
   NAVBAR — Sticky scroll shadow & hamburger
   ============================================ */

/* Shadow class added via JS on scroll */
#navbar.navbar-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ---------- Hamburger Animation ---------- */
#hamburger {
    cursor: pointer;
    background: none;
    border: none;
    outline: none;
}

#hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #1e293b;
    border-radius: 9999px;
    transition: all var(--transition-base);
    transform-origin: center;
}

/* Hamburger open state — morph into X */
#hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ---------- Mobile Menu ---------- */
#mobileMenu {
    transition: max-height var(--transition-smooth), opacity var(--transition-base);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

#mobileMenu.open {
    max-height: 500px;
    opacity: 1;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: all var(--transition-base);
    text-decoration: none;
}

/* ============================================
   FEATURE CARDS — Hover Effects
   ============================================ */

.feature-card {
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, var(--cyan-600), var(--cyan-700));
    border-radius: 0 0 9999px 9999px;
    transform: scaleX(0.3);
    transform-origin: center;
    opacity: 0;
    transition: all var(--transition-smooth);
}

.feature-card:hover::before {
    transform: scaleX(1);
    opacity: 1;
}

/* ============================================
   TESTIMONIAL CARDS
   ============================================ */

.testimonial-card {
    position: relative;
    overflow: hidden;
}

.testimonial-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--cyan-600), transparent);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.testimonial-card:hover::after {
    opacity: 1;
}

/* ============================================
   FAQ ACCORDION
   ============================================ */

.faq-item {
    transition: all var(--transition-base);
}

.faq-toggle {
    cursor: pointer;
    user-select: none;
}

.faq-toggle:hover {
    background-color: rgba(8, 145, 178, 0.03);
}

/* Rotate chevron icon when expanded */
.faq-toggle.active .faq-icon {
    transform: rotate(180deg);
    background-color: var(--cyan-600);
    color: #ffffff;
}

/* Smooth expand/collapse */
.faq-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1),
                opacity 300ms cubic-bezier(0.4, 0, 0.2, 1),
                padding 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-body.open {
    max-height: 500px;
    opacity: 1;
}

/* ============================================
   ANIMATIONS — Keyframes
   ============================================ */

/* Floating animation for hero badges */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes floatDelayed {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float-delayed {
    animation: floatDelayed 4s ease-in-out infinite 0.5s;
}

/* Fade in up — for potential scroll-triggered animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pulse glow for CTA buttons */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.4);
    }
    50% {
        box-shadow: 0 0 0 16px rgba(8, 145, 178, 0);
    }
}

/* Subtle shimmer gradient animation */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */

@media (max-width: 768px) {
    html {
        scroll-padding-top: 4rem;
    }

    .feature-card {
        border-radius: 1.5rem;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 2rem;
    }

    .feature-card {
        border-radius: 1.25rem;
    }
}

/* ============================================
   FOCUS & ACCESSIBILITY
   ============================================ */

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--cyan-600);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduce motion for accessibility */
@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;
    }
}

/* ============================================
   UTILITY EXTRAS
   ============================================ */

/* Gradient text utility (fallback for browsers not supporting bg-clip) */
.text-gradient-cyan {
    background: linear-gradient(to right, var(--cyan-600), var(--cyan-800));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Custom link underline animation */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cyan-600);
    transition: width var(--transition-base);
    border-radius: 9999px;
}

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