/*
 * Maison Neue Extended is the app's font. Add its @font-face here only if the
 * licence covers web use; until then the system font is used.
 */
:root {
  --red: #e2231a;
  --red-dark: #c81e16;
  --text: #2b2b2b;
  --text-2: #5e5e5e;
  --surface: #f4f4f4;
  --font: "Maison Neue Extended", "Maison Neue", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  background: #ffffff;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

/* Mobile first: one centred column. */
.page {
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 24px max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 24px;
  text-align: center;
}
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.logo {
  display: block;
  width: 64px;
  height: auto;
  margin: 0 auto;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 900;
}
.sub {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
  color: var(--text-2);
}

/* Actions */
.actions {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.btn-primary {
  height: 52px;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-primary:hover {
  color: #ffffff;
  background: var(--red-dark);
}

.stores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}
.qr-card {
  margin: 0;
  padding: 16px 16px 12px;
  border-radius: 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.qr-card .label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #767676;
}
.qr {
  width: 168px;
  height: 168px;
  padding: 12px;
  border-radius: 12px;
  background: #ffffff;
  color: #1c1c1c;
}
.qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.qr-card:not([hidden]) + .badges {
  flex-direction: column;
}
.badges a {
  display: inline-flex;
}
.badges img {
  display: block;
  height: 40px;
  width: auto;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  column-gap: 24px;
  font-size: 12px;
  color: var(--text-2);
}
.footer a {
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* /legal/ pages */
.page-legal {
  max-width: 760px;
  text-align: left;
}
.page-legal .logo {
  margin: 0;
}
.page-legal .footer {
  justify-content: flex-start;
}
.legal {
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.legal h1 {
  margin: 8px 0 16px;
  font-size: 28px;
}
.legal h2 {
  margin: 40px 0 12px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 800;
}
.legal h3 {
  margin: 28px 0 8px;
  font-size: 17px;
  font-weight: 800;
}
.legal h4 {
  margin: 24px 0 8px;
  font-size: 15px;
  font-weight: 700;
}
.legal p,
.legal ul,
.legal ol {
  margin: 0 0 12px;
}
.legal ul,
.legal ol {
  padding-left: 24px;
}
.legal li {
  margin-bottom: 6px;
}
.legal hr {
  margin: 32px 0;
  border: 0;
  border-top: 1px solid var(--surface);
}
.legal a {
  color: var(--red);
}

/* On mobile only the top of the phone shows, so the buttons stay in view. */
.phone {
  width: 240px;
  height: clamp(180px, 34dvh, 340px);
  margin: 0 auto;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
}
.phone img {
  display: block;
  width: 100%;
  height: auto;
}

/* Desktop: text and actions next to the phone, sized on the window height. */
@media (min-width: 900px) {
  .page {
    max-width: 1000px;
    padding: 32px 48px 16px;
    gap: 0;
    text-align: left;
  }
  .logo {
    width: 72px;
    margin: 0;
  }
  h1 {
    font-size: 40px;
  }
  .sub {
    font-size: 18px;
  }

  .hero {
    display: grid;
    grid-template-columns: minmax(0, 480px) auto;
    grid-template-rows: 1fr auto auto 1fr;
    grid-template-areas:
      ".       phone"
      "intro   phone"
      "actions phone"
      ".       phone";
    justify-content: space-between;
    column-gap: 48px;
    row-gap: 40px;
  }
  .intro {
    grid-area: intro;
  }
  .actions {
    grid-area: actions;
  }
  .stores {
    justify-content: flex-start;
  }

  .phone {
    grid-area: phone;
    align-self: center;
    width: clamp(240px, calc((100dvh - 200px) * 0.58), 360px);
    height: auto;
    margin: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .footer {
    justify-content: flex-start;
  }
}
