File size: 4,522 Bytes
5d33320
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import React from 'react';
import { motion, Variants } from 'framer-motion';
import { COMPARISON_DATA } from '../../data/mockData';
import { ComparisonItem } from '../../types';

const ProblemSolution: React.FC = () => {
    
    // Jitter animation for "Problem" items
    const jitter: Variants = {
        animate: {
            x: [0, -2, 2, -1, 1, 0],
            y: [0, 1, -1, 0, 1, 0],
            opacity: [0.6, 0.8, 0.5, 0.7],
            transition: {
                duration: 2, // Slower, persistent unease
                repeat: Infinity,
                repeatType: "mirror",
                ease: "linear"
            }
        }
    };

    // Smooth entry for "Solution" items
    const smoothEntry: Variants = {
        hidden: { opacity: 0, x: 20 },
        visible: (i: number) => ({
            opacity: 1,
            x: 0,
            transition: {
                delay: i * 0.1,
                duration: 0.8,
                ease: [0.22, 1, 0.36, 1] as [number, number, number, number]
            }
        })
    };

    return (
        <section className="relative w-full min-h-[80vh] flex flex-col md:flex-row bg-transparent">

            

            {/* LEFT SIDE: The Problem (Chaos) */}

            <div className="w-full md:w-1/2 bg-[#0e0303] relative overflow-hidden flex flex-col justify-center px-8 py-16 md:px-16 lg:px-24 border-y border-white/5 md:border-y-0 md:border-r border-white/5">

                

                <motion.div 

                    initial={{ opacity: 0 }}

                    whileInView={{ opacity: 1 }}

                    className="relative z-20"

                >

                    <h3 className="font-serif text-3xl md:text-4xl text-white/40 mb-12 tracking-wide">

                        The Uncertainty

                    </h3>



                    <div className="space-y-8">

                        {COMPARISON_DATA.map((item: ComparisonItem) => (

                            <motion.div 

                                key={`prob-${item.id}`}

                                className="flex items-center gap-4"

                                variants={jitter}

                                animate="animate"

                            >

                                <div className="w-1.5 h-1.5 bg-red-900/50 rounded-full" />

                                <p className="font-sans text-xl md:text-2xl text-red-100/30 line-through decoration-red-900/50 decoration-2">

                                    {item.problem}

                                </p>

                            </motion.div>

                        ))}

                    </div>

                </motion.div>

            </div>



            {/* RIGHT SIDE: The Solution (Control) */}

            <div className="w-full md:w-1/2 relative bg-[#140404] flex flex-col justify-center px-8 py-16 md:px-16 lg:px-24 border-l border-white/5">

                <motion.div

                    initial="hidden"

                    whileInView="visible"

                    viewport={{ once: true, margin: "-20%" }}

                    className="relative z-20"

                >

                    <h3 className="font-serif text-3xl md:text-4xl text-brand-gold mb-12 tracking-wide">

                        The Standard

                    </h3>



                    <div className="space-y-8">

                         {COMPARISON_DATA.map((item: ComparisonItem, index: number) => (

                            <motion.div 

                                key={`sol-${item.id}`}

                                custom={index}

                                variants={smoothEntry}

                                className="flex items-center gap-6"

                            >

                                <div className="w-8 h-[1px] bg-brand-red" />

                                <p className="font-sans text-xl md:text-2xl text-white font-medium tracking-tight">

                                    {item.solution}

                                </p>

                            </motion.div>

                        ))}

                    </div>

                </motion.div>



                {/* Subtle sheen effect on right side */}

                <div className="absolute top-0 right-0 w-full h-full bg-gradient-to-b from-white/7 to-transparent pointer-events-none" />

            </div>



        </section>
    );
};

export default ProblemSolution;