:root {
  --ink: #101612;
  --mist: #e7ece8;
  --paper: #f3f6f3;
  --jade: #2f7a58;
  --jade-deep: #215740;
  --muted: #5d6a61;
  --line: rgba(16, 22, 18, 0.12);
  --shadow: 0 30px 80px rgba(10, 16, 12, 0.28);
  --serif: 'Source Serif 4', 'Songti SC', serif;
  --sans: 'Source Sans 3', 'PingFang SC', sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(1200px 600px at 50% -10%, #ffffff 0%, var(--mist) 42%, #d7e0d9 100%);
  min-height: 100vh;
}

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

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
}

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 7vw;
  backdrop-filter: blur(14px);
  background: rgba(243, 246, 243, 0.72);
  border-bottom: 1px solid transparent;
}

.brand {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.top nav {
  display: flex;
  gap: 22px;
  color: var(--muted);
  font-size: 15px;
}

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

.top-cta {
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.top-cta:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  min-height: calc(100vh - 72px);
  padding: 48px 7vw 72px;
  overflow: hidden;
}

.hero-atmosphere {
  position: absolute;
  inset: 10% -10% auto auto;
  width: min(54vw, 720px);
  height: min(54vw, 720px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(47, 122, 88, 0.28), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(16, 22, 18, 0.18), transparent 60%);
  filter: blur(8px);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  max-width: min(42rem, 100%);
}

.hero h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(42px, 5.6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.05;
  white-space: nowrap;
}

.lede {
  margin: 22px 0 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.55;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn.primary {
  background: var(--jade);
  color: #f4fff8;
}

.btn.primary:hover:not(:disabled) {
  background: var(--jade-deep);
}

.btn.ghost {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.linkish {
  border: 0;
  padding: 0;
  background: none;
  color: var(--jade-deep);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.version-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.version-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
}

.hero-stage {
  position: relative;
  display: grid;
  place-items: center;
}

.window {
  width: min(100%, 520px);
  border: 1px solid rgba(16, 22, 18, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, #1a221d 0%, #101612 100%);
  color: #d7e4db;
  box-shadow: var(--shadow);
  transform: perspective(900px) rotateY(-8deg) rotateX(4deg);
  animation: float-in 900ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.window-bar {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.window-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3a4a40;
}

.window-bar span:nth-child(1) {
  background: #7a8f80;
}
.window-bar span:nth-child(2) {
  background: #4f7f63;
}
.window-bar span:nth-child(3) {
  background: #2f7a58;
}

.window-body {
  padding: 22px 20px 26px;
}

.prompt {
  margin: 0;
  font-size: 18px;
  line-height: 1.5;
}

.trace {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.trace span {
  color: #9bb5a5;
  font-size: 14px;
}

.trace i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 50%;
  background: var(--jade);
  box-shadow: 0 0 0 0 rgba(47, 122, 88, 0.5);
  animation: pulse 2.2s ease-in-out infinite;
}

.trace i:nth-child(3) {
  animation-delay: 0.25s;
}
.trace i:nth-child(5) {
  animation-delay: 0.5s;
}

.strip {
  padding: 34px 7vw;
  background: #121816;
  color: #dce7e0;
}

.strip p {
  margin: 0 0 16px;
  color: #8ea497;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.strip ul {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 34px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 18px;
}

.section {
  padding: 88px 7vw;
}

.section.muted {
  background: rgba(255, 255, 255, 0.35);
}

.section h2 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--serif);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-lede {
  margin: 16px 0 0;
  max-width: 42rem;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  margin-top: 42px;
}

.grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
}

.grid h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.download-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
}

.download-card strong {
  display: block;
  font-size: 18px;
}

.download-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.code {
  margin-top: 24px;
  padding: 20px;
  overflow: auto;
  border-radius: 16px;
  background: #121816;
  color: #d7e4db;
  line-height: 1.55;
}

footer {
  padding: 28px 7vw 48px;
  color: var(--muted);
  font-size: 14px;
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: perspective(900px) translateY(18px) rotateY(-8deg) rotateX(4deg);
  }
  to {
    opacity: 1;
    transform: perspective(900px) translateY(0) rotateY(-8deg) rotateX(4deg);
  }
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(47, 122, 88, 0.45);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(47, 122, 88, 0);
  }
}

@media (max-width: 920px) {
  .top nav,
  .top-cta {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 36px;
  }

  .hero h1 {
    font-size: clamp(32px, 9vw, 48px);
  }

  .hero-stage {
    order: -1;
  }

  .window {
    transform: none;
  }

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

  .download-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .window,
  .trace i,
  .btn {
    animation: none;
    transition: none;
  }
}
