/* Law Firm case study: the page's inline <style> blocks. */
/* Default Hidden */
    #custom-cursor-follower { display: none; pointer-events: none; position: fixed; top: 0; left: 0; transform: translate(-50%, -50%); z-index: 2147483647; }

    /* Desktop Only Visibility */
    @media (min-width: 992px) {
        body, a, button, input, .btn, .card { cursor: none !important; }
        .cursor-ovl { display: none !important; }
        #custom-cursor-follower { display: block !important; }
    }

    /* Base Cursor Style */
    #custom-cursor-follower {
        width: 30px; height: 30px;
        background: rgba(220, 53, 69, 0.25); /* Stronger Tint */
        border-radius: 50%;
        backdrop-filter: blur(5px);
        box-shadow: 0 0 15px rgba(220, 53, 69, 0.2);
        will-change: transform, width, height, backdrop-filter;
        transition: width 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                    height 0.3s cubic-bezier(0.25, 1, 0.5, 1), 
                    background-color 0.3s,
                    backdrop-filter 0.3s;
    }

    /* STOPPED / HOVER STATE (Focus/Zoom) */
    #custom-cursor-follower.is-stopped,
    body.is-hovering #custom-cursor-follower {
        width: 100px; height: 100px;
        background: rgba(220, 53, 69, 0.05); /* Clearer */
        backdrop-filter: blur(0px); /* Crystal Clear */
        box-shadow: 0 0 30px rgba(220, 53, 69, 0.1);
        border: 1px solid rgba(220, 53, 69, 0.15);
    }
