/* A clay desk diorama opens the page and acts out a chat; the steps, a working copy of the app and the specs follow in one left-aligned column. */
:root {
  --room: #D4D4D0;
  --clay: #DFDFDB;
  --panel: #E9E9E6;
  --ink: #232322;
  --soft: #6B6B67;
  --line: rgba(35, 35, 34, .12);
  --run: #2E8A55;
  --wait: #B8740F;
  --wait-soft: rgba(184, 116, 15, .12);
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --room: #262625; --clay: #3A3A38; --panel: #2F2F2D; --ink: #EDEDE9; --soft: #A3A39E;
    --line: rgba(237, 237, 233, .1); --run: #6DBB8A; --wait: #E3A74F; --wait-soft: rgba(227, 167, 79, .12);
    color-scheme: dark;
  }
}

* { box-sizing: border-box }
html { overflow-x: clip }
body { margin: 0; background: var(--room); color: var(--ink); font: 400 17px/1.55 var(--body); -webkit-font-smoothing: antialiased }
a { color: inherit }
code { font: 400 .88em var(--mono) }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px }
.wrap { max-width: 1140px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)) }

/* nav */
nav { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-block: 20px }
.mark { font: 700 20px var(--display); display: flex; gap: 10px; align-items: center; text-decoration: none }
.mark img { width: 30px; height: 30px; border-radius: 9px }
nav ul { display: flex; align-items: center; gap: 24px; list-style: none; margin: 0; padding: 0; font-size: 15px }
nav ul a { text-decoration: none; color: var(--soft) }
nav ul a:hover { color: var(--ink) }
.key { font-weight: 600; text-decoration: none; color: var(--ink); background: var(--clay); padding: 10px 18px; border-radius: 14px; box-shadow: 0 3px 0 var(--line); display: inline-block }
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line) }
nav ul a.key { color: var(--ink) }

/* hero */
h1 { font: 700 clamp(38px, 6.2vw, 84px)/.98 var(--display); letter-spacing: -.035em; margin: 20px 0 0; text-wrap: balance; max-width: 13ch }
.stage { position: relative; height: clamp(340px, 52vw, 560px); margin-top: -40px }
.stage canvas { display: block; width: 100%; height: 100% }
.say { display: flex; flex-direction: column; gap: 10px; min-height: 130px; max-width: 560px; margin: -10px 0 0 auto }
.b { padding: 12px 16px; border-radius: 18px; max-width: 90%; font-size: 16px; animation: pop .35s ease-out }
.b.you { align-self: flex-end; background: var(--ink); color: var(--room); border-bottom-right-radius: 6px }
.b.me { align-self: flex-start; background: var(--clay); border-bottom-left-radius: 6px }
.b .st { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--wait); margin-right: 6px; vertical-align: 1px }
@keyframes pop { from { transform: translateY(6px) scale(.97); opacity: 0 } }

/* steps: a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 0; padding-block: 88px 40px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; counter-reset: s }
.steps li { counter-increment: s; background: var(--clay); border-radius: 22px; padding: 22px 20px 24px; box-shadow: 0 5px 0 var(--line) }
.steps li::before { content: counter(s); font: 700 15px var(--display); display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--ink); margin-bottom: 18px }
.steps h3 { font: 700 16px/1.2 var(--display); margin: 0 0 8px; letter-spacing: -.01em }
.steps p { margin: 0; font-size: 15px; color: var(--soft) }

h2 { font: 700 clamp(28px, 3.4vw, 40px)/1.05 var(--display); margin: 0; letter-spacing: -.03em; text-wrap: balance }

/* try it */
.try { padding-block: 72px 24px }
.try header { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px }
.try header p { margin: 0; color: var(--soft); max-width: 44ch }

