fix: gauge overlap, scroll trapping, and fan clipping

- Shrink gauge arc (r 80→65) to clearly separate from color band
- Replace overflow-hidden with overflow-clip on report preview,
  score spectrum, and marquee to prevent scroll trapping
- Remove overflow-x-clip from report fan so side pages aren't clipped

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alejandro Gutiérrez
2026-02-22 20:57:16 +00:00
parent 8be3984d72
commit 82bb0e766e
4 changed files with 14 additions and 14 deletions

View File

@@ -64,7 +64,7 @@ export const HowToRead = () => {
<h3 className="text-foreground mb-3 text-sm font-bold"> <h3 className="text-foreground mb-3 text-sm font-bold">
{t("howToRead.scoreTitle")} {t("howToRead.scoreTitle")}
</h3> </h3>
<div className="mb-1.5 flex h-7 overflow-hidden rounded-md"> <div className="mb-1.5 flex h-7 overflow-clip rounded-md">
{SCORE_BANDS.map((band) => ( {SCORE_BANDS.map((band) => (
<div <div
key={band.range} key={band.range}

View File

@@ -2,7 +2,7 @@ import Image from "next/image";
export const ReportFan = () => { export const ReportFan = () => {
return ( return (
<div className="animate-fade-in relative mx-auto mt-12 -translate-y-4 overflow-x-clip opacity-0 [--animation-delay:800ms] sm:mt-16 md:mt-20"> <div className="animate-fade-in relative mx-auto mt-12 -translate-y-4 opacity-0 [--animation-delay:800ms] sm:mt-16 md:mt-20">
{/* Ambient glow behind the fan */} {/* Ambient glow behind the fan */}
<div className="pointer-events-none absolute inset-0 -bottom-10"> <div className="pointer-events-none absolute inset-0 -bottom-10">
<div className="absolute top-1/2 left-1/2 h-[500px] w-[600px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-blue-500/8 blur-[100px]" /> <div className="absolute top-1/2 left-1/2 h-[500px] w-[600px] -translate-x-1/2 -translate-y-1/2 rounded-full bg-blue-500/8 blur-[100px]" />

View File

@@ -101,26 +101,26 @@ type Tab = (typeof TABS)[number];
function ScoreTab() { function ScoreTab() {
const { t } = useTranslation("marketing"); const { t } = useTranslation("marketing");
const radius = 80; const radius = 65;
const stroke = 12; const stroke = 10;
const cx = 100; const cx = 100;
const cy = 88; const cy = 72;
const circumference = Math.PI * radius; const circumference = Math.PI * radius;
const offset = circumference - (SCORE / 100) * circumference; const offset = circumference - (SCORE / 100) * circumference;
return ( return (
<div className="flex flex-col items-center gap-4 sm:flex-row sm:items-start sm:gap-10"> <div className="flex flex-col items-center gap-4 sm:flex-row sm:items-start sm:gap-10">
{/* Left: Gauge + band */} {/* Left: Gauge + band */}
<div className="flex shrink-0 flex-col items-center gap-5"> <div className="flex shrink-0 flex-col items-center gap-4">
<span className="text-muted-foreground text-xs tracking-wide uppercase"> <span className="text-muted-foreground text-xs tracking-wide uppercase">
{t("reportPreview.demo.businessName")} {t("reportPreview.demo.businessName")}
</span> </span>
<div className="relative" style={{ width: 200, height: 112 }}> <div className="relative" style={{ width: 200, height: 82 }}>
<svg <svg
width="200" width="200"
height="112" height="82"
viewBox="0 0 200 112" viewBox="0 0 200 82"
className="overflow-visible" className="overflow-visible"
> >
<circle <circle
@@ -150,14 +150,14 @@ function ScoreTab() {
className="transition-all duration-1000 ease-out" className="transition-all duration-1000 ease-out"
/> />
</svg> </svg>
<div className="absolute inset-0 flex flex-col items-center justify-end pb-1"> <div className="absolute inset-0 flex flex-col items-center justify-end pb-0">
<span <span
className="text-6xl font-bold tabular-nums" className="text-5xl font-bold tabular-nums"
style={{ color: SCORE_COLOR }} style={{ color: SCORE_COLOR }}
> >
{SCORE} {SCORE}
</span> </span>
<span className="text-muted-foreground text-xs tracking-wide"> <span className="text-muted-foreground text-[10px] tracking-wide">
{t("reportPreview.demo.scoreLabel")} {t("reportPreview.demo.scoreLabel")}
</span> </span>
</div> </div>
@@ -586,7 +586,7 @@ export const ReportPreview = () => {
</div> </div>
{/* Card */} {/* Card */}
<div className="bg-background relative overflow-hidden rounded-2xl border shadow-sm"> <div className="bg-background relative overflow-clip rounded-2xl border shadow-sm">
{/* Tab bar */} {/* Tab bar */}
<div className="flex border-b"> <div className="flex border-b">
{TABS.map((tab) => ( {TABS.map((tab) => (

View File

@@ -46,7 +46,7 @@ export function Marquee({
<div <div
{...props} {...props}
className={cn( className={cn(
"group flex [gap:var(--gap)] overflow-hidden p-2 [--duration:40s] [--gap:1rem]", "group flex [gap:var(--gap)] overflow-clip p-2 [--duration:40s] [--gap:1rem]",
{ {
"flex-row": !vertical, "flex-row": !vertical,
"flex-col": vertical, "flex-col": vertical,