/*
 * Hey! This way: the website. Colours, corners and type follow the app (src/constants/theme.ts):
 * Bricolage Grotesque for headlines, Figtree for everything you read or tap.
 * The fonts are served from this site, so no page calls anyone else's servers.
 */

@font-face {
  font-family: 'Bricolage Grotesque';
  font-weight: 800;
  font-display: swap;
  src: url('fonts/bricolage-grotesque-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/figtree-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/figtree-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Figtree';
  font-weight: 700;
  font-display: swap;
  src: url('fonts/figtree-700.woff2') format('woff2');
}

:root {
  --ink: #1d1f33;
  --muted: #5b5e70;
  --line: #dadcd3;
  --ground: #f2f3ee;
  --paper: #ffffff;
  --sun: #ffcc33;
  --sun-tint: #fff4cc;
  --route: #2b50e0;
  --route-deep: #1d3bb3;
  --route-tint: #e3e9ff;
  --here: #1f9d6b;
  --here-ink: #13714c;
  --here-tint: #ddf5ea;
  --mint: #a8e6c2;

  --card: 20px;
  --gutter: 16px;
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --ui: 'Figtree', system-ui, -apple-system, 'Segoe UI', 'PingFang HK', 'Noto Sans HK', sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--route);
  text-underline-offset: 3px;
}
a:hover {
  color: var(--route-deep);
}
:focus-visible {
  outline: 3px solid var(--route);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}
p {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap.narrow {
  max-width: 720px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -60px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus {
  top: 12px;
  color: var(--paper);
}

/* ---- Top bar ---- */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand:hover {
  color: var(--ink);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current='page'] {
  background: var(--paper);
}

/* ---- Cards ---- */

.card {
  background: var(--paper);
  border-radius: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 20px;
}

/* ---- Landing: hero ---- */

.hero {
  display: grid;
  gap: 24px;
  align-items: center;
  margin-top: 8px;
  padding: 28px 20px;
  border-radius: 28px;
  border-bottom: 1px solid var(--line);
  background: var(--sun-tint);
}
.hero h1 {
  font-size: clamp(30px, 8.4vw, 60px);
}
.hero h1 span {
  display: block;
}
.lead {
  margin-top: 14px;
  max-width: 34em;
  font-size: clamp(17px, 2.4vw, 20px);
  line-height: 1.5;
}
.hero-art {
  justify-self: center;
  width: min(220px, 56vw);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}
.store {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 56px;
  padding: 8px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  line-height: 1.2;
}
a.store:hover {
  background: #000;
  color: var(--paper);
}
.store small {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.75;
}
.store b {
  font-size: 17px;
  font-weight: 700;
}
/* Until the app is in the store. */
.store.soon {
  background: transparent;
  color: var(--ink);
  border: 1.5px dashed rgba(29, 31, 51, 0.4);
}
.fine {
  margin-top: 14px;
  color: var(--muted);
  font-size: 15px;
}

/* ---- Landing: sections ---- */

.section {
  margin-top: 56px;
}
.section > h2 {
  font-size: clamp(26px, 5.4vw, 36px);
}
.section > .sub {
  margin-top: 8px;
  max-width: 38em;
  color: var(--muted);
}

.steps {
  display: grid;
  gap: 12px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 4px 14px;
  align-items: start;
}
/* The app's step badge. */
.num {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-weight: 800;
  font-size: 20px;
}
.steps li:last-child .num {
  background: var(--here);
}
.steps h3,
.points h3 {
  font-size: 21px;
  line-height: 1.2;
  padding-top: 2px;
}
.steps p,
.points p {
  color: var(--muted);
}

.shots {
  display: flex;
  gap: 12px;
  margin: 20px calc(var(--gutter) * -1) 0;
  padding: 0 var(--gutter) 8px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  -webkit-overflow-scrolling: touch;
}
.shots li {
  flex: none;
  width: min(72vw, 280px);
  scroll-snap-align: start;
}
.shots img {
  width: 100%;
  border-radius: 24px;
}

.uses {
  display: grid;
  gap: 10px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}
.uses li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--card);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  font-weight: 600;
}
.uses li::before {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 2px var(--ink);
}

.points {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}
.points .card {
  display: grid;
  gap: 6px;
  align-content: start;
}

