/* ============================================================
   dazhuzi · mulerun-inspired theme
   ============================================================ */

:root {
  --bg: #f4f3ef;
  --bg-soft: #ecebe5;
  --surface: #ffffff;
  --ink: #1f1e1a;
  --ink-soft: #6b6a63;
  --ink-mute: #a7a59c;
  --line: #e3e1d8;
  --line-soft: #ecebe3;
  --accent: #e8826b;
  --accent-soft: #f9e2d8;
  --accent-deep: #c25e46;
  --footer-bg: #45433a;
  --footer-bg-deep: #3a3830;
  --footer-ink: #d8d6cd;
  --footer-mute: #8e8c82;

  --radius: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --shadow-input: 0 1px 0 rgba(31, 30, 26, 0.04),
    0 12px 28px -18px rgba(31, 30, 26, 0.18);
  --shadow-card: 0 1px 0 rgba(31, 30, 26, 0.03),
    0 8px 20px -14px rgba(31, 30, 26, 0.12);
  --shadow-card-hover: 0 2px 0 rgba(31, 30, 26, 0.05),
    0 22px 40px -22px rgba(31, 30, 26, 0.22);

  --font-sans: "Inter", "Noto Sans SC", -apple-system, BlinkMacSystemFont,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;

  --max-w: 1080px;
  --pad-x: clamp(20px, 5vw, 56px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* ============================================================
   Nav
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px var(--pad-x);
  background: rgba(244, 243, 239, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-scrolled {
  border-color: var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: -0.005em;
  font-size: 18px;
  line-height: 1;
  color: var(--ink);
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
  border-radius: 8px;
}
.brand-name {
  display: inline-block;
}
.brand-name {
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  color: var(--ink-soft);
}
.nav-links a {
  padding: 6px 0;
  transition: color 0.15s ease;
}
.nav-links a:hover {
  color: var(--ink);
}

.nav-right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.lang-toggle {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font: 500 13px/1 var(--font-sans);
  padding: 9px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}
.lang-toggle:hover {
  color: var(--ink);
  background: var(--bg-soft);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-pill);
  font: 500 13.5px/1 var(--font-sans);
  transition: background 0.15s ease, transform 0.15s ease;
}
.nav-cta:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

/* ============================================================
   Layout helpers
   ============================================================ */
main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

.section {
  padding: clamp(64px, 9vw, 110px) 0;
  position: relative;
}

.section-head {
  text-align: center;
  margin: 0 auto 48px;
  max-width: 720px;
}
.section-eyebrow {
  display: inline-block;
  color: var(--accent-deep);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.section-head h2 {
  font-weight: 700;
  font-size: clamp(30px, 4.8vw, 48px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
  color: var(--ink);
}
.section-lede {
  font-size: clamp(15.5px, 1.8vw, 18px);
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 58ch;
  line-height: 1.65;
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  padding: clamp(60px, 9vw, 110px) 0 clamp(60px, 9vw, 100px);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-side-dots {
  position: absolute;
  left: -120px;
  top: 25%;
  width: 380px;
  height: 380px;
  background-image: radial-gradient(circle at 1.5px 1.5px, var(--ink-mute) 1.5px, transparent 0);
  background-size: 12px 12px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black, transparent 70%);
  mask-image: radial-gradient(ellipse 60% 80% at 50% 50%, black, transparent 70%);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-cube {
  width: 130px;
  height: 130px;
  margin: 0 auto 28px;
  display: block;
}

.hero-title {
  font-weight: 700;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
  color: var(--ink);
}
.hero-title span {
  display: block;
}

.hero-sub {
  font-size: clamp(15.5px, 1.7vw, 17.5px);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 36px;
  line-height: 1.6;
}

/* chat input mock */
.chat-mock {
  max-width: 680px;
  margin: 0 auto 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px 26px 18px;
  text-align: left;
  box-shadow: var(--shadow-input);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.chat-mock:focus-within,
.chat-mock:hover {
  border-color: var(--accent);
  box-shadow: 0 1px 0 rgba(31, 30, 26, 0.04),
    0 18px 36px -20px rgba(232, 130, 107, 0.45);
}
.chat-mock-text {
  display: block;
  min-height: 56px;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.5;
  padding-right: 110px;
}
.chat-mock-text .placeholder {
  color: var(--ink-mute);
}
.chat-mock-text .caret {
  display: inline-block;
  width: 1.5px;
  height: 1.05em;
  background: var(--ink);
  vertical-align: -0.18em;
  margin-left: 1px;
  animation: caret-blink 1.05s steps(1, end) infinite;
}
@keyframes caret-blink {
  50% { opacity: 0; }
}
.chat-mock-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 12px;
}
.chat-mock-hint {
  font-size: 12.5px;
  color: var(--ink-mute);
}
.chat-mock-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  font: 500 13.5px/1 var(--font-sans);
  transition: background 0.15s ease, transform 0.15s ease;
}
.chat-mock-cta:hover {
  background: var(--accent);
  color: #fff;
  transform: translateY(-1px);
}
.chat-mock-cta .arrow {
  font-size: 14px;
  line-height: 1;
}

/* hero quick chips (use case shortcuts) */
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 auto;
  max-width: 760px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--ink);
  background: #fff;
}
.chip-icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

/* ============================================================
   Examples grid (use case cards)
   ============================================================ */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 22px 22px;
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
}
.example-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
}
.example-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 16px;
  font-weight: 600;
}
.example-card h3 {
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.example-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
  line-height: 1.55;
}

