|
338 | 338 | position: absolute; |
339 | 339 | top: 50%; |
340 | 340 | /* |
341 | | - * Keep the copy and artwork on one centered 100rem stage. The artwork |
342 | | - * grows through normal desktop widths, then tapers toward 54rem so |
343 | | - * browser zoom-out cannot pull a giant illustration toward the far edge. |
344 | | - * The transparent artwork deliberately sits beneath the foreground copy. |
| 341 | + * The generated 1600px asset has 126px of transparent padding on its |
| 342 | + * right edge. Clip that measured 7.875% tail and compensate by the same |
| 343 | + * amount so the visible genome track aligns with the page content edge. |
345 | 344 | */ |
346 | | - right: max(1.5rem, calc(50vw - 50rem)); |
| 345 | + --hero-source-right-trim: 7.875%; |
| 346 | + /* |
| 347 | + * Anchor the visible artwork to the shared 72rem content stage. It grows |
| 348 | + * through normal desktop widths, then tapers toward 54rem so browser |
| 349 | + * zoom-out cannot pull a giant illustration toward the far edge. The |
| 350 | + * transparent artwork deliberately sits beneath the foreground copy. |
| 351 | + */ |
| 352 | + right: max(2rem, calc(50vw - 34rem)); |
347 | 353 | width: min(60vw, clamp(54rem, calc(72rem - 10vw), 64rem)); |
348 | 354 | margin: 0; |
| 355 | + clip-path: inset(0 var(--hero-source-right-trim) 0 0); |
349 | 356 | opacity: 0.9; |
350 | | - transform: translateY(-50%); |
| 357 | + transform: translate(var(--hero-source-right-trim), -50%); |
351 | 358 | } |
352 | 359 |
|
353 | 360 | .dark .hero-science-field { |
|
358 | 365 | @media (min-width: 1280px) { |
359 | 366 | .hero-science-field { |
360 | 367 | /* |
361 | | - * Let the protein ribbon enter the copy column while keeping the denser |
362 | | - * heatmap and genome track aligned with the centered content stage. |
| 368 | + * The fade ends at the copy's right edge. Its position is derived from |
| 369 | + * the shared 72rem container, 2rem gutters, and the measured source trim, |
| 370 | + * so it follows the overlap instead of relying on viewport-specific stops. |
363 | 371 | */ |
364 | | - right: max(3rem, calc(50vw - 35.25rem)); |
| 372 | + --hero-overlap-end: calc(92.125% - 39.5rem); |
| 373 | + --hero-fade-start: max(0px, calc(var(--hero-overlap-end) - 10rem)); |
| 374 | + -webkit-mask-image: linear-gradient( |
| 375 | + 90deg, |
| 376 | + rgb(0 0 0 / 0.12) 0, |
| 377 | + rgb(0 0 0 / 0.12) var(--hero-fade-start), |
| 378 | + #000 var(--hero-overlap-end), |
| 379 | + #000 100% |
| 380 | + ); |
| 381 | + mask-image: linear-gradient( |
| 382 | + 90deg, |
| 383 | + rgb(0 0 0 / 0.12) 0, |
| 384 | + rgb(0 0 0 / 0.12) var(--hero-fade-start), |
| 385 | + #000 var(--hero-overlap-end), |
| 386 | + #000 100% |
| 387 | + ); |
365 | 388 | } |
366 | 389 | } |
367 | 390 |
|
|
0 commit comments