/* ---------- Design tokens ---------- */
:root {
  --bg: #0a0b0f;
  --bg-elevated: #13151c;
  --bg-card: #171a23;
  --border: rgba(255, 255, 255, 0.08);
  --text: #f3f4f8;
  --text-dim: #9aa1b4;
  --text-faint: #666e80;
  --accent: #ff5b3c;
  --accent-2: #7c5cff;
  --accent-gradient: linear-gradient(120deg, #ff5b3c 0%, #ff8a3c 45%, #7c5cff 100%);
  --success: #35d68f;
  --danger: #ff5c7a;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  --max-width: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Background texture ---------- */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(255, 91, 60, 0.16), transparent 60%),
    radial-gradient(ellipse 800px 500px at 90% 10%, rgba(124, 92, 255, 0.14), transparent 60%),
    var(--bg);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 11, 15, 0.75);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-mark svg { width: 18px; height: 18px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--text-dim);
}
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent-gradient);
  color: #0a0b0f;
}
.btn-primary:hover { opacity: 0.92; }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  text-align: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 28px;
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

h1 {
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
  font-weight: 800;
}
h1 .accent-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.subhead {
  max-width: 620px;
  margin: 0 auto 36px;
  color: var(--text-dim);
  font-size: 1.15rem;
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero-note { font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Waveform visual ---------- */
.waveform {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 120px;
  margin: 56px auto 0;
  max-width: 640px;
}
.waveform span {
  width: 6px;
  border-radius: 4px;
  background: var(--accent-gradient);
  opacity: 0.85;
  animation: bounce 1.4s ease-in-out infinite;
}
@keyframes bounce {
  0%, 100% { transform: scaleY(0.3); }
  50% { transform: scaleY(1); }
}

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.section-head p { color: var(--text-dim); font-size: 1.05rem; margin: 0; }
.eyebrow-sm {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 12px;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
}
.step-num {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 18px;
}
.step h3 { margin: 0 0 8px; font-size: 1.15rem; }
.step p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  padding: 26px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.feature .icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 91, 60, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.feature h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

@media (max-width: 860px) {
  .features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
}

/* ---------- Pricing ---------- */
.pricing-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid rgba(255, 91, 60, 0.35);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent-gradient);
  opacity: 0.06;
  pointer-events: none;
}
.price-tag { display: flex; align-items: baseline; gap: 6px; margin: 18px 0 6px; }
.price-tag .amount { font-size: 3.2rem; font-weight: 800; letter-spacing: -0.03em; }
.price-tag .period { color: var(--text-dim); font-size: 1rem; }
.plan-name { font-weight: 700; font-size: 1.1rem; }
.plan-desc { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 24px; }
.plan-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; gap: 12px; }
.plan-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.95rem; color: var(--text); }
.plan-list li .check {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(53, 214, 143, 0.15); color: var(--success);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; font-size: 0.7rem;
}
.pricing-fine { text-align: center; color: var(--text-faint); font-size: 0.85rem; margin-top: 40px; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 12px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  overflow: hidden;
}
.faq-item summary {
  padding: 20px 24px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--text-dim);
  margin-left: 12px;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { margin: 0; padding: 0 24px 20px; color: var(--text-dim); }

/* ---------- CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 56px;
  text-align: center;
}
.cta-banner h2 { margin: 0 0 12px; font-size: clamp(1.6rem, 3vw, 2.2rem); }
.cta-banner p { color: var(--text-dim); margin: 0 0 28px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  color: var(--text-faint);
  font-size: 0.9rem;
}
footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
footer .foot-links { display: flex; gap: 20px; }
footer a:hover { color: var(--text-dim); }

/* ---------- Auth pages ---------- */
.auth-shell {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
}
.auth-card h1 { font-size: 1.6rem; margin: 0 0 6px; }
.auth-card .sub { color: var(--text-dim); margin: 0 0 28px; font-size: 0.95rem; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.95rem;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.form-error {
  background: rgba(255, 92, 122, 0.1);
  border: 1px solid rgba(255, 92, 122, 0.3);
  color: var(--danger);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 18px;
  display: none;
}
.form-error.visible { display: block; }
.auth-switch { text-align: center; margin-top: 22px; font-size: 0.9rem; color: var(--text-dim); }
.auth-switch a { color: var(--accent); font-weight: 600; }

/* ---------- Dashboard ---------- */
.dash-header {
  padding: 48px 0 24px;
}
.dash-header h1 { margin: 0 0 6px; font-size: 1.9rem; }
.dash-header p { color: var(--text-dim); margin: 0; }

.usage-bar-track {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  margin: 14px 0 6px;
}
.usage-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 999px;
  transition: width 0.3s ease;
}

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 24px;
  text-align: center;
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(255, 91, 60, 0.06);
}
.upload-zone h3 { margin: 16px 0 6px; }
.upload-zone p { margin: 0; color: var(--text-dim); font-size: 0.9rem; }
.upload-zone input { display: none; }

.upsell-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 91, 60, 0.3);
  border-radius: var(--radius-lg);
  padding: 48px;
  text-align: center;
}

.job-list { display: grid; gap: 12px; margin-top: 32px; }
.job-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  flex-wrap: wrap;
}
.job-row .job-name { font-weight: 600; }
.job-row .job-meta { color: var(--text-faint); font-size: 0.82rem; margin-top: 2px; }
.job-status {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
}
.job-status.processing { background: rgba(255, 184, 76, 0.15); color: #ffb84c; }
.job-status.done { background: rgba(53, 214, 143, 0.15); color: var(--success); }
.job-status.failed { background: rgba(255, 92, 122, 0.15); color: var(--danger); }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

/* ---------- Practice tools panel ---------- */
.practice-panel {
  margin-top: 10px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-card);
  display: grid;
  gap: 16px;
}
.practice-row input[type="range"] { width: 100%; accent-color: var(--accent); }
.practice-loop-row .field-label { margin-bottom: 8px; }

/* ---------- Pricing grid (multi-tier) ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  align-items: stretch;
}
.pricing-grid .pricing-card {
  max-width: none;
  margin: 0;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
}
.pricing-grid .pricing-card.featured {
  border-color: rgba(124, 92, 255, 0.5);
}
.plan-badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--accent-gradient);
  color: #0a0b0f;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  z-index: 1;
}
.pricing-grid .plan-list { margin-bottom: 24px; flex: 1; }
.pricing-grid .price-tag .amount { font-size: 2.3rem; }
.plan-list li .cross {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(154, 161, 180, 0.12); color: var(--text-faint);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px; font-size: 0.7rem;
}
.plan-list li.unavailable { color: var(--text-faint); }

@media (max-width: 980px) {
  .pricing-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* ---------- Form selects, tier badge, upgrade banner (dashboard) ---------- */
.field-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 8px;
  font-weight: 600;
}
.select-field {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 18px;
}
.tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.upgrade-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--bg-card);
  border: 1px solid rgba(124, 92, 255, 0.35);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin-bottom: 24px;
}
.upgrade-banner p { margin: 0; color: var(--text-dim); font-size: 0.92rem; }

/* ---------- Legal pages ---------- */
.legal { padding: 64px 0 100px; }
.legal .wrap { max-width: 760px; }
.legal h1 { margin-bottom: 8px; }
.legal .updated { color: var(--text-faint); font-size: 0.9rem; margin-bottom: 40px; }
.legal h2 { margin-top: 40px; font-size: 1.3rem; }
.legal p, .legal li { color: var(--text-dim); }

/* ---------- Utilities ---------- */
.center { text-align: center; }
.mt-24 { margin-top: 24px; }
.hidden { display: none !important; }
