/* better-ssh site — minimal dark dev aesthetic.
   Single stylesheet, no framework, no build step. */

:root {
  --bg:        #0b0e13;
  --bg-card:   #131720;
  --bg-elev:  #1a1f2b;
  --fg:       #e2e6ef;
  --fg-dim:   #9aa3b5;
  --fg-muted: #6b7283;
  --accent:   #7dd3fc;   /* cyan-ish, terminal-friendly */
  --accent-2: #a5f3c1;
  --warn:     #fbbf24;
  --rule:     #232936;
  --mono:     ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans:     -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --maxw:     880px;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted rgba(125, 211, 252, 0.4);
}
a:hover { color: #bae6fd; border-bottom-style: solid; }

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--bg-elev);
  padding: 0.12em 0.4em;
  border-radius: 4px;
  color: var(--accent-2);
}

kbd {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  padding: 0.1em 0.4em;
  border-radius: 4px;
  color: var(--fg);
}

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 2.6rem; margin: 0 0 0.4rem; }
h2 { font-size: 1.6rem; margin: 0 0 1rem; color: var(--fg); }
h3 { font-size: 1.05rem; margin: 0 0 0.4rem; color: var(--fg); }

/* ---- Top nav ------------------------------------------------------------ */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  max-width: var(--maxw);
  margin: 0 auto;
  font-family: var(--mono);
  font-size: 0.9rem;
}
.topnav .brand {
  color: var(--fg);
  border: none;
  font-weight: 600;
}
.topnav-links a {
  color: var(--fg-dim);
  border: none;
  margin-left: 1.4rem;
}
.topnav-links a:hover { color: var(--fg); }

/* ---- Sections ---------------------------------------------------------- */
.hero, .problem, .shift, .features, .audience, .getstarted {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}
.hero { padding-top: 3rem; padding-bottom: 3.5rem; text-align: left; }
.problem { border-top: 1px solid var(--rule); }
.shift { border-top: 1px solid var(--rule); }
.features { border-top: 1px solid var(--rule); }
.audience { border-top: 1px solid var(--rule); }
.getstarted { border-top: 1px solid var(--rule); padding-bottom: 3.5rem; }

/* ---- Hero -------------------------------------------------------------- */
.hero h1 {
  font-family: var(--mono);
  font-size: 3rem;
  letter-spacing: -0.02em;
}
.hero h1 .mono { color: var(--accent); }
.tagline {
  font-size: 1.4rem;
  color: var(--fg);
  font-weight: 500;
  margin: 0 0 1.2rem;
}
.lede {
  color: var(--fg-dim);
  max-width: 64ch;
  font-size: 1.05rem;
  margin: 0 0 1.6rem;
}
.prereq {
  color: var(--fg-muted);
  font-size: 0.88rem;
  margin-top: 0.6rem;
}

/* ---- Install box ------------------------------------------------------- */
.install-box {
  display: flex;
  align-items: stretch;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.88rem;
  overflow: hidden;
  max-width: 100%;
}
.install-box code {
  background: transparent;
  color: var(--fg);
  padding: 0.85rem 1rem;
  flex: 1 1 auto;
  overflow-x: auto;
  white-space: nowrap;
}
.copy-btn {
  background: var(--bg-card);
  border: none;
  border-left: 1px solid var(--rule);
  color: var(--fg-dim);
  padding: 0 1.2rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.copy-btn:hover { background: var(--bg); color: var(--fg); }
.copy-btn.copied { color: var(--accent-2); }

/* ---- Problem prose ----------------------------------------------------- */
.problem p { color: var(--fg-dim); max-width: 68ch; }
.problem p + p { margin-top: 1rem; }

/* ---- Before / after ---------------------------------------------------- */
.shift-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: stretch;
  margin-top: 0.5rem;
}
.shift-col h3 {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  margin-bottom: 0.6rem;
}
.shift-arrow {
  color: var(--fg-muted);
  font-size: 1.6rem;
  align-self: center;
  user-select: none;
}
.shift-caption {
  color: var(--fg-muted);
  font-size: 0.9rem;
  margin-top: 1rem;
  text-align: center;
}

/* ---- Shell blocks ------------------------------------------------------ */
pre.shell {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--fg);
  overflow-x: auto;
  margin: 0;
}
pre.shell .prompt { color: var(--accent); user-select: none; margin-right: 0.3em; }
pre.shell .cmt    { color: var(--fg-muted); font-style: italic; }
pre.shell .out    { color: var(--fg-dim); }

/* ---- Features grid ----------------------------------------------------- */
/* Hard 3×3 at the page's max width — the nine feature cards line up in a
   clean square. Drops to a single column on phones; no intermediate
   two-column step, because 9 cards at 2-col lays out 4+4+1 with a lonely
   orphan row, which looks worse than a straight vertical list. */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 0.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1.1rem 1.2rem;
}
.feature-card h3 {
  color: var(--accent);
  font-size: 1rem;
  margin-bottom: 0.3rem;
}
.feature-card p {
  color: var(--fg-dim);
  font-size: 0.92rem;
  margin: 0;
}

/* ---- Audience ---------------------------------------------------------- */
.audience ul {
  padding-left: 1.2rem;
  color: var(--fg-dim);
  margin: 0 0 1.2rem;
}
.audience li { margin-bottom: 0.35rem; }
.audience .aside,
.getstarted .aside {
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-style: italic;
}

/* ---- Get started ------------------------------------------------------- */
.getstarted p + pre,
.getstarted p + .install-box { margin-top: 0.4rem; }
.getstarted p { margin-top: 1.2rem; margin-bottom: 0.4rem; color: var(--fg-dim); }
.getstarted p:first-of-type { margin-top: 0; }

/* ---- Footer ------------------------------------------------------------ */
.sitefooter {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--fg-muted);
  font-family: var(--mono);
  font-size: 0.82rem;
}
.sitefooter a {
  color: var(--fg-dim);
  border: none;
}
.sitefooter a:hover { color: var(--fg); }
.foot-row.small { margin-top: 0.4rem; font-size: 0.75rem; color: var(--fg-muted); }

/* ---- Responsive -------------------------------------------------------- */
@media (max-width: 720px) {
  .hero h1 { font-size: 2.2rem; }
  .tagline { font-size: 1.15rem; }
  .shift-grid {
    grid-template-columns: 1fr;
  }
  .shift-arrow {
    transform: rotate(90deg);
    margin: 0.2rem 0;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
  .install-box {
    font-size: 0.78rem;
  }
}
