/* ==========================================================================
   Michael Landing Page Styles
   ========================================================================== */

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(55, 65, 81, 0.4) 0%, transparent 70%);
    pointer-events: none;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Demo Cards */
.demo-card {
    transition: transform 300ms ease;
}

/* FAQ Accordion */
.faq-item {
    transition: border-color 200ms ease;
}

.faq-item:hover {
    border-color: #9ca3af;
}

.faq-item summary {
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary svg {
    transition: transform 300ms ease;
}

.faq-item[open] summary svg {
    transform: rotate(180deg);
}

.faq-item[open] {
    border-color: #111827;
}

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

table th:first-child {
    border-top-left-radius: 0.75rem;
}

table th:last-child {
    border-top-right-radius: 0.75rem;
}

/* Pricing Card */
.pricing-card {
    transition: transform 300ms ease, box-shadow 300ms ease;
}

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

/* Sticky Header */
header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background-color: rgba(255, 255, 255, 0.9);
}

/* Button hover effects */
a[data-open-chat],
button[data-open-chat] {
    transition: all 200ms ease;
}

a[data-open-chat]:hover,
button[data-open-chat]:hover {
    transform: translateY(-1px);
}

/* Focus states for accessibility */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .hero-section h1 {
        font-size: 1.875rem;
        line-height: 1.2;
    }

    .hero-section p {
        font-size: 1.125rem;
    }

    /* Table horizontal scroll indicator */
    .overflow-x-auto {
        position: relative;
    }

    .overflow-x-auto::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to left, white, transparent);
        pointer-events: none;
    }

    /* Adjust comparison table for mobile */
    table th,
    table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .demo-card,
    .faq-item,
    .faq-item summary svg,
    a[data-open-chat],
    button[data-open-chat] {
        transition: none;
    }

    .demo-card:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .demo-card .aspect-video,
    a[data-open-chat] {
        display: none;
    }

    .hero-section {
        background: white !important;
        color: black !important;
    }

    .hero-section * {
        color: black !important;
    }
}

/* Custom selection color */
::selection {
    background-color: #111827;
    color: white;
}

/* Animate elements on scroll - preparation for JS enhancement */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stats section numbers */
.stats-number {
    font-variant-numeric: tabular-nums;
}

/* Badge pulse animation */
@keyframes badge-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: badge-pulse 2s ease-in-out infinite;
}

/* Feature cards hover */
section#features .bg-white {
    transition: transform 300ms ease, box-shadow 300ms ease, border-color 200ms ease;
}

section#features .bg-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Pain points section icons */
section .text-4xl {
    transition: transform 300ms ease;
}

section .bg-white:hover .text-4xl {
    transform: scale(1.1);
}

/* Smooth icon transitions */
.w-12.h-12 {
    transition: background-color 200ms ease;
}

/* Link underline animation */
a.underline {
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: text-decoration-color 200ms ease;
}

a.underline:hover {
    text-decoration-color: transparent;
}

/* Trust section responsive */
@media (max-width: 640px) {
    section.bg-gray-900 .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Pricing check marks alignment */
ul li svg {
    flex-shrink: 0;
}

/* Header navigation hover */
header nav a:not([target="_blank"]) {
    position: relative;
}

header nav a:not([target="_blank"])::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background-color: #111827;
    transition: width 200ms ease;
}

header nav a:not([target="_blank"]):hover::after {
    width: 100%;
}

/* CTA button gradient on hover - light mode only */
:root:not(.dark) a.bg-gray-900:hover,
:root:not(.dark) button.bg-gray-900:hover {
    background: linear-gradient(to right, #111827, #1f2937);
}

/* What is chatbot section icons */
.w-10.h-10.rounded-full {
    transition: transform 200ms ease, box-shadow 200ms ease;
}

.flex.items-start.gap-4:hover .w-10.h-10.rounded-full {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* ========================================================
   DARK MODE SPECIFIC STYLES
   ======================================================== */

/* Theme transition */
html.theme-transitioning,
html.theme-transitioning *,
html.theme-transitioning *::before,
html.theme-transitioning *::after {
    transition: background-color 300ms ease,
                border-color 300ms ease,
                color 200ms ease !important;
}

/* Hero gradient - slightly visible in dark mode */
:root.dark .hero-section::before {
    background: radial-gradient(ellipse at 50% 0%, rgba(75, 85, 99, 0.4) 0%, transparent 70%);
}

/* Header backdrop - dark */
:root.dark header {
    background-color: rgba(17, 24, 39, 0.9);
}

/* Mobile table scroll indicator - dark */
@media (max-width: 768px) {
    :root.dark .overflow-x-auto::after {
        background: linear-gradient(to left, rgb(31, 41, 55), transparent);
    }
}

/* FAQ states - dark */
:root.dark .faq-item[open] {
    border-color: #9ca3af;
}

:root.dark .faq-item:hover {
    border-color: #6b7280;
}

/* Focus states - dark */
:root.dark a:focus-visible,
:root.dark button:focus-visible,
:root.dark summary:focus-visible {
    outline-color: #f3f4f6;
}

/* Selection - dark */
:root.dark ::selection {
    background-color: #f3f4f6;
    color: #111827;
}

/* Header navigation hover - dark */
:root.dark header nav a:not([target="_blank"])::after {
    background-color: #f3f4f6;
}

/* Feature cards hover - dark */
:root.dark section#features .bg-gray-900:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

/* Print - force light mode */
@media print {
    :root.dark .hero-section {
        background: white !important;
        color: black !important;
    }
}
