/* Q-Ledger Website Styles */
/* Dark theme with glassmorphism effects */

/* ========================================
   CSS Variables
   ======================================== */
:root {
    --primary: #FFA726;
    --primary-light: #FFB74D;
    --primary-dark: #F57C00;

    --dark: #0a0a0a;
    --dark-secondary: #1a1a1a;
    --dark-tertiary: #252525;

    --accent-green: #2E7D32;
    --accent-green-light: #4CAF50;

    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;

    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 16px;
}

/* ========================================
   Base Styles
   ======================================== */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark);
    color: var(--text-primary);
}

::selection {
    background-color: var(--primary);
    color: var(--dark);
}

/* ========================================
   Navigation
   ======================================== */
.glass-nav {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border-bottom: 1px solid var(--glass-border);
}

.nav-link {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

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

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.mobile-nav-link:hover {
    color: var(--primary);
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(10, 10, 10, 0.95) !important;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--dark);
    font-weight: 600;
    border-radius: 9999px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 167, 38, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(255, 167, 38, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    border: 2px solid var(--glass-border);
    border-radius: 9999px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(255, 167, 38, 0.1);
}

/* ========================================
   Glass Cards
   ======================================== */
.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

/* ========================================
   Step Cards (How It Works)
   ======================================== */
.step-card {
    position: relative;
}

.step-card::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -24px;
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
    display: none;
}

@media (min-width: 1024px) {
    .step-card:not(:last-child)::before {
        display: block;
    }
}

/* ========================================
   Feature Cards (Why Q-Ledger)
   ======================================== */
.feature-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 167, 38, 0.3);
    box-shadow: 0 12px 40px rgba(255, 167, 38, 0.1);
}

/* ========================================
   Pricing Cards
   ======================================== */
.pricing-card {
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
}

/* Pro card glow effect */
.pricing-card.border-primary {
    box-shadow: 0 0 40px rgba(255, 167, 38, 0.2);
}

.pricing-card.border-primary:hover {
    box-shadow: 0 0 60px rgba(255, 167, 38, 0.3);
}

/* ========================================
   FAQ Accordion
   ======================================== */
.faq-tab {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
}

.faq-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.faq-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--dark);
}

.faq-item {
    overflow: hidden;
}

.faq-question {
    cursor: pointer;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    animation: fadeIn 0.3s ease;
}

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

/* ========================================
   App Showcase Carousel
   ======================================== */
.carousel-track {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.carousel-track::-webkit-scrollbar {
    display: none;
}

.carousel-item {
    scroll-snap-align: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.carousel-item:hover {
    transform: scale(1.02);
}

/* Hide scrollbar utility */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* ========================================
   Comparison Table
   ======================================== */
#comparison table {
    border-collapse: separate;
    border-spacing: 0;
}

#comparison th,
#comparison td {
    border-bottom: 1px solid var(--glass-border);
}

#comparison tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* ========================================
   Hero Section
   ======================================== */
#hero video {
    filter: brightness(0.7);
}

/* ========================================
   Section Animations (GSAP targets)
   ======================================== */
.hero-title,
.hero-subtitle,
.hero-stories,
.hero-value,
.hero-cta,
.section-title,
.step-card,
.feature-card,
.pricing-card,
.faq-item {
    opacity: 0;
    transform: translateY(30px);
}

/* Initial state for GSAP - will be animated in */
.gsap-ready .hero-title,
.gsap-ready .hero-subtitle,
.gsap-ready .hero-stories,
.gsap-ready .hero-value,
.gsap-ready .hero-cta,
.gsap-ready .section-title,
.gsap-ready .step-card,
.gsap-ready .feature-card,
.gsap-ready .pricing-card,
.gsap-ready .faq-item {
    opacity: 1;
    transform: translateY(0);
}

/* Fallback for no-JS */
.no-js .hero-title,
.no-js .hero-subtitle,
.no-js .hero-stories,
.no-js .hero-value,
.no-js .hero-cta,
.no-js .section-title,
.no-js .step-card,
.no-js .feature-card,
.no-js .pricing-card,
.no-js .faq-item {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Glow Effects
   ======================================== */
@keyframes glow {
    0% {
        box-shadow: 0 0 20px rgba(255, 167, 38, 0.2);
    }
    100% {
        box-shadow: 0 0 40px rgba(255, 167, 38, 0.4);
    }
}

.glow-animation {
    animation: glow 2s ease-in-out infinite alternate;
}

/* ========================================
   Responsive Utilities
   ======================================== */
@media (max-width: 640px) {
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* ========================================
   Loading State
   ======================================== */
.loading {
    position: fixed;
    inset: 0;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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