/* ============================================
   HHpoker - Indigo Theme Custom Styles
   Project 0027 - SaaS Landing Page
   ============================================ */

/* === CSS Variables === */
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --primary-50: #EEF2FF;
    --gray-900: #111827;
    --gray-700: #374151;
    --gray-500: #6B7280;
    --gray-400: #9CA3AF;
    --gray-200: #E5E7EB;
    --gray-100: #F3F4F6;
    --gray-50: #F9FAFB;
    --white: #FFFFFF;
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 20px 40px rgba(79, 70, 229, 0.08), 0 4px 12px rgba(79, 70, 229, 0.04);
}

/* === Smooth Scrolling === */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* === Selection === */
::selection {
    background-color: rgba(79, 70, 229, 0.2);
    color: var(--gray-900);
}

/* === Glass Morphism Navbar === */
.glass-container {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    border-radius: 0 0 24px 24px;
    padding: 0 16px;
    transition: all var(--transition-base);
}

#navbar.scrolled .glass-container {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(229, 231, 235, 0.7);
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 20px;
    height: 2px;
    background-color: var(--primary);
    border-radius: 1px;
    transition: transform var(--transition-base);
}

.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* === Feature Cards - Top Color Bar === */
.feature-card {
    position: relative;
}

.feature-card-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    border-radius: 16px 16px 0 0;
    transform-origin: left;
    transition: all 400ms cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-card-bar {
    height: 6px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* === FAQ Accordion === */
.faq-item {
    cursor: pointer;
}

.faq-toggle {
    cursor: pointer;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 400ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms ease;
    opacity: 0;
}

.faq-item.active .faq-content {
    max-height: 500px;
    opacity: 1;
}

.faq-item.active .faq-icon {
    background-color: var(--primary);
    color: var(--white);
    transform: rotate(45deg);
}

.faq-item.active {
    border-color: rgba(79, 70, 229, 0.2);
    box-shadow: 0 4px 24px rgba(79, 70, 229, 0.08);
}

/* === Counter Animation Support === */
.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* === Testimonial Stars === */
.text-yellow-400 {
    color: #FACC15;
}

/* === Scroll Indicator Animation === */
@keyframes scroll-indicator {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.5;
        transform: translateY(6px);
    }
}

.animate-bounce {
    animation: scroll-indicator 2s ease-in-out infinite;
}

/* === Mobile Menu === */
#mobile-menu {
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

#mobile-menu:not(.hidden) {
    animation: slideDown 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

/* === Pulse Dot === */
@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.animate-pulse {
    animation: pulse-dot 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* === Button Hover Effects === */
a[href="#cta"] .fa-download,
a[href="#cta"] .fa-android,
a[href="#cta"] .fa-apple {
    transition: transform var(--transition-base);
}

/* === Section Dividers === */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(79, 70, 229, 0.15), transparent);
}

/* === Responsive Typography === */
@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem !important;
    }
    h2 {
        font-size: 1.875rem !important;
    }
}

/* === Form Focus Ring === */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

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

::-webkit-scrollbar-track {
    background: var(--gray-50);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* === Image Loading === */
img {
    image-rendering: auto;
}

/* === Card Shadow Fix === */
.shadow-3xl {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.15);
}

/* === Accessibility: 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;
    }
}

/* === Print Styles === */
@media print {
    #navbar,
    footer,
    #mobile-menu {
        display: none !important;
    }
    body {
        padding-top: 0;
    }
}

/* === Extra Utilities === */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur-xl {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
