:root {
  --bg: #0a0a0a;
  --bg-elevated: #111111;
  --bg-panel: #161616;
  --ink: #f2f2f2;
  --mute: #8a8a8a;
  --line: #262626;
  --accent: #f2f2f2;
  --accent-soft: #2a2a2a;
  --signal: #7dd3fc;
  --signal-2: #c4b5fd;
  --ok: #86efac;
  --font-sans: "Outfit", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Instrument Serif", "Songti SC", Georgia, serif;
  --radius: 14px;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  color-scheme: dark;
  overflow-x: hidden;
}

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

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(125, 211, 252, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 30%, rgba(196, 181, 253, 0.08), transparent 50%),
    linear-gradient(180deg, #0a0a0a 0%, #0c0c0c 100%);
}

.top {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.top-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--mute);
}

.top-nav a:hover {
  color: var(--ink);
}

.top-download {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--accent);
  color: #0a0a0a !important;
  font-weight: 600;
}

main {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding-bottom: 96px;
}

.hero {
  padding: 48px 0 32px;
  text-align: center;
}

.kicker,
.section-kicker {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}

h1 {
  margin: 0 auto;
  max-width: min(100%, 920px);
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

h1 .line {
  display: inline-block;
  white-space: nowrap;
}

h1 em {
  font-style: italic;
  color: color-mix(in oklab, var(--ink) 88%, var(--signal));
}

.lead {
  margin: 22px auto 0;
  max-width: 42ch;
  font-size: clamp(16px, 2vw, 18px);
  line-height: 1.6;
  color: var(--mute);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

.btn.primary {
  background: var(--accent);
  color: #0a0a0a;
}

.btn.primary:hover {
  transform: translateY(-1px);
  background: #fff;
}

.btn.secondary {
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink);
}

.btn.secondary:hover {
  border-color: #3a3a3a;
  background: var(--bg-panel);
}

.hint {
  margin: 14px auto 0;
  max-width: 48ch;
  font-size: 12px;
  line-height: 1.5;
  color: #6b6b6b;
}

.hero-stage {
  margin: 56px 0 0;
  perspective: 1400px;
}

.window {
  margin: 0 auto;
  width: min(100%, 980px);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #0e0e0e;
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 255, 255, 0.03) inset;
  transform: rotateX(8deg) translateY(0);
  transform-origin: center top;
}

.window-chrome {
  display: grid;
  grid-template-columns: auto auto auto 1fr;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #121212;
}

.window-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2c2c2c;
}

.window-chrome span:nth-child(1) { background: #ff5f57; }
.window-chrome span:nth-child(2) { background: #febc2e; }
.window-chrome span:nth-child(3) { background: #28c840; }

.window-chrome p {
  margin: 0;
  text-align: center;
  font-size: 11px;
  color: var(--mute);
}

.window-body {
  display: grid;
  grid-template-columns: 170px 1fr 200px;
  min-height: 320px;
}

.pane-files,
.pane-ai {
  padding: 14px 12px;
  background: #0c0c0c;
  border-right: 1px solid var(--line);
  text-align: left;
}

.pane-ai {
  border-right: 0;
  border-left: 1px solid var(--line);
}

.pane-title {
  margin: 0 0 12px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #666;
}

.pane-files ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--mute);
}

.pane-files li {
  padding: 6px 8px;
  border-radius: 8px;
}

.pane-files li.active {
  background: #1a1a1a;
  color: var(--ink);
}

.pane-editor {
  padding: 18px 20px;
  text-align: left;
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.04), transparent 40%),
    #101010;
}

.md-h {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.md-p {
  margin: 0 0 16px;
  font-size: 13px;
  color: #bdbdbd;
  line-height: 1.5;
}

.md-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  margin-bottom: 16px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-size: 12px;
}

.md-table span {
  padding: 8px 10px;
  background: #151515;
}

.md-table span:nth-child(-n + 2) {
  color: var(--mute);
  background: #121212;
}

.md-code {
  margin: 0;
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  background: #151515;
  border: 1px solid var(--line);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--signal);
}

