/* Cascadia Code is the app font. This is a Latin-only subset (see CascadiaCode-LICENSE.txt). */
@font-face {
  font-family: "Cascadia Code";
  src: url("CascadiaCode.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}

/* Colours are the dark palette from flint-gpui/src/theme.rs. The page sits a step
   darker than the app, so the window in the screenshots stands out from it. */
:root {
  --page: #1f2228;
  --background: #23262e;
  --surface: #2b303b;
  --element: #383a40;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e1dde4;
  --muted: #adadad;
  --dim: #8a8a8f;
  --accent: #74c7ec;
  --accent-hover: #a5dcf4;
  --accent-ink: #051a27;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font: 13px/1.6 "Cascadia Code", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  -webkit-font-smoothing: antialiased;
}

main {
  display: grid;
  gap: 64px;
  max-width: 1088px;
  margin: 0 auto;
  padding-block: 88px 72px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

h1, h2, p { margin: 0; font: inherit; }
svg { display: block; flex-shrink: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ── Intro ─────────────────────────────────────────────── */

.intro { display: grid; justify-items: start; gap: 0; }
h1 { font-size: 32px; font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.tagline { margin-top: 12px; max-width: 46ch; color: var(--muted); font-size: 15px; text-wrap: balance; }

.downloads { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.downloads a {
  display: flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); color: var(--text);
  font-weight: 600; text-decoration: none;
}
.downloads a:hover { background: var(--element); }
.downloads a.primary { border-color: transparent; background: var(--accent); color: var(--accent-ink); }
.downloads a.primary:hover { background: var(--accent-hover); }
.downloads svg { width: 13px; height: 13px; fill: currentColor; }
.requirements { margin-top: 12px; color: var(--dim); font-size: 12px; }

/* ── The app window ──────────────────────────────────────
   Screenshots of the real app at 1470 × 924. Host names and
   addresses in them are made up. */

.shot { display: grid; gap: 12px; }
.frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--background);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 24px 64px rgba(0, 0, 0, 0.45);
}
.frame img { display: block; width: 100%; max-width: 100%; height: auto; }

/* Switching between the views, without a script. */
.shot input { position: absolute; opacity: 0; pointer-events: none; }
#view-hosts:not(:checked) ~ .frame .view-hosts,
#view-session:not(:checked) ~ .frame .view-session,
#view-split:not(:checked) ~ .frame .view-split,
#view-panel:not(:checked) ~ .frame .view-panel { display: none; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.tabs label {
  height: 28px; padding: 0 12px;
  border-radius: 5px;
  color: var(--dim); line-height: 28px;
  cursor: pointer; user-select: none;
}
.tabs label:hover { color: var(--text); }
#view-hosts:checked ~ .tabs [for="view-hosts"],
#view-session:checked ~ .tabs [for="view-session"],
#view-split:checked ~ .tabs [for="view-split"],
#view-panel:checked ~ .tabs [for="view-panel"] { background: var(--surface); color: var(--text); }
#view-hosts:focus-visible ~ .tabs [for="view-hosts"],
#view-session:focus-visible ~ .tabs [for="view-session"],
#view-split:focus-visible ~ .tabs [for="view-split"],
#view-panel:focus-visible ~ .tabs [for="view-panel"] { outline: 2px solid var(--accent); }

/* ── Flint and Termius ─────────────────────────────────── */

.compare { display: grid; gap: 16px; max-width: 720px; }
h2 { font-size: 15px; font-weight: 700; }
.table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
th, td { height: 32px; padding: 0 16px 0 0; border-bottom: 1px solid var(--border); text-align: left; font-weight: 400; }
thead th { height: 28px; color: var(--dim); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
tbody th { color: var(--muted); }
td:nth-child(2) { color: var(--text); font-weight: 600; }
td:nth-child(3) { color: var(--dim); }
td a { text-decoration-color: var(--dim); text-underline-offset: 3px; }
td a:hover { color: var(--accent); }
.note { color: var(--dim); font-size: 11px; }

/* A hint on hover or focus, without a script. */
.tip { position: relative; border-bottom: 1px dashed var(--dim); cursor: help; }
.tip::after {
  content: attr(data-tip);
  position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 1;
  width: max-content; max-width: min(280px, 70vw);
  padding: 6px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--element); color: var(--text);
  font-size: 12px; font-weight: 400; line-height: 1.5; white-space: normal;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(2px); pointer-events: none;
  transition: opacity 0.12s, transform 0.12s;
}
.tip:hover::after, .tip:focus-visible::after, .tip:focus::after { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .tip::after { transition: none; } }

@media (max-width: 560px) {
  main { gap: 48px; padding-block: 56px 48px; }
  h1 { font-size: 28px; }
  th, td { padding-right: 12px; }
}