/* ============================================================
   Feature rows (alternating side-by-side)
   ============================================================ */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 88px);
  align-items: center;
  padding: clamp(48px, 7vw, 80px) 0;
}
.feature-row:first-of-type {
  padding-top: 0;
}
.feature-row:last-of-type {
  padding-bottom: 0;
}
.feature-row + .feature-row {
  border-top: 1px solid var(--line);
}
.feature-row.reverse .feature-text {
  order: 2;
}

.feature-text {
  max-width: 460px;
}
.feature-text .section-eyebrow {
  display: inline-block;
  margin-bottom: 14px;
}
.feature-text h2 {
  font-weight: 700;
  font-size: clamp(26px, 3.4vw, 36px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--ink);
}
.feature-text p {
  color: var(--ink-soft);
  font-size: 15.5px;
  margin: 0 0 24px;
  line-height: 1.7;
}
.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-deep);
  font-weight: 500;
  font-size: 14.5px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}
.feature-link:hover {
  border-bottom-color: var(--accent-deep);
}

/* mock visuals on the right */
.feature-visual {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
  font-size: 13px;
}

.terminal {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  background: linear-gradient(180deg, #1f1e1a 0%, #2a2924 100%);
  color: #e8e6dd;
  border-radius: 10px;
  padding: 18px 20px;
  font-size: 12.5px;
  line-height: 1.7;
}
.terminal-head {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.terminal-head span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #4a4842;
}
.terminal-head span:first-child {
  background: var(--accent);
}
.terminal .ts {
  color: #7a7870;
  margin-right: 8px;
}
.terminal .ok {
  color: #a8c590;
}
.terminal .run {
  color: var(--accent);
}
.terminal .info {
  color: #c8c6bd;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stack-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.stack-row strong {
  color: var(--ink);
  font-weight: 600;
  margin-right: 4px;
}
.stack-row .stack-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

.process-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.process-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 13.5px;
}
.process-step .num {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  flex-shrink: 0;
}
.process-step .meta {
  color: var(--ink-mute);
  margin-left: auto;
  font-size: 12.5px;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border-top: 1px solid var(--line);
  padding: 0;
}
.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px 8px;
  cursor: pointer;
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
  transition: color 0.15s ease;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ink);
  flex-shrink: 0;
}
.faq-item summary::after {
  content: "›";
  margin-left: auto;
  color: var(--ink-mute);
  font-size: 22px;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform 0.2s ease;
}
.faq-item[open] summary::after {
  transform: rotate(90deg);
  color: var(--accent);
}
.faq-item[open] summary::before {
  background: var(--accent);
}
.faq-item summary:hover {
  color: var(--accent-deep);
}
.faq-body {
  padding: 0 8px 22px 30px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}