.cs-flip-section {
            height: 100vh;
            background: #fff; /* White base for better contrast */
            overflow: hidden;
            position: relative;
        }
        
        /* BG 1: Scanner (Active during Phase 1) */
        .cs-bg-scanner {
            position: absolute;
            top: 50%; left: 50%;
            width: 80vh; height: 80vh; /* Fixed relative to viewport height */
            transform: translate(-50%, -50%);
            opacity: 0.6; /* High visibility */
            pointer-events: none;
            z-index: 1;
        }
        .scan-circle {
            width: 100%; height: 100%;
            border-radius: 50%;
            border: 1px solid #dee2e6; /* Visible Grey Ring */
            box-shadow: 0 0 30px rgba(0,0,0,0.05); /* Subtle glowing ring */
            position: absolute;
            top: 0; left: 0;
        }
        .scan-line {
            width: 50%; height: 50%;
            position: absolute;
            top: 0; left: 0; 
            transform-origin: bottom right;
            /* Strong Red Gradient Sweep */
            background: conic-gradient(from 0deg, transparent 0deg, rgba(220, 53, 69, 0.15) 30deg, rgba(220, 53, 69, 0.0) 90deg);
            animation: spinFast 4s linear infinite;
            border-right: 1px solid rgba(220, 53, 69, 0.5); /* Crisp Red Line */
        }

        /* BG 2: Blueprint Grid (Active during Phase 2) */
        .cs-bg-blueprint {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            /* Darker Grid Lines (#adb5bd) */
            background-image: 
                linear-gradient(#ced4da 1px, transparent 1px),
                linear-gradient(90deg, #ced4da 1px, transparent 1px);
            background-size: 50px 50px;
            opacity: 0.1; /* Visible start state to prevent "blank" anxiety */
            transform-origin: center;
            transform: scale(1.1);
            z-index: 1;
        }

        @keyframes spinSlow { 100% { transform: rotate(360deg); } }
        @keyframes spinFast { 100% { transform: rotate(360deg); } }

        .perspective-container {
            perspective: 2000px; 
        }

        .cs-flipper {
            width: 90%;
            max-width: 1000px;
            height: 500px; 
            position: relative;
            transform-style: preserve-3d;
        }

        .cs-flip-face {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            backface-visibility: hidden; 
            -webkit-backface-visibility: hidden;
            border-radius: 20px;
            padding: 60px;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(0,0,0,0.03);
        }
        .cs-face-front { z-index: 2; }
        .cs-face-back { transform: rotateX(-180deg); background: #fff; z-index: 1; }

        .cs-struct-label {
            display: block; margin-bottom: 20px; 
            font-family: 'Space Grotesk', sans-serif; letter-spacing: 2px; 
            text-transform: uppercase; font-size: 0.85rem; color: #dc3545; font-weight: 700;
        }
        .cs-problem-highlight { max-width: 700px; margin: 0 auto; }
        
        .cs-mini-card {
            background: #fdfdfd; padding: 20px; border-radius: 12px;
            border: 1px solid rgba(0,0,0,0.05); transition: transform 0.3s;
        }
        .cs-mini-card:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
        .mini-icon { font-size: 1.5rem; color: #dc3545; margin-right: 15px; width: 40px; text-align: center; }
        .cs-mini-card h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 5px; color: #222; }
        .cs-mini-card p { font-size: 0.9rem; margin: 0; color: #666; line-height: 1.4; }
/* System Header Styles */
            .tech-section-tag {
                font-family: 'Courier New', monospace;
                color: #dc3545;
                font-size: 0.9rem;
                letter-spacing: 2px;
                font-weight: 700;
                margin-bottom: 10px;
                display: block;
                opacity: 0.8;
            }
            .tech-title-text {
                font-family: 'Space Grotesk', sans-serif;
                font-weight: 800;
                font-size: 3.5rem; /* Big and Bold */
                text-transform: uppercase;
                letter-spacing: -1px;
                color: #222;
                margin-bottom: 20px;
                position: relative;
                display: inline-block;
            }
            @media (max-width: 768px) {
                .tech-title-text { font-size: 2.2rem; }
            }
            
            /* Animated Brackets */
            .tech-bracket {
                color: #dc3545;
                font-weight: 300;
                display: inline-block;
                transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
                opacity: 0.7;
            }
            .tech-bracket.left { margin-right: 15px; transform: translateX(20px); }
            .tech-bracket.right { margin-left: 15px; transform: translateX(-20px); }
            
            /* On hover (or when visible), brackets slide out to "open" */
            .tech-title-wrapper:hover .tech-bracket.left,
            .tech-title-text:hover .tech-bracket.left { transform: translateX(0); }
            
            .tech-title-wrapper:hover .tech-bracket.right,
            .tech-title-text:hover .tech-bracket.right { transform: translateX(0); }

            /* Glitch Line */
            .tech-glitch-line {
                width: 100px;
                height: 3px;
                background: #dc3545;
                margin: 0 auto 30px auto;
                position: relative;
                overflow: hidden;
            }
            .tech-glitch-line::after {
                content: '';
                position: absolute;
                top: 0; left: 0; width: 100%; height: 100%;
                background: rgba(255,255,255,0.8);
                transform: translateX(-100%);
                animation: glitch-slide 3s infinite;
            }
            @keyframes glitch-slide {
                0% { transform: translateX(-100%); }
                20% { transform: translateX(100%); }
                100% { transform: translateX(100%); }
            }

            .tech-subline {
                font-size: 1.1rem;
                color: #555;
                font-weight: 400;
                max-width: 700px;
                margin: 0 auto 50px auto;
                line-height: 1.6;
            }
/* Technical Iconic / HUD Card Styles */
            .tech-card {
                background: #ffffff;
                /* Subtle Grid Pattern Background */
                background-image: 
                    linear-gradient(rgba(220, 53, 69, 0.03) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(220, 53, 69, 0.03) 1px, transparent 1px);
                background-size: 20px 20px;
                padding: 40px 30px;
                border-radius: 4px; /* Sharper corners for tech feel */
                box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
                height: 100%;
                border: 1px solid rgba(0,0,0,0.08); 
                transition: all 0.4s ease;
                position: relative;
                overflow: hidden;
            }
            .tech-card:hover {
                transform: translateY(-8px); 
                box-shadow: 0 20px 60px rgba(220, 53, 69, 0.12);
                border-color: rgba(220, 53, 69, 0.4);
            }

            /* Corner Brackets (HUD Style) */
            .tech-corner {
                position: absolute;
                width: 15px;
                height: 15px;
                border: 2px solid transparent;
                transition: all 0.4s ease;
            }
            .tech-corner.tl { top: 0; left: 0; border-top-color: #ddd; border-left-color: #ddd; }
            .tech-corner.tr { top: 0; right: 0; border-top-color: #ddd; border-right-color: #ddd; }
            .tech-corner.bl { bottom: 0; left: 0; border-bottom-color: #ddd; border-left-color: #ddd; }
            .tech-corner.br { bottom: 0; right: 0; border-bottom-color: #ddd; border-right-color: #ddd; }

            .tech-card:hover .tech-corner {
                width: 25px; height: 25px;
                border-color: #dc3545; /* Turn Red on Hover */
            }

            /* Tech Label */
            .tech-label {
                position: absolute;
                top: 15px;
                right: 15px;
                font-family: 'Courier New', monospace;
                font-size: 0.75rem;
                color: #999;
                letter-spacing: 1px;
                font-weight: 600;
                transition: color 0.3s;
            }
            .tech-card:hover .tech-label { color: #dc3545; }

            /* Icon Frame */
            .tech-icon-frame {
                width: 60px;
                height: 60px;
                border-radius: 50%;
                background: rgba(220, 53, 69, 0.05);
                display: flex;
                align-items: center;
                justify-content: center;
                margin-right: 20px;
                position: relative;
                border: 1px dashed rgba(220, 53, 69, 0.3);
                transition: all 0.4s ease;
            }
            .tech-card:hover .tech-icon-frame {
                background: #dc3545;
                border-style: solid;
                transform: rotate(90deg); /* Tech spin effect */
            }
            .tech-icon-frame i {
                font-size: 1.6rem;
                color: #dc3545;
                transition: all 0.4s ease;
            }
            .tech-card:hover .tech-icon-frame i {
                color: #fff;
                transform: rotate(-90deg); /* Counter-rotate icon to keep upright */
            }

            .tech-card h4 { font-family: 'Space Grotesk', sans-serif; transition: color 0.3s; }
            
            /* Scan Line Effect */
            .tech-scan-line {
                position: absolute;
                top: 0; left: 0; width: 100%; height: 2px;
                background: rgba(220, 53, 69, 0.5);
                box-shadow: 0 0 10px #dc3545;
                opacity: 0;
                transform: translateY(-100%);
            }
            .tech-card:hover .tech-scan-line {
                animation: scanDown 1.5s linear infinite;
                opacity: 1;
            }
            @keyframes scanDown {
                0% { transform: translateY(-10px); opacity: 0; }
                20% { opacity: 1; }
                100% { transform: translateY(300px); opacity: 0; }
            }
/* Header Stats */
        .schematic-header-wrap { display: inline-block; position: relative; padding: 20px 40px; }
        .schematic-crosshair { position: absolute; width: 20px; height: 20px; border: 1px solid #999; }
        .schematic-crosshair.top-left { top: 0; left: 0; border-right: none; border-bottom: none; }
        .schematic-crosshair.top-right { top: 0; right: 0; border-left: none; border-bottom: none; }
        .schematic-meta { font-family: 'Courier New', monospace; font-size: 0.8rem; color: #777; letter-spacing: 2px; margin-bottom: 10px; }
        .schematic-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 3rem; color: #222; margin: 0; text-transform: uppercase; }
        .schematic-line { width: 100%; height: 1px; background: #ccc; margin-top: 15px; position: relative; }
        .schematic-line::after { content: ''; position: absolute; right: 0; top: -2px; width: 5px; height: 5px; background: #dc3545; }

        /* Timeline SVG */
        .blueprint-line-svg {
            position: absolute;
            top: 50%; left: 0; width: 100%; height: 100px;
            transform: translateY(-50%);
            z-index: 0;
            pointer-events: none;
        }
        .blueprint-path {
            fill: none;
            stroke: #dc3545;
            stroke-width: 2;
            stroke-dasharray: 1200;
            stroke-dashoffset: 1200; /* Hidden initially */
            opacity: 0.3;
        }

        /* 3D Flip Cards */
        .tech-flip-card {
            background-color: transparent;
            width: 100%;
            height: 300px;
            perspective: 1000px;
            position: relative;
            z-index: 5;
        }
        .tech-flip-inner {
            position: relative;
            width: 100%;
            height: 100%;
            text-align: left;
            transition: transform 0.8s;
            transform-style: preserve-3d;
            box-shadow: 0 4px 8px 0 rgba(0,0,0,0.1);
        }
        /* The flipping class */
        .flipped .tech-flip-inner {
            transform: rotateY(180deg);
        }

        .tech-flip-front, .tech-flip-back {
            position: absolute;
            width: 100%; height: 100%;
            -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
            border: 1px solid rgba(0,0,0,0.1);
            background: #fff;
            display: flex;
            flex-direction: column;
            justify-content: center;
            padding: 30px;
        }

        /* Front Styling (Schematic) */
        .tech-flip-front {
            align-items: center;
            background: rgba(255,255,255,0.9);
            border-bottom: 3px solid #ccc;
        }
        .tf-icon { font-size: 3rem; color: #ccc; margin-bottom: 20px; }
        .tf-id { font-family: 'Courier New', monospace; font-size: 1.2rem; color: #555; font-weight: 700; letter-spacing: 2px; }
        .tf-status { font-family: 'Courier New', monospace; font-size: 0.8rem; color: #999; margin-top: 10px; }

        /* Back Styling (Content) */
        .tech-flip-back {
            transform: rotateY(180deg);
            background: #fff;
            border-bottom: 3px solid #dc3545;
            box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        }
        .tf-header { display: flex; align-items: center; margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
        .tf-led { width: 10px; height: 10px; background: #28a745; border-radius: 50%; margin-right: 10px; box-shadow: 0 0 5px #28a745; }
        .tf-led.blink-red { background: #dc3545; box-shadow: 0 0 5px #dc3545; animation: blink 1s infinite; }
        .tf-header span { font-family: 'Courier New', monospace; font-size: 0.8rem; color: #999; letter-spacing: 1px; }

        .tech-flip-back h4 { font-size: 1.3rem; font-weight: 700; color: #222; margin-bottom: 15px; }
        .tech-flip-back p { font-size: 0.95rem; color: #666; line-height: 1.6; margin-bottom: 20px; }
        
        .tf-tags span {
            display: inline-block;
            font-size: 0.75rem; font-weight: 600; color: #dc3545;
            background: rgba(220, 53, 69, 0.1);
            padding: 5px 10px; border-radius: 4px; margin-right: 5px;
        }
.cs-failure-flow-section {
            background: #fff;
            padding: 120px 0;
            position: relative;
            overflow: hidden;
        }

        /* Flow Items (Risks) */
        .flow-item {
            margin-bottom: 40px;
            position: relative;
            display: flex; align-items: center; justify-content: flex-end;
        }
        .fi-content h4 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.25rem; color: #333; margin: 0; font-weight: 500;
        }

        .flow-center-label span {
            font-family: 'Courier New', monospace;
            font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
            background: #fff; color: #999;
            padding: 5px 15px; border-radius: 20px; border: 1px solid #eee;
            position: relative; z-index: 5;
        }

        /* Stack Grid */
        .flow-stack-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }
        .fs-item {
            position: relative;
            display: flex; align-items: center;
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 600; color: #333;
            font-size: 1.1rem;
            padding: 10px 0;
        }
        .fs-item span { color: #555; }
.cs-pipeline-section {
            background: #fdfdfd; 
            height: 100vh; /* Strict 100vh limit */
            min-height: 600px; /* Safety for small screens */
            display: flex; align-items: center; /* Vertically center everything */
            position: relative;
            overflow: hidden;
            padding: 0;
        }

        .pipeline-container {
            border-left: 0; 
            /* Push slightly down to align with header visually in 100vh */
            padding-top: 20px;
        }

        /* Spine Lines */
        .pipeline-line-track {
            position: absolute; top: 0; bottom: 0; left: 19px; 
            width: 2px;
            background: #eee;
            z-index: 1;
        }
        .pipeline-line-progress {
            position: absolute; top: 0; left: 19px;
            width: 2px;
            height: 0%; 
            background: linear-gradient(to bottom, #dc3545, #ff6b6b);
            z-index: 2;
            box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
        }

        /* Phases - Compact Spacing */
        .pipeline-phase {
            position: relative;
            margin-bottom: 5vh; /* Responsive compact spacing */
            padding-left: 40px;
        }
        .pipeline-phase:last-child { margin-bottom: 0; }

        /* Nodes */
        .pipeline-node {
            position: absolute; left: -50px; top: 0;
            width: 40px; height: 30px; /* Smaller touch target */
            display: flex; align-items: center; justify-content: center;
            z-index: 3;
        }
        .pn-inner {
            width: 12px; height: 12px;
            background: #fff; border: 2px solid #ccc;
            border-radius: 50%;
            transition: all 0.3s;
        }
        .pn-label {
            position: absolute; left: -30px; 
            font-family: 'Courier New', monospace; font-size: 0.8rem; color: #ccc;
            opacity: 0; transition: all 0.3s;
        }
        
        /* Active Node State */
        .pipeline-phase.active .pn-inner {
            background: #dc3545; border-color: #dc3545;
            transform: scale(1.3);
            box-shadow: 0 0 15px rgba(220, 53, 69, 0.6);
        }
        .pipeline-phase.active .pn-label {
            color: #dc3545; opacity: 1;
        }

        /* Content */
        .pipeline-content {
            opacity: 0.2; transform: translateX(10px); /* Slide from right slightly */
            transition: all 0.5s ease;
        }
        .pipeline-content h4 {
            font-family: 'Space Grotesk', sans-serif;
            font-size: 1.35rem; /* Slightly smaller for compact feel */
            color: #222; margin-bottom: 5px; font-weight: 700;
        }
        .pipeline-content p {
            font-size: 0.95rem; color: #666; line-height: 1.5; margin: 0;
        }

        /* Active Content State */
        .pipeline-phase.active .pipeline-content {
            opacity: 1; transform: translateX(0);
        }
.cs-tradeoff-section {
            height: 80vh; /* Slightly reduced height for better focus */
            background: #fff;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
        }

        #gyroscope-canvas {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            z-index: 0;
            opacity: 0.6; /* Slight reduction so text pops */
        }

        .tradeoff-text-block {
            /* No background card, just text */
            position: relative;
            padding: 20px 0;
        }

        .tradeoff-desc { 
            font-size: 1.5rem; 
            color: #333; 
            line-height: 1.5; 
            font-family: 'Space Grotesk', sans-serif; 
            font-weight: 400; 
            border-left: 4px solid #dc3545;
            padding-left: 30px;
        }
.cs-outcomes-section {
            background: #fdfdfd;
            padding: 100px 0;
            position: relative;
            overflow: hidden;
        }

        #impact-canvas {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            z-index: 0;
            opacity: 0.5;
        }

        /* The Impact Pillars (Monoliths) */
        .impact-card {
            background: rgba(255,255,255,0.8);
            border: 1px solid #eee;
            border-bottom: 4px solid #ddd; /* Default Grey */
            padding: 40px 30px;
            height: 100%;
            position: relative;
            overflow: hidden;
            transition: all 0.4s ease;
            backdrop-filter: blur(10px);
            box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        }

        .impact-card:hover {
            transform: translateY(-15px);
            border-bottom-color: #dc3545; /* Brand Red on Hover */
            box-shadow: 0 20px 50px rgba(220, 53, 69, 0.15);
        }

        .ic-number {
            position: absolute;
            top: -20px; right: -10px;
            font-size: 8rem;
            font-weight: 700;
            color: #f0f0f0;
            z-index: 0;
            font-family: 'Space Grotesk', sans-serif;
            transition: transform 0.4s ease;
        }
        .impact-card:hover .ic-number {
            transform: translateY(-10px) scale(1.1);
            color: #e9ecef;
        }

        .ic-icon {
            font-size: 2.5rem;
            color: #dc3545;
            margin-bottom: 25px;
            position: relative; z-index: 1;
        }

        .impact-card h4 {
            font-family: 'Space Grotesk', sans-serif;
            font-weight: 700;
            font-size: 1.5rem;
            margin-bottom: 15px;
            position: relative; z-index: 1;
            color: #222;
        }

        .impact-card p {
            color: #666;
            line-height: 1.6;
            position: relative; z-index: 1;
        }

        /* Decorative Line */
        .ic-line {
            width: 40px; height: 2px;
            background: #dc3545;
            margin-top: 20px;
            transition: width 0.4s ease;
        }
        .impact-card:hover .ic-line { width: 100%; }
.cs-conclusion-section {
            background: #fff;
            padding: 100px 0;
            position: relative;
            overflow: hidden;
            display: flex;
            align-items: center;
        }

        #conclusion-canvas {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            z-index: 0;
            opacity: 0.2; /* Subtle background */
        }

        .conclusion-tag {
            font-family: 'Courier New', monospace;
            color: #999;
            letter-spacing: 3px;
            font-size: 0.9rem;
            font-weight: 700;
        }
