/* =============================================================
 * 写回大师 · 官网样式
 * 设计语言：清新绿 + 留白 + 聊天气泡元素
 * 主色：#07C160（聊天绿）渐变 #10B981 → #34D399
 * ============================================================= */

:root {
  --green-700: #04994a;
  --green-600: #07c160;
  --green-500: #10b981;
  --green-400: #34d399;
  --green-100: #e8f8f0;
  --green-50:  #f4fbf7;

  --ink-900: #0f1f17;
  --ink-700: #1f2937;
  --ink-500: #4b5563;
  --ink-400: #6b7280;
  --ink-300: #9ca3af;
  --ink-200: #e5e7eb;
  --ink-100: #f3f4f6;
  --ink-50:  #fafbfc;

  --white: #ffffff;

  --shadow-sm: 0 1px 2px rgba(15, 31, 23, 0.04);
  --shadow-md: 0 6px 24px -8px rgba(7, 193, 96, 0.18), 0 2px 6px rgba(15, 31, 23, 0.04);
  --shadow-lg: 0 24px 60px -20px rgba(7, 193, 96, 0.28), 0 8px 20px rgba(15, 31, 23, 0.06);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --container: 1180px;
  --header-h: 68px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", Arial, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-700);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; margin: 0; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid rgba(15, 31, 23, 0.05);
}
.site-header .inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink-900);
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--green-500), var(--green-400));
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 14px -4px rgba(7, 193, 96, 0.45);
}
.brand-mark svg { width: 18px; height: 18px; }

.nav { display: flex; gap: 6px; }
.nav a {
  padding: 8px 14px;
  font-size: 14.5px;
  color: var(--ink-500);
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.nav a:hover { color: var(--ink-900); background: var(--ink-100); }
.nav a.active {
  color: var(--green-700);
  background: var(--green-100);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: var(--green-600);
  border: none;
  border-radius: 999px;
  box-shadow: 0 6px 16px -6px rgba(7, 193, 96, 0.55);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.header-cta:hover {
  background: var(--green-500);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(7, 193, 96, 0.6);
}

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 100px;
  overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(52, 211, 153, 0.18), transparent 60%),
    radial-gradient(700px 400px at -10% 30%, rgba(7, 193, 96, 0.10), transparent 60%),
    linear-gradient(180deg, #ffffff 0%, var(--green-50) 100%);
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(15, 31, 23, 0.05) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, black 30%, transparent 75%);
  pointer-events: none;
}
.hero .inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--green-700);
  background: var(--white);
  border: 1px solid rgba(7, 193, 96, 0.2);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.eyebrow .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}
.hero h1 {
  font-size: 56px;
  line-height: 1.15;
  letter-spacing: -0.5px;
  font-weight: 800;
  color: var(--ink-900);
  margin: 18px 0 18px;
}
.hero h1 .accent {
  background: linear-gradient(120deg, var(--green-600), var(--green-400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  font-size: 17px;
  color: var(--ink-500);
  max-width: 540px;
  margin-bottom: 32px;
}

.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-primary {
  background: var(--green-600);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(7, 193, 96, 0.55);
}
.btn-primary:hover {
  background: var(--green-500);
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -12px rgba(7, 193, 96, 0.6);
}
.btn-ghost {
  background: var(--white);
  color: var(--ink-700);
  border-color: var(--ink-200);
}
.btn-ghost:hover {
  border-color: var(--green-500);
  color: var(--green-700);
}

.hero-meta {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 22px 32px;
  color: var(--ink-400);
  font-size: 13.5px;
}
.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.hero-meta svg { width: 16px; height: 16px; color: var(--green-500); }

/* ---------- Chat bubble decoration ---------- */
.chat-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-xl);
  padding: 24px 22px 28px;
  box-shadow: var(--shadow-lg);
}
.chat-card::after {
  content: "";
  position: absolute;
  inset: auto -16px -16px auto;
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--green-500), var(--green-400));
  filter: blur(40px);
  opacity: .5;
  z-index: -1;
  border-radius: 50%;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--ink-100);
}
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #cdebd9, #fff);
  display: grid; place-items: center;
  color: var(--green-700);
  font-weight: 700;
  font-size: 14px;
  border: 1px solid var(--green-100);
}
.chat-head .who { font-weight: 600; font-size: 15px; color: var(--ink-900); }
.chat-head .sub { font-size: 12px; color: var(--ink-400); }

