'use client' import { motion } from 'framer-motion' import { useState, useEffect } from 'react' import { FileCheck, Check } from 'lucide-react' function resolveHsl(cssVar: string): string { if (typeof window === 'undefined') return 'transparent' const value = getComputedStyle(document.documentElement).getPropertyValue(cssVar).trim() return value ? `hsl(${value})` : 'transparent' } export function PolicyDemoVisual() { const [phase, setPhase] = useState(0) const [colors, setColors] = useState({ burgundy: '#993350', teal: '#2e6b6a', border: '#27272a', mutedFg: '#aba49d' }) useEffect(() => { setColors({ burgundy: resolveHsl('--burgundy'), teal: resolveHsl('--teal'), border: resolveHsl('--border'), mutedFg: resolveHsl('--muted-foreground'), }) }, []) useEffect(() => { const interval = setInterval(() => { setPhase(p => (p + 1) % 2) }, 3000) return () => clearInterval(interval) }, []) return (
{/* Document Header */}
Terms of Service
{phase === 0 ? 'v2.1' : 'v2.2'}
{/* Document Content */} {/* Section 4.2 */}
Section 4.2 - Data Retention
{/* Text Lines */}

We will retain your personal data for

{/* Changing text */} {phase === 0 ? ( 'as long as necessary to fulfill purposes' ) : ( a minimum of 90 days after account deletion )} {/* Change highlight indicator */} {phase === 1 && ( )}

outlined in our Privacy Policy.

{/* Diff Stats */} {phase === 1 && (
+18 words -7 words
)}
{/* Audit Trail Badge */} {phase === 1 && (
Audit trail saved
Snapshot archived for compliance
)}
) }