:root {
  --ink: #0b1016;
  --ink-2: #121821;
  --fog: #9aabbc;
  --paper: #eef3f7;
  --line: rgba(168, 192, 214, 0.14);
  --mint: #3ddea8;
  --mint-deep: #1aa88a;
  --steel: #6ec8ff;
  --font: "Outfit", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Syne", "Outfit", "PingFang SC", sans-serif;
  --mono: "Outfit", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--paper);
  background: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 55% at 70% 0%, rgba(61, 222, 168, 0.14), transparent 55%),
    radial-gradient(ellipse 55% 45% at 8% 20%, rgba(110, 200, 255, 0.1), transparent 50%),
    radial-gradient(ellipse 70% 50% at 50% 100%, rgba(26, 168, 138, 0.08), transparent 55%),
    linear-gradient(180deg, #0e151e 0%, var(--ink) 42%, #070b10 100%);
}
.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 20%, transparent 75%);
}

.top {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.35rem 0 0;
}
.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-mark img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: transparent;
  flex-shrink: 0;
}
nav { display: flex; gap: 1.5rem; }
nav a {
  color: var(--fog);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}
nav a:hover { color: var(--paper); }

.hero {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 2.5rem 0 3.5rem;
  overflow: visible;
  container-type: inline-size;
  container-name: hero;
}

