@import url("https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;600;700&display=swap");

:root {
  --ink: #1a1a1a;
  --muted: #5a5d63;
  --line: #e5e7eb;
  --accent: #1a1a1a;
  --ok-bg: #ecfdf3;
  --ok-ink: #067647;
  --warn-bg: #fff7ed;
  --warn-ink: #b45309;
  --bg: #f6f6f4;
  /* Smaller English text uses Georgia; Chinese glyphs fall through to Noto Serif SC. */
  --serif: Georgia, "Noto Serif SC", "Songti SC", "SimSun", serif;
  /* The brand wordmark "妙算 Decisive" uses sans-serif. */
  --sans:
    -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto,
    sans-serif;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select,
textarea {
  font-family: inherit;
}

/* Slow, low-contrast Voronoi backdrop (D3) sits behind everything. */
#voronoi-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 18px 28px;
  background: #111;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
}
.brand span {
  color: #fff;
}
.brand-logo {
  height: 26px;
  width: auto;
  display: block;
  filter: invert(1); /* the black logo becomes white on the dark nav */
}

.lang-toggle {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  padding: 3px 11px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.lang-toggle:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* Language toggle: only one language is shown at a time. */
[data-lang="zh"] .lang-en {
  display: none;
}
[data-lang="en"] .lang-zh {
  display: none;
}

/* Partners */
.partners {
  text-align: center;
  margin-top: 40px;
}
.partners .section-title {
  font-size: 18px;
  margin: 0 0 20px;
  color: var(--ink);
}
/* Right-to-left marquee of partner logos. The logos are duplicated in the
   markup so translateX(-50%) loops seamlessly. */
.partner-logos {
  overflow: hidden;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}
.partner-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: partnerScroll 24s linear infinite;
}
.partner-logos:hover .partner-track {
  animation-play-state: paused;
}
@keyframes partnerScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
.partner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 124px;
  min-width: 150px;
  margin-right: 56px;
}
/* Logos sit directly on the page background (no white chip). */
.partner-logo-img {
  width: auto;
  height: auto;
  display: none;
}
.partner-logo-img.p-vanke {
  max-height: 32px;
  max-width: 150px;
} /* 60% of prior size, original red */
.partner-logo-img.p-bbmg {
  max-height: 108px;
  max-width: 210px;
} /* 200%, original colour; white background made transparent in the file */
.partner-logo-img.p-dtree {
  max-height: 40px;
  max-width: 200px;
  filter: invert(0.5);
} /* originally white -> grey */
.partner.has-img .partner-logo-img {
  display: block;
}
.partner.has-img .partner-name {
  display: none;
}
.partner-name {
  font-size: 20px;
  font-weight: 600;
  color: #9a9a98;
  letter-spacing: 0.02em;
}

.hero-logo {
  height: 104px;
  width: 108px;
  margin: 0 auto 16px;
  /* One solid dark-gold fill via an SVG mask; the whole mark flashes slowly. */
  -webkit-mask: url("/decisive_logo.svg") center / contain no-repeat;
  mask: url("/decisive_logo.svg") center / contain no-repeat;
  background: #a8780c;
  animation: heroGoldFlash 6s ease-in-out infinite;
}
@keyframes heroGoldFlash {
  0%,
  100% {
    filter: brightness(0.55);
  }
  50% {
    filter: brightness(1);
  }
}

nav {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: var(--sans); /* match the brand so CJK glyphs align */
}
nav a {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
  color: #fff;
  font-size: 14px;
}
nav a:hover {
  text-decoration: underline;
}
nav .lang-toggle {
  line-height: 1;
}

main {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 64px;
}

footer {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 32px 0;
}

h1 {
  font-size: 30px;
  margin: 0 0 12px;
}
h2 {
  font-size: 20px;
  margin: 0 0 10px;
}
/* English headings use sans-serif; Chinese headings stay serif. */
h1.lang-en,
h2.lang-en,
h1 .lang-en,
h2 .lang-en {
  font-family: var(--sans);
}
.muted {
  color: var(--muted);
  font-size: 14px;
}

.hero {
  text-align: center;
  padding: 40px 0 32px;
}
/* The tagline is the loudest element — bigger than the product name. */
.hero .tagline {
  font-size: clamp(22px, 6vw, 50px);
  line-height: 1.25;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  margin: 6px auto 18px;
}
/* Chinese tagline keeps each phrase on one line (breaks only at the <br>). */
.hero .tagline.lang-zh {
  white-space: nowrap;
}
.hero .tagline.lang-en {
  max-width: 24em;
  font-family: var(--sans);
  font-size: 26px;
  line-height: 1.35;
}
.hero .product-name {
  font-family: var(--sans);
  font-size: 24px;
  font-weight: 700; /* match the nav brand's boldness */
  color: var(--ink);
  margin: 0 0 18px;
  letter-spacing: normal; /* match the nav brand's tighter spacing */
}
.hero p {
  font-size: 17px;
  color: var(--muted);
  max-width: 620px;
  margin: 0 auto 22px;
}
.hero .lead {
  color: var(--ink);
}
/* Two equal-width hero buttons with generous spacing. */
.hero .hero-actions {
  display: flex;
  gap: 28px;
  justify-content: center;
  max-width: 364px; /* ~30% narrower than before */
  margin: 48px auto 22px; /* extra space above, away from the tagline */
}
.hero .hero-actions .button {
  flex: 1;
  text-align: center;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 48px;
  margin-top: 28px;
}

.card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(3px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 18px;
}

/* The three feature items are plain text, not boxes. */
.features .card {
  background: none;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
}

.status-ok {
  border-color: #abefc6;
  background: var(--ok-bg);
}
.status-ok h2 {
  color: var(--ok-ink);
}
.status-warn {
  border-color: #fed7aa;
  background: var(--warn-bg);
}
.status-warn h2 {
  color: var(--warn-ink);
}

.button,
button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover,
button:hover {
  background: #2257ce;
}

.link-button {
  background: none;
  color: #b42318;
  padding: 0;
  font-weight: 500;
  font-size: 13px;
}
.link-button:hover {
  background: none;
  text-decoration: underline;
}

form.stack label,
.auth label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
form.stack input,
.auth input {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  color: var(--ink);
}
form.inline {
  display: inline;
  margin-left: 8px;
}

.auth {
  max-width: 380px;
  margin: 24px auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}
.auth button {
  width: 100%;
  margin-top: 6px;
}
.auth .alt {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
}

.error {
  background: #fef3f2;
  color: #b42318;
  border: 1px solid #fecdca;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 16px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.ok {
  background: var(--ok-bg);
  color: var(--ok-ink);
}
.badge.demo {
  background: var(--warn-bg);
  color: var(--warn-ink);
}
.badge.none {
  background: #f1f2f4;
  color: var(--muted);
}
