/* ────────────────────────────────────────────────────────────────────
   collab landing page
   Aesthetic: warm utility. Off-white canvas, ink-black type, single
   warm orange accent (#ea580c). Hard 1px borders, no gradients, no
   glows, no mesh, no decorative bg. Dark TUI sits on the page as a
   contrast slab (it is a real terminal). Geist sans + Geist mono.
   ──────────────────────────────────────────────────────────────────── */

:root {
  /* surface */
  --bg:           #faf8f3;     /* warm off-white */
  --bg-2:         #f3efe7;     /* slightly deeper, for footer / dividers */
  --paper:        #ffffff;     /* card surface */
  --slab:         #0c0d10;     /* dark TUI / code block */
  --slab-2:       #16181c;

  /* ink */
  --ink:          #0a0a0a;
  --ink-2:        #2c2c2e;
  --ink-3:        #5a5a60;
  --ink-4:        #8b8b91;
  --ink-5:        #b6b6bc;

  /* rules */
  --rule:         #e6e1d5;
  --rule-2:       #d6cfbf;
  --rule-strong:  #c1b9a7;

  /* accent: warm orange */
  --acc:          #ea580c;
  --acc-2:        #c2410c;
  --acc-deep:     #9a3412;
  --acc-soft:     rgba(234, 88, 12, 0.10);
  --acc-tint:     rgba(234, 88, 12, 0.18);

  /* on-slab text (TUI) */
  --slab-ink:     #ededed;
  --slab-ink-2:   #b8b8be;
  --slab-ink-3:   #82828c;
  --slab-ink-4:   #5a5a64;
  --slab-rule:    #1f2128;
  --slab-rule-2:  #2a2c34;

  /* TUI accent (kept as warm orange so the page stays mono-accent) */
  --slab-acc:     #ff8a4c;
  --slab-acc-2:   #ea580c;
  --slab-acc-soft: rgba(255, 138, 76, 0.14);

  /* TUI traffic-light dots */
  --red:          #ff5f57;
  --yel:          #ffbd2e;
  --grn:          #28c93f;

  /* type */
  --sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  /* container */
  --max: 1180px;
  --pad: 28px;
}

/* ─── reset / base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: 'ss01', 'cv11';
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }
img, svg { display: block; max-width: 100%; }
code, pre { font-family: var(--mono); }
::selection { background: var(--acc); color: #fff; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

/* Decorative bg layers from old theme: hidden in this aesthetic. */
.bg-grid, .bg-glow { display: none; }

main, header, footer { position: relative; z-index: 1; }


/* ─── topbar ─── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 243, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 22px;
  height: 22px;
  color: var(--acc);
}
.brand-word {
  font-size: 17px;
  letter-spacing: -0.02em;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-3);
}
.topnav a {
  transition: color .15s ease;
}
.topnav a:hover { color: var(--ink); }
.topnav-ext {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topnav-ext svg { opacity: .6; }
@media (max-width: 720px) {
  .topnav { gap: 16px; }
  .topnav a:not(.topnav-ext) { display: none; }
}


/* ─── hero ─── */
.hero {
  padding: 72px 0 96px;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-3);
  font-size: 12.5px;
  letter-spacing: 0.01em;
  margin: 0 0 24px;
  font-family: var(--mono);
}
.pulse-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--acc);
}

.hero-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(44px, 7vw, 78px);
  line-height: 1.0;
  letter-spacing: -0.04em;
  margin: 0 0 26px;
  color: var(--ink);
}
.hero-title .line {
  display: block;
}
.hero-title .grad {
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  color: var(--acc);
}
.hero-title .period {
  display: inline-block;
  width: 0.32em;
  height: 0.32em;
  border-radius: 50%;
  background: var(--acc);
  margin-left: 0.05em;
  vertical-align: 0.06em;
  -webkit-text-fill-color: var(--acc);
}

.hero-lede {
  color: var(--ink-2);
  font-size: clamp(15.5px, 1.45vw, 17px);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 0 32px;
}
.hero-lede strong {
  color: var(--ink);
  font-weight: 600;
}

