|
335 | 335 | width: 100vw; |
336 | 336 | height: 100vh; |
337 | 337 | pointer-events: none; |
338 | | - background: transparent; |
| 338 | + background: #111; /* Changed from transparent - acts as fallback */ |
339 | 339 | } |
340 | 340 | .crumple:after { |
341 | 341 | content: ""; |
|
347 | 347 | height: 100%; |
348 | 348 | background-color: #111; |
349 | 349 | z-index: 1; |
| 350 | + clip-path: polygon(0 100%, 0 100%, 0 100%, 0 100%, 0 100%, 0 100%); /* Start hidden for reversed animations */ |
350 | 351 | } |
351 | 352 |
|
352 | 353 | .crumple:before { |
|
472 | 473 |
|
473 | 474 | @media (hover: hover) { |
474 | 475 | .footer:hover ~ .crumple { |
475 | | - z-index: 0; |
| 476 | + z-index: 2; |
476 | 477 | } |
477 | 478 |
|
478 | 479 | /* Use body-level selectors to target crumple */ |
479 | 480 | body:has(.footer > a:nth-child(odd):hover) .crumple { |
480 | | - background: #020121; |
481 | | - /* background: -webkit-linear-gradient(45deg, #020121, #210120); */ |
482 | | - /* background: linear-gradient(45deg, #020121, #210120); */ |
483 | | - background-size: 400% 400%; |
484 | | - z-index: 0; |
| 481 | + background: transparent; |
| 482 | + z-index: 2; |
| 483 | + } |
| 484 | + |
| 485 | + body:has(.footer > a:nth-child(odd):hover) .crumple:after { |
| 486 | + background-color: #020121; |
485 | 487 | } |
486 | 488 |
|
487 | 489 | body:has(.footer > a:nth-child(2n):hover) .crumple { |
488 | | - background: #012118; |
489 | | - background: -webkit-linear-gradient(45deg, #012118, #012118); |
490 | | - background: linear-gradient(45deg, #012118, #012118); |
491 | | - background-size: 400% 400%; |
492 | | - z-index: 0; |
| 490 | + background: transparent; |
| 491 | + z-index: 2; |
| 492 | + } |
| 493 | + |
| 494 | + body:has(.footer > a:nth-child(2n):hover) .crumple:after { |
| 495 | + background-color: #012118; |
493 | 496 | } |
494 | 497 |
|
495 | 498 | body:has(.footer > a:nth-child(3n):hover) .crumple { |
496 | | - background: #210120; |
497 | | - background: -webkit-linear-gradient(45deg, #210120, #210120); |
498 | | - background: linear-gradient(45deg, #210120, #210120); |
499 | | - background-size: 400% 400%; |
500 | | - z-index: 0; |
| 499 | + background: transparent; |
| 500 | + z-index: 2; |
501 | 501 | } |
502 | 502 |
|
503 | | - body:has(.footer > a:hover) .crumple { |
504 | | - -webkit-animation: gradient 30s ease infinite; |
505 | | - animation: gradient 30s ease infinite; |
| 503 | + body:has(.footer > a:nth-child(3n):hover) .crumple:after { |
| 504 | + background-color: #210120; |
506 | 505 | } |
507 | | - |
| 506 | + |
508 | 507 | body:has(.footer__link--writings:hover) .crumple { |
509 | | - background: #020121; |
510 | | - /* background: -webkit-linear-gradient(45deg, #020121, #210120); */ |
511 | | - /* background: linear-gradient(45deg, #020121, #210120); */ |
512 | | - background-size: 400% 400%; |
513 | | - z-index: 0; |
| 508 | + background: transparent; |
| 509 | + z-index: 2; |
514 | 510 | } |
515 | | - |
| 511 | + |
516 | 512 | body:has(.footer__link--writings:hover) .crumple:after { |
517 | | - -webkit-animation: e 1s .25s linear forwards; |
518 | | - animation: e 1s .25s linear forwards |
| 513 | + background-color: #020121; |
| 514 | + -webkit-animation: e 1s 0s linear reverse forwards; /* Changed .25s to 0s */ |
| 515 | + animation: e 1s 0s linear reverse forwards; |
519 | 516 | } |
520 | 517 |
|
521 | 518 | body:has(.footer__link--github:hover) .crumple:after { |
522 | | - -webkit-animation: b 1s .25s linear forwards; |
523 | | - animation: b 1s .25s linear forwards |
| 519 | + background-color: #012118; |
| 520 | + -webkit-animation: b 1s .25s linear reverse forwards; |
| 521 | + animation: b 1s .25s linear reverse forwards; |
524 | 522 | } |
525 | 523 |
|
526 | 524 | body:has(.footer__link--playlists:hover) .crumple:after { |
527 | | - -webkit-animation: c 1s .25s linear forwards; |
528 | | - animation: c 1s .25s linear forwards |
| 525 | + background-color: #210120; |
| 526 | + -webkit-animation: c 1s .25s linear reverse forwards; |
| 527 | + animation: c 1s .25s linear reverse forwards; |
529 | 528 | } |
530 | 529 |
|
531 | 530 | body:has(.footer__link--instagram:hover) .crumple:after { |
532 | | - -webkit-animation: f 1s .25s linear forwards; |
533 | | - animation: f 1s .25s linear forwards |
| 531 | + background-color: #210120; |
| 532 | + -webkit-animation: f 1s .25s linear reverse forwards; |
| 533 | + animation: f 1s .25s linear reverse forwards; |
534 | 534 | } |
535 | 535 |
|
536 | 536 | body:has(.footer__link--alhambra:hover) .crumple:after { |
537 | | - -webkit-animation: d 1s .25s linear forwards; |
538 | | - animation: d 1s .25s linear forwards |
| 537 | + background-color: #020121; |
| 538 | + -webkit-animation: d 1s .25s linear reverse forwards; |
| 539 | + animation: d 1s .25s linear reverse forwards; |
539 | 540 | } |
540 | 541 | } |
541 | 542 |
|
|
572 | 573 |
|
573 | 574 | /* Crumple Animation */ |
574 | 575 | body:has(.footer__link--home:hover) .crumple:after { |
575 | | - -webkit-animation: a 1s .25s linear forwards; |
576 | | - animation: a 1s .25s linear forwards |
| 576 | + -webkit-animation: a 1s .25s linear reverse forwards; |
| 577 | + animation: a 1s .25s linear reverse forwards |
577 | 578 | } |
578 | 579 |
|
579 | | -/* Mobile Touch/Click Support */ |
580 | 580 | @media (hover: none) and (pointer: coarse) { |
581 | | - /* Mobile devices - trigger on touch/click */ |
582 | 581 | body:has(.footer__link--home:active) .crumple { |
583 | 582 | background: #020121; |
584 | 583 | z-index: 0; |
585 | 584 | } |
586 | 585 |
|
587 | 586 | body:has(.footer__link--home:active) .crumple:after { |
588 | | - -webkit-animation: a 1s .25s linear forwards; |
589 | | - animation: a 1s .25s linear forwards; |
| 587 | + -webkit-animation: a 1s .25s linear reverse forwards; |
| 588 | + animation: a 1s .25s linear reverse forwards; |
590 | 589 | } |
591 | 590 |
|
592 | 591 | body:has(.footer__link--writings:active) .crumple { |
@@ -640,17 +639,15 @@ body:has(.footer__link--home:hover) .crumple:after { |
640 | 639 | } |
641 | 640 | } |
642 | 641 |
|
643 | | -/* Mobile JavaScript Trigger Support */ |
644 | 642 | @media (hover: none) and (pointer: coarse) { |
645 | | - /* Trigger animations via JavaScript-added classes */ |
646 | 643 | body:has(.footer__link--home.mobile-trigger) .crumple { |
647 | 644 | background: #020121; |
648 | 645 | z-index: 0; |
649 | 646 | } |
650 | 647 |
|
651 | 648 | body:has(.footer__link--home.mobile-trigger) .crumple:after { |
652 | | - -webkit-animation: a 1s .25s linear forwards; |
653 | | - animation: a 1s .25s linear forwards; |
| 649 | + -webkit-animation: a 1s .25s linear reverse forwards; |
| 650 | + animation: a 1s .25s linear reverse forwards; |
654 | 651 | } |
655 | 652 |
|
656 | 653 | body:has(.footer__link--writings.mobile-trigger) .crumple { |
|
0 commit comments