/* ============================================
   WAVERUNNER — Dark Studio Aesthetic
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0D0D0D;
  --bg-2: #141414;
  --bg-3: #1A1A1A;
  --fg: #F5F0E8;
  --fg-muted: rgba(245,240,232,0.5);
  --fg-dim: rgba(245,240,232,0.25);
  --accent: #E8A838;
  --accent-dim: rgba(232,168,56,0.15);
  --accent-glow: rgba(232,168,56,0.08);
  --border: rgba(245,240,232,0.08);
  --border-accent: rgba(232,168,56,0.3);
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --- Typography --- */
h1, h2, h3 {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
  line-height: 1.05;
  color: var(--fg);
}

/* --- HERO --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--bg);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(232,168,56,0.18) 0%, transparent 70%);
  top: 50%;
  right: 10%;
  transform: translateY(-50%);
  animation: orbPulse 6s ease-in-out infinite;
}

.orb-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(232,168,56,0.08) 0%, transparent 70%);
  bottom: 20%;
  right: 25%;
  animation: orbPulse 8s ease-in-out infinite reverse;
}

@keyframes orbPulse {
  0%, 100% { opacity: 0.6; transform: translateY(-50%) scale(1); }
  50% { opacity: 1; transform: translateY(-50%) scale(1.08); }
}

.waveform-bg {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 320px;
  opacity: 0.6;
}

.waveform-bg svg {
  width: 100%;
  height: 100%;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 120px 40px;
  text-align: center;
}

.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 28px;
}

.label-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero-headline {
  font-size: clamp(4rem, 10vw, 8.5rem);
  color: var(--fg);
  margin-bottom: 28px;
  line-height: 0.95;
}

.headline-accent {
  color: var(--accent);
}

.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--fg-muted);
  max-width: 580px;
  margin: 0 auto 56px;
  font-weight: 300;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.stat { text-align: center; }

.stat-value {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.8rem;
  color: var(--fg);
  letter-spacing: 0.05em;
}

.stat-label {
  display: block;
  font-size: 0.72rem;
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'Space Mono', monospace;
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* --- SECTION SHARED --- */
.section-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 100px 40px;
}

.section-inner.reverse {
  direction: rtl;
}

.section-inner.reverse > * {
  direction: ltr;
}

.step-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
  color: var(--accent);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.section-heading {
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  margin-bottom: 20px;
}

.section-body {
  color: var(--fg-muted);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 300;
  margin-bottom: 32px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--fg-muted);
}

.check-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
}

/* --- COMPOSE SECTION --- */
.compose-section { background: var(--bg-2); }

.compose-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 320px;
}

.waveform-grid {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 100%;
  width: 100%;
  padding: 0 20px;
}

.wave-bar {
  flex: 1;
  height: var(--h, 60%);
  background: linear-gradient(to top, var(--accent), rgba(232,168,56,0.3));
  border-radius: 3px 3px 0 0;
  animation: waveUp var(--d, 0.5s) ease-in-out infinite alternate;
  transform-origin: bottom;
}

@keyframes waveUp {
  0% { height: calc(var(--h) * 0.4); opacity: 0.5; }
  100% { height: var(--h); opacity: 1; }
}

.compose-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232,168,56,0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
}

/* --- MASTER SECTION --- */
.master-section { background: var(--bg); }

.master-meter {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  width: 100%;
  max-width: 320px;
}

.meter-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.meter-bar {
  height: 8px;
  background: rgba(245,240,232,0.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 8px;
}

.meter-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--accent), #f0c060);
  border-radius: 4px;
  animation: meterLoad 2.5s ease-out forwards;
}

@keyframes meterLoad {
  0% { width: 0%; }
  60% { width: 78%; }
  100% { width: 72%; }
}

.meter-marks {
  display: flex;
  justify-content: space-between;
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  color: var(--fg-dim);
  margin-bottom: 16px;
}

.meter-readout {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Space Mono', monospace;
  font-size: 0.8rem;
  color: var(--fg);
}

.meter-ok {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.master-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(232,168,56,0.1) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
}

/* --- DISTRIBUTE SECTION --- */
.distribute-section { background: var(--bg-2); }

.release-rings {
  position: relative;
  width: 280px;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  animation: ringExpand 4s ease-out infinite;
}

.ring-1 {
  width: 100px; height: 100px;
  border-color: rgba(232,168,56,0.6);
}

.ring-2 {
  width: 180px; height: 180px;
  border-color: rgba(232,168,56,0.3);
  animation-delay: 1.3s;
}

.ring-3 {
  width: 260px; height: 260px;
  border-color: rgba(232,168,56,0.12);
  animation-delay: 2.6s;
}

@keyframes ringExpand {
  0% { transform: scale(0.85); opacity: 1; }
  100% { transform: scale(1.1); opacity: 0; }
}

.release-center {
  width: 56px;
  height: 56px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}

