StealThis .dev

Smooth Scroll Story

Parallax sections with Lenis smooth scrolling and GSAP ScrollTrigger choreography.

Open in Lab
gsaplenisscrolltrigger
Targets: JS HTML

Code

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #070a12;
  --text: #f0f4fb;
  --muted: #8a95a8;
  --accent: #86e8ff;
  --neon-purple: #ae52ff;
  --neon-pink: #ff40d6;
  --warm: #ffcc66;
}

html {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', 'SF Pro Display', system-ui, sans-serif;
}

body {
  overflow-x: hidden;
}

/* ── Sections ── */
.section {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Layers for parallax ── */
.layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.layer-fg {
  position: relative;
  z-index: 3;
}

.layer-mid { z-index: 2; }
.layer-bg { z-index: 1; }

/* ── Content ── */
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 1rem;
  opacity: 0;
}

.hero-title, .reveal-text {
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  opacity: 0;
}

.hero-title {
  background: linear-gradient(135deg, #fff 0%, var(--accent) 60%, var(--neon-purple) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.reveal-text {
  color: var(--text);
}

.hero-sub, .reveal-body {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--muted);
  max-width: 440px;
  margin-top: 1.2rem;
  line-height: 1.6;
  opacity: 0;
}

/* ── Scroll hint ── */
.scroll-hint {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0;
}

.scroll-arrow {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: arrow-pulse 1.8s ease-in-out infinite;
}

@keyframes arrow-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

.reduced-motion .scroll-arrow { animation: none; opacity: 0.5; }

/* ── Gradient orbs ── */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  will-change: transform;
}

.orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(134, 232, 255, 0.2), transparent 70%);
  top: 10%; right: 10%;
}

.orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(174, 82, 255, 0.15), transparent 70%);
  bottom: 20%; left: 5%;
}

.orb-3 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(255, 64, 214, 0.12), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.orb-4 {
  width: 450px; height: 450px;
  background: radial-gradient(circle, rgba(174, 82, 255, 0.18), transparent 70%);
  top: 20%; left: 20%;
}

.orb-5 {
  width: 350px; height: 350px;
  background: radial-gradient(circle, rgba(255, 204, 102, 0.12), transparent 70%);
  bottom: 30%; right: 15%;
}

.orb-6 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(134, 232, 255, 0.15), transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

/* ── Floating rings ── */
.floating-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(134, 232, 255, 0.15);
  will-change: transform;
}

.ring-1 {
  width: 300px; height: 300px;
  top: 20%; left: 15%;
}

.ring-2 {
  width: 200px; height: 200px;
  bottom: 25%; right: 20%;
  border-color: rgba(174, 82, 255, 0.15);
}

/* ── Depth grid ── */
.depth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(134, 232, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(134, 232, 255, 0.04) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* ── Depth cards ── */
.depth-card {
  position: absolute;
  width: 180px;
  height: 100px;
  border-radius: 12px;
  background: rgba(18, 26, 43, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(134, 232, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  will-change: transform;
}

.card-inner {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.card-1 { top: 25%; left: 10%; }
.card-2 { top: 40%; right: 8%; }
.card-3 { bottom: 20%; left: 30%; }

/* ── Back button ── */
.btn-back {
  display: inline-block;
  margin-top: 2.5rem;
  padding: 0.7rem 2rem;
  border-radius: 999px;
  border: 1px solid rgba(134, 232, 255, 0.3);
  color: var(--accent);
  text-decoration: none;
  font: 600 0.85rem/1 'Inter', system-ui, sans-serif;
  transition: all 0.25s ease;
  opacity: 0;
}

.btn-back:hover {
  background: rgba(134, 232, 255, 0.08);
  border-color: var(--accent);
}

/* ── Reduced motion ── */
.reduced-motion .layer-bg,
.reduced-motion .layer-mid {
  transform: none !important;
}

.reduced-motion .eyebrow,
.reduced-motion .hero-title,
.reduced-motion .reveal-text,
.reduced-motion .hero-sub,
.reduced-motion .reveal-body,
.reduced-motion .scroll-hint,
.reduced-motion .depth-card,
.reduced-motion .btn-back {
  opacity: 1 !important;
  transform: none !important;
}

@media (max-width: 640px) {
  .depth-card { width: 140px; height: 80px; }
  .card-inner { font-size: 0.75rem; }
  .gradient-orb { transform: scale(0.6); }
}

Smooth Scroll Story

Parallax sections with Lenis smooth scrolling and GSAP ScrollTrigger choreography.

Source

  • Repository: libs-genclaude
  • Original demo id: 01-scroll-story

Notes

Parallax sections with Lenis smooth scrolling and GSAP ScrollTrigger choreography.