.closing {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 56px;
  padding: 32px 20px;
  border-radius: 28px;
  background: var(--here-tint);
  text-align: center;
}
.closing img {
  width: 120px;
}
.closing h2 {
  font-size: clamp(26px, 5.4vw, 36px);
}
.closing .stores {
  justify-content: center;
  margin-top: 4px;
}

/* ---- Text pages: privacy, support ---- */

.page-head {
  margin-top: 24px;
}
.page-head h1 {
  font-size: clamp(34px, 8vw, 48px);
}
.page-head .lead {
  color: var(--muted);
}
.updated {
  margin-top: 10px;
  color: var(--muted);
  font-size: 15px;
}

.short {
  margin-top: 24px;
  background: var(--here-tint);
  border-bottom-color: transparent;
}
.short h2 {
  font-size: 22px;
}
.short ul {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.short li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-weight: 600;
}
.short li::before {
  content: '';
  width: 22px;
  height: 22px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--here)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-7.8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}

.prose {
  margin-top: 8px;
}
.prose h2 {
  margin-top: 40px;
  font-size: 26px;
}
.prose h3 {
  margin-top: 24px;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0;
}
.prose p,
.prose ul,
.prose ol {
  margin-top: 12px;
}
.prose ul,
.prose ol {
  padding-left: 22px;
}
.prose li + li {
  margin-top: 6px;
}

.contact {
  display: grid;
  gap: 14px;
  justify-items: start;
  margin-top: 24px;
  background: var(--sun-tint);
  border-bottom-color: transparent;
}
.contact h2 {
  font-size: 22px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--route);
  color: var(--paper);
  font-weight: 700;
  font-size: 17px;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.button:hover {
  background: var(--route-deep);
  color: var(--paper);
}
.small {
  color: var(--muted);
  font-size: 15px;
}

.prose .howto {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}
.prose .howto li {
  display: grid;
  gap: 2px;
  margin: 0;
}
.howto b {
  font-weight: 700;
}
.howto span {
  color: var(--muted);
}

.faq {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.faq details {
  border-radius: var(--card);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '';
  flex: none;
  width: 10px;
  height: 10px;
  margin-right: 4px;
  border-right: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: translateY(-3px) rotate(45deg);
}
.faq details[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}
.faq .answer {
  padding: 0 18px 18px;
  color: var(--muted);
}
.faq .answer p + p {
  margin-top: 10px;
}

.lost {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 40px;
  padding: 40px 20px;
  text-align: center;
}
.lost img {
  width: 150px;
}
.lost h1 {
  font-size: clamp(32px, 8vw, 44px);
}

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

.foot {
  margin-top: 64px;
  padding-top: 24px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}
.foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.foot a {
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* ---- Wider screens ---- */

@media (min-width: 720px) {
  :root {
    --gutter: 24px;
  }
  .hero {
    grid-template-columns: 1fr auto;
    gap: 40px;
    padding: 56px 48px;
  }
  /* Beside Mochi the headline has less room than the screen suggests: each sentence on one line. */
  .hero h1 {
    font-size: clamp(36px, 4.6vw, 60px);
  }
  .hero-art {
    width: clamp(180px, 22vw, 260px);
  }
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
  .steps li {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 20px;
    border-radius: var(--card);
    border-bottom: 1px solid var(--line);
    background: var(--paper);
  }
  .num {
    grid-row: auto;
  }
  .shots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    overflow: visible;
  }
  .shots li {
    width: auto;
  }
  .uses,
  .points {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  .closing {
    padding: 48px;
  }
  .section,
  .closing {
    margin-top: 72px;
  }
}

/* ---- A friend's link (link.html) ---- */

.link-page {
  display: grid;
  gap: 24px;
  padding-top: 16px;
  padding-bottom: 32px;
}
.link-state {
  display: grid;
  gap: 16px;
  justify-items: center;
  text-align: center;
}
.link-state[hidden],
.link-app[hidden],
.link-app [hidden] {
  display: none;
}
.link-state h1 {
  margin: 0;
}
.link-poster {
  margin: 0;
  width: 100%;
  max-width: 420px;
}
.link-poster img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(29, 31, 51, 0.14);
}
.link-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  width: 100%;
  max-width: 480px;
}
.link-cards img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.link-app {
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.link-app .stores {
  justify-content: center;
}
