/* ============================================================
   ZuoJiaAgent (作家智能体) — Marketing Site Shared Stylesheet
   Target domain: zuojiaagent.com
   Purpose: satisfy Paddle Domain Review requirements
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f7f8;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-soft: #f0f0f1;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #71717a;
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --accent: #0d9488;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;
  --radius: 12px;
  --radius-lg: 16px;
  --maxw: 1120px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

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

.section {
  padding: 72px 0;
}

.section--soft {
  background: var(--bg-soft);
}

.section--tight {
  padding: 48px 0;
}

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  flex-shrink: 0;
}

.brand-sub {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-faint);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 13px;
  border-radius: 8px;
  transition:
    color 0.15s,
    background 0.15s;
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-soft);
}

.nav-links a.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

.nav-links a.nav-cta {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.nav-links a.nav-cta:hover {
  background: var(--primary-dark);
  color: #fff;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    color 0.15s,
    transform 0.1s;
  line-height: 1.4;
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--primary);
  color: #fff;
}

.btn--primary:hover {
  background: var(--primary-dark);
}

.btn--ghost {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

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

.btn--sm {
  padding: 9px 18px;
  font-size: 14px;
}

.btn-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Typography ---------- */

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin: 0 0 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

h1 {
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(24px, 3vw, 32px);
}

h3 {
  font-size: 19px;
  margin-bottom: 10px;
}

h4 {
  font-size: 16px;
  margin-bottom: 8px;
}

p {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.lead {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 720px;
}

.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-head p {
  margin-bottom: 0;
}

/* ---------- Hero ---------- */

.hero {
  padding: 84px 0 72px;
  background:
    radial-gradient(900px 400px at 12% -8%, rgba(79, 70, 229, 0.09), transparent 60%),
    radial-gradient(700px 340px at 92% 4%, rgba(13, 148, 136, 0.08), transparent 60%),
    #fff;
  border-bottom: 1px solid var(--border-soft);
}

.hero h1 {
  max-width: 860px;
}

.hero .lead {
  font-size: 19px;
  margin-bottom: 30px;
}

.hero-note {
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--text-faint);
}

/* ---------- Grids ---------- */

.grid {
  display: grid;
  gap: 20px;
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--4 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* ---------- Cards ---------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: 17px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 14px;
}

/* ---------- Steps ---------- */

.steps {
  counter-reset: step;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.step {
  position: relative;
  padding-left: 0;
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}

/* ---------- Pricing ---------- */

.price-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.plan {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.plan--featured {
  border-color: var(--primary);
  box-shadow: 0 8px 28px rgba(79, 70, 229, 0.13);
}

.plan-badge {
  position: absolute;
  top: -11px;
  left: 24px;
  background: var(--primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 4px 11px;
  border-radius: 999px;
}

.plan-name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
}

.plan-desc {
  font-size: 13.5px;
  color: var(--text-faint);
  margin-bottom: 18px;
  min-height: 40px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-bottom: 4px;
}

.plan-price .amount {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}

.plan-price .period {
  font-size: 14px;
  color: var(--text-faint);
  font-weight: 500;
}

.plan-alt {
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.plan-credits {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 18px;
  padding: 9px 13px;
  background: #f0fdfa;
  border-radius: 8px;
  border: 1px solid #ccfbf1;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  flex: 1;
}

.plan ul li {
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 0 6px 24px;
  position: relative;
}

.plan ul li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.plan .btn {
  width: 100%;
}

.pricing-note {
  margin-top: 32px;
  padding: 18px 22px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-muted);
}

.pricing-note p:last-child {
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 520px;
}

th,
td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border-soft);
}

th {
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr:last-child td {
  border-bottom: none;
}

td strong {
  color: var(--text);
}

/* ---------- Legal / prose pages ---------- */

.legal {
  padding: 56px 0 80px;
}

.legal-head {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 36px;
}

.legal-head h1 {
  font-size: clamp(28px, 4vw, 38px);
  margin-bottom: 12px;
}

.legal-meta {
  font-size: 14px;
  color: var(--text-faint);
  margin: 0;
}

.prose {
  max-width: 820px;
}

.prose h2 {
  font-size: 22px;
  margin-top: 44px;
  margin-bottom: 14px;
  padding-top: 8px;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  font-size: 17px;
  margin-top: 26px;
  margin-bottom: 10px;
}

.prose p,
.prose li {
  color: var(--text-muted);
  font-size: 15.5px;
}

.prose ul,
.prose ol {
  padding-left: 22px;
  margin: 0 0 18px;
}

.prose li {
  margin-bottom: 8px;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.callout {
  padding: 18px 22px;
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: var(--radius);
  margin: 24px 0;
}

.callout p {
  color: var(--warning-text);
  font-size: 14.5px;
  margin: 0;
}

.callout strong {
  color: var(--warning-text);
}

.info-box {
  padding: 20px 24px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin: 24px 0;
}

.info-box p:last-child {
  margin-bottom: 0;
}

.info-box dl {
  margin: 0;
  font-size: 15px;
}

.info-box dt {
  font-weight: 600;
  color: var(--text);
  margin-top: 12px;
}

.info-box dt:first-child {
  margin-top: 0;
}

.info-box dd {
  margin: 3px 0 0;
  color: var(--text-muted);
}

/* breadcrumb-ish back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-faint);
  text-decoration: none;
  margin-bottom: 22px;
}

.back-link:hover {
  color: var(--primary);
}

/* ---------- Support page ---------- */

.contact-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.contact-email {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.contact-email:hover {
  text-decoration: underline;
}

.faq-item {
  border-bottom: 1px solid var(--border-soft);
  padding: 20px 0;
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 16.5px;
  margin-bottom: 8px;
}

.faq-item p:last-child {
  margin-bottom: 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: #18181b;
  color: #a1a1aa;
  padding: 52px 0 32px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: minmax(240px, 1.4fr) repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  margin-bottom: 14px;
}

.footer-brand .brand-mark {
  background: linear-gradient(135deg, #6366f1, #14b8a6);
}

.footer-desc {
  font-size: 13.5px;
  color: #a1a1aa;
  line-height: 1.7;
  margin: 0 0 14px;
  max-width: 340px;
}

.footer-col h4 {
  color: #fff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 9px;
}

.footer-col a {
  color: #a1a1aa;
  text-decoration: none;
  font-size: 14px;
}

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #27272a;
  padding-top: 24px;
  font-size: 13px;
  color: #71717a;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-bottom p {
  margin: 0;
  color: #71717a;
  font-size: 13px;
}

.footer-entity {
  font-size: 13px;
  color: #8b8b93;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #27272a;
  max-width: 420px;
  line-height: 1.65;
}

/* ---------- Utility ---------- */

.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mt-0 {
  margin-top: 0;
}

.mb-0 {
  margin-bottom: 0;
}

.hidden {
  display: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 860px) {
  .nav {
    height: auto;
    padding: 12px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .nav-links {
    width: 100%;
  }

  .nav-links a {
    padding: 6px 10px;
    font-size: 14px;
  }

  .section {
    padding: 56px 0;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .wrap {
    padding: 0 18px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .plan-price .amount {
    font-size: 30px;
  }

  .contact-card {
    padding: 24px 20px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }
}
