/* The page is the icon: a Ghostty window on its charcoal tile, the active tab in coral. */
/* Ubuntu (Ubuntu Font Licence 1.0, fonts/LICENCE-ubuntu.txt), served from here. Until
   it loads, Arial stands in, sized to Ubuntu's metrics so nothing moves when it swaps. */
@font-face { font-family: "Ubuntu"; font-weight: 400; font-display: swap; src: url("fonts/ubuntu-400.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 500; font-display: swap; src: url("fonts/ubuntu-500.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-weight: 700; font-display: swap; src: url("fonts/ubuntu-700.woff2") format("woff2"); }
@font-face {
  font-family: "Ubuntu Fallback";
  font-weight: 400 500;
  src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Helvetica");
  size-adjust: 100.54%; ascent-override: 92.7%; descent-override: 18.8%; line-gap-override: 2.79%;
}
@font-face {
  font-family: "Ubuntu Fallback";
  font-weight: 600 700;
  src: local("Arial Bold"), local("Arial-BoldMT"), local("Liberation Sans Bold"), local("Helvetica Bold");
  size-adjust: 98.72%; ascent-override: 94.41%; descent-override: 19.15%; line-gap-override: 2.84%;
}

:root {
  --tile-top: #272a33;
  --tile-bottom: #17171b;
  --pane: #141417;
  --raised: #1c1d22;
  --frame: #a2a5b0;
  --coral: #db7859;
  --chalk: #ececef;
  --dim: #a9abb5;
  --asks: #ff8c00;
  --done: #4eba65;
  --works: #ff6b80;

  --sans: "Ubuntu", "Ubuntu Fallback", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;

  --stroke: 3px;
  --gap: clamp(1.25rem, 4vw, 3.5rem);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100vh;
  padding: clamp(0.75rem, 3vw, 3rem);
  background: linear-gradient(var(--tile-top), var(--tile-bottom)) fixed;
  color: var(--chalk);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--chalk); text-decoration-color: var(--coral); text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
a:hover { color: var(--coral); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; border-radius: 4px; }

code, pre { font-family: var(--mono); font-size: 0.9em; }
p code, dd code, li code { color: var(--chalk); background: var(--raised); padding: 0.1em 0.35em; border-radius: 5px; white-space: nowrap; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--coral); color: var(--pane); padding: 0.5rem 1rem; border-radius: 8px; }

/* The window */
.window {
  max-width: 1120px;
  margin: 0 auto;
  background: var(--pane);
  border: var(--stroke) solid var(--frame);
  border-radius: 28px;
  overflow: clip;
}

.tabbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem clamp(0.9rem, 2.5vw, 1.6rem);
  background: var(--pane);
  border-bottom: var(--stroke) solid var(--frame);
}
.tabbar nav { flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tabbar ul { display: flex; gap: 0.6rem; margin: 0; padding: 2px; list-style: none; }
.tabbar nav a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  padding: 0.35rem 1rem;
  border: var(--stroke) solid var(--frame);
  border-radius: 10px;
  color: var(--chalk);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
}
.tabbar nav a:hover { border-color: var(--coral); color: var(--chalk); }
.tabbar nav a[aria-current="true"] { background: var(--coral); border-color: var(--coral); color: var(--pane); }
.tabbar nav img { border-radius: 4px; }
.repo { flex: none; display: flex; align-items: center; gap: 0.45rem; font-size: 0.92rem; font-weight: 500; text-decoration: none; }
.repo svg { flex: none; }

main { padding: 0 var(--gap); }
section { padding: clamp(3rem, 7vw, 5rem) 0; }
section + section { border-top: 1px solid #2a2b31; }

h1, h2, h3 { margin: 0; line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); margin-bottom: 1.1rem; }
h3 { font-size: 1.1rem; letter-spacing: 0; margin-bottom: 0.8rem; }
p { margin: 0 0 1rem; max-width: 62ch; }
strong { font-weight: 600; }