/* --- MANIFESTO --- */
.manifesto {
  background: var(--bg);
  padding: 100px 40px;
  text-align: center;
}

.manifesto-inner {
  max-width: 720px;
  margin: 0 auto;
}

.manifesto-quote-mark {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 6rem;
  color: var(--accent);
  line-height: 1;
  opacity: 0.4;
  margin-bottom: -20px;
}

.manifesto-text {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-style: italic;
  color: var(--fg-muted);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 24px;
}

.manifesto-attr {
  font-size: 0.9rem;
  color: var(--fg-dim);
  line-height: 1.6;
}

/* --- CLOSING --- */
.closing {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  padding: 120px 40px;
  text-align: center;
}

.closing-inner { max-width: 760px; margin: 0 auto; }

.closing-headline {
  font-size: clamp(3rem, 7vw, 5.5rem);
  margin-bottom: 28px;
}

.closing-accent { color: var(--accent); }

.closing-body {
  font-size: 1.1rem;
  color: var(--fg-muted);
  font-weight: 300;
  max-width: 520px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

.closing-meta { display: flex; justify-content: center; }

.closing-tag {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.tag-pill {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--border-accent);
  border-radius: 20px;
  font-size: 0.75rem;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}

/* --- FOOTER --- */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 40px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.05em;
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--fg-dim);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero-content { padding: 80px 24px; }
  .hero-headline { font-size: 3.5rem; }
  .hero-stats { gap: 20px; }
  .stat-divider { display: none; }
  .section-inner { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px; }
  .section-inner.reverse { direction: ltr; }
  .compose-visual { height: 200px; }
  .release-rings { width: 200px; height: 200px; }
  .ring-1 { width: 70px; height: 70px; }
  .ring-2 { width: 130px; height: 130px; }
  .ring-3 { width: 190px; height: 190px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

/* --- NAV --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 40px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--accent); }

/* --- APP PAGE --- */
.app-shell {
  min-height: 100vh;
  padding-top: 60px;
  background: var(--bg);
}

.app-header {
  padding: 48px 40px 0;
  max-width: 1100px;
  margin: 0 auto;
}

.app-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.app-subtitle {
  color: var(--fg-muted);
  font-size: 1rem;
  font-weight: 300;
}

.app-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 40px 80px;
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 40px;
}

.panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}

.panel-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  margin-bottom: 24px;
  color: var(--fg);
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 8px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--border-accent);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E8A838' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-textarea { resize: vertical; min-height: 80px; }

.bpm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-generate {
  width: 100%;
  padding: 14px;
  background: var(--accent);
  color: #0D0D0D;
  border: none;
  border-radius: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-generate:hover { opacity: 0.88; }
.btn-generate:active { transform: scale(0.98); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }

/* Tracks feed */
.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.feed-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
}

.feed-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--fg-dim);
}

.feed-empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.feed-empty-text {
  font-size: 0.9rem;
  color: var(--fg-muted);
}

.track-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  background: var(--bg-3);
  transition: border-color 0.2s;
}

.track-item:hover { border-color: var(--border-accent); }

.track-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 8px;
}

.track-title {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--fg);
  flex: 1;
}

.track-status {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  flex-shrink: 0;
}

.status-generating {
  background: var(--accent-dim);
  color: var(--accent);
  animation: pulse 1.5s ease-in-out infinite;
}

.status-complete {
  background: rgba(80,200,120,0.15);
  color: #50c878;
}

.status-failed {
  background: rgba(200,80,80,0.15);
  color: #c85050;
}

.status-pending {
  background: rgba(245,240,232,0.08);
  color: var(--fg-muted);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.track-meta {
  display: flex;
  gap: 16px;
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem;
  color: var(--fg-dim);
  margin-bottom: 10px;
}

.track-actions { display: flex; gap: 8px; }

.btn-audio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 6px;
  color: var(--accent);
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-audio:hover { background: rgba(232,168,56,0.25); }

/* Generation progress */
.gen-progress {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.gen-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.gen-prompt-text {
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-style: italic;
  margin-bottom: 16px;
  line-height: 1.5;
}

.gen-spinner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.spinner-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.spinner-bar {
  width: 4px;
  background: var(--accent);
  border-radius: 2px;
  animation: spinBar 0.8s ease-in-out infinite;
}

.spinner-bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.spinner-bar:nth-child(2) { height: 70%; animation-delay: 0.15s; }
.spinner-bar:nth-child(3) { height: 50%; animation-delay: 0.3s; }
.spinner-bar:nth-child(4) { height: 80%; animation-delay: 0.45s; }

@keyframes spinBar {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.spinner-text {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--fg-muted);
}

/* Prompt preview */
.prompt-preview {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--fg-muted);
  font-style: italic;
  min-height: 48px;
}

.preview-label {
  font-family: 'Space Mono', monospace;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 6px;
}

@media (max-width: 900px) {
  .app-body { grid-template-columns: 1fr; }
}