/*
 * MuseFlow Design System — based on Linear
 * One file, all components. Pages only write HTML.
 */

/* ── Design Tokens ── */
:root {
  /* Backgrounds */
  --bg-root: #08090a;
  --bg-panel: #0f1011;
  --bg-surface: #191a1b;
  --bg-hover: #28282c;

  /* Text */
  --text-primary: #f7f8f8;
  --text-secondary: #d0d6e0;
  --text-tertiary: #8a8f98;
  --text-muted: #62666d;

  /* Accent — MuseFlow cyan-teal */
  --accent: #06b6d4;
  --accent-hover: #22d3ee;
  --accent-dim: #0e7490;

  /* Borders */
  --border-subtle: rgba(255,255,255,0.05);
  --border-standard: rgba(255,255,255,0.08);
  --border-strong: rgb(35,37,42);

  /* Radius */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-focus: rgba(0,0,0,0.1) 0px 4px 12px;
  --shadow-float: rgba(0,0,0,0.4) 0px 2px 4px;
}

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

/* ── Font Import ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

body {
  background: var(--bg-root);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv01', 'ss03';
}

/* ── Layout ── */
.l-container {
  max-width: 520px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.l-center { text-align: center; }
.l-flex { display: flex; gap: 1rem; align-items: center; }
.l-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.l-stack { display: flex; flex-direction: column; gap: 1rem; }

@media (max-width: 480px) {
  .l-grid-2 { grid-template-columns: 1fr; }
}

/* ── Typography ── */
.t-hero {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.t-title {
  font-size: 1.25rem;
  font-weight: 590;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.t-body {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-secondary);
}
.t-small {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-tertiary);
}
.t-caption {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.t-mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px;
}

/* ── Nav ── */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 2rem;
}
.nav-brand {
  font-size: 16px;
  font-weight: 590;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.btn:focus-visible { box-shadow: var(--shadow-focus); outline: none; }

.btn-primary {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary {
  background: rgba(255,255,255,0.02);
  color: var(--text-secondary);
  border-color: var(--border-standard);
}
.btn-secondary:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.btn-ghost {
  background: transparent;
  color: var(--text-tertiary);
  border-color: transparent;
  padding: 4px 8px;
  font-size: 13px;
}
.btn-ghost:hover { color: var(--text-primary); }

.btn-block { width: 100%; }
.btn-lg { padding: 10px 24px; font-size: 15px; }

/* ── Cards ── */
.card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all 0.2s ease;
}
.card-interactive {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.card-interactive:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}
.card-highlight {
  background: rgba(6,182,212,0.04);
  border-color: rgba(6,182,212,0.15);
}

/* ── Inputs ── */
.input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-standard);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  transition: border-color 0.15s;
}
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.input::placeholder { color: var(--text-muted); }

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

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  color: var(--accent-hover);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
}

/* ── Divider ── */
.hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 1.5rem 0;
}

/* ── Image result ── */
.img-result {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-top: 1rem;
  border: 1px solid var(--border-standard);
}

/* ── Error / Status ── */
.msg-error {
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: #fca5a5;
  font-size: 14px;
}
.msg-success {
  background: rgba(52,211,153,0.08);
  border: 1px solid rgba(52,211,153,0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  color: #6ee7b7;
  font-size: 14px;
}

/* ── Pricing cards ── */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.pricing-card {
  text-align: center;
  cursor: pointer;
}
.pricing-card .price-amount {
  font-size: 2rem;
  font-weight: 590;
  margin: 0.25rem 0;
}
.pricing-card .price-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pricing-card.best-value {
  background: rgba(6,182,212,0.04);
  border-color: rgba(6,182,212,0.15);
}
@media (max-width: 480px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ── Spinner ── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner.active { display: inline-block; }

/* ── Service entry card (big clickable) ── */
.service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  gap: 0.5rem;
}
.service-card .service-icon {
  font-size: 2.5rem;
  margin-bottom: 0.25rem;
}
.service-card .service-cost {
  margin-top: 0.5rem;
}

/* ── Footer ── */
.footer {
  text-align: center;
  padding: 2rem 0;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  margin-top: 3rem;
}
