:root {
  --paper: #f4efe4;
  --paper-soft: rgba(27, 24, 21, 0.035);
  --paper-sunk: rgba(27, 24, 21, 0.055);
  --ink: #1b1815;
  --ink-2: rgba(27, 24, 21, 0.7);
  --muted: rgba(27, 24, 21, 0.55);
  --hairline: rgba(27, 24, 21, 0.12);
  --hairline-strong: rgba(27, 24, 21, 0.22);
  --accent: #d8663e;
  --accent-hover: #c45a34;

  --page-pad-x: clamp(20px, 5vw, 80px);
  --max-reading: 58ch;

  --mono: ui-monospace, "SF Mono", "Menlo", "Consolas", "DejaVu Sans Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
  padding-right: 40px; /* reserve space for the fixed strip so content doesn't
                          sit beneath it */
}

a { color: inherit; }

em {
  font-style: italic;
  color: var(--ink);
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--paper-sunk);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* ── TOPBAR ───────────────────────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px var(--page-pad-x) 0;
  font-size: 13px;
}

.brand {
  text-decoration: none;
  font-weight: 500;
  letter-spacing: -0.015em;
  font-size: 15px;
  color: var(--ink);
}

.ver {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  border: 1px solid var(--hairline);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--paper-soft);
}

.topnav {
  margin-left: auto;
  display: flex;
  gap: 22px;
  font-size: 13px;
  letter-spacing: 0.02em;
}
.topnav a {
  text-decoration: none;
  color: var(--muted);
  transition: color 160ms ease;
}
.topnav a:hover { color: var(--ink); }

/* ── HERO ─────────────────────────────────────────────────────────────── */

.hero {
  padding: clamp(56px, 12vh, 140px) var(--page-pad-x) clamp(90px, 18vh, 200px);
  max-width: 1200px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 0 32px 0;
}

h1 {
  font-size: clamp(44px, 8.5vw, 104px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 0.98;
  margin: 0 0 44px 0;
  max-width: 14ch;
}

.hero-b {
  color: var(--ink);
  display: inline-block;
  position: relative;
}

.lede {
  font-size: clamp(17px, 1.6vw, 22px);
  line-height: 1.45;
  max-width: var(--max-reading);
  margin: 0 0 44px 0;
  color: var(--ink-2);
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 24px;
}

.cta {
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.cta.primary {
  background: var(--ink);
  color: var(--paper);
}
.cta.primary::after {
  content: "↓";
  display: inline-block;
  transition: transform 200ms ease-out;
  font-size: 0.9em;
}
.cta.primary:hover {
  background: var(--accent);
}
.cta.primary:hover::after {
  transform: translateY(3px);
}
.cta.ghost {
  color: var(--ink);
  border-color: var(--hairline);
}
.cta.ghost:hover {
  border-color: var(--ink);
  background: var(--paper-soft);
}

.sub {
  font-size: 13.5px;
  color: var(--muted);
  max-width: 52ch;
  margin: 0;
  letter-spacing: 0.005em;
}

/* ── SECTIONS ─────────────────────────────────────────────────────────── */

.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: lowercase;
  color: var(--muted);
  margin: 0 0 18px 0;
}

.section-title {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 56px 0;
  max-width: 22ch;
}

.idea, .how, .arch, .why, .download {
  padding: clamp(80px, 14vh, 140px) var(--page-pad-x);
  max-width: 1200px;
}

.how, .idea, .arch, .why, .download {
  border-top: 1px solid var(--hairline);
}

/* ── ASCII BLOCK ──────────────────────────────────────────────────────── */

.ascii {
  font-family: var(--mono);
  font-size: clamp(10px, 1.05vw, 13px);
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper-sunk);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  padding: 24px 22px;
  margin: 0 0 40px 0;
  overflow-x: auto;
  max-width: 860px;
  white-space: pre;
  letter-spacing: 0;
  tab-size: 2;
}

/* ── STEPS ────────────────────────────────────────────────────────────── */

.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 5vw, 72px);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-n {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0;
  line-height: 1.2;
}

.step p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 42ch;
}

/* ── BODY COPY ────────────────────────────────────────────────────────── */

.body-wide {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 0 0 24px 0;
}

.why {
  max-width: 900px;
}

.axioms {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px 56px;
  max-width: 900px;
}

.axioms li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 0;
}

.ax-x {
  font-family: var(--mono);
  font-size: 18px;
  line-height: 1;
  color: var(--accent);
  margin-top: 4px;
  flex-shrink: 0;
}

.ax-body {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.ax-body strong {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* ── DOWNLOAD GRID ────────────────────────────────────────────────────── */

.dl-note {
  margin-bottom: 40px;
  max-width: 60ch;
}
.dl-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--hairline-strong);
}
.dl-note a:hover {
  text-decoration-color: var(--accent);
}

.dl-grid {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.dl-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  transition: border-color 180ms ease, transform 220ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 220ms ease;
}
.dl-card:hover {
  border-color: var(--hairline-strong);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(27, 24, 21, 0.05);
}

.dl-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.dl-os {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.dl-arch {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--muted);
}

.dl-file {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-2);
  margin: 0;
  padding: 8px 10px;
  background: var(--paper-sunk);
  border-radius: 6px;
  word-break: break-all;
  line-height: 1.4;
}

