:root {
  color-scheme: light;
  --ink: #11140f;
  --muted: #586052;
  --surface: #f8f7ef;
  --surface-soft: #eeeadb;
  --line: #c9c3ad;
  --terminal: #0d100b;
  --terminal-soft: #151a12;
  --green: #2ad36b;
  --green-dark: #149447;
  --amber: #c98324;
  --shadow: 10px 10px 0 rgba(17, 20, 15, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(17, 20, 15, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(17, 20, 15, 0.035) 1px, transparent 1px),
    var(--surface);
  background-size: 28px 28px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

.site-nav {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 64px;
  padding: 0 clamp(20px, 5vw, 64px);
  color: #f8f7ef;
  background: rgba(13, 16, 11, 0.92);
  border-bottom: 1px solid rgba(42, 211, 107, 0.3);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--green);
  background: #050704;
  border: 1px solid rgba(42, 211, 107, 0.54);
  border-radius: 3px;
  font-size: 13px;
  letter-spacing: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.site-nav nav {
  display: flex;
  gap: 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 650;
}

.site-nav nav a {
  text-decoration: none;
}

.site-nav nav a:hover {
  color: #ffffff;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.language-switch {
  display: flex;
  padding: 3px;
  background: rgba(42, 211, 107, 0.08);
  border: 1px solid rgba(42, 211, 107, 0.28);
  border-radius: 3px;
}

.language-switch button {
  min-width: 42px;
  height: 28px;
  padding: 0 10px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  border: 0;
  border-radius: 2px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.language-switch button[aria-pressed="true"] {
  color: #081008;
  background: var(--green);
}

[data-lang="zh"] {
  display: none !important;
}

:root[data-language="zh"] [data-lang="en"] {
  display: none !important;
}

:root[data-language="zh"] [data-lang="zh"] {
  display: revert !important;
}

:root[data-language="zh"] .hero-actions [data-lang="zh"],
:root[data-language="zh"] .install-actions [data-lang="zh"] {
  display: inline-flex !important;
}

:root[data-language="zh"] .new-req[data-lang="zh"],
:root[data-language="zh"] .message[data-lang="zh"],
:root[data-language="zh"] .status-line[data-lang="zh"] {
  display: block !important;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(24px, 4vw, 72px);
  align-items: center;
  min-height: 86vh;
  padding: 116px clamp(20px, 6vw, 88px) 72px;
  overflow: hidden;
  color: #ffffff;
  background:
    linear-gradient(rgba(13, 16, 11, 0.2), rgba(13, 16, 11, 0.68)),
    linear-gradient(135deg, #070906 0%, #12180f 52%, #22200f 100%);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.hero::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(7, 9, 6, 0.95), rgba(7, 9, 6, 0.68) 54%, rgba(7, 9, 6, 0.28)),
    linear-gradient(rgba(42, 211, 107, 0.08) 1px, transparent 1px);
  background-size: auto, 100% 18px;
}

.hero-visual {
  position: relative;
  justify-self: end;
  z-index: 1;
  width: min(720px, 100%);
  opacity: 0.92;
}

.app-frame {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 420px;
  overflow: hidden;
  background: rgba(248, 247, 239, 0.94);
  border: 1px solid rgba(42, 211, 107, 0.5);
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.app-sidebar {
  padding: 18px;
  color: var(--ink);
  background: #0d100b;
}

.repo-line,
.new-req,
.req,
.issue-list {
  border-radius: 3px;
}

.repo-line {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.new-req {
  margin: 18px 0;
  padding: 10px 12px;
  color: #081008;
  background: var(--green);
  font-size: 13px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.req {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
  padding: 12px;
  color: rgba(255, 255, 255, 0.78);
  background: rgba(255, 255, 255, 0.08);
}

.req.active {
  color: #ffffff;
  background: rgba(42, 211, 107, 0.22);
  border: 1px solid rgba(42, 211, 107, 0.38);
}

.req span {
  font-weight: 850;
}

.req small,
.issue-list {
  font-size: 12px;
}

.issue-list {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.76);
}

.issue-list div {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 3px;
}

.issue-list b {
  color: var(--green);
}

.app-chat {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  color: var(--ink);
  background: #ebe7d7;
}

.message {
  width: min(84%, 520px);
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: none;
}

.message.user {
  align-self: flex-end;
  color: #081008;
  background: #d9f99d;
  border-color: rgba(20, 148, 71, 0.36);
}

.message.agent {
  display: grid;
  gap: 5px;
  background: #f8f7ef;
}

.message.agent span {
  color: var(--muted);
  font-size: 14px;
}

.status-line {
  margin-top: auto;
  padding: 12px 14px;
  color: var(--green);
  background: var(--terminal);
  border: 1px solid rgba(42, 211, 107, 0.32);
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  width: min(680px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.hero .eyebrow {
  color: var(--green);
}

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

h1 {
  margin-bottom: 14px;
  font-size: clamp(72px, 14vw, 156px);
  line-height: 0.86;
  letter-spacing: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 900;
}

.hero-lede {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.25;
}

.hero-actions,
.install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.button.primary {
  color: #081008;
  background: var(--green);
  border-color: var(--green);
}

.button.primary:hover {
  background: #8cffb6;
}

.button.secondary {
  color: inherit;
  background: transparent;
  border-color: rgba(42, 211, 107, 0.5);
}

.section,
.install {
  padding: 76px clamp(20px, 6vw, 88px);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

h2 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.install p {
  color: var(--muted);
  font-size: 18px;
}

.workflow {
  background: var(--surface);
}

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

.flow-grid article,
.feature-grid article,
.install-card {
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}

.flow-grid article {
  min-height: 210px;
}

.step {
  display: inline-block;
  margin-bottom: 28px;
  color: var(--amber);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 850;
}

h3 {
  margin-bottom: 8px;
  font-size: 20px;
  line-height: 1.2;
}

.flow-grid p,
.feature-grid p {
  margin-bottom: 0;
  color: var(--muted);
}

.features {
  background: var(--surface-soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

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

.install {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: 36px;
  align-items: start;
  background:
    linear-gradient(rgba(42, 211, 107, 0.06) 1px, transparent 1px),
    var(--terminal);
  background-size: 100% 22px;
}

.install h2,
.install p {
  color: #ffffff;
}

.install p {
  color: rgba(255, 255, 255, 0.72);
}

.install-card {
  color: #d1fae5;
  background: var(--terminal-soft);
  border-color: rgba(42, 211, 107, 0.34);
}

.terminal-title {
  margin-bottom: 12px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
  font-weight: 800;
}

.install-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 18px;
}

.install-command input {
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  color: #d7ffe4;
  background: #050704;
  border: 1px solid rgba(42, 211, 107, 0.38);
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  outline: none;
}

.install-command input:focus {
  border-color: rgba(42, 211, 107, 0.82);
  box-shadow: 0 0 0 3px rgba(42, 211, 107, 0.16);
}

.install-command button {
  min-width: 88px;
  height: 46px;
  padding: 0 16px;
  color: #081008;
  background: var(--green);
  border: 1px solid var(--green);
  border-radius: 3px;
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.install-command button:hover {
  background: #8cffb6;
}

.install-command button[data-copied="true"] span {
  display: none !important;
}

.install-command button[data-copied="true"]::after {
  content: "Copied";
}

:root[data-language="zh"] .install-command button[data-copied="true"]::after {
  content: "已复制";
}

.install .button.secondary {
  color: #ffffff;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(20px, 6vw, 88px);
  color: var(--muted);
  border-top: 1px solid var(--line);
}

footer span:first-child {
  color: var(--ink);
  font-weight: 850;
}

@media (max-width: 980px) {
  .site-nav nav {
    display: none;
  }

  .nav-controls {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 104px;
    padding-bottom: 42px;
    background:
      linear-gradient(rgba(7, 12, 24, 0.18), rgba(7, 12, 24, 0.58)),
      linear-gradient(135deg, #0c1220 0%, #1f2937 48%, #143b55 100%);
    background-position: center;
    background-size: cover;
  }

  .hero::after {
    background: linear-gradient(rgba(7, 12, 24, 0.84), rgba(7, 12, 24, 0.76));
  }

  .hero-visual {
    width: min(100%, 640px);
    margin: 30px auto 0;
    justify-self: center;
    opacity: 0.95;
  }

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

@media (max-width: 680px) {
  .hero {
    padding-right: 18px;
    padding-left: 18px;
  }

  .hero-visual {
    display: none;
  }

  h1 {
    font-size: clamp(64px, 20vw, 96px);
  }

  .hero-lede {
    font-size: 19px;
  }

  .hero-actions {
    width: 100%;
  }

  .hero-actions .button {
    flex: 1 1 150px;
  }

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

  .install-command button {
    width: 100%;
  }

  .app-frame {
    grid-template-columns: 1fr;
    min-height: 300px;
    border-radius: 14px;
  }

  .app-sidebar {
    display: none;
  }

  .app-chat {
    padding: 18px;
  }

  .message {
    width: 100%;
  }

  .section,
  .install {
    padding-top: 56px;
    padding-bottom: 56px;
  }

  footer {
    flex-direction: column;
  }
}
