{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"satin-opening-ribbon-on-brass-posts-that-brass-scissors-cut-so-both-halves-flutter-down-and-the-page-goes-live","type":"registry:block","title":"Satin Opening Ribbon on Brass Posts That Brass Scissors Cut So Both Halves Flutter Down and the Page Goes Live","description":"Launch moment: a satin ribbon tied between brass posts is cut by scissors and both halves flutter down as the page goes live. Free React and HTML code.","dependencies":[],"files":[{"path":"components/we-inc/satin-opening-ribbon-on-brass-posts-that-brass-scissors-cut-so-both-halves-flutter-down-and-the-page-goes-live.tsx","type":"registry:component","content":"import { useEffect, useRef, useState } from \"react\";\n\n// The page behind the ribbon. An invented florist.\nconst site = {\n  name: \"Thistle Lane Flowers\",\n  address: \"thistlelaneflowers.example\",\n  links: [\"Bunches\", \"Weddings\", \"Visit\"],\n  headline: \"Flowers cut this morning.\",\n  copy: \"Hand-tied bunches and weekly vases, made to order in the studio.\",\n  cta: \"Order a bunch\",\n  photo: \"https://images.pexels.com/photos/6641386/pexels-photo-6641386.jpeg?auto=compress&cs=tinysrgb&w=900\",\n};\nconst BLUE = \"#4F98FB\";\nconst FONT = '\"Inter Tight\", \"Inter\", ui-sans-serif, system-ui, sans-serif';\n\nconst W = 760, H = 600; // the stage everything is laid out in\nconst POST_L = 124, POST_R = 636; // the two brass posts\nconst RY = 262; // height the ribbon is tied at\nconst FLOOR = 548;\nconst N = 26; // links in each half of the ribbon\nconst TIE = 13; // the ribbon leaves each knot on its inner side\nconst HALF = (POST_R - POST_L) / 2 - TIE;\nconst SEG = (HALF - 0.6) / N; // cut a touch short: its own weight stretches it into a shallow swag\nconst RIBBON = 46; // width of the satin\nconst PIVOT_Y = 322; // the screw of the scissors\nconst AWAY = 120; // how far the scissors are lowered as they are taken away\nconst FIRST_CUT = 5200, HOLD = 7600, TIED = 4200; // the demo\n\ntype Pt = { x: number; y: number; px: number; py: number };\ntype Api = { set: (live: boolean) => void };\ntype Rgb = [number, number, number];\n\nconst mix = (a: Rgb, b: Rgb, t: number): Rgb => [a[0] + (b[0] - a[0]) * t, a[1] + (b[1] - a[1]) * t, a[2] + (b[2] - a[2]) * t];\nconst css = (c: Rgb) => `rgb(${c[0] | 0},${c[1] | 0},${c[2] | 0})`;\nconst INK: Rgb = [9, 24, 66], WHITE: Rgb = [255, 255, 255];\nconst FACE_LO: Rgb = [45, 112, 226], FACE_HI: Rgb = [104, 170, 255];\nconst BACK_LO: Rgb = [30, 78, 170], BACK_HI: Rgb = [58, 122, 220];\n\n// One half of the scissors, drawn pointing up with its screw at 0,0.\nfunction Half({ id, front }: { id: string; front: boolean }) {\n  return (\n    <svg width=\"160\" height=\"320\" viewBox=\"-80 -150 160 320\" className=\"absolute left-0 top-0 overflow-visible\" aria-hidden=\"true\">\n      <defs>\n        <linearGradient id={`${id}-blade`} x1=\"-9\" x2=\"7\" y1=\"0\" y2=\"0\" gradientUnits=\"userSpaceOnUse\">\n          <stop offset=\"0\" stopColor=\"#6b4c12\" /><stop offset=\"0.22\" stopColor=\"#d9b55c\" /><stop offset=\"0.42\" stopColor=\"#fff3c6\" /><stop offset=\"0.6\" stopColor=\"#c99f43\" /><stop offset=\"1\" stopColor=\"#7d5b17\" />\n        </linearGradient>\n        <linearGradient id={`${id}-shank`} x1=\"-8\" x2=\"26\" y1=\"6\" y2=\"76\" gradientUnits=\"userSpaceOnUse\">\n          <stop offset=\"0\" stopColor=\"#8a651a\" /><stop offset=\"0.35\" stopColor=\"#f3d98c\" /><stop offset=\"0.6\" stopColor=\"#c0943a\" /><stop offset=\"1\" stopColor=\"#6b4c12\" />\n        </linearGradient>\n        <linearGradient id={`${id}-ring`} x1=\"6\" x2=\"56\" y1=\"74\" y2=\"146\" gradientUnits=\"userSpaceOnUse\">\n          <stop offset=\"0\" stopColor=\"#fff0bb\" /><stop offset=\"0.28\" stopColor=\"#d6ae4f\" /><stop offset=\"0.55\" stopColor=\"#9a7120\" /><stop offset=\"0.8\" stopColor=\"#e2bf68\" /><stop offset=\"1\" stopColor=\"#6b4c12\" />\n        </linearGradient>\n        <radialGradient id={`${id}-screw`} cx=\"0.36\" cy=\"0.3\" r=\"0.8\">\n          <stop offset=\"0\" stopColor=\"#fffbe6\" /><stop offset=\"0.4\" stopColor=\"#d2aa4c\" /><stop offset=\"1\" stopColor=\"#5a3f0d\" />\n        </radialGradient>\n      </defs>\n      {/* blade, its ground edge and the hollow down its back */}\n      <path d=\"M -8 8 L -9 -18 C -9 -72 -4 -112 1 -128 C 5 -102 7 -50 7 8 Z\" fill={`url(#${id}-blade)`} stroke=\"#3f2c08\" strokeWidth=\"0.7\" />\n      <path d=\"M 7 8 C 7 -50 5 -102 1 -128 C 2.6 -102 3.2 -50 3.2 8 Z\" fill=\"#fffbe8\" opacity=\"0.9\" />\n      <path d=\"M -4 2 C -4 -52 -2 -92 0 -112\" fill=\"none\" stroke=\"rgba(63,44,8,0.38)\" strokeWidth=\"1\" />\n      {/* shank and the finger loop */}\n      <path d=\"M -8 6 L 7 6 C 12 30 20 52 28 70 L 15 77 C 6 56 -4 34 -8 6 Z\" fill={`url(#${id}-shank)`} stroke=\"#3f2c08\" strokeWidth=\"0.7\" />\n      <g transform=\"rotate(-17 33 110)\">\n        <ellipse cx=\"33\" cy=\"110\" rx=\"21\" ry=\"32\" fill=\"none\" stroke=\"#3f2c08\" strokeWidth=\"11.4\" />\n        <ellipse cx=\"33\" cy=\"110\" rx=\"21\" ry=\"32\" fill=\"none\" stroke={`url(#${id}-ring)`} strokeWidth=\"10\" />\n        <ellipse cx=\"33\" cy=\"110\" rx=\"23.4\" ry=\"34.4\" fill=\"none\" stroke=\"#fff6d2\" strokeWidth=\"1.5\" strokeDasharray=\"44 200\" strokeDashoffset=\"-128\" strokeLinecap=\"round\" opacity=\"0.9\" />\n        <ellipse cx=\"33\" cy=\"110\" rx=\"17.4\" ry=\"28.4\" fill=\"none\" stroke=\"rgba(40,26,2,0.45)\" strokeWidth=\"1.2\" strokeDasharray=\"60 200\" strokeDashoffset=\"-126\" />\n      </g>\n      {front && (\n        <g>\n          <circle r=\"7.6\" fill=\"#3f2c08\" />\n          <circle r=\"6.6\" fill={`url(#${id}-screw)`} />\n          <path d=\"M -4.4 -1.8 L 4.4 1.8\" stroke=\"#3f2c08\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n        </g>\n      )}\n    </svg>\n  );\n}\n\nfunction Post({ x }: { x: number }) {\n  const brass = \"linear-gradient(90deg,#4f370a 0%,#a67a22 16%,#f1d587 34%,#fff4c8 42%,#d2a846 56%,#8c661a 80%,#402c07 100%)\";\n  return (\n    <div aria-hidden=\"true\" className=\"absolute\" style={{ left: x, top: 0 }}>\n      {/* shadow on the floor, foot, pole, collar and ball */}\n      <div className=\"absolute\" style={{ left: -78, top: FLOOR - 9, width: 176, height: 22, background: \"radial-gradient(closest-side,rgba(40,30,12,0.34),rgba(40,30,12,0.12) 60%,rgba(40,30,12,0))\" }} />\n      <div className=\"absolute\" style={{ left: -46, top: FLOOR - 15, width: 92, height: 17, borderRadius: \"46px 46px 8px 8px / 15px 15px 4px 4px\", background: brass, boxShadow: \"inset 0 -4px 5px rgba(50,32,4,0.55), inset 0 1px 0 rgba(255,250,220,0.8), 0 1px 0 #2e2006\" }} />\n      <div className=\"absolute\" style={{ left: -17, top: FLOOR - 25, width: 34, height: 12, borderRadius: \"17px 17px 2px 2px / 9px 9px 2px 2px\", background: brass, boxShadow: \"inset 0 -2px 3px rgba(50,32,4,0.5)\" }} />\n      <div className=\"absolute\" style={{ left: -7, top: 246, width: 14, height: FLOOR - 268, background: brass, boxShadow: \"0 0 0 0.5px #3a2806\" }} />\n      <div className=\"absolute\" style={{ left: -11, top: 240, width: 22, height: 9, borderRadius: 3, background: brass, boxShadow: \"0 0 0 0.5px #3a2806, inset 0 -2px 2px rgba(50,32,4,0.5)\" }} />\n      <div className=\"absolute rounded-full\" style={{ left: -16, top: 210, width: 32, height: 32, background: \"radial-gradient(circle at 34% 28%,#fffbe2 0%,#f0d283 16%,#c69a3a 46%,#7a5714 78%,#3d2a07 100%)\", boxShadow: \"0 0 0 0.5px #3a2806, inset -3px -4px 6px rgba(40,26,2,0.5)\" }} />\n    </div>\n  );\n}\n\nexport default function SatinOpeningRibbon() {\n  const stage = useRef<HTMLDivElement>(null);\n  const canvas = useRef<HTMLCanvasElement>(null);\n  const tools = useRef<(HTMLDivElement | null)[]>([]);\n  const blades = useRef<(HTMLDivElement | null)[]>([]);\n  const api = useRef<Api | null>(null);\n  const [zoom, setZoom] = useState(1);\n  const [live, setLive] = useState(false);\n\n  useEffect(() => {\n    const st = stage.current, cv = canvas.current;\n    const ctx = cv?.getContext(\"2d\");\n    if (!st || !cv || !ctx) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    const dpr = Math.min(2, window.devicePixelRatio || 1);\n    cv.width = W * dpr; cv.height = H * dpr;\n    const fit = () => setZoom(Math.max(0.44, Math.min(1.1, (st.clientWidth - 12) / W)));\n    fit();\n    const ro = new ResizeObserver(fit);\n    ro.observe(st);\n\n    const rope = (from: number, dir: number): Pt[] => Array.from({ length: N + 1 }, (_, i) => {\n      const u = i / N, x = from + dir * HALF * u, y = RY + 14 * (1 - (1 - u) * (1 - u));\n      return { x, y, px: x, py: y };\n    });\n    const L = rope(POST_L + TIE, 1), R = rope(POST_R - TIE, -1);\n    const s = { joined: true, tying: false, phiL: 0, vL: 0, phiR: 0, vR: 0, open: 1, sy: 0, seq: \"idle\" as \"idle\" | \"cut\" | \"tie\", t0: 0, live: false, touched: -1e9, clock: 0 };\n\n    const step = (dt: number) => {\n      s.clock += dt;\n      for (const [r, dir] of [[L, 1], [R, -1]] as [Pt[], number][]) {\n        for (let i = 1; i <= N; i++) {\n          const p = r[i], vx = (p.x - p.px) * 0.986, vy = (p.y - p.py) * 0.986;\n          p.px = p.x; p.py = p.y;\n          // weight, and a draught that keeps the satin moving\n          p.x += vx + dir * 26 * Math.sin(s.clock * 1.7 + i * 0.5 + dir) * dt * dt;\n          p.y += vy + 1900 * dt * dt;\n        }\n      }\n      const mid = (L[N].x + R[N].x) / 2, midY = (L[N].y + R[N].y) / 2;\n      if (s.tying) for (const r of [L, R]) { r[N].x += ((W / 2) - r[N].x) * 0.07; r[N].y += (RY + 12 - r[N].y) * 0.07; }\n      for (let k = 0; k < 12; k++) {\n        for (const r of [L, R]) {\n          for (let i = 0; i < N; i++) {\n            const a = r[i], b = r[i + 1], dx = b.x - a.x, dy = b.y - a.y, d = Math.hypot(dx, dy) || 1, f = (d - SEG) / d;\n            if (i === 0) { b.x -= dx * f; b.y -= dy * f; } else { a.x += dx * f * 0.5; a.y += dy * f * 0.5; b.x -= dx * f * 0.5; b.y -= dy * f * 0.5; }\n          }\n          // satin does not kink: every other link resists folding\n          for (let i = 0; i < N - 1; i++) {\n            const a = r[i], b = r[i + 2], dx = b.x - a.x, dy = b.y - a.y, d = Math.hypot(dx, dy) || 1, f = ((d - SEG * 2) / d) * 0.06;\n            if (d < SEG * 2) { if (i > 0) { a.x += dx * f; a.y += dy * f; } b.x -= dx * f; b.y -= dy * f; }\n          }\n        }\n        if (s.joined) { const x = (L[N].x + R[N].x) / 2, y = (L[N].y + R[N].y) / 2; L[N].x = R[N].x = x; L[N].y = R[N].y = y; }\n      }\n      if (s.tying && Math.abs(mid - W / 2) < 3 && Math.hypot(L[N].x - R[N].x, L[N].y - R[N].y) < 16 && midY < RY + 40) { s.tying = false; s.joined = true; }\n      // each loose half turns over as it falls and comes to rest part twisted\n      const tl = s.joined || s.tying ? 0 : 2.2, tr = s.joined || s.tying ? 0 : -3.5;\n      s.vL += (22 * (tl - s.phiL) - 4.2 * s.vL) * dt; s.phiL += s.vL * dt;\n      s.vR += (22 * (tr - s.phiR) - 4.2 * s.vR) * dt; s.phiR += s.vR * dt;\n    };\n\n    const strip = (r: Pt[], phi: number, loose: boolean, other: Pt[]) => {\n      const lx: number[] = [], ly: number[] = [], rx: number[] = [], ry: number[] = [], tw: number[] = [];\n      for (let i = 0; i <= N; i++) {\n        const a = r[Math.max(0, i - 1)], b = i < N ? r[i + 1] : loose ? r[N] : other[N - 1];\n        let tx = b.x - a.x, ty = b.y - a.y; const d = Math.hypot(tx, ty) || 1; tx /= d; ty /= d;\n        const c = Math.cos(phi * Math.pow(i / N, 1.25)); tw.push(c);\n        const h = (RIBBON / 2) * Math.max(0.09, Math.abs(c)), cutSkew = i === N && loose ? 9 : 0;\n        lx.push(r[i].x - ty * h + tx * cutSkew); ly.push(r[i].y + tx * h + ty * cutSkew);\n        rx.push(r[i].x + ty * h - tx * cutSkew); ry.push(r[i].y - tx * h - ty * cutSkew);\n      }\n      for (let i = 0; i < N; i++) {\n        const c = (tw[i] + tw[i + 1]) / 2, face = c >= 0;\n        const ang = Math.atan2(r[i + 1].y - r[i].y, r[i + 1].x - r[i].x);\n        const sheen = Math.max(0, Math.min(1, 0.5 + 0.34 * Math.cos(2 * ang + 0.7) + 0.16 * Math.sin((N - i) * 0.3 - s.clock * 0.7)));\n        const lit = 0.55 + 0.45 * Math.abs(c);\n        const base = mix(INK, face ? mix(FACE_LO, FACE_HI, sheen) : mix(BACK_LO, BACK_HI, sheen), lit);\n        const g = ctx.createLinearGradient((lx[i] + lx[i + 1]) / 2, (ly[i] + ly[i + 1]) / 2, (rx[i] + rx[i + 1]) / 2, (ry[i] + ry[i + 1]) / 2);\n        g.addColorStop(0, css(mix(base, INK, 0.5)));\n        g.addColorStop(0.07, css(mix(base, INK, 0.12)));\n        g.addColorStop(0.26, css(mix(base, WHITE, face ? 0.16 + 0.5 * sheen : 0.1)));\n        g.addColorStop(0.5, css(base));\n        g.addColorStop(0.9, css(mix(base, INK, 0.2)));\n        g.addColorStop(1, css(mix(base, INK, 0.55)));\n        ctx.fillStyle = g; ctx.strokeStyle = g; ctx.lineWidth = 0.8;\n        ctx.beginPath(); ctx.moveTo(lx[i], ly[i]); ctx.lineTo(lx[i + 1], ly[i + 1]); ctx.lineTo(rx[i + 1], ry[i + 1]); ctx.lineTo(rx[i], ry[i]); ctx.closePath(); ctx.fill(); ctx.stroke();\n      }\n      // woven selvedge down both edges\n      ctx.lineWidth = 1; ctx.strokeStyle = \"rgba(226,240,255,0.42)\";\n      for (const [ax, ay, bx, by] of [[lx, ly, rx, ry], [rx, ry, lx, ly]] as number[][][]) {\n        ctx.beginPath();\n        for (let i = 0; i <= N; i++) { const x = ax[i] + (bx[i] - ax[i]) * 0.085, y = ay[i] + (by[i] - ay[i]) * 0.085; if (i) ctx.lineTo(x, y); else ctx.moveTo(x, y); }\n        ctx.stroke();\n      }\n    };\n\n    const draw = () => {\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      ctx.clearRect(0, 0, W, H);\n      // the shadow the ribbon throws on the wall and the page behind it\n      ctx.save();\n      ctx.shadowColor = \"rgba(34,26,10,0.3)\"; ctx.shadowBlur = 16 * dpr; ctx.shadowOffsetX = (4000 + 7) * dpr; ctx.shadowOffsetY = 17 * dpr;\n      ctx.lineWidth = RIBBON * 0.72; ctx.lineCap = \"butt\"; ctx.lineJoin = \"round\"; ctx.strokeStyle = \"#000\";\n      for (const r of [L, R]) { ctx.beginPath(); r.forEach((p, i) => (i ? ctx.lineTo(p.x - 4000, p.y) : ctx.moveTo(p.x - 4000, p.y))); ctx.stroke(); }\n      ctx.restore();\n      strip(L, s.phiL, !s.joined, R); strip(R, s.phiR, !s.joined, L);\n    };\n    const pose = () => {\n      const deg = s.open * 15;\n      tools.current.forEach((el) => { if (el) { el.style.transform = `translateY(${s.sy.toFixed(1)}px)`; el.style.opacity = Math.max(0, 1 - (s.sy / AWAY) * 1.25).toFixed(3); } });\n      blades.current.forEach((el, i) => { if (el) el.style.transform = `rotate(${(i ? deg : -deg).toFixed(2)}deg)`; });\n    };\n    const tell = (now: boolean) => { if (now !== s.live) { s.live = now; setLive(now); } };\n    const snip = () => {\n      if (!s.joined) return;\n      s.joined = false; s.tying = false;\n      L[N].px += 1.6; L[N].py -= 2.2; R[N].px -= 1.6; R[N].py -= 2.2;\n      s.vL += 5; s.vR -= 6;\n    };\n\n    let raf = 0, last = 0, seen = true, timer = 0, begin = () => {};\n    const ease = (t: number) => { const u = Math.max(0, Math.min(1, t)); return u * u * (3 - 2 * u); };\n    const frame = (now: number) => {\n      raf = 0;\n      const dt = Math.min(0.034, (now - last) / 1000 || 0.016); last = now;\n      const e = now - s.t0;\n      if (s.seq === \"cut\") {\n        // open a touch wider, bite, then carry the scissors down and away\n        s.open = e < 150 ? 1 + 0.32 * ease(e / 150) : e < 235 ? 1.32 * (1 - ((e - 150) / 85) ** 2) : 0.04 + 0.3 * ease((e - 420) / 400);\n        if (e >= 235) snip();\n        s.sy = AWAY * ease((e - 520) / 520);\n        if (e > 1200) s.seq = \"idle\";\n      } else if (s.seq === \"tie\") {\n        s.sy = AWAY * (1 - ease((e - 620) / 520));\n        s.open = 0.34 + 0.66 * ease((e - 760) / 420);\n        if (e > 1500 && !s.joined) { s.tying = false; s.joined = true; }\n        if (e > 1300 && s.joined) s.seq = \"idle\";\n      } else if (s.joined) s.open = 1 + 0.035 * Math.sin(now / 620);\n      const n = Math.max(1, Math.round(dt * 120));\n      for (let i = 0; i < n; i++) step(1 / 120);\n      draw(); pose();\n      if (seen && !document.hidden) raf = requestAnimationFrame(frame);\n    };\n    const wake = () => { if (!raf) { last = performance.now(); raf = requestAnimationFrame(frame); } };\n    const go = (toLive: boolean) => {\n      if (toLive === s.live) return;\n      tell(toLive);\n      if (reduce) {\n        s.joined = !toLive; s.tying = false; s.sy = toLive ? AWAY : 0; s.open = toLive ? 0.3 : 1;\n        if (!toLive) { const a = rope(POST_L + TIE, 1), b = rope(POST_R - TIE, -1); L.forEach((p, i) => Object.assign(p, a[i])); R.forEach((p, i) => Object.assign(p, b[i])); s.phiL = s.phiR = s.vL = s.vR = 0; }\n        else for (let i = 0; i < 900; i++) step(1 / 120);\n        draw(); pose(); return;\n      }\n      s.seq = toLive ? \"cut\" : \"tie\"; s.t0 = performance.now();\n      if (!toLive) s.tying = true;\n      wake();\n    };\n    api.current = { set: (v) => { s.touched = performance.now(); go(v); } };\n\n    draw(); pose();\n    if (!reduce) {\n      wake();\n      // The demo: cut, hold, tie a new one, wait. It stands down while someone is using it.\n      const loop = (wait: number, cut: boolean) => { timer = window.setTimeout(() => { if (seen && !document.hidden && performance.now() - s.touched > 9000) go(cut); loop(cut ? HOLD : TIED, !cut); }, wait); };\n      begin = () => loop(FIRST_CUT, true);\n      if (document.readyState === \"complete\") begin(); else window.addEventListener(\"load\", begin, { once: true });\n    }\n    const io = new IntersectionObserver(([entry]) => { seen = entry.isIntersecting; if (seen && !reduce) wake(); });\n    io.observe(st);\n    const vis = () => { if (!document.hidden && !reduce) wake(); };\n    document.addEventListener(\"visibilitychange\", vis);\n    return () => {\n      cancelAnimationFrame(raf); window.clearTimeout(timer); window.removeEventListener(\"load\", begin); api.current = null;\n      ro.disconnect(); io.disconnect(); document.removeEventListener(\"visibilitychange\", vis);\n    };\n  }, []);\n\n  const satin = \"linear-gradient(90deg,#16357f 0%,#3f84ec 14%,#a6ccff 34%,#4F98FB 52%,#2f6fd6 80%,#122c6e 100%)\";\n\n  return (\n    <div\n      className=\"relative flex min-h-[560px] w-full flex-col items-center justify-center overflow-hidden overflow-clip bg-[#F6F4EF] bg-[radial-gradient(70%_55%_at_50%_34%,#FFFFFF_0%,#F6F4EF_55%,#E9E5DC_100%)] px-2 py-8 text-[#0B0D12] sm:min-h-[780px]\"\n      style={{ fontFamily: FONT }}\n    >\n      <style>{`\n        .satin-opening-ribbon-page { transition: filter 700ms ease, box-shadow 700ms ease; }\n        @media (prefers-reduced-motion: reduce) { .satin-opening-ribbon-page { transition: none; } }\n      `}</style>\n      <div ref={stage} className=\"relative flex w-full max-w-[1000px] justify-center\" style={{ height: H * zoom }}>\n        <div className=\"relative shrink-0\" style={{ width: W, height: H, zoom }}>\n          {/* where the wall meets the floor */}\n          <div aria-hidden=\"true\" className=\"absolute\" style={{ left: -400, right: -400, top: FLOOR - 26, height: 140, background: \"linear-gradient(180deg,rgba(214,207,193,0) 0%,rgba(214,207,193,0.55) 22%,rgba(226,221,210,0.4) 60%,rgba(226,221,210,0) 100%)\" }} />\n\n          {/* the page, mounted on board and hung on the wall */}\n          <div aria-hidden=\"true\" className=\"absolute rounded-[12px]\" style={{ left: 196, top: 56, width: 400, height: 272, background: \"rgba(60,46,20,0.3)\", filter: \"blur(22px)\" }} />\n          <div\n            role=\"img\"\n            aria-label={`The ${site.name} homepage, ${live ? \"now live\" : \"still a draft behind the ribbon\"}`}\n            className=\"satin-opening-ribbon-page absolute overflow-hidden rounded-[10px] bg-[#FFFFFF]\"\n            style={{ left: 180, top: 30, width: 400, height: 272, filter: live ? \"none\" : \"saturate(0.5) brightness(0.93)\", boxShadow: \"0 0 0 1px rgba(11,13,18,0.1), 1px 1px 0 #d9d4c8, 2px 2px 0 #cdc7ba, 3px 3px 0 #c2bbad, 4px 4px 0 #b5ae9f, 10px 16px 22px -10px rgba(40,30,12,0.4)\" }}\n          >\n            <div className=\"absolute left-[18px] right-[18px] top-[14px] flex h-[26px] items-center justify-between\">\n              <span className=\"flex items-center gap-[6px] whitespace-nowrap text-[12.5px] font-extrabold tracking-[-0.03em]\"><span className=\"h-[9px] w-[9px] rounded-full\" style={{ background: BLUE }} />{site.name}</span>\n              <span className=\"flex gap-[13px] text-[10.5px] font-bold text-[#0B0D12]/70\">{site.links.map((l) => <span key={l}>{l}</span>)}</span>\n            </div>\n            <div className=\"absolute left-[18px] top-[58px] w-[196px] text-[35px] font-extrabold leading-[0.95] tracking-[-0.05em]\">{site.headline}</div>\n            <div className=\"absolute left-[18px] top-[166px] w-[190px] text-[11.5px] font-semibold leading-[1.36] text-[#0B0D12]/70\">{site.copy}</div>\n            <div className=\"absolute left-[18px] top-[220px] flex h-[34px] items-center rounded-full bg-[#0B0D12] px-[16px] text-[12px] font-extrabold tracking-[-0.01em] text-white\"><span className=\"mr-[7px] h-[6px] w-[6px] rounded-full\" style={{ background: BLUE }} />{site.cta}</div>\n            <div className=\"absolute right-[16px] top-[52px] h-[204px] w-[152px] overflow-hidden rounded-[14px] bg-[#d9cfc2]\">\n              <img src={site.photo} alt=\"\" width={900} height={1350} draggable={false} className=\"h-full w-full object-cover\" style={{ objectPosition: \"50% 46%\" }} />\n            </div>\n            \n          </div>\n\n          <Post x={POST_L} />\n          <Post x={POST_R} />\n\n          {/* back blade, then the ribbon, then the front blade: the satin really is between them */}\n          <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-0\" style={{ clipPath: `inset(-40px -40px ${H - FLOOR + 34}px -40px)` }}>\n            <div ref={(el) => { tools.current[0] = el; }} className=\"absolute inset-0\" style={{ willChange: \"transform\" }}>\n            <div ref={(el) => { blades.current[0] = el; }} className=\"absolute\" style={{ left: W / 2, top: PIVOT_Y, width: 0, height: 0, filter: \"brightness(0.8) saturate(0.9)\", willChange: \"transform\" }}>\n              <div className=\"absolute\" style={{ left: -80, top: -150, transform: \"scale(1.2)\", transformOrigin: \"80px 150px\" }}><Half id=\"satin-opening-ribbon-a\" front={false} /></div>\n            </div>\n            </div>\n          </div>\n          <canvas ref={canvas} aria-hidden=\"true\" className=\"pointer-events-none absolute left-0 top-0\" style={{ width: W, height: H }} />\n          {/* the ribbon knotted round each post, with a short tail */}\n          {[POST_L, POST_R].map((x, i) => (\n            <div key={x} aria-hidden=\"true\" className=\"absolute\" style={{ left: x, top: RY }}>\n              <div className=\"absolute\" style={{ left: i ? 2 : -20, top: 14, width: 18, height: 58, background: satin, clipPath: \"polygon(0 0,100% 0,100% 100%,50% 82%,0 100%)\", transform: `rotate(${i ? -7 : 8}deg)`, transformOrigin: \"50% 0\", filter: \"brightness(0.86)\" }} />\n              <div className=\"absolute\" style={{ left: -12, top: -25, width: 24, height: 50, borderRadius: \"9px / 5px\", background: \"linear-gradient(90deg,rgba(9,24,66,0.55) 0%,rgba(9,24,66,0) 26%,rgba(255,255,255,0.22) 44%,rgba(9,24,66,0) 62%,rgba(9,24,66,0.6) 100%),repeating-linear-gradient(176deg,rgba(9,24,66,0) 0 9px,rgba(9,24,66,0.3) 9px 10px,rgba(255,255,255,0.22) 10px 11px,rgba(9,24,66,0) 11px 17px),linear-gradient(180deg,#1b3f94 0%,#3f84ec 14%,#8fc0ff 32%,#4F98FB 52%,#2f6fd6 80%,#17367f 100%)\", boxShadow: \"0 6px 8px -3px rgba(20,24,50,0.5), 0 0 0 0.5px #122c6e\" }} />\n            </div>\n          ))}\n          <div aria-hidden=\"true\" className=\"pointer-events-none absolute inset-0\" style={{ clipPath: `inset(-40px -40px ${H - FLOOR + 34}px -40px)` }}>\n            <div ref={(el) => { tools.current[1] = el; }} className=\"absolute inset-0\" style={{ willChange: \"transform\" }}>\n            <div ref={(el) => { blades.current[1] = el; }} className=\"absolute\" style={{ left: W / 2, top: PIVOT_Y, width: 0, height: 0, filter: \"drop-shadow(5px 12px 8px rgba(40,30,12,0.35))\", willChange: \"transform\" }}>\n              <div className=\"absolute\" style={{ left: -80, top: -150, transform: \"scale(-1.2,1.2)\", transformOrigin: \"80px 150px\" }}><Half id=\"satin-opening-ribbon-b\" front /></div>\n            </div>\n            </div>\n          </div>\n          {/* press the scissors themselves */}\n          {!live && <div aria-hidden=\"true\" onClick={() => api.current?.set(true)} className=\"absolute cursor-pointer\" style={{ left: W / 2 - 80, top: PIVOT_Y - 140, width: 160, height: 300 }} />}\n        </div>\n      </div>\n\n      <div className=\"relative mt-2 flex items-center gap-[12px]\">\n        <span className=\"flex h-[30px] items-center gap-[8px] rounded-full bg-[#0B0D12]/[0.06] pl-[10px] pr-[13px] text-[11px] font-extrabold uppercase tracking-[0.18em] text-[#0B0D12]\">\n          <span aria-hidden=\"true\" className=\"h-[9px] w-[9px] rounded-full\" style={{ background: live ? BLUE : \"#9b968b\", boxShadow: live ? \"0 0 0 4px rgba(79,152,251,0.25)\" : \"none\" }} />\n          {live ? \"Live\" : \"Draft\"}\n        </span>\n        <button\n          type=\"button\"\n          aria-pressed={live}\n          onClick={() => api.current?.set(!live)}\n          className=\"flex h-[52px] items-center gap-[10px] rounded-full bg-[#0B0D12] px-[26px] text-[15px] font-extrabold tracking-[-0.01em] text-[#F6F4EF] shadow-[inset_0_1px_0_rgba(255,255,255,0.22),0_18px_28px_-14px_rgba(11,13,18,0.7)] outline-none transition-transform duration-150 active:scale-[0.96] focus-visible:ring-2 focus-visible:ring-[#4F98FB] focus-visible:ring-offset-2 focus-visible:ring-offset-[#F6F4EF] motion-reduce:transition-none\"\n        >\n          {live ? \"Tie a new ribbon\" : \"Cut the ribbon\"}\n        </button>\n      </div>\n      <p aria-live=\"polite\" className=\"mt-[12px] text-center text-[12px] font-semibold tracking-[-0.005em] text-[#0B0D12]/70\">\n        {live ? `${site.address} is open: ribbon cut, both halves down` : \"Draft: the page is finished, the ribbon is still across it\"}\n      </p>\n    </div>\n  );\n}\n"}]}
