/*
 * MusicX8 public site. Register: night-club poster — violet-black, grain, ultraviolet glow,
 * oversized wide display type. One accent (ultraviolet); the violet→pink gradient lives only in
 * the logo and the hero loop.
 * HERO: the X8 mark drawn as an endless loop of light ("endless music").
 */
:root {
  --bg: #0a090e;
  --surface: #121119;
  --raised: #191723;
  --line: #272434;
  --line-soft: rgba(39, 36, 52, .6);
  --ink: #f3f1f8;
  --ink-2: #b8b4c8;
  --ink-3: #8c889e;
  --accent: #9d7bff;
  --accent-deep: #8b5cf6;
  --pink: #ec4899;
  --display: "Unbounded", "Arial Black", sans-serif;
  --body: "Instrument Sans", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap: 1200px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
}
/* Film grain over everything (SVG turbulence, 7%) */
body::after {
  content: "";
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 100;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration-color: rgba(157, 123, 255, .5); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
img, svg { max-width: 100%; }
h1, h2, h3 { margin: 0; font-weight: 700; }
p { margin: 0 0 1em; }
.mono { font-family: var(--mono); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--raised); padding: 8px 12px; border-radius: 8px; z-index: 200; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--bg); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px max(20px, calc((100% - var(--wrap)) / 2));
  background: linear-gradient(to bottom, rgba(10, 9, 14, .92), rgba(10, 9, 14, .72));
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 700 18px/1 var(--display); letter-spacing: -0.02em; }
.brand img { border-radius: 8px; }
.topbar nav { display: flex; gap: 2px; margin-left: auto; }
.topbar nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; transition: color .15s, background .15s; }
.topbar nav a:hover, .topbar nav a[aria-current] { color: var(--ink); background: var(--raised); }
.pill { text-decoration: none; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); transition: transform .2s var(--ease), background .2s; }
.pill:hover { background: var(--accent); transform: translateY(-1px); }

main { flex: 1; width: 100%; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 24px;
  max-width: var(--wrap); margin: 0 auto; padding: 72px 20px 88px;
  isolation: isolate;
}
.hero::before { /* ultraviolet glow behind the loop */
  content: ""; position: absolute; z-index: -1;
  width: 820px; height: 820px; right: -260px; top: -180px;
  background: radial-gradient(closest-side, rgba(139, 92, 246, .30), rgba(236, 72, 153, .10) 55%, transparent 72%);
  filter: blur(10px);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 28px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(157, 123, 255, .6); animation: live 2.4s ease-out infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(157, 123, 255, .55); } 70%, 100% { box-shadow: 0 0 0 10px rgba(157, 123, 255, 0); } }
.display { font-family: var(--display); font-weight: 800; font-size: clamp(46px, 7.4vw, 96px); line-height: .96; letter-spacing: -0.04em; }
.display span { display: block; }
.display .lit { color: transparent; background: linear-gradient(100deg, var(--accent) 10%, var(--pink) 90%); -webkit-background-clip: text; background-clip: text; }
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 44ch; margin: 28px 0 0; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 36px; }
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 28px; border-radius: 999px;
  font: 700 17px/1 var(--body); text-decoration: none; cursor: pointer;
  background: var(--accent); color: #0a090e;
  box-shadow: 0 14px 40px -12px rgba(157, 123, 255, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); background: #b49bff; box-shadow: 0 20px 50px -12px rgba(157, 123, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .35); }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.btn svg { width: 20px; height: 20px; }
.meta { font: 500 13px/1.5 var(--mono); color: var(--ink-3); }
.meta b { color: var(--ink-2); font-weight: 500; }

