| 1 |
/* |
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
Author : Amedea |
| 6 |
|
| 7 |
Author URI : https://amedeapro.com |
| 8 |
|
| 9 |
Author : Moskva Yigit |
| 10 |
|
| 11 |
Author URI : http://moskvayigit.com |
| 12 |
|
| 13 |
Version : 0.0.4.5 |
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
Table of Contents |
| 18 |
|
| 19 |
- Scroll Focus |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
*/ |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
/*---------------------------- |
| 28 |
|
| 29 |
.-- Scroll Focus |
| 30 |
|
| 31 |
-----------------------------*/ |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
.scroll--focus__sticky-visual { |
| 36 |
|
| 37 |
position: fixed; |
| 38 |
|
| 39 |
top: 0; |
| 40 |
|
| 41 |
right: 0; |
| 42 |
|
| 43 |
width: 50%; |
| 44 |
|
| 45 |
height: 100vh; |
| 46 |
|
| 47 |
display: grid; |
| 48 |
|
| 49 |
place-items: center; |
| 50 |
|
| 51 |
z-index: 10; |
| 52 |
|
| 53 |
pointer-events: none; |
| 54 |
|
| 55 |
border-left: 1px solid rgba(255, 255, 255, 0.05); |
| 56 |
|
| 57 |
} |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
.scroll--focus__shape-container { |
| 62 |
|
| 63 |
position: absolute; |
| 64 |
|
| 65 |
width: 400px; |
| 66 |
|
| 67 |
height: 400px; |
| 68 |
|
| 69 |
display: grid; |
| 70 |
|
| 71 |
place-items: center; |
| 72 |
|
| 73 |
opacity: 0; |
| 74 |
|
| 75 |
animation-name: shape-fade; |
| 76 |
|
| 77 |
animation-fill-mode: both; |
| 78 |
|
| 79 |
animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1); |
| 80 |
|
| 81 |
} |
| 82 |
|
| 83 |
|
| 84 |
|
| 85 |
.scroll--focus__shape-1 { |
| 86 |
|
| 87 |
animation-timeline: --s1; |
| 88 |
|
| 89 |
} |
| 90 |
|
| 91 |
.scroll--focus__shape-2 { |
| 92 |
|
| 93 |
animation-timeline: --s2; |
| 94 |
|
| 95 |
} |
| 96 |
|
| 97 |
.scroll--focus__shape-3 { |
| 98 |
|
| 99 |
animation-timeline: --s3; |
| 100 |
|
| 101 |
} |
| 102 |
|
| 103 |
.scroll--focus__shape-4 { |
| 104 |
|
| 105 |
animation-timeline: --s4; |
| 106 |
|
| 107 |
} |
| 108 |
|
| 109 |
.scroll--focus__shape-5 { |
| 110 |
|
| 111 |
animation-timeline: --s5; |
| 112 |
|
| 113 |
} |
| 114 |
|
| 115 |
.scroll--focus__shape-6 { |
| 116 |
|
| 117 |
animation-timeline: --s6; |
| 118 |
|
| 119 |
} |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
.scroll--focus__content { |
| 124 |
|
| 125 |
width: 50%; |
| 126 |
|
| 127 |
padding-bottom: 20vh; |
| 128 |
|
| 129 |
position: relative; |
| 130 |
|
| 131 |
z-index: 20; |
| 132 |
|
| 133 |
} |
| 134 |
|
| 135 |
|
| 136 |
|
| 137 |
.scroll--focus__header { |
| 138 |
|
| 139 |
height: 90vh; |
| 140 |
|
| 141 |
display: flex; |
| 142 |
|
| 143 |
align-items: center; |
| 144 |
|
| 145 |
padding-left: 10vw; |
| 146 |
|
| 147 |
} |
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
.scroll--focus__scroll-section { |
| 152 |
|
| 153 |
height: 100vh; |
| 154 |
|
| 155 |
display: flex; |
| 156 |
|
| 157 |
flex-direction: column; |
| 158 |
|
| 159 |
justify-content: center; |
| 160 |
|
| 161 |
padding-left: 10vw; |
| 162 |
|
| 163 |
padding-right: 2rem; |
| 164 |
|
| 165 |
view-timeline-axis: block; |
| 166 |
|
| 167 |
view-timeline-inset: 40% 40%; |
| 168 |
|
| 169 |
} |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
.scroll--focus__s1 { |
| 174 |
|
| 175 |
view-timeline-name: --s1; |
| 176 |
|
| 177 |
} |
| 178 |
|
| 179 |
|
| 180 |
|
| 181 |
.scroll--focus__s2 { |
| 182 |
|
| 183 |
view-timeline-name: --s2; |
| 184 |
|
| 185 |
} |
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
.scroll--focus__s3 { |
| 190 |
|
| 191 |
view-timeline-name: --s3; |
| 192 |
|
| 193 |
} |
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
.scroll--focus__s4 { |
| 198 |
|
| 199 |
view-timeline-name: --s4; |
| 200 |
|
| 201 |
} |
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
.scroll--focus__s5 { |
| 206 |
|
| 207 |
view-timeline-name: --s5; |
| 208 |
|
| 209 |
} |
| 210 |
|
| 211 |
|
| 212 |
|
| 213 |
.scroll--focus__s6 { |
| 214 |
|
| 215 |
view-timeline-name: --s6; |
| 216 |
|
| 217 |
} |
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
.scroll--focus__closing-section { |
| 222 |
|
| 223 |
height: 60vh; |
| 224 |
|
| 225 |
display: flex; |
| 226 |
|
| 227 |
align-items: center; |
| 228 |
|
| 229 |
padding-left: 10vw; |
| 230 |
|
| 231 |
border-top: 1px solid rgba(255, 255, 255, 0.1); |
| 232 |
|
| 233 |
margin-top: 10vh; |
| 234 |
|
| 235 |
} |
| 236 |
|
| 237 |
|
| 238 |
|
| 239 |
.scroll--focus__container h1 { |
| 240 |
|
| 241 |
font-size: 1.5rem; |
| 242 |
|
| 243 |
letter-spacing: 0.2em; |
| 244 |
|
| 245 |
text-transform: uppercase; |
| 246 |
|
| 247 |
font-weight: 300; |
| 248 |
|
| 249 |
margin: 0; |
| 250 |
|
| 251 |
color: var(--accent); |
| 252 |
|
| 253 |
opacity: 0.8; |
| 254 |
|
| 255 |
} |
| 256 |
|
| 257 |
|
| 258 |
|
| 259 |
.scroll--focus__title-large { |
| 260 |
|
| 261 |
display: block; |
| 262 |
|
| 263 |
font-size: 5rem; |
| 264 |
|
| 265 |
font-weight: 800; |
| 266 |
|
| 267 |
letter-spacing: -0.02em; |
| 268 |
|
| 269 |
color: var(--text-light); |
| 270 |
|
| 271 |
margin-top: 1rem; |
| 272 |
|
| 273 |
line-height: 1; |
| 274 |
|
| 275 |
} |
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
.scroll--focus__focus-text { |
| 280 |
|
| 281 |
font-size: 3.5rem; |
| 282 |
|
| 283 |
font-weight: 600; |
| 284 |
|
| 285 |
line-height: 1.1; |
| 286 |
|
| 287 |
color: var(--text-muted); |
| 288 |
|
| 289 |
margin: 0; |
| 290 |
|
| 291 |
max-width: 500px; |
| 292 |
|
| 293 |
letter-spacing: -0.02em; |
| 294 |
|
| 295 |
animation: content-focus linear both; |
| 296 |
|
| 297 |
animation-timeline: view(); |
| 298 |
|
| 299 |
animation-range: cover 0% cover 100%; |
| 300 |
|
| 301 |
} |
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
.scroll--focus__description { |
| 306 |
|
| 307 |
font-size: 1.1rem; |
| 308 |
|
| 309 |
color: #666; |
| 310 |
|
| 311 |
margin-top: 1.5rem; |
| 312 |
|
| 313 |
max-width: 420px; |
| 314 |
|
| 315 |
line-height: 1.7; |
| 316 |
|
| 317 |
font-weight: 300; |
| 318 |
|
| 319 |
border-left: 2px solid var(--accent); |
| 320 |
|
| 321 |
padding-left: 1.5rem; |
| 322 |
|
| 323 |
animation: content-focus linear both; |
| 324 |
|
| 325 |
animation-timeline: view(); |
| 326 |
|
| 327 |
animation-range: cover 0% cover 100%; |
| 328 |
|
| 329 |
} |
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
.scroll--focus__closer { |
| 334 |
|
| 335 |
font-size: 1.2rem; |
| 336 |
|
| 337 |
font-weight: 300; |
| 338 |
|
| 339 |
color: var(--text-muted); |
| 340 |
|
| 341 |
} |
| 342 |
|
| 343 |
|
| 344 |
|
| 345 |
.scroll--focus__closer strong { |
| 346 |
|
| 347 |
display: block; |
| 348 |
|
| 349 |
font-size: 2rem; |
| 350 |
|
| 351 |
color: var(--text-light); |
| 352 |
|
| 353 |
margin-bottom: 1rem; |
| 354 |
|
| 355 |
} |
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
.scroll--focus__desktop-progress { |
| 360 |
|
| 361 |
position: absolute; |
| 362 |
|
| 363 |
left: -1px; |
| 364 |
|
| 365 |
top: 0; |
| 366 |
|
| 367 |
width: 3px; |
| 368 |
|
| 369 |
height: 100%; |
| 370 |
|
| 371 |
background: var(--accent); |
| 372 |
|
| 373 |
transform-origin: top; |
| 374 |
|
| 375 |
transform: scaleY(0); |
| 376 |
|
| 377 |
animation: progress-grow linear; |
| 378 |
|
| 379 |
animation-timeline: scroll(); |
| 380 |
|
| 381 |
z-index: 20; |
| 382 |
|
| 383 |
} |
| 384 |
|
| 385 |
|
| 386 |
|
| 387 |
.scroll--focus__mobile-progress { |
| 388 |
|
| 389 |
display: none; |
| 390 |
|
| 391 |
position: fixed; |
| 392 |
|
| 393 |
bottom: 30px; |
| 394 |
|
| 395 |
right: 30px; |
| 396 |
|
| 397 |
width: 60px; |
| 398 |
|
| 399 |
height: 60px; |
| 400 |
|
| 401 |
z-index: 100; |
| 402 |
|
| 403 |
background: rgba(0, 0, 0, 0.8); |
| 404 |
|
| 405 |
border-radius: 50%; |
| 406 |
|
| 407 |
padding: 5px; |
| 408 |
|
| 409 |
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); |
| 410 |
|
| 411 |
backdrop-filter: blur(10px); |
| 412 |
|
| 413 |
} |
| 414 |
|
| 415 |
|
| 416 |
|
| 417 |
.scroll--focus__mobile-progress svg { |
| 418 |
|
| 419 |
width: 100%; |
| 420 |
|
| 421 |
height: 100%; |
| 422 |
|
| 423 |
transform: rotate(-90deg); |
| 424 |
|
| 425 |
} |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
.scroll--focus__progress-circle { |
| 430 |
|
| 431 |
fill: none; |
| 432 |
|
| 433 |
stroke: var(--accent); |
| 434 |
|
| 435 |
stroke-width: 8; |
| 436 |
|
| 437 |
stroke-linecap: round; |
| 438 |
|
| 439 |
stroke-dasharray: 1; |
| 440 |
|
| 441 |
stroke-dashoffset: 1; |
| 442 |
|
| 443 |
animation: circle-grow linear; |
| 444 |
|
| 445 |
animation-timeline: scroll(); |
| 446 |
|
| 447 |
} |
| 448 |
|
| 449 |
|
| 450 |
|
| 451 |
.scroll--focus__track-circle { |
| 452 |
|
| 453 |
fill: none; |
| 454 |
|
| 455 |
stroke: rgba(255, 255, 255, 0.1); |
| 456 |
|
| 457 |
stroke-width: 8; |
| 458 |
|
| 459 |
} |
| 460 |
|
| 461 |
|
| 462 |
|
| 463 |
@keyframes shape-fade { |
| 464 |
|
| 465 |
entry 0% { |
| 466 |
|
| 467 |
opacity: 0; |
| 468 |
|
| 469 |
transform: translateY(40px) scale(0.9); |
| 470 |
|
| 471 |
} |
| 472 |
|
| 473 |
entry 100% { |
| 474 |
|
| 475 |
opacity: 1; |
| 476 |
|
| 477 |
transform: translateY(0) scale(1); |
| 478 |
|
| 479 |
} |
| 480 |
|
| 481 |
exit 0% { |
| 482 |
|
| 483 |
opacity: 1; |
| 484 |
|
| 485 |
transform: translateY(0) scale(1); |
| 486 |
|
| 487 |
} |
| 488 |
|
| 489 |
exit 100% { |
| 490 |
|
| 491 |
opacity: 0; |
| 492 |
|
| 493 |
transform: translateY(-40px) scale(1.1); |
| 494 |
|
| 495 |
} |
| 496 |
|
| 497 |
} |
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
@keyframes content-focus { |
| 502 |
|
| 503 |
0% { |
| 504 |
|
| 505 |
filter: blur(12px); |
| 506 |
|
| 507 |
opacity: 0; |
| 508 |
|
| 509 |
transform: scale(0.8) translateY(40px); |
| 510 |
|
| 511 |
border-color: transparent; |
| 512 |
|
| 513 |
} |
| 514 |
|
| 515 |
45%, |
| 516 |
|
| 517 |
55% { |
| 518 |
|
| 519 |
filter: blur(0); |
| 520 |
|
| 521 |
opacity: 1; |
| 522 |
|
| 523 |
transform: scale(1) translateY(0); |
| 524 |
|
| 525 |
color: var(--text-light); |
| 526 |
|
| 527 |
border-color: var(--accent); |
| 528 |
|
| 529 |
} |
| 530 |
|
| 531 |
100% { |
| 532 |
|
| 533 |
filter: blur(12px); |
| 534 |
|
| 535 |
opacity: 0; |
| 536 |
|
| 537 |
transform: scale(0.95) translateY(-40px); |
| 538 |
|
| 539 |
border-color: transparent; |
| 540 |
|
| 541 |
} |
| 542 |
|
| 543 |
} |
| 544 |
|
| 545 |
|
| 546 |
|
| 547 |
@keyframes progress-grow { |
| 548 |
|
| 549 |
to { |
| 550 |
|
| 551 |
transform: scaleY(1); |
| 552 |
|
| 553 |
} |
| 554 |
|
| 555 |
} |
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
@keyframes circle-grow { |
| 560 |
|
| 561 |
to { |
| 562 |
|
| 563 |
stroke-dashoffset: 0; |
| 564 |
|
| 565 |
} |
| 566 |
|
| 567 |
} |
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
|
| 573 |
@media (max-width: 768px) { |
| 574 |
|
| 575 |
|
| 576 |
|
| 577 |
.scroll--focus__sticky-visual { |
| 578 |
|
| 579 |
opacity: 0.1; |
| 580 |
|
| 581 |
width: 100%; |
| 582 |
|
| 583 |
z-index: -1; |
| 584 |
|
| 585 |
border-left: none; |
| 586 |
|
| 587 |
} |
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
.scroll--focus__content { |
| 592 |
|
| 593 |
width: 100%; |
| 594 |
|
| 595 |
} |
| 596 |
|
| 597 |
.scroll--focus__scroll-section { |
| 598 |
|
| 599 |
padding-left: 1.5rem; |
| 600 |
|
| 601 |
padding-right: 1.5rem; |
| 602 |
|
| 603 |
} |
| 604 |
|
| 605 |
.scroll--focus__header { |
| 606 |
|
| 607 |
padding-left: 1.5rem; |
| 608 |
|
| 609 |
} |
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
.scroll--focus__focus-text { |
| 614 |
|
| 615 |
font-size: 2rem; |
| 616 |
|
| 617 |
} |
| 618 |
|
| 619 |
.scroll--focus__title-large { |
| 620 |
|
| 621 |
font-size: 3.5rem; |
| 622 |
|
| 623 |
} |
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
.scroll--focus__desktop-progress { |
| 628 |
|
| 629 |
display: none; |
| 630 |
|
| 631 |
} |
| 632 |
|
| 633 |
.scroll--focus__mobile-progress { |
| 634 |
|
| 635 |
display: block; |
| 636 |
|
| 637 |
} |
| 638 |
|
| 639 |
|
| 640 |
|
| 641 |
} |
| 642 |
|
| 643 |
|