:root {
  --ink: #10110f;
  --paper: #f2f0e9;
  --surface: #faf9f5;
  --line: #cbc9c0;
  --muted: #666860;
  --lime: #c7f36b;
  --orange: #ff7048;
  --max-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.page-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.35;
  background-image: linear-gradient(to right, rgba(16, 17, 15, 0.08) 1px, transparent 1px);
  background-size: calc((100vw - 2rem) / 6) 100%;
  background-position: 1rem 0;
}

.site-header, footer {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header { height: 90px; border-bottom: 1px solid var(--line); }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; font-size: 1.1rem; font-weight: 800; letter-spacing: -0.04em; }

.brand-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  color: var(--paper);
  background: var(--ink);
  font-family: "DM Mono", monospace;
  font-size: 0.9rem;
  border-radius: 3px;
  transform: rotate(-4deg);
}

nav { display: flex; align-items: center; gap: 2rem; font-size: 0.82rem; font-weight: 700; }
nav a { transition: opacity 160ms ease; }
nav a:hover { opacity: 0.55; }
.nav-github { padding: 0.72rem 1rem; color: var(--paper); background: var(--ink); border-radius: 3px; }

main { overflow: hidden; }

.hero {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
  padding: 7.5rem 0 6rem;
}

.eyebrow, .kicker {
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow { display: flex; align-items: center; gap: 0.65rem; }
.eyebrow span { width: 1.8rem; height: 2px; background: var(--orange); }

h1 {
  max-width: 980px;
  margin: 1.8rem 0 2rem;
  font-size: clamp(4rem, 10.5vw, 8.8rem);
  line-height: 0.86;
  letter-spacing: -0.085em;
  font-weight: 800;
}

h1 em { color: var(--orange); font-style: normal; font-weight: 500; }

.hero-copy {
  max-width: 660px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.hero-actions { display: flex; gap: 0.75rem; margin-top: 2.2rem; }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.35rem;
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 0.86rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.button:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.button-primary { gap: 2rem; background: var(--lime); }
.button-primary span { font-size: 1.2rem; }
.button-secondary { background: var(--surface); }

.terminal {
  max-width: 950px;
  margin: 6rem 0 0 auto;
  color: #ecece6;
  background: var(--ink);
  border: 1px solid #2d2e2a;
  border-radius: 7px;
  box-shadow: 20px 24px 0 rgba(16, 17, 15, 0.1);
  overflow: hidden;
  font-family: "DM Mono", monospace;
  font-size: clamp(0.68rem, 1.2vw, 0.86rem);
}

.terminal-bar { display: flex; align-items: center; padding: 0.9rem 1.1rem; color: #85867e; border-bottom: 1px solid #2d2e2a; }
.terminal-dots { display: flex; gap: 0.4rem; margin-right: auto; }
.terminal-dots i { width: 8px; height: 8px; border: 1px solid #686960; border-radius: 50%; }
.terminal-status { margin-left: auto; color: #8faa57; font-size: 0.68rem; }
.terminal-body { min-height: 340px; padding: 1.4rem 1.6rem 1.8rem; line-height: 1.65; }
.terminal-body p { margin: 0 0 1rem; }
.prompt { color: var(--lime); }
.muted { color: #777970; }
.patch-label, .user-label { display: inline-block; width: 4.2rem; color: var(--lime); font-size: 0.66rem; font-weight: 500; letter-spacing: 0.08em; }
.user-label { color: #ff9b7f; }
.diff { margin-left: 4.2rem !important; padding: 0.65rem 1rem; color: #bce96a; background: #171d11; border-left: 2px solid #8db448; }
.success { color: #a9ab9f; }

.signal-strip {
  display: flex;
  min-width: max-content;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.2rem 2rem;
  color: var(--paper);
  background: var(--orange);
  font-family: "DM Mono", monospace;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transform: rotate(-1deg) scale(1.02);
}
.signal-strip i { width: 5px; height: 5px; background: var(--ink); border-radius: 50%; }

.features { width: min(calc(100% - 2rem), var(--max-width)); margin: 0 auto; padding: 10rem 0 8rem; }
.section-heading { display: grid; grid-template-columns: 1fr 2fr; align-items: end; margin-bottom: 3.5rem; }
.kicker { align-self: start; margin: 0; color: var(--orange); }
h2 { margin: 0; font-size: clamp(2.8rem, 6vw, 5rem); line-height: 0.95; letter-spacing: -0.065em; }
.section-heading > p:last-child { grid-column: 2; max-width: 510px; margin: 1.5rem 0 0; color: var(--muted); line-height: 1.7; }

.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.feature-card { position: relative; min-height: 380px; padding: 2.2rem; background: var(--surface); overflow: hidden; }
.feature-card-wide { grid-column: 1 / -1; min-height: 330px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; }
.feature-card-dark { color: var(--paper); background: var(--ink); }
.feature-number { position: absolute; top: 1.2rem; right: 1.2rem; color: #989a91; font-family: "DM Mono", monospace; font-size: 0.7rem; }
.feature-card h3 { max-width: 430px; margin: 2.2rem 0 0.8rem; font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.055em; }
.feature-card p { max-width: 500px; margin: 0; color: var(--muted); line-height: 1.7; }
.feature-card-dark p { color: #a3a49d; }

.repo-map { display: flex; align-items: center; justify-content: center; }
.repo-map .file { padding: 0.8rem; border: 1px solid var(--line); border-radius: 3px; font-family: "DM Mono", monospace; font-size: 0.65rem; }
.repo-map .active { color: var(--ink); background: var(--lime); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.repo-map .line { width: 35px; height: 1px; background: var(--line); }

.model-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 3rem; }
.model-pills span { padding: 0.55rem 0.75rem; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: 99px; font: 0.65rem "DM Mono", monospace; }
.commit-line { margin-top: 3rem; padding: 0.9rem; background: var(--paper); border-left: 2px solid var(--lime); font: 0.72rem "DM Mono", monospace; }
.commit-line i { margin-right: 0.6rem; color: #719831; font-style: normal; }
.flow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.7rem; }
.flow span { padding: 0.75rem 1rem; border: 1px solid #3d3f39; border-radius: 3px; font: 0.68rem "DM Mono", monospace; }
.flow b { color: var(--orange); }

.install {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 6rem;
  align-items: center;
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto 8rem;
  padding: 6rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.install-copy .kicker { margin-bottom: 1.4rem; }
.install-copy > p:not(.kicker) { margin: 1.5rem 0; color: var(--muted); line-height: 1.7; }
.install-copy code { padding: 0.1rem 0.3rem; background: #e4e2d9; font-family: "DM Mono", monospace; font-size: 0.85em; }
.text-link { display: inline-block; font-weight: 800; border-bottom: 1px solid var(--ink); }
.install-command { color: var(--paper); background: var(--ink); border-radius: 6px; box-shadow: 14px 14px 0 var(--lime); overflow: hidden; }
.command-top { display: flex; justify-content: space-between; padding: 0.8rem 1rem; color: #878980; border-bottom: 1px solid #30312d; font: 0.66rem "DM Mono", monospace; }
.command-top button { padding: 0; color: var(--lime); background: transparent; border: 0; font: inherit; cursor: pointer; }
pre { margin: 0; padding: 1.5rem; overflow-x: auto; font: 0.75rem/2 "DM Mono", monospace; }

footer { min-height: 120px; color: var(--muted); border-top: 1px solid var(--line); font-size: 0.74rem; }
footer .brand { color: var(--ink); }
footer a:not(.brand) { text-decoration: underline; text-underline-offset: 3px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 650ms ease, transform 650ms ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

@media (max-width: 760px) {
  .site-header { height: 72px; }
  nav a:not(.nav-github) { display: none; }
  .hero { padding-top: 5rem; }
  h1 { font-size: clamp(3.7rem, 19vw, 6rem); }
  .terminal { margin-top: 4rem; }
  .terminal-body { min-height: 0; padding: 1.2rem; }
  .diff { margin-left: 0 !important; }
  .signal-strip { justify-content: flex-start; animation: drift 18s linear infinite alternate; }
  .features { padding: 8rem 0 6rem; }
  .section-heading, .install { grid-template-columns: 1fr; }
  .section-heading > p:last-child { grid-column: 1; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-card, .feature-card-wide { grid-column: 1; min-height: 350px; display: block; }
  .repo-map, .flow { margin-top: 3rem; }
  .install { gap: 3rem; }
  footer { min-height: 180px; flex-direction: column; justify-content: center; gap: 1rem; }
  footer p { margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

@keyframes drift { to { transform: translateX(-25%) rotate(-1deg) scale(1.02); } }