.hero-ctas {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 38px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 6px;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, color .15s ease, border-color .15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--acc);
  color: #fff;
  border-color: var(--acc);
}
.btn-primary:hover {
  background: var(--acc-2);
  border-color: var(--acc-2);
  transform: translateY(-1px);
}
.btn-ghost {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-ghost:hover {
  background: var(--bg-2);
  border-color: var(--rule-strong);
  transform: translateY(-1px);
}

.hero-marquee {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  color: var(--ink-3);
  font-size: 13px;
  font-family: var(--mono);
  letter-spacing: 0.01em;
}
.hero-marquee li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.hero-marquee .dot {
  width: 4px; height: 4px;
  background: var(--acc);
  border-radius: 50%;
}


/* ─── hero TUI mockup (dark slab) ─── */
.hero-tui {
  position: relative;
}
.tui-glow { display: none; }   /* no glow in this aesthetic */
.tui-frame {
  position: relative;
  z-index: 1;
  background: var(--slab);
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.55;
  box-shadow: 0 1px 0 #fff inset, 8px 8px 0 var(--ink);  /* hard offset shadow, no blur */
}
.tui-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  background: var(--slab-2);
  border-bottom: 1px solid var(--slab-rule-2);
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--slab-ink-3);
}
.tui-bar .dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.tui-bar .dot-r { background: var(--red); }
.tui-bar .dot-y { background: var(--yel); }
.tui-bar .dot-g { background: var(--grn); }
.tui-bar-title {
  margin-left: 8px;
  flex: 1;
  text-align: center;
  letter-spacing: 0.01em;
  color: var(--slab-ink-3);
}
.tui-bar-status {
  width: 7px; height: 7px;
  background: var(--slab-acc);
  border-radius: 50%;
}
.tui-body {
  padding: 16px 18px 18px;
  color: var(--slab-ink-2);
  min-height: 360px;
}

.tui-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 12.5px;
}
.tui-header-right {
  margin-left: auto;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
.t-acc  { color: var(--slab-acc); }
.t-mid  { color: var(--slab-ink); }
.t-dim,
.tui-body .dim  { color: var(--slab-ink-4); }

.tui-block {
  margin-bottom: 14px;
}
.tui-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slab-ink-3);
  margin-bottom: 8px;
}
.tui-row {
  font-size: 12.5px;
  word-break: break-all;
}

.tui-twocol {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 16px;
  margin-bottom: 14px;
}
@media (max-width: 520px) {
  .tui-twocol { grid-template-columns: 1fr; gap: 8px; }
}

/* peer list (script.js renders .peer-dot .peer-name .dim .peer-status) */
.tui-peer-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tui-peer-list .peer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  animation: fade-in .3s ease-out both;
}
.tui-peer-list .peer .peer-dot {
  color: var(--slab-ink-4);
  font-size: 9px;
  line-height: 1;
}
.tui-peer-list .peer .peer-dot.self { color: var(--slab-acc); }
.tui-peer-list .peer .peer-name { color: var(--slab-ink); }
.tui-peer-list .peer .peer-name.self { color: var(--slab-acc); font-weight: 500; }
.tui-peer-list .peer .peer-status {
  flex: 1 1 100%;
  margin-left: 16px;
  font-size: 11.5px;
  color: var(--slab-ink-3);
  font-style: italic;
  min-height: 1em;
}

/* log list (script.js renders .entry .time .who[.who-self] .tag-q|.tag-a .dim .text) */
.tui-log {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 220px;
  overflow: hidden;
}
.tui-log .entry {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  font-size: 12.5px;
  animation: fade-in .3s ease-out both;
}
.tui-log .entry .time   { color: var(--slab-ink-4); font-size: 11px; }
.tui-log .entry .who    { color: var(--slab-ink); }
.tui-log .entry .who-self,
.tui-log .entry .who.who-self { color: var(--slab-acc); font-weight: 500; }
.tui-log .entry .tag-q,
.tui-log .entry .tag-a {
  display: inline-block;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  background: var(--slab-acc-soft);
  color: var(--slab-acc);
  border: 1px solid rgba(255, 138, 76, 0.22);
  line-height: 1.6;
}
.tui-log .entry .tag-a {
  background: rgba(255, 255, 255, 0.04);
  color: var(--slab-ink-2);
  border-color: var(--slab-rule-2);
}
.tui-log .entry .text {
  flex: 1 1 100%;
  color: var(--slab-ink-2);
  font-size: 12.5px;
  line-height: 1.5;
  margin-top: 1px;
}

/* file list (script.js renders .name .size .src) */
.tui-files {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12.5px;
}
.tui-files li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  color: var(--slab-ink-2);
  animation: fade-in .3s ease-out both;
}
.tui-files li.empty { color: var(--slab-ink-4); }
.tui-files .name { color: var(--slab-ink); font-weight: 500; }
.tui-files .size { color: var(--slab-ink-3); font-size: 11.5px; }
.tui-files .src  {
  color: var(--slab-ink-4);
  font-size: 11.5px;
  font-style: italic;
  margin-left: auto;
}

