/* Caveat Bold, SIL Open Font License (fonts/OFL-Caveat.txt). Subset to the
   letters in "Loyalee", so it only covers the logo text. */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/caveat-bold-loyalee.woff") format("woff");
  unicode-range: U+4c, U+61, U+65, U+6c, U+6f, U+79;
}

/* DM Serif Display, SIL Open Font License (fonts/OFL-DMSerifDisplay.txt).
   Latin subset, for the large headings, like the page titles in the apps. */
@font-face {
  font-family: "DM Serif Display";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/dm-serif-display-latin.woff2") format("woff2");
}

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #fff3f2;
  --section: #fafbfc;
  --text: #1d1b1a;
  --text-muted: #5c5550;
  --border: #e5e7eb;
  /* Like the apps: a dark outline and shadow mean "you can click this",
     information gets a light outline and a light gray shadow. */
  --tap-border: var(--text);
  --shadow-color: var(--text);
  --info-shadow: #dedad5;
  --divider: #eff0f2;
  --accent: #f0605d;
  --accent-text: #ffffff;
  --admin: #7fd0f3;
  --admin-soft: #eff8fd;
  --radius: 18px;
  --shadow: 3px 3px 0 var(--info-shadow);
  --max: 1080px;
  --display: "DM Serif Display", Georgia, "Times New Roman", serif;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171514;
    --surface: #211e1c;
    --surface-alt: #2a2320;
    --text: #f4efeb;
    --text-muted: #b8aea7;
    --border: #403b38;
    /* --tap-border and --shadow-color follow --text, so they turn light. */
    --info-shadow: #3a3532;
    --divider: #332e2b;
    --section: #1c1917;
    --admin-soft: #1d2c35;
    --accent: #ff7a76;
    --accent-text: #1d1b1a;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1.0625rem;
}

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

a {
  color: inherit;
}

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

/* Header */
.site-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--divider);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: 2.1rem;
  line-height: 1;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-nav {
  display: flex;
  gap: 20px;
  font-weight: 600;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover {
  text-decoration: underline;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  padding: 6px 14px;
  border: 1.5px solid var(--tap-border);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 2px 2px 0 var(--shadow-color);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
}

.lang-switch:hover {
  background: var(--surface-alt);
}

/* Buttons */
.button {
  display: inline-block;
  padding: 12px 22px;
  border: 1.5px solid var(--tap-border);
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  background: var(--surface);
  box-shadow: 3px 3px 0 var(--shadow-color);
  transition: background-color 0.15s ease, transform 0.1s ease,
    box-shadow 0.1s ease;
}

.button:hover {
  background: var(--section);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--shadow-color);
}

.button:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow-color);
}

.button.primary {
  background: var(--accent);
  color: var(--accent-text);
}

.button.primary:hover {
  background: var(--accent);
}

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

/* Hero */
.hero {
  padding: 72px 0 88px;
}

.hero .wrap {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 700;
  background: var(--surface-alt);
}

h1,
h2 {
  font-family: var(--display);
  /* The font has one weight, so the browser must not fake a bold one. */
  font-weight: 400;
}

h1 {
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  line-height: 1.08;
  margin: 18px 0 16px;
}

h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  line-height: 1.15;
  margin: 0 0 12px;
}

h3 {
  font-size: 1.2rem;
  margin: 0 0 6px;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 34em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.hero-art {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 16px;
  transform: rotate(2deg);
}

.aside {
  margin: 24px 0 0;
  color: var(--text-muted);
}

.eyebrow + h2 {
  margin-top: 14px;
}

/* App screenshots, two phones with the second one a bit lower */
.phones {
  display: flex;
  justify-content: center;
  gap: 4%;
  padding-bottom: 48px;
}

.phones img {
  width: 48%;
  max-width: 260px;
}

.phones img:last-child {
  transform: translateY(48px);
}

@media (prefers-color-scheme: dark) {
  /* The phone frame is black, so outline it on the dark background */
  .phones img {
    filter: drop-shadow(0 0 1px var(--text));
  }
}

/* Sections */
section {
  padding: 80px 0;
}

section.alt {
  background: var(--section);
  border-top: 1px solid var(--divider);
  border-bottom: 1px solid var(--divider);
}

section.business {
  --accent: var(--admin);
  --accent-text: #1d1b1a;
  --surface-alt: var(--admin-soft);
}

.section-intro {
  color: var(--text-muted);
  max-width: 38em;
  margin: 0 0 36px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.steps .card::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 48px;
  align-items: center;
}

.split .hero-art {
  transform: rotate(-2deg);
  max-width: 380px;
}

.features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 14px;
}

.features li {
  padding-left: 34px;
  position: relative;
}

.features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--admin);
}

.offer {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
}

.offer strong {
  display: block;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.offer p {
  margin: 0;
  color: var(--text-muted);
}

.features strong {
  display: inline;
}

.tag {
  display: inline-block;
  margin: 0 4px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: 2px;
  background: var(--surface-alt);
}

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

.download {
  margin-top: 40px;
  text-align: center;
}

.download .actions {
  justify-content: center;
  margin-top: 12px;
}

.button.store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  justify-content: center;
}

.button.store svg {
  width: 22px;
  height: 22px;
}

/* Contact */
.contact {
  text-align: center;
}

.contact .section-intro {
  margin-left: auto;
  margin-right: auto;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 6px;
  font-size: 1.15rem;
  font-weight: 600;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--divider);
  padding: 28px 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer nav {
  display: flex;
  gap: 18px;
}

/* Legal pages */
.legal {
  max-width: 760px;
  padding: 32px 20px 72px;
}

.legal h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
}

.legal h2 {
  font-size: 1.4rem;
  margin-top: 36px;
}

.legal .updated {
  color: var(--text-muted);
}

.legal table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
}

.legal th,
.legal td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--text-muted);
}

.legal .table-scroll {
  overflow-x: auto;
}

@media (max-width: 1000px) and (min-width: 821px) {
  .steps-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .hero .wrap,
  .split {
    grid-template-columns: 1fr;
  }

  .hero-art,
  .split .hero-art {
    max-width: 300px;
    margin: 0 auto;
  }

  .split .hero-art,
  .split .phones {
    order: -1;
  }

  .phones {
    max-width: 440px;
    margin: 0 auto;
  }

  .steps,
  .steps-4 {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