/* Hero */
.hero { padding-top: clamp(2.5rem, 7vw, 5rem); }
.hero .demo, .hero .band-demo { max-width: 52rem; }
.prompt { width: 3.4rem; height: auto; margin-bottom: 1.4rem; fill: none; stroke: var(--chalk); stroke-width: 4; }
h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); max-width: 16ch; }
h1 a { text-decoration-thickness: 0.06em; text-underline-offset: 0.12em; }
h1 a:hover { color: var(--chalk); text-decoration-color: var(--chalk); }
.cursor {
  display: inline-block;
  width: 0.5em;
  height: 0.82em;
  margin-left: 0.12em;
  vertical-align: -0.04em;
  background: var(--coral);
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

.lede { margin-top: 1.6rem; font-size: clamp(1.1rem, 1.8vw, 1.3rem); color: var(--dim); max-width: 58ch; }

.get { margin: 2.2rem 0 3rem; max-width: 34rem; }
.get .where { margin: 0.7rem 0 0; color: var(--dim); font-size: 0.95rem; }

.demo { margin: 0; }
.demo video {
  display: block;
  width: 100%;
  height: auto;
  border: var(--stroke) solid var(--frame);
  border-radius: 16px;
  background: var(--tile-bottom);
}
.demo figcaption { margin-top: 0.8rem; color: var(--dim); font-size: 0.95rem; }

/* The band, played in a small Claude Code session */
.band-demo { margin: 0; position: relative; }
.mini {
  border: var(--stroke) solid var(--frame);
  border-radius: 16px;
  background: var(--raised);
  overflow: hidden;
  font-family: var(--mono);
  font-size: clamp(0.72rem, 1.45vw, 0.95rem);
  line-height: 1.55;
}
.mini-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.4rem; padding: 0.55rem; border-bottom: 1px solid #34353d; font-family: var(--sans); font-size: 0.9em; }
.mini-tabs span { padding: 0.25rem 0.6rem; border-radius: 8px; text-align: center; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background 0.25s, color 0.25s; }
.mini-tabs span.on { background: #2e3038; color: var(--chalk); }
.mini-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(8.5em, auto) auto auto; padding: 1rem 1.2rem 0.9rem; }
.mini-talk p { margin: 0 0 0.35rem; max-width: none; }
.mini-talk .you::before { content: "❯ "; color: var(--dim); }
.mini-talk .q { color: var(--asks); }
.mini-talk ol { margin: 0.2rem 0 0; padding: 0; list-style: none; color: var(--dim); }
.mini-talk li.on { color: var(--chalk); }
.mini-talk li.on::before { content: "❯ "; color: var(--coral); }
.mini-talk li:not(.on)::before { content: "  "; white-space: pre; }
.mini-talk .busy { color: var(--works); }
.mini-talk .ok { color: var(--done); }
.mini-prompt { display: flex; align-items: center; border-top: 1px solid #3a3b44; border-bottom: 1px solid #3a3b44; padding: 0.35rem 0; margin-top: 0.4rem; }
.mini-prompt .caret { color: var(--dim); margin-right: 0.5em; }
.mini-prompt .cursor { width: 0.55em; height: 1.05em; vertical-align: -0.2em; background: var(--chalk); margin: 0; }
.mini-foot { padding-top: 0.3rem; text-align: right; }
.mini-foot .row { margin: 0; max-width: none; white-space: pre; color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.mini-foot b { color: var(--chalk); font-weight: 600; }
.pressed { margin-left: auto; display: flex; gap: 0.3rem; opacity: 0; transform: translateY(-0.3rem); transition: opacity 0.2s, transform 0.2s; }
.pressed.on { opacity: 1; transform: none; }
.band-demo figcaption { margin-top: 0.8rem; color: var(--dim); font-size: 0.95rem; }

.asks, .ask-color { color: var(--asks); }
.done-color { color: var(--done); }
.works, .work-color { color: var(--works); }
.coral { color: var(--coral); }
/* The band's dots: a disc for the session shown, a ring for the others, dotted once done. */
.dot { display: inline-block; width: 0.72em; height: 0.72em; margin-left: 0.2em; border: 0.15em solid currentColor; border-radius: 50%; vertical-align: -0.06em; }
.dot.own { background: currentColor; width: 0.66em; height: 0.66em; }
.dot.dotted { border-style: dotted; }
.dim { color: var(--dim); }

kbd {
  display: inline-block;
  min-width: 1.7em;
  padding: 0.05em 0.45em;
  border: 1px solid #4a4c56;
  border-bottom-width: 3px;
  border-radius: 6px;
  background: var(--pane);
  color: var(--chalk);
  font: 500 0.85em var(--sans);
  text-align: center;
}
.pressed kbd { font-size: 0.95em; border-color: var(--coral); }

.keys-title { color: var(--dim); }
.keys { margin: 0; display: grid; gap: 0.9rem; }
.keys div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1rem; align-items: baseline; }
.keys dt { white-space: nowrap; }
.keys dd { margin: 0; font-family: var(--sans); }
.countdown { white-space: pre-wrap; }
.countdown .tag { color: var(--coral); }

.with-demo .demo, .with-demo .band-demo { grid-column: 1 / -1; max-width: 52rem; }

/* Terminal blocks: what you type and what you see */
.term {
  position: relative;
  background: var(--raised);
  border: 1px solid #34353d;
  border-radius: 14px;
  padding: 1.1rem 1.3rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.55;
}
.term pre { margin: 0; overflow-x: auto; font-size: inherit; }
.term code { font-size: inherit; background: none; padding: 0; }
.term .c { color: #8c8e98; }
.term p { margin: 0 0 0.9rem; }
.term p:last-child { margin-bottom: 0; }
.term .ask::before { content: "> "; color: var(--coral); }
.term .said { color: var(--dim); padding-left: 1.1rem; border-left: 2px solid #3a3b44; }

.copyable { padding-right: 5.5rem; }
.copy {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.75rem;
  border: 2px solid var(--frame);
  border-radius: 8px;
  background: none;
  color: var(--chalk);
  font: 500 0.85rem var(--sans);
  cursor: pointer;
}
.copy:hover { border-color: var(--coral); }
.copy[data-done] { background: var(--coral); border-color: var(--coral); color: var(--pane); }

.dialog { margin-bottom: 0.9rem; padding-left: 1.1rem; border-left: 2px solid var(--coral); }
.dialog:last-child { margin-bottom: 0; }
.dialog .q { margin-bottom: 0.5rem; }
.dialog .q code { background: none; padding: 0; color: var(--coral); }
.dialog ol { margin: 0; padding: 0; list-style: none; counter-reset: option; color: var(--dim); }
.dialog li { counter-increment: option; }
.dialog li::before { content: "  " counter(option) ". "; white-space: pre; }
.dialog li.on { color: var(--chalk); }
.dialog li.on::before { content: "❯ " counter(option) ". "; color: var(--coral); }

/* Features: text, and beside it what it looks like */
.feature { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--gap); align-items: center; }
.feature .text > :last-child { margin-bottom: 0; }
.mark { width: 3rem; height: 3rem; margin-bottom: 1rem; fill: none; stroke: var(--coral); stroke-width: 9; }
.mark .head { fill: var(--coral); stroke: none; }

/* Install */
.steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); margin-bottom: 2.5rem; }
.steps .term { margin-bottom: 1rem; }
.steps p { color: var(--dim); }
.needs { display: grid; gap: 1rem; margin: 0 0 2.5rem; }
.needs div { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; }
.needs dt { font-weight: 600; }
.needs dd { margin: 0; color: var(--dim); max-width: 62ch; }
.private { color: var(--dim); }

footer { padding: 2rem var(--gap) 2.5rem; border-top: var(--stroke) solid var(--frame); color: var(--dim); font-size: 0.95rem; }
footer ul { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; margin: 0 0 1rem; padding: 0; list-style: none; }
footer p { margin: 0; }

@media (max-width: 820px) {
  .feature, .steps { grid-template-columns: minmax(0, 1fr); }
  .needs div { grid-template-columns: minmax(0, 1fr); gap: 0.2rem; }
  .window { border-radius: 20px; }
  .repo { display: none; }
  .term { padding: 1rem; }
  .term pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  .copyable { padding-top: 3rem; padding-right: 1rem; }
  .keys div { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .mini-tabs { gap: 0.2rem; padding: 0.4rem; }
  .mini-body { padding: 0.8rem; }
  .mini-foot .row { white-space: pre-wrap; }
}
