:root {
  --paper: #f6f5f1;
  --surface: #ffffff;
  --ink: #1b1c1a;
  --muted: #5a5e5a;
  --line: #e0ded6;
  --accent: #f04e23;
  --accent-deep: #c23a12;
  --code-bg: #17181a;
  --code-fg: #e8e6e1;
  --code-dim: #8a8f8b;
  --code-tag: #c7c4bb;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

.mono {
  font-family: var(--mono);
  font-size: 0.92em;
  color: var(--ink);
  background: rgba(27, 28, 26, 0.05);
  padding: 0.05em 0.35em;
  border-radius: 3px;
}

/* ---------- header ---------- */

.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: 0 auto;
  padding: 26px 24px;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--mono);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.wordmark-mark {
  color: var(--accent);
  font-size: 15px;
  transform: translateY(-1px);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
  color: var(--muted);
}

.site-nav a {
  transition: color 120ms ease;
}

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

.nav-cta {
  color: var(--ink) !important;
  border: 1px solid var(--ink);
  padding: 7px 14px;
  border-radius: 4px;
  font-weight: 500;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--paper) !important;
}

/* ---------- hero ---------- */

.hero {
  max-width: 1120px;
  margin: 0 auto;
  padding: 64px 24px 88px;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 22px;
  max-width: 15ch;
}

.lede {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
  margin: 0 0 30px;
  max-width: 44ch;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: 5px;
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease, color 120ms ease;
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--accent);
  color: #fff;
}

.btn-quiet {
  color: var(--ink);
  border-bottom: 2px solid var(--accent);
  border-radius: 0;
  padding: 4px 2px;
}

.btn-quiet:hover {
  color: var(--accent-deep);
  border-color: var(--accent-deep);
}

/* ---------- strip demo ---------- */

.strip-demo {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  gap: 0;
  background: var(--code-bg);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(27, 28, 26, 0.55);
}

.demo-pane {
  padding: 18px 20px 22px;
  min-width: 0;
}

.demo-label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--code-dim);
  margin-bottom: 14px;
}

.demo-code {
  margin: 0;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.62;
  color: var(--code-fg);
  white-space: pre-wrap;
  word-break: break-word;
}

.html-tag {
  color: var(--code-tag);
}

.md-h {
  color: var(--code-fg);
  font-weight: 500;
}

.md-fence {
  color: var(--code-dim);
}

/* Final state (no JS): noise reads as removed, output is visible. */
.noise {
  color: var(--code-dim);
  opacity: 0.55;
  text-decoration: line-through;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
}

.demo-divider {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.divider-line {
  width: 1px;
  height: 28px;
  background: #2e3133;
}

.divider-strip {
  width: 12px;
  height: 36px;
  background: repeating-linear-gradient(
    -45deg,
    var(--accent) 0,
    var(--accent) 4px,
    transparent 4px,
    transparent 8px
  );
  border-radius: 2px;
}

.demo-count {
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
}

/* JS-enabled: start from the "before" state and animate the strip on load. */
.js .noise {
  color: var(--accent);
  opacity: 1;
  text-decoration: none;
  position: relative;
  transition: color 400ms ease, opacity 400ms ease;
}

.js .noise::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  top: 55%;
  height: 1.5px;
  background: var(--accent);
  transition: right 450ms ease;
}

.js .demo-out {
  opacity: 0;
  transform: translateX(8px);
  transition: opacity 500ms ease 200ms, transform 500ms ease 200ms;
}

.js .strip-demo.is-stripped .noise {
  color: var(--code-dim);
  opacity: 0.55;
}

.js .strip-demo.is-stripped .noise::after {
  right: 0;
}

.js .strip-demo.is-stripped .demo-out {
  opacity: 1;
  transform: translateX(0);
}

/* ---------- sections ---------- */

.section {
  max-width: 1120px;
  margin: 0 auto;
  padding: 72px 24px;
  border-top: 1px solid var(--line);
}

.section h2 {
  font-family: var(--mono);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 34px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}

.section-lede {
  color: var(--muted);
  font-size: 18px;
  max-width: 60ch;
  margin: 0 0 40px;
}

/* ---------- features ---------- */

.feature-list {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.feature {
  padding: 26px 28px 26px 0;
  border-top: 1px solid var(--line);
}

.feature:nth-child(odd) {
  padding-right: 28px;
}

.feature:nth-child(even) {
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.feature dt {
  font-weight: 600;
  font-size: 17px;
  margin-bottom: 6px;
}

.feature dd {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: 56px minmax(180px, 0.7fr) minmax(0, 1.4fr);
  gap: 20px;
  align-items: baseline;
  padding: 26px 0;
  border-top: 1px solid var(--line);
}

.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
}

.step-name {
  font-weight: 600;
  font-size: 17px;
}

.step-desc {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

/* ---------- code blocks ---------- */

.code-block {
  background: var(--code-bg);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 24px;
}

.code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid #2e3133;
}

.code-title {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--code-dim);
}

.copy-btn {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--code-fg);
  background: #26292b;
  border: 1px solid #3a3e41;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.copy-btn:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.code-body {
  margin: 0;
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--code-fg);
  overflow-x: auto;
}

.api-note {
  color: var(--muted);
  font-size: 15px;
  max-width: 66ch;
  margin: 0;
}

.api-note .mono {
  background: transparent;
  color: var(--ink);
  font-size: 0.9em;
}

/* ---------- footer ---------- */

.site-foot {
  max-width: 1120px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  border-top: 1px solid var(--line);
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

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

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

.foot-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 60ch;
}

/* ---------- focus ---------- */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 40px;
    gap: 40px;
  }

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

  .demo-divider {
    flex-direction: row;
    padding: 6px 0;
  }

  .divider-line {
    width: 28px;
    height: 1px;
  }

  .divider-strip {
    width: 36px;
    height: 12px;
  }

  .demo-out {
    transform: none;
  }
}

@media (max-width: 640px) {
  .site-nav {
    gap: 16px;
    font-size: 14px;
  }

  .site-nav a:not(.nav-cta) {
    display: none;
  }

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

  .feature,
  .feature:nth-child(odd),
  .feature:nth-child(even) {
    padding: 22px 0;
    border-left: none;
  }

  .steps li {
    grid-template-columns: 40px 1fr;
    grid-template-areas:
      "num name"
      "num desc";
    row-gap: 4px;
  }

  .steps li::before {
    grid-area: num;
  }

  .step-name {
    grid-area: name;
  }

  .step-desc {
    grid-area: desc;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .noise,
  .noise::after,
  .demo-out,
  .js .noise,
  .js .noise::after,
  .js .demo-out {
    transition: none;
  }

  .js .demo-out,
  .js .strip-demo.is-stripped .demo-out {
    opacity: 1;
    transform: none;
  }
}
