/* Bismuth website. Colours, type and sizes come from the app (docs/mockups and the
   new tab page in the bismuth-browser repo): dark purple surfaces, thin lines, small
   radii, the system sans for everything, and Georgia only for display headings. */

:root {
  color-scheme: dark;
  --title: #160f1e; /* the app's title bar: header, footer, code wells */
  --rail: #1c1425; /* the app's sidebar: page background */
  --surface: #211829;
  --raised: #31243c;
  --selected: #382848;
  --line: #3a2b44;
  --line-2: #44344e;
  --accent: #b69bcf;
  --accent-hover: #c5afd9;
  --on-accent: #211629;
  --mark: #b497db;
  --focus: #bc9ce6;
  --text: #eae5ee;
  --text-2: #9b8bab;
  --faint: #62566d; /* lines and decoration only: too faint for text */
  --warn: #e7ac88;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --serif: Georgia, 'Times New Roman', serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  --side: 300px; /* the narrow left column, like the app's sidebar */
  --gap: 56px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--rail);
  color: var(--text);
  font: 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}

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

kbd {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  background: var(--title);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

p code,
li code {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--title);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

pre {
  margin: 10px 0 18px;
  padding: 12px 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--title);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.65;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.skip:focus {
  top: 8px;
}

/* ---- Header: the app's title bar ---- */

.bar {
  background: var(--title);
  border-bottom: 1px solid var(--line);
}

.bar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 50px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

/* The mark, exactly as the app draws it. */
.mark {
  display: grid;
  flex: none;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  width: 18px;
  height: 18px;
  transform: rotate(-12deg);
}

.mark > i {
  background: var(--mark);
  border-radius: 1px;
}

.mark > i:nth-child(2) {
  opacity: 0.6;
}

.mark > i:nth-child(3) {
  opacity: 0.4;
}

.word {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.bar nav {
  display: flex;
  gap: 4px;
}

.bar nav a {
  padding: 5px 10px;
  border-radius: 4px;
  color: var(--text-2);
  font-size: 13px;
  text-decoration: none;
}

.bar nav a:hover {
  background: var(--raised);
  color: var(--text);
}

.bar nav a[aria-current='page'] {
  background: var(--selected);
  color: var(--text);
}

/* ---- Type ---- */

.eyebrow {
  margin: 0;
  color: var(--text-2);
  font-size: 11px;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.display {
  margin: 12px 0 20px;
  font-family: var(--serif);
  font-size: 56px;
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 1.04;
}

.lead {
  max-width: 600px;
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

h2 {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Section numbers, like the app's "Focus · 01" pane label. */
h2 .n {
  display: block;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.text p {
  margin: 0 0 14px;
}

.label {
  margin: 30px 0 10px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  line-height: 1.5;
  text-transform: uppercase;
}

.quiet {
  color: var(--text-2);
}

/* ---- Buttons ---- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 5px;
  background: transparent;
  color: var(--text);
  font: 500 14px/1.2 var(--sans);
  text-decoration: none;
}

.btn:hover {
  background: var(--raised);
  color: var(--text);
}

.btn.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
}

.btn.primary:hover {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
  color: var(--on-accent);
}

.btn[aria-disabled='true'] {
  border-color: var(--line-2);
  background: transparent;
  color: var(--text-2);
  cursor: default;
}

.btn.small {
  min-height: 32px;
  padding: 0 11px;
  font-size: 13px;
}

.btn img {
  width: 20px;
  height: 20px;
}

/* ---- Home: hero ---- */

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

.hero .wrap {
  position: relative;
  z-index: 1;
}

.hero-text {
  max-width: 700px;
}

.get {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 30px;
}

.get-note {
  flex-basis: 100%;
  margin: 2px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.early {
  margin: 18px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

/* The new tab page's one decoration: the mark's tiles, drawn large and faint. */
.tiles {
  position: absolute;
  top: 44px;
  right: -150px;
  width: 400px;
  height: 400px;
  border: 1px solid #3f2d4d;
  transform: rotate(-13deg);
  box-shadow:
    -42px -42px 0 -41px #6a4e7b,
    -90px -90px 0 -89px #6a4e7b,
    -138px -138px 0 -137px #6a4e7b;
  pointer-events: none;
}

/* ---- Screenshots ---- */

.shot {
  margin: 0;
}

.shot a {
  display: block;
  border-radius: 6px;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line-2);
  border-radius: 6px;
  background: var(--title);
}

.shot figcaption {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 13px;
}

.shot-hero {
  padding-bottom: 72px;
}

.shot-hero .shot {
  margin: 0;
}

/* ---- Two columns, like the app's window: sidebar on the left, page on the right ---- */

.band {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.cols {
  display: grid;
  grid-template-columns: var(--side) minmax(0, 1fr);
  gap: var(--gap);
  align-items: start;
}

/* A list in the new tab page's style: a small label, then rows between thin lines. */
.rows {
  margin: 0;
  padding: 0;
  list-style: none;
}

.rows-label {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rows li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.rows strong {
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
}

.rows span {
  color: var(--text-2);
  font-size: 14px;
}

/* ---- FAQ ---- */

.qa {
  margin: 0;
}

.qa > div {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.qa > div:first-child {
  padding-top: 0;
}

.qa dt {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}

.qa dd {
  margin: 0;
}

.qa dd p {
  margin: 0 0 10px;
}

.qa dd p:last-child {
  margin-bottom: 0;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.addr {
  color: var(--text-2);
  font-size: 13px;
  user-select: all;
}

/* ---- Inner pages ---- */

.page-head {
  padding-top: 60px;
  padding-bottom: 40px;
}

.page-head .display {
  font-size: 48px;
}

.page-head .lead {
  font-size: 16px;
}

.notice {
  margin: 20px 0 0;
  color: var(--warn);
  font-size: 14px;
}

.band.tight {
  padding: 44px 0;
}

.band h2 {
  font-size: 20px;
}

.needs {
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
}

.needs h2 {
  color: var(--text);
}

.needs p {
  margin: 0 0 8px;
}

/* The certificate thumbprint, in groups of four so it's easy to compare. */
.thumb {
  display: block;
  margin: 8px 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 12.5px;
  word-spacing: 0.1em;
}

/* Download files: rows in a well, like the app's downloads popover. */
.files {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--title);
}

.file {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px 16px;
  align-items: center;
  padding: 14px 16px;
}

.file + .file {
  border-top: 1px solid var(--line);
}

.file-kind {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.file-name {
  display: block;
  color: var(--text-2);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.file-size {
  color: var(--text-2);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.file-sum {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.file-sum span {
  margin-right: 8px;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.files .empty {
  margin: 0;
  padding: 14px 16px;
  color: var(--warn);
  font-size: 14px;
}

/* Numbered steps, numbered like the app's workspace switcher. */
.steps {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps > li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 34px;
  counter-increment: step;
}

.steps > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.steps pre {
  margin-bottom: 6px;
}

.or {
  margin: 18px 0 10px;
  color: var(--text-2);
  font-size: 13px;
}

/* ---- Changelog ---- */

.release h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.release-meta p {
  margin: 8px 0 0;
  color: var(--text-2);
  font-size: 13px;
}

.tag {
  display: inline-block;
  margin-top: 12px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--selected);
  color: var(--text);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.notes > :first-child {
  margin-top: 0;
}

.notes p {
  margin: 0 0 12px;
}

.notes h3,
.notes h4,
.notes h5,
.notes h6 {
  margin: 26px 0 10px;
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.notes ul,
.notes ol {
  margin: 0 0 12px;
  padding-left: 20px;
}

.notes li {
  margin: 5px 0;
}

.notes li::marker {
  color: var(--text-2);
}

/* ---- Footer ---- */

.foot {
  padding: 30px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--title);
  color: var(--text-2);
  font-size: 13px;
}

.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}

.foot p {
  margin: 0;
}

.made {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

/* ---- Narrow screens ---- */

/* Like the app's new tab page, it hides rather than touch the text. */
@media (max-width: 1180px) {
  .tiles {
    display: none;
  }
}

@media (max-width: 900px) {
  :root {
    --gap: 26px;
  }

  .cols {
    grid-template-columns: minmax(0, 1fr);
  }

  .band {
    padding: 52px 0;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 16px;
  }

  .hero {
    padding: 44px 0 30px;
  }

  .display {
    font-size: 40px;
  }

  .page-head {
    padding-top: 40px;
    padding-bottom: 28px;
  }

  .page-head .display {
    font-size: 38px;
  }

  .lead {
    font-size: 16px;
  }

  .shot-hero {
    padding-bottom: 52px;
  }

  .file {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .file .btn {
    grid-column: 1 / -1;
    justify-self: start;
    margin-top: 8px;
  }
}
