/* The home page (contextdrop.dev). It shares app.css's tokens, buttons, and commands. */

.site { --gutter: max(24px, calc(50vw - 560px)); }
.site-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 72px; padding: 0 var(--gutter); border-bottom: 1px solid hsl(var(--border)); }
.site-top .wordmark { gap: 12px; }
.site-top .mark { width: 36px; height: 36px; }
.site-top .wordmark-name strong { font-size: 17px; }
.site-top .wordmark-name span { font-size: 12px; }
.site-nav { display: flex; align-items: center; gap: 24px; font-size: 13px; }
.site-nav a:not(.btn) { color: hsl(var(--muted-foreground)); text-decoration: none; border-radius: 4px; }
.site-nav a:not(.btn):hover { color: hsl(var(--foreground)); }
.site img { display: block; flex-shrink: 0; }
/* The GitHub link: its mark and, once GitHub answers, the repository's stars. */
.btn.stars { gap: 8px; }
.stars-n { color: hsl(var(--muted-foreground)); font-variant-numeric: tabular-nums; }

/* ——— The headline band: chevrons drift along its top and bottom; the middle stays calm. ——— */
.band { position: relative; overflow: hidden; border-bottom: 1px solid hsl(var(--border)); }
.band-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.band-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 136px var(--gutter); }
.band h1 { font-size: 48px; line-height: 1.1; font-weight: 450; letter-spacing: -0.035em; }
.band h1 u { text-decoration: underline; text-decoration-color: hsl(var(--brand)); text-decoration-thickness: 2px; text-underline-offset: 8px; }
.band-sub { max-width: 40ch; margin-top: 16px; font-size: 16px; line-height: 1.6; color: hsl(var(--muted-foreground)); }
.install { display: grid; gap: 12px; min-width: 0; }
.install .command { background: hsl(var(--background)); }
.then { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: hsl(var(--faint)); }
.chip-cmd.command { width: auto; padding: 4px 8px 4px 10px; border-radius: 6px; font-size: 12px; line-height: 18px; align-items: center; }
.chip-cmd .icon { width: 12px; height: 12px; margin: 0; }

/* ——— Works with: each agent's mark beside the command that starts it. ——— */
.works { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 20px var(--gutter); border-bottom: 1px solid hsl(var(--border)); }
.works-label { font-size: 12px; color: hsl(var(--faint)); }
.works-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.works-list li { display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 10px; border: 1px solid hsl(var(--border)); border-radius: 6px; font: 12.5px/1 var(--mono); color: hsl(var(--foreground)); transition: border-color .2s, background-color .2s; }
.works-list li:hover { border-color: hsl(var(--foreground) / 0.25); background: hsl(var(--foreground) / 0.03); }

