/* Chorvo: warm paper, black ink, one colour per agent. */
:root {
  --paper: #f4f0e8; --paper-2: #ebe5d9; --card: #fffdf9; --ink: #15120e; --ink-2: #3a342c; --mute: #6f675b; --line: #ddd5c6;
  --scout: #ffb020; --forge: #ff5a36; --probe: #12b3a0; --patch: #7b5cff;
  --ok: #12936f; --bad: #d8452b;
  --r: 18px; --r-sm: 12px;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --shadow: 0 1px 0 rgba(21,18,14,.06), 0 10px 30px -12px rgba(21,18,14,.18);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.55 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--scout); color: var(--ink); }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--mute); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 24px/1 var(--display); letter-spacing: -.03em; }
.brand .dots { display: grid; grid-template-columns: repeat(2, 9px); gap: 3px; }
.brand .dots i { width: 9px; height: 9px; border-radius: 50%; }
.brand .dots i:nth-child(1) { background: var(--scout); } .brand .dots i:nth-child(2) { background: var(--forge); border-radius: 3px; }
.brand .dots i:nth-child(3) { background: var(--probe); border-radius: 3px; } .brand .dots i:nth-child(4) { background: var(--patch); }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 15px; padding: 6px 0; border-bottom: 2px solid transparent; }
.nav a:hover, .nav a.on { color: var(--ink); border-bottom-color: var(--ink); }
.top .cta { margin-left: auto; }
@media (max-width: 900px) { .nav { display: none; } .top .wrap { gap: 12px; } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 0 -2px var(--scout); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--card); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; cursor: pointer; transition: border-color .15s, transform .15s; }
.chip:hover { border-color: var(--ink); transform: translateY(-1px); }
.tag { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--paper-2); font: 500 12px/1.4 var(--mono); color: var(--ink-2); }
.tag b { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); display: inline-block; }

/* ---------- type ---------- */
h1, h2, h3 { font-family: var(--display); letter-spacing: -.035em; line-height: .98; margin: 0; }
.h1 { font-size: clamp(48px, 8.2vw, 112px); font-weight: 800; }
.h2 { font-size: clamp(34px, 5vw, 64px); font-weight: 800; }
.h3 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.kicker { font: 600 13px/1 var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--mute); display: inline-flex; align-items: center; gap: 8px; }
.lede { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 60ch; }
section { padding: 96px 0; }
.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 40px; flex-wrap: wrap; }

/* ---------- prompt box ---------- */
.ask { background: var(--card); border: 1.5px solid var(--ink); border-radius: 22px; padding: 14px; box-shadow: 0 8px 0 -2px var(--ink); transition: box-shadow .2s; }
.ask:focus-within { box-shadow: 0 8px 0 -2px var(--forge); }
.ask textarea { width: 100%; min-height: 92px; resize: none; border: 0; outline: 0; background: transparent; font-size: 19px; line-height: 1.45; padding: 6px 8px; }
.ask textarea::placeholder { color: #a39a8b; }
.ask .row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask .row .btn { margin-left: auto; height: 48px; padding: 0 24px; font-size: 16px; }
.ask .hint { font-size: 13px; color: var(--mute); padding-left: 8px; }

/* ---------- agents ---------- */
.agent { display: inline-block; flex: none; }
.agent svg { display: block; overflow: visible; }
.agent .eye { transform-box: fill-box; transform-origin: center; animation: blink 5.2s infinite; }
.agent.b .eye { animation-delay: 1.7s; } .agent.c .eye { animation-delay: 3.1s; } .agent.d .eye { animation-delay: .8s; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
.agent.busy svg { animation: bob .9s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-3deg); } }
.agent.done svg { animation: none; }
.agent.sleep .eye { animation: none; transform: scaleY(.15); }

/* ---------- cards / grid ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.app-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.app-card:hover { transform: translateY(-4px) rotate(-.4deg); box-shadow: var(--shadow); border-color: var(--ink); }
.app-card .cover { aspect-ratio: 16/10; background: var(--paper-2) center/cover; position: relative; }
.app-card .cover .badge { position: absolute; left: 12px; bottom: -16px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font: 800 20px/1 var(--display); border: 3px solid var(--card); }
.app-card .body { padding: 24px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.app-card .name { font: 700 20px/1.1 var(--display); letter-spacing: -.02em; }
.app-card .tagline { color: var(--ink-2); font-size: 14.5px; line-height: 1.4; }
.app-card .meta { margin-top: auto; padding-top: 10px; display: flex; gap: 12px; align-items: center; font: 500 12.5px/1 var(--mono); color: var(--mute); }
.app-card .meta .p { display: flex; gap: 4px; margin-left: auto; }
.app-card .meta .p i { width: 8px; height: 8px; border-radius: 50%; }
.empty { border: 1.5px dashed var(--line); border-radius: var(--r); padding: 48px 24px; text-align: center; color: var(--mute); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 40px 0 56px; margin-top: 40px; }
.foot .wrap { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot nav a { text-decoration: none; color: var(--ink-2); font-size: 14px; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; }
.foot .small { margin-left: auto; font-size: 13px; color: var(--mute); }

/* ---------- misc ---------- */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 999px; font-weight: 500; font-size: 14px; transition: .25s; z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.skeleton { background: linear-gradient(90deg, var(--paper-2), #f7f3ec, var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: var(--r); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .reveal { opacity: 1; transform: none; } }
[hidden] { display: none !important; }
