/* The website's one stylesheet. The colours and the two typefaces are the app's own (Palette.kt, Theme.kt):
   the fonts are served from this site, put beside the pages by build-site.sh, so a page asks no other server for anything. */

@font-face {
  font-family: "Fredoka";
  src: url("fonts/fredoka.ttf") format("truetype");
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  --ground: #101223;
  --vessel: #171a36;
  --surface: #1b1f3d;
  --surface-high: #2a2f5a;
  --outline: #3a4074;
  --outline-strong: #4b5294;
  --ink: #f2f3fa;
  --ink-muted: #aeb4d6;
  --blue: #7cc4ff;
  --amber: #ffc857;
  --mint: #6ee7b7;
  --lilac: #c4a7ff;
  --display: "Fredoka", ui-rounded, "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header and footer */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  font-size: 24px;
  text-decoration: none;
}

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

.top nav a {
  color: var(--ink-muted);
  font-weight: 700;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 999px;
}

.top nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.foot {
  margin-top: 72px;
  border-top: 1px solid var(--surface-high);
  padding-top: 28px;
  padding-bottom: 40px;
  color: var(--ink-muted);
  font-size: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.foot a {
  color: var(--ink-muted);
}

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

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

/* Home: the opening */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: center;
  padding-top: 40px;
  padding-bottom: 24px;
}

.hero h1 {
  font-size: clamp(40px, 6.4vw, 68px);
  letter-spacing: -0.01em;
}

.hero h1 em {
  font-style: normal;
  color: var(--amber);
}

.lead {
  margin-top: 20px;
  font-size: 21px;
  color: var(--ink-muted);
  max-width: 34em;
}

.soon {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding: 10px 18px 10px 14px;
  font-weight: 700;
}

.soon::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--mint);
  flex: none;
}

.picture {
  display: block;
  width: 100%;
  max-width: 400px;
  height: auto;
  margin: 0 auto;
}

.picture text {
  font-family: var(--display);
  font-weight: 600;
  text-anchor: middle;
  dominant-baseline: central;
}

.falling {
  animation: fall 5s ease-in-out infinite;
}

@keyframes fall {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(14px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .falling {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Home: what it does */

.section {
  padding-top: 56px;
}

.section h2 {
  font-size: clamp(28px, 4vw, 38px);
}

.section > p {
  margin-top: 12px;
  color: var(--ink-muted);
  max-width: 40em;
}

.cards {
  list-style: none;
  margin: 28px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.cards li {
  background: var(--surface);
  border-radius: 28px;
  padding: 24px;
}

.cards h3 {
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.cards h3::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--dot, var(--blue));
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18);
  flex: none;
}

.cards p {
  margin-top: 10px;
  color: var(--ink-muted);
  font-size: 17px;
}

.blue {
  --dot: var(--blue);
}

.amber {
  --dot: var(--amber);
}

.mint {
  --dot: var(--mint);
}

.lilac {
  --dot: var(--lilac);
}

.yours {
  margin-top: 56px;
  background: var(--vessel);
  border: 2px solid var(--outline);
  border-radius: 32px;
  padding: 32px;
}

.yours h2 {
  font-size: clamp(26px, 3.6vw, 34px);
}

.yours p {
  margin-top: 12px;
  color: var(--ink-muted);
  max-width: 42em;
}

.yours ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.yours li {
  background: var(--surface-high);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 16px;
}

/* A page of text: the privacy policy, and the page that is not there */

.text {
  max-width: 760px;
  padding-top: 32px;
}

.text h1 {
  font-size: clamp(34px, 5.4vw, 52px);
}

.text .dated {
  margin-top: 12px;
  color: var(--ink-muted);
}

.text h2 {
  font-size: 26px;
  margin-top: 44px;
}

.text h3 {
  font-size: 20px;
  margin-top: 24px;
}

.text p,
.text ul {
  margin-top: 14px;
}

.text ul {
  padding-left: 22px;
}

.text li + li {
  margin-top: 8px;
}

.text li::marker {
  color: var(--outline-strong);
}

.short {
  margin-top: 28px;
  background: var(--surface);
  border-radius: 28px;
  padding: 24px 28px;
}

.short h2 {
  margin-top: 0;
  font-size: 22px;
}

.short ul {
  margin-top: 12px;
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 16px;
  }

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

  .lead {
    font-size: 19px;
  }

  .yours {
    padding: 24px;
  }
}

@media (min-width: 821px) and (max-width: 980px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Field names and values on the docs page: long ones break anywhere rather than push the page wider than a phone. */
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.88em;
  color: var(--ink);
  background: var(--surface);
  border-radius: 6px;
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

.text li ul {
  margin-top: 8px;
}