/* ——— A row: words on one side, the thing itself on the other. ——— */
.row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 64px; align-items: center; padding: 96px var(--gutter); border-bottom: 1px solid hsl(var(--border)); }
.row.flip { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.row.flip > .row-text { order: 2; }
.row h2 { font-size: 26px; line-height: 1.25; font-weight: 450; letter-spacing: -0.025em; }
.row p { max-width: 38ch; margin-top: 12px; font-size: 15px; line-height: 1.6; color: hsl(var(--muted-foreground)); }
.row .hint { margin-top: 20px; font-size: 13px; color: hsl(var(--faint)); }

/* ——— The org: machines as square boxes, agents as rows, messages as pulses along the wires. ——— */
.net { position: relative; min-width: 0; }
.net-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.net-wires path { fill: none; stroke: hsl(var(--foreground) / 0.12); stroke-width: 1; }
.net-wires path.live { stroke: hsl(var(--brand) / 0.55); }
.net-wires circle { fill: hsl(var(--brand)); }
.net-machines { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.machine { border: 1px solid hsl(var(--border)); background: hsl(var(--background)); }
.machine-head { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-bottom: 1px solid hsl(var(--border)); font-size: 12px; color: hsl(var(--muted-foreground)); }
.machine-head .icon { width: 14px; height: 14px; color: hsl(var(--faint)); }
.agent { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 12px; border: 0; border-bottom: 1px solid hsl(var(--border)); background: none; color: hsl(var(--foreground)); font: 11.5px/1 var(--mono); text-align: left; cursor: pointer; transition: background-color .2s; }
.agent:last-child { border-bottom: 0; }
.agent:hover { background: hsl(var(--foreground) / 0.04); }
.agent:focus-visible { outline: none; box-shadow: inset 0 0 0 1px hsl(var(--brand)); }
.agent .id { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.agent .dot { width: 6px; height: 6px; border-radius: 50%; background: hsl(var(--foreground) / 0.2); transition: background-color .3s, box-shadow .3s; }
.agent.working .dot { background: hsl(var(--brand)); box-shadow: 0 0 0 3px hsl(var(--brand) / 0.15); }
.agent.sending { background: hsl(var(--brand) / 0.06); }
.agent.receiving { background: hsl(var(--brand) / 0.1); }
.net-log { display: flex; gap: 8px; min-height: 40px; margin-top: 20px; padding: 10px 14px; border: 1px solid hsl(var(--border)); border-radius: 8px; font: 12px/20px var(--mono); color: hsl(var(--foreground)); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.net-log .prompt { color: hsl(var(--faint)); }
.net-log [data-net-log] { overflow: hidden; text-overflow: ellipsis; }

/* ——— Terminals: tabs with each one's mark, and a window with two panes. ——— */
.mux-tabs { display: inline-flex; margin-top: 24px; overflow: hidden; border: 1px solid hsl(var(--input)); border-radius: 6px; }
.mux-tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; background: none; color: hsl(var(--muted-foreground)); font: 13px/1 var(--mono); cursor: pointer; transition: background-color .2s, color .2s; }
.mux-tabs button + button { border-left: 1px solid hsl(var(--border)); }
.mux-tabs button:hover { background: hsl(var(--accent)); color: hsl(var(--foreground)); }
.mux-tabs button[aria-selected="true"] { background: hsl(var(--foreground) / 0.1); color: hsl(var(--foreground)); }
.mux-tabs button:focus-visible { outline: none; box-shadow: inset 0 0 0 1px hsl(var(--brand)); }
.mux-tabs img { border-radius: 3px; }
.win { min-width: 0; overflow: hidden; border: 1px solid hsl(var(--border)); border-radius: 8px; background: hsl(var(--card)); }
.win-bar { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-bottom: 1px solid hsl(var(--border)); font: 12px/1 var(--mono); color: hsl(var(--muted-foreground)); }
.win-bar img { border-radius: 3px; }
.win-dots { display: inline-flex; gap: 6px; margin-right: 6px; }
.win-dots i { width: 10px; height: 10px; border-radius: 50%; background: hsl(var(--foreground) / 0.14); }
.win-panes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 248px; }
.pane { margin: 0; padding: 14px 16px; overflow: hidden; font: 12px/1.75 var(--mono); color: hsl(var(--muted-foreground)); white-space: pre-wrap; word-break: break-word; font-variant-ligatures: none; }
.pane + .pane { border-left: 1px solid hsl(var(--border)); }
.pane.active { background: hsl(var(--foreground) / 0.02); }
.pane b { font-weight: 450; color: hsl(var(--foreground)); }
.pane i { font-style: normal; color: hsl(var(--faint)); }
.pane em { font-style: normal; color: hsl(var(--brand)); }
.pane .caret { display: inline-block; width: 7px; height: 14px; margin-bottom: -2px; background: hsl(var(--foreground) / 0.7); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.win-status { display: flex; align-items: center; gap: 16px; height: 26px; padding: 0 12px; border-top: 1px solid hsl(var(--border)); font: 11px/1 var(--mono); color: hsl(var(--faint)); }
.win-status .on { color: hsl(var(--foreground)); }
.win[data-mux="tmux"] .win-status { background: hsl(122 75% 42% / 0.12); }
.win[data-mux="tmux"] .win-status .on { color: hsl(122 60% 62%); }

/* ——— The team: a Slack thread that plays out, then comes back as a prompt. ——— */
.svc { display: flex; gap: 20px; margin-top: 24px; font-size: 13px; color: hsl(var(--muted-foreground)); }
.svc span { display: inline-flex; align-items: center; gap: 8px; }
.thread { min-width: 0; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); }
.thread-head { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-bottom: 1px solid hsl(var(--border)); font-size: 13px; font-weight: 550; }
.msg { display: flex; gap: 12px; padding: 16px; opacity: 0.18; transform: translateY(4px); transition: opacity .5s ease, transform .5s ease; }
.msg.reply { margin-left: 28px; padding-top: 0; }
.msg-av { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 28px; height: 28px; border: 1px solid hsl(var(--border)); border-radius: 6px; background: hsl(var(--background)); }
.msg-av.person { font-size: 11px; font-weight: 550; color: hsl(var(--foreground)); background: hsl(var(--foreground) / 0.1); border-color: transparent; }
.msg-head { display: flex; align-items: baseline; gap: 8px; font-size: 12px; color: hsl(var(--faint)); }
.msg-head b { font-weight: 550; color: hsl(var(--foreground)); }
.msg:first-of-type .msg-head b { font: 12px/1 var(--mono); }
.msg p { margin-top: 4px; font-size: 14px; line-height: 1.5; color: hsl(var(--foreground)); }
.back { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid hsl(var(--border)); font-size: 13px; color: hsl(var(--muted-foreground)); opacity: 0.18; transition: opacity .5s ease, background-color .5s ease; }
.back .icon { width: 14px; height: 14px; color: hsl(var(--brand)); }
.back code { font: 12px/1 var(--mono); color: hsl(var(--foreground)); }
.back-dot { width: 6px; height: 6px; margin-left: auto; border-radius: 50%; background: hsl(var(--foreground) / 0.2); }
[data-step].shown { opacity: 1; transform: none; }
.back.shown { background: hsl(var(--brand) / 0.06); }
.back.shown .back-dot { background: hsl(var(--brand)); box-shadow: 0 0 0 3px hsl(var(--brand) / 0.15); }

/* ——— More: joined square cells, an icon, a name, and the command. ——— */
.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 96px var(--gutter); border: 1px solid hsl(var(--border)); background: hsl(var(--border)); }
.cells > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 12px; padding: 22px 24px; background: hsl(var(--background)); transition: background-color .2s; }
.cells > div:hover { background: hsl(var(--foreground) / 0.025); }
.cells .icon { grid-row: span 2; width: 18px; height: 18px; color: hsl(var(--faint)); transition: color .2s; }
.cells > div:hover .icon { color: hsl(var(--brand)); }
.cells h3 { font-size: 14px; font-weight: 550; letter-spacing: -0.01em; }
.cells code { font: 12px/1.4 var(--mono); color: hsl(var(--faint)); }

