{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-swipe-cover",
  "title": "Card Swipe Cover",
  "description": "A card swipes across and covers the frame to reveal a grid of launch-kit cards.",
  "dependencies": [
    "remotion",
    "@remotion/google-fonts",
    "@remotion/transitions"
  ],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/card-swipe-cover/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont } from \"@remotion/google-fonts/Figtree\";\nimport { loadFont as loadSerif } from \"@remotion/google-fonts/InstrumentSerif\";\nimport { loadFont as loadManrope } from \"@remotion/google-fonts/Manrope\";\nimport {\n  linearTiming,\n  type TransitionPresentation,\n  type TransitionPresentationComponentProps,\n  TransitionSeries,\n} from \"@remotion/transitions\";\nimport type React from \"react\";\nimport { Fragment } from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  Img,\n  interpolate,\n  spring,\n  staticFile,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst sans = loadFont(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\nconst serif = loadSerif(\"italic\", { weights: [\"400\"], subsets: [\"latin\"] });\nconst manrope = loadManrope(\"normal\", {\n  weights: [\"600\"],\n  subsets: [\"latin\"],\n});\n\nconst REMOCN_R_PATH =\n  \"M 0.01 0.81 C 0.01 1.73, 0.36 2.79, 1.09 4.13 C 4.91 11.04, 13.45 17.16, 21.7 18.9 C 22.94 19.16, 23.18 19.16, 51.39 19.27 C 76.07 19.36, 80.02 19.4, 81.32 19.57 C 89.89 20.69, 96.2 24.68, 99.38 31.01 C 103.19 38.56, 102.53 50.1, 97.91 57.07 C 94.66 61.96, 89.68 64.99, 83.26 66 C 82.81 66.07, 70.18 66.83, 55.2 67.69 C 24.82 69.43, 27.03 69.23, 24.18 70.4 C 19.9 72.15, 14.84 75.7, 10.65 79.89 C 4.86 85.68, 1.3 91.91, 0.25 98.13 C 0.12 98.85, 0.08 103.13, 0.04 116.66 L 0 134.26 9.5 134.26 L 19 134.26 19.05 119.41 C 19.1 103.27, 19.08 103.82, 19.82 101.04 C 21.79 93.65, 27.86 88.75, 36.45 87.63 C 37.23 87.53, 39.41 87.5, 43.57 87.53 C 50.12 87.59, 50.75 87.65, 53.22 88.45 C 56.61 89.56, 59.67 91.86, 62.02 95.07 C 62.52 95.76, 69.35 103.85, 77.2 113.07 C 85.04 122.28, 91.63 130.04, 91.85 130.32 C 92.07 130.59, 92.5 131.34, 92.82 131.97 C 93.52 133.35, 94.11 133.93, 95.06 134.13 C 95.5 134.23, 98.97 134.26, 106.36 134.23 L 117.01 134.19 100.82 113.07 C 91.91 101.45, 84.52 91.78, 84.39 91.57 C 83.36 89.89, 83.66 87.53, 85.09 86 C 85.79 85.25, 86.36 84.94, 88.07 84.38 C 96.18 81.72, 104.15 76.62, 109.97 70.36 C 120.59 58.93, 124.06 44.32, 119.44 30.43 C 114.59 15.81, 101.93 4.02, 87.64 0.83 C 83.93 0.01, 88.09 0.08, 41.85 0.04 L 0.01 0 0.01 0.81 Z\";\n\nfunction RemocnLogo({ fontSize, color }: { fontSize: number; color: string }) {\n  return (\n    <div\n      style={{\n        display: \"flex\",\n        alignItems: \"baseline\",\n        color,\n        fontFamily: manrope.fontFamily,\n        fontWeight: 600,\n        fontSize,\n        letterSpacing: \"-0.025em\",\n        lineHeight: 1,\n      }}\n    >\n      <svg\n        viewBox=\"0 0 124.06 134.26\"\n        style={{ height: \"0.76em\", width: \"auto\" }}\n        aria-hidden\n      >\n        <path fill=\"currentColor\" d={REMOCN_R_PATH} />\n      </svg>\n      <span style={{ marginLeft: \"0.04em\" }}>emocn</span>\n    </div>\n  );\n}\n\nconst CLAMP = {\n  extrapolateLeft: \"clamp\",\n  extrapolateRight: \"clamp\",\n} as const;\n\nexport type CardSwipeCoverProps = {\n  from?: \"bottom-right\" | \"bottom-left\";\n  radius?: number;\n  depth?: number;\n  edge?: string;\n  tilt?: number;\n  blur?: number;\n  dim?: number;\n  backdrop?: string;\n};\n\nexport const cardSwipeCoverDefaults: Required<CardSwipeCoverProps> = {\n  from: \"bottom-right\",\n  radius: 56,\n  depth: 30,\n  edge: \"#0c1614\",\n  tilt: 1,\n  blur: 4,\n  dim: 0.6,\n  backdrop: \"#000000\",\n};\n\nconst LEAD = { mass: 1, damping: 200, stiffness: 140 };\nconst TRAIL = { mass: 1, damping: 200, stiffness: 90 };\nconst SLAB_LAYERS = 10;\n\nfunction curves(p: number, frames: number, fps: number) {\n  const f = p * frames;\n  const lead = spring({\n    frame: f,\n    fps,\n    config: LEAD,\n    durationInFrames: frames,\n  });\n  const trail = spring({\n    frame: f,\n    fps,\n    config: TRAIL,\n    durationInFrames: frames,\n  });\n  return { lead, trail };\n}\n\nfunction cardPose(\n  p: number,\n  frames: number,\n  fps: number,\n  side: number,\n  tilt: number,\n) {\n  const { lead, trail } = curves(p, frames, fps);\n  const settle = interpolate(trail, [0, 1], [0, 1], CLAMP);\n  const flat = 1 - settle;\n  return {\n    x: interpolate(trail, [0, 1], [0.72 * side, 0], CLAMP),\n    y: interpolate(lead, [0, 1], [1.08, 0], CLAMP),\n    rotZ: -17 * tilt * side * flat,\n    rotX: 32 * tilt * flat,\n    rotY: -26 * tilt * side * flat,\n    scale: 1 + 0.26 * flat,\n    settle,\n    lead,\n  };\n}\n\nconst CardSwipeCoverPresentation: React.FC<\n  TransitionPresentationComponentProps<CardSwipeCoverProps>\n> = ({\n  children,\n  presentationProgress,\n  presentationDirection,\n  presentationDurationInFrames,\n  passedProps,\n}) => {\n  const { fps, width, height } = useVideoConfig();\n  const o = { ...cardSwipeCoverDefaults, ...passedProps };\n  const side = o.from === \"bottom-left\" ? -1 : 1;\n  const frames = Math.max(2, presentationDurationInFrames);\n  const p = presentationProgress;\n  const pose = cardPose(p, frames, fps, side, o.tilt);\n\n  if (presentationDirection === \"exiting\") {\n    const s = pose.lead;\n    return (\n      <AbsoluteFill\n        style={{\n          backgroundColor: o.backdrop,\n        }}\n      >\n        <AbsoluteFill\n          style={{\n            transform: `translate(${-2 * side * s}%, ${-2.5 * s}%) scale(${1 + 0.06 * s})`,\n            transformOrigin: o.from === \"bottom-left\" ? \"100% 0%\" : \"0% 0%\",\n            filter: `brightness(${1 - o.dim * s}) blur(${4 * s}px)`,\n          }}\n        >\n          {children}\n        </AbsoluteFill>\n      </AbsoluteFill>\n    );\n  }\n\n  const prev = cardPose(Math.max(0, p - 1 / frames), frames, fps, side, o.tilt);\n  const speed = Math.hypot(\n    (pose.x - prev.x) * width,\n    (pose.y - prev.y) * height,\n  );\n  const motionBlur = Math.min(o.blur, speed / 45) * (1 - pose.settle * 0.6);\n  const radius = interpolate(pose.settle, [0.82, 1], [o.radius, 0], CLAMP);\n  const depth = o.depth * (1 - pose.settle);\n  const sheen = interpolate(pose.lead, [0, 1], [-40, 140], CLAMP);\n\n  return (\n    <AbsoluteFill style={{ perspective: 1700, perspectiveOrigin: \"50% 40%\" }}>\n      <AbsoluteFill\n        style={{\n          transformStyle: \"preserve-3d\",\n          transformOrigin: \"50% 50%\",\n          transform: `translate3d(${pose.x * 100}%, ${pose.y * 100}%, 0) rotateZ(${pose.rotZ}deg) rotateX(${pose.rotX}deg) rotateY(${pose.rotY}deg) scale(${pose.scale})`,\n        }}\n      >\n        {Array.from({ length: SLAB_LAYERS }, (_, i) => {\n          const k = (i + 1) / SLAB_LAYERS;\n          return (\n            <AbsoluteFill\n              key={`slab-${k}`}\n              style={{\n                borderRadius: radius,\n                backgroundColor: o.edge,\n                transform: `translateZ(${-depth * k}px)`,\n                filter: `brightness(${1.25 - 0.55 * k})`,\n                boxShadow:\n                  i === SLAB_LAYERS - 1\n                    ? `0 ${60 * (1 - pose.settle)}px ${140 * (1 - pose.settle)}px rgba(0,0,0,${0.55 * (1 - pose.settle)})`\n                    : undefined,\n              }}\n            />\n          );\n        })}\n        <AbsoluteFill\n          style={{\n            borderRadius: radius,\n            overflow: \"hidden\",\n            transform: \"translateZ(0.5px)\",\n            filter: motionBlur > 0.3 ? `blur(${motionBlur}px)` : undefined,\n          }}\n        >\n          {children}\n          <AbsoluteFill\n            style={{\n              opacity: 1 - pose.settle,\n              backgroundImage: `linear-gradient(115deg, transparent ${sheen - 30}%, rgba(255,255,255,0.16) ${sheen}%, transparent ${sheen + 22}%)`,\n            }}\n          />\n          <AbsoluteFill\n            style={{\n              borderRadius: radius,\n              opacity: 1 - pose.settle,\n              boxShadow: \"inset 0 1.5px 0 rgba(255,255,255,0.22)\",\n            }}\n          />\n        </AbsoluteFill>\n      </AbsoluteFill>\n    </AbsoluteFill>\n  );\n};\n\nexport function cardSwipeCover(\n  props: CardSwipeCoverProps = {},\n): TransitionPresentation<CardSwipeCoverProps> {\n  return { component: CardSwipeCoverPresentation, props };\n}\n\nexport interface CoverItem {\n  label: string;\n  title: string;\n  meta: string;\n  src: string;\n}\n\nexport interface CardSwipeCoverDemoProps {\n  theme?: \"dark\" | \"light\";\n  accent?: string;\n  line?: string;\n  title?: string;\n  subtitle?: string;\n  covers?: CoverItem[];\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n  groundB?: GshPresetId;\n  groundParamsB?: Partial<GradientParams>;\n  transition?: CardSwipeCoverProps;\n}\n\nconst THEMES = {\n  dark: {\n    ink: \"#eef7f3\",\n    muted: \"rgba(226,240,234,0.62)\",\n    accent: \"#7cf2c8\",\n    caret: \"#7cf2c8\",\n    edge: \"#18205a\",\n    backdrop: \"#000000\",\n    dim: 0.6,\n    chrome: \"rgba(10,14,22,0.55)\",\n    hairline: \"rgba(255,255,255,0.1)\",\n    shadow: \"0,0,0\",\n    groundA: {\n      kind: \"mist\",\n      colors: [\"#b8f5dc\", \"#3fb58f\", \"#0e4a3c\", \"#030a08\"],\n      background: \"#020605\",\n      speed: 0.6,\n      loopSeconds: 16,\n      scale: 0.85,\n      warp: 0.4,\n      blur: 0.75,\n      grain: 0.14,\n      seed: 9,\n    } as Partial<GradientParams>,\n    groundB: {\n      kind: \"mist\",\n      colors: [\"#c9d6ff\", \"#5b78ff\", \"#1f2b8f\", \"#070b24\"],\n      background: \"#03050d\",\n      speed: 0.7,\n      loopSeconds: 16,\n      scale: 0.85,\n      warp: 0.4,\n      blur: 0.7,\n      seed: 12,\n    } as Partial<GradientParams>,\n  },\n  light: {\n    ink: \"#14171c\",\n    muted: \"rgba(20,23,28,0.56)\",\n    accent: \"#2f8f6b\",\n    caret: \"#2f8f6b\",\n    edge: \"#c9ced8\",\n    backdrop: \"#d9dbd6\",\n    dim: 0.18,\n    chrome: \"rgba(255,255,255,0.6)\",\n    hairline: \"rgba(20,23,28,0.08)\",\n    shadow: \"40,44,60\",\n    groundA: {\n      kind: \"mist\",\n      colors: [\"#bdeedb\", \"#8fd9c0\", \"#e6f1ea\", \"#2c6b58\"],\n      background: \"#eef0ec\",\n      speed: 0.6,\n      loopSeconds: 14,\n      scale: 0.8,\n      warp: 0.4,\n      blur: 0.7,\n      grain: 0.25,\n      seed: 4,\n    } as Partial<GradientParams>,\n    groundB: {\n      kind: \"mist\",\n      colors: [\"#aebcff\", \"#d9dffb\", \"#c8b8ff\", \"#eef0f6\"],\n      background: \"#f1f1f5\",\n      speed: 0.6,\n      loopSeconds: 16,\n      scale: 0.85,\n      warp: 0.4,\n      blur: 0.75,\n      grain: 0.22,\n      seed: 14,\n    } as Partial<GradientParams>,\n  },\n};\n\nconst DEFAULT_COVERS: CoverItem[] = [\n  {\n    label: \"Teaser\",\n    title: \"Ship week teaser\",\n    meta: \"12 scenes · 0:18\",\n    src: \"templates/launch-anything/horizon.jpg\",\n  },\n  {\n    label: \"Product\",\n    title: \"Studio walkthrough\",\n    meta: \"24 scenes · 0:42\",\n    src: \"templates/product-showcase/sculpture.jpg\",\n  },\n  {\n    label: \"Social\",\n    title: \"Launch day cutdowns\",\n    meta: \"9 scenes · 0:15\",\n    src: \"reel/reel-4.jpg\",\n  },\n  {\n    label: \"Keynote\",\n    title: \"Founder's note\",\n    meta: \"16 scenes · 1:05\",\n    src: \"templates/brand-guidelines/ceramics.jpg\",\n  },\n];\n\nconst A_LEN = 66;\nconst B_LEN = 84;\nconst T_LEN = 30;\nexport const CARD_SWIPE_COVER_DURATION = A_LEN + B_LEN - T_LEN;\n\nconst A_BEATS = { logo: 0, type: 3, typeEnd: 24 } as const;\nconst B_BEATS = { covers: 4, lift: 42, pill: 48 } as const;\n\nconst TYPE_IN = Easing.bezier(0.32, 0.72, 0, 1);\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\n\nfunction parseLine(text: string) {\n  const out: { ch: string; accent: boolean }[] = [];\n  let accent = false;\n  for (const ch of text) {\n    if (ch === \"*\") {\n      accent = !accent;\n      continue;\n    }\n    out.push({ ch, accent });\n  }\n  return out;\n}\n\nfunction SceneA({\n  line,\n  palette,\n  ground,\n  groundParams,\n}: {\n  line: string;\n  palette: (typeof THEMES)[\"dark\"];\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}) {\n  const frame = useCurrentFrame();\n  const { width, height } = useVideoConfig();\n  const tall = height > width;\n  const chars = parseLine(line);\n  const firstAccent = chars.findIndex((c) => c.accent);\n  const typed = Math.floor(\n    interpolate(\n      frame,\n      [A_BEATS.type, A_BEATS.typeEnd],\n      [0, chars.length],\n      CLAMP,\n    ),\n  );\n  const done = typed >= chars.length;\n  const blinkOn = !done || Math.floor((frame - A_BEATS.typeEnd) / 8) % 2 === 0;\n  const fs = tall ? width * 0.095 : width * 0.052;\n  const push = interpolate(frame, [0, A_LEN], [1, 1.035], CLAMP);\n  const logoIn = interpolate(frame, [A_BEATS.logo, A_BEATS.logo + 12], [0, 1], {\n    ...CLAMP,\n    easing: TYPE_IN,\n  });\n\n  return (\n    <AbsoluteFill>\n      <GshGround\n        preset={ground}\n        params={ground ? groundParams : { ...palette.groundA, ...groundParams }}\n        timeOffset={4}\n        timeScale={0.7}\n      />\n      <AbsoluteFill\n        style={{\n          transform: `scale(${push})`,\n          alignItems: \"center\",\n          justifyContent: \"center\",\n          flexDirection: \"column\",\n          gap: fs * 0.62,\n          padding: `0 ${width * 0.08}px`,\n        }}\n      >\n        <div\n          style={{\n            opacity: logoIn,\n            transform: `translateY(${(1 - logoIn) * 14}px)`,\n          }}\n        >\n          <RemocnLogo fontSize={fs * 0.42} color={palette.ink} />\n        </div>\n        <div\n          style={{\n            fontFamily: sans.fontFamily,\n            fontWeight: 300,\n            fontSize: fs,\n            lineHeight: 1.08,\n            letterSpacing: \"-0.035em\",\n            color: palette.ink,\n            textAlign: \"center\",\n            maxWidth: tall ? width * 0.84 : width * 0.86,\n          }}\n        >\n          {chars.map((c, i) => {\n            const shown = i < typed;\n            const breakHere = tall && c.accent && i === firstAccent;\n            return (\n              <Fragment key={`${c.ch}-${i}`}>\n                {breakHere ? (\n                  <span style={{ display: \"block\", height: 0 }} />\n                ) : null}\n                <span\n                  style={{\n                    color: shown\n                      ? c.accent\n                        ? palette.accent\n                        : palette.ink\n                      : \"transparent\",\n                    fontFamily: c.accent ? serif.fontFamily : undefined,\n                    fontStyle: c.accent ? \"italic\" : undefined,\n                    fontWeight: c.accent ? 400 : undefined,\n                    letterSpacing: c.accent ? \"-0.01em\" : undefined,\n                    fontSize: c.accent ? \"1.08em\" : undefined,\n                    position: \"relative\",\n                  }}\n                >\n                  {c.ch}\n                  {i === Math.max(0, typed - 1) ? (\n                    <span\n                      style={{\n                        position: \"absolute\",\n                        right: -fs * 0.08,\n                        top: \"0.12em\",\n                        bottom: \"0.06em\",\n                        width: Math.max(2, fs * 0.045),\n                        borderRadius: 2,\n                        backgroundColor: palette.caret,\n                        opacity: blinkOn && typed > 0 ? 1 : 0,\n                      }}\n                    />\n                  ) : null}\n                </span>\n              </Fragment>\n            );\n          })}\n        </div>\n      </AbsoluteFill>\n    </AbsoluteFill>\n  );\n}\n\nfunction PlayIcon({ size }: { size: number }) {\n  return (\n    <svg viewBox=\"0 0 24 24\" width={size} height={size} aria-hidden>\n      <path d=\"M9 7.5v9l7.5-4.5z\" fill=\"#0b0d12\" />\n    </svg>\n  );\n}\n\nfunction FilmIcon({ size, color }: { size: number; color: string }) {\n  return (\n    <svg viewBox=\"0 0 24 24\" width={size} height={size} aria-hidden>\n      <rect\n        x=\"3.5\"\n        y=\"5\"\n        width=\"17\"\n        height=\"14\"\n        rx=\"3\"\n        fill=\"none\"\n        stroke={color}\n        strokeWidth=\"1.5\"\n      />\n      <path\n        d=\"M3.5 9.5h17M8 5v4.5M16 5v4.5\"\n        fill=\"none\"\n        stroke={color}\n        strokeWidth=\"1.5\"\n      />\n    </svg>\n  );\n}\n\nfunction Cover({\n  item,\n  w,\n  h,\n  scale,\n  appear,\n  lift,\n  accent,\n  shadow,\n}: {\n  item: CoverItem;\n  w: number;\n  h: number;\n  scale: number;\n  appear: number;\n  lift: number;\n  accent: string;\n  shadow: string;\n}) {\n  const r = 22 * scale;\n  const pad = 18 * scale;\n  return (\n    <div\n      style={{\n        width: w,\n        height: h,\n        position: \"relative\",\n        borderRadius: r,\n        overflow: \"hidden\",\n        opacity: interpolate(appear, [0, 0.4], [0, 1], CLAMP),\n        transform: `translateY(${(1 - appear) * 48 * scale - lift * 14 * scale}px) scale(${1 + lift * 0.035})`,\n        boxShadow: `0 1px 2px rgba(${shadow},0.18), 0 ${10 + lift * 14}px ${30 + lift * 20}px rgba(${shadow},${0.22 + lift * 0.1}), 0 ${30 + lift * 20}px ${70 + lift * 30}px rgba(${shadow},0.22)`,\n        flexShrink: 0,\n      }}\n    >\n      <Img\n        src={staticFile(item.src)}\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          width: \"100%\",\n          height: \"100%\",\n          objectFit: \"cover\",\n          transform: `scale(${1.08 - appear * 0.08 + lift * 0.03})`,\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          background:\n            \"linear-gradient(180deg, rgba(6,8,12,0.42) 0%, rgba(6,8,12,0) 34%, rgba(6,8,12,0) 46%, rgba(6,8,12,0.78) 100%)\",\n        }}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          top: pad,\n          left: pad,\n          right: pad,\n          display: \"flex\",\n          alignItems: \"center\",\n          gap: 8 * scale,\n          color: \"rgba(255,255,255,0.9)\",\n          fontSize: 16 * scale,\n          fontWeight: 400,\n        }}\n      >\n        <div\n          style={{\n            width: 26 * scale,\n            height: 26 * scale,\n            borderRadius: 999,\n            backgroundColor: \"rgba(255,255,255,0.18)\",\n            boxShadow: \"inset 0 0 0 1px rgba(255,255,255,0.22)\",\n            display: \"flex\",\n            alignItems: \"center\",\n            justifyContent: \"center\",\n          }}\n        >\n          <FilmIcon size={15 * scale} color=\"#fff\" />\n        </div>\n        {item.label}\n      </div>\n      <div\n        style={{\n          position: \"absolute\",\n          left: pad,\n          right: pad,\n          bottom: pad,\n          display: \"flex\",\n          alignItems: \"flex-end\",\n          justifyContent: \"space-between\",\n          gap: 10 * scale,\n        }}\n      >\n        <div\n          style={{ display: \"flex\", flexDirection: \"column\", gap: 6 * scale }}\n        >\n          <div\n            style={{\n              color: \"#fff\",\n              fontSize: 25 * scale,\n              lineHeight: 1.08,\n              letterSpacing: \"-0.02em\",\n              fontWeight: 400,\n            }}\n          >\n            {item.title}\n          </div>\n          <div\n            style={{\n              color: \"rgba(255,255,255,0.72)\",\n              fontSize: 16 * scale,\n              fontWeight: 400,\n            }}\n          >\n            {item.meta}\n          </div>\n        </div>\n        <div\n          style={{\n            width: 38 * scale,\n            height: 38 * scale,\n            borderRadius: 999,\n            backgroundColor: lift > 0.5 ? accent : \"rgba(255,255,255,0.92)\",\n            display: \"flex\",\n            alignItems: \"center\",\n            justifyContent: \"center\",\n            flexShrink: 0,\n            transform: `scale(${1 + lift * 0.08})`,\n          }}\n        >\n          <PlayIcon size={22 * scale} />\n        </div>\n      </div>\n      <div\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          borderRadius: r,\n          boxShadow: `inset 0 0 0 1px rgba(255,255,255,0.14), inset 0 1px 0 rgba(255,255,255,0.18), inset 0 0 0 ${lift * 2.5 * scale}px ${accent}`,\n        }}\n      />\n    </div>\n  );\n}\n\nfunction SceneB({\n  title,\n  subtitle,\n  covers,\n  palette,\n  accent,\n  ground,\n  groundParams,\n}: {\n  title: string;\n  subtitle: string;\n  covers: CoverItem[];\n  palette: (typeof THEMES)[\"dark\"];\n  accent: string;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}) {\n  const frame = useCurrentFrame();\n  const { width, height, fps } = useVideoConfig();\n  const tall = height > width;\n  const m = width * 0.07;\n  const scale = tall ? width / 820 : width / 1280;\n  const cols = tall ? 2 : 4;\n  const gap = 20 * scale;\n  const cw = (width - m * 2 - gap * (cols - 1)) / cols;\n  const ch = tall ? cw * 1.32 : cw * 1.18;\n  const push = interpolate(frame, [0, B_LEN], [1, 1.03], CLAMP);\n  const lift = spring({\n    frame: frame - B_BEATS.lift,\n    fps,\n    config: CARD,\n  });\n  const pill = spring({ frame: frame - B_BEATS.pill, fps, config: CHIP });\n  const head = interpolate(frame, [0, 14], [0, 1], {\n    ...CLAMP,\n    easing: TYPE_IN,\n  });\n\n  return (\n    <AbsoluteFill>\n      <GshGround\n        preset={ground}\n        params={ground ? groundParams : { ...palette.groundB, ...groundParams }}\n        timeOffset={6}\n        timeScale={0.6}\n      />\n      <AbsoluteFill\n        style={{\n          transform: `scale(${push})`,\n          padding: `${tall ? height * 0.07 : height * 0.085}px ${m}px`,\n          fontFamily: sans.fontFamily,\n          display: \"flex\",\n          flexDirection: \"column\",\n          justifyContent: tall ? \"center\" : \"flex-start\",\n          gap: tall ? 40 * scale : 0,\n        }}\n      >\n        <div\n          style={{\n            display: \"flex\",\n            alignItems: \"center\",\n            justifyContent: \"space-between\",\n          }}\n        >\n          <RemocnLogo fontSize={24 * scale} color={palette.ink} />\n          <div\n            style={{\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 8 * scale,\n              padding: `${4 * scale}px`,\n              borderRadius: 999,\n              backgroundColor: palette.chrome,\n              boxShadow: `inset 0 0 0 1px ${palette.hairline}`,\n              fontSize: 16 * scale,\n              color: palette.muted,\n            }}\n          >\n            {[\"All\", \"Videos\", \"Stills\", \"Captions\"].map((t, i) => (\n              <div\n                key={t}\n                style={{\n                  padding: `${7 * scale}px ${14 * scale}px`,\n                  borderRadius: 999,\n                  color: i === 0 ? palette.ink : palette.muted,\n                  backgroundColor:\n                    i === 0 ? \"rgba(255,255,255,0.14)\" : \"transparent\",\n                  boxShadow:\n                    i === 0 ? `inset 0 0 0 1px ${palette.hairline}` : undefined,\n                }}\n              >\n                {t}\n              </div>\n            ))}\n          </div>\n        </div>\n        <div\n          style={{\n            display: \"flex\",\n            alignItems: \"flex-end\",\n            justifyContent: \"space-between\",\n            marginTop: tall ? 0 : height * 0.07,\n            marginBottom: tall ? 0 : height * 0.05,\n            opacity: head,\n            transform: `translateY(${(1 - head) * 16}px)`,\n          }}\n        >\n          <div\n            style={{ display: \"flex\", flexDirection: \"column\", gap: 8 * scale }}\n          >\n            <div\n              style={{\n                fontSize: (tall ? 84 : 58) * scale,\n                fontWeight: 300,\n                letterSpacing: \"-0.035em\",\n                lineHeight: 1,\n                color: palette.ink,\n              }}\n            >\n              {title}\n            </div>\n            <div\n              style={{\n                fontSize: (tall ? 28 : 20) * scale,\n                fontWeight: 400,\n                color: palette.muted,\n                letterSpacing: \"-0.01em\",\n              }}\n            >\n              {subtitle}\n            </div>\n          </div>\n          <div\n            style={{\n              display: \"flex\",\n              alignItems: \"center\",\n              gap: 8 * scale,\n              padding: `${10 * scale}px ${18 * scale}px`,\n              borderRadius: 999,\n              backgroundColor: accent,\n              color: \"#0b0d12\",\n              fontSize: 17 * scale,\n              fontWeight: 400,\n              opacity: interpolate(pill, [0, 0.3], [0, 1], CLAMP),\n              transform: `scale(${0.7 + pill * 0.3})`,\n              boxShadow: `0 8px 24px rgba(${palette.shadow},0.25)`,\n            }}\n          >\n            <svg\n              viewBox=\"0 0 24 24\"\n              width={16 * scale}\n              height={16 * scale}\n              aria-hidden\n            >\n              <path\n                d=\"M12 5v14M5 12h14\"\n                stroke=\"#0b0d12\"\n                strokeWidth=\"1.8\"\n                strokeLinecap=\"round\"\n              />\n            </svg>\n            New kit\n          </div>\n        </div>\n        <div\n          style={{\n            display: \"flex\",\n            flexWrap: \"wrap\",\n            gap,\n          }}\n        >\n          {covers.slice(0, 4).map((c, i) => {\n            const appear = spring({\n              frame: frame - B_BEATS.covers - i * 3,\n              fps,\n              config: CARD,\n            });\n            return (\n              <Cover\n                key={c.title}\n                item={c}\n                w={cw}\n                h={ch}\n                scale={scale}\n                appear={appear}\n                lift={i === 0 ? lift : 0}\n                accent={accent}\n                shadow={palette.shadow}\n              />\n            );\n          })}\n        </div>\n      </AbsoluteFill>\n    </AbsoluteFill>\n  );\n}\n\nexport function CardSwipeCoverDemo({\n  theme = \"dark\",\n  accent,\n  line = \"Every launch asset, *in one place.*\",\n  title = \"Launch kits\",\n  subtitle = \"Four films, ready to render.\",\n  covers = DEFAULT_COVERS,\n  ground,\n  groundParams,\n  groundB,\n  groundParamsB,\n  transition,\n}: CardSwipeCoverDemoProps) {\n  const palette = THEMES[theme];\n  const tone = accent ?? palette.accent;\n  return (\n    <AbsoluteFill style={{ backgroundColor: palette.backdrop }}>\n      <TransitionSeries>\n        <TransitionSeries.Sequence durationInFrames={A_LEN}>\n          <SceneA\n            line={line}\n            palette={{ ...palette, accent: tone, caret: tone }}\n            ground={ground}\n            groundParams={groundParams}\n          />\n        </TransitionSeries.Sequence>\n        <TransitionSeries.Transition\n          presentation={cardSwipeCover({\n            edge: palette.edge,\n            backdrop: palette.backdrop,\n            dim: palette.dim,\n            ...transition,\n          })}\n          timing={linearTiming({ durationInFrames: T_LEN })}\n        />\n        <TransitionSeries.Sequence durationInFrames={B_LEN}>\n          <SceneB\n            title={title}\n            subtitle={subtitle}\n            covers={covers}\n            palette={palette}\n            accent={tone}\n            ground={groundB}\n            groundParams={groundParamsB}\n          />\n        </TransitionSeries.Sequence>\n      </TransitionSeries>\n    </AbsoluteFill>\n  );\n}\n",
      "type": "registry:component",
      "target": "components/remocn/card-swipe-cover.tsx"
    }
  ],
  "type": "registry:component"
}
