/*
Design direction: this is an audio mastering tool - the visual world
is a mixing console at night, not a generic SaaS dashboard. Near-black
background, a warm analog-amber accent (like a VU meter needle/tube
gear glow), monospace for anything numeric (credits, LUFS, durations)
to read like a meter readout, a clean grotesque for everything else.

Mobile-first: base styles target a phone; min-width media queries add
layout for wider viewports, never the other way around.
*/

:root {
  --bg: #0e0d0c;
  --bg-panel: #171513;
  --bg-panel-raised: #201d1a;
  --border: #322d28;
  --text: #ece7e0;
  --text-dim: #9a9186;
  --amber: #e8a13c;
  --amber-hover: #f0ab48;
  --amber-dim: #8a6428;
  --amber-glow: rgba(232, 161, 60, 0.18);
  --noise-dim: #4a453f;
  --green: #6fae6f;
  --red: #c66b5a;
  --radius: 4px;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "SF Mono", "Consolas", "Menlo", monospace;
  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid transparent;
  flex-wrap: wrap;
  gap: 8px;
  position: sticky;
  top: 0;
  z-index: 20;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.topbar-scrolled {
  background: rgba(14, 13, 12, 0.88);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.brand-icon { width: 26px; height: 26px; border-radius: 6px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-primary { font-size: 0.95rem; }
.brand-secondary { font-size: 0.62rem; font-weight: 500; color: var(--text-dim); letter-spacing: 0.01em; }
.brand .dot { color: var(--amber); }

.nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; font-size: 0.9rem; }
.nav a { color: var(--text-dim); text-decoration: none; }
.nav a:hover, .nav a:focus-visible { color: var(--text); }

.credits-badge {
  font-family: var(--font-mono);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px 10px;
  font-size: 0.85rem;
  color: var(--amber);
}
.credits-badge-owner {
  border-color: var(--amber-dim);
  background: var(--amber-glow);
  font-weight: 600;
}

.site-footer {
  max-width: 880px;
  margin: 40px auto 0;
  padding: 20px 16px 32px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.site-footer p {
  margin: 0 0 4px;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.site-footer strong { color: var(--text); font-weight: 600; }

main {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 64px;
}

h1, h2, h3, .brand { font-family: var(--font-display); }
h1 { font-size: 1.5rem; margin: 0 0 6px; letter-spacing: -0.01em; }
h2 { font-size: 1.15rem; margin: 28px 0 10px; letter-spacing: -0.005em; }
p.lede { color: var(--text-dim); margin: 0 0 24px; font-size: 0.95rem; }

.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.dropzone {
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 16px;
  text-align: center;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s;
}
.dropzone.drag-over { border-color: var(--amber); color: var(--text); }
.dropzone strong { color: var(--text); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.85rem; color: var(--text-dim); margin-bottom: 5px; }
.field input[type="email"],
.field input[type="password"],
.field input[type="text"],
.field select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--amber);
}

.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  min-height: 44px; /* touch target */
}
.btn-primary { background: var(--amber); color: #1a1408; }
.btn-primary:hover { background: #f0ab48; }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--amber-dim); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }

.error-text { color: var(--red); font-size: 0.85rem; margin-top: 8px; }

table.jobs { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.jobs th, table.jobs td {
  text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border);
}
table.jobs th { color: var(--text-dim); font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.status-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}
.status-queued { background: #2a2620; color: var(--text-dim); }
.status-processing { background: #3a2e14; color: var(--amber); }
.status-done { background: #1c2e1c; color: var(--green); }
.status-failed { background: #33201c; color: var(--red); }

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.tier {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.tier.featured { border-color: var(--amber-dim); }
.tier .price { font-family: var(--font-mono); font-size: 1.6rem; color: var(--amber); margin: 8px 0; }
.tier .price small { font-size: 0.9rem; color: var(--text-dim); font-family: var(--font-body); }
.tier ul { padding-left: 18px; color: var(--text-dim); font-size: 0.9rem; }

/* mobile-first base above; widen layout at larger breakpoints */
@media (min-width: 640px) {
  main { padding-top: 32px; }
  .pricing-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 900px) {
  .panel { padding: 24px; }
}

/* ---- landing page ---- */
/* Signature: the hero canvas is the page's thesis made visual - dense,
   dim, jittery bars (noise) resolving into a few calm amber bars
   (the isolated, mastered voice). Everything else stays quiet and
   static around it - one bold moment, disciplined surroundings. */

.hero {
  position: relative;
  padding: 48px 8px 40px;
  overflow: hidden;
}
.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 620px;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: 2rem;
  line-height: 1.18;
  font-weight: 600;
  margin: 0 0 16px;
  letter-spacing: -0.015em;
}
.hero h1 em {
  font-style: normal;
  color: var(--amber);
}
.hero-sub {
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 0 28px;
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.hero-ctas .btn { width: 100%; }

.hero-canvas-wrap {
  position: relative;
  height: 120px;
  margin: 0 -8px 32px;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(232,161,60,0.04), transparent);
}
#hero-waveform { display: block; width: 100%; height: 100%; }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trust-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.trust-badge strong { color: var(--amber); font-weight: 600; }

/* signal chain - a REAL sequence (input -> output), so numbering
   carries genuine information here rather than decorating a flat list */
.chain-section { margin: 56px 0; }
.chain-intro { max-width: 520px; margin: 0 0 32px; }
.chain-intro h2 { font-size: 1.5rem; margin-bottom: 10px; }
.chain-intro p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

.chain {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.chain-step {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
}
.chain-step:last-child { border-bottom: 1px solid var(--border); }
.chain-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--amber);
  flex-shrink: 0;
  width: 28px;
  padding-top: 2px;
}
.chain-body h3 {
  font-size: 1.02rem;
  margin: 0 0 6px;
  font-weight: 600;
}
.chain-body p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.55;
}

/* mastering emphasis - small animated loudness meter as a secondary,
   quieter signature detail reinforcing the "close and loud" claim */
.master-section {
  margin: 56px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
.master-copy h2 { font-size: 1.5rem; margin-bottom: 10px; }
.master-copy p { color: var(--text-dim); font-size: 0.95rem; line-height: 1.6; margin: 0; }
.meter-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.meter-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}
.meter-track {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-panel-raised);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}
.meter-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--amber-dim), var(--amber));
  width: 0%;
  transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.meter-track.filled .meter-fill { width: var(--fill, 88%); }
.meter-track:last-of-type { margin-bottom: 0; }

.cta-band {
  position: relative;
  text-align: left;
  background: var(--bg-panel);
  border: 1px solid var(--amber-dim);
  border-radius: var(--radius);
  padding: 36px 24px;
  margin: 56px 0 20px;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  top: -60%;
  right: -20%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, var(--amber-glow), transparent 70%);
  pointer-events: none;
}
.cta-band-inner { position: relative; z-index: 1; }
.cta-band h2 { margin: 0 0 8px; font-size: 1.4rem; }
.cta-band p { color: var(--text-dim); margin: 0 0 20px; }
.cta-band .btn { width: 100%; }

@media (min-width: 640px) {
  .hero { padding: 72px 8px 56px; }
  .hero-inner { max-width: 560px; }
  .hero h1 { font-size: 2.6rem; }
  .hero-ctas { flex-direction: row; }
  .hero-ctas .btn { width: auto; }
  .hero-canvas-wrap { margin: 0 0 36px; height: 140px; }
  .master-section { grid-template-columns: 1fr 1fr; gap: 48px; }
  .cta-band { padding: 48px; }
  .cta-band h2 { font-size: 1.7rem; }
  .cta-band .btn { width: auto; }
}

@media (min-width: 900px) {
  .hero-canvas-wrap { height: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .meter-fill { transition: none; }
}
