Refactor global styles and layout components for improved responsiveness and performance. Added viewport settings, adjusted overflow handling, and removed legacy animations for mobile optimization. Enhanced image handling and ensured consistent minimum width across various components.
This commit is contained in:
1 parent
fdb2023353
commit
b6ff82fad9
22 files changed
+207
-265
No files matched your search
+46
-74
@@ -121,78 +121,49 @@
|
||||
* {
|
||||
@apply border-border outline-ring/50;
|
||||
}
|
||||
html {
|
||||
@apply font-sans scroll-smooth;
|
||||
scroll-padding-top: 6rem;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
text-size-adjust: 100%;
|
||||
}
|
||||
body {
|
||||
@apply bg-background text-foreground antialiased;
|
||||
font-size: 16px;
|
||||
line-height: 1.65;
|
||||
text-align: start;
|
||||
}
|
||||
html {
|
||||
@apply font-sans scroll-smooth;
|
||||
scroll-padding-top: 6rem;
|
||||
html,
|
||||
body {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
overflow-x: clip;
|
||||
}
|
||||
/* Flex/grid children must be allowed to shrink below intrinsic content width */
|
||||
#__next,
|
||||
main,
|
||||
[data-slot="page-shell"] {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
}
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
img {
|
||||
img,
|
||||
video,
|
||||
canvas,
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* Metamorphism dots + lines — soft presence, not noise */
|
||||
@keyframes metamorph-line-pulse {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 0.35;
|
||||
}
|
||||
50% {
|
||||
opacity: 0.85;
|
||||
video,
|
||||
iframe {
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes metamorph-dot-breathe {
|
||||
0%,
|
||||
100% {
|
||||
opacity: 0.55;
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
transform: scale(1.35);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes metamorph-field-drift {
|
||||
0%,
|
||||
100% {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
50% {
|
||||
transform: translate3d(1.2%, -0.8%, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes metamorph-dash-flow {
|
||||
from { stroke-dashoffset: 24; }
|
||||
to { stroke-dashoffset: 0; }
|
||||
}
|
||||
|
||||
@keyframes section-reveal {
|
||||
from { opacity: 0; transform: translateY(2rem); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.metamorph-field__mesh {
|
||||
animation: metamorph-field-drift 18s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.metamorph-field__line {
|
||||
stroke-dasharray: 4 8;
|
||||
animation:
|
||||
metamorph-line-pulse 7s ease-in-out infinite,
|
||||
metamorph-dash-flow 8s linear infinite;
|
||||
}
|
||||
/* Metamorph field: static on purpose (animations removed for mobile perf).
|
||||
Legacy keyframes kept only so reduced-motion rules stay harmless. */
|
||||
|
||||
.page-hero::after,
|
||||
.home-hero::after {
|
||||
@@ -249,15 +220,23 @@
|
||||
radial-gradient(circle at 90% 80%, color-mix(in oklab, var(--accent) 10%, transparent), transparent 25%);
|
||||
}
|
||||
|
||||
@supports (animation-timeline: view()) {
|
||||
.motion-section {
|
||||
animation: section-reveal both cubic-bezier(0.22, 1, 0.36, 1);
|
||||
animation-timeline: view();
|
||||
animation-range: entry 5% cover 28%;
|
||||
/* Scroll-driven reveals: desktop only — expensive while scrolling on phones */
|
||||
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
|
||||
@supports (animation-timeline: view()) {
|
||||
@keyframes section-reveal {
|
||||
from { opacity: 0; transform: translateY(1.25rem); }
|
||||
to { opacity: 1; transform: translateY(0); }
|
||||
}
|
||||
|
||||
.motion-section {
|
||||
animation: section-reveal both cubic-bezier(0.22, 1, 0.36, 1);
|
||||
animation-timeline: view();
|
||||
animation-range: entry 8% cover 22%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
|
||||
[data-slot="card"] img {
|
||||
transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
|
||||
}
|
||||
@@ -266,10 +245,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.metamorph-field__dot {
|
||||
transform-box: fill-box;
|
||||
transform-origin: center;
|
||||
animation: metamorph-dot-breathe 6s ease-in-out infinite;
|
||||
@media (max-width: 767px) {
|
||||
.motion-section[data-tone="muted"],
|
||||
.motion-section[data-tone="dark"] {
|
||||
background-image: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
@@ -283,14 +263,6 @@
|
||||
animation-iteration-count: 1 !important;
|
||||
transition-duration: 0.01ms !important;
|
||||
}
|
||||
.metamorph-field__mesh,
|
||||
.metamorph-field__line,
|
||||
.metamorph-field__dot {
|
||||
animation: none !important;
|
||||
}
|
||||
.metamorph-field animate {
|
||||
display: none;
|
||||
}
|
||||
.motion-section {
|
||||
animation: none !important;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user