/*
 * The site palette, taken from the app's.
 *
 * Same rule as src/renderer/src/styles.css: every colour goes through a
 * variable and there are no literals below this block. The values are the
 * app's own, so a screenshot dropped onto the page sits on the same greys it
 * was captured against rather than floating on a slightly different dark.
 *
 * The code samples use VS Code's Dark+ and Light+ directly, because the editor
 * they are showing does too.
 */
:root {
  --bg: #0f1115;
  --panel: #14171d;
  --elevated: #1a1e26;
  --sunken: #0c0f14;
  --border: #242933;
  --border-strong: #323a4a;

  --text: #e6e9ef;
  --dim: #8a92a3;
  --faint: #5c6473;
  --code-text: #cfd6e4;
  --on-accent: #fff;

  --accent: #4a8cf7;
  --accent-hover: #5c99f8;
  --green: #3fb950;
  --orange: #d29922;
  --red: #f85149;
  --purple: #a371f7;

  --shadow: rgba(0, 0, 0, 0.55);
  --glow: rgba(74, 140, 247, 0.16);
  --grid: rgba(74, 140, 247, 0.06);

  /* VS Code Dark+, for the code samples. */
  --c-comment: #6a9955;
  --c-keyword: #569cd6;
  --c-control: #c586c0;
  --c-string: #ce9178;
  --c-number: #b5cea8;
  --c-function: #dcdcaa;
  --c-property: #9cdcfe;
  --c-type: #4ec9b0;
  --c-plain: #d4d4d4;

  --mono: ui-monospace, "SF Mono", SFMono-Regular, "JetBrains Mono", Menlo, Consolas,
    "Noto Sans Mono", "Liberation Mono", "DejaVu Sans Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Inter,
    "Noto Sans", Cantarell, Ubuntu, sans-serif;

  --radius: 10px;
  --page: 1120px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f7f9;
    --panel: #ffffff;
    --elevated: #f1f3f6;
    --sunken: #eceff3;
    --border: #dfe3ea;
    --border-strong: #c6ccd8;

    --text: #1b1f27;
    --dim: #5b6472;
    --faint: #8a92a1;
    --code-text: #24292f;

    --accent: #1f6feb;
    --accent-hover: #1a5fd0;
    --green: #1a7f37;
    --orange: #9a6700;
    --red: #cf222e;
    --purple: #8250df;

    --shadow: rgba(20, 26, 38, 0.16);
    --glow: rgba(31, 111, 235, 0.1);
    --grid: rgba(31, 111, 235, 0.05);

    /* VS Code Light+. */
    --c-comment: #008000;
    --c-keyword: #0000ff;
    --c-control: #af00db;
    --c-string: #a31515;
    --c-number: #098658;
    --c-function: #795e26;
    --c-property: #001080;
    --c-type: #267f99;
    --c-plain: #000000;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

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

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  color: var(--accent-hover);
}

code,
kbd {
  font-family: var(--mono);
}

.wrap {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 24px;
}

/* --------------------------------------------------------------- header */

header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.bar {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo:hover {
  color: var(--text);
}
.logo-badge {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--elevated);
  border: 1px solid var(--border-strong);
  color: var(--accent);
}
.logo em {
  font-style: normal;
  color: var(--accent);
}

nav {
  display: flex;
  gap: 22px;
  margin-left: auto;
  font-size: 14px;
}
nav a {
  color: var(--dim);
}
nav a:hover {
  color: var(--text);
}

@media (max-width: 720px) {
  nav {
    display: none;
  }
}

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 88px 0 0;
  overflow: hidden;
}

/*
 * A faint grid behind the hero, fading out downward. Cheap, and it reads as
 * an oscilloscope rather than as decoration.
 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 100% 34px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 34px 100%;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  pointer-events: none;
}

/*
 * The hero is centred; every section below it is left-aligned.
 *
 * Deliberate rather than inconsistent. A screenshot this wide has to sit in
 * the middle of the page, and copy hanging off its left edge above it reads as
 * a mistake — so the whole hero centres and the rest of the page keeps its
 * left rail.
 */
