/* duckdock.dev: index.html, terms.html, privacy.html.
   Three type families, each with its own ground: sentences read in sans, as in the app; names, labels and commands are mono;
   the headline, the wordmark and the lid's clock are pixel.
   Sizes: mono 12 (labels, meta) and 13; sans 14 (inside the app), 16 (text) and 18 (lead, titles); pixel 16, 40 and 64.
   Radii: 4 and 8. One hot object: the app window, with the hard orange shadow. The night lives under the closed lid.
   Colours are a copy of the duckdock app's dark theme. */
/* the fonts are served from the site itself: no request leaves for a font host. Latin subset; licences in fonts/OFL-*.txt */
@font-face { font-family: "Silkscreen"; src: url(fonts/silkscreen.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter Tight"; src: url(fonts/inter-tight.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
:root {
  --bg: #1c1c1e; --s1: #161618; --s2: #232326; --s3: #2c2c30; --term: #0c0c0d; --border: #2a2a2e; --strong: #7f7f86;
  --fg: #f5f5f7; --muted: #b9b9c1; --accent: #ee6b2b; --accent-text: #fea17a; --ok: #5fd38d; --err: #fe9ea6;
  --claude: #eda2d9; --codex: #7fdccb; --opencode: #c5abfe; --antigravity: #8dbbff;
  --pixel: "Silkscreen", ui-monospace, monospace; --mono: "JetBrains Mono", ui-monospace, monospace; --sans: "Inter Tight", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--muted); font: 13px/1.6 var(--mono); -webkit-font-smoothing: antialiased; }
h1, h2, p, ul, figure { margin: 0; padding: 0; list-style: none; }
/* a link, as the app draws one: the accent as text, underlined on hover */
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
b { color: var(--fg); font-weight: 400; }
code, kbd { font: 13px var(--mono); color: var(--fg); }
kbd { border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; color: inherit; font-size: 12px; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.dot, .plus { color: var(--ok); } .minus { color: var(--err); }
.claude { color: var(--claude); } .codex { color: var(--codex); } .opencode { color: var(--opencode); } .antigravity { color: var(--antigravity); }

/* type: one label, one text, one title */
h2, .lbl, .date, .os button { font: 12px/18px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--strong); }
h2::before { content: "## "; color: var(--accent); }
h1 { color: var(--fg); font: 400 clamp(28px, 3.2vw, 40px)/1.14 var(--pixel); }
h1 span { color: var(--accent); }
.lead, figcaption, .doc main p:not([class]), .doc li { font: 16px/1.55 var(--sans); }
.lead { font-size: 18px; }
figcaption b { display: block; font-size: 18px; font-weight: 600; }

.brand { display: flex; align-items: center; gap: 8px; color: var(--fg); font: 400 16px/1.3 var(--pixel); }
a.brand:hover { text-decoration: none; }
header { padding: 20px 0; }
footer { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; padding: 24px 0 40px; border-top: 1px solid var(--border); font-size: 12px; }
footer nav { display: flex; gap: 20px; }

/* one rhythm: 96px after every section; the only rule on a page is the footer's */
.hero, .features, .doc main { padding-bottom: 96px; }

/* the first screen sells: what it is on the left, the dock at work on the right, the command under the words */
.hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 56px; align-items: start; padding-top: 24px; }
.pitch > * + * { margin-top: 16px; }
.lead { max-width: 34em; }
.lead code { color: var(--accent-text); }
/* the agents are a list, so the next one is one more item */
.agents { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.agents li { border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; }
.agents li::before { content: "◆ "; }
/* the command, and the platform switch that changes it */
.install { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; max-width: 600px; margin-top: 24px; font-size: 12px; }
.cmd { flex: 1 0 100%; display: grid; grid-template-columns: minmax(0, 1fr) 44px; background: var(--s1); border: 1px solid var(--strong); }
.cmd code { padding: 12px 16px; line-height: 1.6; overflow-wrap: anywhere; }
.cmd code::before { content: "$ "; color: var(--accent); }
.cmd button:hover { color: var(--fg); }
.cmd button.ok { color: var(--accent); }
.cmd svg { display: block; margin: auto; }
.os { display: flex; gap: 16px; }
.os button { padding: 2px 0; border-bottom: 2px solid transparent; }
.os button:hover { color: var(--fg); }
.os button[aria-pressed="true"] { color: var(--fg); border-bottom-color: var(--accent); }

/* the figure: the dock, the wire, the machines */
.demo { min-width: 0; }
.demo .lbl { margin-bottom: 8px; }
.note { margin-top: 12px; }

/* the app window, as the app draws it. Inside it the type is the app's own: sans 14, mono 12 and 13. */
.win, .tile { background: var(--bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; color: var(--fg); font: 14px/1.5 var(--sans); }
.win { position: relative; height: 380px; display: grid; grid-template: auto minmax(0, 1fr) auto / 216px minmax(0, 1fr); border-color: var(--strong); box-shadow: 6px 6px 0 0 var(--accent); }
.top, .bar, .grp, .find, .who, .pm, .on, .th, .tr > :last-child, .meter > span { font: 12px var(--mono); color: var(--muted); }
.top, .bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; white-space: nowrap; overflow: hidden; }
.top { border-bottom: 1px solid var(--border); }
.bar { gap: 20px; padding-block: 4px; border-top: 1px solid var(--border); }
.top i { width: 10px; height: 10px; border-radius: 50%; background: var(--s3); }
.top .sw { margin-left: 8px; color: var(--fg); }
.top .crumb { margin-left: 24px; overflow: hidden; text-overflow: ellipsis; }
.pw { position: relative; z-index: 2; margin: -4px -4px -4px auto; display: flex; align-items: center; gap: 8px; padding: 2px 8px; border: 1px solid var(--border); border-radius: 4px; animation: nudge 1.2s steps(2) 4s 2; }
.pw:hover, .closed .pw { color: var(--fg); border-color: var(--accent); }
@keyframes nudge { 50% { color: var(--fg); border-color: var(--accent); } }
.side { background: var(--s1); border-right: 1px solid var(--border); padding: 8px; overflow: hidden; }
.find { display: flex; justify-content: space-between; border: 1px solid var(--border); border-radius: 4px; padding: 4px 8px; color: var(--strong); }
.grp { padding: 12px 8px 4px; }
.grp:first-child { padding-top: 8px; }
.row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 8px; border-radius: 4px; text-align: left; white-space: nowrap; }
.row:hover { background: var(--s2); }
.row > :nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.row.cur { background: var(--s3); font-weight: 600; }
.ag { display: none; margin-left: 8px; font: normal 12px var(--mono); }
.ring { flex: none; width: 11px; height: 11px; border: 2px solid var(--ok); border-right-color: transparent; border-radius: 50%; animation: turn 1s linear infinite; }
.ask { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); color: var(--bg); font: 700 10px/14px var(--mono); text-align: center; }
@keyframes turn { to { transform: rotate(1turn); } }
.chat { display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 8px; padding: 12px 16px; min-height: 0; }
.you { justify-self: end; max-width: 85%; background: var(--s3); border-radius: 8px; padding: 8px 12px; }
.log { display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; overflow: hidden; font: 13px/1.8 var(--mono); color: var(--muted); }
.log div { flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log b, .log time { margin-right: 1ch; }
.log div:last-child { color: var(--fg); }
.gate { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; border: 1px solid var(--accent); border-radius: 8px; padding: 4px 4px 4px 12px; }
.gate[hidden] { display: none; }
.gate code { min-width: 0; overflow-wrap: anywhere; }
.gate button { margin-left: 4px; padding: 2px 12px; border: 1px solid var(--strong); border-radius: 4px; font: 12px var(--mono); }
.gate button:first-child { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.field { border: 1px solid var(--border); border-radius: 8px; background: var(--s2); padding: 8px 12px; color: var(--strong); }

/* the closed lid: the night. It comes down in six hard steps. */
.lid { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 4px; cursor: pointer; background: #101012 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='720' fill='%238a8a92'%3E%3Crect x='96' y='120' width='6' height='6'/%3E%3Crect x='520' y='400' width='6' height='6'/%3E%3Crect x='300' y='640' width='6' height='6'/%3E%3C/svg%3E"); color: var(--muted); font: 13px var(--mono); clip-path: inset(0 0 100% 0); pointer-events: none; transition: clip-path .36s steps(6); }
.closed .lid { clip-path: inset(0); pointer-events: auto; }
.lid time { color: var(--fg); font: 400 64px/1 var(--pixel); }
.lid b { color: var(--accent); }
.lid::before { content: ""; position: absolute; right: 9%; top: 14%; width: 48px; aspect-ratio: 1; background: var(--fg); clip-path: polygon(25% 0, 75% 0, 75% 12.5%, 87.5% 12.5%, 87.5% 25%, 100% 25%, 100% 75%, 87.5% 75%, 87.5% 87.5%, 75% 87.5%, 75% 100%, 25% 100%, 25% 87.5%, 12.5% 87.5%, 12.5% 75%, 0 75%, 0 25%, 12.5% 25%, 12.5% 12.5%, 25% 12.5%); }

.wire { width: 0; height: 14px; margin: 0 auto; border-left: 2px solid var(--ok); }
.closed .wire { border-left: 2px dashed var(--strong); }
.hosts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.host { height: 124px; display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--term); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: opacity .2s; }
.host .log { padding: 4px 12px 8px; }
.host .log div:nth-last-child(n+4) { display: none; }
.host .log div:last-child { color: var(--accent-text); }
.closed .host.local { opacity: .4; }
.closed .host.local .dot { color: var(--strong); }

/* features: a name, one line, and the piece of the app that does it */
.features h2 { margin-bottom: 16px; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
figure { display: grid; grid-template-rows: 1fr auto; min-width: 0; }
figcaption { margin-bottom: 12px; }
.tile { height: 152px; padding: 0 12px; }
.tile.term { background: var(--term); }
.th, .tr, .meter { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.th { justify-content: space-between; margin: 0 -12px 4px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.tr, .meter { padding: 6px 0; }
.tr > :nth-child(2) { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.tr em { margin-right: 4px; font: normal 12px var(--mono); color: var(--muted); }
.tr span > em:not(:first-child) { margin: 0 0 0 8px; }
.tr i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.tr i.a { background: var(--ok); }
.pr { background: var(--ok); color: var(--bg); border-radius: 4px; padding: 0 4px; }
.btn { border: 1px solid var(--border); border-radius: 4px; padding: 0 8px; }
.tl { padding: 2px 0; font: 13px/1.6 var(--mono); color: var(--muted); }
.tl b { color: var(--accent-text); }
.tl.prompt { margin-top: 4px; padding: 8px 12px; border: 1px solid var(--strong); border-radius: 4px; }
.caret { display: inline-block; width: 7px; height: 13px; vertical-align: -2px; background: var(--fg); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.meter > span:first-child { flex: 0 0 12ch; }
.meter i { flex: 1; height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--accent) var(--v), var(--s3) var(--v)); }
.key { flex: 0 0 12ch; font: 13px var(--mono); }
.dots { color: var(--strong); letter-spacing: 2px; }

/* a text page: terms, privacy */
.doc .wrap { max-width: 760px; }
.doc header { padding-bottom: 48px; }
.date { margin-top: 12px; }
.short { margin-top: 24px; font: 700 16px/1.6 var(--mono); color: var(--fg); }
.short::before { content: "> "; color: var(--accent); }
.doc h2 { margin: 48px 0 12px; }
.doc p + p, .doc p + ul, .doc ul + p { margin-top: 12px; }
.doc li { position: relative; padding-left: 20px; }
.doc li + li { margin-top: 8px; }
.doc li::before { content: "–"; position: absolute; left: 0; color: var(--accent); }

@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 900px) {
  .hero, .features, .doc main { padding-bottom: 64px; }
  .hero { padding-top: 8px; }
  h1 { font-size: 32px; }
  .lead { font-size: 16px; }
  /* on a phone the app shows its list, then the open chat. Each machine is a strip with its last step. */
  .win { height: auto; grid-template-columns: minmax(0, 1fr); font-size: 16px; box-shadow: 4px 4px 0 0 var(--accent); }
  .top .crumb, .find, .you, .pw kbd { display: none; }
  .side { border-right: 0; border-bottom: 1px solid var(--border); padding-top: 0; }
  .row { padding-block: 6px; }
  .ag { display: inline; }
  .chat { grid-template-rows: none; }
  .chat .log div:nth-last-child(n+4) { display: none; }
  .hosts { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .host { height: auto; }
  .host .top { border: 0; padding-bottom: 0; }
  .host .log div:not(:last-child) { display: none; }
  .lid time { font-size: 48px; }
}
@media (max-width: 560px) { .tiles { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
@media (max-width: 370px) { h1 { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { .ring, .pw, .caret { animation: none; } .lid { transition: none; } }
