/*
 * glogermatch.com. Phone width first, one breakpoint at 48rem.
 * The colours are the brandbook's, assets/brand/palette.json.
 */

/* Manrope, served from this site rather than from Google Fonts, so a visit
   sends nothing to a third party. OFL: assets/brand/Manrope-OFL.txt */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
    U+FEFF, U+FFFD;
}

:root {
  --primary: #9810ff;
  --accent: #c56bff;
  --ink: #251333;
  --background: #f7edff;
  --surface: #ffffff;
  --muted: #5e4a6e;
  --line: #e8dbf5;
  --on-ink: #f7edff;
  --on-ink-muted: #cbbad9;
  --on-ink-link: #e0b0ff;
  --gutter: 1rem;
  --wide: 68rem;
  --measure: 42rem;
  color-scheme: light;
}

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

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

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main {
  flex: 1 0 auto;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

h1,
h2,
h3 {
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.bar {
  max-width: calc(var(--wide) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

/* The logo carries its own margin inside the svg. */
.logo {
  margin-left: -0.35rem;
}

.logo img {
  width: auto;
  height: 2.75rem;
}

.lang {
  flex: none;
  padding: 0.4rem 0.95rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
}

.lang:hover {
  border-color: var(--primary);
}

/* Documents: the legal pages, support, deletion, 404 */

.doc {
  width: 100%;
  max-width: calc(var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 2rem var(--gutter) 3.5rem;
}

.doc h1 {
  margin: 0 0 0.75rem;
  font-size: 1.875rem;
}

.doc h2 {
  margin: 2.25rem 0 0.65rem;
  font-size: 1.25rem;
}

.doc p {
  margin: 0 0 0.85rem;
}

.doc ul,
.doc ol {
  margin: 0 0 1rem;
  padding-left: 1.4rem;
}

.doc li {
  margin-bottom: 0.45rem;
}

.doc li::marker {
  color: var(--primary);
  font-weight: 700;
}

.doc .edition {
  margin-bottom: 1.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Landing */

.landing section {
  padding: 2.75rem max(var(--gutter), calc((100% - var(--wide)) / 2));
}

.landing section > * {
  max-width: var(--measure);
}

.hero {
  background: var(--background);
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: 2.375rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 0 0 1rem;
  font-size: 1.125rem;
}

.hero .eyebrow {
  display: inline-block;
  margin-bottom: 1.25rem;
  padding: 0.2rem 0.8rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 800;
}

/* The web app is available now; Google Play still shows its future state. */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.web-cta {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  background: var(--primary);
  color: var(--surface);
  font-weight: 800;
  text-decoration: none;
}

.web-cta:hover {
  background: var(--ink);
}

/* The QR code to the phone is offered on a computer only: on a phone the web
   version above is already the way in. */
.phone-cta {
  display: none;
  min-height: 3rem;
  padding: 0.65rem 1.2rem;
  border: 1.5px solid var(--primary);
  border-radius: 999px;
  background: var(--surface);
  color: var(--primary);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.phone-cta:hover {
  border-color: var(--ink);
  color: var(--ink);
}

@media (min-width: 48rem) and (hover: hover) and (pointer: fine) {
  .phone-cta {
    display: inline-flex;
    align-items: center;
  }
}

.hero .soon {
  margin: 0;
  font-size: 1rem;
}

.soon span {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.75rem 0.65rem 1.1rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 800;
}

.soon small {
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--background);
  color: var(--primary);
  font-size: 0.8125rem;
  font-weight: 700;
}

.web-dialog {
  width: min(25rem, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1rem 3rem rgb(37 19 51 / 18%);
  text-align: center;
}

.web-dialog::backdrop {
  background: rgb(37 19 51 / 65%);
}

.web-dialog form {
  display: flex;
  justify-content: flex-end;
}

.dialog-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
}

.landing .web-dialog h2 {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.5rem;
}

.web-dialog p {
  margin: 0 0 1rem;
}

.web-dialog img {
  width: min(16rem, 100%);
  margin: 0 auto 1rem;
}

.landing h2 {
  margin: 0 0 1.25rem;
  font-size: 1.625rem;
}

.landing .steps ol {
  display: grid;
  gap: 1rem;
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  padding: 1.25rem;
  border-radius: 1.25rem;
  background: var(--background);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: var(--primary);
  color: var(--surface);
  font-weight: 800;
}

.visibility {
  background: var(--background);
}

.landing .cols {
  display: grid;
  gap: 1rem;
  max-width: none;
  margin-bottom: 1.5rem;
}

.cols > div {
  padding: 1.25rem 1.25rem 0.5rem;
  border-radius: 1.25rem;
  background: var(--surface);
}

.cols h3 {
  margin: 0 0 0.6rem;
  font-size: 1.125rem;
}

.cols ul {
  margin: 0 0 0.75rem;
  padding-left: 1.2rem;
}

.cols li {
  margin-bottom: 0.35rem;
}

.cols li::marker {
  color: var(--primary);
}

/* Footer */

.site-footer {
  background: var(--ink);
  color: var(--on-ink-muted);
  font-size: 0.9375rem;
}

.site-footer .bar {
  display: grid;
  gap: 1.25rem;
  padding-top: 2rem;
  padding-bottom: 2.25rem;
}

.site-footer a {
  color: var(--on-ink-link);
}

.site-footer a[aria-current="page"] {
  color: var(--on-ink);
  text-decoration: none;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer p {
  margin: 0 0 0.35rem;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.125rem;
  }

  .logo img {
    height: 3rem;
  }

  .doc {
    padding-top: 3rem;
    padding-bottom: 4.5rem;
  }

  .doc h1 {
    font-size: 2.5rem;
  }

  .doc h2 {
    font-size: 1.4rem;
  }

  .landing section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .landing h2 {
    font-size: 2rem;
  }

  .landing .steps ol {
    grid-template-columns: repeat(3, 1fr);
  }

  .landing .cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer .bar {
    grid-template-columns: 1fr auto;
    align-items: start;
  }
}

/* Wide enough for the mark to sit beside the hero's text rather than under it. */
@media (min-width: 64rem) {
  /* Positioned in the content box, so the mark ends where the header's
     language link does. */
  .hero {
    background-image: url("/assets/brand/svg/mark-primary.svg");
    background-origin: content-box;
    background-position: right center;
    background-repeat: no-repeat;
    background-size: 15rem;
  }
}
