@font-face {
  font-family: "Jost";
  src: url("assets/jost-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --red: #cf1149;
  --red-dark: #a30d39;
  --ink: #1a1a1a;
  --soft: #444;
  --note: #5a5a5a;
  --muted: #707070;
  --tint: #f7f1f3;
  --rule: #dcdcdc;
  --gutter: clamp(16px, 4vw, 40px);
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font: 17px/1.55 "Jost", "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.top,
main,
.bottom {
  width: min(1080px, 100% - 2 * var(--gutter));
  margin-inline: auto;
}

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

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 32px;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--red);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 21px;
  font-weight: 600;
  white-space: nowrap;
}

.brand img {
  display: block;
  width: 40px;
  height: 40px;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 15px;
}

.langs a {
  color: var(--muted);
  text-decoration: none;
}

/* reserves the bold width, so the tabs do not move when one becomes current */
.langs a::after {
  content: attr(data-label);
  display: block;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  font-weight: 600;
}

.langs a:hover {
  color: var(--ink);
}

/* one entry per language of build.py: page.py stops if one is missing */
[data-lang] .panel {
  display: none;
}

[data-lang="en"] #en,
[data-lang="fr"] #fr,
[data-lang="es"] #es,
[data-lang="de"] #de,
[data-lang="pt-BR"] #pt-BR,
[data-lang="ja"] #ja {
  display: contents;
}

[data-lang="en"] [hreflang="en"],
[data-lang="fr"] [hreflang="fr"],
[data-lang="es"] [hreflang="es"],
[data-lang="de"] [hreflang="de"],
[data-lang="pt-BR"] [hreflang="pt-BR"],
[data-lang="ja"] [hreflang="ja"] {
  color: var(--red);
  font-weight: 600;
}

/* the current panel has no box of its own: its parts and the shared video share one grid */
[data-lang] main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.intro {
  grid-row: 1;
  padding: clamp(32px, 6vw, 56px) 0 clamp(24px, 3vw, 32px);
}

.gets {
  grid-row: 2;
}

.demo {
  grid-row: 3;
}

.guides {
  grid-row: 4;
}

h1 {
  max-width: 24em;
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 34px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.source {
  margin: 0;
  color: var(--soft);
}

.source a {
  color: var(--red);
  font-weight: 500;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  white-space: nowrap;
}

.source a:hover {
  color: var(--red-dark);
}

.gets,
.guides {
  display: grid;
  column-gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.get {
  padding-bottom: 24px;
}

.cta {
  display: inline-block;
  padding: 13px 26px;
  background: var(--red);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s;
}

.cta:hover {
  background: var(--red-dark);
}

.req {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.demo {
  display: block;
  width: 100%;
  height: auto;
  margin: 16px 0 48px;
  background: #111;
}

.guides > .lead {
  grid-column: 1 / -1;
  margin: 0 0 28px;
  color: var(--soft);
  font-size: 18px;
}

h2 {
  margin: 0 0 20px;
  font-size: clamp(22px, 2.4vw, 26px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h3 {
  margin: 28px 0 10px;
  color: var(--red);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
}

p {
  margin: 0 0 10px;
}

p,
li {
  text-wrap: pretty;
}

ul,
ol {
  margin: 0;
  padding-left: 26px;
}

li {
  margin: 0 0 10px;
  padding-left: 4px;
}

li::marker {
  color: var(--red);
}

.steps li::marker {
  font-weight: 600;
}

.need {
  margin-bottom: 4px;
  padding: 18px 22px 8px;
  background: var(--tint);
}

.need h3 {
  margin-top: 0;
}

.note {
  margin: 2px 0 12px 30px;
  color: var(--note);
  font-size: 15px;
}

b {
  color: #000;
  font-weight: 600;
}

code {
  padding: 1px 4px;
  background: #f1f1f1;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.84em;
  overflow-wrap: anywhere;
}

kbd {
  padding: 0 4px;
  border: 1px solid #b5b5b5;
  font-family: inherit;
  font-size: 0.92em;
  white-space: nowrap;
}

.bottom {
  margin-top: 56px;
  padding: 16px 0 40px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 14px;
}

.bottom a {
  color: inherit;
  text-underline-offset: 3px;
}

.panel:lang(ja) {
  font-family: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "BIZ UDPGothic", Meiryo, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  line-break: strict;
}

.panel:lang(ja) h1,
.panel:lang(ja) h2 {
  line-height: 1.35;
  letter-spacing: 0;
  word-break: auto-phrase;
}

@media (min-width: 900px) {
  .gets,
  .guides {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 899px) {
  .guide + .guide {
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid var(--rule);
  }
}

@media (max-width: 520px) {
  .cta {
    display: block;
    text-align: center;
  }
}
