/* ============================================================
   ClipFlow — Multi-platform video publishing
   Shared stylesheet
   ============================================================ */

:root {
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-light: #eef2ff;
  --accent: #7c3aed;
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --success: #059669;
  --danger: #dc2626;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.5);
}
.btn-primary:hover { box-shadow: 0 12px 26px -6px rgba(79, 70, 229, 0.6); }

.btn-ghost {
  background: var(--bg);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: #cbd5e1; background: var(--bg-soft); }

.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}
.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: 15px;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 12px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 88px 0 72px;
  text-align: center;
  background:
    radial-gradient(800px 400px at 20% 0%, rgba(79, 70, 229, 0.10), transparent 60%),
    radial-gradient(700px 400px at 80% 10%, rgba(124, 58, 237, 0.10), transparent 60%),
    var(--bg);
  overflow: hidden;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--brand-light);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: 52px;
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 18px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.sub {
  font-size: 19px;
  max-width: 640px;
  margin: 0 auto 32px;
  color: var(--ink-soft);
}
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.platforms-row {
  margin-top: 48px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: 34px; font-weight: 800; }
.section-head p { font-size: 17px; }

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.feature .icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
}
.feature h3 { font-size: 19px; margin-bottom: 8px; }
.feature p { margin: 0; font-size: 15px; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  counter-reset: step;
}
.step {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 700;
  margin-bottom: 16px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { margin: 0; font-size: 15px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--brand), var(--accent));
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  color: #fff;
}
.cta-band h2 { color: #fff; font-size: 32px; }
.cta-band p { color: rgba(255, 255, 255, 0.9); font-size: 17px; max-width: 560px; margin: 0 auto 28px; }
.btn-white {
  background: #fff;
  color: var(--brand);
  font-weight: 700;
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
  background: var(--bg-soft);
  margin-top: 72px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 4px; }
.footer-col a { color: var(--ink-soft); font-size: 14px; }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-faint);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background:
    radial-gradient(800px 400px at 50% 0%, rgba(79, 70, 229, 0.08), transparent 60%),
    var(--bg-soft);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.auth-card .brand { justify-content: center; margin-bottom: 8px; }
.auth-card h1 { text-align: center; font-size: 24px; }
.auth-card .sub { text-align: center; color: var(--ink-faint); margin-bottom: 28px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  transition: border 0.12s ease, box-shadow 0.12s ease;
}
.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.field .hint { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 14px; color: var(--ink-faint); }
.form-error {
  display: none;
  background: #fef2f2;
  color: var(--danger);
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 18px;
}

/* ---------- Dashboard ---------- */
.dash-top {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.dash-top .nav-inner { height: 60px; }
.dash-body { max-width: 1120px; margin: 0 auto; padding: 32px 24px; }
.dash-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.dash-head h1 { font-size: 26px; margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.stat .num { font-size: 28px; font-weight: 800; }
.stat .label { font-size: 13px; color: var(--ink-faint); }
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.card h3 { font-size: 17px; margin-bottom: 16px; }
.account-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.account-row:last-child { border-bottom: none; }
.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.account-name { font-weight: 600; }
.account-meta { font-size: 13px; color: var(--ink-faint); }
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
}
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.chip.connected { background: #ecfdf5; color: var(--success); }
.chip.pending { background: #fffbeb; color: #b45309; }

/* ---------- Legal pages ---------- */
.legal {
  max-width: 780px;
  margin: 0 auto;
  padding: 64px 24px 40px;
}
.legal h1 { font-size: 34px; }
.legal .updated { color: var(--ink-faint); font-size: 14px; margin-bottom: 32px; }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal h3 { font-size: 17px; margin-top: 24px; }
.legal p, .legal li { color: var(--ink-soft); font-size: 15.5px; }
.legal ul { padding-left: 22px; }
.legal li { margin-bottom: 6px; }

/* ---------- Callback page ---------- */
.callback-card {
  max-width: 640px;
  margin: 48px auto;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}
.copy-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin: 10px 0 22px;
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", "Consolas", monospace;
  font-size: 13px;
}
.copy-box button {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero h1 { font-size: 38px; }
  .features-grid, .steps, .stat-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 32px; }
  .section { padding: 48px 0; }
}

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
  max-width: 960px;
  margin: 0 auto;
}
.price-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  position: relative;
}
.price-card.featured {
  border-color: var(--brand);
  box-shadow: 0 18px 40px -18px rgba(79, 70, 229, 0.45);
}
.plan-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}
.plan-name { font-size: 17px; font-weight: 700; }
.plan-desc { font-size: 14px; color: var(--ink-faint); min-height: 40px; margin-bottom: 12px; }
.price-amount { font-size: 44px; font-weight: 800; margin: 8px 0 2px; }
.price-amount .period { font-size: 16px; font-weight: 500; color: var(--ink-faint); }
.price-list { list-style: none; padding: 0; margin: 20px 0 24px; }
.price-list li {
  padding: 9px 0;
  font-size: 15px;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.price-list li:last-child { border-bottom: none; }
.price-list li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-list details {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-list summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 22px; color: var(--brand); font-weight: 700; flex-shrink: 0; }
.faq-list details[open] summary::after { content: "–"; }
.faq-body { padding: 0 22px 20px; font-size: 15px; color: var(--ink-soft); }

/* ---------- About / page hero ---------- */
.page-hero { padding: 72px 0 24px; text-align: center; }
.page-hero h1 { font-size: 40px; font-weight: 800; }
.page-hero p { max-width: 640px; margin: 0 auto; font-size: 18px; color: var(--ink-soft); }
.contact-card { max-width: 640px; margin: 48px auto; }

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