feat: refine overlay positioning and styles for improved layout on ScrollOverlays component
Some checks are pending
CI/CD / test-and-build (push) Waiting to run
CI/CD / deploy (push) Blocked by required conditions

This commit is contained in:
Najjar\NajjarV02 2026-04-17 15:57:02 +04:00
parent 8216cbe0c0
commit 26770e070c
3 changed files with 19 additions and 13 deletions

View File

@ -415,20 +415,20 @@ html {
.overlay-section-left {
top: auto !important;
bottom: 6vh !important;
bottom: 4vh !important;
align-items: center !important;
}
.overlay-section-right {
top: auto !important;
bottom: 6vh !important;
bottom: 4vh !important;
align-items: center !important;
}
.overlay-panel {
max-width: 100%;
padding: 1.5rem;
border-radius: 1.25rem;
padding: 1.25rem;
border-radius: 1rem;
text-align: center !important;
}
@ -449,14 +449,20 @@ html {
}
.overlay-brand {
top: 8vh !important;
top: 4vh !important;
bottom: auto !important;
left: 50% !important;
transform: translateX(-50%);
width: 90vw;
}
.overlay-brand span {
font-size: 0.6rem !important;
letter-spacing: 0.25em !important;
}
.overlay-brand .overlay-panel,
.overlay-brand span,
.overlay-brand p {
font-size: 0.7rem;
font-size: 0.75rem !important;
}
.overlay-scroll-hint {

View File

@ -62,14 +62,14 @@ function OverlaySection({
? { alignItems: 'flex-start' }
: align === 'right'
? { alignItems: 'flex-end' }
: { left: '50%', alignItems: 'center' };
: { left: '50%', transform: 'translateX(-50%)', alignItems: 'center' };
const alignClass =
align === 'left'
? 'overlay-section-left'
: align === 'right'
? 'overlay-section-right'
: '';
: 'overlay-section-center';
const verticalStyle: React.CSSProperties =
verticalAlign === 'top'

View File

@ -71,9 +71,9 @@ function ScrollCamera() {
const pos = interpolateKeyframes(CAMERA_KEYFRAMES, p);
const lookAt = interpolateKeyframes(LOOKAT_KEYFRAMES, p);
// On mobile, pull camera back and center it more so robot doesn't overlap text
const mobileZOffset = isMobile ? 2.5 : 0;
const mobileCenterX = isMobile ? pos.x * 0.3 : 0;
// On mobile, center the camera more (reduce dramatic side-to-side movement)
const mobileZOffset = isMobile ? 1.0 : 0;
const mobileCenterX = isMobile ? pos.x * 0.6 : 0;
// Dynamic camera oscillation based on scroll position
const oscillationX = Math.sin(p * Math.PI * 4) * 0.05;