Spaces:
Sleeping
Sleeping
File size: 7,079 Bytes
a7b8df9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
/* Curved Section Styles */
.curved-section {
position: relative;
overflow: hidden;
z-index: 1;
}
/* Ensure smooth transitions between curved sections */
.curved-section::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
backdrop-filter: inherit;
background: inherit;
}
/* Top curved section (Hero) - Enhanced curves */
.curved-section--top {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 120px), 85% calc(100% - 60px), 70% calc(100% - 20px), 50% 100%, 30% calc(100% - 20px), 15% calc(100% - 60px), 0 calc(100% - 120px));
margin-bottom: -120px;
}
/* Middle curved sections - Enhanced curves */
.curved-section--middle {
clip-path: polygon(0 120px, 15% 60px, 30% 20px, 50% 0, 70% 20px, 85% 60px, 100% 120px, 100% calc(100% - 120px), 85% calc(100% - 60px), 70% calc(100% - 20px), 50% 100%, 30% calc(100% - 20px), 15% calc(100% - 60px), 0 calc(100% - 120px));
margin-top: -60px;
margin-bottom: -60px;
padding-top: 90px;
padding-bottom: 90px;
}
/* Bottom curved section (Footer) - Enhanced curves */
.curved-section--bottom {
clip-path: polygon(0 120px, 15% 60px, 30% 20px, 50% 0, 70% 20px, 85% 60px, 100% 120px, 100% 100%, 0 100%);
margin-top: -60px;
padding-top: 90px;
}
/* Glass effect enhancements for curved sections - Remove backgrounds */
.curved-section--glass {
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
/* Ensure content doesn't get clipped */
.curved-section__content {
position: relative;
z-index: 2;
padding: 1rem;
}
@media (min-width: 640px) {
.curved-section__content {
padding: 1.5rem;
}
}
@media (min-width: 1024px) {
.curved-section__content {
padding: 2rem;
}
}
/* Mobile adjustments (up to 640px) - Enhanced curves */
@media (max-width: 640px) {
.curved-section--top {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 60px), 80% calc(100% - 30px), 60% calc(100% - 10px), 50% 100%, 40% calc(100% - 10px), 20% calc(100% - 30px), 0 calc(100% - 60px));
margin-bottom: -60px;
}
.curved-section--middle {
clip-path: polygon(0 60px, 20% 30px, 40% 10px, 50% 0, 60% 10px, 80% 30px, 100% 60px, 100% calc(100% - 60px), 80% calc(100% - 30px), 60% calc(100% - 10px), 50% 100%, 40% calc(100% - 10px), 20% calc(100% - 30px), 0 calc(100% - 60px));
margin-top: -60px;
margin-bottom: -60px;
padding-top: 100px;
padding-bottom: 100px;
}
.curved-section--bottom {
clip-path: polygon(0 60px, 20% 30px, 40% 10px, 50% 0, 60% 10px, 80% 30px, 100% 60px, 100% 100%, 0 100%);
margin-top: -60px;
padding-top: 100px;
}
.curved-section__content {
padding: 0.75rem;
}
}
/* Tablet adjustments (641px to 768px) - Enhanced curves */
@media (min-width: 641px) and (max-width: 768px) {
.curved-section--top {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 80px), 82% calc(100% - 40px), 65% calc(100% - 15px), 50% 100%, 35% calc(100% - 15px), 18% calc(100% - 40px), 0 calc(100% - 80px));
margin-bottom: -80px;
}
.curved-section--middle {
clip-path: polygon(0 80px, 18% 40px, 35% 15px, 50% 0, 65% 15px, 82% 40px, 100% 80px, 100% calc(100% - 80px), 82% calc(100% - 40px), 65% calc(100% - 15px), 50% 100%, 35% calc(100% - 15px), 18% calc(100% - 40px), 0 calc(100% - 80px));
margin-top: -80px;
margin-bottom: -80px;
padding-top: 130px;
padding-bottom: 130px;
}
.curved-section--bottom {
clip-path: polygon(0 80px, 18% 40px, 35% 15px, 50% 0, 65% 15px, 82% 40px, 100% 80px, 100% 100%, 0 100%);
margin-top: -80px;
padding-top: 130px;
}
.curved-section__content {
padding: 1rem;
}
}
/* Large tablet adjustments (769px to 1024px) - Enhanced curves */
@media (min-width: 769px) and (max-width: 1024px) {
.curved-section--top {
clip-path: polygon(0 0, 100% 0, 100% calc(100% - 100px), 83% calc(100% - 50px), 67% calc(100% - 18px), 50% 100%, 33% calc(100% - 18px), 17% calc(100% - 50px), 0 calc(100% - 100px));
margin-bottom: -100px;
}
.curved-section--middle {
clip-path: polygon(0 100px, 17% 50px, 33% 18px, 50% 0, 67% 18px, 83% 50px, 100% 100px, 100% calc(100% - 100px), 83% calc(100% - 50px), 67% calc(100% - 18px), 50% 100%, 33% calc(100% - 18px), 17% calc(100% - 50px), 0 calc(100% - 100px));
margin-top: -100px;
margin-bottom: -100px;
padding-top: 150px;
padding-bottom: 150px;
}
.curved-section--bottom {
clip-path: polygon(0 100px, 17% 50px, 33% 18px, 50% 0, 67% 18px, 83% 50px, 100% 100px, 100% 100%, 0 100%);
margin-top: -100px;
padding-top: 150px;
}
}
/* Desktop and larger (1025px+) - already defined above with enhanced curves */
@media (min-width: 1280px) {
.curved-section__content {
padding: 2.5rem;
}
}
@media (min-width: 1536px) {
.curved-section__content {
padding: 3rem;
}
}
/* Smooth scroll behavior with anti-flickering */
.curved-section {
scroll-margin-top: 100px;
will-change: transform;
backface-visibility: hidden;
transform: translateZ(0);
-webkit-transform: translateZ(0);
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Anti-flickering optimization for curved sections in scroll stack */
.scroll-stack-card .curved-section {
transition: transform 0.3s ease-out, opacity 0.3s ease-out;
will-change: transform, opacity;
contain: layout style paint;
transform: translateZ(0);
-webkit-transform: translateZ(0);
}
/* Enhanced glass morphism for stacked sections - Transparent backgrounds */
.scroll-stack-card .curved-section--glass {
background: transparent;
backdrop-filter: blur(8px) saturate(120%);
-webkit-backdrop-filter: blur(8px) saturate(120%);
border: 1px solid rgba(255, 255, 255, 0.05);
will-change: transform, opacity;
}
/* Hover effects for interactive sections (desktop only) */
@media (min-width: 1025px) {
.curved-section:hover {
transform: translateY(-2px);
box-shadow:
0 16px 48px rgba(0, 0, 0, 0.4),
inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
}
/* Improved scroll snap for better mobile experience */
.curved-section {
scroll-snap-align: start;
scroll-margin-top: 80px;
}
@media (max-width: 768px) {
.curved-section {
scroll-margin-top: 60px;
}
}
/* Performance optimizations for mobile */
@media (max-width: 768px) {
.curved-section {
will-change: auto;
}
.curved-section--glass {
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
.scroll-stack-card .curved-section--glass {
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}
}
/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
.curved-section {
transition: none;
}
.curved-section:hover {
transform: none;
}
} |