:root {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #f7f8f6;
  --ink: #202124;
  --muted: #6f7670;
  --line: #e8ece8;
  --accent: #00a67a;
  --accent-dark: #008966;
  --soft-accent: #e8f7f2;
  --shadow: 0 24px 60px rgba(16, 24, 20, 0.12);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

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

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

.site-header {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 28px));
  padding: 12px 16px 12px 20px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(250, 251, 249, 0.6);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 10px 30px -12px rgba(18, 26, 22, 0.28),
    0 2px 8px -3px rgba(18, 26, 22, 0.10);
  transition: padding 260ms cubic-bezier(0.22, 0.61, 0.36, 1),
              background 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
}

/* frosted sheen along the top edge */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 42%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.site-header.is-scrolled {
  padding: 8px 14px 8px 18px;
  background: rgba(250, 251, 249, 0.8);
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 18px 44px -16px rgba(18, 26, 22, 0.36),
    0 3px 10px -3px rgba(18, 26, 22, 0.14);
}

.brand,
.nav,
.header-actions,
.hero-actions,
.download-links,
.footer,
.footer div {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 760;
  letter-spacing: 0;
}

.brand img {
  border-radius: 7px;
}

.nav {
  gap: 34px;
  color: #2f332f;
  font-size: 15px;
}

.nav a,
.ghost-link {
  color: #303532;
}

.nav a:hover,
.ghost-link:hover,
.download-links a:hover,
.footer a:hover {
  color: var(--accent-dark);
}

.header-actions {
  gap: 12px;
}

.language {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  color: #2e342f;
  font: inherit;
}

.primary-link,
.primary-cta,
.install-box button {
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-weight: 760;
  cursor: pointer;
}

.primary-link {
  padding: 10px 16px;
}

.primary-link:hover,
.primary-cta:hover,
.install-box button:hover {
  background: var(--accent-dark);
}

.section {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  min-height: 820px;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(520px, 1.08fr);
  align-items: center;
  gap: 48px;
  padding-top: 88px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-dark);
  font-weight: 780;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
  overflow-wrap: anywhere;
}

h1 {
  margin-bottom: 28px;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 820;
  max-width: 800px;
  overflow-wrap: break-word;
  white-space: pre-line;
}

html[lang="zh-CN"] h1 {
  font-size: clamp(40px, 5.8vw, 72px);
  line-height: 1.04;
  max-width: 680px;
}

h2 {
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.06;
  letter-spacing: 0;
  font-weight: 800;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  line-height: 1.2;
}

.hero-subtitle,
.section-heading p,
.workflow-copy p,
.download-copy p {
  color: var(--muted);
  font-size: 21px;
  max-width: 680px;
}

.hero-actions {
  gap: 14px;
  margin-top: 42px;
}

.primary-cta,
.secondary-cta {
  min-width: 164px;
  padding: 15px 22px;
  text-align: center;
}

.secondary-cta {
  background: #f2f3f1;
  border-radius: 8px;
  font-weight: 740;
}

.secondary-cta:hover {
  background: #e9ece8;
}

.hero-stats {
  display: flex;
  gap: 28px;
  margin: 48px 0 0;
  padding: 0;
}

.hero-stats div {
  min-width: 110px;
}

.hero-stats dt {
  font-size: 24px;
  font-weight: 820;
}

.hero-stats dd {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.hero-visual {
  position: relative;
  justify-self: end;
  width: min(660px, 100%);
}

.product-shot {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(215, 222, 216, 0.82);
}

.quiet-band {
  width: 100%;
  max-width: none;
  background: var(--paper);
  padding: 86px 24px;
}

.section-heading {
  width: min(940px, 100%);
  margin: 0 auto;
  text-align: center;
}

.demo-section {
  padding: 96px 0 18px;
}

.demo-frame {
  width: min(960px, 100%);
  margin: 36px auto 0;
  overflow: hidden;
  border: 1px solid rgba(215, 222, 216, 0.82);
  border-radius: 8px;
  background: #0f1715;
  box-shadow: var(--shadow);
}

.demo-frame img {
  width: 100%;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 78px 0 96px;
}

.feature-card,
.step {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.feature-card {
  min-height: 250px;
  padding: 28px;
}

.feature-index {
  display: inline-block;
  margin-bottom: 44px;
  color: var(--accent-dark);
  font-weight: 820;
}

.feature-card p,
.step p,
.release-list {
  color: var(--muted);
}

.workflow {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 44px;
  align-items: start;
  padding: 16px 0 110px;
}

.steps {
  display: grid;
  gap: 12px;
}

.step {
  display: grid;
  grid-template-columns: 54px 1fr;
  column-gap: 18px;
  padding: 22px;
}

.step span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--soft-accent);
  color: var(--accent-dark);
  font-weight: 820;
}

.step p {
  margin-bottom: 0;
}