/* ============================================================
   CTA strip
   ============================================================ */
.cta-strip {
  text-align: center;
  padding: clamp(64px, 9vw, 110px) 0;
  border-top: 1px solid var(--line);
}
.cta-strip h2 {
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 18px;
}
.cta-strip p {
  color: var(--ink-soft);
  margin: 0 auto 32px;
  max-width: 48ch;
}
.cta-strip-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font: 500 14.5px/1 var(--font-sans);
  transition: transform 0.15s ease, background 0.15s ease,
    color 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-pill-primary {
  background: var(--ink);
  color: #fff;
}
.btn-pill-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}
.btn-pill-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-pill-ghost:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}
.btn-pill-wechat {
  background: var(--accent);
  color: #fff;
  font: 500 14.5px/1 var(--font-sans);
  cursor: pointer;
}
.btn-pill-wechat:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
}

/* ============================================================
   Modal (WeChat QR)
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade 0.18s ease-out;
}
.modal[hidden] {
  display: none;
}
@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 30, 26, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-card {
  position: relative;
  background: var(--surface);
  border-radius: 18px;
  padding: 36px 32px 28px;
  max-width: 360px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 48px -16px rgba(31, 30, 26, 0.35);
  animation: modal-pop 0.22s cubic-bezier(0.34, 1.36, 0.64, 1);
}
@keyframes modal-pop {
  from { transform: scale(0.94) translateY(8px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--ink-mute);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease, color 0.15s ease;
}
.modal-close:hover {
  background: var(--bg-soft);
  color: var(--ink);
}
.modal-title {
  font-weight: 600;
  font-size: 17px;
  margin: 0 0 18px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.modal-qr {
  width: 240px;
  height: auto;
  margin: 0 auto 18px;
  border-radius: 10px;
  display: block;
}
.modal-id {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 8px 8px 8px 16px;
  margin: 0 0 14px;
}
.modal-id-label {
  font-size: 12.5px;
  color: var(--ink-mute);
}
.modal-id-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14px;
  color: var(--ink);
}
.modal-copy {
  border: none;
  background: var(--ink);
  color: #fff;
  font: 500 12.5px/1 var(--font-sans);
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s ease;
}
.modal-copy:hover {
  background: var(--accent-deep);
}
.modal-copy.copied {
  background: #4a8a5a;
}
.modal-hint {
  font-size: 12.5px;
  color: var(--ink-mute);
  margin: 0;
  line-height: 1.5;
}
body.modal-open {
  overflow: hidden;
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: 72px var(--pad-x) 40px;
  margin-top: 30px;
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-brand .brand {
  color: var(--footer-ink);
  font-size: 18px;
}
.footer-brand .brand-name {
  color: var(--footer-ink);
}
.footer-tag {
  color: var(--footer-mute);
  font-size: 14px;
  max-width: 28ch;
  line-height: 1.6;
  margin: 0;
}
.footer-legal {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-legal-name {
  color: var(--footer-ink);
  font-size: 13px;
  font-weight: 500;
  margin: 0;
}
.footer-legal-addr {
  color: var(--footer-mute);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0;
  max-width: 36ch;
}
.footer-col h4 {
  color: var(--footer-mute);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col a {
  color: var(--footer-ink);
  font-size: 14px;
  transition: color 0.15s ease;
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  max-width: var(--max-w);
  margin: 56px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--footer-mute);
  font-size: 13px;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 880px) {
  .nav-links {
    display: none;
  }
  .examples-grid {
    grid-template-columns: 1fr;
  }
  .feature-row {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .feature-row.reverse .feature-text {
    order: 0;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
  .hero-side-dots {
    display: none;
  }
}

@media (max-width: 520px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .chat-mock-text {
    padding-right: 0;
  }
  .chat-mock-row {
    flex-wrap: wrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
