/* Kanso's site. The palette is Kanso's own theme (kanso/themes/kanso.json);
   ochre, rose and green always mean agent state, as in the app. Radii follow
   the app: 6 for controls, 10 for windows. */

:root {
  --canvas: #161615;
  --surface: #1b1b19;
  --raised: #232321;
  --line: #2e2e2b;
  --line-strong: #3b3a36;
  --text: #ece8de;
  --body: #c9c5bb;
  --muted: #949086;
  --accent: #da627d;
  --accent-ink: #161615;
  --working: #c4b07e;
  --blocked: #c99189;
  --done: #98ad8f;
  --sans: "Geist", ui-sans-serif, -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wide: 1180px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---- nav ---- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(22, 22, 21, .72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: var(--wide); margin: 0 auto; padding: 0 24px;
  height: 60px; display: flex; align-items: center; gap: 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -.01em;
}
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px;
  padding: 6px 12px; border-radius: 6px;
}
.nav-links a:hover { color: var(--text); background: var(--raised); }

.count {
  margin-left: 10px; padding-left: 10px; border-left: 1px solid currentColor;
  font-variant-numeric: tabular-nums; opacity: .8;
}
.star-small {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px;
  color: var(--text); text-decoration: none; font-size: 14px; font-weight: 500;
}
.star-small svg { width: 16px; height: 16px; fill: currentColor; }
.star-small:hover { background: var(--raised); }

/* ---- hero ---- */
.hero {
  position: relative; text-align: center;
  padding: 88px 24px 0; overflow: hidden;
}
/* The light behind the headline: Kanso's coral and the "working" ochre. */
.hero::before {
  content: ""; position: absolute; left: 50%; top: -220px; z-index: -1;
  width: 1100px; height: 760px; transform: translateX(-50%);
  background:
    radial-gradient(closest-side at 38% 55%, rgba(218, 98, 125, .20), transparent 72%),
    radial-gradient(closest-side at 64% 46%, rgba(196, 176, 126, .14), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px; border: 1px solid var(--line-strong); border-radius: 999px;
  color: var(--muted); text-decoration: none; font-size: 14px;
  background: rgba(27, 27, 25, .7);
}
.pill:hover { color: var(--text); border-color: var(--muted); }
.pill-tag {
  padding: 2px 10px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 13px;
}
h1 {
  margin: 30px auto 0; max-width: 14ch;
  color: var(--text);
  font-size: clamp(46px, 8.2vw, 96px); line-height: .98; font-weight: 700; letter-spacing: -.045em;
}
.lede {
  max-width: 600px; margin: 26px auto 0;
  color: var(--body); font-size: clamp(17px, 1.6vw, 19px); line-height: 1.55;
}
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.button {
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 20px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500;
  transition: background .15s, border-color .15s;
}
.button svg { width: 16px; height: 16px; fill: var(--working); }
.button:hover { background: var(--raised); border-color: var(--muted); }
.button-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600;
  box-shadow: 0 8px 30px -10px rgba(218, 98, 125, .55);
}
.button-primary:hover { background: #b3bfaa; border-color: #b3bfaa; }
.button-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.button-ghost:hover { background: transparent; border-color: transparent; color: var(--text); }
.fine { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.fine a { text-underline-offset: 3px; }

/* A window: the app's frame around a real screenshot. */
.window {
  margin: 0; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 30px 80px -30px rgba(0, 0, 0, .8);
}
.window-hero {
  max-width: var(--wide); margin: 64px auto 0;
  box-shadow:
    0 0 0 1px rgba(218, 98, 125, .08),
    0 40px 120px -40px rgba(218, 98, 125, .35),
    0 30px 80px -30px rgba(0, 0, 0, .9);
  animation: rise .9s cubic-bezier(.2, .7, .2, 1) .15s both;
}
@keyframes rise { from { opacity: 0; transform: translateY(28px) scale(.985); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .window-hero { animation: none; } }

/* ---- works with ---- */
.works { max-width: var(--wide); margin: 0 auto; padding: 72px 24px 0; text-align: center; }
.works p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.chips li {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--body); font-size: 14px;
}

/* ---- sections ---- */
.block { max-width: var(--wide); margin: 0 auto; padding: 128px 24px 0; }
.block > h2, .spot-text h2 {
  margin: 0; text-align: center; color: var(--text);
  font-size: clamp(32px, 4.4vw, 52px); line-height: 1.05; font-weight: 700; letter-spacing: -.035em;
}
.block > .sub {
  max-width: 620px; margin: 18px auto 0; text-align: center;
  color: var(--muted); font-size: 18px; line-height: 1.55;
}
h3 { margin: 0; color: var(--text); font-size: 19px; font-weight: 600; letter-spacing: -.015em; }

/* Install: a real sequence, so numbered. */
.steps { list-style: none; margin: 56px 0 0; padding: 0; display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 16px; }
.steps li {
  padding: 26px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
  display: flex; flex-direction: column; gap: 10px;
}
.steps p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.step-n {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 600; margin-bottom: 6px;
}

.code {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  padding: 6px 6px 6px 14px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--canvas); min-width: 0;
}
.code code {
  flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap;
  font: 500 14px/1.4 var(--mono); color: var(--text);
  scrollbar-width: none;
}
.code code::-webkit-scrollbar { display: none; }
.code button {
  flex: none; height: 32px; padding: 0 12px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--raised); color: var(--text);
  font: 500 13px var(--sans);
}
.code button:hover { border-color: var(--muted); }
.code button.is-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.code-center { max-width: 560px; margin: 28px auto 0; }

