/* ============================================
   AI STORE AUTOPILOT - CUSTOM STYLES
   ============================================ */

/* --- Variables --- */
:root {
    --indigo: #4F46E5;
    --indigo-light: #EEF2FF;
    --indigo-subtle: #E0E7FF;
    --purple: #7C3AED;
    --pink: #EC4899;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* --- Typography --- */
body {
    font-family: var(--font-family);
    color: #1F2937;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, var(--indigo), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-light {
    background: linear-gradient(135deg, #818CF8, #C084FC);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ls-1 { letter-spacing: 0.1em; }

/* --- Utility Colors --- */
.bg-indigo { background-color: var(--indigo) !important; }
.bg-indigo-subtle { background-color: var(--indigo-subtle) !important; }
.bg-indigo-light { background-color: var(--indigo-light) !important; }
.text-indigo { color: var(--indigo) !important; }
.text-indigo-light { color: #818CF8 !important; }
.text-pink { color: var(--pink) !important; }
.text-purple { color: var(--purple) !important; }

/* --- Navbar --- */
.navbar {
    transition: all 0.3s ease;
    padding: 1rem 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.navbar.scrolled {
    padding: 1rem 0;
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.98);
}

.nav-link {
    color: #4B5563 !important;
    transition: color 0.2s;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--indigo) !important;
}

.install-btn {
    background: linear-gradient(135deg, var(--indigo), var(--purple));
    border: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.install-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

/* Keep Bootstrap responsive behavior while fixing landing-page header spacing. */
.landing-nav .container {
    max-width: 1080px;
}

.landing-nav .navbar-nav {
    gap: 8px;
}

.landing-nav .nav-link {
    white-space: nowrap;
}

.landing-nav .install-btn {
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .landing-nav .navbar-nav {
        gap: 0;
    }
}

/* --- Hero --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(180deg, #FAFAFE 0%, #FFFFFF 100%);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.08) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.chat-mockup-wrapper {
    max-width: 420px;
    margin-left: auto;
}

.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-bubble.user {
    background: var(--indigo);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai {
    background: #F3F4F6;
    color: #1F2937;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.floating-badge {
    background: white;
    border: 1px solid #E5E7EB;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--indigo);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    animation: floatBadge 3s ease-in-out infinite;
}

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* --- Animations --- */
.animate-fade-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
}

.animate-fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    animation: fadeInRight 0.8s ease 0.3s forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInRight {
    to { opacity: 1; transform: translateX(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Hover Effects --- */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

/* --- Value Cards --- */
.value-card {
    border-radius: 16px;
    transition: transform 0.3s;
}

.value-card:hover {
    transform: translateY(-4px);
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Process Flow --- */
.process-flow .step-item {
    padding: 10px 14px;
    border-radius: 10px;
    background: #F9FAFB;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.step-arrow {
    text-align: center;
    color: #D1D5DB;
    font-size: 20px;
    padding: 2px 0;
}

/* --- Feature List --- */
.feature-list li {
    font-size: 15px;
}

/* --- Comparison Wrapper --- */
.comparison-wrapper {
    border: 1px solid #E5E7EB;
}

/* --- Support Chat Mockup --- */
.chat-bubble.user-sm {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 13px;
    background: var(--indigo);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.chat-bubble.ai-sm {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 13px;
    background: #F3F4F6;
    color: #1F2937;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

/* --- Feature Cards --- */
.feature-card {
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* --- Steps --- */
.steps-connector {
    position: absolute;
    top: 60px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, var(--indigo-subtle), var(--indigo), var(--indigo-subtle));
    z-index: 1;
}

.step-number {
    font-size: 32px;
    font-weight: 800;
    color: var(--indigo-subtle);
    line-height: 1;
}

.step-card {
    border-radius: 16px;
    transition: transform 0.3s;
}

.step-card:hover {
    transform: translateY(-4px);
}

/* --- Control Features --- */
.control-features .toggle-demo {
    cursor: default;
}

/* --- Dashboard Mockup --- */
.dashboard-mockup {
    border: 1px solid #E5E7EB;
}

/* --- Provider Cards --- */
.provider-card {
    border-radius: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* --- Pricing --- */
.pricing-card {
    border-radius: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card.recommended {
    border-color: var(--indigo) !important;
}

.pricing-card:hover {
    transform: translateY(-6px);
}

.pricing-card .price-line {
    display: flex;
    align-items: baseline;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.pricing-card .price-period {
    display: inline-block;
    margin-left: 4px;
    white-space: nowrap;
}

/* --- Scenario Buttons --- */
.scenario-btn {
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: white;
}

.scenario-btn:hover {
    background: var(--indigo-subtle);
    border-color: var(--indigo) !important;
}

.scenario-btn.active {
    background: var(--indigo);
    color: white !important;
    border-color: var(--indigo) !important;
}

.scenario-btn.active i {
    color: white !important;
}

/* --- Demo Chat --- */
.demo-chat-container {
    border: 1px solid #E5E7EB;
}

.demo-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    animation: messageIn 0.3s ease;
}

.demo-message.user-msg {
    background: var(--indigo);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.demo-message.ai-msg {
    background: #F3F4F6;
    color: #1F2937;
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.demo-message.typing {
    background: #F3F4F6;
    color: #9CA3AF;
    font-style: italic;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Benefit Cards --- */
.benefit-card {
    border-radius: 16px;
    background: white;
    border: 1px solid #E5E7EB;
    transition: transform 0.3s, box-shadow 0.3s;
}

.benefit-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

/* --- Use Case Cards --- */
.use-case-card {
    transition: transform 0.3s, border-color 0.3s;
}

.use-case-card:hover {
    transform: translateY(-4px);
    border-color: var(--indigo) !important;
}

/* --- Testimonial Placeholder --- */
.testimonial-placeholder {
    border-radius: 16px;
    background: white;
}

/* --- FAQ Accordion --- */
.accordion-button:not(.collapsed) {
    background-color: var(--indigo-subtle);
    color: var(--indigo);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: var(--indigo-subtle);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%234F46E5'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* --- Final CTA --- */
.final-cta {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #1E1B4B 100%);
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* --- Footer --- */
.hover-white:hover {
    color: white !important;
}

/* --- Back to Top --- */
#backToTop {
    transition: opacity 0.3s, transform 0.3s;
    opacity: 0;
    transform: translateY(20px);
}

#backToTop.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Adjustments --- */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: auto;
        padding-top: 120px;
        padding-bottom: 60px;
    }
    
    .chat-mockup-wrapper {
        margin: 0 auto;
        max-width: 380px;
    }
    
    .steps-connector {
        display: none !important;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding-top: 100px;
    }
    
    .chat-mockup-wrapper {
        max-width: 100%;
    }
    
    .pricing-card .card-body {
        padding: 2rem !important;
    }
    
    .demo-chat-container {
        min-height: 400px;
    }
}

@media (max-width: 575.98px) {
    .display-3 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .scenario-btn {
        font-size: 13px;
        padding: 10px 16px !important;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .animate-fade-up,
    .animate-fade-in-right {
        opacity: 1;
        transform: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* --- Focus States for Accessibility --- */
.btn:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--indigo);
    outline-offset: 2px;
}

.nav-link:focus-visible {
    outline: 2px solid var(--indigo);
    outline-offset: -2px;
    border-radius: 4px;
}

.accordion-button:focus-visible {
    outline: 3px solid var(--indigo);
    outline-offset: -3px;
}

/* --- Scrollbar Styling --- */
.chat-messages::-webkit-scrollbar,
.chat-messages-small::-webkit-scrollbar,
.demo-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.chat-messages::-webkit-scrollbar-track,
.chat-messages-small::-webkit-scrollbar-track,
.demo-chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb,
.chat-messages-small::-webkit-scrollbar-thumb,
.demo-chat-messages::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}