feat: build responsive Three.js river journey

This commit is contained in:
2026-09-05 17:22:12 +08:00
parent 637da07c9e
commit f6228f8507
5 changed files with 420 additions and 215 deletions

View File

@@ -2,171 +2,217 @@
position: relative;
width: 100%;
height: 1050px;
/* Seamless continuation of scenic artwork */
overflow: hidden;
background: var(--bg-page);
}
.journeySection::after {
content: '';
position: absolute;
inset: 0;
z-index: 1;
pointer-events: none;
background:
linear-gradient(to bottom, var(--bg-page), transparent 10%, transparent 90%, var(--bg-page)),
radial-gradient(ellipse at center, transparent 48%, var(--bg-page) 100%);
opacity: 0.62;
}
.introBlock {
position: absolute;
left: 60px;
top: 170px;
width: 380px;
z-index: 5;
top: 112px;
left: var(--layout-page-gutter);
z-index: 3;
width: min(390px, calc(100% - (2 * var(--layout-page-gutter))));
padding: var(--space-4);
border-radius: var(--radius-md);
background: var(--overlay-contact);
backdrop-filter: blur(8px);
}
.eyebrow {
display: block;
margin-bottom: var(--space-2);
color: var(--text-secondary);
font-size: var(--font-size-label-small);
font-weight: 700;
line-height: var(--line-height-label-small);
letter-spacing: var(--letter-spacing-eyebrow);
text-transform: uppercase;
font-weight: 700;
color: var(--text-secondary);
margin-bottom: 8px;
}
.heading {
font-size: var(--font-size-h2);
line-height: var(--line-height-h2);
font-weight: 700;
margin-bottom: var(--space-3);
color: var(--text-primary);
margin-bottom: 12px;
font-size: var(--font-size-h2);
font-weight: 700;
line-height: var(--line-height-h2);
}
.underlineBar {
width: 120px;
height: 3px;
background-color: var(--accent-default);
margin-bottom: var(--space-5);
border-radius: var(--radius-pill);
margin-bottom: 24px;
background: var(--accent-default);
}
.description {
font-size: var(--font-size-body-large);
line-height: var(--line-height-body-large);
color: var(--text-secondary);
font-size: var(--font-size-body-large);
font-weight: 400;
line-height: var(--line-height-body-large);
}
/* Step Typography */
.stepsList {
position: absolute;
inset: 0;
z-index: 3;
list-style: none;
}
.stepCard {
position: absolute;
display: flex;
width: 250px;
gap: var(--space-3);
padding: var(--space-4);
border: 1px solid var(--border-default);
border-radius: var(--radius-md);
background: var(--overlay-contact);
box-shadow: 0 8px 24px var(--shadow-color);
backdrop-filter: blur(8px);
transition:
border-color var(--motion-duration-fast) ease,
transform var(--motion-duration-default) var(--motion-ease-out);
}
.step05 { top: 116px; right: 46px; }
.step04 { top: 334px; right: 250px; }
.step03 { top: 500px; left: 48%; }
.step02 { top: 690px; left: 25%; }
.step01 { top: 826px; left: 70px; }
.stepNumber {
font-size: 20px;
font-weight: 700;
flex: 0 0 auto;
color: var(--accent-default);
margin-bottom: 4px;
font-size: 20px;
font-weight: 800;
line-height: 28px;
}
.stepTitle {
font-size: var(--font-size-h3);
line-height: var(--line-height-h3);
font-weight: 700;
margin-bottom: var(--space-1);
color: var(--text-primary);
margin-bottom: 6px;
font-size: var(--font-size-h3);
font-weight: 700;
line-height: var(--line-height-h3);
}
.stepDesc {
color: var(--text-secondary);
font-size: var(--font-size-body-small);
line-height: var(--line-height-body-small);
color: var(--text-secondary);
}
.islandImage {
object-fit: contain;
filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.08));
transition: transform 0.3s ease;
@media (max-width: 1024px) {
.introBlock {
top: 80px;
}
.stepCard {
width: 230px;
}
.step05 { top: 90px; right: 32px; }
.step04 { top: 300px; right: 10%; }
.step03 { top: 490px; left: 48%; }
.step02 { top: 690px; left: 24%; }
.step01 { top: 850px; left: 32px; }
}
.islandImage:hover {
transform: translateY(-4px) scale(1.02);
@media (max-width: 760px) {
.journeySection {
height: auto;
min-height: 1120px;
padding: var(--layout-section-padding) var(--layout-page-gutter);
}
.journeySection::after {
background: linear-gradient(to bottom, transparent 0 28%, var(--bg-page) 54%);
opacity: 0.82;
}
.introBlock {
position: relative;
top: auto;
left: auto;
width: 100%;
padding: 0;
background: transparent;
backdrop-filter: none;
}
.heading {
font-size: 28px;
line-height: 38px;
}
.description {
font-size: var(--font-size-body-default);
line-height: var(--line-height-body-default);
}
.stepsList {
position: relative;
inset: auto;
display: flex;
flex-direction: column;
gap: var(--space-3);
margin-top: 300px;
padding-left: 20px;
}
.stepsList::before {
content: '';
position: absolute;
top: 20px;
bottom: 20px;
left: 5px;
width: 1px;
background: var(--border-strong);
}
.stepCard,
.step05,
.step04,
.step03,
.step02,
.step01 {
position: relative;
inset: auto;
width: 100%;
padding: var(--space-3) var(--space-4);
box-shadow: none;
backdrop-filter: blur(6px);
}
.stepCard::before {
content: '';
position: absolute;
top: 22px;
left: -20px;
width: 9px;
height: 9px;
border: 3px solid var(--bg-page);
border-radius: 50%;
background: var(--accent-default);
}
}
/* Freely Positioned Milestones */
/* Step 05: Product Engineer */
.step05Graphic {
position: absolute;
left: 1030px;
top: 100px;
width: 180px;
height: 240px;
z-index: 6;
}
.step05Text {
position: absolute;
left: 1220px;
top: 150px;
width: 190px;
z-index: 6;
}
/* Step 04: Software Engineer */
.step04Text {
position: absolute;
left: 650px;
top: 230px;
width: 200px;
z-index: 6;
}
.step04Graphic {
position: absolute;
left: 810px;
top: 200px;
width: 250px;
height: 220px;
z-index: 6;
}
/* Step 03: Computer Science */
.step03Text {
position: absolute;
left: 590px;
top: 425px;
width: 200px;
z-index: 6;
}
.step03Graphic {
position: absolute;
left: 750px;
top: 390px;
width: 240px;
height: 220px;
z-index: 6;
}
/* Step 02: UI/UX Designer */
.step02Text {
position: absolute;
left: 490px;
top: 570px;
width: 180px;
z-index: 6;
}
.step02Graphic {
position: absolute;
left: 620px;
top: 550px;
width: 210px;
height: 200px;
z-index: 6;
}
/* Step 01: Digital Artist */
.step01Text {
position: absolute;
left: 80px;
top: 650px;
width: 210px;
z-index: 6;
}
.step01Graphic {
position: absolute;
left: 260px;
top: 610px;
width: 230px;
height: 200px;
z-index: 6;
@media (hover: hover) and (pointer: fine) {
.stepCard:hover {
border-color: var(--accent-default);
transform: translateY(-2px);
}
}