:root {
  --brand: #7c3aed;
  --brand-light: #a78bfa;
  --surface: #0f1117;
  --surface-elevated: #171b26;
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: var(--surface);
  color: #e8ecf4;
  accent-color: var(--brand);
  color-scheme: dark;
}

.mesh-bg {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.35), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(6, 182, 212, 0.15), transparent),
    radial-gradient(ellipse 50% 30% at 0% 50%, rgba(124, 58, 237, 0.12), transparent),
    var(--surface);
}

.glass {
  background: rgba(23, 27, 38, 0.72);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
  box-shadow: 0 4px 24px rgba(124, 58, 237, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.45);
}

.btn-ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.upload-zone {
  border: 2px dashed rgba(124, 58, 237, 0.4);
  background: rgba(124, 58, 237, 0.04);
  transition: border-color 0.2s, background 0.2s;
}

.upload-zone.dragover {
  border-color: #a78bfa;
  background: rgba(124, 58, 237, 0.12);
}

.upload-zone.has-files {
  border-style: solid;
  border-color: rgba(16, 185, 129, 0.4);
  background: rgba(16, 185, 129, 0.05);
}

.stat-card {
  background: linear-gradient(145deg, rgba(23, 27, 38, 0.9) 0%, rgba(15, 17, 23, 0.95) 100%);
  border: 1px solid var(--border);
}

.pricing-card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.35);
}

.pricing-card.featured {
  border-color: rgba(124, 58, 237, 0.5);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.2), 0 24px 48px rgba(0, 0, 0, 0.4);
}

.task-row {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.progress-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #06b6d4);
  border-radius: 999px;
  transition: width 0.4s ease;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
select,
textarea,
button[type="submit"] {
  font-size: 1rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: #e8ecf4;
  box-sizing: border-box;
}

@media (pointer: coarse) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  select,
  textarea {
    min-height: 52px;
  }
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.85);
  outline-offset: 2px;
  border-color: rgba(124, 58, 237, 0.6);
}

input:user-invalid:not(:focus),
textarea:user-invalid:not(:focus) {
  border-color: rgba(239, 68, 68, 0.55);
}

.form-field {
  margin-block-end: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-queued {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
}

.badge-processing {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
}

.badge-done {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.badge-failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Before/After demo island (pure CSS+SVG, no external assets) */
.ba-demo {
  margin: 0;
}

.ba-demo__inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 380px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--border);
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
}

.ba-demo__layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ba-demo__after {
  background-color: #12151d;
  background-image:
    linear-gradient(45deg, #1b2030 25%, transparent 25%),
    linear-gradient(-45deg, #1b2030 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1b2030 75%),
    linear-gradient(-45deg, transparent 75%, #1b2030 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
}

.ba-demo__before {
  background:
    radial-gradient(circle at 25% 30%, rgba(244, 114, 182, 0.5), transparent 42%),
    radial-gradient(circle at 78% 72%, rgba(56, 189, 248, 0.45), transparent 46%),
    radial-gradient(circle at 62% 18%, rgba(250, 204, 21, 0.4), transparent 40%),
    linear-gradient(135deg, #3b2f4a, #26323f);
  clip-path: inset(0 calc(100% - var(--ba-pos, 50%)) 0 0);
}

.ba-demo__obj {
  width: 68%;
  height: 68%;
}

.ba-demo__tag {
  position: absolute;
  top: 0.6rem;
  padding: 0.18rem 0.55rem;
  border-radius: 0.4rem;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  z-index: 30;
}

.ba-demo__tag--before {
  left: 0.6rem;
}

.ba-demo__tag--after {
  right: 0.6rem;
}

.ba-demo__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba-pos, 50%);
  width: 2px;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--brand-light);
  transform: translateX(-50%);
  cursor: ew-resize;
  z-index: 40;
}

.ba-demo__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
}

.ba-demo__handle:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.85);
  outline-offset: 2px;
}

/* Blog article body */
.article-body {
  color: #cbd5e1;
  line-height: 1.75;
}

.article-body h2 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.article-body h3 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-body p {
  margin-bottom: 1rem;
}

.article-body ul,
.article-body ol {
  margin: 1rem 0 1rem 1.25rem;
  list-style: revert;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body a {
  color: var(--brand-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: #c4b5fd;
}

.article-body strong {
  color: #fff;
}
