|
204 | 204 | } |
205 | 205 |
|
206 | 206 | .hero-content { |
207 | | - align-items: flex-start; |
| 207 | + min-height: clamp(36rem, 135vw, 42rem); |
| 208 | + align-items: center; |
208 | 209 | padding-top: 3.5rem; |
209 | | - padding-bottom: 0; |
| 210 | + padding-bottom: 3.5rem; |
210 | 211 | } |
211 | 212 |
|
212 | 213 | .hero-copy { |
213 | 214 | position: relative; |
214 | 215 | z-index: 2; |
| 216 | + width: min(100%, 36rem); |
| 217 | + min-width: 0; |
215 | 218 | } |
216 | 219 |
|
217 | 220 | .hero-science-field { |
218 | | - position: relative; |
| 221 | + /* |
| 222 | + * Keep the visual and copy in one layered composition at every width. |
| 223 | + * The generated 1600px asset has 126px of transparent padding on its |
| 224 | + * right edge, so clip that measured 7.875% tail and compensate for it. |
| 225 | + */ |
| 226 | + --hero-source-right-trim: 7.875%; |
| 227 | + --hero-copy-gap: max(0px, calc(100vw - 38rem)); |
| 228 | + --hero-overlap-end: calc(92.125% - var(--hero-copy-gap)); |
| 229 | + --hero-fade-start: max(0px, calc(var(--hero-overlap-end) - 12rem)); |
| 230 | + position: absolute; |
| 231 | + top: 50%; |
| 232 | + right: 1rem; |
219 | 233 | z-index: 1; |
220 | | - width: min(118vw, 34rem); |
221 | | - margin-top: 1rem; |
222 | | - margin-right: -8vw; |
223 | | - margin-bottom: -2.5rem; |
224 | | - margin-left: auto; |
| 234 | + width: clamp(34rem, 150vw, 46rem); |
| 235 | + margin: 0; |
| 236 | + clip-path: inset(0 var(--hero-source-right-trim) 0 0); |
225 | 237 | pointer-events: none; |
226 | | - opacity: 0.78; |
227 | | - transform: translateX(-4vw); |
| 238 | + opacity: 0.88; |
| 239 | + transform: translate(var(--hero-source-right-trim), -50%); |
| 240 | + -webkit-mask-image: linear-gradient( |
| 241 | + 90deg, |
| 242 | + rgb(0 0 0 / 0.28) 0, |
| 243 | + rgb(0 0 0 / 0.28) var(--hero-fade-start), |
| 244 | + #000 var(--hero-overlap-end), |
| 245 | + #000 100% |
| 246 | + ); |
| 247 | + mask-image: linear-gradient( |
| 248 | + 90deg, |
| 249 | + rgb(0 0 0 / 0.28) 0, |
| 250 | + rgb(0 0 0 / 0.28) var(--hero-fade-start), |
| 251 | + #000 var(--hero-overlap-end), |
| 252 | + #000 100% |
| 253 | + ); |
228 | 254 | } |
229 | 255 |
|
230 | 256 | .dark .hero-science-field { |
231 | | - opacity: 0.72; |
| 257 | + opacity: 0.82; |
232 | 258 | } |
233 | 259 |
|
234 | 260 | .hero-science-art { |
|
308 | 334 |
|
309 | 335 | @media (min-width: 480px) { |
310 | 336 | .hero-science-field { |
311 | | - width: min(108vw, 40rem); |
312 | | - margin-top: 1.5rem; |
313 | | - margin-right: -7vw; |
| 337 | + width: clamp(40rem, 150vw, 46rem); |
314 | 338 | } |
315 | 339 | } |
316 | 340 |
|
317 | 341 | @media (min-width: 640px) { |
318 | 342 | .hero-content { |
| 343 | + min-height: 42rem; |
319 | 344 | padding-top: 4rem; |
| 345 | + padding-bottom: 4rem; |
320 | 346 | } |
321 | 347 |
|
322 | 348 | .hero-science-field { |
323 | | - width: min(100vw, 46rem); |
324 | | - margin-top: 2rem; |
325 | | - margin-right: -6vw; |
| 349 | + --hero-copy-gap: max(0px, calc(100vw - 39rem)); |
| 350 | + right: 1.5rem; |
| 351 | + width: clamp(46rem, 110vw, 56rem); |
326 | 352 | } |
327 | 353 | } |
328 | 354 |
|
|
335 | 361 | } |
336 | 362 |
|
337 | 363 | .hero-science-field { |
338 | | - position: absolute; |
339 | | - top: 50%; |
340 | | - /* |
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. |
344 | | - */ |
345 | | - --hero-source-right-trim: 7.875%; |
346 | 364 | /* |
347 | 365 | * 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. |
| 366 | + * from 56rem to 64rem instead of shrinking with 60vw, preserving the |
| 367 | + * protein-and-type overlap through narrow desktop aspect ratios. |
351 | 368 | */ |
| 369 | + --hero-copy-gap: min(32rem, calc(100vw - 40rem)); |
352 | 370 | right: max(2rem, calc(50vw - 34rem)); |
353 | | - width: min(60vw, clamp(54rem, calc(72rem - 10vw), 64rem)); |
354 | | - margin: 0; |
355 | | - clip-path: inset(0 var(--hero-source-right-trim) 0 0); |
| 371 | + width: clamp(56rem, 70vw, 64rem); |
356 | 372 | opacity: 0.9; |
357 | | - transform: translate(var(--hero-source-right-trim), -50%); |
358 | 373 | } |
359 | 374 |
|
360 | 375 | .dark .hero-science-field { |
361 | 376 | opacity: 0.84; |
362 | 377 | } |
363 | 378 | } |
364 | 379 |
|
365 | | -@media (min-width: 1280px) { |
366 | | - .hero-science-field { |
367 | | - /* |
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. |
371 | | - */ |
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 | | - ); |
388 | | - } |
389 | | -} |
390 | | - |
391 | 380 | @keyframes hero-science-drift { |
392 | 381 | 0%, |
393 | 382 | 100% { |
|
0 commit comments