/* MusicGen landing — editorial, ink and lime. */

:root {
  --ink: #06070b;
  --ink-2: #0b0d14;
  --paper: #f1f3ec;
  --muted: #99a1a0;
  --line: rgba(241, 243, 236, 0.12);
  --lime: #c6f24e;
  --violet: #9aa8ff;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 520px at 82% -10%, rgba(154, 168, 255, 0.16), transparent 62%),
    radial-gradient(700px 420px at 4% 12%, rgba(198, 242, 78, 0.09), transparent 60%),
    var(--ink);
  color: var(--paper);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

/* ------------------------------------------------------------------ bar */
.bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 11, 0.82);
  backdrop-filter: blur(14px) saturate(130%);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--paper);
}
.wordmark.small { font-size: 12px; }

.mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 16px; }
.mark i {
  display: block;
  width: 2px;
  background: var(--lime);
  border-radius: 1px;
  animation: bounce 1.4s ease-in-out infinite;
}
.mark i:nth-child(1) { height: 6px; animation-delay: 0s; }
.mark i:nth-child(2) { height: 14px; animation-delay: 0.12s; }
.mark i:nth-child(3) { height: 9px; animation-delay: 0.24s; }
.mark i:nth-child(4) { height: 16px; animation-delay: 0.36s; }
.mark i:nth-child(5) { height: 7px; animation-delay: 0.48s; }
@keyframes bounce {
  0%, 100% { transform: scaleY(0.6); opacity: 0.7; }
  50% { transform: scaleY(1.15); opacity: 1; }
}

.barnav { display: flex; align-items: center; gap: 22px; font-size: 13px; }
.barnav a { text-decoration: none; color: var(--muted); transition: color 140ms ease; }
.barnav a:hover { color: var(--paper); }
.barnav .ghost { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.barnav .cta {
  color: var(--ink);
  background: var(--lime);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
}
.barnav .cta:hover { filter: brightness(1.08); color: var(--ink); }

@media (max-width: 860px) {
  .barnav a:not(.cta):not(.ghost) { display: none; }
}

/* ------------------------------------------------------------------ hero */
main { max-width: 1180px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(40px, 7vw, 92px) 0 clamp(28px, 4vw, 48px);
}

@media (max-width: 940px) {
  .hero { grid-template-columns: 1fr; padding-top: 36px; }
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lime);
  margin: 0 0 18px;
}

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(42px, 7.2vw, 84px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  margin: 0 0 22px;
}
h1 em {
  font-style: italic;
  color: var(--lime);
  position: relative;
}
h1 em::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), transparent);
}

.lede {
  font-size: clamp(15px, 1.4vw, 17px);
  color: #c6ccc6;
  max-width: 46ch;
  margin: 0 0 28px;
}

.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(241, 243, 236, 0.04);
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  font-weight: 550;
  cursor: pointer;
  transition: transform 120ms ease, background 140ms ease, border-color 140ms ease;
}
.btn:hover { background: rgba(241, 243, 236, 0.1); border-color: rgba(241, 243, 236, 0.28); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.btn.primary:hover { filter: brightness(1.07); background: var(--lime); }
.btn.small { padding: 9px 15px; font-size: 13px; }

.hero-facts {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin: 0;
  padding: 20px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.hero-facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin-bottom: 2px;
}

/* -------------------------------------------------------------- specimen */
.specimen {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 24, 36, 0.9), rgba(8, 10, 16, 0.95));
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, 1), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 14px;
  position: relative;
  overflow: hidden;
}
.specimen::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 200px at 80% 0%, rgba(198, 242, 78, 0.1), transparent 70%);
  pointer-events: none;
}
.specimen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--lime);
  padding: 3px 9px;
  border-radius: 999px;
}
.specimen-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#spec-canvas {
  width: 100%;
  height: 220px;
  display: block;
  border-radius: 10px;
  background: rgba(6, 7, 11, 0.6);
}
.specimen-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.spec-link {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--violet);
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 168, 255, 0.4);
}
.spec-link:hover { color: var(--paper); }
.specimen-note {
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

/* --------------------------------------------------------------- marquee */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 14px 0;
  margin: 0 calc(-1 * clamp(16px, 4vw, 48px));
}
.marquee-track {
  display: flex;
  gap: 22px;
  width: max-content;
  animation: slide 46s linear infinite;
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 26px);
  color: rgba(241, 243, 236, 0.5);
  white-space: nowrap;
}
.marquee-track span:nth-child(even) { color: var(--lime); opacity: 0.7; }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* --------------------------------------------------------------- section */
.section { padding: clamp(44px, 6vw, 84px) 0; border-bottom: 1px solid var(--line); }
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 26px;
}

.three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 3vw, 40px);
}
@media (max-width: 820px) { .three { grid-template-columns: 1fr; } }

.three article { border-top: 1px solid var(--line); padding-top: 16px; }
.num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--lime);
  letter-spacing: 0.14em;
}
h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 25px);
  letter-spacing: -0.015em;
  margin: 8px 0 10px;
}
.three p, .card p { color: #b9c0b9; font-size: 14.5px; margin: 0 0 10px; }

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 900px) { .grid { grid-template-columns: 1fr; } }
.card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  background: linear-gradient(180deg, rgba(241, 243, 236, 0.035), rgba(241, 243, 236, 0.008));
}
.card.wide { grid-column: span 2; }
@media (max-width: 900px) { .card.wide { grid-column: span 1; } }
.card code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: rgba(198, 242, 78, 0.12);
  color: var(--lime);
  padding: 1px 5px;
  border-radius: 4px;
}
.card .mono {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--violet);
  border-top: 1px dashed var(--line);
  padding-top: 10px;
  margin-top: 14px;
}

/* ----------------------------------------------------------------- stats */
.stats dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin: 0;
}
@media (max-width: 820px) { .stats dl { grid-template-columns: repeat(2, 1fr); } }
.stats div { border-left: 1px solid var(--line); padding-left: 16px; }
.stats dt {
  font-family: var(--serif);
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--paper);
}
.stats dd {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* --------------------------------------------------------------- install */
.install {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
@media (max-width: 900px) { .install { grid-template-columns: 1fr; } }
.install h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin: 0 0 14px;
}
.install p { color: #b9c0b9; max-width: 48ch; margin: 0 0 22px; }
.install em { color: var(--paper); font-style: normal; border-bottom: 1px solid var(--lime); }

.code {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(6, 7, 11, 0.75);
  padding: 18px;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: #cfd6cf;
  overflow-x: auto;
}
.code .c { color: var(--muted); }

/* ------------------------------------------------------------------ foot */
.foot {
  max-width: 1180px;
  margin: 0 auto;
  padding: 34px clamp(16px, 4vw, 48px) 60px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.foot p { color: var(--muted); font-size: 13px; margin: 10px 0 0; max-width: 42ch; }
.foot nav { display: flex; gap: 20px; flex-wrap: wrap; font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.foot nav a { color: var(--muted); text-decoration: none; }
.foot nav a:hover { color: var(--paper); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
