|
43 | 43 | } |
44 | 44 |
|
45 | 45 |
|
| 46 | +/* ----------------------------------------------------------------------- */ |
| 47 | +/* CSS scroll/load reveal — replaces the old GSAP + ScrollTrigger setup. */ |
| 48 | +/* An IntersectionObserver in Hero.tsx toggles `.is-visible`; everything */ |
| 49 | +/* below is GPU-friendly opacity/transform transitions. */ |
| 50 | +/* ----------------------------------------------------------------------- */ |
| 51 | +.hero-content, |
| 52 | +.hero-image, |
| 53 | +.how-it-works-item, |
| 54 | +.feature-right, |
| 55 | +.feature-left, |
| 56 | +.hero-button, |
| 57 | +.footer-bottom { |
| 58 | + opacity: 0; |
| 59 | +} |
| 60 | + |
| 61 | +.hero-content, |
| 62 | +.hero-image, |
| 63 | +.about-content, |
| 64 | +.how-it-works-item, |
| 65 | +.feature-right, |
| 66 | +.feature-left, |
| 67 | +.hero-button, |
| 68 | +.footer-bottom { |
| 69 | + transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), |
| 70 | + transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94); |
| 71 | + will-change: opacity, transform; |
| 72 | + backface-visibility: hidden; |
| 73 | + -webkit-backface-visibility: hidden; |
| 74 | +} |
| 75 | + |
| 76 | +.hero-content { transform: translate3d(0, 60px, 0); } |
| 77 | +.hero-image { transform: translate3d(0, 80px, 0); } |
| 78 | +/* About text slid up but stayed visible in the original — keep that. */ |
| 79 | +.about-content { transform: translate3d(0, 50px, 0); } |
| 80 | +.how-it-works-item { transform: translate3d(0, 60px, 0); } |
| 81 | +.feature-right, |
| 82 | +.feature-left { transform: translate3d(60px, 0, 0); } |
| 83 | +.hero-button { transform: translate3d(0, 30px, 0); } |
| 84 | +.footer-bottom { transform: translate3d(0, 20px, 0); } |
| 85 | + |
| 86 | +/* Springy easing on the discover button, echoing the old back.out feel. */ |
| 87 | +.hero-button { transition-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); } |
| 88 | + |
| 89 | +.hero-content.is-visible, |
| 90 | +.hero-image.is-visible, |
| 91 | +.about-content.is-visible, |
| 92 | +.how-it-works-item.is-visible, |
| 93 | +.feature-right.is-visible, |
| 94 | +.feature-left.is-visible, |
| 95 | +.hero-button.is-visible, |
| 96 | +.footer-bottom.is-visible { |
| 97 | + opacity: 1; |
| 98 | + transform: none; |
| 99 | +} |
| 100 | + |
| 101 | +@media (prefers-reduced-motion: reduce) { |
| 102 | + .hero-content, |
| 103 | + .hero-image, |
| 104 | + .about-content, |
| 105 | + .how-it-works-item, |
| 106 | + .feature-right, |
| 107 | + .feature-left, |
| 108 | + .hero-button, |
| 109 | + .footer-bottom { |
| 110 | + opacity: 1 !important; |
| 111 | + transform: none !important; |
| 112 | + transition: none !important; |
| 113 | + } |
| 114 | +} |
| 115 | + |
46 | 116 | .content-section { |
47 | 117 | background-color: #ffffff; |
48 | 118 | padding: 10rem 2rem; |
|
0 commit comments