{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"letterpress-card-testimonials-in-webgl-pinned-with-brass-pins-to-a-linen-board-where-the-chosen-card-unpins-and-lifts-into-focus","type":"registry:block","title":"Letterpress Card Testimonials in WebGL Pinned with Brass Pins to a Linen Board Where the Chosen Card Unpins and Lifts into Focus","description":"Free WebGL testimonial section: thick letterpress cards pinned to a sunlit linen board. The chosen card unpins and floats forward while the board falls soft.","dependencies":["framer-motion"],"files":[{"path":"components/we-inc/letterpress-card-testimonials-in-webgl-pinned-with-brass-pins-to-a-linen-board-where-the-chosen-card-unpins-and-lifts-into-focus.tsx","type":"registry:component","content":"import { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useReducedMotion } from \"framer-motion\";\n\n/** Example quotes from invented people. `edge` is the painted card edge, `ink` a darker shade for text on the page. */\nconst cards = [\n  {\n    quote: \"The new site feels like our shop does: quiet, careful, and easy to find your way around.\",\n    name: \"Marguerite Olande\",\n    trade: \"Bookbinder\",\n    place: \"Olande Bindery, Lyon\",\n    edge: \"#b53c22\",\n    ink: \"#8a2c19\",\n  },\n  {\n    quote: \"We stopped explaining what we make over the phone. People arrive already knowing.\",\n    name: \"Teodor Vass\",\n    trade: \"Joiner\",\n    place: \"Vass & Daughter, Ghent\",\n    edge: \"#2a4775\",\n    ink: \"#253f68\",\n  },\n  {\n    quote: \"Booking a table used to take three emails. Now it takes a name and one tap.\",\n    name: \"Ines Calloway\",\n    trade: \"Tea room owner\",\n    place: \"Calloway Rooms, Bath\",\n    edge: \"#5c7b4c\",\n    ink: \"#435a37\",\n  },\n  {\n    quote: \"It finally looks like the work, and not like a template somebody else chose for us.\",\n    name: \"Ravi Hale\",\n    trade: \"Potter\",\n    place: \"Hale Ceramics, Porto\",\n    edge: \"#b7862b\",\n    ink: \"#6f4f12\",\n  },\n];\n\nconst HEADING = \"Kind words, set in lead\";\nconst KICKER = \"Example quotes\";\nconst HOLD_MS = 6800; // pause before the next card is taken down by itself\nconst LIFT_SPRING = 36; // stiffness of the lift\nconst LIFT_DAMP = 7.2; // lower = more overshoot as the card arrives\nconst PIN_SPEED = 3.4; // how fast the brass pin travels (units per second)\nconst MAX_PIXELS = 1_600_000;\n\n/* ------------------------------------------------------------------ shaders */\n\nconst VERT = `#version 300 es\nin vec2 aP; void main(){ gl_Position = vec4(aP,0.,1.); }`;\n\nconst SCENE = `#version 300 es\nprecision highp float;\nuniform vec2 uRes; uniform float uTime;\nuniform vec3 uRo, uTa; uniform float uFov;\nuniform vec3 uC[4]; uniform mat3 uR[4]; uniform vec3 uPin[4]; uniform vec3 uEdge[4];\nuniform float uFocus, uAper; uniform vec3 uL;\nuniform sampler2D uAtlas; uniform vec2 uTexel;\nout vec4 fragColor;\n\nconst vec3 HE = vec3(0.45, 0.63, 0.018);\nconst float PR = 0.036;\nconst float SL = 0.11;\nconst vec3 LINEN = vec3(0.40, 0.335, 0.25);\nconst vec3 PAPER = vec3(0.84, 0.785, 0.675);\nconst vec3 INKC = vec3(0.035, 0.032, 0.03);\nconst vec3 BRASS = vec3(0.98, 0.74, 0.38);\nconst vec3 SUN = vec3(1.0, 0.80, 0.58) * 3.1;\n\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){ vec2 i=floor(p), f=fract(p); f=f*f*(3.-2.*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); }\nfloat fbm(vec2 p){ float s=0., a=.5; for(int i=0;i<4;i++){ s+=a*vnoise(p); p=p*2.03+7.1; a*=.5; } return s; }\n\nfloat sdBox(vec3 p, vec3 b){ vec3 q=abs(p)-b; return length(max(q,0.))+min(max(q.x,max(q.y,q.z)),0.); }\nfloat sdPin(vec3 p, vec3 h){\n  vec3 q = p-h; float s = length(q*vec3(1.,1.,1.18))-PR;\n  float r = length(q.xy)-0.0055; float z = max(q.z, -(q.z+SL+PR));\n  float sh = length(max(vec2(r,z),0.))+min(max(r,z),0.);\n  return min(s, sh);\n}\nfloat map(vec3 p){\n  float d = 1e5;\n  for(int i=0;i<4;i++){ d = min(d, sdBox((p-uC[i])*uR[i], HE)); d = min(d, sdPin(p, uPin[i])); }\n  return d;\n}\nfloat softShadow(vec3 ro, vec3 rd){\n  float res=1., t=0.006;\n  for(int i=0;i<40;i++){ float h=map(ro+rd*t); res=min(res, 6.5*h/t); t+=clamp(h, 0.005, 0.3); if(res<0.002||t>5.) break; }\n  return clamp(res,0.,1.);\n}\nfloat calcAO(vec3 p, vec3 n){\n  float occ=0., sca=1.;\n  for(int i=0;i<5;i++){ float h=0.012+0.07*float(i); occ+=(h-map(p+n*h))*sca; sca*=0.72; }\n  return clamp(1.-2.4*occ, 0., 1.);\n}\n/* sunlight that reaches a point through the window: soft frame, glazing bars and a little leaf shade */\nfloat windowLight(vec3 p){\n  vec2 q = p.xy - uL.xy/uL.z*p.z;\n  vec2 w = q - vec2(-0.35, 0.35);\n  float frame = smoothstep(3.3, 2.6, abs(w.x + 0.25*w.y)) * smoothstep(2.4, 1.8, abs(w.y));\n  vec2 g = vec2(q.x + 0.30*q.y + 0.55, q.y - 0.05*q.x + 0.35);\n  float bx = abs(fract(g.x/2.05)-0.5)*2.05, by = abs(fract(g.y/2.3)-0.5)*2.3;\n  float bars = mix(0.22, 1., smoothstep(0.018, 0.06, bx) * smoothstep(0.014, 0.05, by));\n  float leaf = fbm(q*1.7 + vec2(uTime*0.05, sin(uTime*0.4)*0.06));\n  float shade = mix(1., 0.25 + 0.75*smoothstep(0.42, 0.62, leaf), smoothstep(-0.2, -2.2, q.x) * smoothstep(-0.6, 1.4, q.y) * 0.75);\n  return frame * bars * shade;\n}\nvec3 env(vec3 r){\n  vec3 c = mix(vec3(0.07,0.055,0.04), vec3(0.20,0.17,0.13), smoothstep(-0.4, 0.6, r.y));\n  c += vec3(0.45,0.47,0.52) * smoothstep(0.2, 0.9, r.z) * 0.6;\n  float s = dot(r, uL); c += SUN * 0.9 * smoothstep(0.93, 0.985, s);\n  return c;\n}\nfloat ggx(vec3 n, vec3 v, vec3 l, float rough){\n  vec3 h = normalize(v+l); float a = rough*rough; float nh = max(dot(n,h),0.);\n  float d = a*a/(3.14159*pow(nh*nh*(a*a-1.)+1., 2.));\n  return d * max(dot(n,l),0.) / (4.*max(dot(n,v),0.15)*max(dot(n,l),0.15)+1e-3) * max(dot(n,l),0.);\n}\nvec2 boxHit(vec3 o, vec3 d, vec3 b, out vec3 n){\n  vec3 m = 1./d; vec3 k = abs(m)*b; vec3 t1 = -m*o - k; vec3 t2 = -m*o + k;\n  float tN = max(max(t1.x,t1.y),t1.z); float tF = min(min(t2.x,t2.y),t2.z);\n  if(tN>tF || tF<0.) return vec2(-1.);\n  n = -sign(d)*step(t1.yzx,t1.xyz)*step(t1.zxy,t1.xyz);\n  return vec2(tN, tF);\n}\nfloat sphHit(vec3 o, vec3 d, vec3 c, float r){\n  vec3 oc=o-c; float b=dot(oc,d); float h=b*b-dot(oc,oc)+r*r; if(h<0.) return -1.; return -b-sqrt(h);\n}\nfloat cylHit(vec3 o, vec3 d, vec3 c, float r, float len){\n  vec2 oc=o.xy-c.xy; float a=dot(d.xy,d.xy); float b=dot(oc,d.xy); float cc=dot(oc,oc)-r*r; float h=b*b-a*cc;\n  if(h<0.||a<1e-6) return -1.; float t=(-b-sqrt(h))/a; float z=o.z+d.z*t; if(z>c.z||z<c.z-len) return -1.; return t;\n}\n\nvoid main(){\n  vec2 px = (2.*gl_FragCoord.xy - uRes)/uRes.y;\n  vec3 fw = normalize(uTa-uRo); vec3 rt = normalize(cross(fw, vec3(0,1,0))); vec3 up = cross(rt, fw);\n  vec3 rd = normalize(fw + (px.x*rt + px.y*up)*uFov);\n  vec3 ro = uRo;\n\n  float tb = 1e9; int obj = -1; int id = 0; vec3 nl = vec3(0,0,1); vec3 lp = vec3(0);\n  if(rd.z < 0.){ tb = -ro.z/rd.z; obj = 0; }\n  for(int i=0;i<4;i++){\n    vec3 n; vec3 o=(ro-uC[i])*uR[i]; vec3 d=rd*uR[i];\n    vec2 h = boxHit(o, d, HE, n);\n    if(h.x>0. && h.x<tb){ tb=h.x; obj=1; id=i; nl=n; lp=o+d*h.x; }\n    float s = sphHit(ro*vec3(1,1,1.18), normalize(rd*vec3(1,1,1.18)), uPin[i]*vec3(1,1,1.18), PR);\n    if(s>0.){ vec3 hp=(ro*vec3(1,1,1.18)+normalize(rd*vec3(1,1,1.18))*s)/vec3(1,1,1.18); float ts=length(hp-ro); if(ts<tb){ tb=ts; obj=2; id=i; } }\n    float c = cylHit(ro, rd, uPin[i], 0.0055, SL+PR);\n    if(c>0. && c<tb){ tb=c; obj=3; id=i; }\n  }\n  vec3 p = ro + rd*tb; vec3 v = -rd;\n  vec3 n = vec3(0,0,1); vec3 alb = LINEN; float rough = 0.85; float f0 = 0.025; float metal = 0.; float cav = 1.;\n\n  if(obj==0){\n    float fp = tb*uFov*2./uRes.y;\n    vec2 u = p.xy*175.;\n    float sx = sign(sin(u.x*0.5)*sin(u.y*0.5));\n    float fade = clamp(1. - fp*140., 0., 1.);\n    vec2 e = vec2(0.35, 0.);\n    #define WV(q) max(pow(abs(sin((q).y)),0.6)*(0.62+0.38*sx), pow(abs(sin((q).x)),0.6)*(0.62-0.38*sx))\n    float h0 = WV(u); float hx = WV(u+e.xy); float hy = WV(u+e.yx);\n    n = normalize(vec3(-(hx-h0)*0.55*fade, -(hy-h0)*0.55*fade, 1.));\n    float slub = fbm(vec2(p.x*9., p.y*120.))*0.5 + fbm(vec2(p.x*130., p.y*8.))*0.5;\n    alb = LINEN * (0.86 + 0.26*slub) * mix(1., 0.82 + 0.3*h0, fade);\n    rough = 0.95;\n  } else if(obj==1){\n    vec3 nw = uR[id]*nl;\n    if(nl.z > 0.5){\n      vec2 uv = lp.xy/HE.xy*0.5+0.5;\n      vec2 tc = vec2((float(id)+uv.x)/4., 1.-uv.y);\n      vec4 t = texture(uAtlas, tc);\n      vec2 du = vec2(uTexel.x*1.5, 0.), dv = vec2(0., uTexel.y*1.5);\n      float hx = texture(uAtlas, tc+du).r - texture(uAtlas, tc-du).r;\n      float hy = texture(uAtlas, tc-dv).r - texture(uAtlas, tc+dv).r;\n      float ew = uTexel.x*1.5*2.*HE.x*2.*4.;\n      float D = 0.0065;\n      vec3 nn = normalize(vec3(D*hx/ew, D*hy/ew, 1.));\n      vec2 ed = HE.xy - abs(lp.xy);\n      float rim = 1. - smoothstep(0., 0.006, min(ed.x, ed.y));\n      nn = normalize(nn + vec3(sign(lp.xy)*step(ed.yx, ed.xy)*rim*0.0, 0.) + vec3(sign(lp.x)*(1.-smoothstep(0.,0.006,ed.x)), sign(lp.y)*(1.-smoothstep(0.,0.006,ed.y)), 0.)*0.8);\n      n = normalize(uR[id]*nn);\n      float fib = fbm(lp.xy*vec2(260., 300.)); float fib2 = vnoise(lp.xy*vec2(900., 40.));\n      alb = PAPER * (0.95 + 0.06*fib + 0.025*fib2);\n      vec3 inkc = mix(INKC, uEdge[id]*0.5, t.b);\n      float mott = 0.93 + 0.07*vnoise(lp.xy*900.) + 0.04*vnoise(lp.xy*90.);\n      alb = mix(alb, inkc, clamp(t.g*mott*1.05, 0., 1.));\n      rough = mix(0.62, 0.42, t.g); f0 = mix(0.03, 0.045, t.g);\n      cav = 1. - 0.22*t.r;\n    } else if(nl.z < -0.5){\n      n = nw; alb = PAPER*0.92;\n    } else {\n      n = nw;\n      float ln = fbm(lp.xy*vec2(140., 140.) + lp.z*400.);\n      alb = uEdge[id] * (0.92 + 0.14*ln);\n      rough = 0.7;\n    }\n  } else if(obj==2){\n    vec3 q = p - uPin[id]; n = normalize(q*vec3(1.,1.,1.18*1.18));\n    alb = BRASS; metal = 1.; rough = 0.22 + 0.08*vnoise(q.xy*300.);\n  } else if(obj==3){\n    vec3 q = p - uPin[id]; n = normalize(vec3(q.xy, 0.));\n    alb = vec3(0.62,0.62,0.6); metal = 1.; rough = 0.3;\n  }\n\n  vec3 L = uL;\n  float ndl = max(dot(n, L), 0.);\n  float sh = ndl > 0. ? softShadow(p + n*0.004, L) : 0.;\n  float wl = windowLight(p);\n  float ao = calcAO(p + n*0.002, n) * cav;\n  vec3 amb = mix(vec3(0.30,0.24,0.18), vec3(0.40,0.45,0.55), 0.5+0.5*n.y) * (0.42 + 0.3*n.z);\n  vec3 col;\n  if(metal > 0.5){\n    vec3 r = reflect(rd, n);\n    float fr = pow(1.-max(dot(n,v),0.), 5.);\n    vec3 F = alb + (1.-alb)*fr;\n    float rs = softShadow(p + n*0.004, r);\n    col = env(r) * F * mix(0.35, 1., rs) * ao;\n    col += SUN * F * ggx(n, v, L, rough) * sh * wl * 1.2;\n    col += alb * 0.04 * amb;\n  } else {\n    vec3 diff = alb * (SUN * ndl * sh * wl + amb * ao);\n    float spec = ggx(n, v, L, rough) * sh * wl;\n    float fr = f0 + (1.-f0)*pow(1.-max(dot(n,v),0.), 5.);\n    col = diff + SUN * spec * fr * 0.9;\n  }\n  // gentle room falloff away from the window\n  if(obj==0) col *= mix(0.8, 1.0, smoothstep(-3.0, 0.5, p.y + 0.2*p.x));\n\n  col *= 0.95;\n  vec3 a = col*(2.51*col+0.03); vec3 b = col*(2.43*col+0.59)+0.14;\n  col = clamp(a/b, 0., 1.);\n  col = pow(col, vec3(1./2.2));\n\n  float coc = clamp(uAper * abs(tb - uFocus) / tb, 0., 1.);\n  fragColor = vec4(col, coc);\n}`;\n\nconst POST = `#version 300 es\nprecision highp float;\nuniform sampler2D uTex; uniform vec2 uRes; uniform float uMaxR; uniform float uTime;\nout vec4 fragColor;\nfloat hash(vec2 p){ p = fract(p*vec2(443.897, 441.423)); p += dot(p, p.yx+19.19); return fract((p.x+p.y)*p.x); }\nvoid main(){\n  vec2 uv = gl_FragCoord.xy/uRes;\n  vec4 c = texture(uTex, uv);\n  float cc = c.a; vec3 acc = c.rgb; float w = 1.;\n  if(cc*uMaxR > 0.7){\n    float jr = hash(gl_FragCoord.xy)*6.2831;\n    for(int i=1;i<48;i++){\n      float fi = float(i); float r = sqrt((fi - hash(gl_FragCoord.yx+fi)*0.5)/47.)*uMaxR; float a = fi*2.39996323 + jr;\n      vec4 s = texture(uTex, uv + vec2(cos(a), sin(a))*r/uRes);\n      float reach = min(s.a, cc)*uMaxR;\n      float ww = clamp(reach - r + 1., 0., 1.);\n      acc += s.rgb*ww; w += ww;\n    }\n  }\n  vec3 col = acc/w;\n  if(cc < 0.08){\n    vec2 px = 1./uRes;\n    vec3 n1 = texture(uTex, uv+vec2(px.x,0.)).rgb, n2 = texture(uTex, uv-vec2(px.x,0.)).rgb;\n    vec3 n3 = texture(uTex, uv+vec2(0.,px.y)).rgb, n4 = texture(uTex, uv-vec2(0.,px.y)).rgb;\n    vec3 lw = vec3(0.299,0.587,0.114);\n    float lh = abs(dot(n1-n2, lw)), lv = abs(dot(n3-n4, lw));\n    vec3 along = lh > lv ? (n3+n4)*0.5 : (n1+n2)*0.5;\n    col = mix(col, along, clamp(max(lh,lv)*2.2, 0., 0.45));\n  }\n  vec2 q = uv - 0.5; col *= 1. - 0.32*dot(q*vec2(1.1,1.3), q*vec2(1.1,1.3));\n  col += (hash(gl_FragCoord.xy + fract(uTime*7.)*91.) - 0.5) * 0.028;\n  fragColor = vec4(col, 1.);\n}`;\n\n/* ------------------------------------------------------------------ helpers */\n\ntype V3 = [number, number, number];\nconst clamp = (x: number, a: number, b: number) => Math.min(b, Math.max(a, x));\nconst sub = (a: V3, b: V3): V3 => [a[0] - b[0], a[1] - b[1], a[2] - b[2]];\nconst dot = (a: V3, b: V3) => a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\nconst norm = (a: V3): V3 => {\n  const l = Math.hypot(a[0], a[1], a[2]) || 1;\n  return [a[0] / l, a[1] / l, a[2] / l];\n};\nconst cross = (a: V3, b: V3): V3 => [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]];\nconst mix = (a: number, b: number, t: number) => a + (b - a) * t;\nconst ease = (t: number) => {\n  const x = clamp(t, 0, 1);\n  return x * x * (3 - 2 * x);\n};\nconst toLin = (hex: string): V3 => {\n  const n = parseInt(hex.slice(1), 16);\n  return [(n >> 16) & 255, (n >> 8) & 255, n & 255].map((c) => Math.pow(c / 255, 2.2)) as V3;\n};\n\n/** Rotation Rz(roll) * Ry(yaw) * Rx(pitch), returned column-major for a GLSL mat3. */\nfunction rotation(pitch: number, yaw: number, roll: number) {\n  const [cx, sx, cy, sy, cz, sz] = [Math.cos(pitch), Math.sin(pitch), Math.cos(yaw), Math.sin(yaw), Math.cos(roll), Math.sin(roll)];\n  const m = [\n    [cz * cy, cz * sy * sx - sz * cx, cz * sy * cx + sz * sx],\n    [sz * cy, sz * sy * sx + cz * cx, sz * sy * cx - cz * sx],\n    [-sy, cy * sx, cy * cx],\n  ];\n  return { m, col: [m[0][0], m[1][0], m[2][0], m[0][1], m[1][1], m[2][1], m[0][2], m[1][2], m[2][2]] };\n}\nconst apply = (m: number[][], v: V3): V3 => [\n  m[0][0] * v[0] + m[0][1] * v[1] + m[0][2] * v[2],\n  m[1][0] * v[0] + m[1][1] * v[1] + m[1][2] * v[2],\n  m[2][0] * v[0] + m[2][1] * v[1] + m[2][2] * v[2],\n];\n\nconst HE: V3 = [0.45, 0.63, 0.018];\nconst PIN_DROP = 0.085; // pin sits this far below the top edge of a card\nconst PR = 0.036;\nconst SLOTS: { x: number; y: number; tilt: number }[] = [\n  { x: 0.98, y: 0.76, tilt: 0.045 },\n  { x: 2.2, y: 0.82, tilt: -0.03 },\n  { x: 1.04, y: -0.82, tilt: -0.02 },\n  { x: 2.24, y: -0.76, tilt: 0.05 },\n];\n\nconst TW = 768;\nconst TH = 1075;\n\n/** Draws every card face into one atlas: red = depth of the bite, green = ink, blue = ink is the edge colour. */\nfunction buildAtlas() {\n  const atlas = document.createElement(\"canvas\");\n  atlas.width = TW * cards.length;\n  atlas.height = TH;\n  const out = atlas.getContext(\"2d\")!;\n  const img = out.createImageData(atlas.width, TH);\n  const layer = () => {\n    const c = document.createElement(\"canvas\");\n    c.width = TW;\n    c.height = TH;\n    return [c, c.getContext(\"2d\")!] as const;\n  };\n  const serif = 'Georgia, \"Times New Roman\", serif';\n  const sans = '\"Inter Tight\", \"Inter\", \"Helvetica Neue\", Arial, sans-serif';\n  cards.forEach((card, i) => {\n    const [dc, d] = layer();\n    const [ic, ink] = layer();\n    const [ec, edge] = layer();\n    for (const g of [d, ink, edge]) {\n      g.fillStyle = \"#000\";\n      g.fillRect(0, 0, TW, TH);\n      g.fillStyle = \"#fff\";\n      g.textBaseline = \"alphabetic\";\n    }\n    const both = (fn: (g: CanvasRenderingContext2D) => void, target: CanvasRenderingContext2D | null) => {\n      fn(d);\n      if (target) fn(target);\n    };\n    const spaced = (g: CanvasRenderingContext2D, px: string) => {\n      (g as CanvasRenderingContext2D & { letterSpacing?: string }).letterSpacing = px;\n    };\n    // number, top left, blind\n    both((g) => {\n      g.font = `600 30px ${sans}`;\n      spaced(g, \"6px\");\n      g.textAlign = \"left\";\n      g.fillText(`NO. 0${i + 1}`, 70, 110);\n      g.textAlign = \"right\";\n      g.fillText(\"EXAMPLE\", TW - 70, 110);\n      spaced(g, \"0px\");\n    }, null);\n    // the large initial, inked in the edge colour\n    both((g) => {\n      g.font = `700 560px ${serif}`;\n      g.textAlign = \"center\";\n      g.fillText(card.name[0], TW / 2, 640);\n    }, edge);\n    both((g) => {\n      g.font = `700 560px ${serif}`;\n      g.textAlign = \"center\";\n      g.fillText(card.name[0], TW / 2, 640);\n    }, ink);\n    // rule\n    both((g) => g.fillRect(70, 720, TW - 140, 4), ink);\n    // name, inked dark\n    both((g) => {\n      g.font = `400 64px ${serif}`;\n      g.textAlign = \"left\";\n      g.fillText(card.name, 70, 820);\n    }, ink);\n    // trade and place, blind\n    both((g) => {\n      g.font = `600 27px ${sans}`;\n      spaced(g, \"5px\");\n      g.textAlign = \"left\";\n      g.fillText(card.trade.toUpperCase(), 70, 896);\n      g.fillText(card.place.toUpperCase(), 70, 944);\n      spaced(g, \"0px\");\n    }, null);\n    const [bc, b] = layer();\n    b.filter = \"blur(2.8px)\";\n    b.drawImage(dc, 0, 0);\n    const D = b.getImageData(0, 0, TW, TH).data;\n    const I = ink.getImageData(0, 0, TW, TH).data;\n    const E = edge.getImageData(0, 0, TW, TH).data;\n    void bc;\n    void ic;\n    void ec;\n    for (let y = 0; y < TH; y++) {\n      for (let x = 0; x < TW; x++) {\n        const s = (y * TW + x) * 4;\n        const o = (y * atlas.width + i * TW + x) * 4;\n        img.data[o] = D[s];\n        img.data[o + 1] = I[s];\n        img.data[o + 2] = E[s];\n        img.data[o + 3] = 255;\n      }\n    }\n  });\n  out.putImageData(img, 0, 0);\n  return atlas;\n}\n\n/* ------------------------------------------------------------------ component */\n\nexport default function LetterpressCardTestimonials() {\n  const reduce = useReducedMotion();\n  const [active, setActive] = useState(0);\n  const [glOk, setGlOk] = useState(true);\n  const [paused, setPaused] = useState(false);\n  const wrapRef = useRef<HTMLDivElement>(null);\n  const stageRef = useRef<HTMLDivElement>(null);\n  const canvasRef = useRef<HTMLCanvasElement>(null);\n  const activeRef = useRef(0);\n  const kick = useRef<() => void>(() => {});\n\n  const go = useCallback((i: number) => {\n    const n = ((i % cards.length) + cards.length) % cards.length;\n    activeRef.current = n;\n    setActive(n);\n    kick.current();\n  }, []);\n\n  useEffect(() => {\n    if (paused) return;\n    const t = window.setTimeout(() => go(activeRef.current + 1), HOLD_MS);\n    return () => window.clearTimeout(t);\n  }, [active, paused, go]);\n\n  useEffect(() => {\n    const stage = stageRef.current;\n    const canvas = canvasRef.current;\n    if (!stage || !canvas) return;\n    const gl = canvas.getContext(\"webgl2\", { antialias: false, alpha: false, powerPreference: \"high-performance\" });\n    if (!gl) {\n      setGlOk(false);\n      return;\n    }\n    const compile = (type: number, src: string) => {\n      const sh = gl.createShader(type)!;\n      gl.shaderSource(sh, src);\n      gl.compileShader(sh);\n      if (!gl.getShaderParameter(sh, gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(sh) || \"shader\");\n      return sh;\n    };\n    const program = (fs: string) => {\n      const p = gl.createProgram()!;\n      gl.attachShader(p, compile(gl.VERTEX_SHADER, VERT));\n      gl.attachShader(p, compile(gl.FRAGMENT_SHADER, fs));\n      gl.bindAttribLocation(p, 0, \"aP\");\n      gl.linkProgram(p);\n      if (!gl.getProgramParameter(p, gl.LINK_STATUS)) throw new Error(gl.getProgramInfoLog(p) || \"link\");\n      return p;\n    };\n    let scene: WebGLProgram, post: WebGLProgram;\n    try {\n      scene = program(SCENE);\n      post = program(POST);\n    } catch (err) {\n      console.warn(err);\n      setGlOk(false);\n      return;\n    }\n    const buf = gl.createBuffer();\n    gl.bindBuffer(gl.ARRAY_BUFFER, buf);\n    gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);\n    gl.enableVertexAttribArray(0);\n    gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);\n\n    const atlasTex = gl.createTexture();\n    gl.activeTexture(gl.TEXTURE0);\n    gl.bindTexture(gl.TEXTURE_2D, atlasTex);\n    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, buildAtlas());\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_MAG_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    const aniso = gl.getExtension(\"EXT_texture_filter_anisotropic\");\n    if (aniso) gl.texParameterf(gl.TEXTURE_2D, aniso.TEXTURE_MAX_ANISOTROPY_EXT, 8);\n\n    const fbTex = gl.createTexture();\n    const fb = gl.createFramebuffer();\n    let W = 1,\n      H = 1,\n      scale = 1;\n    const resize = () => {\n      const r = stage.getBoundingClientRect();\n      const dpr = Math.min(window.devicePixelRatio || 1, 1.5) * scale;\n      let w = Math.max(2, Math.round(r.width * dpr));\n      let h = Math.max(2, Math.round(r.height * dpr));\n      const k = Math.sqrt(MAX_PIXELS / (w * h));\n      if (k < 1) {\n        w = Math.round(w * k);\n        h = Math.round(h * k);\n      }\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, fbTex);\n      gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, 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_MAG_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, fb);\n      gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, fbTex, 0);\n      gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n      dirty = true;\n    };\n\n    const U = (p: WebGLProgram, n: string) => gl.getUniformLocation(p, n);\n    const su = {\n      res: U(scene, \"uRes\"),\n      time: U(scene, \"uTime\"),\n      ro: U(scene, \"uRo\"),\n      ta: U(scene, \"uTa\"),\n      fov: U(scene, \"uFov\"),\n      c: U(scene, \"uC\"),\n      r: U(scene, \"uR\"),\n      pin: U(scene, \"uPin\"),\n      edge: U(scene, \"uEdge\"),\n      focus: U(scene, \"uFocus\"),\n      aper: U(scene, \"uAper\"),\n      l: U(scene, \"uL\"),\n      atlas: U(scene, \"uAtlas\"),\n      texel: U(scene, \"uTexel\"),\n    };\n    const pu = { tex: U(post, \"uTex\"), res: U(post, \"uRes\"), maxR: U(post, \"uMaxR\"), time: U(post, \"uTime\") };\n    const edges = new Float32Array(cards.flatMap((c) => toLin(c.edge)));\n    const sun = norm([-0.3, 0.36, 0.88]);\n    const FOV = 0.33;\n\n    // per card: lift l (spring), its velocity, pin travel p (0 in card, 1 held out, 2 pushed into the board)\n    const st = cards.map((_, i) => ({ l: i === activeRef.current ? 1 : 0, v: 0, p: i === activeRef.current ? 2 : 0 }));\n    let dirty = true;\n    let visible = true;\n    let raf = 0;\n    let last = performance.now();\n    const t0 = last;\n    let px = 0,\n      py = 0,\n      spx = 0,\n      spy = 0;\n    let slow = 0,\n      frames = 0,\n      fpsT = last;\n\n    const layout = () => {\n      const r = stage.getBoundingClientRect();\n      const phone = r.width < 640;\n      const aspect = r.width / Math.max(1, r.height);\n      if (phone) {\n        const d = Math.max(6.2, 1.62 / (FOV * aspect));\n        return { ro: [1.62, -0.02, d] as V3, ta: [1.62, -0.02, 0] as V3, lift: [1.62, 0.02, 2.05] as V3 };\n      }\n      // keep the whole cluster in the right half however wide the section is\n      const d = Math.max(5.75, 2.7 / (0.54 * 2 * FOV * aspect));\n      const cx = Math.max(0.42, 3.15 - d * FOV * aspect);\n      return { ro: [cx - 0.08, 0.06, d] as V3, ta: [cx, 0.0, 0] as V3, lift: [1.62, 0.04, 2.1] as V3 };\n    };\n\n    const boardPose = (i: number) => {\n      const s = SLOTS[i];\n      const R = rotation(-0.035, 0, s.tilt);\n      const pinPt: V3 = [s.x, s.y + HE[1] - PIN_DROP, 0];\n      const off = apply(R.m, [0, -(HE[1] - PIN_DROP), 0]);\n      const c: V3 = [pinPt[0] + off[0], pinPt[1] + off[1], off[2] + HE[2] + 0.0015];\n      return { c, pinPt, ang: [-0.035, 0, s.tilt] as V3 };\n    };\n\n    const draw = (now: number) => {\n      const t = (now - t0) / 1000;\n      const L = layout();\n      spx += (px - spx) * 0.06;\n      spy += (py - spy) * 0.06;\n      const ro: V3 = [L.ro[0] + spx * 0.16 + Math.sin(t * 0.21) * 0.04, L.ro[1] - spy * 0.1 + Math.sin(t * 0.17) * 0.03, L.ro[2]];\n      const C: number[] = [];\n      const Rm: number[] = [];\n      const P: number[] = [];\n      let focusL = 0;\n      let focusD = Math.hypot(ro[0] - L.ta[0], ro[1] - L.ta[1], ro[2]);\n      st.forEach((s, i) => {\n        const b = boardPose(i);\n        const k = clamp(s.l, -0.2, 1.2);\n        const e = ease(k) + (k > 1 ? (k - 1) : 0);\n        const to = norm(sub(ro, L.lift));\n        const yawL = Math.atan2(to[0], to[2]) + 0.26 + Math.sin(t * 0.5) * 0.07 + spx * 0.12;\n        const pitchL = -Math.asin(to[1]) + Math.sin(t * 0.7) * 0.035 - spy * 0.08;\n        const rollL = Math.sin(t * 0.43) * 0.03 - 0.025;\n        const arc = Math.sin(Math.PI * clamp(k, 0, 1));\n        const ang: V3 = [mix(b.ang[0], pitchL, e) - 0.35 * arc, mix(b.ang[1], yawL, e) + 0.42 * arc, mix(b.ang[2], rollL, e)];\n        const lift: V3 = [L.lift[0], L.lift[1] + Math.sin(t * 0.9) * 0.02 * e, L.lift[2]];\n        const c: V3 = [mix(b.c[0], lift[0], e), mix(b.c[1], lift[1], e) + 0.12 * arc, mix(b.c[2], lift[2], e) + 0.35 * arc];\n        const R = rotation(ang[0], ang[1], ang[2]);\n        C.push(...c);\n        Rm.push(...R.col);\n        const zCard = 2 * HE[2] + 0.002 + PR * 0.72;\n        const zHold = 0.22;\n        const zBoard = PR * 0.72 + 0.004;\n        const z = s.p <= 1 ? mix(zCard, zHold, ease(s.p)) : mix(zHold, zBoard, ease(s.p - 1));\n        P.push(b.pinPt[0], b.pinPt[1], z);\n        if (e > focusL) {\n          focusL = e;\n        }\n        if (i === activeRef.current) focusD = mix(focusD, Math.hypot(ro[0] - c[0], ro[1] - c[1], ro[2] - c[2]), clamp(e, 0, 1));\n      });\n\n      gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\n      gl.viewport(0, 0, W, H);\n      gl.useProgram(scene);\n      gl.uniform2f(su.res, W, H);\n      gl.uniform1f(su.time, t);\n      gl.uniform3fv(su.ro, ro);\n      gl.uniform3fv(su.ta, L.ta);\n      gl.uniform1f(su.fov, FOV);\n      gl.uniform3fv(su.c, C);\n      gl.uniformMatrix3fv(su.r, false, Rm);\n      gl.uniform3fv(su.pin, P);\n      gl.uniform3fv(su.edge, edges);\n      gl.uniform1f(su.focus, focusD);\n      gl.uniform1f(su.aper, 1.15 * clamp(focusL, 0, 1));\n      gl.uniform3fv(su.l, sun);\n      gl.uniform1i(su.atlas, 0);\n      gl.uniform2f(su.texel, 1 / (TW * cards.length), 1 / TH);\n      gl.drawArrays(gl.TRIANGLES, 0, 3);\n\n      gl.bindFramebuffer(gl.FRAMEBUFFER, null);\n      gl.useProgram(post);\n      gl.uniform1i(pu.tex, 1);\n      gl.uniform2f(pu.res, W, H);\n      gl.uniform1f(pu.maxR, (H / 720) * 15);\n      gl.uniform1f(pu.time, t);\n      gl.drawArrays(gl.TRIANGLES, 0, 3);\n    };\n\n    const step = (dt: number) => {\n      let moving = false;\n      st.forEach((s, i) => {\n        const sel = i === activeRef.current;\n        let lT: number, pT: number;\n        if (sel) {\n          pT = s.l > 0.45 ? 2 : 1;\n          lT = s.p >= 0.98 ? 1 : 0;\n        } else {\n          pT = s.p > 1.01 ? 1 : s.l < 0.04 ? 0 : 1;\n          lT = s.p <= 1.02 ? 0 : 1;\n        }\n        if (reduce) {\n          s.l = sel ? 1 : 0;\n          s.v = 0;\n          s.p = sel ? 2 : 0;\n          return;\n        }\n        const dp = pT - s.p;\n        s.p += Math.sign(dp) * Math.min(Math.abs(dp), PIN_SPEED * dt);\n        s.v += (LIFT_SPRING * (lT - s.l) - LIFT_DAMP * s.v) * dt;\n        s.l += s.v * dt;\n        if (Math.abs(dp) > 1e-3 || Math.abs(lT - s.l) > 1e-3 || Math.abs(s.v) > 1e-3) moving = true;\n      });\n      return moving;\n    };\n\n    const tick = (now: number) => {\n      const dt = Math.min(0.05, (now - last) / 1000);\n      last = now;\n      step(dt);\n      if (reduce && !dirty) {\n        raf = 0;\n        return;\n      }\n      draw(reduce ? t0 : now);\n      dirty = false;\n      frames++;\n      if (dt > 0.024) slow++;\n      else slow = Math.max(0, slow - 1);\n      if (slow > 40 && scale > 0.55) {\n        scale *= 0.85;\n        slow = 0;\n        resize();\n      }\n      if (now - fpsT > 1000) {\n        canvas.dataset.fps = String(Math.round((frames * 1000) / (now - fpsT)));\n        frames = 0;\n        fpsT = now;\n      }\n      if (visible) raf = requestAnimationFrame(tick);\n      else raf = 0;\n    };\n    const start = () => {\n      if (!raf && visible) {\n        last = performance.now();\n        raf = requestAnimationFrame(tick);\n      }\n    };\n    kick.current = () => {\n      dirty = true;\n      start();\n    };\n\n    const ro = new ResizeObserver(() => {\n      resize();\n      start();\n    });\n    ro.observe(stage);\n    const io = new IntersectionObserver(([e]) => {\n      visible = e.isIntersecting && !document.hidden;\n      start();\n    });\n    io.observe(stage);\n    const vis = () => {\n      visible = !document.hidden;\n      start();\n    };\n    document.addEventListener(\"visibilitychange\", vis);\n    const move = (e: PointerEvent) => {\n      const r = stage.getBoundingClientRect();\n      px = clamp(((e.clientX - r.left) / r.width) * 2 - 1, -1, 1);\n      py = clamp(((e.clientY - r.top) / r.height) * 2 - 1, -1, 1);\n    };\n    const leave = () => {\n      px = 0;\n      py = 0;\n    };\n    const click = (e: MouseEvent) => {\n      const r = stage.getBoundingClientRect();\n      const L = layout();\n      const fw = norm(sub(L.ta, L.ro));\n      const rt = norm(cross(fw, [0, 1, 0]));\n      const up = cross(rt, fw);\n      let best = -1,\n        bd = 1e9;\n      SLOTS.forEach((s, i) => {\n        if (i === activeRef.current) return;\n        const d = sub([s.x, s.y, 0], L.ro);\n        const z = dot(d, fw);\n        const sx = r.width / 2 + (dot(d, rt) / (z * FOV)) * (r.height / 2);\n        const sy = r.height / 2 - (dot(d, up) / (z * FOV)) * (r.height / 2);\n        const dd = Math.hypot(sx - (e.clientX - r.left), sy - (e.clientY - r.top));\n        if (dd < bd) {\n          bd = dd;\n          best = i;\n        }\n      });\n      if (best >= 0 && bd < r.height * 0.22) go(best);\n    };\n    stage.addEventListener(\"pointermove\", move);\n    stage.addEventListener(\"pointerleave\", leave);\n    stage.addEventListener(\"click\", click);\n    resize();\n    start();\n\n    return () => {\n      cancelAnimationFrame(raf);\n      ro.disconnect();\n      io.disconnect();\n      document.removeEventListener(\"visibilitychange\", vis);\n      stage.removeEventListener(\"pointermove\", move);\n      stage.removeEventListener(\"pointerleave\", leave);\n      stage.removeEventListener(\"click\", click);\n      kick.current = () => {};\n      gl.deleteTexture(atlasTex);\n      gl.deleteTexture(fbTex);\n      gl.deleteFramebuffer(fb);\n      gl.deleteBuffer(buf);\n      gl.deleteProgram(scene);\n      gl.deleteProgram(post);\n    };\n  }, [reduce, go]);\n\n  const card = cards[active];\n  const onKey = (e: React.KeyboardEvent) => {\n    if (e.key === \"ArrowRight\") {\n      e.preventDefault();\n      go(active + 1);\n    } else if (e.key === \"ArrowLeft\") {\n      e.preventDefault();\n      go(active - 1);\n    }\n  };\n\n  return (\n    <section\n      ref={wrapRef}\n      aria-roledescription=\"carousel\"\n      aria-label=\"Example quotes on letterpress cards\"\n      onKeyDown={onKey}\n      onPointerEnter={() => setPaused(true)}\n      onPointerLeave={() => setPaused(false)}\n      onFocus={() => setPaused(true)}\n      onBlur={() => setPaused(false)}\n      className=\"relative w-full overflow-hidden bg-[#a8987f] text-[#2a2119]\"\n    >\n      <style>{`\n        @keyframes lpq-in { from { opacity: 0; transform: translateY(14px); filter: blur(6px); } to { opacity: 1; transform: none; filter: blur(0); } }\n        .lpq-in { animation: lpq-in 900ms cubic-bezier(.2,.8,.2,1) 420ms both; }\n        @media (prefers-reduced-motion: reduce) { .lpq-in { animation: none; } }\n      `}</style>\n      <div className=\"relative flex flex-col sm:block sm:h-[720px]\">\n        <div ref={stageRef} className=\"relative order-1 h-[440px] w-full cursor-pointer sm:absolute sm:inset-0 sm:h-full\" aria-hidden=\"true\">\n          {glOk ? (\n            <canvas ref={canvasRef} className=\"absolute inset-0 h-full w-full\" />\n          ) : (\n            <StillBoard active={active} />\n          )}\n        </div>\n\n        <div className=\"relative order-2 bg-[#b9a88d] px-5 pb-10 pt-8 sm:absolute sm:inset-y-0 sm:left-0 sm:flex sm:w-[46%] sm:flex-col sm:justify-center sm:bg-transparent sm:pl-[6%] sm:pr-0 sm:pt-0\">\n          <h2 className=\"font-['Inter_Tight','Inter',ui-sans-serif,system-ui] text-[13px] font-semibold uppercase tracking-[0.22em] text-[#3a2e22]\">\n            {HEADING}\n            <span className=\"ml-3 font-medium normal-case tracking-[0.04em] text-[#4a3c2e]\">{KICKER}</span>\n          </h2>\n          <div aria-live=\"polite\" className=\"mt-6 sm:mt-8\">\n            <figure key={active} className=\"lpq-in\">\n              <blockquote className=\"font-['Iowan_Old_Style','Palatino_Linotype',Palatino,'Book_Antiqua',Georgia,serif] text-[31px] leading-[1.12] tracking-[-0.012em] text-[#231b14] sm:text-[44px] lg:text-[52px]\">\n                <span aria-hidden=\"true\" className=\"mr-1\" style={{ color: card.ink }}>\n                  &ldquo;\n                </span>\n                {card.quote}&rdquo;\n              </blockquote>\n              <figcaption className=\"mt-7 flex items-center gap-3 font-['Inter_Tight','Inter',ui-sans-serif,system-ui]\">\n                <span aria-hidden=\"true\" className=\"h-[3px] w-8 rounded-full\" style={{ background: card.ink }} />\n                <span className=\"text-[17px] font-semibold tracking-[-0.01em] text-[#231b14]\">{card.name}</span>\n                <span className=\"text-[15px] text-[#3f3226]\">\n                  {card.trade}, {card.place}\n                </span>\n              </figcaption>\n            </figure>\n          </div>\n          <div className=\"mt-9 flex flex-wrap items-center gap-2 font-['Inter_Tight','Inter',ui-sans-serif,system-ui]\">\n            <button\n              type=\"button\"\n              onClick={() => go(active - 1)}\n              aria-label=\"Previous card\"\n              className=\"grid h-11 w-11 place-items-center rounded-full border border-[#2a2119]/30 bg-[#efe6d6]/70 text-[#2a2119] transition hover:bg-[#f6efe3] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2a2119]\"\n            >\n              <svg width=\"18\" height=\"18\" viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n                <path d=\"M12.5 4.5 7 10l5.5 5.5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n              </svg>\n            </button>\n            <button\n              type=\"button\"\n              onClick={() => go(active + 1)}\n              aria-label=\"Next card\"\n              className=\"grid h-11 w-11 place-items-center rounded-full border border-[#2a2119]/30 bg-[#efe6d6]/70 text-[#2a2119] transition hover:bg-[#f6efe3] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2a2119]\"\n            >\n              <svg width=\"18\" height=\"18\" viewBox=\"0 0 20 20\" aria-hidden=\"true\">\n                <path d=\"M7.5 4.5 13 10l-5.5 5.5\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n              </svg>\n            </button>\n            <ul className=\"ml-1 flex flex-wrap gap-1.5\" aria-label=\"Choose a card\">\n              {cards.map((c, i) => (\n                <li key={c.name}>\n                  <button\n                    type=\"button\"\n                    onClick={() => go(i)}\n                    aria-pressed={i === active}\n                    aria-label={`Card ${i + 1}: ${c.name}`}\n                    className={`flex h-11 items-center gap-2 rounded-full px-3 text-[13px] font-medium transition focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#2a2119] ${\n                      i === active ? \"bg-[#2a2119] text-[#f4ecdf]\" : \"text-[#2a2119] hover:bg-[#efe6d6]/60\"\n                    }`}\n                  >\n                    <span aria-hidden=\"true\" className=\"h-2.5 w-2.5 rounded-[2px]\" style={{ background: c.edge }} />\n                    {c.name.split(\" \")[0]}\n                  </button>\n                </li>\n              ))}\n            </ul>\n          </div>\n        </div>\n      </div>\n    </section>\n  );\n}\n\n/** Flat composition shown when WebGL is not available. */\nfunction StillBoard({ active }: { active: number }) {\n  return (\n    <div\n      className=\"absolute inset-0\"\n      style={{\n        backgroundColor: \"#a8987f\",\n        backgroundImage:\n          \"radial-gradient(120% 90% at 22% 18%, rgba(255,226,180,0.55), rgba(255,226,180,0) 60%), repeating-linear-gradient(0deg, rgba(60,45,30,0.07) 0 1px, transparent 1px 3px), repeating-linear-gradient(90deg, rgba(60,45,30,0.06) 0 1px, transparent 1px 3px)\",\n      }}\n    >\n      <div className=\"absolute inset-y-0 right-[4%] grid w-[52%] grid-cols-2 place-items-center gap-6 p-8 max-sm:inset-x-0 max-sm:w-full\">\n        {cards.map((c, i) => (\n          <div\n            key={c.name}\n            className=\"relative aspect-[5/7] w-[min(170px,38vw)] bg-[#efe8da] p-3 shadow-[0_1px_0_rgba(0,0,0,0.15),6px_10px_18px_rgba(40,25,10,0.28)]\"\n            style={{ borderRight: `3px solid ${c.edge}`, borderBottom: `3px solid ${c.edge}`, opacity: i === active ? 1 : 0.88, transform: `rotate(${SLOTS[i].tilt * 57}deg)` }}\n          >\n            <span className=\"absolute left-1/2 top-2 h-4 w-4 -translate-x-1/2 rounded-full bg-[radial-gradient(circle_at_35%_30%,#fff3c8,#c9962e_45%,#6d4a12)] shadow-[2px_3px_3px_rgba(0,0,0,0.35)]\" />\n            <div className=\"mt-6 text-center font-serif text-[64px] font-bold leading-none\" style={{ color: c.edge, textShadow: \"0 1px 0 rgba(255,255,255,0.7), 0 -1px 0 rgba(0,0,0,0.25)\" }}>\n              {c.name[0]}\n            </div>\n            <div className=\"mt-4 border-t border-[#2a2119]/40 pt-2 font-serif text-[13px] text-[#231b14]\">{c.name}</div>\n          </div>\n        ))}\n      </div>\n    </div>\n  );\n}\n"}]}
