{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"silver-cloche-pricing-in-webgl-where-the-chosen-dome-lifts-off-its-plate-on-a-white-tablecloth-in-window-light","type":"registry:block","title":"Silver Cloche Pricing in WebGL Where the Chosen Dome Lifts Off Its Plate on a White Tablecloth in Window Light","description":"Free React pricing section in raw WebGL: three polished silver cloches on a linen tablecloth; choosing a plan lifts its dome to show the price on the plate.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/silver-cloche-pricing-in-webgl-where-the-chosen-dome-lifts-off-its-plate-on-a-white-tablecloth-in-window-light.tsx","type":"registry:component","content":"import { useEffect, useRef, useState } from \"react\";\nimport { motion, useReducedMotion } from \"framer-motion\";\n\n/** The product and its three plans. These are example prices: change them to your own. */\nconst product = { name: \"Brasswick\", line: \"Reservations and floor plans for restaurants\" };\nconst plans = [\n  {\n    name: \"Bistro\",\n    price: 19,\n    pitch: \"One room, every table accounted for.\",\n    features: [\"1 dining room, 40 covers\", \"Online bookings and walk-ins\", \"Reminder texts to guests\"],\n    dome: 0.44, // cloche radius in metres; the plate is sized from it\n  },\n  {\n    name: \"Brasserie\",\n    price: 49,\n    pitch: \"Two sittings a night without a clash.\",\n    features: [\"Up to 3 rooms, 160 covers\", \"Drag-and-drop floor plan\", \"Deposits for large parties\", \"Waitlist on a tablet\"],\n    dome: 0.5,\n  },\n  {\n    name: \"Grand Salon\",\n    price: 119,\n    pitch: \"Private dining, terraces and events.\",\n    features: [\"Unlimited rooms and covers\", \"Event menus and run sheets\", \"Group booking pages\", \"A named setup host\"],\n    dome: 0.56,\n  },\n];\n\nconst GAP = 0.3; // tablecloth between neighbouring plates\nconst LIFT = 0.5; // how high the chosen cloche is raised, in metres\nconst TILT = 1.12; // how far its front edge tips up, in radians\nconst DEMO = true; // lifts the cloches in turn until somebody touches it\nconst SERIF = '\"Iowan Old Style\", \"Palatino Linotype\", Palatino, \"Book Antiqua\", Georgia, serif';\nconst GROTESK = '\"Inter Tight\", \"Inter\", ui-sans-serif, system-ui, sans-serif';\nconst INK = \"#1f1b17\";\nconst CLOTH = \"#ebe8e2\";\n\nconst clamp = (v: number, lo: number, hi: number) => Math.min(hi, Math.max(lo, v));\nconst PLATE = (a: number) => a * 1.24;\nconst XS = (() => {\n  const total = plans.reduce((s, p) => s + PLATE(p.dome) * 2, 0) + GAP * (plans.length - 1);\n  let x = -total / 2;\n  return plans.map((p) => {\n    const c = x + PLATE(p.dome);\n    x += PLATE(p.dome) * 2 + GAP;\n    return c;\n  });\n})();\nconst domeH = (a: number) => a * 0.86 + 0.03;\nconst SEAT = 0.038; // where the cloche rim rests on the plate\nconst SUN_DIR = (() => {\n  const v = [-0.66, 0.56, -0.3];\n  const l = Math.hypot(v[0], v[1], v[2]);\n  return v.map((x) => x / l);\n})();\n\nconst GLSL = `#version 300 es\nprecision highp float;\nconst vec3 L = vec3(${SUN_DIR.map((v) => v.toFixed(4)).join(\", \")});\nconst vec3 SUN = vec3(1.0, 0.93, 0.82) * 3.2;\nconst vec3 SKY = vec3(0.82, 0.85, 0.9) * 0.7;\nconst float WZ = -3.6;\nuniform vec4 uC[3];      // x, z, dome radius, dome height\nuniform vec3 uO[3];      // where the cloche rim centre is now\nuniform vec2 uCS[3];     // cos and sin of its tilt\nuniform float uR[3];     // plate radius\nuniform sampler2D uTex;\nuniform vec3 uCam, uRt, uUp, uFw;\nuniform float uTan, uAspect, uFocus, uAperture, uTime;\nuniform vec2 uShift;\nin vec2 vUv;\nout vec4 o;\n\nfloat ign(vec2 p) { return fract(52.9829189 * fract(dot(p, vec2(0.06711056, 0.00583715)))); }\nfloat hash(vec2 p) { p = fract(p * vec2(123.34, 456.21)); p += dot(p, p + 45.32); return fract(p.x * p.y); }\nfloat vnoise(vec2 p) {\n  vec2 i = floor(p), f = fract(p); f = f * f * (3.0 - 2.0 * f);\n  return mix(mix(hash(i), hash(i + vec2(1, 0)), f.x), mix(hash(i + vec2(0, 1)), hash(i + vec2(1, 1)), f.x), f.y);\n}\nfloat fbm(vec2 p) { return 0.5 * vnoise(p) + 0.25 * vnoise(p * 2.1 + 7.3) + 0.125 * vnoise(p * 4.3 + 1.7) + 0.0625 * vnoise(p * 8.9); }\nfloat smin(float a, float b, float k) { float h = clamp(0.5 + 0.5 * (b - a) / k, 0.0, 1.0); return mix(b, a, h) - k * h * (1.0 - h); }\n\nvec3 toL(vec3 d, int i) { vec2 r = uCS[i]; return vec3(d.x, d.y * r.x - d.z * r.y, d.y * r.y + d.z * r.x); }\n\nfloat ell(vec3 q, vec3 r) { float k0 = length(q / r), k1 = length(q / (r * r)); return k0 * (k0 - 1.0) / max(k1, 1e-4); }\n\n// the cloche in its own frame: a thin spun dome, a rolled bead at the rim and a turned knob\nfloat cloche(vec3 q, float a, float b) {\n  float rho = length(q.xz);\n  float shell = abs(ell(q, vec3(a, b, a))) - 0.009;\n  shell = max(shell, -q.y);\n  float bead = length(vec2(rho - a, q.y - 0.016)) - 0.017;\n  float band = length(vec2(rho - a * 0.985, q.y - 0.075)) - 0.006;\n  float d = min(min(shell, bead), band);\n  float stem = max(rho - 0.02 - 0.012 * smoothstep(b + 0.035, b, q.y), abs(q.y - b - 0.02) - 0.03);\n  float knob = ell(q - vec3(0.0, b + 0.072, 0.0), vec3(0.052, 0.036, 0.052));\n  return min(d, smin(stem, knob, 0.02));\n}\nfloat plateTop(float rho, float R) {\n  return 0.02 + 0.026 * smoothstep(0.62 * R, 0.86 * R, rho) - 0.02 * smoothstep(0.93 * R, R, rho);\n}\nfloat plate(vec3 p, int i) {\n  float R = uR[i];\n  float rho = length(p.xz - uC[i].xy);\n  return max(rho - R, max(p.y - plateTop(rho, R), 0.004 - p.y)) * 0.8;\n}\n\n// id: 0..2 cloches, 3..5 plates\nvec2 map(vec3 p) {\n  vec2 res = vec2(1e9, -1.0);\n  for (int i = 0; i < 3; i++) {\n    vec4 C = uC[i];\n    float pb = length(vec2(max(length(p.xz - C.xy) - uR[i], 0.0), max(p.y - 0.05, 0.0)));\n    float dp = pb > 0.1 ? pb : plate(p, i);\n    if (dp < res.x) res = vec2(dp, float(3 + i));\n    vec3 q = toL(p - uO[i], i);\n    float bound = length(q - vec3(0.0, C.w * 0.5, 0.0)) - max(C.z, C.w) - 0.12;\n    float dc = bound > 0.1 ? bound : cloche(q, C.z, C.w);\n    if (dc < res.x) res = vec2(dc, float(i));\n  }\n  return res;\n}\nvec3 nrm(vec3 p) {\n  vec2 e = vec2(0.0006, -0.0006);\n  return normalize(e.xyy * map(p + e.xyy).x + e.yyx * map(p + e.yyx).x + e.yxy * map(p + e.yxy).x + e.xxx * map(p + e.xxx).x);\n}\nfloat shadow(vec3 p) {\n  float s = 1.0, t = 0.015;\n  for (int k = 0; k < 32; k++) {\n    float h = map(p + L * t).x;\n    s = min(s, 7.0 * h / t);\n    t += clamp(h, 0.012, 0.2);\n    if (s < 0.01 || t > 3.0) break;\n  }\n  return clamp(s, 0.0, 1.0);\n}\nfloat ao(vec3 p, vec3 n) {\n  float a = 0.0, w = 1.0;\n  for (int k = 1; k <= 5; k++) {\n    float h = 0.014 * float(k * k);\n    a += w * (h - map(p + n * h).x);\n    w *= 0.6;\n  }\n  return clamp(1.0 - 2.4 * a, 0.0, 1.0);\n}\n\n// sun through a tall sash window on the left: glazing bars and a curtain edge break it up\nfloat sash(vec3 p) {\n  vec3 a = normalize(cross(L, vec3(0.0, 1.0, 0.0))), b = cross(a, L);\n  vec2 w = vec2(dot(p, a), dot(p, b)) - vec2(0.3, -0.4);\n  float pen = 0.045 + 0.06 * clamp(dot(p, -L) + 2.0, 0.0, 4.0);\n  vec2 e = vec2(2.6, 2.2) - abs(w);\n  float m = smoothstep(-pen, pen, e.x) * smoothstep(-pen, pen, e.y);\n  vec2 g = abs(fract(w / vec2(2.6, 1.5) + 0.5) - 0.5) * vec2(2.6, 1.5);\n  m *= smoothstep(0.03, 0.03 + pen, g.x) * smoothstep(0.02, 0.02 + pen, g.y);\n  float curtain = smoothstep(0.0, 0.35, w.x + 2.4 + 0.12 * sin(w.y * 3.0 + uTime * 0.4));\n  return m * (0.25 + 0.75 * curtain);\n}\n\n// the dining room the silver sees: dark panelling, a cream ceiling, the sash window and the bright cloth\nvec3 env(vec3 r) {\n  float up = r.y;\n  vec3 c = mix(vec3(0.1, 0.08, 0.065), vec3(0.62, 0.6, 0.56), smoothstep(0.08, 0.5, up));\n  // a dresser and pictures along the wall behind the camera\n  float az = atan(r.x, r.z);\n  c *= 0.8 + 0.3 * smoothstep(0.42, 0.5, abs(fract(az * 4.0) - 0.5)) * step(up, 0.18);\n  vec2 fr = abs(vec2(fract(az * 0.7 + 0.3) - 0.5, up - 0.4));\n  c = mix(c, vec3(0.03, 0.025, 0.02), step(fr.x, 0.16) * step(fr.y, 0.13) * (1.0 - step(fr.x, 0.13) * step(fr.y, 0.1)));\n  c += vec3(1.0, 0.72, 0.42) * 2.2 * smoothstep(0.985, 0.998, dot(r, normalize(vec3(0.6, 0.28, 0.75))));\n  // the tablecloth below the horizon\n  c = mix(c, vec3(0.86, 0.84, 0.8) * 1.15, smoothstep(0.03, -0.14, up));\n  // the window: two tall sashes with bars, behind and to the left\n  vec3 wd = normalize(vec3(-0.85, 0.3, -0.42));\n  float d = dot(r, wd);\n  if (d > 0.0) {\n    vec3 a = normalize(cross(wd, vec3(0.0, 1.0, 0.0))), b = cross(a, wd);\n    vec2 q = vec2(dot(r, a), dot(r, b)) / d;\n    float pane = smoothstep(0.03, 0.0, max(abs(q.x) - 0.5, abs(q.y - 0.1) - 0.75));\n    vec2 g = abs(fract(q / vec2(0.5, 0.5) + 0.5) - 0.5) * 0.5;\n    pane *= smoothstep(0.008, 0.02, g.x) * smoothstep(0.008, 0.02, g.y);\n    c = mix(c, vec3(1.0, 0.98, 0.94) * 10.0, pane);\n  }\n  // a softer window behind the camera on the right\n  vec3 w2 = normalize(vec3(0.7, 0.32, 0.64));\n  float d2 = dot(r, w2);\n  if (d2 > 0.0) {\n    vec3 a = normalize(cross(w2, vec3(0.0, 1.0, 0.0))), b = cross(a, w2);\n    vec2 q = vec2(dot(r, a), dot(r, b)) / d2;\n    float pane = smoothstep(0.05, 0.0, max(abs(q.x) - 0.22, abs(q.y) - 0.42));\n    pane *= smoothstep(0.0, 0.015, abs(q.x)) * smoothstep(0.0, 0.015, abs(q.y - 0.05));\n    c = mix(c, vec3(0.88, 0.93, 1.0) * 3.2, pane);\n  }\n  return c;\n}\n\nvec3 clothAlb(vec3 p) {\n  float weave = vnoise(p.xz * vec2(70.0, 9.0)) * 0.5 + vnoise(p.xz * vec2(8.0, 64.0)) * 0.5;\n  return vec3(0.86, 0.85, 0.82) * (0.975 + 0.035 * weave);\n}\n// ironed fold lines run across the cloth in a grid\nvec3 clothN(vec3 p) {\n  float cx = (fract(p.x / 1.45 + 0.31) - 0.5) * 1.45;\n  float cz = (fract(p.z / 1.2 + 0.18) - 0.5) * 1.2;\n  float bx = exp(-cx * cx / 0.0016), bz = exp(-cz * cz / 0.0012);\n  float gx = -0.1 * bx * (2.0 * cx / 0.0016) * 0.04, gz = 0.08 * bz * (2.0 * cz / 0.0012) * 0.04;\n  gx += (vnoise(p.xz * 3.0) - 0.5) * 0.04;\n  return normalize(vec3(-gx, 1.0, -gz));\n}\nvec3 shadeCloth(vec3 p, bool full) {\n  vec3 n = clothN(p);\n  float sh = (full ? shadow(p + vec3(0.0, 0.004, 0.0)) : 1.0) * sash(p);\n  float oc = full ? ao(p, vec3(0.0, 1.0, 0.0)) : 1.0;\n  vec3 alb = clothAlb(p);\n  vec3 col = alb * (SUN * max(dot(n, L), 0.0) * sh + SKY * oc * (0.8 + 0.2 * n.y));\n  // light that the polished domes throw back onto the cloth\n  for (int i = 0; i < 3; i++) {\n    vec3 d = uO[i] + vec3(0.0, uC[i].w * 0.5, 0.0) - p;\n    col += alb * SUN * 0.035 * uC[i].z / (dot(d, d) + 0.15) * oc;\n  }\n  return col;\n}\n\nvec3 platePaint(vec3 p, int i, out float ink) {\n  vec2 d = p.xz - uC[i].xy;\n  float Rt = uR[i] * 0.64;\n  float u = d.x / (2.0 * Rt) + 0.5, v = 0.5 - d.y / (2.0 * Rt);\n  ink = 0.0;\n  if (u > 0.0 && u < 1.0 && v > 0.0 && v < 1.0) ink = texture(uTex, vec2(u, (float(i) + v) / 3.0)).r;\n  return vec3(0.035, 0.016, 0.008);\n}\n\n// what a reflected ray off the silver sees: the other pieces, the cloth, or the room\nvec3 bounce(vec3 ro, vec3 rd) {\n  float t = 0.02;\n  for (int k = 0; k < 36; k++) {\n    vec2 h = map(ro + rd * t);\n    if (h.x < 0.002) {\n      vec3 p = ro + rd * t;\n      if (h.y > 2.5) {\n        int i = int(h.y + 0.5) - 3;\n        float ink;\n        vec3 ic = platePaint(p, i, ink);\n        vec3 alb = mix(vec3(0.9, 0.89, 0.86), ic, ink);\n        return alb * (SUN * 0.5 * sash(p) + SKY);\n      }\n      vec3 n = nrm(p);\n      return env(reflect(rd, n)) * vec3(0.92, 0.9, 0.86) * 0.85;\n    }\n    t += h.x;\n    if (t > 4.0) break;\n  }\n  if (rd.y < 0.0) {\n    float tp = -ro.y / rd.y;\n    vec3 p = ro + rd * tp;\n    return shadeCloth(p, false) * 0.92;\n  }\n  return env(rd);\n}\n\nvec3 shadeSilver(int i, vec3 p, vec3 rd, vec3 n) {\n  vec3 q = toL(p - uO[i], i);\n  vec2 s = vec2(atan(q.x, q.z) * uC[i].z, q.y);\n  // fine spinning lines from the lathe and a few soft polishing smears\n  float lines = vnoise(vec2(s.y * 420.0, s.x * 2.0)) - 0.5;\n  float smear = fbm(s * 5.0 + float(i) * 4.0);\n  vec3 nb = normalize(n + (vec3(0.0, 1.0, 0.0) * lines * 0.006) + (vec3(smear - 0.5) * 0.006));\n  vec3 R = reflect(rd, nb);\n  vec3 refl = bounce(p + nb * 0.006, R);\n  // soften the room a little where the polish is smeared\n  refl = mix(refl, env(normalize(R + (vec3(vnoise(s * 9.0), vnoise(s * 9.0 + 3.0), 0.0) - 0.5) * 0.2)), 0.25 * smoothstep(0.55, 0.8, smear));\n  float cosT = clamp(dot(-rd, nb), 0.0, 1.0);\n  vec3 F0 = vec3(0.95, 0.93, 0.88);\n  vec3 F = F0 + (1.0 - F0) * pow(1.0 - cosT, 5.0);\n  float oc = ao(p, n);\n  float sh = shadow(p + n * 0.01);\n  vec3 col = refl * F * mix(0.55, 1.0, oc);\n  col += SUN * sh * sash(p) * (30.0 * pow(max(dot(R, L), 0.0), 900.0) + 0.5 * pow(max(dot(R, L), 0.0), 60.0));\n  return col;\n}\n\nvec3 shadePlate(int i, vec3 p, vec3 rd, vec3 n) {\n  float ink;\n  vec3 ic = platePaint(p, i, ink);\n  // only paint the flat well of the plate\n  ink *= step(0.5, n.y) * smoothstep(0.7 * uR[i], 0.64 * uR[i], length(p.xz - uC[i].xy));\n  float rr = length(p.xz - uC[i].xy) / uR[i];\n  float band = smoothstep(0.004, 0.0, abs(rr - 0.9) - 0.012);\n  float gild = smoothstep(0.003, 0.0, abs(rr - 0.875) - 0.003);\n  vec3 alb = mix(vec3(0.93, 0.925, 0.9), ic, ink);\n  alb = mix(alb, vec3(0.06, 0.2, 0.15), band);\n  alb = mix(alb, vec3(0.6, 0.42, 0.16), gild);\n  float sh = shadow(p + n * 0.006) * sash(p);\n  float oc = ao(p, n);\n  vec3 col = alb * (SUN * max(dot(n, L), 0.0) * sh + SKY * oc);\n  // porcelain glaze\n  float F = 0.04 + 0.96 * pow(1.0 - clamp(dot(-rd, n), 0.0, 1.0), 5.0);\n  vec3 R = reflect(rd, n);\n  vec3 refl = env(R) * mix(0.4, 1.0, oc) + SUN * sh * 26.0 * pow(max(dot(R, L), 0.0), 700.0);\n  return mix(col, refl, F * (1.0 - 0.4 * ink));\n}\n\nvec3 shadeWall(vec3 p) {\n  vec3 alb = mix(vec3(0.74, 0.7, 0.64), vec3(0.8, 0.76, 0.7), fbm(p.xy * 1.2));\n  float lit = sash(p + vec3(0.0, 0.0, 0.0));\n  return alb * (SUN * 0.45 * lit + SKY * 0.85);\n}\n\nvec3 tonemap(vec3 x) { x *= 0.6; return clamp((x * (2.51 * x + 0.03)) / (x * (2.43 * x + 0.59) + 0.14), 0.0, 1.0); }\n\nvoid main() {\n  vec2 ndc = vUv * 2.0 - 1.0 - uShift;\n  vec3 rd = normalize(uFw + uRt * (ndc.x * uTan * uAspect) + uUp * (ndc.y * uTan));\n  float tp = 1e9; int pid = -1;\n  if (rd.y < 0.0) { float t = -uCam.y / rd.y; vec3 h = uCam + rd * t; if (h.z > WZ) { tp = t; pid = 0; } }\n  if (pid < 0 && rd.z < 0.0) { tp = (WZ - uCam.z) / rd.z; pid = 1; }\n  float t = max(0.0, (uCam.y - 1.6) / max(-rd.y, 0.05));\n  float id = -1.0;\n  float tmax = min(tp, 40.0);\n  for (int k = 0; k < 120; k++) {\n    vec2 h = map(uCam + rd * t);\n    if (h.x < 0.0005 * t) { id = h.y; break; }\n    t += h.x * 0.85;\n    if (t > tmax) break;\n  }\n  vec3 col;\n  float depth;\n  if (id >= 0.0 && t < tmax) {\n    vec3 p = uCam + rd * t;\n    vec3 n = nrm(p);\n    int k = int(id + 0.5);\n    col = k < 3 ? shadeSilver(k, p, rd, n) : shadePlate(k - 3, p, rd, n);\n    depth = t;\n  } else {\n    vec3 p = uCam + rd * tp;\n    col = pid == 0 ? shadeCloth(p, true) : shadeWall(p);\n    depth = tp;\n  }\n  // haze in the window light\n  col += vec3(1.0, 0.93, 0.84) * 0.03 * smoothstep(0.5, -1.0, dot(rd, vec3(1.0, 0.0, 0.0)));\n  float z = depth * dot(rd, uFw);\n  float coc = clamp(uAperture * (1.0 - uFocus / max(z, 0.05)), -1.0, 1.0);\n  o = vec4(pow(tonemap(col), vec3(1.0 / 2.2)), 0.5 + 0.5 * coc);\n}`;\n\nconst VS = `#version 300 es\nout vec2 vUv;\nvoid main() { vec2 p = vec2(float((gl_VertexID << 1) & 2), float(gl_VertexID & 2)); vUv = p; gl_Position = vec4(p * 2.0 - 1.0, 0.0, 1.0); }`;\n\nconst FS_LENS = `#version 300 es\nprecision highp float;\nuniform sampler2D uScene;\nuniform vec2 uPx;\nuniform float uMaxR, uTime;\nin vec2 vUv;\nout vec4 o;\nfloat ign(vec2 p) { return fract(52.9829189 * fract(dot(p, vec2(0.06711056, 0.00583715)))); }\nvoid main() {\n  vec4 c0 = texture(uScene, vUv);\n  float s0 = c0.a * 2.0 - 1.0, coc0 = abs(s0);\n  vec3 acc = c0.rgb; float wsum = 1.0;\n  float rot = 6.2832 * ign(gl_FragCoord.xy);\n  for (int k = 1; k < 20; k++) {\n    float r = sqrt(float(k) / 20.0) * uMaxR;\n    float a = float(k) * 2.39996 + rot;\n    vec4 s = texture(uScene, vUv + vec2(cos(a), sin(a)) * r * uPx);\n    float sc = s.a * 2.0 - 1.0, cs = abs(sc);\n    if (sc > s0) cs = min(cs, coc0 * 1.6 + 0.02);\n    float w = smoothstep(r - 1.0, r + 1.0, cs * uMaxR);\n    acc += s.rgb * w; wsum += w;\n  }\n  vec3 col = acc / wsum;\n  const vec3 LU = vec3(0.299, 0.587, 0.114);\n  vec3 cNW = texture(uScene, vUv + vec2(-1.0, -1.0) * uPx).rgb, cNE = texture(uScene, vUv + vec2(1.0, -1.0) * uPx).rgb;\n  vec3 cSW = texture(uScene, vUv + vec2(-1.0, 1.0) * uPx).rgb, cSE = texture(uScene, vUv + vec2(1.0, 1.0) * uPx).rgb;\n  float lNW = dot(cNW, LU), lNE = dot(cNE, LU), lSW = dot(cSW, LU), lSE = dot(cSE, LU), lM = dot(c0.rgb, LU);\n  float lMin = min(lM, min(min(lNW, lNE), min(lSW, lSE))), lMax = max(lM, max(max(lNW, lNE), max(lSW, lSE)));\n  vec2 dir = vec2(-((lNW + lNE) - (lSW + lSE)), (lNW + lSW) - (lNE + lSE));\n  float rcp = 1.0 / (min(abs(dir.x), abs(dir.y)) + max((lNW + lNE + lSW + lSE) * 0.03125, 0.0078));\n  dir = clamp(dir * rcp, -8.0, 8.0) * uPx;\n  vec3 fa = 0.5 * (texture(uScene, vUv + dir * (1.0 / 3.0 - 0.5)).rgb + texture(uScene, vUv + dir * (2.0 / 3.0 - 0.5)).rgb);\n  vec3 fb = fa * 0.5 + 0.25 * (texture(uScene, vUv - dir * 0.5).rgb + texture(uScene, vUv + dir * 0.5).rgb);\n  float lB = dot(fb, LU);\n  vec3 fx = (lB < lMin || lB > lMax) ? fa : fb;\n  col = mix(fx, col, smoothstep(0.05, 0.3, coc0));\n  vec2 q = vUv - 0.5;\n  col *= 1.0 - 0.28 * dot(q, q);\n  col += (ign(gl_FragCoord.xy + fract(uTime) * 61.0) - 0.5) * 0.016;\n  o = vec4(col, 1.0);\n}`;\n\nfunction program(gl: WebGL2RenderingContext, vs: string, fs: string) {\n  const p = gl.createProgram()!;\n  for (const [type, src] of [[gl.VERTEX_SHADER, vs], [gl.FRAGMENT_SHADER, fs]] as const) {\n    const s = gl.createShader(type)!;\n    gl.shaderSource(s, src);\n    gl.compileShader(s);\n    if (!gl.getShaderParameter(s, gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(s) || \"shader\");\n    gl.attachShader(p, s);\n  }\n  gl.linkProgram(p);\n  if (!gl.getProgramParameter(p, gl.LINK_STATUS)) throw new Error(gl.getProgramInfoLog(p) || \"link\");\n  return p;\n}\n\n/** What is piped onto each plate in chocolate: plan name, the example price and its label. One square per plan. */\nfunction artwork() {\n  const S = 1024;\n  const cv = document.createElement(\"canvas\");\n  cv.width = S;\n  cv.height = S * plans.length;\n  const ctx = cv.getContext(\"2d\")!;\n  ctx.fillStyle = \"#000\";\n  ctx.fillRect(0, 0, cv.width, cv.height);\n  ctx.fillStyle = \"#fff\";\n  const tracked = (s: string, y: number, font: string, gap: number) => {\n    ctx.font = font;\n    ctx.textAlign = \"left\";\n    const w = [...s].map((c) => ctx.measureText(c).width + gap);\n    let x = S / 2 - (w.reduce((a, b) => a + b, 0) - gap) / 2;\n    [...s].forEach((c, i) => {\n      ctx.fillText(c, x, y);\n      x += w[i];\n    });\n  };\n  plans.forEach((plan, i) => {\n    // the texture is flipped on upload, so plan 0 sits in the bottom square\n    ctx.save();\n    ctx.translate(0, (plans.length - 1 - i) * S);\n    // the plate is seen at a low angle, so the lettering is drawn tall to read true\n    ctx.scale(1, 1.7);\n    tracked(plan.name.toUpperCase(), 150, `700 ${plan.name.length > 9 ? 74 : 88}px ${GROTESK}`, 14);\n    ctx.fillRect(S / 2 - 80, 172, 160, 6);\n    tracked(`$${plan.price}`, 430, `italic 600 ${plan.price > 99 ? 290 : 330}px ${SERIF}`, -10);\n    tracked(\"A MONTH · EXAMPLE\", 520, `700 62px ${GROTESK}`, 8);\n    ctx.restore();\n  });\n  return cv;\n}\n\ntype Sim = { l: number[]; vl: number[]; a: number[]; va: number[]; dip: number[]; plan: number; dirty: boolean; touched: boolean };\n\n/** The same table drawn with plain elements, for browsers without WebGL 2. */\nfunction Still({ plan, marks }: { plan: number; marks: number[] }) {\n  return (\n    <div aria-hidden=\"true\" className=\"absolute inset-0 overflow-hidden\" style={{ background: `linear-gradient(180deg, #8d8276 0%, #b3a99c 26%, #dcd8d1 27%, ${CLOTH} 60%, #f4f2ee 100%)` }}>\n      <div className=\"absolute left-0 top-0 h-full w-[60%]\" style={{ background: \"linear-gradient(110deg, rgba(255,250,240,0.6), rgba(255,250,240,0) 70%)\" }} />\n      {plans.map((p, i) => {\n        const up = i === plan;\n        const w = p.dome * 30;\n        return (\n          <div key={p.name} className=\"absolute -translate-x-1/2\" style={{ left: `${marks[i]}%`, bottom: \"26%\", width: `${w}%` }}>\n            <div className=\"absolute -bottom-[10%] left-[-14%] h-[34%] w-[128%] rounded-[50%] border border-black/10 bg-[#f6f5f2] shadow-[0_8px_18px_rgba(0,0,0,0.18)]\">\n              {up && (\n                <div className=\"absolute inset-0 grid place-items-center text-center text-[#2a1810]\" style={{ fontFamily: SERIF }}>\n                  <span className=\"text-[clamp(14px,2.6vw,30px)] italic leading-none\">${p.price}</span>\n                </div>\n              )}\n            </div>\n            <div\n              className=\"relative rounded-t-full\"\n              style={{\n                aspectRatio: \"2 / 1.6\",\n                transform: up ? \"translateY(-70%) rotate(-12deg)\" : \"none\",\n                background: \"radial-gradient(ellipse at 34% 30%, #ffffff 0%, #e9e9e6 12%, #8c8b88 42%, #3c3b39 70%, #b9b7b2 92%)\",\n                boxShadow: \"inset 0 -6px 10px rgba(0,0,0,0.35)\",\n              }}\n            >\n              <div className=\"absolute left-1/2 top-[-9%] h-[12%] w-[14%] -translate-x-1/2 rounded-full\" style={{ background: \"radial-gradient(circle at 35% 30%, #fff, #8a8985 60%, #3a3937)\" }} />\n            </div>\n          </div>\n        );\n      })}\n    </div>\n  );\n}\n\nexport default function SilverClochePricing() {\n  const reduce = useReducedMotion();\n  const wrapRef = useRef<HTMLDivElement>(null);\n  const canvasRef = useRef<HTMLCanvasElement>(null);\n  const [plan, setPlan] = useState(1);\n  const [mode, setMode] = useState<\"pending\" | \"gl\" | \"still\">(\"pending\");\n  const [marks, setMarks] = useState<number[]>([24, 50, 77]);\n  const [handled, setHandled] = useState(false);\n  const sim = useRef<Sim>({ l: [0, 1, 0], vl: [0, 0, 0], a: [0, TILT, 0], va: [0, 0, 0], dip: [0, 0, 0], plan: 1, dirty: true, touched: false });\n\n  useEffect(() => {\n    const s = sim.current;\n    if (s.plan !== plan) {\n      s.plan = plan;\n      s.dip[plan] = 0.11; // a waiter's small press down before the lift\n    }\n    s.dirty = true;\n  }, [plan]);\n\n  useEffect(() => {\n    const wrap = wrapRef.current;\n    const canvas = canvasRef.current;\n    if (!wrap || !canvas) return;\n    const gl = canvas.getContext(\"webgl2\", { antialias: false, alpha: false, powerPreference: \"high-performance\" });\n    if (!gl) {\n      setMode(\"still\");\n      return;\n    }\n    const s = sim.current;\n    let pScene: WebGLProgram, pLens: WebGLProgram;\n    try {\n      pScene = program(gl, VS, GLSL);\n      pLens = program(gl, VS, FS_LENS);\n    } catch {\n      setMode(\"still\");\n      return;\n    }\n    setMode(\"gl\");\n\n    const art = gl.createTexture();\n    gl.activeTexture(gl.TEXTURE0);\n    gl.bindTexture(gl.TEXTURE_2D, art);\n    gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);\n    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, artwork());\n    gl.generateMipmap(gl.TEXTURE_2D);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR_MIPMAP_LINEAR);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n    gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);\n\n    const vao = gl.createVertexArray();\n    const fbo = gl.createFramebuffer();\n    const tex = gl.createTexture();\n    let W = 0, H = 0, scale = Math.min(window.devicePixelRatio || 1, 2), cssW = 1, cssH = 1;\n    const TAN = Math.tan((10 * Math.PI) / 180);\n    const cam = { pos: [0, 2, 10], rt: [1, 0, 0], up: [0, 1, 0], fw: [0, 0, -1], shift: [0, 0], focus: 8 };\n\n    const aim = (sx: number, sy: number) => {\n      const aspect = cssW / cssH;\n      const wide = aspect > 1.2;\n      const dist = Math.max(9.4, (wide ? 2.4 : 2.2) / (TAN * aspect));\n      const el = 0.52;\n      const target = [0, 0.32, 0.05];\n      cam.pos = [target[0] + sx, target[1] + Math.sin(el) * dist + sy, target[2] + Math.cos(el) * dist];\n      let fw = [target[0] - cam.pos[0], target[1] - cam.pos[1], target[2] - cam.pos[2]];\n      const fl = Math.hypot(fw[0], fw[1], fw[2]);\n      fw = fw.map((v) => v / fl);\n      let rt = [-fw[2], 0, fw[0]];\n      const rl = Math.hypot(rt[0], rt[2]);\n      rt = rt.map((v) => v / rl);\n      cam.fw = fw;\n      cam.rt = rt;\n      cam.up = [rt[1] * fw[2] - rt[2] * fw[1], rt[2] * fw[0] - rt[0] * fw[2], rt[0] * fw[1] - rt[1] * fw[0]];\n      cam.shift = wide ? [0.12, -0.36] : [0, -0.38];\n      cam.focus = fl;\n      return aspect;\n    };\n    const project = (p: number[]) => {\n      const d = [p[0] - cam.pos[0], p[1] - cam.pos[1], p[2] - cam.pos[2]];\n      const z = d[0] * cam.fw[0] + d[1] * cam.fw[1] + d[2] * cam.fw[2];\n      const x = (d[0] * cam.rt[0] + d[1] * cam.rt[1] + d[2] * cam.rt[2]) / (z * TAN * (cssW / cssH)) + cam.shift[0];\n      const y = (d[0] * cam.up[0] + d[1] * cam.up[1] + d[2] * cam.up[2]) / (z * TAN) + cam.shift[1];\n      return [(x * 0.5 + 0.5) * cssW, (0.5 - y * 0.5) * cssH];\n    };\n\n    const resize = () => {\n      cssW = wrap.clientWidth;\n      cssH = wrap.clientHeight;\n      let k = scale;\n      if (cssW * cssH * k * k > 1.5e6) k = Math.sqrt(1.5e6 / (cssW * cssH));\n      const w = Math.max(2, Math.round(cssW * k)), h = Math.max(2, Math.round(cssH * k));\n      aim(0, 0);\n      setMarks(XS.map((x) => clamp((project([x, 0, 0])[0] / cssW) * 100, cssW < 640 ? 19 : 8, cssW < 640 ? 81 : 92)));\n      if (w === W && h === H) return;\n      W = w;\n      H = h;\n      canvas.width = W;\n      canvas.height = H;\n      gl.activeTexture(gl.TEXTURE1);\n      gl.bindTexture(gl.TEXTURE_2D, tex);\n      gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA8, W, H, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n      gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n      gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n      gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);\n      s.dirty = true;\n    };\n    resize();\n    const ro = new ResizeObserver(resize);\n    ro.observe(wrap);\n\n    const U = (p: WebGLProgram, n: string) => gl.getUniformLocation(p, n);\n    let pointer = [0, 0], view = [0, 0];\n\n    const draw = (t: number) => {\n      const aspect = aim(view[0], view[1]);\n      gl.bindVertexArray(vao);\n      gl.viewport(0, 0, W, H);\n      gl.bindFramebuffer(gl.FRAMEBUFFER, fbo);\n      gl.useProgram(pScene);\n      const C: number[] = [], O: number[] = [], CS: number[] = [], R: number[] = [];\n      plans.forEach((p, i) => {\n        const l = s.l[i];\n        C.push(XS[i], 0, p.dome, domeH(p.dome));\n        // lifted up and drawn back toward the waiter, front edge rising so the diner sees the plate\n        O.push(XS[i], SEAT + l * (LIFT + (reduce ? 0 : 0.008 * Math.sin(t * 1.6 + i))), -l * p.dome * 1.05);\n        CS.push(Math.cos(s.a[i]), Math.sin(s.a[i]));\n        R.push(PLATE(p.dome));\n      });\n      gl.uniform4fv(U(pScene, \"uC\"), C);\n      gl.uniform3fv(U(pScene, \"uO\"), O);\n      gl.uniform2fv(U(pScene, \"uCS\"), CS);\n      gl.uniform1fv(U(pScene, \"uR\"), R);\n      gl.uniform1i(U(pScene, \"uTex\"), 0);\n      gl.uniform3fv(U(pScene, \"uCam\"), cam.pos);\n      gl.uniform3fv(U(pScene, \"uRt\"), cam.rt);\n      gl.uniform3fv(U(pScene, \"uUp\"), cam.up);\n      gl.uniform3fv(U(pScene, \"uFw\"), cam.fw);\n      gl.uniform1f(U(pScene, \"uTan\"), TAN);\n      gl.uniform1f(U(pScene, \"uAspect\"), aspect);\n      gl.uniform2fv(U(pScene, \"uShift\"), cam.shift);\n      gl.uniform1f(U(pScene, \"uFocus\"), cam.focus);\n      gl.uniform1f(U(pScene, \"uAperture\"), 1.5);\n      gl.uniform1f(U(pScene, \"uTime\"), t);\n      gl.drawArrays(gl.TRIANGLES, 0, 3);\n      gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n      gl.useProgram(pLens);\n      gl.uniform1i(U(pLens, \"uScene\"), 1);\n      gl.uniform2f(U(pLens, \"uPx\"), 1 / W, 1 / H);\n      gl.uniform1f(U(pLens, \"uMaxR\"), H * 0.007);\n      gl.uniform1f(U(pLens, \"uTime\"), reduce ? 0 : t);\n      gl.drawArrays(gl.TRIANGLES, 0, 3);\n    };\n\n    // The lift is an underdamped spring so the dome overshoots a touch; the tilt is a second, looser spring that trails it.\n    const physics = (dt: number) => {\n      plans.forEach((_, i) => {\n        let target = i === s.plan ? 1 : 0;\n        if (s.dip[i] > 0) {\n          s.dip[i] -= dt;\n          target = -0.035;\n        }\n        const down = target < s.l[i];\n        const k = down ? 90 : 62, c = down ? 15 : 9.5;\n        s.vl[i] += (k * (target - s.l[i]) - c * s.vl[i]) * dt;\n        s.l[i] += s.vl[i] * dt;\n        if (s.l[i] < 0) {\n          // the rim meets the plate: a small, damped clink\n          s.l[i] = 0;\n          s.vl[i] = Math.abs(s.vl[i]) * 0.22 < 0.05 ? 0 : Math.abs(s.vl[i]) * 0.22;\n        }\n        const ta = TILT * clamp(s.l[i], 0, 1.2);\n        s.va[i] += (40 * (ta - s.a[i]) - 6.5 * s.va[i] - s.vl[i] * 0.8) * dt;\n        s.a[i] = clamp(s.a[i] + s.va[i] * dt, 0, 1.4);\n        if (s.l[i] === 0 && s.a[i] < 0.002) s.a[i] = 0;\n      });\n    };\n    const settle = () => {\n      plans.forEach((_, i) => {\n        s.l[i] = i === s.plan ? 1 : 0;\n        s.a[i] = i === s.plan ? TILT : 0;\n        s.vl[i] = s.va[i] = s.dip[i] = 0;\n      });\n    };\n    settle();\n\n    let raf = 0, visible = true, last = performance.now(), slow = 0, frames = 0;\n    const t0 = last;\n    let played = 0, demoAt = 4.0, step = 0;\n    const tick = (now: number) => {\n      const real = now - last;\n      const dt = clamp(real / 1000, 0, 0.05);\n      last = now;\n      const t = (now - t0) / 1000;\n      if (reduce) {\n        if (s.dirty) settle();\n      } else {\n        const sub = Math.max(1, Math.ceil(dt / 0.004));\n        for (let i = 0; i < sub; i++) physics(dt / sub);\n        played += dt;\n        view[0] += (pointer[0] * 0.4 + 0.15 * Math.sin(t * 0.2) - view[0]) * Math.min(1, dt * 3);\n        view[1] += (pointer[1] * 0.2 - view[1]) * Math.min(1, dt * 3);\n        if (DEMO && !s.touched && played > demoAt) {\n          const script = [2, 0, 1];\n          setPlan(script[step % script.length]);\n          step++;\n          demoAt = played + 3.8;\n        }\n      }\n      if (!reduce || s.dirty) {\n        draw(reduce ? 0 : t);\n        s.dirty = false;\n        if (!reduce && ++frames > 20) {\n          slow = slow * 0.92 + (real > 24 ? 1 : 0) * 0.08;\n          if (slow > 0.6 && scale > 0.5) {\n            scale *= 0.84;\n            slow = 0;\n            frames = 0;\n            resize();\n          }\n        }\n      }\n      if (visible) raf = requestAnimationFrame(tick);\n    };\n    const io = new IntersectionObserver(([e]) => {\n      const was = visible;\n      visible = e.isIntersecting;\n      if (visible && !was) {\n        last = performance.now();\n        frames = 0;\n        raf = requestAnimationFrame(tick);\n      }\n    });\n    io.observe(wrap);\n    const onVis = () => {\n      if (document.hidden) cancelAnimationFrame(raf);\n      else if (visible) {\n        last = performance.now();\n        raf = requestAnimationFrame(tick);\n      }\n    };\n    document.addEventListener(\"visibilitychange\", onVis);\n    raf = requestAnimationFrame(tick);\n\n    // pressing a cloche or its plate chooses that plan\n    const over = (e: PointerEvent) => {\n      const r = wrap.getBoundingClientRect();\n      const x = e.clientX - r.left, y = e.clientY - r.top;\n      for (let i = 0; i < plans.length; i++) {\n        const p = plans[i], R = PLATE(p.dome);\n        const a = project([XS[i] - R, domeH(p.dome) + 0.1 + LIFT * s.l[i], 0]), b = project([XS[i] + R, 0, R]);\n        if (x > a[0] && x < b[0] && y > a[1] && y < b[1]) return i;\n      }\n      return -1;\n    };\n    const touch = () => {\n      s.touched = true;\n      setHandled(true);\n    };\n    const downEv = (e: PointerEvent) => {\n      touch();\n      const i = over(e);\n      if (i >= 0) setPlan(i);\n    };\n    const move = (e: PointerEvent) => {\n      const r = wrap.getBoundingClientRect();\n      pointer = [((e.clientX - r.left) / r.width - 0.5) * 2, ((e.clientY - r.top) / r.height - 0.5) * -2];\n      canvas.style.cursor = over(e) >= 0 ? \"pointer\" : \"\";\n    };\n    const leave = () => {\n      pointer = [0, 0];\n    };\n    const lost = (e: Event) => {\n      e.preventDefault();\n      setMode(\"still\");\n    };\n    canvas.addEventListener(\"pointerdown\", downEv);\n    canvas.addEventListener(\"pointermove\", move);\n    canvas.addEventListener(\"pointerleave\", leave);\n    canvas.addEventListener(\"webglcontextlost\", lost);\n    wrap.addEventListener(\"keydown\", touch);\n    wrap.addEventListener(\"focusin\", touch);\n\n    return () => {\n      cancelAnimationFrame(raf);\n      ro.disconnect();\n      io.disconnect();\n      document.removeEventListener(\"visibilitychange\", onVis);\n      canvas.removeEventListener(\"pointerdown\", downEv);\n      canvas.removeEventListener(\"pointermove\", move);\n      canvas.removeEventListener(\"pointerleave\", leave);\n      canvas.removeEventListener(\"webglcontextlost\", lost);\n      wrap.removeEventListener(\"keydown\", touch);\n      wrap.removeEventListener(\"focusin\", touch);\n      gl.getExtension(\"WEBGL_lose_context\")?.loseContext();\n    };\n  }, [reduce]);\n\n  const chosen = plans[plan];\n  const check = (\n    <svg aria-hidden=\"true\" width=\"16\" height=\"16\" viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" className=\"mt-0.5 shrink-0\">\n      <path d=\"M4 10.5l4 4 8-9\" />\n    </svg>\n  );\n  const cta = (\n    <a\n      href=\"#\"\n      className=\"inline-flex h-11 items-center gap-3 rounded-full bg-[#1f1b17] pl-5 pr-4 text-[14px] font-semibold text-[#f4f1ec] transition hover:bg-[#3a332c] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1f1b17] focus-visible:ring-offset-2 focus-visible:ring-offset-[#ebe8e2]\"\n    >\n      Book {chosen.name}\n      <svg aria-hidden=\"true\" width=\"18\" height=\"18\" viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n        <path d=\"M4 10h12M11 5l5 5-5 5\" />\n      </svg>\n    </a>\n  );\n\n  return (\n    <section className=\"relative overflow-hidden\" style={{ fontFamily: GROTESK, background: CLOTH, color: INK }}>\n      <div ref={wrapRef} className=\"relative h-[620px] w-full sm:h-[780px]\">\n        <canvas ref={canvasRef} aria-hidden=\"true\" className={`absolute inset-0 h-full w-full touch-pan-y ${mode === \"still\" ? \"hidden\" : \"\"}`} />\n        {mode === \"still\" && <Still plan={plan} marks={[24, 50, 77]} />}\n\n        <div className=\"pointer-events-none absolute inset-x-0 top-0 flex items-center justify-between gap-4 p-5 sm:p-9\">\n          <p className=\"flex items-baseline gap-3 text-[#1f1b17]\">\n            <span className=\"text-[22px] italic leading-none sm:text-[26px]\" style={{ fontFamily: SERIF, letterSpacing: \"-0.02em\" }}>\n              {product.name}\n            </span>\n            <span className=\"hidden text-[11px] font-semibold uppercase tracking-[0.24em] text-[#1f1b17]/75 sm:inline\">{product.line}</span>\n          </p>\n          <span className=\"rounded-full border border-[#1f1b17]/30 bg-[#f7f5f1]/60 px-3 py-1.5 text-[11px] font-semibold uppercase tracking-[0.18em] text-[#1f1b17] backdrop-blur-sm\">Example prices</span>\n        </div>\n\n        <div className=\"pointer-events-none absolute left-5 top-[70px] text-[#1f1b17] sm:left-9 sm:top-[104px]\" aria-live={handled ? \"polite\" : \"off\"} >\n          <p className=\"text-[11px] font-semibold uppercase tracking-[0.26em] text-[#1f1b17]/80\">\n            <span className=\"tabular-nums\">{`0${plan + 1}`}</span>\n            <span className=\"mx-2 opacity-60\">/</span>\n            {chosen.name}\n          </p>\n          <h2 className=\"mt-1 flex items-start pb-1 font-semibold leading-[0.84]\" style={{ letterSpacing: \"-0.06em\" }}>\n            <span className=\"mr-1 mt-[0.12em] text-[34px] font-medium sm:text-[60px]\" style={{ letterSpacing: 0 }}>\n              $\n            </span>\n            <span className=\"overflow-hidden\">\n              <motion.span\n                key={plan}\n                initial={reduce ? false : { y: \"0.6em\", opacity: 0 }}\n                animate={{ y: 0, opacity: 1 }}\n                transition={{ type: \"spring\", stiffness: 240, damping: 22, delay: reduce ? 0 : 0.15 }}\n                className=\"block text-[88px] tabular-nums sm:text-[150px]\"\n              >\n                {chosen.price}\n              </motion.span>\n            </span>\n            <span className=\"ml-3 mt-[0.6em] text-[11px] font-semibold uppercase leading-[1.5] tracking-[0.2em] text-[#1f1b17]/80 sm:ml-4 sm:mt-[1.4em] sm:text-[12px]\">\n              a month\n              <span className=\"block normal-case tracking-normal\" style={{ letterSpacing: \"0.01em\" }}>\n                example price\n              </span>\n            </span>\n          </h2>\n          <p className=\"mt-1 max-w-[19ch] text-[19px] italic leading-tight sm:mt-2 sm:max-w-none sm:text-[25px]\" style={{ fontFamily: SERIF, letterSpacing: \"-0.01em\" }}>\n            {chosen.pitch}\n          </p>\n        </div>\n\n        <div className=\"absolute right-9 top-[104px] hidden w-[262px] text-[#1f1b17] lg:block\">\n          <ul className=\"space-y-2 border-t border-[#1f1b17]/25 pt-3.5 text-[14px] leading-snug\">\n            {chosen.features.map((f) => (\n              <li key={f} className=\"flex gap-3\">\n                {check}\n                {f}\n              </li>\n            ))}\n          </ul>\n          <div className=\"mt-4\" style={{ textShadow: \"none\" }}>\n            <a\n              href=\"#\"\n              className=\"inline-flex h-11 items-center gap-3 rounded-full bg-[#1f1b17] pl-5 pr-4 text-[14px] font-semibold text-[#f4f1ec] transition hover:bg-[#3a332c] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#1f1b17] focus-visible:ring-offset-2 focus-visible:ring-offset-[#ebe8e2]\"\n            >\n              Book {chosen.name}\n              <svg aria-hidden=\"true\" width=\"18\" height=\"18\" viewBox=\"0 0 20 20\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\">\n                <path d=\"M4 10h12M11 5l5 5-5 5\" />\n              </svg>\n            </a>\n          </div>\n        </div>\n\n        <fieldset className=\"absolute inset-x-0 bottom-4 h-11 sm:bottom-6\">\n          <legend className=\"sr-only\">Plan</legend>\n          {plans.map((p, i) => (\n            <label\n              key={p.name}\n              htmlFor={`silver-cloche-pricing-plan-${i}`}\n              className=\"absolute top-0 -translate-x-1/2 cursor-pointer\"\n              style={{ left: `${mode === \"still\" ? [24, 50, 77][i] : marks[i]}%` }}\n            >\n              <input id={`silver-cloche-pricing-plan-${i}`} type=\"radio\" name=\"silver-cloche-pricing-plan\" value={p.name} checked={plan === i} onChange={() => setPlan(i)} className=\"peer sr-only\" />\n              <span className=\"flex h-11 items-center gap-2 whitespace-nowrap rounded-full border border-[#1f1b17]/15 bg-[#f7f5f1]/90 pl-2.5 pr-3 text-[11px] font-semibold uppercase tracking-[0.08em] shadow-[0_6px_18px_rgba(40,30,20,0.16)] transition peer-checked:bg-[#1f1b17] peer-checked:text-[#f4f1ec] peer-focus-visible:ring-2 peer-focus-visible:ring-[#1f1b17] peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-[#f7f5f1] sm:gap-2.5 sm:pl-3.5 sm:pr-4 sm:text-[13px] sm:tracking-[0.14em]\">\n                <span className={`grid h-4 w-4 place-items-center rounded-full border-[1.5px] ${plan === i ? \"border-[#f4f1ec]\" : \"border-[#1f1b17]/60\"}`}>\n                  <span className={`h-2 w-2 rounded-full bg-[#f4f1ec] transition-transform ${plan === i ? \"scale-100\" : \"scale-0\"}`} />\n                </span>\n                {p.name}\n                <span className=\"hidden font-medium normal-case tracking-normal opacity-80 sm:inline\">${p.price}</span>\n              </span>\n            </label>\n          ))}\n        </fieldset>\n      </div>\n\n      <div className=\"border-t border-[#1f1b17]/15 px-5 pb-8 pt-6 lg:hidden\">\n        <ul className=\"space-y-2.5 text-[15px] leading-snug\">\n          {chosen.features.map((f) => (\n            <li key={f} className=\"flex gap-3\">\n              {check}\n              {f}\n            </li>\n          ))}\n        </ul>\n        <div className=\"mt-6\">{cta}</div>\n        <p className=\"mt-4 text-[13px] text-[#1f1b17]/80\">Prices shown are examples. Set your own in the plans list.</p>\n      </div>\n    </section>\n  );\n}\n"}]}
