*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --surface-muted: #eef3ef;
  --text: #16201c;
  --muted: #5f6c66;
  --faint: #89948f;
  --green: #167247;
  --green-strong: #0f5d3b;
  --blue: #2563eb;
  --amber: #b7791f;
  --red: #c2413b;
  --border: rgba(22, 32, 28, 0.11);
  --shadow: 0 18px 42px rgba(24, 39, 31, 0.10);
  --radius: 12px;
  --radius-lg: 20px;
  --page: 1180px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.site-header {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 50%;
  width: min(var(--page), calc(100% - 40px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 16px;
  font-weight: 680;
  text-decoration: none;
}

.brand__mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(22, 114, 71, 0.24);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.74);
  color: var(--green);
  box-shadow: 0 8px 24px rgba(22, 114, 71, 0.12);
}

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

.nav-links a {
  color: rgba(22, 32, 28, 0.72);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

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

.language-toggle {
  min-height: 32px;
  border: 1px solid rgba(22, 32, 28, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 680;
  padding: 5px 10px;
  cursor: pointer;
}

.language-toggle:hover {
  background: rgba(255, 255, 255, 0.94);
}

.hero {
  position: relative;
  display: grid;
  min-height: 78svh;
  overflow: hidden;
  padding: 116px 0 72px;
  isolation: isolate;
}

.hero__image,
.hero__shade {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

.hero__shade {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(246, 247, 244, 0.98) 0%, rgba(246, 247, 244, 0.88) 31%, rgba(246, 247, 244, 0.32) 58%, rgba(246, 247, 244, 0.08) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(246, 247, 244, 0) 30%);
}

.hero__content {
  width: min(var(--page), calc(100% - 40px));
  align-self: center;
  margin: 0 auto;
  padding-top: 28px;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 620px;
  margin-top: 16px;
  font-size: clamp(54px, 8vw, 112px);
  font-weight: 760;
  letter-spacing: 0;
  line-height: 0.92;
}

.hero__lead {
  max-width: 610px;
  margin-top: 26px;
  color: #34413b;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.55;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 660;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 12px 28px rgba(22, 114, 71, 0.26);
}

.button--primary:hover {
  background: var(--green-strong);
}

.button--secondary {
  border-color: rgba(22, 32, 28, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
}

.button--secondary:hover {
  border-color: rgba(22, 32, 28, 0.28);
  background: rgba(255, 255, 255, 0.92);
}

.hero__note {
  max-width: 560px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.launch-strip {
  width: min(var(--page), calc(100% - 40px));
  margin: -28px auto 0;
  position: relative;
  z-index: 5;
}

.launch-strip div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.launch-strip strong {
  white-space: nowrap;
}

.launch-strip span {
  color: var(--muted);
  font-size: 14px;
  text-align: right;
}

.section {
  width: min(var(--page), calc(100% - 40px));
  margin: 96px auto 0;
}

.section__heading {
  max-width: 720px;
}

.section__heading h2,
.cta-band h2 {
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 740;
  letter-spacing: 0;
  line-height: 1.08;
}

.section__heading p:not(.eyebrow),
.cta-band p:not(.eyebrow) {
  margin-top: 16px;
  color: var(--muted);
  font-size: 17px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.demo-stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  margin-top: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 88% 6%, rgba(22, 114, 71, 0.06), transparent 42%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(240, 247, 243, 0.96));
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.demo-workbook,
.demo-chat {
  border: 1px solid rgba(22, 32, 28, 0.12);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 34px rgba(22, 32, 28, 0.08);
}

.demo-workbook {
  min-width: 0;
  overflow: hidden;
}

.workbook-toolbar {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(22, 32, 28, 0.08);
  padding: 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.workbook-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e45d4d;
}

.workbook-toolbar span:nth-child(2) {
  background: #e8b83f;
}

.workbook-toolbar span:nth-child(3) {
  margin-right: 8px;
  background: #39a96b;
}

.workbook-toolbar strong {
  color: var(--text);
  font-size: 14px;
}

.formula-bar {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(22, 32, 28, 0.08);
  padding: 11px 16px;
}

.formula-bar span {
  color: var(--green);
  font-weight: 760;
}

.formula-bar strong {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  animation: formulaPulse 13s ease-in-out infinite;
}

.sheet-grid {
  display: grid;
  grid-template-columns: 0.78fr 0.9fr repeat(3, minmax(74px, 1fr)) 0.9fr;
  padding: 16px;
  overflow-x: auto;
}

.sheet-cell {
  min-height: 42px;
  min-width: 74px;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(22, 32, 28, 0.08);
  border-bottom: 1px solid rgba(22, 32, 28, 0.08);
  padding: 8px 10px;
  color: #293631;
  font-size: 14px;
  white-space: nowrap;
}

.sheet-head {
  min-height: 38px;
  background: #eaf3ed;
  color: #244337;
  font-weight: 680;
}

.sheet-formula {
  color: var(--green);
  font-weight: 680;
  animation: writeBack 13s ease-in-out infinite;
}

.sheet-ok {
  justify-content: center;
  color: var(--green);
  font-size: 13px;
  font-weight: 660;
}

.sheet-dirty {
  position: relative;
  color: var(--red);
  animation: cleanCell 13s ease-in-out infinite;
}

.sheet-dirty::after,
.sheet-fix::after,
.sheet-highlight::after {
  position: absolute;
  inset: 6px;
  border: 2px solid rgba(22, 114, 71, 0.38);
  border-radius: 5px;
  content: "";
  opacity: 0;
  pointer-events: none;
}

.sheet-dirty::after {
  animation: scanCell 13s ease-in-out infinite;
}

.sheet-fix::after {
  animation: scanCell 13s ease-in-out 0.55s infinite;
}

.sheet-highlight {
  color: var(--blue);
  font-weight: 680;
}

.sheet-highlight::after {
  border-color: rgba(37, 99, 235, 0.42);
  animation: scanCell 13s ease-in-out 1.1s infinite;
}

.sheet-insights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.sheet-insights div {
  border: 1px solid rgba(22, 32, 28, 0.08);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px;
  transform-origin: bottom;
  animation: insightRise 13s ease-in-out infinite;
}

.sheet-insights div:nth-child(2) {
  animation-delay: 0.16s;
}

.sheet-insights div:nth-child(3) {
  animation-delay: 0.32s;
}

.sheet-insights span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.sheet-insights strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 20px;
}

.demo-chat {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.chat-header {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.chat-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-weight: 760;
}

.chat-header strong,
.chat-header span {
  display: block;
}

.chat-header span {
  color: var(--muted);
  font-size: 12px;
}

.chat-message {
  border-radius: var(--radius);
  padding: 13px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.chat-message--user {
  align-self: flex-end;
  width: min(100%, 300px);
  background: #10231b;
  color: #fff;
}

.typing-text {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  vertical-align: bottom;
  white-space: nowrap;
  animation: typePrompt 13s steps(24, end) infinite;
}

.chat-progress {
  display: flex;
  gap: 6px;
  padding-left: 4px;
}

.chat-progress span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--green);
  animation: dotPulse 1s ease-in-out infinite;
}

.chat-progress span:nth-child(2) {
  animation-delay: 0.16s;
}

.chat-progress span:nth-child(3) {
  animation-delay: 0.32s;
}

.chat-actions {
  display: grid;
  gap: 8px;
}

.chat-actions span {
  border: 1px solid rgba(22, 114, 71, 0.18);
  border-radius: var(--radius);
  background: rgba(22, 114, 71, 0.07);
  color: #24513d;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 650;
  opacity: 0.28;
  transform: translateY(8px);
  animation: actionStep 13s ease-in-out infinite;
}

.chat-actions span:nth-child(2) {
  animation-delay: 0.45s;
}

.chat-actions span:nth-child(3) {
  animation-delay: 0.9s;
}

.chat-actions span:nth-child(4) {
  animation-delay: 1.35s;
}

.chat-result {
  border-radius: var(--radius);
  background: #eef7f2;
  padding: 14px;
  opacity: 0;
  transform: translateY(10px);
  animation: resultReveal 13s ease-in-out infinite;
}

.chat-result strong {
  color: var(--green);
}

.chat-result p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.feature-card,
.install-step,
.policy-grid > div {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 22px;
  box-shadow: 0 8px 24px rgba(22, 32, 28, 0.05);
}

.feature-card__icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--surface-muted);
  color: var(--green);
  font-size: 15px;
  font-weight: 760;
}

.feature-card:nth-child(2) .feature-card__icon {
  color: var(--blue);
}

.feature-card:nth-child(3) .feature-card__icon {
  color: var(--green);
}

.feature-card:nth-child(4) .feature-card__icon {
  color: var(--blue);
}

.feature-card h3,
.install-step h3,
.policy-grid h3,
.flow-list h3 {
  margin-top: 16px;
  font-size: 18px;
  line-height: 1.25;
}

.feature-card p,
.install-step p,
.policy-grid p,
.flow-list p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.section--split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  gap: 56px;
  align-items: start;
}