.hero-inner {
  position: relative;
  max-width: 780px;
  text-align: center;
}
.hero-inner .lede {
  margin-left: auto;
  margin-right: auto;
}
.hero-inner .actions {
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--elevated);
  font-size: 12.5px;
  color: var(--dim);
  margin-bottom: 22px;
}
.eyebrow b {
  color: var(--text);
  font-weight: 600;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(34px, 5.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 680;
}
h1 em {
  font-style: normal;
  color: var(--accent);
}

.lede {
  margin: 0 0 34px;
  font-size: clamp(17px, 2vw, 19px);
  color: var(--dim);
  max-width: 620px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 550;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.btn.primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: 0 6px 22px var(--glow);
}
.btn.primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}
.btn.ghost {
  background: var(--elevated);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn.ghost:hover {
  border-color: var(--dim);
  color: var(--text);
}

.platforms {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--faint);
}

/* ------------------------------------------------------ the screenshot */

.shot-wrap {
  position: relative;
  margin-top: 58px;
  /* Wider than the text column: the detail in it is the point. */
  max-width: 1240px;
}

/*
 * A pool of accent light under the window, so it sits on the page rather than
 * being pasted onto it. Behind the image, and ignoring pointer events, so it
 * can be as large as it likes.
 */
.shot-wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6%;
  width: 78%;
  height: 70%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, var(--glow), transparent 70%);
  filter: blur(46px);
  pointer-events: none;
}

.shot {
  position: relative;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 32px 90px var(--shadow), 0 4px 14px var(--shadow);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  /*
   * The window is a screenshot of a dark app. On the light theme it would
   * otherwise sit as a black slab; a hairline inset keeps its edge readable
   * against a white page without touching the pixels.
   */
  border-radius: 11px;
}

/*
 * The bottom of the screenshot fades into the page rather than stopping on a
 * hard line, which is what stops a tall image from feeling cropped.
 */
.shot::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 22%;
  background: linear-gradient(transparent, var(--bg));
  pointer-events: none;
}

@media (max-width: 720px) {
  .shot-wrap {
    margin-top: 40px;
  }
  .shot {
    border-radius: 8px;
  }
}

/* ------------------------------------------------------------- sections */

section {
  padding: 76px 0;
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 660px;
  margin-bottom: 40px;
}
h2 {
  margin: 0 0 12px;
  font-size: clamp(25px, 3.2vw, 33px);
  line-height: 1.2;
  letter-spacing: -0.022em;
  font-weight: 640;
}
.section-head p {
  margin: 0;
  color: var(--dim);
  font-size: 16.5px;
}

h3 {
  margin: 0 0 7px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ----------------------------------------------------------- the wire */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

.points {
  display: grid;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.points li {
  padding-left: 30px;
  position: relative;
}
.points li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}
.points p {
  margin: 0;
  color: var(--dim);
  font-size: 14.5px;
}

/* ------------------------------------------------------------ terminal */

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 18px 48px var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  background: var(--elevated);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--dim);
}
.dots {
  display: flex;
  gap: 6px;
}
.dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.panel-body {
  margin: 0;
  padding: 16px 18px;
  background: var(--sunken);
  font-family: var(--mono);
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--code-text);
  overflow-x: auto;
  tab-size: 2;
}

/* The wire log's own vocabulary, reused so the sample reads like the app. */
.w-time {
  color: var(--faint);
}
.w-dns {
  color: var(--purple);
}
.w-tcp {
  color: var(--accent);
}
.w-tls {
  color: var(--green);
}
.w-send {
  color: var(--orange);
}
.w-recv {
  color: var(--text);
}
.w-note {
  color: var(--faint);
}

/* Syntax colours for the script sample. */
.k {
  color: var(--c-keyword);
}
.ct {
  color: var(--c-control);
}
.s {
  color: var(--c-string);
}
.n {
  color: var(--c-number);
}
.f {
  color: var(--c-function);
}
.p {
  color: var(--c-property);
}
.t {
  color: var(--c-type);
}
.cm {
  color: var(--c-comment);
}
.pl {
  color: var(--c-plain);
}
/* The app's own marking: `sw` is the API you can call. */
.api {
  color: var(--accent);
}

/* -------------------------------------------------------------- grids */

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 620px) {
  .cards {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card p {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}
.card .ico {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--elevated);
  border: 1px solid var(--border);
  color: var(--accent);
  margin-bottom: 14px;
}

/* --------------------------------------------------------------- specs */

.specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 760px) {
  .specs {
    grid-template-columns: repeat(2, 1fr);
  }
}
.spec {
  background: var(--panel);
  padding: 22px 20px;
}
.spec b {
  display: block;
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}
.spec span {
  font-size: 13px;
  color: var(--dim);
}

/* ------------------------------------------------------------ download */

