@font-face {
  font-family: "Big Shoulders";
  src: url("/assets/fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --lichen: #d9e3dc;
  --lichen-deep: #c8d6cd;
  --ink: #0d2b27;
  --ink-soft: #3a5650;
  --pane: #0c1212;
  --pane-fg: #cfd8d4;
  --line: #2a4640;
  --frame: #a81c26;
  --prompt-red: #ff5555;
  --prompt-green: #4ce675;
  --prompt-blue: #5aa2ff;
  --rule: 2px solid var(--line);
  --gutter: clamp(16px, 4vw, 48px);
  --display: "Big Shoulders", "Arial Narrow", Impact, sans-serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--lichen);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 0.18em; }
a:hover { color: var(--frame); }
:focus-visible { outline: 2px solid var(--frame); outline-offset: 2px; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

kbd, code {
  font-family: var(--mono);
  font-size: 0.86em;
}
kbd {
  display: inline-block;
  padding: 0.05em 0.4em;
  border: 1px solid var(--line);
  background: var(--lichen-deep);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: -999px;
  background: var(--ink);
  color: var(--lichen);
  padding: 8px 12px;
}
.skip:focus { left: 8px; top: 8px; z-index: 10; }

/* Header: the wordmark is split by the same line that splits panes. */
.bar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border-bottom: var(--rule);
}
.mark {
  display: flex;
  align-items: stretch;
  font: 800 1.6rem/1 var(--display);
  letter-spacing: 0.01em;
  text-decoration: none;
}
.mark span { padding: 14px 10px 12px; }
.mark span:first-child { padding-left: var(--gutter); }
.mark span + span { border-left: var(--rule); }
.bar nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  padding-right: var(--gutter);
  font-size: 0.95rem;
}

/* Hero: text pane beside a working pane. */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  border-bottom: var(--rule);
}
.hero-copy {
  padding: clamp(32px, 6vw, 80px) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
h1 {
  margin: 0 0 24px;
  font: 800 clamp(3.4rem, 8.2vw, 7.6rem)/0.9 var(--display);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.lede { max-width: 34em; font-size: 1.15rem; }
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin-top: 24px;
}
.button {
  display: inline-block;
  padding: 12px 20px;
  background: var(--frame);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.button:hover { background: var(--ink); color: #fff; }
.note { font-size: 0.92rem; color: var(--ink-soft); }

/* Playground */
.play {
  display: flex;
  flex-direction: column;
  min-height: clamp(380px, 46vw, 620px);
  background: var(--pane);
  color: var(--pane-fg);
  border-left: var(--rule);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
}
.play-stage {
  position: relative;
  flex: 1;
  min-height: 300px;
  outline-offset: -3px;
}
.play-stage:focus-visible { outline-color: var(--prompt-green); }
.split { position: absolute; inset: 0; display: flex; }
.split.row { flex-direction: row; }
.split.column { flex-direction: column; }
.split > * { position: relative; flex: 1 1 0; min-width: 0; min-height: 0; }
.split.row > * + * { border-left: 2px solid var(--line); }
.split.column > * + * { border-top: 2px solid var(--line); }
.leaf { position: absolute; inset: 0; padding: 8px 10px; overflow: hidden; }
.leaf.focused { background: rgba(76, 230, 117, 0.05); }
.leaf .frame { color: var(--prompt-red); white-space: nowrap; }
.leaf .dir { color: var(--prompt-blue); }
.leaf .dollar { color: var(--prompt-green); }
.leaf .cursor {
  display: inline-block;
  width: 0.6em;
  height: 1.1em;
  vertical-align: text-bottom;
  border: 1px solid var(--prompt-green);
}
.leaf.focused .cursor { background: var(--prompt-green); }
.play-keys {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border-top: 2px solid var(--line);
}
.play-keys button {
  min-height: 36px;
  padding: 4px 10px;
  background: transparent;
  color: var(--pane-fg);
  border: 1px solid var(--line);
  font: inherit;
  cursor: pointer;
}
.play-keys button:hover,
.play-keys button[aria-pressed="true"] { border-color: var(--prompt-green); color: var(--prompt-green); }
.play-keys button:focus-visible { outline-color: var(--prompt-green); }
.play-status { flex-basis: 100%; min-height: 1.5em; padding: 0 2px; color: #8fa49c; }

/* Full-width capture */
.shot-wide { background: var(--pane); border-bottom: var(--rule); }
.shot-wide img { width: 100%; }

/* Feature rows: each one is a split at its own ratio. */
.feature {
  display: grid;
  border-bottom: var(--rule);
}
.feature.r-5-7 { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.feature.r-7-5 { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.feature.r-4-8 { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.feature-copy { padding: clamp(28px, 4vw, 56px) var(--gutter); align-self: center; }
.feature figure {
  margin: 0;
  background: var(--pane);
  display: flex;
  align-items: center;
}
.feature figure img { width: 100%; }
.feature > * + * { border-left: var(--rule); }
h2 {
  margin: 0 0 14px;
  font: 800 clamp(2.2rem, 4.2vw, 3.6rem)/0.98 var(--display);
}
h3 { margin: 1.8em 0 0.4em; font-size: 1.15rem; line-height: 1.3; }

/* Keys */
.keys { padding: clamp(32px, 5vw, 64px) var(--gutter); border-bottom: var(--rule); }
.keys > p { max-width: 42em; }
.keys-list {
  columns: 2 22rem;
  column-gap: 48px;
  margin: 28px 0 0;
}
.keys-list div {
  break-inside: avoid;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px solid var(--lichen-deep);
}
.keys-list dt { margin: 0; }
.keys-list dd { margin: 0; flex: none; }

/* Download */
.get { padding: clamp(32px, 5vw, 64px) var(--gutter); }
.get-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 48px;
  margin-top: 24px;
}
.hash { display: block; margin-top: 6px; font-size: 0.72rem; line-height: 1.5; word-break: break-all; color: var(--ink-soft); }
.get ul { margin: 0; padding-left: 1.1em; }
.get li { margin-bottom: 0.5em; }

/* Legal pages */
.doc { max-width: 44rem; padding: clamp(32px, 6vw, 72px) var(--gutter); }
.doc h1 { font-size: clamp(3rem, 7vw, 5rem); margin-bottom: 8px; }
.doc h2 { margin-top: 1.4em; font-size: clamp(1.7rem, 3vw, 2.2rem); }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.5em; }

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 18px var(--gutter);
  border-top: var(--rule);
  font-size: 0.92rem;
}
.foot nav { display: flex; gap: 20px; }

@media (max-width: 860px) {
  .hero, .feature.r-5-7, .feature.r-7-5, .feature.r-4-8, .get-grid { grid-template-columns: minmax(0, 1fr); }
  .play, .feature > * + * { border-left: 0; }
  .play, .feature > * + * { border-top: var(--rule); }
  .feature figure { order: 2; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