.tui-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px dashed var(--slab-rule-2);
  font-size: 11.5px;
  color: var(--slab-ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.tui-footer .key {
  color: var(--slab-acc);
  font-weight: 500;
}
.tui-footer .sep {
  color: var(--slab-ink-4);
  margin: 0 4px;
}


/* ─── shared section chrome ─── */
.section {
  padding: 96px 0;
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.section:last-of-type { border-bottom: none; }
@media (max-width: 720px) {
  .section { padding: 72px 0; }
}
.sec-head {
  max-width: 720px;
  margin-bottom: 56px;
}
.sec-head-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.sec-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--acc);
  margin: 0 0 14px;
}
.sec-title {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(34px, 4.4vw, 52px);
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--ink);
  margin: 0 0 18px;
}
.sec-lede {
  color: var(--ink-2);
  font-size: clamp(15.5px, 1.3vw, 17px);
  line-height: 1.6;
  margin: 0;
  max-width: 620px;
}
.sec-head-center .sec-lede { margin: 0 auto; }
.sec-lede strong { color: var(--ink); font-weight: 600; }
.sec-lede code {
  background: var(--paper);
  border: 1px solid var(--rule-2);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--acc-2);
}


/* ─── card grids ─── */
.cards-3 {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 980px) {
  .cards-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cards-3 { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 26px 24px 28px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover {
  border-color: var(--rule-strong);
  transform: translateY(-1px);
}
.card h3 {
  margin: 0 0 8px;
  font-size: 17.5px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.6;
}
.card code {
  background: var(--bg-2);
  border: 1px solid var(--rule-2);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--acc-2);
}


/* ─── problem cards ─── */
.card-problem .card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--acc-soft);
  color: var(--acc);
  margin-bottom: 18px;
  border: 1px solid var(--acc-tint);
}


/* ─── solution / flow ─── */
.solution {
  text-align: center;
  background: var(--bg-2);
}
.flow-frame {
  position: relative;
  margin: 56px auto 0;
  max-width: 980px;
  border: 1px solid var(--rule-2);
  border-radius: 8px;
  background: var(--paper);
  padding: 36px 28px;
  overflow: hidden;
}
.flow-glow { display: none; }
.flow {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
}


/* ─── use cases ─── */
.use-grid { gap: 16px; }
.card.use { padding: 22px 22px 24px; }
.use-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--acc);
  background: var(--acc-soft);
  border: 1px solid var(--acc-tint);
  border-radius: 5px;
}
.card.use h3 {
  font-size: 16.5px;
  margin-bottom: 6px;
}
.card.use p {
  font-size: 13.8px;
  color: var(--ink-2);
  line-height: 1.55;
}


/* ─── install ─── */
.install {
  background: var(--bg-2);
}
.install-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  max-width: 880px;
  margin: 0 auto;
}

.code-card {
  background: var(--slab);
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 6px 6px 0 var(--ink);
}
.code-card.alt {
  background: var(--slab-2);
  border-color: var(--ink-3);
  box-shadow: 6px 6px 0 var(--ink-3);
}
.code-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 38px;
  padding: 0 14px;
  border-bottom: 1px solid var(--slab-rule-2);
  background: var(--slab-2);
}
.code-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--slab-ink-3);
}
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.03);
  color: var(--slab-ink-2);
  border: 1px solid var(--slab-rule-2);
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.copy-btn:hover {
  background: var(--slab-acc-soft);
  color: var(--slab-acc);
  border-color: rgba(255, 138, 76, 0.32);
}
.copy-btn svg { opacity: .85; }
.copy-btn.copied,
.copy-btn[data-state="copied"] {
  background: var(--slab-acc-soft);
  color: var(--slab-acc);
  border-color: rgba(255, 138, 76, 0.32);
}

.code-body {
  margin: 0;
  padding: 18px 20px;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--slab-ink-2);
  overflow-x: auto;
  background: transparent;
  white-space: pre;
}
.code-body code { color: inherit; }
.code-body .prompt { color: var(--slab-acc); margin-right: 8px; }


/* verbs / "then" cheatsheet */
.cmd-grid {
  margin: 36px auto 0;
  max-width: 880px;
  background: var(--slab);
  border: 1px solid var(--ink-3);
  border-radius: 8px;
  padding: 22px 24px;
  box-shadow: 6px 6px 0 var(--ink);
}
.cmd-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--slab-ink-3);
  margin: 0 0 12px;
}
.cmd-body {
  margin: 0;
  padding: 0;
  font-family: var(--mono);
  font-size: 13.5px;
  color: var(--slab-ink-2);
  white-space: pre;
  overflow-x: auto;
}
.cmd-body .cmt    { color: var(--slab-ink-4); font-style: italic; }
.cmd-body .prompt { color: var(--slab-acc); }
.cmd-body .acc    { color: var(--slab-acc); }


/* ─── footer ─── */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 36px 0 60px;
  background: var(--bg-2);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand-footer {
  color: var(--ink-2);
  font-size: 15px;
}
.brand-footer .brand-mark { color: var(--acc); }
.footer-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink-3);
}
.footer-nav a {
  color: var(--ink-2);
  transition: color .15s ease;
}
.footer-nav a:hover { color: var(--acc); }
.footer-nav .sep { color: var(--ink-4); }


/* ─── toast ─── */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 16px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .25s ease;
  z-index: 100;
}
.toast.show,
.toast[data-show="1"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


/* ─── animations ─── */
@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