.download {
  text-align: center;
}
.download .section-head {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.oses {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.os {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-width: 168px;
  padding: 24px 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
.os:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-2px);
}
.os svg {
  color: var(--dim);
}
.os:hover svg {
  color: var(--accent);
}
.os b {
  font-size: 14.5px;
  font-weight: 550;
}
.os span {
  font-size: 12px;
  color: var(--faint);
  font-family: var(--mono);
}

/* -------------------------------------------------------------- footer */

footer {
  border-top: 1px solid var(--border);
  padding: 34px 0 46px;
  color: var(--faint);
  font-size: 13.5px;
}
.foot {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.foot nav {
  display: flex;
  margin-left: auto;
}

/*
 * The beta notice. Warm rather than alarming — it is a caveat, not an error,
 * and a red banner would read as something being broken.
 */
.notice {
  max-width: 620px;
  margin: 0 auto 30px;
  padding: 13px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--dim);
  font-size: 13.5px;
  line-height: 1.55;
}
.notice b {
  color: var(--orange);
  font-weight: 600;
}

/* ------------------------------------------------------ capability strip */

/*
 * The rare capabilities, straight after the hero.
 *
 * SOAP and raw sockets are the reason people keep SoapUI and netcat installed
 * next to a modern client, and load testing is the reason they keep k6. None
 * of that survives being the fourth card in a grid two screens down.
 */
.strip {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--panel);
}
.strip ul {
  display: grid;
  /*
   * Six now, since REST joined the list.
   *
   * It was five, and REST was deliberately absent because the strip exists to
   * show the rare things. That was the wrong read: omitting the ordinary case
   * does not imply "and obviously the ordinary case too", it implies the tool
   * might not do it — someone arriving with API documentation could take this
   * for a SOAP and sockets tool. So the common case leads, and the unusual ones
   * follow it.
   */
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.strip li {
  padding: 22px 20px 22px 0;
}
.strip b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}
.strip b::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 8px;
  vertical-align: 2px;
}
.strip span {
  font-size: 12.5px;
  color: var(--dim);
}

@media (max-width: 900px) {
  .strip ul {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 480px) {
  .strip ul {
    grid-template-columns: 1fr;
  }
  .strip li {
    padding: 14px 0;
  }
}

/* ------------------------------------------------------------ load shot */

/* Full width, so the figures in it are actually readable. */
.shot.wide {
  margin-bottom: 34px;
}

/* The points under a full-width figure, rather than beside it. */
.points.three {
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
  margin-bottom: 38px;
}
@media (max-width: 820px) {
  .points.three {
    grid-template-columns: 1fr;
  }
}

/* Inside a section rather than under the hero: no fade, lighter shadow. */
.shot.flat {
  box-shadow: 0 12px 34px var(--shadow);
}
.shot.flat::after {
  display: none;
}

/* -------------------------------------------------------------- figures */

/*
 * A screenshot with something said about it.
 *
 * The caption is not the alt text and not a second headline. Each one names a
 * figure that is actually in the image — 144 ms, 59 days, thirteen tabs — so
 * the claim in the prose above can be checked against the picture rather than
 * taken on trust. A caption that only says "Sendwire showing the Timing tab"
 * would be describing the obvious and proving nothing.
 */
figure {
  margin: 36px 0 0;
}
figure .shot.wide {
  margin-bottom: 0;
}
figcaption {
  margin: 13px 0 0;
  max-width: 760px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--faint);
}
figcaption b {
  color: var(--dim);
  font-weight: 600;
}
figcaption code {
  font-size: 12.5px;
  color: var(--dim);
}

/* A figure standing beside prose rather than above it. */
.split figure {
  margin: 0;
}

/* ---------------------------------------------------------------- docs */

/*
 * Links into the documentation, one line each.
 *
 * The page can only assert things; these pages are where someone checks. Put
 * last because that is when the question changes from "what is this" to "how
 * would I actually do the thing I came here for".
 */
.doclinks {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (max-width: 860px) {
  .doclinks {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .doclinks {
    grid-template-columns: 1fr;
  }
}

.doclink {
  display: block;
  padding: 18px 20px;
  background: var(--panel);
  color: var(--text);
  transition: background 0.15s;
}
.doclink:hover {
  background: var(--elevated);
  color: var(--text);
}
.doclink b {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 3px;
}
.doclink:hover b {
  color: var(--accent);
}
.doclink span {
  font-size: 13px;
  color: var(--dim);
}