.download {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: center;
  padding: 64px;
  background: #101412;
  color: #fff;
  border-radius: 8px;
}

.download .eyebrow,
.download-copy p {
  color: #8ee8c8;
}

.install-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.install-box code {
  overflow-x: auto;
  padding: 12px 10px;
  color: #f1fff9;
  font-family: "SFMono-Regular", Consolas, monospace;
  white-space: nowrap;
}

.install-box button {
  padding: 0 18px;
}

.download-links {
  gap: 18px;
  margin-top: 16px;
  color: #c7f5e5;
}

.updates {
  padding: 96px 0;
}

.release-list {
  width: min(760px, 100%);
  margin: 30px auto 0;
  padding-left: 22px;
  font-size: 18px;
}

.release-list li + li {
  margin-top: 10px;
}

.footer {
  justify-content: space-between;
  gap: 24px;
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
  padding: 34px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.footer p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.footer div {
  gap: 18px;
}

.author-credit {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.footer-dot {
  color: #b7beb8;
}

.author-link {
  color: var(--ink);
  font-weight: 760;
}

@media (max-width: 980px) {
  .site-header {
    position: sticky;
    top: 8px;
    left: auto;
    transform: none;
    margin: 8px auto 0;
    flex-wrap: wrap;
  }

  .nav {
    order: 3;
    width: 100%;
    gap: 18px;
    overflow-x: auto;
  }

  .hero,
  .workflow,
  .download {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
    padding-top: 54px;
    padding-bottom: 72px;
  }

  .hero-visual {
    justify-self: start;
  }

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

@media (max-width: 640px) {
  .section {
    width: auto;
    margin-left: 14px;
    margin-right: 14px;
  }

  .site-header {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
  }

  .brand {
    width: 100%;
  }

  .header-actions {
    order: 2;
    flex-basis: 100%;
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }

  .ghost-link {
    display: none;
  }

  .primary-link {
    flex: 0 0 auto;
    padding: 10px 14px;
  }

  .language {
    max-width: 132px;
  }

  h1 {
    font-size: 42px;
    line-height: 1.08;
  }

  html[lang="zh-CN"] h1 {
    font-size: 38px;
    word-break: break-all;
  }

  .hero-subtitle,
  .section-heading p,
  .workflow-copy p,
  .download-copy p {
    font-size: 18px;
  }

  .hero-actions,
  .hero-stats,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    margin-top: 28px;
  }

  .hero-stats {
    gap: 18px;
    margin-top: 34px;
  }

  .quiet-band {
    padding: 64px 14px;
  }

  .demo-section {
    padding: 70px 0 10px;
  }

  .demo-frame {
    margin-top: 26px;
  }

  .download {
    padding: 28px;
  }

  .install-box {
    grid-template-columns: 1fr;
  }

  .install-box button {
    height: 44px;
  }
}

/* ---------------------------------------------------------------------------
   Ambient depth — gives the frosted header something to blur, adds quiet depth
   --------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(880px 520px at 82% -8%, rgba(0, 166, 122, 0.12), transparent 60%),
    radial-gradient(680px 460px at 4% 0%, rgba(0, 166, 122, 0.06), transparent 55%);
}

/* ---------------------------------------------------------------------------
   Motion & micro-interactions
   --------------------------------------------------------------------------- */

/* animated underline for primary nav */
.nav a {
  position: relative;
  padding-bottom: 3px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1);
}
.nav a:hover::after {
  transform: scaleX(1);
}

/* button + link lift */
.primary-cta,
.primary-link,
.install-box button {
  transition: background 160ms ease, transform 160ms ease, box-shadow 200ms ease;
}
.primary-cta:hover,
.primary-link:hover,
.install-box button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(0, 137, 102, 0.6);
}
.primary-cta:active,
.primary-link:active,
.install-box button:active {
  transform: translateY(0);
}
.secondary-cta {
  transition: background 160ms ease, transform 160ms ease;
}
.secondary-cta:hover {
  transform: translateY(-1px);
}

/* feature cards + steps lift on hover */
.feature-card,
.step {
  transition: transform 220ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 220ms ease, border-color 220ms ease;
}
.feature-card:hover,
.step:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -24px rgba(18, 26, 22, 0.4);
}

/* product shot floats a touch */
.hero-visual .product-shot {
  transition: transform 400ms cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 400ms ease;
}
.hero-visual:hover .product-shot {
  transform: translateY(-6px);
  box-shadow: 0 40px 90px rgba(16, 24, 20, 0.2);
}

/* scroll-reveal — applied by app.js (progressive enhancement) */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 640ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 640ms cubic-bezier(0.22, 0.61, 0.36, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  [data-reveal],
  .site-header,
  .feature-card,
  .step,
  .product-shot,
  .primary-cta,
  .primary-link {
    transition: none !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
