/* 4Stems - no framework, one font, everything sized up front so nothing shifts while loading. */
@font-face {
  font-family: 'Bricolage Grotesque';
  src: url(/fonts/bricolage-grotesque.woff2) format('woff2');
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --bg: #0a0b12;
  --bg-2: #10121c;
  --card: #151827;
  --card-2: #1b1f33;
  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .14);
  --text: #eef0f7;
  --muted: #9ba1ba;
  --vocals: #ff5c8a;
  --drums: #ffb13b;
  --bass: #8b7bff;
  --other: #2fd4e8;
  --ok: #3ddc97;
  --grad: linear-gradient(90deg, var(--vocals), var(--drums) 35%, var(--bass) 68%, var(--other));
  --radius: 22px;
  --font: 'Bricolage Grotesque', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40rem 30rem at 8% -5%, rgba(255, 92, 138, .16), transparent 70%),
    radial-gradient(38rem 28rem at 95% 8%, rgba(47, 212, 232, .13), transparent 70%),
    radial-gradient(40rem 30rem at 60% 105%, rgba(139, 123, 255, .12), transparent 70%);
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 750; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.narrow { width: min(640px, 100% - 40px); }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------------------------------------------------------------- nav */
.nav { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); background: rgba(10, 11, 18, .72); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.nav img { width: 147px; height: 40px; }
.nav a { text-decoration: none; }
.pill { display: inline-flex; align-items: center; gap: .45em; padding: .35em .9em; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); font-size: .9rem; font-weight: 600; white-space: nowrap; }
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); }