/* Features: the strip wide, then the panels as they look in the app. */
.grid { margin-top: 56px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tile { display: flex; flex-direction: column; gap: 10px; }
.tile .window { margin-bottom: 10px; }
.tile p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.tile-wide {
  grid-column: 1 / -1;
  display: grid; grid-template-columns: 1fr 2.2fr; gap: 40px; align-items: center;
  padding: 36px; border: 1px solid var(--line); border-radius: 14px;
  background: linear-gradient(180deg, var(--surface), var(--canvas));
}
.tile-wide .window { margin: 0; }
.tile-wide h3 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.03em; }
.tile-wide p { font-size: 17px; margin-top: 12px; }
.window-panel img { width: 100%; aspect-ratio: 760 / 900; object-fit: cover; object-position: top; }

/* Weeks without a restart. */
.facts { list-style: none; margin: 52px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.facts li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.facts strong { display: block; color: var(--text); font-size: 17px; font-weight: 600; margin-bottom: 4px; }
/* The app's state rings: green done, ochre working, rose needs you. */
.ring { width: 18px; height: 18px; margin-top: 4px; border-radius: 50%; border: 2.5px solid; border-right-color: transparent; transform: rotate(-35deg); }
.ring-done { color: var(--done); }
.ring-working { color: var(--working); }
.ring-blocked { color: var(--blocked); }
.window-wide { margin-top: 48px; }

/* Share cards. */
.cards { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
/* Two pictures side by side, their words under them. */
.duo { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.duo .window { margin: 0; }
.duo-text { margin-top: 24px; }
.duo-text h3 { margin: 0 0 8px; }
.duo-text p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.55; }
.cards img { border-radius: 12px; border: 1px solid var(--line-strong); }

/* Last call. */
.final { text-align: center; padding-bottom: 40px; }
.final-mark { margin: 0 auto 26px; }
.final .actions { margin-top: 20px; }

.foot { margin-top: 120px; border-top: 1px solid var(--line); }
.foot-in {
  max-width: var(--wide); margin: 0 auto; padding: 28px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.brand-small { font-size: 15px; gap: 8px; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.foot nav a:hover { color: var(--text); }

/* ---- narrow ---- */
@media (max-width: 960px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
  .steps { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .star-small { margin-left: auto; }
  .hero { padding-top: 56px; }
  .hero::before { width: 640px; top: -200px; }
  .window-hero { margin-top: 44px; border-radius: 10px; }
  .block { padding-top: 96px; }
  .grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .duo { grid-template-columns: 1fr; }
  .button { height: 44px; }
}

/* Grid and flex children may shrink below their content (the install line scrolls inside its box). */
.steps li, .tile, .tile-text, .grid > *, .cards > *, .duo > *, .facts li > div { min-width: 0; }
body { overflow-x: clip; }

/* Phones: the headline scales inside the padding, the pill wraps, the install line wraps instead of hiding its end. */
@media (max-width: 640px) {
  h1 { font-size: clamp(34px, 11.4vw, 46px); max-width: none; }
  .pill { flex-wrap: wrap; justify-content: center; max-width: 100%; padding: 6px 12px; font-size: 13px; line-height: 1.4; border-radius: 14px; }
  .code code { white-space: normal; overflow-wrap: anywhere; }
}
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.window-panel a { display: block; cursor: zoom-in; }

/* ---- pages: changelog, credits, privacy, terms, use ---- */
.doc { max-width: 760px; margin: 0 auto; padding: 96px 24px 0; }
.doc h1 { margin: 0; color: var(--text); font-size: clamp(36px, 5vw, 52px); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
.doc .lede { margin: 18px 0 0; color: var(--body); font-size: 19px; line-height: 1.55; }
.doc .meta { margin: 10px 0 0; color: var(--muted); font-size: 14px; }
.doc h2 { margin: 56px 0 12px; color: var(--text); font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.doc h3 { margin: 28px 0 8px; font-size: 15px; color: var(--accent); }
.doc p, .doc li { color: var(--body); font-size: 16px; line-height: 1.65; }
.doc ul { margin: 0; padding-left: 20px; }
.doc li + li { margin-top: 8px; }
.doc a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.doc code { font-family: var(--mono); font-size: .88em; color: var(--text); background: var(--raised); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.log .release { padding-top: 8px; border-top: 1px solid var(--line); margin-top: 48px; }
.log .release h2 { margin-top: 32px; font-family: var(--mono); }
.log .when { margin-left: 10px; color: var(--muted); font-family: var(--sans); font-size: 14px; font-weight: 400; letter-spacing: 0; }
.people { list-style: none; padding: 0 !important; display: grid; gap: 14px; }
.people a { display: flex; gap: 16px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; }
.people a:hover { border-color: var(--line-strong); background: var(--raised); }
.people img { border-radius: 50%; flex: none; }
.people span { display: flex; flex-direction: column; color: var(--muted); font-size: 14px; }
.people strong { color: var(--text); font-size: 16px; font-weight: 600; }
