All files / src/remotion ScenePillars.tsx

100% Statements 23/23
100% Branches 0/0
100% Functions 2/2
100% Lines 23/23

Press n or j to go to the next uncovered block, b, p or k for the previous block.

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 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386                                                      6x 6x     6x           6x 6x 6x     6x 6x 6x     6x             6x                                                                                                                                                                                                                                                                                                                                         2x 2x     2x           2x 2x     2x         2x 2x     2x       2x 2x   2x                                                                                                                                                                                                                                                                                
import React from 'react';
import { interpolate, spring, useCurrentFrame, useVideoConfig } from 'remotion';
import { THEME } from './Theme';
import { SpecularSweep } from './Components';
 
interface PillarCardProps {
  index: number;
  icon: React.ReactNode;
  title: string;
  subtitle: string;
  accentColor: string;
  glowColor: string;
  tag: string;
}
 
/**
 * Single Glass Feature Card with elevation bloom and subtle idle levitation.
 */
function PillarCard({
  index,
  icon,
  title,
  subtitle,
  accentColor,
  glowColor,
  tag,
}: PillarCardProps): React.JSX.Element {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();
 
  // Staggered entrance spring (24 frames offset between cards)
  const entranceSpring = spring({
    frame: frame - (24 + index * 22),
    fps,
    config: THEME.springs.hero,
  });
 
  const cardY = interpolate(entranceSpring, [0, 1], [120, 0]);
  const cardScale = interpolate(entranceSpring, [0, 1], [0.86, 1.0]);
  const cardOpacity = interpolate(entranceSpring, [0, 0.4], [0, 1]);
 
  // Sin-wave idle levitation after entrance settles
  const idleT = (frame / fps) * 1.8 + index * 1.5;
  const idleY = Math.sin(idleT) * 6;
  const idleRotate = Math.cos(idleT * 0.8) * 1.2;
 
  // Specular sweep progress
  const specularProgress = interpolate(
    frame,
    [40 + index * 30, 140 + index * 30],
    [0, 1],
    { extrapolateLeft: 'clamp', extrapolateRight: 'clamp' },
  );
 
  return (
    <div
      style={{
        position: 'relative',
        width: 380,
        height: 480,
        borderRadius: 28,
        transform: `translateY(${cardY + idleY}px) rotate(${idleRotate}deg) scale(${cardScale})`,
        opacity: cardOpacity,
        transformStyle: 'preserve-3d',
      }}
    >
      {/* Dynamic Ambient Drop-Shadow Bloom */}
      <div
        style={{
          position: 'absolute',
          inset: -15,
          borderRadius: 36,
          background: `radial-gradient(circle at 50% 40%, ${glowColor} 0%, transparent 72%)`,
          filter: 'blur(34px)',
          opacity: 0.7,
          zIndex: 0,
        }}
      />
 
      {/* Main Solid Dark Card Surface */}
      <div
        style={{
          position: 'relative',
          width: '100%',
          height: '100%',
          borderRadius: 28,
          backgroundColor: THEME.colors.surfaceCard,
          border: `1.5px solid ${THEME.colors.borderSubtle}`,
          boxShadow: THEME.shadows.solidCard,
          padding: '44px 34px',
          display: 'flex',
          flexDirection: 'column',
          justifyContent: 'space-between',
          overflow: 'hidden',
          zIndex: 1,
        }}
      >
        {/* Specular Catch-light */}
        <SpecularSweep progress={specularProgress} width={380} height={480} />
 
        {/* Top Header: Tag & Icon */}
        <div>
          <div
            style={{
              display: 'flex',
              alignItems: 'center',
              justifyContent: 'space-between',
              marginBottom: 32,
            }}
          >
            {/* Round Icon Glow Container */}
            <div
              style={{
                width: 64,
                height: 64,
                borderRadius: 20,
                backgroundColor: '#1E202B',
                border: `1px solid ${accentColor}`,
                boxShadow: `0 8px 24px ${glowColor}`,
                display: 'flex',
                alignItems: 'center',
                justifyContent: 'center',
                color: accentColor,
              }}
            >
              {icon}
            </div>
 
            {/* Pillar Index Tag */}
            <span
              style={{
                fontFamily: THEME.typography.fontFamily,
                fontSize: 13,
                fontWeight: 700,
                letterSpacing: '0.08em',
                textTransform: 'uppercase',
                color: accentColor,
                padding: '4px 12px',
                borderRadius: 9999,
                backgroundColor: '#1E202B',
                border: '1px solid #2C2E3C',
              }}
            >
              {tag}
            </span>
          </div>
 
          {/* Title */}
          <h2
            style={{
              margin: '0 0 16px',
              fontFamily: THEME.typography.fontFamily,
              fontSize: 32,
              fontWeight: 700,
              letterSpacing: '-0.03em',
              color: THEME.colors.textPrimary,
              lineHeight: 1.15,
            }}
          >
            {title}
          </h2>
 
          {/* Subtitle / Description */}
          <p
            style={{
              margin: 0,
              fontFamily: THEME.typography.fontFamily,
              fontSize: 18,
              fontWeight: 400,
              lineHeight: 1.5,
              color: THEME.colors.textMuted,
            }}
          >
            {subtitle}
          </p>
        </div>
 
        {/* Bottom Micro-Interaction: Verified Status */}
        <div
          style={{
            display: 'flex',
            alignItems: 'center',
            gap: 10,
            paddingTop: 20,
            borderTop: `1px solid ${THEME.colors.borderSubtle}`,
          }}
        >
          <div
            style={{
              width: 8,
              height: 8,
              borderRadius: '50%',
              backgroundColor: accentColor,
              boxShadow: `0 0 10px ${accentColor}`,
            }}
          />
          <span
            style={{
              fontFamily: THEME.typography.fontFamily,
              fontSize: 13,
              fontWeight: 500,
              color: THEME.colors.textTertiary,
              letterSpacing: '0.02em',
            }}
          >
            Guaranteed in Core Architecture
          </span>
        </div>
      </div>
    </div>
  );
}
 