.bubble-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.bubble {
  max-width: 78%;
  padding: 10px 14px;
  font-size: 14.5px;
  line-height: 1.55;
  border-radius: 14px;
  position: relative;
  word-break: break-word;
  animation: bubbleIn .5s ease both;
}
.bubble.in {
  align-self: flex-start;
  background: var(--white);
  color: var(--ink-700);
  border: 1px solid var(--ink-200);
  border-top-left-radius: 4px;
}
.bubble.out {
  align-self: flex-end;
  background: var(--green-600);
  color: #fff;
  border-top-right-radius: 4px;
  box-shadow: 0 6px 14px -6px rgba(7, 193, 96, 0.45);
}
.bubble.system {
  align-self: center;
  background: rgba(15, 31, 23, 0.05);
  color: var(--ink-400);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  max-width: 100%;
}
.bubble .time {
  display: block;
  font-size: 11px;
  opacity: .6;
  margin-top: 4px;
}
.bubble.in.delay-1 { animation-delay: .1s; }
.bubble.out.delay-2 { animation-delay: .25s; }
.bubble.in.delay-3 { animation-delay: .4s; }
.bubble.out.delay-4 { animation-delay: .55s; }
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* floating decoration bubbles around the card */
.float-bubble {
  position: absolute;
  padding: 8px 12px;
  font-size: 12.5px;
  border-radius: 12px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  box-shadow: var(--shadow-md);
  color: var(--ink-500);
  animation: floatY 5s ease-in-out infinite;
}
.float-bubble.b1 { top: -22px; left: -32px; }
.float-bubble.b2 {
  bottom: 18%; right: -34px;
  background: var(--green-600);
  color: #fff;
  border-color: transparent;
  animation-delay: 1.2s;
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------- Section ---------- */
.section {
  padding: 92px 0;
}
.section.tight { padding: 64px 0; }
.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}
.section-head .tag {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .5px;
  color: var(--green-700);
  background: var(--green-100);
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-head h2 {
  font-size: 38px;
  line-height: 1.2;
  letter-spacing: -0.3px;
  font-weight: 800;
  color: var(--ink-900);
  margin: 0 0 14px;
}
.section-head p {
  font-size: 16px;
  color: var(--ink-500);
  margin: 0;
}

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(7, 193, 96, 0.25);
}
.feature .icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--green-100);
  color: var(--green-700);
  margin-bottom: 18px;
}
.feature h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink-900);
  margin: 0 0 8px;
}
.feature p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-500);
}

/* ---------- Steps (Tutorial) ---------- */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 880px;
  margin: 0 auto;
}
.step {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.step:hover { border-color: rgba(7, 193, 96, 0.3); box-shadow: var(--shadow-sm); }
.step .num {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green-500), var(--green-400));
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px -8px rgba(7, 193, 96, 0.5);
}
.step h3 {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--ink-900);
}
.step p { margin: 0; color: var(--ink-500); font-size: 14.5px; }
.step ul.tips {
  margin-top: 10px;
  padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 10px;
}
.step ul.tips li {
  font-size: 12.5px;
  color: var(--green-700);
  background: var(--green-100);
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- Showcase ---------- */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.showcase-item {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.showcase-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(7, 193, 96, 0.25);
}
.showcase-preview {
  padding: 24px;
  background: linear-gradient(180deg, var(--green-50), #fff);
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.showcase-text {
  padding: 18px 22px 22px;
  border-top: 1px solid var(--ink-100);
}
.showcase-text h3 {
  margin: 0 0 4px;
  font-size: 16px;
  color: var(--ink-900);
}
.showcase-text p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-400);
}

/* preview chat layout (used in showcase) */
.mock-chat {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border: 1px solid var(--ink-200);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.mock-chat .bubble { font-size: 13.5px; padding: 8px 12px; }

/* ---------- CTA Banner ---------- */
.cta-banner {
  margin: 80px auto;
  max-width: var(--container);
  padding: 56px 48px;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.18), transparent 50%),
    linear-gradient(135deg, var(--green-600) 0%, var(--green-500) 100%);
  border-radius: var(--radius-xl);
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-banner::before, .cta-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.cta-banner::before { width: 180px; height: 180px; top: -60px; right: 12%; }
.cta-banner::after { width: 120px; height: 120px; bottom: -40px; left: 8%; background: rgba(255, 255, 255, 0.08); }
.cta-banner h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 800;
}
.cta-banner p {
  margin: 0;
  opacity: .9;
  font-size: 15px;
}
.cta-banner .btn-primary {
  background: #fff;
  color: var(--green-700);
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.2);
}
.cta-banner .btn-primary:hover { background: var(--green-50); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--ink-100);
  padding: 36px 0;
  color: var(--ink-400);
  font-size: 13.5px;
  background: #fff;
}
.site-footer .inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer .links { display: flex; gap: 18px; }
.site-footer a:hover { color: var(--green-700); }

/* ---------- Page Hero (Tutorial / Showcase) ---------- */
.page-hero {
  padding: 64px 0 24px;
  text-align: center;
  background:
    radial-gradient(700px 350px at 50% 0%, rgba(52, 211, 153, 0.18), transparent 65%),
    linear-gradient(180deg, #ffffff, var(--green-50));
}
.page-hero h1 {
  font-size: 42px;
  margin: 16px 0 10px;
  letter-spacing: -0.3px;
  font-weight: 800;
  color: var(--ink-900);
}
.page-hero p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--ink-500);
  font-size: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 56px 0 72px; }
  .hero .inner { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .showcase-grid { grid-template-columns: 1fr; }
  .section { padding: 64px 0; }
  .section-head h2 { font-size: 30px; }
  .cta-banner { padding: 40px 28px; }
  .cta-banner h2 { font-size: 22px; }
  .float-bubble.b1 { left: 8px; }
  .float-bubble.b2 { right: 8px; }
}
@media (max-width: 640px) {
  :root { --header-h: 60px; }
  .nav { display: none; }
  .nav-toggle {
    display: inline-grid; place-items: center;
    width: 38px; height: 38px;
    background: var(--ink-100);
    border-radius: 10px;
    border: none;
  }
  .nav-toggle svg { width: 18px; height: 18px; color: var(--ink-700); }
  .nav.open {
    display: flex;
    position: absolute;
    top: var(--header-h);
    left: 16px; right: 16px;
    background: #fff;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border: 1px solid var(--ink-200);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
  }
  .header-cta { display: none; }
  .hero h1 { font-size: 32px; }
  .feature-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 44px 1fr; gap: 14px; padding: 18px; }
  .step .num { width: 36px; height: 36px; font-size: 15px; }
  .page-hero h1 { font-size: 30px; }
  .cta-banner { margin: 56px 16px; padding: 32px 22px; flex-direction: column; align-items: flex-start; }
}