.app { display: grid; grid-template-columns: 200px minmax(0, 1fr) minmax(0, 330px); height: 540px; background: var(--panel); border-radius: 22px; overflow: hidden; box-shadow: 0 6px 0 var(--line) }
.side { border-right: 1px solid var(--line); padding: 16px 10px; font-size: 14px; overflow: auto }
.side h4 { font-weight: 500; color: var(--soft); font-size: 12.5px; margin: 16px 8px 6px }
.side h4:first-child { margin-top: 0 }
.row { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px }
.row.on { background: var(--clay) }
.row .m { margin-left: auto; color: var(--soft); font-size: 12px }
.row.new { animation: arrive .6s ease-out }
@keyframes arrive { from { background: var(--wait-soft) } }
.d { width: 7px; height: 7px; border-radius: 50%; background: var(--soft); opacity: .6; flex: none }
.d.ok { background: var(--run); opacity: 1 }
.d.warn { background: var(--wait); opacity: 1 }

.chat { display: flex; flex-direction: column; min-width: 0 }
.log { flex: 1; overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 14px }
.msg { max-width: 62ch; font-size: 15px }
.msg.you { align-self: flex-end; background: var(--clay); padding: 8px 12px; border-radius: 12px }
.msg.work { font-size: 14px; color: var(--soft); display: flex; gap: 8px; align-items: baseline }
.msg.work b { color: var(--ink); font-weight: 600; white-space: nowrap }
.fold { font-size: 13px; color: var(--soft); border-left: 2px solid var(--line); padding-left: 10px }
.fold span { color: var(--ink) }
.app form { border-top: 1px solid var(--line); padding: 12px; display: flex; gap: 8px }
.app input { flex: 1; min-width: 0; font: inherit; font-size: 15px; background: var(--room); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px }
.app button, .chips button { font: 600 14px var(--body); border: 0; border-radius: 10px; padding: 0 14px; background: var(--ink); color: var(--room); cursor: pointer }
.app button:disabled { opacity: .5; cursor: default }
.app button.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line) }

.wk { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0 }
.wk header { padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; display: flex; gap: 8px; align-items: center; margin: 0 }
.wk header .m { margin-left: auto; color: var(--soft); font-size: 12px }
.term { flex: 1; overflow: auto; padding: 12px 16px; font: 400 12.5px/1.7 var(--mono); color: var(--soft) }
.term .c { color: var(--ink) }
.term .ok { color: var(--run) }
.card { margin: 12px; padding: 12px; border-radius: 12px; background: var(--wait-soft); font-size: 14px; display: grid; gap: 10px }
.card div { display: flex; gap: 8px }
.card button { padding: 7px 12px }

.chips { font-size: 14px; color: var(--soft); padding-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center }
.chips button { background: var(--clay); color: var(--ink); padding: 7px 12px; font-weight: 500; box-shadow: 0 2px 0 var(--line) }
.chips button:active { transform: translateY(1px); box-shadow: none }

/* specs */
.spec { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; padding-block: 88px 80px }
.spec dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 14px 28px }
.spec dt { font-weight: 600 }
.spec dd { margin: 0; color: var(--soft) }
.spec .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px }
.spec .install { margin: 24px 0 8px; color: var(--soft) }
.cmd { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 14px; max-width: 100% }
.cmd code { flex: 1; min-width: 0; overflow-wrap: anywhere }
.cmd button { font: 600 13px var(--body); color: var(--ink); background: var(--clay); border: 0; border-radius: 8px; padding: 6px 10px; cursor: pointer }
footer { padding-block: 24px 48px; font-size: 14px; color: var(--soft); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid var(--line) }

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); height: auto }
  .side { display: none }
  .log { height: 340px; flex: none }
  .wk { border-left: 0; border-top: 1px solid var(--line) }
  .term { height: 190px; flex: none }
}
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr } .spec { grid-template-columns: 1fr } }
@media (max-width: 600px) {
  nav ul li.opt { display: none }
  .steps { grid-template-columns: 1fr }
  .spec dl { grid-template-columns: 1fr; gap: 2px }
  .spec dd { margin-bottom: 12px }
  .stage { margin-top: 0 }
}
@media (prefers-reduced-motion: reduce) { .b, .row.new { animation: none } }
