feat(hero): make the three floating cards open their project

- cards are links to the same project_url as the grid card (new tab, noopener)
- drop aria-hidden from the stack and restore pointer events; add hover/focus/active states
- entrance animation moves to the translate property with fill-mode backwards so the
  staggered offsets/rotation and the hover lift are no longer overridden
- reduced-motion keeps the stagger (translate: none) without killing the layout
This commit is contained in:
Bkk1234 committed 2026-11-20 14:37:43 +07:00
1 parent e87e00896c
commit 0bfbefd930
4 files changed
+48 -12

No files matched your search

+17 -1
View File
@@ -160,7 +160,6 @@
inset-inline-end: var(--space-10);
width: 302px;
transform: translateY(-50%);
pointer-events: none;
}
.hero__deco-card {
display: flex;
@@ -174,8 +173,25 @@
font-size: 14px;
font-weight: 500;
color: var(--brand-900);
text-decoration: none;
cursor: pointer;
transform: translateX(calc(var(--i) * 14px)) rotate(calc((var(--i) - 1) * -0.8deg));
opacity: 0.97;
transition:
border-color 180ms var(--ease),
box-shadow 180ms var(--ease),
translate 180ms var(--ease);
}
.hero__deco-card:hover,
.hero__deco-card:focus-visible {
border-color: var(--brand-300);
box-shadow: var(--shadow-lg);
opacity: 1;
translate: 0 -3px;
text-decoration: none;
}
.hero__deco-card:active {
translate: 0 -1px;
}
.hero__deco-card:nth-child(2) {
border-color: var(--brand-300);