/* ——— The call to action. ——— */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 56px var(--gutter); border-top: 1px solid hsl(var(--border)); }
.cta h2 { font-size: 22px; font-weight: 450; letter-spacing: -0.02em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.cta-actions .btn { height: 40px; padding: 0 18px; gap: 8px; }
.cta-actions .icon { width: 14px; height: 14px; }

.site-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding: 28px var(--gutter) 40px; border-top: 1px solid hsl(var(--border)); font-size: 13px; color: hsl(var(--muted-foreground)); }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-foot a { border-radius: 4px; text-decoration: underline; text-decoration-color: hsl(var(--foreground) / 0.35); text-underline-offset: 4px; }
.site-foot a:hover { text-decoration-color: currentColor; }
.foot-name { font-family: var(--mono); font-size: 12px; color: hsl(var(--foreground)); }

@media (max-width: 960px) {
  .band-inner, .row, .row.flip { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .band-inner { padding-top: 80px; padding-bottom: 80px; }
  .row { padding-top: 64px; padding-bottom: 64px; }
  .row.flip > .row-text { order: 0; }
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 64px var(--gutter); }
}
@media (max-width: 560px) {
  .site-top { height: 60px; }
  .site-nav { gap: 16px; }
  .site-nav .wide-only { display: none; }
  .band h1 { font-size: 36px; }
  .net-machines { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .win-panes { grid-template-columns: minmax(0, 1fr); height: auto; }
  .pane { min-height: 150px; }
  .pane + .pane { border-left: 0; border-top: 1px solid hsl(var(--border)); }
  .cells { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .msg, .back, .agent, .agent .dot { transition: none; }
  .pane .caret { animation: none; }
}
