StealThis .dev

Hero CTA Section

A full-width hero section with gradient headline, eyebrow badge, two CTA buttons, and radial glow background. Pure CSS — no JS required.

Open in Lab
csshtml
Targets: TS HTML React

Code

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

:root {
  --bg:       #030712;
  --accent-1: #818cf8;
  --accent-2: #38bdf8;
  --text:     #f1f5f9;
  --muted:    #94a3b8;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ── */
.hero {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

/* ── Background glow ── */
.hero-glow {
  position: absolute;
  top: -15%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 700px;
  background: radial-gradient(
    ellipse at center,
    rgba(99, 102, 241, 0.18) 0%,
    rgba(56, 189, 248, 0.10) 40%,
    transparent 70%
  );
  pointer-events: none;
}

/* ── Content ── */
.hero-content {
  position: relative;
  text-align: center;
  max-width: 700px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-1);
  padding: 0.375rem 1rem;
  border: 1px solid rgba(129, 140, 248, 0.3);
  border-radius: 999px;
  background: rgba(129, 140, 248, 0.08);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f1f5f9 25%, var(--accent-1) 60%, var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 2.5rem;
}

/* ── Buttons ── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.875rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.875rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #6366f1, #38bdf8);
  color: #fff;
  box-shadow: 0 0 28px rgba(99, 102, 241, 0.45);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.6);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--text);
}

A full-viewport hero section that works as the first block of any landing page. Centered layout, gradient text headline, subtitle, and two call-to-action buttons.

What’s included

  • Responsive full-viewport height layout
  • Gradient text headline with background-clip: text
  • Eyebrow badge (pill label above the headline)
  • Two buttons: gradient primary + ghost border
  • Soft radial glow background — no images needed
  • Zero JavaScript