.brand-hero {
  margin: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  font-family: var(--display);
  font-weight: 800;
  /* Syne 比系统字体更宽：预留更保守的缩放 */
  font-size: clamp(1.45rem, 6.4vw, 5.2rem);
  font-size: clamp(1.45rem, 9.6cqi, 5.2rem);
  line-height: 1.15;
  letter-spacing: -0.05em;
  white-space: nowrap;
  overflow: visible;
  padding: 0.08em 0 0.12em;
  background: linear-gradient(115deg, #ffffff 8%, #c4f6e4 52%, #8ed7ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: brand-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: 3rem;
  overflow: visible;
}

.hero-copy {
  min-width: 0;
}

h1 {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(1.35rem, 3.2vw, 2.05rem);
  line-height: 1.55;
  letter-spacing: -0.02em;
  color: var(--paper);
  overflow: visible;
  animation: rise 0.8s 0.12s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* Syne 混排时 g/y 下伸部易被裁；英文词单独抬高行盒 */
.word-en {
  display: inline;
  font-family: var(--font);
  font-weight: 700;
  line-height: inherit;
  padding: 0;
  /* 用 box-decoration 避免被父级裁切观感：略放大行高由父级承担 */
  position: relative;
  top: 0.02em;
}

.lead {
  margin: 1.15rem 0 1.75rem;
  max-width: 28rem;
  color: var(--fog);
  font-size: 1.08rem;
  line-height: 1.7;
  animation: rise 0.8s 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: rise 0.8s 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.35rem;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary {
  background: linear-gradient(135deg, var(--mint), var(--mint-deep));
  color: #04120e;
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost {
  border-color: var(--line);
  color: var(--paper);
  background: rgba(255, 255, 255, 0.03);
}
.btn.ghost:hover { border-color: rgba(168, 192, 214, 0.35); }

.meta {
  margin: 1rem 0 0;
  color: var(--fog);
  font-size: 0.88rem;
  min-height: 1.2em;
  animation: rise 0.8s 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.meta.warn { color: #e8b86a; }

.hero-stage {
  position: relative;
  animation: stage-in 1.1s 0.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hero-stage::before {
  content: "";
  position: absolute;
  inset: -12% -8% -18% -8%;
  background:
    radial-gradient(circle at 40% 30%, rgba(61, 222, 168, 0.18), transparent 45%),
    radial-gradient(circle at 80% 70%, rgba(110, 200, 255, 0.12), transparent 40%);
  filter: blur(8px);
  z-index: -1;
}

.ide {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(18, 24, 33, 0.95), rgba(11, 16, 22, 0.98));
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
}

.ide-chrome {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.ide-chrome .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4a5a;
}
.ide-chrome .dot:nth-child(1) { background: #d86a5c; }
.ide-chrome .dot:nth-child(2) { background: #d4a33a; }
.ide-chrome .dot:nth-child(3) { background: #3d9b6c; }
.ide-chrome em {
  margin-left: 0.55rem;
  font-style: normal;
  color: var(--fog);
  font-size: 0.82rem;
  font-weight: 500;
}

.ide-grid {
  display: grid;
  grid-template-columns: 150px 1fr 170px;
  min-height: 300px;
}

.ide-side,
.ide-agent {
  padding: 1rem 0.95rem;
}

.ide-side {
  border-right: 1px solid var(--line);
  color: var(--fog);
  font-size: 0.86rem;
}
.ide-side strong {
  display: block;
  color: #c5d4e0;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ide-side ul {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}
.ide-side li {
  padding: 0.28rem 0.45rem;
  border-radius: 6px;
}
.ide-side .dir { color: #b7c9d8; }
.ide-side .active {
  background: rgba(61, 222, 168, 0.12);
  color: var(--mint);
}

.ide-editor {
  position: relative;
  padding: 0;
  border-right: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.22);
  font-family: var(--mono);
  font-size: 0.84rem;
  line-height: 1.75;
  min-height: 300px;
  overflow: hidden;
}
.ide-lines {
  padding: 1rem 0.95rem;
  min-height: 100%;
}
.ide-editor .line {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.7rem;
  color: #c5d3df;
  min-height: 1.75em;
}
.ide-editor .line span { color: #4d6070; text-align: right; user-select: none; }
.ide-editor .line code {
  display: inline-flex;
  align-items: center;
  white-space: pre;
  min-height: 1.2em;
}
.ide-editor .line.muted code { color: #6f8496; }
.ide-editor .line.hl code { color: #8cf0cb; }
.ide-editor .caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 1px;
  flex-shrink: 0;
  background: var(--mint);
  border-radius: 1px;
  animation: blink 1.1s steps(1) infinite;
}

.ide-agent strong {
  display: block;
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--steel);
}
.ide-agent p {
  margin: 0;
  color: var(--fog);
  font-size: 0.88rem;
  line-height: 1.6;
}
.ide-agent .pulse {
  margin-top: 1.1rem;
  height: 3px;
  width: 42%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--mint), transparent);
  animation: pulse-bar 2.4s ease-in-out infinite;
}

.features {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 4.5rem 0 2rem;
}

.section-head {
  max-width: 36rem;
  margin-bottom: 2.5rem;
  overflow: visible;
}
.section-head h2 {
  margin: 0 0 0.75rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.03em;
  line-height: 1.35;
  overflow: visible;
  padding-bottom: 0.08em;
}
.section-head p {
  margin: 0;
  color: var(--fog);
  font-size: 1.05rem;
  line-height: 1.85;
  overflow: visible;
}

.feature-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.feature {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.25rem;
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--line);
  overflow: visible;
}
.feature .num {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--mint);
  letter-spacing: 0.04em;
}
.feature h3 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  line-height: 1.4;
  overflow: visible;
  padding-bottom: 0.08em;
}
.feature p {
  margin: 0;
  max-width: 40rem;
  color: var(--fog);
  line-height: 1.75;
  font-size: 1rem;
  overflow: visible;
}

.download {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 3rem auto 4rem;
  padding: 3rem 0 0;
  border-top: 1px solid var(--line);
  text-align: left;
}
.download h2 {
  margin: 0 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  letter-spacing: -0.03em;
}
.download p {
  margin: 0 0 1.5rem;
  max-width: 32rem;
  color: var(--fog);
  line-height: 1.65;
}

.faq {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 2rem 0 1rem;
}
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}
.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0.85rem 0 1rem;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: 1.12rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.45;
  color: var(--paper);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--mint);
  font-weight: 700;
}
.faq-item[open] summary::before { content: "–"; }
.faq-item p {
  margin: 0.7rem 0 0 1.2em;
  max-width: 42rem;
  color: var(--fog);
  line-height: 1.75;
  font-size: 0.98rem;
}
.faq-item a { color: var(--steel); }

footer {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  color: var(--fog);
  font-size: 0.86rem;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--line);
}
.footer-main {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.footer-seo {
  margin: 0.85rem 0 0;
  line-height: 1.6;
  font-size: 0.8rem;
  opacity: 0.85;
}
.footer-seo a {
  color: var(--fog);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-seo a:hover { color: var(--paper); }

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  overflow: visible;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

@keyframes brand-in {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes stage-in {
  from { opacity: 0; transform: translateX(28px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes blink {
  0%, 45% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
@keyframes pulse-bar {
  0%, 100% { width: 28%; opacity: 0.55; }
  50% { width: 58%; opacity: 1; }
}

@media (max-width: 960px) {
  .hero {
    min-height: auto;
    padding-top: 2.25rem;
    gap: 1.6rem;
  }
  .brand-hero {
    font-size: clamp(1.4rem, 5.8vw, 3.2rem);
    font-size: clamp(1.4rem, 9.2cqi, 3.2rem);
    letter-spacing: -0.055em;
  }
  .hero-body {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .ide-grid { grid-template-columns: 1fr; }
  .ide-side, .ide-editor { border-right: 0; border-bottom: 1px solid var(--line); }
  .ide-editor { min-height: 220px; }
}

@media (max-width: 560px) {
  .top, .hero, .features, .faq, .download, footer {
    width: calc(100% - 1.5rem);
  }
  .brand-hero {
    font-size: clamp(1.35rem, 5.4vw, 2.4rem);
    font-size: clamp(1.35rem, 8.8cqi, 2.4rem);
  }
  h1 {
    font-size: clamp(1.2rem, 5.6vw, 1.55rem);
    line-height: 1.6;
  }
  .feature { grid-template-columns: 3rem 1fr; gap: 0.8rem; }
  .cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .ide-grid { grid-template-columns: 1fr; }
  .ide-agent { display: none; }
}
