/* Custom design system and transitions */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 6.5rem; /* Prevents sticky header overlap */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

.dark ::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.4);
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.6);
}

/* Accordion transition using modern CSS Grid trick */
.faq-accordion-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 250ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
    opacity: 0;
}

.faq-accordion-wrapper.expanded {
    grid-template-rows: 1fr;
    opacity: 1;
}

.faq-accordion-inner {
    overflow: hidden;
}

/* Highlight match styling */
mark.search-highlight {
    background-color: rgba(253, 224, 71, 0.4); /* Yellow-300 with transparency */
    color: inherit;
    border-bottom: 2px solid rgba(234, 179, 8, 0.7);
    border-radius: 2px;
    padding: 0 1px;
}

.dark mark.search-highlight {
    background-color: rgba(234, 179, 8, 0.25);
    border-bottom-color: rgba(234, 179, 8, 0.9);
}

/* Card glassmorphism & gradients */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.dark .glass-card {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.glass-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.4);
}

.dark .glass-card:hover {
    border-color: rgba(129, 140, 248, 0.45);
}

/* Sidebar scroll spy smooth active indicator */
.toc-link {
    position: relative;
    transition: all 0.2s ease;
}

.toc-link::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 16px;
    background-color: #6366f1; /* indigo-500 */
    border-radius: 9999px;
    transition: transform 0.2s ease;
    transform-origin: center;
}

.toc-link.active::before {
    transform: translateY(-50%) scaleY(1);
}

.dark .toc-link::before {
    background-color: #818cf8; /* indigo-400 */
}

/* Micro-animations */
.rotate-arrow {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.expanded-arrow {
    transform: rotate(180deg);
}

/* Shimmer placeholder/loading state if needed */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}
.shimmer {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.dark .shimmer {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