/**
 * Scene 6: The Trust Pillars (Frames 2880–3360 | 48.0s – 56.0s)
 * Centered high-elevation glass stage displaying 3 beautifully illuminated
 * floating feature cards with smooth spring entrance stagger.
 */
export function ScenePillars(): React.JSX.Element {
  const frame = useCurrentFrame();
  const { fps } = useVideoConfig();
 
  // Stage entrance camera glide
  const stageSpring = spring({
    frame,
    fps,
    config: THEME.springs.soft,
  });
 
  const stageScale = interpolate(stageSpring, [0, 1], [0.94, 1.0]);
  const stageOpacity = interpolate(stageSpring, [0, 0.3], [0, 1]);
 
  // Section headline spring
  const headlineSpring = spring({
    frame: frame - 10,
    fps,
    config: THEME.springs.snappy,
  });
  const headlineY = interpolate(headlineSpring, [0, 1], [24, 0]);
  const headlineOpacity = interpolate(headlineSpring, [0, 0.4], [0, 1]);
 
  // Exit transition for Scene 6 (frames 440 - 480)
  const exitProgress = interpolate(frame, [440, 480], [0, 1], {
    extrapolateLeft: 'clamp',
    extrapolateRight: 'clamp',
  });
  const sceneExitScale = 1 + exitProgress * 0.15;
  const sceneExitOpacity = 1 - exitProgress * 0.9;
 
  return (
    <div
      style={{
        position: 'absolute',
        inset: 0,
        display: 'flex',
        flexDirection: 'column',
        alignItems: 'center',
        justifyContent: 'center',
        transform: `scale(${stageScale * sceneExitScale})`,
        opacity: stageOpacity * sceneExitOpacity,
      }}
    >
      {/* Section Headline */}
      <div
        style={{
          textAlign: 'center',
          marginBottom: 48,
          transform: `translateY(${headlineY}px)`,
          opacity: headlineOpacity,
        }}
      >
        <span
          style={{
            fontFamily: THEME.typography.fontFamily,
            fontSize: 14,
            fontWeight: 700,
            letterSpacing: '0.12em',
            textTransform: 'uppercase',
            color: THEME.colors.accentCyan,
            marginBottom: 8,
            display: 'block',
          }}
        >
          Core Architecture
        </span>
        <h1
          style={{
            margin: 0,
            fontFamily: THEME.typography.fontFamily,
            fontSize: 54,
            fontWeight: 800,
            letterSpacing: '-0.03em',
            color: THEME.colors.textPrimary,
          }}
        >
          Built on Uncompromising Principles
        </h1>
      </div>
 
      {/* 3 Floating Pillar Cards */}
      <div
        style={{
          display: 'flex',
          gap: 36,
          alignItems: 'center',
          justifyContent: 'center',
        }}
      >
        {/* Card 1: 100% Private & Local */}
        <PillarCard
          index={0}
          tag='01 // Privacy'
          accentColor={THEME.colors.accentGreen}
          glowColor={THEME.colors.accentGreenGlow}
          title='100% Private & Local'
          subtitle='Stored only on this device. Zero cloud uploads, zero trackers, zero compromise.'
          icon={
            <svg
              width='32'
              height='32'
              viewBox='0 0 24 24'
              fill='none'
              stroke='currentColor'
              strokeWidth='2'
              strokeLinecap='round'
              strokeLinejoin='round'
            >
              <path d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z' />
              <path d='m9 12 2 2 4-4' />
            </svg>
          }
        />
 
        {/* Card 2: Completely Free */}
        <PillarCard
          index={1}
          tag='02 // Freedom'
          accentColor={THEME.colors.accentGold}
          glowColor={THEME.colors.accentGoldGlow}
          title='Completely Free'
          subtitle='No ads. No subscriptions. No paywalls. Every feature unlocked for everyone.'
          icon={
            <svg
              width='32'
              height='32'
              viewBox='0 0 24 24'
              fill='none'
              stroke='currentColor'
              strokeWidth='2'
              strokeLinecap='round'
              strokeLinejoin='round'
            >
              <polygon points='12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2' />
            </svg>
          }
        />
 
        {/* Card 3: Open-Source */}
        <PillarCard
          index={2}
          tag='03 // Code'
          accentColor={THEME.colors.accentPurple}
          glowColor={THEME.colors.accentPurpleGlow}
          title='Open-Source'
          subtitle='Built in public with Rust, Tauri 2 & TypeScript. Auditable, secure, and community-driven.'
          icon={
            <svg
              width='32'
              height='32'
              viewBox='0 0 24 24'
              fill='none'
              stroke='currentColor'
              strokeWidth='2'
              strokeLinecap='round'
              strokeLinejoin='round'
            >
              <polyline points='16 18 22 12 16 6' />
              <polyline points='8 6 2 12 8 18' />
            </svg>
          }
        />
      </div>
    </div>
  );
}