/* Mirrago Case Study CSS - Unified with Mirrago Brand */

:root {
    --mirrago-blue: #1D4BA7;
    --mirrago-blue-light: #2563eb;
    --mirrago-sky: #5BCBFA;
    --mirrago-slate-dark: #0F172A;
    --mirrago-slate-card: #1E293B;
    --mirrago-text-dark: #0F172A;
    --mirrago-text-body: #475569;
    --mirrago-text-muted: #64748B;
    --mirrago-border: #E2E8F0;
    --mirrago-border-subtle: #F1F5F9;
}

html {
    scroll-behavior: smooth;
}

/* Mirrago Top Reading Progress Indicator */
#case-study-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #1D4BA7 0%, #2563EB 50%, #5BCBFA 100%);
    z-index: 9999;
    transition: width 0.08s ease-out;
}

/* Title Gradient - Exact Mirrago Palette */
.case-study-title-gradient {
    background: linear-gradient(135deg, #1D4BA7 0%, #2563EB 60%, #5BCBFA 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* General Prose Content - ONLY applies to body text paragraphs */
.case-study-prose p {
    margin-bottom: 1.5rem;
    line-height: 1.85;
    font-size: 1.0625rem;
    color: #334155;
}

.case-study-prose strong {
    color: #0F172A;
    font-weight: 700;
}

.case-study-prose a {
    color: #1D4BA7;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: rgba(29, 75, 167, 0.3);
    transition: color 0.2s ease;
}

.case-study-prose a:hover {
    color: #0F172A;
}

/* Subtle Hover Card Lift */
.mirrago-card-hover {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mirrago-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.08);
}

/* Sticky TOC Navigation */
.toc-sidebar-container {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.toc-nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.625rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s ease;
    text-decoration: none;
}

.toc-nav-link:hover {
    background: #F8FAFC;
    color: #1D4BA7;
}

.toc-nav-link.active {
    background: #EFF6FF;
    color: #1D4BA7;
    font-weight: 700;
}

.toc-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 9999px;
    background-color: #94A3B8;
    transition: all 0.2s ease;
}

.toc-nav-link.active .toc-dot {
    background-color: #1D4BA7;
    transform: scale(1.25);
    box-shadow: 0 0 0 3px rgba(29, 75, 167, 0.15);
}

/* Monospace Architectural Callout */
.code-callout-block {
    background: #0B1220;
    color: #E2E8F0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.8125rem;
    border-radius: 0.875rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid #1E293B;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Testimonial Quote Styling - Guaranteed High Contrast */
.case-study-testimonial-card {
    background-color: #0F172A !important;
    color: #FFFFFF !important;
}

.case-study-testimonial-card .testimonial-quote-text {
    color: #F8FAFC !important;
    line-height: 1.8;
}

.case-study-testimonial-card p {
    color: inherit;
}

/* End-of-Page CTA Banner - Guaranteed High Contrast */
.case-study-cta-banner {
    background-color: #050B14 !important;
    color: #FFFFFF !important;
}

.case-study-cta-banner .cta-subtitle-text {
    color: #CBD5E1 !important;
    line-height: 1.6;
}

.case-study-cta-banner p {
    color: inherit;
}

/* Interactive Lightbox Modal */
#lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(5, 11, 20, 0.95);
    backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
}

#lightbox-modal.is-active {
    display: flex;
    opacity: 1;
}

#lightbox-img {
    max-height: 78vh;
    max-width: 92vw;
    object-fit: contain;
    border-radius: 0.875rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Print Tweaks */
@media print {
    #case-study-progress-bar,
    .toc-sidebar-container,
    #lightbox-modal {
        display: none !important;
    }
}
