Phone Trio
Three phones side by side show a notification, a photo feed and a profile.
Source
components/kuchi/phone-trio.tsx
1"use client";23import { loadFont as loadSerif } from "@remotion/google-fonts/InstrumentSerif";4import { loadFont as loadManrope } from "@remotion/google-fonts/Manrope";5import type React from "react";6import {7 AbsoluteFill,8 Easing,9 Img,10 interpolate,11 spring,12 useCurrentFrame,13 useVideoConfig,14} from "remotion";15import type { GradientParams } from "@/lib/kuchi/gsh/gradient-engine";16import { GshGround } from "@/lib/kuchi/gsh/gsh-ground";17import type { GshPresetId } from "@/lib/kuchi/gsh/presets";1819const manrope = loadManrope("normal", {20 weights: ["300", "400"],21 subsets: ["latin"],22});23const serif = loadSerif("italic", { weights: ["400"], subsets: ["latin"] });2425const ENTER = Easing.bezier(0.32, 0.72, 0, 1);26const MOVE = Easing.bezier(0.65, 0, 0.35, 1);27const HEAVY = { mass: 1, damping: 26, stiffness: 120 };28const CARD = { mass: 0.8, damping: 18, stiffness: 160 };29const CHIP = { mass: 0.5, damping: 12, stiffness: 200 };30const FLICK = { mass: 0.9, damping: 22, stiffness: 110 };3132const B = {33 rise: [-12, -8, -4],34 scrollL: 10,35 flick1: 14,36 scrollR: 20,37 flick2: 44,38 forward: 70,39 banner: 84,40 end: 132,41};4243const PW = 286;44const PH = 620;45const BEZEL = 10;46const SW = PW - BEZEL * 2;47const SH = PH - BEZEL * 2;4849const ramp = (f: number, start: number, dur: number, easing = ENTER) =>50 interpolate(f, [start, start + dur], [0, 1], {51 extrapolateLeft: "clamp",52 extrapolateRight: "clamp",53 easing,54 });5556const mix = (a: number, b: number, t: number) => a + (b - a) * t;5758const line = (color: string, w = 1.5) => ({59 fill: "none",60 stroke: color,61 strokeWidth: w,62 strokeLinecap: "round" as const,63 strokeLinejoin: "round" as const,64});6566interface Tone {67 dark: boolean;68 bg: string;69 ink: string;70 muted: string;71 faint: string;72 hair: string;73 fill: string;74 accent: string;75}7677function StatusBar({ t }: { t: Tone }) {78 return (79 <div80 style={{81 position: "absolute",82 left: 0,83 right: 0,84 top: 0,85 height: 46,86 display: "flex",87 alignItems: "center",88 padding: "4px 26px 0",89 fontSize: 15,90 color: t.ink,91 zIndex: 5,92 }}93 >94 <span style={{ flex: 1, letterSpacing: "-0.01em" }}>9:41</span>95 <svg viewBox="0 0 18 12" width={17} height={11} aria-hidden>96 {[0, 1, 2, 3].map((i) => (97 <rect98 key={i}99 x={i * 4.6}100 y={9 - i * 2.6}101 width={3}102 height={3 + i * 2.6}103 rx={0.8}104 fill={t.ink}105 />106 ))}107 </svg>108 <svg109 viewBox="0 0 16 12"110 width={15}111 height={11}112 style={{ marginLeft: 6 }}113 aria-hidden114 >115 <path116 d="M1.5 4.5a9.5 9.5 0 0 1 13 0M4 7a6 6 0 0 1 8 0M6.5 9.5a2.4 2.4 0 0 1 3 0"117 {...line(t.ink, 1.6)}118 />119 </svg>120 <div121 style={{122 marginLeft: 6,123 width: 24,124 height: 12,125 borderRadius: 4,126 border: `1.2px solid ${t.faint}`,127 padding: 1.5,128 boxSizing: "border-box",129 }}130 >131 <div132 style={{133 width: "78%",134 height: "100%",135 borderRadius: 2,136 background: t.ink,137 }}138 />139 </div>140 </div>141 );142}143144function Phone({145 t,146 children,147 shellDark,148}: {149 t: Tone;150 children: React.ReactNode;151 shellDark: boolean;152}) {153 return (154 <div155 style={{156 position: "absolute",157 left: -PW / 2,158 top: -PH / 2,159 width: PW,160 height: PH,161 borderRadius: 54,162 background: shellDark163 ? "linear-gradient(150deg, #4a4a52 0%, #16161a 22%, #0b0b0d 60%, #34343a 100%)"164 : "linear-gradient(150deg, #ffffff 0%, #d9d6d2 26%, #c9c5c0 62%, #f4f2ef 100%)",165 boxShadow: shellDark166 ? "inset 0 0 0 1.5px rgba(255,255,255,0.12), 0 2px 4px rgba(0,0,0,0.3), 0 24px 50px rgba(20,10,40,0.35), 0 70px 120px rgba(20,10,40,0.35)"167 : "inset 0 0 0 1.5px rgba(255,255,255,0.9), 0 2px 4px rgba(80,60,40,0.12), 0 24px 50px rgba(120,90,60,0.18), 0 70px 120px rgba(120,90,60,0.2)",168 }}169 >170 <div171 style={{172 position: "absolute",173 left: BEZEL,174 top: BEZEL,175 width: SW,176 height: SH,177 borderRadius: 44,178 overflow: "hidden",179 background: t.bg,180 boxShadow: shellDark ? "0 0 0 2px #050506" : "0 0 0 2px #1a1a1c",181 }}182 >183 {children}184 <div185 style={{186 position: "absolute",187 left: 0,188 right: 0,189 top: 0,190 height: 62,191 background: `linear-gradient(180deg, ${t.bg} 0%, ${t.bg} 74%, transparent 100%)`,192 zIndex: 4,193 }}194 />195 <StatusBar t={t} />196 <div197 style={{198 position: "absolute",199 left: SW / 2 - 46,200 top: 11,201 width: 92,202 height: 27,203 borderRadius: 14,204 background: "#000",205 zIndex: 6,206 }}207 />208 <div209 style={{210 position: "absolute",211 left: SW / 2 - 58,212 bottom: 8,213 width: 116,214 height: 5,215 borderRadius: 3,216 background: t.ink,217 opacity: 0.85,218 zIndex: 6,219 }}220 />221 </div>222 </div>223 );224}225226export interface PhoneTrioProps {227 theme?: "dark" | "light";228 accent?: string;229 name?: string;230 handle?: string;231 role?: string;232 headline?: string;233 accentWord?: string;234 images?: string[];235 skills?: string[];236 liveLabel?: string;237 /** Large heading on the middle phone's work screen. */238 workTitle?: string;239 /** Call to action at the bottom of the about screen. */240 ctaLabel?: string;241 /** Primary button on the profile screen. */242 followLabel?: string;243 /** Text color inside the phones; overrides the theme ink. */244 ink?: string;245 /** Solid fill in place of the gradient ground; "transparent" drops it. */246 background?: string;247 /** Typeface for the copy. Load it yourself; Manrope by default. */248 fontFamily?: string;249 /** Size of the phones, around the frame's center. */250 scale?: number;251 /** Frames to hold the first frame before anything moves. */252 delay?: number;253 speed?: number;254 ground?: GshPresetId;255 groundParams?: Partial<GradientParams>;256}257258/** The foreground at `scale`, around the frame's center; nothing extra at 1. */259function ScaleLayer({260 scale,261 children,262}: {263 scale: number;264 children: React.ReactNode;265}) {266 if (scale === 1) return children;267 return (268 <AbsoluteFill style={{ transform: `scale(${scale})` }}>269 {children}270 </AbsoluteFill>271 );272}273274export function PhoneTrio({275 theme = "dark",276 accent = "#ff5a36",277 name = "Ines Marlow",278 handle = "ines.marlow",279 role = "Motion designer",280 headline = "Driven by motion, obsessed with the",281 accentWord = "seamless.",282 images = [283 "https://kuchi-media.kalarislabs.com/components/art/art-11.svg",284 "https://kuchi-media.kalarislabs.com/components/art/art-12.svg",285 "https://kuchi-media.kalarislabs.com/components/art/art-01.svg",286 "https://kuchi-media.kalarislabs.com/components/art/art-02.svg",287 "https://kuchi-media.kalarislabs.com/components/art/art-03.svg",288 "https://kuchi-media.kalarislabs.com/components/art/art-04.svg",289 "https://kuchi-media.kalarislabs.com/components/art/art-05.svg",290 "https://kuchi-media.kalarislabs.com/components/art/art-06.svg",291 "https://kuchi-media.kalarislabs.com/components/art/art-07.svg",292 ],293 skills = ["Motion", "Sound", "Web"],294 liveLabel = "Portfolio is live",295 workTitle = "Selected work",296 ctaLabel = "Open for projects",297 followLabel = "Follow",298 ink,299 background,300 fontFamily = manrope.fontFamily,301 scale = 1,302 delay = 0,303 speed = 1,304 ground,305 groundParams,306}: PhoneTrioProps) {307 const frame = Math.max(0, useCurrentFrame() - delay) * speed;308 const { width, height, fps } = useVideoConfig();309 const dark = theme === "dark";310 const portrait = height > width * 1.2;311 const stageW = portrait ? 720 : 1280;312 const stageH = portrait ? 1280 : 720;313 const k = width / stageW;314315 const t: Tone = dark316 ? {317 dark: true,318 bg: "#0c0c0e",319 ink: ink ?? "#f5f4f2",320 muted: "rgba(245,244,242,0.56)",321 faint: "rgba(245,244,242,0.34)",322 hair: "rgba(255,255,255,0.09)",323 fill: "rgba(255,255,255,0.08)",324 accent,325 }326 : {327 dark: false,328 bg: "#ffffff",329 ink: ink ?? "#141414",330 muted: "rgba(20,20,20,0.55)",331 faint: "rgba(20,20,20,0.32)",332 hair: "rgba(20,20,20,0.08)",333 fill: "rgba(20,20,20,0.05)",334 accent,335 };336337 const img = (i: number) => images[i % images.length];338339 const rise = B.rise.map((at) =>340 spring({ frame: frame - at, fps, config: CARD }),341 );342 const risePrev = B.rise.map((at) =>343 spring({ frame: frame - 1 - at, fps, config: CARD }),344 );345 const fwd = spring({ frame: frame - B.forward, fps, config: HEAVY });346 const banner = spring({ frame: frame - B.banner, fps, config: CHIP });347348 const scrollL = ramp(frame, B.scrollL, 96, MOVE) * 110;349 const f1 = spring({ frame: frame - B.flick1, fps, config: FLICK });350 const f2 = spring({ frame: frame - B.flick2, fps, config: FLICK });351 const f1p = spring({ frame: frame - 1 - B.flick1, fps, config: FLICK });352 const f2p = spring({ frame: frame - 1 - B.flick2, fps, config: FLICK });353 const scrollM = f1 * 250 + f2 * 236;354 const scrollMV = Math.abs(scrollM - (f1p * 250 + f2p * 236));355 const scrollR = ramp(frame, B.scrollR, 70, MOVE) * 60;356357 const layout = portrait358 ? [359 { x: mix(-196, -226, fwd), y: 70, s: mix(1.1, 1.02, fwd), z: 0 },360 { x: 0, y: mix(0, -14, fwd), s: mix(1.42, 1.52, fwd), z: 2 },361 { x: mix(196, 226, fwd), y: 70, s: mix(1.1, 1.02, fwd), z: 1 },362 ]363 : [364 {365 x: mix(-330, -350, fwd),366 y: mix(0, 8, fwd),367 s: mix(1, 0.92, fwd),368 z: 0,369 },370 { x: 0, y: mix(0, -4, fwd), s: mix(1, 1.07, fwd), z: 2 },371 {372 x: mix(330, 350, fwd),373 y: mix(0, 8, fwd),374 s: mix(1, 0.92, fwd),375 z: 1,376 },377 ];378 const camPush = 1 + 0.02 * ramp(frame, 0, B.end, Easing.linear);379380 const resolvedPreset: GshPresetId | undefined =381 ground ?? (dark ? "velvet-hour" : undefined);382 const resolvedParams: Partial<GradientParams> | undefined =383 groundParams ??384 (ground || dark385 ? undefined386 : {387 kind: "mist",388 background: "#f3efe8",389 colors: ["#e9b8ff", "#ffd3a8", "#fff2b8", "#a7c4ff"],390 });391392 const navRow = (title: string, back = true) => (393 <div394 style={{395 height: 44,396 display: "flex",397 alignItems: "center",398 padding: "0 16px",399 fontSize: 16,400 color: t.ink,401 }}402 >403 <div style={{ width: 28 }}>404 {back ? (405 <svg viewBox="0 0 24 24" width={22} height={22} aria-hidden>406 <path d="m15 5-7 7 7 7" {...line(t.ink, 1.8)} />407 </svg>408 ) : null}409 </div>410 <span style={{ flex: 1, textAlign: "center" }}>{title}</span>411 <svg viewBox="0 0 24 24" width={22} height={22} aria-hidden>412 <path d="M5 12h.01M12 12h.01M19 12h.01" {...line(t.ink, 2.6)} />413 </svg>414 </div>415 );416417 const profileScreen = (418 <>419 <div420 style={{421 position: "absolute",422 left: 0,423 right: 0,424 top: 46,425 transform: `translateY(${-scrollL}px)`,426 }}427 >428 {navRow(handle)}429 <div430 style={{431 display: "flex",432 alignItems: "center",433 gap: 14,434 padding: "10px 16px 0",435 }}436 >437 <div438 style={{439 width: 76,440 height: 76,441 borderRadius: 38,442 padding: 3,443 background: `conic-gradient(from 200deg, ${accent}, #ffb36b, #e889b5, ${accent})`,444 flexShrink: 0,445 }}446 >447 <div448 style={{449 width: "100%",450 height: "100%",451 borderRadius: 35,452 border: `3px solid ${t.bg}`,453 overflow: "hidden",454 boxSizing: "border-box",455 }}456 >457 <Img458 src={img(6)}459 style={{ width: "100%", height: "100%", objectFit: "cover" }}460 />461 </div>462 </div>463 <div464 style={{465 display: "flex",466 flex: 1,467 justifyContent: "space-between",468 }}469 >470 {[471 ["48", "projects"],472 ["21", "clients"],473 ["6", "awards"],474 ].map(([v, l]) => (475 <div key={l} style={{ textAlign: "center" }}>476 <div style={{ fontSize: 18, color: t.ink }}>{v}</div>477 <div style={{ fontSize: 13, color: t.muted }}>{l}</div>478 </div>479 ))}480 </div>481 </div>482 <div style={{ padding: "12px 16px 0" }}>483 <div style={{ fontSize: 17, color: t.ink, letterSpacing: "-0.01em" }}>484 {name}485 </div>486 <div style={{ fontSize: 15, color: accent, marginTop: 1 }}>487 {role}488 </div>489 <div490 style={{491 fontSize: 13,492 color: t.muted,493 marginTop: 6,494 lineHeight: 1.4,495 }}496 >497 Launch films and product motion for small teams.498 </div>499 </div>500 <div style={{ display: "flex", gap: 6, padding: "12px 16px 0" }}>501 <div502 style={{503 flex: 1,504 height: 34,505 borderRadius: 10,506 background: accent,507 color: "#fff",508 fontSize: 14,509 display: "flex",510 alignItems: "center",511 justifyContent: "center",512 }}513 >514 {followLabel}515 </div>516 <div517 style={{518 flex: 1,519 height: 34,520 borderRadius: 10,521 background: t.fill,522 color: t.ink,523 fontSize: 14,524 display: "flex",525 alignItems: "center",526 justifyContent: "center",527 }}528 >529 Message530 </div>531 </div>532 <div533 style={{534 display: "flex",535 justifyContent: "space-around",536 margin: "14px 0 2px",537 borderBottom: `1px solid ${t.hair}`,538 }}539 >540 {[0, 1, 2].map((i) => (541 <div542 key={i}543 style={{544 padding: "8px 18px 9px",545 borderBottom:546 i === 0 ? `1.5px solid ${t.ink}` : "1.5px solid transparent",547 marginBottom: -1,548 }}549 >550 <svg viewBox="0 0 24 24" width={20} height={20} aria-hidden>551 <path552 d={553 i === 0554 ? "M4 4h16v16H4zM4 9.5h16M4 14.5h16M9.5 4v16M14.5 4v16"555 : i === 1556 ? "M5 5h14v14H5zM10 9.5l5 2.5-5 2.5z"557 : "M12 12a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM5 20c.8-3.5 3.6-5.5 7-5.5s6.2 2 7 5.5"558 }559 {...line(i === 0 ? t.ink : t.faint)}560 />561 </svg>562 </div>563 ))}564 </div>565 <div566 style={{567 display: "grid",568 gridTemplateColumns: "1fr 1fr 1fr",569 gap: 2,570 }}571 >572 {[0, 1, 2, 3, 4, 5, 7, 8, 2].map((ix, i) => (573 <div key={`${ix}-${i}`} style={{ height: 112, overflow: "hidden" }}>574 <Img575 src={img(ix)}576 style={{ width: "100%", height: "100%", objectFit: "cover" }}577 />578 </div>579 ))}580 </div>581 </div>582 <div583 style={{584 position: "absolute",585 left: 0,586 right: 0,587 bottom: 0,588 height: 74,589 background: t.bg,590 borderTop: `1px solid ${t.hair}`,591 display: "flex",592 justifyContent: "space-around",593 paddingTop: 12,594 boxSizing: "border-box",595 }}596 >597 {[598 "M4 10.5 12 4l8 6.5V20h-5v-5h-6v5H4z",599 "M11 18a7 7 0 1 0 0-14 7 7 0 0 0 0 14ZM20 20l-4-4",600 "M5 5h14v14H5zM12 9v6M9 12h6",601 "M12 20s-7-4.4-7-10a4 4 0 0 1 7-2.6A4 4 0 0 1 19 10c0 5.6-7 10-7 10Z",602 "M12 12a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7ZM5 20c.8-3.5 3.6-5.5 7-5.5s6.2 2 7 5.5",603 ].map((d, i) => (604 <svg key={d} viewBox="0 0 24 24" width={24} height={24} aria-hidden>605 <path d={d} {...line(i === 4 ? t.ink : t.muted, 1.6)} />606 </svg>607 ))}608 </div>609 </>610 );611612 const workScreen = (613 <>614 <div615 style={{616 position: "absolute",617 left: 0,618 right: 0,619 top: 46,620 transform: `translateY(${-scrollM}px)`,621 filter:622 scrollMV > 3623 ? `blur(${Math.min(3, scrollMV * 0.12)}px)`624 : undefined,625 }}626 >627 <div628 style={{629 padding: "6px 16px 0",630 fontSize: 30,631 fontWeight: 300,632 color: t.ink,633 letterSpacing: "-0.035em",634 }}635 >636 {workTitle}637 </div>638 <div style={{ display: "flex", gap: 6, padding: "12px 16px 14px" }}>639 {["All", "Motion", "Web", "Sound"].map((c, i) => (640 <span641 key={c}642 style={{643 height: 30,644 padding: "0 12px",645 borderRadius: 15,646 fontSize: 13,647 display: "flex",648 alignItems: "center",649 background: i === 0 ? t.ink : t.fill,650 color: i === 0 ? t.bg : t.ink,651 }}652 >653 {c}654 </span>655 ))}656 </div>657 {[658 ["Launch film", "2026 · 0:42"],659 ["Brand motion kit", "2026 · 24 scenes"],660 ["App store preview", "2025 · 0:30"],661 ["Product teaser", "2025 · 0:15"],662 ["Keynote opener", "2025 · 1:10"],663 ].map(([title, meta], i) => (664 <div key={title} style={{ padding: "0 12px 14px" }}>665 <div666 style={{667 position: "relative",668 height: 200,669 borderRadius: 20,670 overflow: "hidden",671 }}672 >673 <Img674 src={img(i * 2)}675 style={{676 width: "100%",677 height: "100%",678 objectFit: "cover",679 }}680 />681 <div682 style={{683 position: "absolute",684 inset: 0,685 background:686 "linear-gradient(180deg, transparent 45%, rgba(0,0,0,0.6) 100%)",687 }}688 />689 <div690 style={{691 position: "absolute",692 left: 14,693 right: 14,694 bottom: 12,695 display: "flex",696 alignItems: "flex-end",697 }}698 >699 <div style={{ flex: 1 }}>700 <div style={{ fontSize: 17, color: "#fff" }}>{title}</div>701 <div702 style={{ fontSize: 13, color: "rgba(255,255,255,0.72)" }}703 >704 {meta}705 </div>706 </div>707 <div708 style={{709 width: 34,710 height: 34,711 borderRadius: 17,712 background: "rgba(255,255,255,0.22)",713 backdropFilter: "blur(8px)",714 display: "flex",715 alignItems: "center",716 justifyContent: "center",717 }}718 >719 <svg viewBox="0 0 24 24" width={14} height={14} aria-hidden>720 <path d="M8 5.5v13l10-6.5z" fill="#fff" />721 </svg>722 </div>723 </div>724 </div>725 </div>726 ))}727 </div>728 <div729 style={{730 position: "absolute",731 left: 12,732 right: 12,733 top: 50,734 height: 64,735 borderRadius: 20,736 background: dark ? "rgba(36,36,40,0.94)" : "rgba(255,255,255,0.96)",737 border: `1px solid ${t.hair}`,738 boxShadow: "0 12px 30px rgba(0,0,0,0.28)",739 display: "flex",740 alignItems: "center",741 gap: 12,742 padding: "0 14px",743 zIndex: 7,744 opacity: frame >= B.banner ? Math.min(1, banner * 2) : 0,745 transform: `translateY(${mix(-90, 0, banner)}px) scale(${mix(0.9, 1, banner)})`,746 }}747 >748 <div749 style={{750 width: 36,751 height: 36,752 borderRadius: 10,753 background: accent,754 display: "flex",755 alignItems: "center",756 justifyContent: "center",757 flexShrink: 0,758 }}759 >760 <svg viewBox="0 0 24 24" width={18} height={18} aria-hidden>761 <path d="m6 12.5 4 4 8-9" {...line("#fff", 2.2)} />762 </svg>763 </div>764 <div style={{ flex: 1, minWidth: 0 }}>765 <div style={{ fontSize: 14, color: t.ink }}>{liveLabel}</div>766 <div style={{ fontSize: 13, color: t.muted, whiteSpace: "nowrap" }}>767 {handle}.studio · now768 </div>769 </div>770 </div>771 <div772 style={{773 position: "absolute",774 left: SW / 2 - 28,775 bottom: 26,776 width: 56,777 height: 56,778 borderRadius: 28,779 background: dark ? "#f5f4f2" : "#141414",780 display: "flex",781 alignItems: "center",782 justifyContent: "center",783 boxShadow: "0 10px 24px rgba(0,0,0,0.35)",784 zIndex: 4,785 }}786 >787 <svg viewBox="0 0 24 24" width={20} height={20} aria-hidden>788 <path d="M8 5.5v13l10-6.5z" fill={dark ? "#0c0c0e" : "#ffffff"} />789 </svg>790 </div>791 </>792 );793794 const aboutScreen = (795 <>796 <div797 style={{798 position: "absolute",799 left: 0,800 right: 0,801 top: 46,802 transform: `translateY(${-scrollR}px)`,803 }}804 >805 {navRow("About")}806 <div style={{ padding: "18px 18px 0" }}>807 <div style={{ fontSize: 13, color: accent, letterSpacing: "0.02em" }}>808 {name} · {role}809 </div>810 <div811 style={{812 fontSize: 30,813 fontWeight: 300,814 color: t.ink,815 letterSpacing: "-0.035em",816 lineHeight: 1.08,817 marginTop: 12,818 }}819 >820 {headline}{" "}821 <span822 style={{823 fontFamily: serif.fontFamily,824 fontStyle: "italic",825 fontWeight: 400,826 letterSpacing: "-0.01em",827 color: accent,828 }}829 >830 {accentWord}831 </span>832 </div>833 <div834 style={{835 fontSize: 13,836 color: t.muted,837 lineHeight: 1.5,838 marginTop: 14,839 }}840 >841 Eight years of launch films, product reveals and the small842 transitions that make an interface feel alive.843 </div>844 </div>845 <div846 style={{ margin: "18px 18px 0", borderTop: `1px solid ${t.hair}` }}847 >848 {skills.map((s, i) => (849 <div850 key={s}851 style={{852 height: 52,853 display: "flex",854 alignItems: "center",855 gap: 12,856 borderBottom: `1px solid ${t.hair}`,857 fontSize: 16,858 color: t.ink,859 }}860 >861 <svg viewBox="0 0 24 24" width={20} height={20} aria-hidden>862 <path863 d={864 i % 3 === 0865 ? "M5 5h14v14H5zM10 9.5l5 2.5-5 2.5z"866 : i % 3 === 1867 ? "M4 10v4M8 7v10M12 4v16M16 8v8M20 11v2"868 : "M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16ZM4 12h16M12 4c2.5 2.5 2.5 13.5 0 16M12 4c-2.5 2.5-2.5 13.5 0 16"869 }870 {...line(t.muted)}871 />872 </svg>873 <span style={{ flex: 1 }}>{s}</span>874 <span style={{ fontSize: 13, color: t.faint }}>875 {[12, 7, 9][i % 3]} projects876 </span>877 <svg viewBox="0 0 24 24" width={16} height={16} aria-hidden>878 <path d="m9 6 6 6-6 6" {...line(t.faint)} />879 </svg>880 </div>881 ))}882 </div>883 </div>884 <div885 style={{886 position: "absolute",887 left: 0,888 right: 0,889 bottom: 0,890 height: 110,891 background: `linear-gradient(180deg, transparent, ${t.bg} 40%)`,892 }}893 />894 <div895 style={{896 position: "absolute",897 left: 18,898 right: 18,899 bottom: 30,900 height: 54,901 display: "flex",902 alignItems: "center",903 gap: 12,904 }}905 >906 <div style={{ flex: 1 }}>907 <div style={{ fontSize: 15, color: t.ink }}>{ctaLabel}</div>908 <div style={{ fontSize: 13, color: t.muted }}>909 Replies within a day910 </div>911 </div>912 <div913 style={{914 width: 54,915 height: 54,916 borderRadius: 27,917 background: accent,918 display: "flex",919 alignItems: "center",920 justifyContent: "center",921 boxShadow: `inset 0 1px 0 rgba(255,255,255,0.3), 0 10px 24px color-mix(in oklab, ${accent} 45%, transparent)`,922 }}923 >924 <svg viewBox="0 0 24 24" width={20} height={20} aria-hidden>925 <path d="M7 17 17 7M9 7h8v8" {...line("#fff", 1.8)} />926 </svg>927 </div>928 </div>929 </>930 );931932 const screens = [profileScreen, workScreen, aboutScreen];933934 return (935 <AbsoluteFill style={{ fontFamily, overflow: "hidden" }}>936 {background === undefined ? (937 <GshGround938 preset={resolvedPreset}939 params={resolvedParams}940 timeOffset={2}941 timeScale={0.4}942 />943 ) : (944 <AbsoluteFill945 style={{946 background: background === "transparent" ? undefined : background,947 }}948 />949 )}950 <svg width={0} height={0} style={{ position: "absolute" }} aria-hidden>951 {rise.map((r, i) => (952 <filter953 key={B.rise[i]}954 id={`pt-rise-${i}`}955 x="-10%"956 y="-10%"957 width="120%"958 height="120%"959 >960 <feGaussianBlur961 stdDeviation={`0 ${Math.min(6, Math.abs(r - risePrev[i]) * PH * 0.06)}`}962 />963 </filter>964 ))}965 </svg>966 <ScaleLayer scale={scale}>967 <div968 style={{969 position: "absolute",970 left: 0,971 top: 0,972 width: stageW,973 height: stageH,974 transform: `scale(${k})`,975 transformOrigin: "0 0",976 perspective: 2400,977 }}978 >979 <div980 style={{981 position: "absolute",982 left: stageW / 2,983 top: stageH / 2,984 width: 0,985 height: 0,986 transformStyle: "preserve-3d",987 transform: `scale(${camPush}) rotateX(${4 - 2 * fwd}deg)`,988 }}989 >990 {[0, 2, 1].map((i) => {991 const L = layout[i];992 const r = rise[i];993 const side = i !== 1;994 const blurV = Math.abs(r - risePrev[i]) * PH * 0.06;995 const tilt = (i - 1) * mix(10, 0, Math.min(1, r));996 return (997 <div998 key={i}999 style={{1000 position: "absolute",1001 left: 0,1002 top: 0,1003 zIndex: L.z,1004 transform: `translate(${L.x}px, ${L.y + mix(stageH * 0.85, 0, r)}px) rotateZ(${tilt}deg) rotateY(${(1 - i) * 6 * (side ? 1 - fwd * 0.4 : 0)}deg) scale(${L.s})`,1005 filter:1006 [1007 blurV > 0.4 ? `url(#pt-rise-${i})` : "",1008 side && fwd > 0.011009 ? `brightness(${mix(1, dark ? 0.62 : 0.9, fwd)}) blur(${fwd * 1.4}px)`1010 : "",1011 ]1012 .join(" ")1013 .trim() || undefined,1014 opacity: frame >= B.rise[i] ? 1 : 0,1015 }}1016 >1017 <Phone t={t} shellDark={dark}>1018 {screens[i]}1019 </Phone>1020 </div>1021 );1022 })}1023 </div>1024 </div>1025 </ScaleLayer>1026 </AbsoluteFill>1027 );1028}10291030export default PhoneTrio;