.dl-btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-align: center;
  transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
  background: var(--ink);
  color: var(--paper);
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.dl-btn:hover {
  background: var(--accent);
}
.dl-btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--hairline-strong);
}
.dl-btn.ghost:hover {
  background: var(--paper-soft);
  border-color: var(--ink);
}

.dl-hint {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  margin: 6px 0 0 0;
  letter-spacing: 0.01em;
  line-height: 1.45;
}

.dl-source {
  background: transparent;
  border-style: dashed;
}

.dl-footer {
  margin: 12px 0 0;
  font-size: 13px;
}
.dl-all {
  text-decoration: none;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}
.dl-all:hover {
  color: var(--ink);
  border-color: var(--ink);
}

/* Highlight the card that matches the visitor's detected platform. */
.dl-card.detected {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(216, 102, 62, 0.04), transparent 70%);
}
.dl-card.detected .dl-os::after {
  content: "your platform";
  margin-left: 10px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--accent);
  border: 1px solid rgba(216, 102, 62, 0.4);
  padding: 2px 7px;
  border-radius: 999px;
  vertical-align: 2px;
}

/* ── LINKS ROW ───────────────────────────────────────────────────────── */

.links-row {
  padding: 40px var(--page-pad-x);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  border-top: 1px solid var(--hairline);
}
.links-row a {
  text-decoration: none;
  color: var(--muted);
  transition: color 160ms ease;
}
.links-row a:hover { color: var(--ink); }
.sep { color: var(--hairline); }

/* ── GROUND / WORDMARK ───────────────────────────────────────────────── */

.ground {
  padding: 0 0 min(3vh, 28px);
  overflow: hidden;
}

.wordmark {
  font-size: clamp(120px, 26vw, 340px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
  margin: 0;
  padding: 0 var(--page-pad-x);
  color: var(--ink);
  white-space: nowrap;
  text-align: left;
}

.i-letter {
  position: relative;
  display: inline-block;
}
.i-letter .tittle {
  position: absolute;
  top: 0.18em;
  left: 50%;
  transform: translateX(-50%);
  width: 0.12em;
  height: 0.12em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.005em var(--paper);
}

.brand .i-letter .tittle {
  width: 0.16em;
  height: 0.16em;
  top: 0.22em;
}

/* ── LIVE PANE DEMO (fixed, right edge) ──────────────────────────────── */

.demo-strip {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 12px;
  z-index: 50;
  pointer-events: auto;
  transition: width 260ms cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-hit {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(27, 24, 21, 0.12), rgba(27, 24, 21, 0));
  transition: background 220ms ease;
  cursor: pointer;
}
.demo-strip:hover .demo-hit,
.demo-strip.open .demo-hit {
  background: linear-gradient(to left, rgba(27, 24, 21, 0.25), rgba(27, 24, 21, 0));
}

.demo-dot {
  position: absolute;
  top: 50%;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateY(-50%);
  opacity: 0;
  transition: opacity 220ms ease;
  box-shadow: 0 0 8px rgba(216, 102, 62, 0.6);
  pointer-events: none;
}
.demo-strip.has-due .demo-dot { opacity: 1; }

.demo-pane {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(100%, -50%);
  width: 320px;
  padding: 18px 16px 14px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-right: none;
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
  box-shadow: -24px 0 60px rgba(27, 24, 21, 0.08);
  transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.demo-strip.open .demo-pane,
.demo-strip:hover .demo-pane {
  transform: translate(0, -50%);
}

.demo-pane header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--hairline);
}
.demo-title { font-weight: 500; letter-spacing: -0.01em; }
.demo-title-muted { color: var(--muted); font-weight: 400; }
.demo-count { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 10.5px; }

#demo-tasks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.demo-task {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 2px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 140ms ease;
}
.demo-task:hover { background: var(--paper-soft); }

.demo-check {
  width: 14px;
  height: 14px;
  min-width: 14px;
  margin-top: 2px;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  display: grid;
  place-items: center;
  transition: all 180ms ease;
}
.demo-task:hover .demo-check { border-color: var(--ink); }
.demo-task.done .demo-check {
  background: var(--muted);
  border-color: var(--muted);
}
.demo-task.done .demo-check::after {
  content: "✓";
  font-size: 10px;
  color: var(--paper);
  font-weight: 700;
}

.demo-text {
  flex: 1;
  line-height: 1.4;
  font-size: 13.5px;
}
.demo-task.done .demo-text {
  color: var(--muted);
  text-decoration: line-through;
}

.demo-pane footer {
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
}
.demo-hint {
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* ── RESPONSIVE ──────────────────────────────────────────────────────── */

@media (max-width: 820px) {
  .topnav { gap: 14px; font-size: 12.5px; }
  .topnav a:nth-child(3) { display: none; } /* hide "architecture" label on narrow screens */
}

@media (max-width: 720px) {
  body { padding-right: 0; }
  .demo-strip { display: none; }
  .links-row { justify-content: center; text-align: center; }
  .topbar { flex-wrap: wrap; }
  .topnav { width: 100%; margin-left: 0; margin-top: 10px; }
  .ascii { font-size: 10px; padding: 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