main { flex: 1; }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55em; padding: .9em 1.6em; border: 0; border-radius: 999px; font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; background: var(--text); color: #0b0c14; transition: transform .15s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 255, 255, .12); }
.btn:active { transform: translateY(0); }
.btn-grad { background: var(--grad); color: #0b0c14; background-size: 200% 100%; animation: shimmer 6s linear infinite; }
.btn-grad:hover { box-shadow: 0 12px 34px rgba(255, 92, 138, .3); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
.btn-block { width: 100%; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: .92rem; }
.link-btn:hover { color: var(--text); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- hero */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: .5em; font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
.eyebrow::before { content: ''; width: 28px; height: 3px; border-radius: 3px; background: var(--grad); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); }
.hero .lead { font-size: 1.2rem; color: var(--muted); max-width: 32em; }
.stem-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.chip { --c: var(--text); display: inline-flex; align-items: center; gap: .5em; padding: .4em .9em .4em .7em; border-radius: 999px; font-weight: 600; font-size: .95rem; background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.chip::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.c-vocals { --c: var(--vocals); } .c-drums { --c: var(--drums); } .c-bass { --c: var(--bass); } .c-other { --c: var(--other); }

/* ---------------------------------------------------------------- uploader */
.uploader { position: relative; border-radius: 28px; padding: 2px; background: var(--grad); background-size: 300% 100%; animation: shimmer 12s linear infinite; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); }
/* all states share one grid cell: the box is always as tall as the tallest state, so switching never shifts the page */
.uploader-inner { display: grid; min-height: 420px; border-radius: 26px; background: var(--card); overflow: hidden; }
.state { grid-area: 1 / 1; position: relative; padding: 32px; display: flex; flex-direction: column; justify-content: center; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease, visibility 0s .3s; }
.uploader[data-state="idle"] .state-idle,
.uploader[data-state="uploading"] .state-uploading,
.uploader[data-state="ready"] .state-ready,
.uploader[data-state="error"] .state-error { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.state-idle { align-items: center; text-align: center; cursor: pointer; border-radius: 26px; }
.state-idle::after { content: ''; position: absolute; inset: 14px; border: 2px dashed var(--line-2); border-radius: 18px; transition: border-color .2s, background .2s; pointer-events: none; }
.state-idle:hover::after, .dragging .state-idle::after { border-color: rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .025); }
.state-idle:focus-visible { outline: 3px solid var(--other); outline-offset: -6px; }
.drop-title { font-size: 1.7rem; font-weight: 750; margin: 26px 0 6px; letter-spacing: -.01em; }
.drop-sub { color: var(--muted); margin: 0 0 22px; }
.drop-sub u { color: var(--text); text-decoration-color: var(--vocals); text-decoration-thickness: 2px; }
.price-tag { display: inline-flex; align-items: baseline; gap: .35em; padding: .45em 1em; border-radius: 999px; background: rgba(255, 255, 255, .06); font-weight: 700; }
.price-tag b { font-size: 1.25rem; }
.price-tag sup, .price sup { font-size: .6em; }

/* animated equalizer: 4 groups of bars, one per stem */
.eq { display: flex; align-items: flex-end; gap: 14px; height: 84px; }
.eq span { display: flex; align-items: flex-end; gap: 4px; height: 100%; }
.eq i { display: block; width: 7px; height: 30%; border-radius: 4px; background: var(--c); animation: bounce 1.1s ease-in-out infinite alternate; }
.eq i:nth-child(2) { animation-delay: -.35s; animation-duration: .9s; }
.eq i:nth-child(3) { animation-delay: -.7s; animation-duration: 1.3s; }
.eq span:nth-child(2) i { animation-delay: -.2s; } .eq span:nth-child(3) i { animation-delay: -.5s; } .eq span:nth-child(4) i { animation-delay: -.8s; }
@keyframes bounce { 0% { height: 18%; } 100% { height: 100%; } }
.eq.small { height: 36px; gap: 8px; }
.eq.small i { width: 5px; }
.eq.paused i { animation-play-state: paused; }

.file-row { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; min-width: 0; }
.file-icon { flex: none; width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.file-icon svg { width: 24px; height: 24px; }
.file-name { font-weight: 700; font-size: 1.1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress { height: 12px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.progress .bar { height: 100%; width: 0; border-radius: 99px; background: var(--grad); background-size: 200% 100%; animation: shimmer 2s linear infinite; transition: width .2s ease; }
.progress-text { display: flex; justify-content: space-between; margin-top: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* checkout card (after upload) */
.state-ready { justify-content: flex-start; padding: 26px 28px; gap: 16px; }
.ready-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ok-badge { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); }
.ok-badge svg { width: 18px; height: 18px; }
.ready-head .file-name { font-size: 1.05rem; }
.ready-head .muted { font-size: .9rem; }
.wave { width: 100%; height: 58px; }
.price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.price { font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.price small { font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: .3em; }
.price-row .muted { font-size: .9rem; text-align: right; }
.secure-note { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.secure-note svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--ok); }
.perks { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: var(--muted); }
.perks li::before { content: '✓ '; color: var(--ok); font-weight: 700; }

.state-error { align-items: center; text-align: center; }
.state-error .big-emoji { font-size: 3rem; line-height: 1; margin-bottom: 14px; }

.terms-note { margin: 16px 0 0; text-align: center; font-size: .85rem; color: var(--muted); }
.trust-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 28px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .92rem; }
.trust-row li { display: flex; align-items: center; gap: 8px; }
.trust-row svg { width: 18px; height: 18px; color: var(--text); }

/* ---------------------------------------------------------------- sections */
.section { padding: 72px 0; scroll-margin-top: 60px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; margin: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 28px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.step::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 18px; font-weight: 800; font-size: 1.2rem; color: #0b0c14; background: var(--c, var(--text)); }
.step h3 { font-size: 1.3rem; margin-bottom: .35em; }
.step p { color: var(--muted); margin: 0; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 26px; border-radius: var(--radius); background: linear-gradient(180deg, var(--card), var(--bg-2)); border: 1px solid var(--line); }
.feature .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 16px; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.15rem; margin-bottom: .35em; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* ---------------------------------------------------------------- demo mixer */
.mixer { border-radius: 28px; background: var(--card); border: 1px solid var(--line); padding: 26px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.mixer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .05); }
.tabs button { border: 0; background: none; padding: .5em 1.2em; border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--muted); }
.tabs button[aria-selected="true"] { background: var(--text); color: #0b0c14; }
.presets { display: flex; flex-wrap: wrap; gap: 8px; }
.presets button { border: 1px solid var(--line-2); background: none; padding: .4em .95em; border-radius: 999px; cursor: pointer; font-size: .9rem; font-weight: 600; color: var(--muted); transition: all .15s; }
.presets button:hover, .presets button.active { color: var(--text); border-color: rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .06); }
.lanes { display: grid; gap: 10px; }
.lane { display: grid; grid-template-columns: 164px 1fr; gap: 14px; align-items: center; }
.lane-btn { --c: var(--text); display: flex; align-items: center; gap: 10px; padding: .6em .8em; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 14%, transparent); cursor: pointer; font-weight: 700; text-align: left; transition: all .15s; }
.lane-btn .led { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); transition: all .15s; }
.lane-btn[aria-pressed="false"] { background: transparent; border-color: var(--line-2); color: var(--muted); }
.lane-btn[aria-pressed="false"] .led { background: transparent; box-shadow: inset 0 0 0 2px var(--muted); }
.lane canvas { width: 100%; height: 52px; cursor: pointer; border-radius: 10px; background: rgba(255, 255, 255, .025); }
.transport { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.play { flex: none; width: 60px; height: 60px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: var(--grad); color: #0b0c14; box-shadow: 0 10px 30px rgba(255, 92, 138, .25); transition: transform .15s; }
.play:hover { transform: scale(1.06); }
.play svg { width: 24px; height: 24px; }
.transport .time { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 90px; }
.transport .hint { color: var(--muted); font-size: .9rem; margin-left: auto; text-align: right; }

/* ---------------------------------------------------------------- stripe / secure */
.secure { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 44px; border-radius: 28px; background: linear-gradient(135deg, #17162e, #121728 60%, #0f1a24); border: 1px solid var(--line); }
.secure h2 { font-size: clamp(1.8rem, 3vw, 2.3rem); }
.secure .lead { color: var(--muted); }
.secure-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.secure-list li { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.secure-list svg { flex: none; width: 22px; height: 22px; color: var(--ok); margin-top: 2px; }
.secure-list b { display: block; }
.secure-list span { color: var(--muted); font-size: .93rem; }
.cards-accepted { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cards-accepted span { padding: .35em .8em; border-radius: 8px; background: rgba(255, 255, 255, .92); color: #1a1f36; font-weight: 800; font-size: .8rem; letter-spacing: .02em; }
.stripe-badge { display: inline-flex; align-items: center; gap: .5em; margin-top: 20px; padding: .55em 1em; border-radius: 12px; background: #635bff; color: #fff; font-weight: 700; font-size: .95rem; }
.stripe-badge svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- faq */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq details { border-radius: 18px; background: var(--card); border: 1px solid var(--line); padding: 0 22px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; font-size: 1.08rem; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 1.5rem; line-height: 1; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); margin: 0 0 20px; }

.cta { text-align: center; padding: 64px 24px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); position: relative; overflow: hidden; }
.cta h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.cta p { color: var(--muted); margin-bottom: 26px; }
.cta .eq { justify-content: center; margin: 0 auto 26px; height: 56px; }

/* ---------------------------------------------------------------- simple pages (payment / status / download) */
.page { padding: 72px 0; }
.card { padding: 40px 34px; border-radius: 28px; background: var(--card); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.msg { text-align: center; }
.msg h1 { font-size: 2rem; }

.job-song { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); margin: -4px 0 28px; min-width: 0; }
.job-song span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.tracker { display: grid; gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; text-align: left; }
.tracker li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); color: var(--muted); transition: all .3s; }
.tracker .mark { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--line-2); font-size: .85rem; font-weight: 800; }
.tracker li.done { color: var(--text); }
.tracker li.done .mark { border-color: var(--ok); background: var(--ok); color: #0b0c14; }
.tracker li.active { color: var(--text); border-color: var(--line-2); background: rgba(255, 255, 255, .06); }
.tracker li.active .mark { border-color: transparent; border-top-color: var(--vocals); border-right-color: var(--drums); animation: spin .9s linear infinite; }
.tracker li.active .mark b { visibility: hidden; }
.tracker .eq.small { margin-left: auto; height: 22px; gap: 5px; }
.tracker .eq.small i { width: 3px; }
.tracker .eq.small span { gap: 2px; }
.tracker li:not(.active) .eq { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.job-ready h2 { font-size: 1.8rem; }
.job-ready .btn { margin: 8px 0 16px; }
.job-error { color: var(--vocals); }

/* ---------------------------------------------------------------- terms */
.prose { max-width: 780px; margin: 0 auto; padding: 64px 0; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.3rem; margin-top: 2em; }
.prose p, .prose li { color: #c9cde0; }
.prose li { margin-bottom: .4em; }

/* ---------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: .9rem; }
.footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer nav { display: flex; gap: 20px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 36px; padding-top: 40px; }
  .hero-copy { text-align: center; }
  .hero .lead { margin-inline: auto; }
  .stem-chips { justify-content: center; }
  .eyebrow { justify-content: center; }
  .steps, .features { grid-template-columns: 1fr 1fr; }
  .secure { grid-template-columns: 1fr; padding: 30px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .steps, .features { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .state { padding: 24px 20px; }
  .state-ready { padding: 22px 20px; }
  .state-ready .stem-chips { display: none; }
  .lane { grid-template-columns: 1fr; gap: 6px; }
  .lane canvas { height: 40px; }
  .mixer { padding: 18px; }
  .transport .hint { display: none; }
  .card { padding: 30px 22px; }
  .nav .pill { font-size: .8rem; }
  .price { font-size: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