.bubble {
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.bubble.user {
  background: #1a1a1a;
  color: #cfcfcf;
}

.bubble.bot {
  background: color-mix(in oklab, var(--signal) 12%, #141414);
  color: #d8f0ff;
  border: 1px solid color-mix(in oklab, var(--signal) 22%, transparent);
}

.capabilities {
  padding: 88px 0 24px;
}

.capabilities > h2 {
  margin: 0 0 48px;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.capability {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(24px, 5vw, 56px);
  align-items: center;
  padding: 36px 0;
  border-top: 1px solid var(--line);
}

.capability.reverse {
  direction: rtl;
}

.capability.reverse > * {
  direction: ltr;
}

.capability-index {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mute);
}

.capability-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.capability-copy p:last-child {
  margin: 0;
  max-width: 38ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--mute);
}

.capability-visual {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  display: grid;
  place-items: center;
  padding: 22px;
  overflow: hidden;
}

.visual-edit {
  background:
    radial-gradient(circle at 30% 20%, rgba(125, 211, 252, 0.12), transparent 45%),
    var(--bg-elevated);
}

.mock-doc {
  width: min(100%, 320px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #101010;
  padding: 14px;
}

.mock-toolbar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.mock-toolbar i {
  width: 22px;
  height: 10px;
  border-radius: 999px;
  background: #242424;
}

.mock-lines {
  display: grid;
  gap: 8px;
}

.mock-lines b,
.mock-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: #2a2a2a;
}

.mock-lines b:first-child {
  width: 42%;
  height: 14px;
  background: linear-gradient(90deg, var(--signal), var(--signal-2));
}

.mock-lines b:nth-child(2) {
  width: 70%;
}

.mock-lines span {
  width: 100%;
  background: #1d1d1d;
}

.mock-lines span.short {
  width: 55%;
}

.visual-files {
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  align-items: stretch;
  background:
    radial-gradient(circle at 80% 30%, rgba(196, 181, 253, 0.1), transparent 40%),
    var(--bg-elevated);
}

.mock-tree {
  display: grid;
  gap: 8px;
  align-content: center;
}

.mock-tree .row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #101010;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--mute);
}

.mock-tree .row.on {
  border-color: color-mix(in oklab, var(--signal) 35%, var(--line));
  color: var(--ink);
}

.mock-tree em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #777;
}

.mock-preview {
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px dashed #333;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent),
    #0f0f0f;
  color: #666;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.visual-ai {
  background:
    radial-gradient(circle at 20% 80%, rgba(134, 239, 172, 0.1), transparent 40%),
    var(--bg-elevated);
}

.mock-chat {
  width: min(100%, 340px);
  display: grid;
  gap: 10px;
  text-align: left;
}

.mock-chat .q,
.mock-chat .a {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}

.mock-chat .q {
  background: #1a1a1a;
  color: #cfcfcf;
}

.mock-chat .a {
  background: color-mix(in oklab, var(--ok) 10%, #141414);
  border: 1px solid color-mix(in oklab, var(--ok) 25%, transparent);
  color: #dff8e8;
}

.mock-chat .diff {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--ok);
  padding-left: 4px;
}

.closing {
  margin-top: 72px;
  padding: 56px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(125, 211, 252, 0.08), transparent 60%),
    #0f0f0f;
}

.closing h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 400;
  letter-spacing: -0.03em;
}

.closing p {
  margin: 12px auto 0;
  color: var(--mute);
  font-size: 15px;
}

.foot {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--mute);
}

.foot a:hover {
  color: var(--ink);
}

.motion-ready .hero > :not(.hero-stage) {
  animation: rise 0.75s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.motion-ready .hero .lead { animation-delay: 0.05s; }
.motion-ready .hero .cta-row { animation-delay: 0.1s; }
.motion-ready .hero .hint { animation-delay: 0.14s; }

.motion-ready .hero-stage .window {
  animation: stage-in 1s 0.12s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.motion-ready .capability {
  animation: rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes stage-in {
  from {
    opacity: 0;
    transform: rotateX(14deg) translateY(28px);
  }
  to {
    opacity: 1;
    transform: rotateX(8deg) translateY(0);
  }
}

@media (max-width: 900px) {
  .window-body {
    grid-template-columns: 1fr;
  }

  .pane-files,
  .pane-ai {
    border: 0;
    border-bottom: 1px solid var(--line);
  }

  .capability,
  .capability.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .visual-files {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .top-nav a:not(.top-download) {
    display: none;
  }

  h1 {
    font-size: clamp(22px, 6.2vw, 30px);
  }

  h1 .line {
    white-space: nowrap;
  }

  .window {
    transform: none;
  }

  .motion-ready .hero-stage .window {
    animation-name: rise;
  }
}

@media (prefers-reduced-motion: reduce) {
  .motion-ready .hero > :not(.hero-stage),
  .motion-ready .hero-stage .window,
  .motion-ready .capability {
    animation: none;
  }
}