.other-builds { margin-top: 22px; max-width: 560px; }
.other-builds summary { cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 15px; list-style: none; display: inline-flex; align-items: center; gap: 8px; }
.other-builds summary::-webkit-details-marker { display: none; }
.other-builds summary::before { content: "+"; font: 700 15px/1 var(--mono); color: var(--accent); width: 14px; }
.other-builds[open] summary::before { content: "−"; }
.builds { list-style: none; padding: 0; margin: 14px 0 0; border-top: 1px solid var(--line); }
.builds li { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.builds .size { font: 500 13px/1.6 var(--mono); color: var(--ink-3); }
.builds code { grid-column: 1 / -1; font: 400 11px/1.4 var(--mono); color: var(--ink-3); word-break: break-all; }

/* The endless loop */
.hero-art { position: relative; aspect-ratio: 1; width: 100%; max-width: 480px; justify-self: center; }
.grooves { /* vinyl grooves */
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle, rgba(255, 255, 255, .045) 0 1px, transparent 1px 7px);
  -webkit-mask: radial-gradient(circle, transparent 18%, #000 19%, #000 66%, transparent 70%);
  mask: radial-gradient(circle, transparent 18%, #000 19%, #000 66%, transparent 70%);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loop { position: absolute; inset: 9%; width: 82%; height: 82%; overflow: visible; }
.loop .track8 { stroke: rgba(243, 241, 248, .09); }
.loop .comet { stroke-dasharray: 22 78; animation: orbit 6s linear infinite; filter: drop-shadow(0 0 10px rgba(157, 123, 255, .9)) drop-shadow(0 0 24px rgba(236, 72, 153, .45)); }
.loop .comet.two { stroke-dasharray: 9 91; animation-delay: -3s; opacity: .7; }
@keyframes orbit { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }

/* Load-in cascade */
.rise { opacity: 0; transform: translateY(26px); animation: rise .9s var(--ease) forwards; }
.rise.d1 { animation-delay: .06s; } .rise.d2 { animation-delay: .14s; } .rise.d3 { animation-delay: .22s; }
.rise.d4 { animation-delay: .34s; } .rise.d5 { animation-delay: .46s; } .rise.d6 { animation-delay: .58s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Tracklist + release log ---------- */
.sides { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 48px; align-items: start; max-width: var(--wrap); margin: 0 auto; padding: 24px 20px 40px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.section-head h2 { font: 700 clamp(26px, 3vw, 34px)/1.1 var(--display); letter-spacing: -0.03em; }
.section-head .count { font: 500 13px/1 var(--mono); color: var(--ink-3); letter-spacing: .06em; text-transform: uppercase; }

.tracks { list-style: none; margin: 0; padding: 0; }
.track {
  display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 18px; align-items: start;
  padding: 20px 14px; margin: 0 -14px; border-radius: 14px;
  border-bottom: 1px solid var(--line-soft);
  transition: background .2s;
}
.track:hover { background: var(--surface); }
.no { position: relative; height: 26px; font: 500 15px/26px var(--mono); color: var(--ink-3); }
.no .eq { position: absolute; left: 0; top: 4px; display: none; gap: 3px; align-items: flex-end; height: 16px; }
.no .eq i { width: 3px; height: 100%; background: var(--accent); border-radius: 2px; transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.no .eq i:nth-child(2) { animation-delay: -.3s; } .no .eq i:nth-child(3) { animation-delay: -.6s; }
@keyframes eq { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
.track:hover .no .n { visibility: hidden; }
.track:hover .no .eq { display: flex; }
.track h3 { font: 600 19px/1.3 var(--body); letter-spacing: -0.01em; }
.track:hover h3 { color: var(--accent); }
.track p { margin: 4px 0 0; color: var(--ink-2); font-size: 16px; }
.tag { font: 500 11.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; margin-top: 3px; white-space: nowrap; }

.releases { position: sticky; top: 92px; }
.releases .log { max-height: calc(100vh - 190px); overflow: auto; padding-right: 6px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.release { position: relative; padding: 22px 0 18px 26px; border-bottom: 1px solid var(--line-soft); }
.release::before { content: ""; position: absolute; left: 4px; top: 30px; bottom: 0; width: 1px; background: var(--line); }
.release:last-child::before { display: none; }
.release:last-child { border-bottom: 0; }
.release::after { content: ""; position: absolute; left: 0; top: 26px; width: 9px; height: 9px; border-radius: 50%; background: var(--raised); border: 1px solid var(--ink-3); }
.release.latest::after { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px rgba(157, 123, 255, .18); }
.release header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.release h3 { font: 700 18px/1.2 var(--display); letter-spacing: -0.02em; }
.release time { font: 500 12.5px/1 var(--mono); color: var(--ink-3); }
.now { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.now .eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 10px; }
.now .eq i { width: 2px; height: 100%; background: currentColor; transform-origin: bottom; animation: eq .9s ease-in-out infinite; }
.now .eq i:nth-child(2) { animation-delay: -.3s; } .now .eq i:nth-child(3) { animation-delay: -.6s; }
.release ul { margin: 10px 0 0; padding: 0; list-style: none; }
.release li { position: relative; padding-left: 16px; margin: 6px 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.release li::before { content: "—"; position: absolute; left: 0; color: var(--ink-3); }
.release .dl { display: inline-block; margin-top: 10px; font: 500 12.5px/1 var(--mono); color: var(--ink-2); }
.empty { color: var(--ink-3); padding-top: 18px; }

/* ---------- Install ---------- */
.install { max-width: var(--wrap); margin: 0 auto; padding: 56px 20px 96px; }
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; counter-increment: s; padding: 92px 24px 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; color: var(--ink-2); }
.steps li::before {
  content: "0" counter(s); position: absolute; top: 14px; left: 20px;
  font: 800 64px/1 var(--display); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1.5px rgba(157, 123, 255, .55);
}
.steps strong { display: block; color: var(--ink); font-size: 19px; margin-bottom: 6px; }

/* ---------- Text pages ---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 64px 20px 96px; }
.doc h1 { font: 800 clamp(34px, 5vw, 54px)/1.02 var(--display); letter-spacing: -0.04em; margin-bottom: 14px; }
.doc h2 { font: 700 22px/1.25 var(--display); letter-spacing: -0.02em; margin: 2.4em 0 .7em; }
.doc h3 { font: 600 18px/1.3 var(--body); margin: 1.6em 0 .5em; }
.doc p, .doc li { color: var(--ink-2); }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); }
.doc code { font: 500 14px var(--mono); color: var(--ink); }
.doc .updated { font: 500 13px/1 var(--mono); color: var(--ink-3); letter-spacing: .04em; margin-bottom: 32px; }
.doc table { width: 100%; border-collapse: collapse; margin: 1.2em 0 1.6em; font-size: 15px; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc th { color: var(--ink); font: 600 12px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.callout { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin: 1.4em 0; position: relative; overflow: hidden; }
.callout::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: linear-gradient(var(--accent), var(--pink)); }
.callout p:last-child { margin: 0; }
.toc { margin: 1.6em 0; padding: 18px 22px 18px 44px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; columns: 2; column-gap: 36px; font-size: 15px; }
.toc li { color: var(--ink-3); }

/* ---------- Footer ---------- */
.footer { position: relative; overflow: hidden; border-top: 1px solid var(--line); padding: 40px max(20px, calc((100% - var(--wrap)) / 2)) 0; color: var(--ink-3); font-size: 14px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 18px 32px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer-links a { color: var(--ink-2); text-decoration: none; font-weight: 600; }
.footer-links a:hover { color: var(--ink); }
.fine { margin: 18px 0 0; }
.footer-mark { /* full-bleed wordmark, sized to the viewport so it always fits */
  width: 100vw; margin: 28px 0 -0.12em calc(50% - 50vw); text-align: center;
  font: 800 18vw/.8 var(--display); letter-spacing: -0.06em;
  white-space: nowrap; user-select: none;
  color: transparent; -webkit-text-stroke: 1px rgba(157, 123, 255, .28);
  background: linear-gradient(to bottom, rgba(157, 123, 255, .10), transparent 80%); -webkit-background-clip: text; background-clip: text;
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .sides { grid-template-columns: 1fr; gap: 56px; }
  .releases { position: static; }
  .releases .log { max-height: none; overflow: visible; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 56px; }
  .hero-art { order: -1; max-width: 300px; justify-self: start; margin-bottom: -24px; }
  .hero::before { right: -380px; top: -300px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar { gap: 12px; padding-top: 12px; padding-bottom: 12px; }
  .topbar nav { display: none; }
  .pill { margin-left: auto; }
  .track { grid-template-columns: 40px minmax(0, 1fr); }
  .tag { display: none; }
  .btn { width: 100%; justify-content: center; }
  .toc { columns: 1; }
  .hero-art { max-width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { opacity: 1; transform: none; animation: none; }
  .grooves, .loop .comet, .live, .eq i { animation: none !important; }
}
