Streaming — Music Streaming Landing
A vibrant, dark-first marketing landing for a fictional music-streaming service. A gradient hero pairs an animated album wall with a live equalizer and play/pause control, backed by feature cards for offline downloads, Hi-Fi lossless, smart playlists and podcasts. A horizontally scrolling artist spotlight, a monthly/yearly pricing switch across Individual, Family and Student plans, app-store CTAs with an animated phone mock, and scroll-reveal motion round out the page. Built with vanilla HTML, CSS and JavaScript.
MCP
Code
:root {
--bg: #08060d;
--surface: #15121d;
--surface-2: #1e1a2b;
--ink: #f6f4fb;
--ink-2: #c4c0d4;
--muted: #8a86a0;
--line: rgba(255, 255, 255, 0.1);
--line-2: rgba(255, 255, 255, 0.18);
--v: #8b5cf6; /* violet */
--p: #ec4899; /* pink */
--o: #fb923c; /* orange */
--grad: linear-gradient(105deg, var(--v) 0%, var(--p) 52%, var(--o) 100%);
--grad-soft: linear-gradient(105deg, rgba(139,92,246,.18), rgba(236,72,153,.16), rgba(251,146,60,.16));
--r-sm: 8px;
--r-md: 12px;
--r-lg: 18px;
--r-xl: 26px;
--shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.75);
--glow: 0 10px 40px -8px rgba(236, 72, 153, 0.5);
--maxw: 1160px;
font-synthesis: none;
}
* { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
background: var(--bg);
color: var(--ink);
font-family: "Inter", system-ui, -apple-system, sans-serif;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
overflow-x: hidden;
}
/* ambient background glow */
body::before {
content: "";
position: fixed;
inset: -20%;
z-index: -1;
background:
radial-gradient(40% 50% at 12% 0%, rgba(139, 92, 246, 0.22), transparent 60%),
radial-gradient(45% 50% at 88% 8%, rgba(251, 146, 60, 0.16), transparent 60%),
radial-gradient(50% 55% at 50% 110%, rgba(236, 72, 153, 0.18), transparent 65%);
pointer-events: none;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: "Sora", "Inter", sans-serif; letter-spacing: -0.02em; line-height: 1.1; }
img { max-width: 100%; display: block; }
.sr-only {
position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
position: absolute; left: 12px; top: -50px; z-index: 200;
background: var(--surface-2); color: var(--ink); padding: 10px 16px;
border-radius: var(--r-sm); transition: top .2s;
}
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--p); outline-offset: 3px; border-radius: 4px; }
.grad-text {
background: var(--grad);
-webkit-background-clip: text;
background-clip: text;
color: transparent;
}
/* ---------- Buttons ---------- */
.btn {
font: inherit; font-weight: 600; cursor: pointer; border: 0;
border-radius: 999px; padding: 11px 20px; color: var(--ink);
display: inline-flex; align-items: center; justify-content: center; gap: 8px;
transition: transform .15s ease, box-shadow .2s ease, background .2s, border-color .2s;
white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-grad { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -8px rgba(236, 72, 153, 0.65); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
.btn-outline { background: transparent; border: 1px solid var(--line-2); color: var(--ink); }
.btn-outline:hover { border-color: var(--p); background: var(--grad-soft); }
.btn-block { width: 100%; }
.pill {
display: inline-flex; align-items: center; gap: 8px;
font-size: 13px; font-weight: 600; color: var(--ink-2);
background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line);
padding: 6px 14px; border-radius: 999px;
}
.pill-dot {
width: 8px; height: 8px; border-radius: 50%; background: var(--o);
box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.22);
animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(251, 146, 60, 0); } }
.eyebrow {
display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .12em;
text-transform: uppercase;
background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* ---------- Nav ---------- */
.nav {
position: sticky; top: 0; z-index: 100;
transition: background .3s, border-color .3s, backdrop-filter .3s;
border-bottom: 1px solid transparent;
}
.nav.scrolled {
background: rgba(8, 6, 13, 0.82);
backdrop-filter: blur(14px) saturate(1.4);
border-bottom-color: var(--line);
}
.nav-inner {
max-width: var(--maxw); margin: 0 auto; padding: 16px 22px;
display: flex; align-items: center; gap: 22px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-name { font-family: "Sora", sans-serif; font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.brand-mark {
display: inline-flex; align-items: flex-end; gap: 3px; height: 22px;
padding: 4px 5px; border-radius: 7px; background: var(--grad);
}
.brand-mark span {
width: 3px; background: #fff; border-radius: 2px;
animation: bar 1.1s ease-in-out infinite;
}
.brand-mark span:nth-child(1) { height: 7px; animation-delay: 0s; }
.brand-mark span:nth-child(2) { height: 13px; animation-delay: .2s; }
.brand-mark span:nth-child(3) { height: 9px; animation-delay: .4s; }
.brand-mark span:nth-child(4) { height: 14px; animation-delay: .15s; }
@keyframes bar { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1); } }
.nav-links { display: flex; gap: 26px; margin-left: 8px; }
.nav-links a { color: var(--ink-2); font-weight: 500; font-size: 15px; position: relative; }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
background: var(--grad); transition: width .2s;
}
.nav-links a:hover::after { width: 100%; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-burger {
display: none; flex-direction: column; gap: 4px; background: none; border: 0;
cursor: pointer; padding: 8px;
}
.nav-burger span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-nav {
display: flex; flex-direction: column; gap: 4px; padding: 8px 22px 20px;
border-top: 1px solid var(--line); background: rgba(8, 6, 13, 0.96);
backdrop-filter: blur(14px);
}
.mobile-nav a { padding: 12px 6px; color: var(--ink-2); font-weight: 500; border-bottom: 1px solid var(--line); }
.mobile-nav a:hover { color: var(--ink); }
.mobile-nav .btn { margin-top: 12px; }
/* ---------- Hero ---------- */
.hero {
position: relative; overflow: hidden;
max-width: var(--maxw); margin: 0 auto; padding: 60px 22px 70px;
display: grid; gap: 40px;
}
.hero-glow {
position: absolute; inset: 0; z-index: 0; pointer-events: none;
background: radial-gradient(60% 60% at 30% 30%, rgba(139, 92, 246, 0.2), transparent 70%);
}
.album-wall {
display: grid; gap: 10px; grid-template-columns: repeat(6, 1fr);
position: relative; z-index: 1; opacity: .9;
-webkit-mask-image: radial-gradient(120% 80% at 50% 40%, #000 50%, transparent 92%);
mask-image: radial-gradient(120% 80% at 50% 40%, #000 50%, transparent 92%);
}
.album-wall .tile {
aspect-ratio: 1; border-radius: var(--r-md); position: relative; overflow: hidden;
border: 1px solid var(--line); transform: translateY(0);
transition: transform .35s ease, box-shadow .35s ease;
}
.album-wall .tile:hover { transform: translateY(-6px) scale(1.04); box-shadow: var(--shadow); z-index: 2; }
.album-wall .tile::after {
content: ""; position: absolute; inset: 0;
background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.45));
}
.album-wall .tag {
position: absolute; left: 8px; bottom: 7px; z-index: 2;
font-size: 11px; font-weight: 600; color: #fff; opacity: .92;
}
.hero-content { position: relative; z-index: 3; max-width: 640px; }
.hero-title { font-size: clamp(2.6rem, 7vw, 4.6rem); font-weight: 800; margin: 18px 0 16px; }
.hero-sub { font-size: clamp(1rem, 2.4vw, 1.18rem); color: var(--ink-2); max-width: 50ch; }
.hero-cta { display: flex; gap: 10px; margin: 26px 0 8px; max-width: 460px; }
.hero-cta input {
flex: 1; min-width: 0; font: inherit; padding: 13px 16px; color: var(--ink);
background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px;
transition: border-color .2s, box-shadow .2s;
}
.hero-cta input::placeholder { color: var(--muted); }
.hero-cta input:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.18); }
.hero-cta input.invalid { border-color: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18); }
.hero-note { font-size: 13px; color: var(--muted); }
.hero-now {
margin-top: 28px; display: inline-flex; align-items: center; gap: 16px;
background: var(--grad-soft); border: 1px solid var(--line);
padding: 12px 16px; border-radius: var(--r-lg); backdrop-filter: blur(6px);
}
.now-meta { display: flex; flex-direction: column; line-height: 1.25; }
.now-meta strong { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--o); }
.now-meta span { font-size: 14px; color: var(--ink); font-weight: 500; }
.now-toggle {
margin-left: 4px; width: 38px; height: 38px; flex: none; border-radius: 50%;
border: 0; cursor: pointer; background: var(--grad); color: #fff;
display: grid; place-items: center; box-shadow: var(--glow);
}
.now-toggle svg { fill: currentColor; }
/* equalizer */
.eq { display: flex; align-items: flex-end; gap: 3px; height: 32px; }
.eq span {
width: 4px; border-radius: 3px; background: var(--grad);
height: 30%; animation: eq 0.9s ease-in-out infinite;
}
.eq span:nth-child(1) { animation-delay: -.1s; }
.eq span:nth-child(2) { animation-delay: -.5s; }
.eq span:nth-child(3) { animation-delay: -.2s; }
.eq span:nth-child(4) { animation-delay: -.7s; }
.eq span:nth-child(5) { animation-delay: -.3s; }
.eq span:nth-child(6) { animation-delay: -.6s; }
.eq span:nth-child(7) { animation-delay: -.15s; }
.eq span:nth-child(8) { animation-delay: -.45s; }
.eq span:nth-child(9) { animation-delay: -.25s; }
.eq.paused span { animation-play-state: paused; }
@keyframes eq { 0%, 100% { height: 22%; } 50% { height: 100%; } }
/* ---------- Trust strip ---------- */
.strip {
max-width: var(--maxw); margin: 0 auto; padding: 8px 22px 12px;
display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
.strip-item {
text-align: center; padding: 18px 10px; border-radius: var(--r-md);
background: var(--surface); border: 1px solid var(--line);
}
.strip-item strong {
display: block; font-family: "Sora", sans-serif; font-size: clamp(1.4rem, 3vw, 1.9rem);
background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.strip-item span { font-size: 13px; color: var(--muted); }
/* ---------- Sections ---------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 70px 22px; }
.section-head { max-width: 620px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin: 12px 0 10px; }
.section-head p { color: var(--ink-2); font-size: 1.05rem; }
/* features */
.feature-grid {
display: grid; gap: 18px;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.feature {
background: var(--surface); border: 1px solid var(--line);
border-radius: var(--r-lg); padding: 26px 24px;
transition: transform .25s, border-color .25s, box-shadow .25s;
position: relative; overflow: hidden;
}
.feature::before {
content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--grad);
transform: scaleX(0); transform-origin: left; transition: transform .3s;
}
.feature:hover { transform: translateY(-5px); border-color: var(--line-2); box-shadow: var(--shadow); }
.feature:hover::before { transform: scaleX(1); }
.feature-ico {
width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
margin-bottom: 18px; color: #fff;
}
.ico-1 { background: linear-gradient(135deg, var(--v), var(--p)); }
.ico-2 { background: linear-gradient(135deg, var(--p), var(--o)); }
.ico-3 { background: linear-gradient(135deg, var(--v), #6366f1); }
.ico-4 { background: linear-gradient(135deg, var(--o), var(--p)); }
.feature h3 { font-size: 1.18rem; margin-bottom: 8px; }
.feature p { color: var(--ink-2); font-size: .96rem; }
/* artist spotlight */
.artist-row {
display: grid; grid-auto-flow: column; grid-auto-columns: 230px; gap: 18px;
overflow-x: auto; padding: 8px 4px 22px; scroll-snap-type: x mandatory;
scrollbar-width: thin; scrollbar-color: var(--p) transparent;
}
.artist-row::-webkit-scrollbar { height: 8px; }
.artist-row::-webkit-scrollbar-thumb { background: var(--grad); border-radius: 8px; }
.artist-row::-webkit-scrollbar-track { background: var(--surface); border-radius: 8px; }
.artist {
scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line);
border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
transition: transform .25s, box-shadow .25s, border-color .25s;
}
.artist:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--line-2); }
.artist-cover {
aspect-ratio: 1; position: relative; display: grid; place-items: end start; padding: 12px;
}
.artist-cover::after {
content: ""; position: absolute; inset: 0;
background: linear-gradient(180deg, transparent 45%, rgba(0, 0, 0, 0.55));
}
.artist-badge {
position: relative; z-index: 2; font-size: 11px; font-weight: 700;
background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
padding: 4px 9px; border-radius: 999px; align-self: start; justify-self: end;
}
.artist:hover .artist-play { opacity: 1; transform: translateY(0) scale(1); }
.artist-play {
position: absolute; z-index: 3; left: 12px; bottom: 12px; opacity: 0;
width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
background: var(--grad); color: #fff; display: grid; place-items: center;
transform: translateY(8px) scale(.8); transition: .25s; box-shadow: var(--glow);
}
.artist-play svg { fill: currentColor; }
.artist-meta { padding: 14px 16px 18px; }
.artist-meta h3 { font-size: 1.05rem; }
.artist-meta span { font-size: 13px; color: var(--muted); }
.artist-meta .monthly { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-2); }
/* plans */
.plan-toggle {
display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 30px;
background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
}
.plan-toggle button {
font: inherit; font-weight: 600; border: 0; cursor: pointer; color: var(--ink-2);
background: transparent; padding: 9px 20px; border-radius: 999px; transition: .2s;
display: inline-flex; align-items: center; gap: 8px;
}
.plan-toggle button.active { background: var(--grad); color: #fff; box-shadow: var(--glow); }
.plan-toggle .save { font-size: 11px; font-weight: 700; }
.plan-grid {
display: grid; gap: 18px;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
align-items: start;
}
.plan {
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
padding: 30px 26px; position: relative; transition: transform .25s, border-color .25s;
}
.plan:hover { transform: translateY(-5px); border-color: var(--line-2); }
.plan-feature {
background: var(--grad-soft); border-color: rgba(236, 72, 153, 0.4);
box-shadow: 0 24px 60px -22px rgba(236, 72, 153, 0.45);
}
.plan-badge {
position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
font-size: 12px; font-weight: 700; background: var(--grad); color: #fff;
padding: 5px 14px; border-radius: 999px; box-shadow: var(--glow); white-space: nowrap;
}
.plan h3 { font-size: 1.3rem; }
.plan-for { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.plan-price { display: flex; align-items: baseline; gap: 2px; margin: 20px 0; }
.plan-price .cur { font-size: 1.2rem; color: var(--ink-2); }
.plan-price .amt { font-family: "Sora", sans-serif; font-size: 2.8rem; font-weight: 800; }
.plan-price .per { color: var(--muted); font-size: .95rem; margin-left: 4px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 11px; }
.plan-list li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: .95rem; }
.plan-list li::before {
content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px;
border-radius: 50%; background: var(--grad);
-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12l4 4L19 7'/%3E%3C/svg%3E") center/12px no-repeat;
}
/* apps */
.apps-card {
display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center;
background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
padding: 44px; overflow: hidden; position: relative;
}
.apps-card::before {
content: ""; position: absolute; right: -10%; top: -40%; width: 60%; height: 180%;
background: radial-gradient(closest-side, rgba(236, 72, 153, 0.22), transparent);
}
.apps-copy { position: relative; z-index: 2; }
.apps-copy h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 12px 0 12px; }
.apps-copy p { color: var(--ink-2); max-width: 42ch; }
.store-row { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.store-btn {
display: inline-flex; align-items: center; gap: 11px; font: inherit; cursor: pointer;
background: #000; color: #fff; border: 1px solid var(--line-2);
padding: 10px 18px; border-radius: var(--r-md); transition: transform .15s, border-color .2s;
}
.store-btn:hover { transform: translateY(-2px); border-color: var(--p); }
.store-btn svg { fill: currentColor; }
.store-btn span { display: flex; flex-direction: column; line-height: 1.1; font-weight: 700; text-align: left; }
.store-btn small { font-weight: 500; font-size: 10px; color: var(--ink-2); }
.apps-art { position: relative; z-index: 2; display: grid; place-items: center; }
.phone {
width: 210px; border-radius: 30px; background: var(--surface-2);
border: 1px solid var(--line-2); padding: 16px; box-shadow: var(--shadow);
position: relative;
}
.phone-top {
width: 56px; height: 5px; border-radius: 3px; background: var(--line-2);
margin: 2px auto 16px;
}
.phone-cover {
aspect-ratio: 1; border-radius: var(--r-md); background: var(--grad);
transition: background .5s;
}
.phone-info { margin-top: 14px; }
.phone-info strong { font-size: 1rem; display: block; }
.phone-info span { font-size: 13px; color: var(--muted); }
.phone-bar { height: 4px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); margin: 14px 0 12px; overflow: hidden; }
.phone-bar i { display: block; height: 100%; width: 38%; background: var(--grad); transition: width .25s linear; }
.phone-eq { display: flex; gap: 3px; align-items: flex-end; height: 18px; }
.phone-eq span { flex: 1; background: var(--grad); border-radius: 2px; height: 40%; animation: eq .8s ease-in-out infinite; }
.phone-eq span:nth-child(2) { animation-delay: -.3s; }
.phone-eq span:nth-child(3) { animation-delay: -.5s; }
.phone-eq span:nth-child(4) { animation-delay: -.2s; }
.phone-eq span:nth-child(5) { animation-delay: -.6s; }
/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 30px; }
.footer-grid {
max-width: var(--maxw); margin: 0 auto; padding: 56px 22px 30px;
display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 30px;
}
.footer-brand p { color: var(--muted); font-size: .9rem; max-width: 30ch; margin-top: 14px; }
.footer nav h4 { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 14px; }
.footer nav a { display: block; color: var(--muted); font-size: .92rem; padding: 5px 0; transition: color .2s; }
.footer nav a:hover { color: var(--ink); }
.footer-bottom {
max-width: var(--maxw); margin: 0 auto; padding: 22px; border-top: 1px solid var(--line);
display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.footer-bottom span { color: var(--muted); font-size: .85rem; }
.socials { display: flex; gap: 8px; }
.socials a {
width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
font-size: 12px; font-weight: 700; color: var(--ink-2);
background: var(--surface); border: 1px solid var(--line); transition: .2s;
}
.socials a:hover { color: #fff; background: var(--grad); border-color: transparent; }
/* ---------- Toast ---------- */
.toast {
position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px);
background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2);
padding: 13px 20px; border-radius: var(--r-md); box-shadow: var(--shadow);
font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none;
transition: opacity .25s, transform .25s; z-index: 300; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast::before { content: "♪ "; color: var(--p); }
/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.feature.reveal, .plan.reveal { transition-delay: calc(var(--d, 0) * 80ms); }
/* ---------- Responsive ---------- */
@media (max-width: 900px) {
.apps-card { grid-template-columns: 1fr; padding: 32px; }
.apps-art { order: -1; }
.footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
.nav-links { display: none; }
.nav-burger { display: flex; }
.nav-actions .btn-ghost { display: none; }
.album-wall { grid-template-columns: repeat(4, 1fr); }
.strip { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
.hero { padding: 36px 16px 50px; }
.section { padding: 52px 16px; }
.hero-cta { flex-direction: column; }
.hero-cta .btn { width: 100%; }
.hero-now { width: 100%; }
.album-wall { grid-template-columns: repeat(3, 1fr); }
.footer-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
.nav-inner { padding: 14px 16px; }
.apps-card { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
*, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
.reveal { opacity: 1; transform: none; }
}(function () {
"use strict";
/* ---------- Toast helper ---------- */
var toastEl = document.getElementById("toast");
var toastTimer;
function toast(msg) {
if (!toastEl) return;
toastEl.textContent = msg;
toastEl.classList.add("show");
clearTimeout(toastTimer);
toastTimer = setTimeout(function () {
toastEl.classList.remove("show");
}, 2600);
}
/* ---------- Gradient swatch generator ---------- */
var palettes = [
["#8b5cf6", "#ec4899"], ["#ec4899", "#fb923c"], ["#6366f1", "#8b5cf6"],
["#fb923c", "#f43f5e"], ["#06b6d4", "#8b5cf6"], ["#f43f5e", "#fb923c"],
["#22d3ee", "#3b82f6"], ["#a855f7", "#fb7185"], ["#10b981", "#06b6d4"],
["#f59e0b", "#ec4899"], ["#7c3aed", "#2dd4bf"], ["#fb7185", "#fbbf24"]
];
function gradFor(i, deg) {
var p = palettes[i % palettes.length];
return "linear-gradient(" + (deg || 135) + "deg, " + p[0] + ", " + p[1] + ")";
}
/* ---------- Album wall ---------- */
var wallTitles = [
"Halcyon", "Neon Tide", "Glasshouse", "Lowlight", "Afterglow", "Driftwood",
"Velvet Hours", "Paper Moons", "Static Bloom", "Goldenrod", "Cassette", "Midnight Oil"
];
var wall = document.getElementById("albumWall");
if (wall) {
var count = window.innerWidth <= 520 ? 9 : window.innerWidth <= 720 ? 8 : 12;
for (var i = 0; i < count; i++) {
var tile = document.createElement("div");
tile.className = "tile";
tile.style.background = gradFor(i, 120 + (i % 4) * 20);
var tag = document.createElement("span");
tag.className = "tag";
tag.textContent = wallTitles[i % wallTitles.length];
tile.appendChild(tag);
wall.appendChild(tile);
}
}
/* ---------- Artist spotlight ---------- */
var artists = [
{ name: "Saint Vela", genre: "Synth-pop", monthly: "8.4M", track: "Glasshouse" },
{ name: "The Lowlights", genre: "Indie rock", monthly: "5.1M", track: "Paper Moons" },
{ name: "Mara Quill", genre: "Neo-soul", monthly: "3.9M", track: "Velvet Hours" },
{ name: "Cobalt Youth", genre: "Electronic", monthly: "6.7M", track: "Static Bloom" },
{ name: "River & Stone", genre: "Folk", monthly: "2.3M", track: "Driftwood" },
{ name: "Nova Sett", genre: "Hyperpop", monthly: "4.5M", track: "Afterglow" },
{ name: "Juno Reyes", genre: "Latin", monthly: "9.2M", track: "Goldenrod" }
];
var row = document.getElementById("artistRow");
if (row) {
artists.forEach(function (a, i) {
var card = document.createElement("article");
card.className = "artist";
card.setAttribute("role", "listitem");
card.tabIndex = 0;
card.innerHTML =
'<div class="artist-cover" style="background:' + gradFor(i + 2) + '">' +
'<span class="artist-badge">★ ' + a.monthly + '</span>' +
'<button class="artist-play" type="button" aria-label="Play ' + a.track + ' by ' + a.name + '">' +
'<svg viewBox="0 0 24 24" width="18" height="18"><path d="M7 4v16l13-8z"/></svg>' +
'</button>' +
'</div>' +
'<div class="artist-meta">' +
'<h3>' + a.name + '</h3>' +
'<span>' + a.genre + '</span>' +
'<span class="monthly">Latest: ' + a.track + '</span>' +
'</div>';
function play() { setNowPlaying(a.track, a.name, i + 2); toast("Now playing " + a.track + " — " + a.name); }
card.querySelector(".artist-play").addEventListener("click", function (e) { e.stopPropagation(); play(); });
card.addEventListener("click", play);
card.addEventListener("keydown", function (e) {
if (e.key === "Enter" || e.key === " ") { e.preventDefault(); play(); }
});
row.appendChild(card);
});
}
/* ---------- Now playing (hero + phone mock) ---------- */
var nowTrack = document.getElementById("nowTrack");
var phoneTrack = document.getElementById("phoneTrack");
var phoneArtist = document.getElementById("phoneArtist");
var phoneCover = document.getElementById("phoneCover");
function setNowPlaying(track, artist, gi) {
if (nowTrack) nowTrack.textContent = track + " — " + artist;
if (phoneTrack) phoneTrack.textContent = track;
if (phoneArtist) phoneArtist.textContent = artist;
if (phoneCover) phoneCover.style.background = gradFor(gi || 1);
}
/* ---------- Equalizer play/pause ---------- */
var eq = document.getElementById("eq");
var nowToggle = document.getElementById("nowToggle");
var playIcon = '<svg viewBox="0 0 24 24" width="20" height="20"><path d="M8 5v14l11-7z"/></svg>';
var pauseIcon = '<svg viewBox="0 0 24 24" width="20" height="20"><rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/></svg>';
if (nowToggle && eq) {
nowToggle.addEventListener("click", function () {
var paused = eq.classList.toggle("paused");
nowToggle.setAttribute("aria-pressed", String(!paused));
nowToggle.setAttribute("aria-label", paused ? "Play equalizer" : "Pause equalizer");
nowToggle.innerHTML = paused ? playIcon : pauseIcon;
toast(paused ? "Paused" : "Playing");
});
}
/* ---------- Phone progress bar loop ---------- */
var phoneBar = document.getElementById("phoneBar");
if (phoneBar) {
var pct = 24;
setInterval(function () {
pct += 0.7;
if (pct > 100) pct = 0;
phoneBar.style.width = pct + "%";
}, 220);
}
/* ---------- Plan billing toggle ---------- */
var planToggle = document.querySelector(".plan-toggle");
if (planToggle) {
planToggle.addEventListener("click", function (e) {
var btn = e.target.closest("button[data-period]");
if (!btn) return;
planToggle.querySelectorAll("button").forEach(function (b) { b.classList.remove("active"); });
btn.classList.add("active");
var yearly = btn.dataset.period === "yearly";
document.querySelectorAll(".plan-price .amt").forEach(function (el) {
el.textContent = yearly ? el.dataset.yearly : el.dataset.monthly;
});
document.querySelectorAll(".plan-price .per").forEach(function (el) {
el.textContent = yearly ? "/mo, billed yearly" : "/mo";
});
toast(yearly ? "Yearly pricing — save 20%" : "Monthly pricing");
});
}
document.querySelectorAll("[data-plan]").forEach(function (b) {
b.addEventListener("click", function () { toast("Starting your " + b.dataset.plan + " plan — 3 months free"); });
});
document.querySelectorAll("[data-store]").forEach(function (b) {
b.addEventListener("click", function () { toast("Opening " + b.dataset.store + " (demo)"); });
});
document.querySelectorAll("[data-action='login']").forEach(function (b) {
b.addEventListener("click", function () { toast("Log in is part of the demo only"); });
});
/* ---------- Hero email form ---------- */
var heroForm = document.getElementById("heroForm");
if (heroForm) {
var emailInput = document.getElementById("heroEmail");
heroForm.addEventListener("submit", function (e) {
e.preventDefault();
var valid = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(emailInput.value.trim());
if (!valid) {
emailInput.classList.add("invalid");
emailInput.focus();
toast("Please enter a valid email");
return;
}
emailInput.classList.remove("invalid");
toast("You're in! Check " + emailInput.value.trim() + " for your free trial");
emailInput.value = "";
});
emailInput.addEventListener("input", function () { emailInput.classList.remove("invalid"); });
}
document.querySelectorAll("[data-action='signup']").forEach(function (b) {
b.addEventListener("click", function () {
toast("3 months free, then cancel anytime");
var h = document.getElementById("heroEmail");
if (h) { h.scrollIntoView({ behavior: "smooth", block: "center" }); setTimeout(function () { h.focus(); }, 400); }
closeMobile();
});
});
/* ---------- Mobile nav ---------- */
var burger = document.querySelector(".nav-burger");
var mobileNav = document.getElementById("mobile-nav");
function closeMobile() {
if (!mobileNav) return;
mobileNav.hidden = true;
if (burger) burger.setAttribute("aria-expanded", "false");
}
if (burger && mobileNav) {
burger.addEventListener("click", function () {
var open = mobileNav.hidden;
mobileNav.hidden = !open;
burger.setAttribute("aria-expanded", String(open));
});
mobileNav.querySelectorAll("a").forEach(function (a) { a.addEventListener("click", closeMobile); });
}
/* ---------- Nav scrolled state ---------- */
var nav = document.getElementById("nav");
function onScroll() {
if (!nav) return;
nav.classList.toggle("scrolled", window.scrollY > 12);
}
window.addEventListener("scroll", onScroll, { passive: true });
onScroll();
/* ---------- Scroll reveal ---------- */
var reveals = document.querySelectorAll(".reveal");
if ("IntersectionObserver" in window) {
var io = new IntersectionObserver(function (entries) {
entries.forEach(function (en) {
if (en.isIntersecting) { en.target.classList.add("in"); io.unobserve(en.target); }
});
}, { threshold: 0.12, rootMargin: "0px 0px -40px 0px" });
reveals.forEach(function (el) { io.observe(el); });
} else {
reveals.forEach(function (el) { el.classList.add("in"); });
}
})();<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Pulse — Music for every moment</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<a class="skip-link" href="#main">Skip to content</a>
<!-- NAV -->
<header class="nav" id="nav">
<div class="nav-inner">
<a class="brand" href="#" aria-label="Pulse home">
<span class="brand-mark" aria-hidden="true">
<span></span><span></span><span></span><span></span>
</span>
<span class="brand-name">Pulse</span>
</a>
<nav class="nav-links" aria-label="Primary">
<a href="#features">Features</a>
<a href="#artists">Artists</a>
<a href="#plans">Plans</a>
<a href="#apps">Apps</a>
</nav>
<div class="nav-actions">
<button class="btn btn-ghost" type="button" data-action="login">Log in</button>
<button class="btn btn-grad" type="button" data-action="signup">Start free</button>
<button class="nav-burger" type="button" aria-label="Open menu" aria-expanded="false" aria-controls="mobile-nav">
<span></span><span></span><span></span>
</button>
</div>
</div>
<!-- MOBILE NAV -->
<div class="mobile-nav" id="mobile-nav" hidden>
<a href="#features">Features</a>
<a href="#artists">Artists</a>
<a href="#plans">Plans</a>
<a href="#apps">Apps</a>
<button class="btn btn-grad btn-block" type="button" data-action="signup">Start free</button>
</div>
</header>
<main id="main">
<!-- HERO -->
<section class="hero">
<div class="hero-glow" aria-hidden="true"></div>
<div class="album-wall" aria-hidden="true" id="albumWall"></div>
<div class="hero-content reveal">
<span class="pill"><span class="pill-dot"></span> Over 90 million tracks</span>
<h1 class="hero-title">
Sound that<br /><span class="grad-text">moves with you.</span>
</h1>
<p class="hero-sub">
Lossless audio, hand-built playlists, podcasts and live sets — all in one
place. Press play and let Pulse score your whole day.
</p>
<form class="hero-cta" id="heroForm" novalidate>
<label class="sr-only" for="heroEmail">Email address</label>
<input id="heroEmail" type="email" name="email" placeholder="you@email.com" autocomplete="email" required />
<button class="btn btn-grad" type="submit">Try 3 months free</button>
</form>
<p class="hero-note">No card needed. Cancel anytime.</p>
<div class="hero-now">
<div class="eq" id="eq" aria-hidden="true">
<span></span><span></span><span></span><span></span><span></span>
<span></span><span></span><span></span><span></span>
</div>
<div class="now-meta">
<strong>Now playing</strong>
<span id="nowTrack">Neon Tide — Halcyon Drift</span>
</div>
<button class="now-toggle" id="nowToggle" type="button" aria-pressed="true" aria-label="Pause equalizer">
<svg viewBox="0 0 24 24" width="20" height="20" aria-hidden="true"><rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/></svg>
</button>
</div>
</div>
</section>
<!-- TRUST STRIP -->
<section class="strip reveal" aria-label="Stats">
<div class="strip-item"><strong>90M+</strong><span>Tracks & podcasts</span></div>
<div class="strip-item"><strong>24-bit</strong><span>Hi-Fi lossless</span></div>
<div class="strip-item"><strong>180+</strong><span>Countries</span></div>
<div class="strip-item"><strong>4.9★</strong><span>App rating</span></div>
</section>
<!-- FEATURES -->
<section class="section" id="features">
<header class="section-head reveal">
<span class="eyebrow">Why Pulse</span>
<h2>Everything your ears want.</h2>
<p>Built for deep listeners and casual hummers alike.</p>
</header>
<div class="feature-grid">
<article class="feature reveal" style="--d:0">
<div class="feature-ico ico-1" aria-hidden="true">
<svg viewBox="0 0 24 24" width="22" height="22"><path d="M5 12l4 4L19 6" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<h3>Offline downloads</h3>
<p>Save up to 10,000 songs to any device and listen anywhere — plane, subway, off-grid trail.</p>
</article>
<article class="feature reveal" style="--d:1">
<div class="feature-ico ico-2" aria-hidden="true">
<svg viewBox="0 0 24 24" width="22" height="22"><path d="M3 12h3l3 7 4-14 3 7h5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<h3>Hi-Fi lossless</h3>
<p>Studio-quality 24-bit audio up to 192kHz. Hear the room, the breath, the tape hiss.</p>
</article>
<article class="feature reveal" style="--d:2">
<div class="feature-ico ico-3" aria-hidden="true">
<svg viewBox="0 0 24 24" width="22" height="22"><path d="M4 6h16M4 12h10M4 18h13" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
</div>
<h3>Smart playlists</h3>
<p>Daily mixes that learn your taste, plus expert-curated sets for focus, sweat and sleep.</p>
</article>
<article class="feature reveal" style="--d:3">
<div class="feature-ico ico-4" aria-hidden="true">
<svg viewBox="0 0 24 24" width="22" height="22"><path d="M12 14a3 3 0 0 0 3-3V6a3 3 0 0 0-6 0v5a3 3 0 0 0 3 3zM6 11a6 6 0 0 0 12 0M12 17v4" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
</div>
<h3>Podcasts & live</h3>
<p>Millions of shows and exclusive live sets, synced across every screen you own.</p>
</article>
</div>
</section>
<!-- ARTIST SPOTLIGHT -->
<section class="section" id="artists">
<header class="section-head reveal">
<span class="eyebrow">Artist spotlight</span>
<h2>The voices defining this week.</h2>
<p>Fresh drops and rising names, refreshed every Friday.</p>
</header>
<div class="artist-row" id="artistRow" role="list">
<!-- cards injected by JS -->
</div>
</section>
<!-- PLANS -->
<section class="section" id="plans">
<header class="section-head reveal">
<span class="eyebrow">Pricing</span>
<h2>Pick a plan, change anytime.</h2>
<p>Every plan starts with 3 months free.</p>
</header>
<div class="plan-toggle reveal" role="group" aria-label="Billing period">
<button class="active" data-period="monthly" type="button">Monthly</button>
<button data-period="yearly" type="button">Yearly <span class="save">−20%</span></button>
</div>
<div class="plan-grid">
<article class="plan reveal" style="--d:0">
<h3>Individual</h3>
<p class="plan-for">One premium account.</p>
<div class="plan-price"><span class="cur">$</span><span class="amt" data-monthly="10.99" data-yearly="8.79">10.99</span><span class="per">/mo</span></div>
<ul class="plan-list">
<li>Ad-free, unlimited skips</li>
<li>Hi-Fi lossless audio</li>
<li>Offline downloads</li>
<li>1 account</li>
</ul>
<button class="btn btn-outline btn-block" type="button" data-plan="Individual">Choose Individual</button>
</article>
<article class="plan plan-feature reveal" style="--d:1">
<span class="plan-badge">Most popular</span>
<h3>Family</h3>
<p class="plan-for">Up to 6 accounts.</p>
<div class="plan-price"><span class="cur">$</span><span class="amt" data-monthly="16.99" data-yearly="13.59">16.99</span><span class="per">/mo</span></div>
<ul class="plan-list">
<li>Everything in Individual</li>
<li>6 separate profiles</li>
<li>Parental controls & Kids</li>
<li>Shared family mix</li>
</ul>
<button class="btn btn-grad btn-block" type="button" data-plan="Family">Choose Family</button>
</article>
<article class="plan reveal" style="--d:2">
<h3>Student</h3>
<p class="plan-for">Verified students.</p>
<div class="plan-price"><span class="cur">$</span><span class="amt" data-monthly="5.49" data-yearly="4.39">5.49</span><span class="per">/mo</span></div>
<ul class="plan-list">
<li>Everything in Individual</li>
<li>50% student discount</li>
<li>Verify once a year</li>
<li>1 account</li>
</ul>
<button class="btn btn-outline btn-block" type="button" data-plan="Student">Choose Student</button>
</article>
</div>
</section>
<!-- APP CTA -->
<section class="section apps" id="apps">
<div class="apps-card reveal">
<div class="apps-copy">
<span class="eyebrow">Take it with you</span>
<h2>Your library, on every device.</h2>
<p>Phone, tablet, desktop, watch and car. Pick up exactly where you left off — playback follows you everywhere.</p>
<div class="store-row">
<button class="store-btn" type="button" data-store="App Store">
<svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true"><path d="M16 3c.1 1.2-.4 2.4-1.1 3.2-.8.9-2 1.6-3.2 1.5-.1-1.2.5-2.4 1.2-3.1C13.7 3.6 15 3 16 3zm3.4 14.6c-.5 1.2-.8 1.7-1.5 2.7-1 1.5-2.4 3.3-4.1 3.3-1.5 0-1.9-1-4-1-2 0-2.5 1-4 1-1.7 0-3-1.7-4-3.1-2.8-4-3.1-8.7-1.4-11.2 1.2-1.8 3.1-2.8 4.9-2.8 1.8 0 3 1 4.5 1 1.5 0 2.4-1 4.5-1 1.6 0 3.3.9 4.5 2.4-4 2.2-3.3 7.9.1 8.7z" fill="currentColor"/></svg>
<span><small>Download on the</small>App Store</span>
</button>
<button class="store-btn" type="button" data-store="Google Play">
<svg viewBox="0 0 24 24" width="22" height="22" aria-hidden="true"><path d="M4 3.5v17l9.5-8.5L4 3.5zm11 7.5l2.7-2.4 3.6 2c.9.5.9 1.3 0 1.8l-3.6 2L15 12zm-1 1L5.5 21l9-5-1.5-1.5zM5.5 3L14 11l-1.5 1.5L5.5 3z" fill="currentColor"/></svg>
<span><small>Get it on</small>Google Play</span>
</button>
</div>
</div>
<div class="apps-art" aria-hidden="true">
<div class="phone">
<div class="phone-top"></div>
<div class="phone-cover" id="phoneCover"></div>
<div class="phone-info">
<strong id="phoneTrack">Glasshouse</strong>
<span id="phoneArtist">Saint Vela</span>
</div>
<div class="phone-bar"><i id="phoneBar"></i></div>
<div class="phone-eq"><span></span><span></span><span></span><span></span><span></span></div>
</div>
</div>
</div>
</section>
</main>
<!-- FOOTER -->
<footer class="footer">
<div class="footer-grid">
<div class="footer-brand">
<a class="brand" href="#" aria-label="Pulse home">
<span class="brand-mark" aria-hidden="true"><span></span><span></span><span></span><span></span></span>
<span class="brand-name">Pulse</span>
</a>
<p>Music for every moment. Fictional product, for demo purposes only.</p>
</div>
<nav aria-label="Company">
<h4>Company</h4>
<a href="#">About</a><a href="#">Jobs</a><a href="#">For artists</a><a href="#">Press</a>
</nav>
<nav aria-label="Support">
<h4>Support</h4>
<a href="#">Help center</a><a href="#">Devices</a><a href="#">Accessibility</a><a href="#">Contact</a>
</nav>
<nav aria-label="Legal">
<h4>Legal</h4>
<a href="#">Privacy</a><a href="#">Terms</a><a href="#">Cookies</a><a href="#">Licenses</a>
</nav>
</div>
<div class="footer-bottom">
<span>© 2026 Pulse Audio Labs — fictional demo.</span>
<div class="socials">
<a href="#" aria-label="Instagram">IG</a>
<a href="#" aria-label="X">X</a>
<a href="#" aria-label="TikTok">TT</a>
</div>
</div>
</footer>
<div class="toast" id="toast" role="status" aria-live="polite"></div>
<script src="script.js"></script>
</body>
</html>Music Streaming Landing
A full marketing page for Pulse, a fictional music-streaming app, rendered in a cinematic dark theme with a violet to pink to orange gradient running through every accent. The hero stacks a generated wall of gradient album tiles behind the headline, with a live “now playing” chip whose nine-bar equalizer you can pause and resume. An email capture form validates inline and confirms the free trial via a toast helper, while sticky navigation fades in a blurred background as you scroll.
Below the fold, four feature cards cover offline downloads, 24-bit Hi-Fi audio, smart playlists and podcasts. The artist spotlight is a snap-scrolling row of cards, each with a hover-revealed play button that pushes its track into the hero and the phone mock. Pricing offers Individual, Family and Student tiers with a monthly/yearly toggle that recomputes every price, and the app section animates a phone with a looping progress bar and its own equalizer.
Everything is vanilla — no frameworks, no build step. Interactions include scroll-reveal via IntersectionObserver, a mobile menu, a reusable toast() helper, and respect for prefers-reduced-motion. The layout is responsive from wide desktop down to roughly 360px, where the navigation collapses to a hamburger and the album wall reflows.
Illustrative UI only — fictional titles, not a real streaming service.