.flow-list {
  display: grid;
  gap: 12px;
  list-style: none;
  padding: 0;
}

.flow-list li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 20px;
}

.flow-list li > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: #10231b;
  color: #fff;
  font-size: 13px;
  font-weight: 720;
}

.section--panel {
  border: 1px solid rgba(22, 32, 28, 0.10);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(22, 114, 71, 0.07), rgba(37, 99, 235, 0.05)),
    #fff;
  padding: 34px;
}

.install-grid,
.policy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 30px;
}

.install-step {
  background: rgba(255, 255, 255, 0.80);
}

.install-step > span {
  display: inline-grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-weight: 740;
}

.install-step a {
  display: inline-block;
  margin-top: 14px;
  color: var(--green);
  font-size: 14px;
  font-weight: 660;
  text-decoration: none;
}

.install-step a:hover {
  text-decoration: underline;
}

.cta-band {
  width: min(var(--page), calc(100% - 40px));
  margin: 96px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border-radius: var(--radius-lg);
  background: #10231b;
  color: #fff;
  padding: 36px;
}

.cta-band .eyebrow {
  color: #77d1a2;
}

.cta-band h2 {
  color: #fff;
  font-size: clamp(28px, 3vw, 42px);
}

.cta-band p:not(.eyebrow) {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.74);
}

