From b7074559042270b2123214a65fd62051e279bce0 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sat, 06 Jun 2026 18:31:04 +0800
Subject: [PATCH] Fix hero stack crop: no text bleed, preserve 3-layer depth
---
docs/styles.css | 153 +++++++++++---------------------------------------
1 files changed, 34 insertions(+), 119 deletions(-)
diff --git a/docs/styles.css b/docs/styles.css
index e97747c..a41b525 100644
--- a/docs/styles.css
+++ b/docs/styles.css
@@ -163,128 +163,59 @@
.hero__split {
display: grid;
- grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
- gap: 28px 40px;
+ grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
+ gap: 20px 48px;
align-items: center;
- min-height: calc(100svh - var(--header-h) - 112px);
- min-height: calc(100vh - var(--header-h) - 112px);
+ min-height: calc(100svh - var(--header-h) - 96px);
+ min-height: calc(100vh - var(--header-h) - 96px);
}
.hero__copy {
- padding: 12px 0;
+ padding: 8px 0;
}
.hero__headline {
margin: 0;
- font-size: clamp(1.85rem, 4.2vw, 2.85rem);
- font-weight: 700;
- letter-spacing: -0.035em;
- line-height: 1.12;
- color: #111114;
+ font-size: clamp(2rem, 4.8vw, 3.15rem);
+ font-weight: 800;
+ letter-spacing: -0.04em;
+ line-height: 1.1;
+ color: #000;
}
.hero__lead {
- margin: 22px 0 0;
- font-size: clamp(0.98rem, 1.6vw, 1.12rem);
- line-height: 1.65;
- color: var(--muted);
- max-width: 26em;
+ margin: 28px 0 0;
+ font-size: clamp(1rem, 1.7vw, 1.2rem);
+ line-height: 1.7;
+ color: #1d1d1f;
+ max-width: 22em;
}
.hero__visual {
position: relative;
- min-height: 380px;
+ min-height: 420px;
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
}
-.hero__stack {
+.hero__stack-stage {
position: relative;
width: 100%;
- height: 100%;
- min-height: 380px;
- perspective: 1800px;
- perspective-origin: 42% 38%;
+ max-width: 620px;
+ margin-left: auto;
+ padding: 12px 0 28px;
+ perspective: 1600px;
+ perspective-origin: 35% 45%;
}
-.hero-shot {
- position: absolute;
- margin: 0;
- width: 88%;
- transform-style: preserve-3d;
-}
-
-.hero-shot__chrome {
- display: flex;
- gap: 7px;
- padding: 10px 12px 8px;
- border-radius: 14px 14px 0 0;
- background: linear-gradient(180deg, #f7f8fb 0%, #eceff5 100%);
- border: 1px solid rgba(0, 0, 0, 0.08);
- border-bottom: none;
-}
-
-.hero-shot__chrome span {
- width: 11px;
- height: 11px;
- border-radius: 50%;
- background: #d5d9e2;
- box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
-}
-
-.hero-shot__chrome span:nth-child(1) { background: #ff6b6b; }
-.hero-shot__chrome span:nth-child(2) { background: #ffd166; }
-.hero-shot__chrome span:nth-child(3) { background: #6ee7a8; }
-
-.hero-shot__screen {
- border-radius: 0 0 14px 14px;
- overflow: hidden;
- line-height: 0;
- background: #fff;
- border: 1px solid rgba(0, 0, 0, 0.08);
- border-top: none;
- box-shadow:
- 0 1px 0 rgba(255, 255, 255, 0.9) inset,
- 0 24px 60px rgba(30, 45, 90, 0.14),
- 0 8px 20px rgba(30, 45, 90, 0.08);
-}
-
-.hero-shot__screen img {
+.hero__stack-img {
display: block;
width: 100%;
height: auto;
-}
-
-.hero-shot__reflection {
- margin-top: 8px;
- transform: scaleY(-1);
- opacity: 0.22;
- filter: blur(0.4px);
- mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 68%);
- -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, transparent 68%);
- border-radius: 14px;
- overflow: hidden;
-}
-
-.hero-shot__reflection img {
- display: block;
- width: 100%;
- height: auto;
-}
-
-.hero-shot--back {
- right: -2%;
- top: 2%;
- width: 72%;
- transform: rotateY(-10deg) rotateX(4deg) translateZ(0);
- opacity: 0.92;
- z-index: 1;
-}
-
-.hero-shot--front {
- left: 0;
- bottom: 0;
- width: 92%;
- transform: rotateY(-8deg) rotateX(5deg) translateZ(48px);
- z-index: 2;
+ transform: rotateY(-11deg) rotateX(4deg) translateZ(0);
+ transform-origin: 40% 50%;
+ filter: drop-shadow(0 28px 48px rgba(30, 45, 90, 0.14));
}
/* Main content */
@@ -454,21 +385,13 @@
gap: 32px;
}
- .hero__visual {
- min-height: 320px;
+ .hero__stack-stage {
+ max-width: 100%;
+ margin-left: 0;
}
- .hero__stack {
- min-height: 320px;
- }
-
- .hero-shot--back {
- width: 78%;
- right: -4%;
- }
-
- .hero-shot--front {
- width: 94%;
+ .hero__stack-img {
+ transform: rotateY(-7deg) rotateX(3deg);
}
}
@@ -479,13 +402,5 @@
.hero {
padding: 32px 0 48px;
- }
-
- .hero__stack {
- min-height: 260px;
- }
-
- .hero-shot--back {
- opacity: 0.88;
}
}
\ No newline at end of file
--
Gitblit v1.9.3