.site-footer {
  width: min(var(--page), calc(100% - 40px));
  margin: 80px auto 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  border-top: 1px solid var(--border);
  padding: 28px 0 44px;
}

.site-footer p {
  max-width: 560px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px 18px;
}

.site-footer a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--text);
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes typePrompt {
  0%, 8% { max-width: 0; }
  24%, 78% { max-width: 320px; }
  92%, 100% { max-width: 0; }
}

@keyframes dotPulse {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-3px); }
}

@keyframes actionStep {
  0%, 20% { opacity: 0.28; transform: translateY(8px); }
  30%, 74% { opacity: 1; transform: translateY(0); }
  92%, 100% { opacity: 0.28; transform: translateY(8px); }
}

@keyframes cleanCell {
  0%, 26% { background: transparent; color: var(--red); }
  38%, 78% { background: rgba(22, 114, 71, 0.09); color: var(--green); }
  94%, 100% { background: transparent; color: var(--red); }
}

@keyframes scanCell {
  0%, 20% { opacity: 0; transform: scale(1.04); }
  28%, 40% { opacity: 1; transform: scale(1); }
  54%, 100% { opacity: 0; transform: scale(0.98); }
}

@keyframes writeBack {
  0%, 32% { background: transparent; }
  44%, 76% { background: rgba(22, 114, 71, 0.10); }
  94%, 100% { background: transparent; }
}

@keyframes insightRise {
  0%, 40% { opacity: 0.45; transform: scaleY(0.92); }
  52%, 82% { opacity: 1; transform: scaleY(1); }
  94%, 100% { opacity: 0.45; transform: scaleY(0.92); }
}

@keyframes resultReveal {
  0%, 48% { opacity: 0; transform: translateY(10px); }
  60%, 82% { opacity: 1; transform: translateY(0); }
  96%, 100% { opacity: 0; transform: translateY(10px); }
}

@keyframes formulaPulse {
  0%, 38% { color: var(--muted); }
  50%, 80% { color: var(--green); }
  96%, 100% { color: var(--muted); }
}

@media (max-width: 960px) {
  .demo-stage {
    grid-template-columns: 1fr;
  }

  .feature-grid,
  .install-grid,
  .policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section--split,
  .cta-band {
    grid-template-columns: 1fr;
  }

  .cta-band .button {
    width: fit-content;
  }
}

@media (max-width: 720px) {
  .site-header {
    position: relative;
    left: auto;
    width: calc(100% - 32px);
    transform: none;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 auto;
    padding: 18px 0 12px;
  }

  .nav-links {
    width: 100%;
    gap: 0;
    justify-content: space-between;
  }

  .nav-links a {
    font-size: 13px;
  }

  .hero {
    min-height: 72svh;
    padding: 56px 0 48px;
  }

  .hero__image {
    object-position: 72% center;
  }

  .hero__shade {
    background:
      linear-gradient(90deg, rgba(246, 247, 244, 0.98) 0%, rgba(246, 247, 244, 0.86) 64%, rgba(246, 247, 244, 0.42) 100%),
      linear-gradient(0deg, var(--bg) 0%, rgba(246, 247, 244, 0) 36%);
  }

  .hero__content,
  .section,
  .launch-strip,
  .cta-band,
  .site-footer {
    width: calc(100% - 32px);
  }

  .hero h1 {
    font-size: clamp(46px, 18vw, 72px);
  }

  .launch-strip {
    margin-top: -18px;
  }

  .launch-strip div,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .launch-strip span {
    text-align: left;
  }

  .section,
  .cta-band {
    margin-top: 70px;
  }

  .section--panel,
  .cta-band {
    padding: 24px;
  }

  .sheet-grid {
    grid-template-columns: repeat(6, minmax(88px, 1fr));
  }
}

@media (max-width: 560px) {
  .feature-grid,
  .install-grid,
  .policy-grid {
    grid-template-columns: 1fr;
  }

  .hero__actions,
  .hero__actions .button,
  .cta-band .button {
    width: 100%;
  }

  .flow-list li {
    grid-template-columns: 1fr;
  }

  .demo-stage {
    padding: 12px;
  }

  .sheet-insights {
    grid-template-columns: 1fr;
  }

  .typing-text {
    white-space: normal;
    animation: none;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }

  .typing-text {
    max-width: none;
  }

  .chat-result {
    opacity: 1;
    transform: none;
  }
}

/* Language selector (replaces the EN/中文 toggle button). */
.language-select {
  font: inherit;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(0,0,0,0.15));
  background: transparent;
  color: inherit;
  cursor: pointer;
}
