/* Get the Realrun app: go.realrun.app.
 *
 * Without JavaScript (and on desktop or an undetected platform) the page shows
 * the desktop layout: both badges, each with its QR code. src/page.ts sets
 * data-layout="phone" and data-badges on <html> for iPhone and Android. */

:root {
  --ink: #0a0a0b;
  --muted: #6b7280;
  --hairline: #e5e7eb;
  --paper: #ffffff;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--paper); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-align: center;
}

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

.page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  max-width: 460px;
  padding: 48px 20px 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo { display: block; height: 36px; width: auto; margin-bottom: 40px; }

.title {
  margin: 0;
  font-size: 36px;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subtitle { margin: 14px 0 0; font-size: 18px; line-height: 1.45; color: var(--muted); }

.stores {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px;
}

.store { display: flex; flex-direction: column; align-items: center; gap: 16px; }

.qr > img { display: block; width: 160px; height: 160px; }

div.qr {
  padding: 14px;
  border: 1px solid var(--hairline);
  border-radius: 16px;
  line-height: 0;
  background: var(--paper);
}

.scan-hint { margin: 20px 0 0; font-size: 15px; line-height: 1.4; color: var(--muted); }

.badge { display: block; line-height: 0; }
.badge-appStore { border-radius: 10px; }
.badge-appStore img { display: block; height: 48px; width: auto; }

/* The Google Play artwork has clear space baked in; crop it to the badge. */
.badge-googlePlay { width: 161.14px; height: 48px; overflow: hidden; border-radius: 8px; }
.badge-googlePlay img { display: block; height: 71.43px; width: auto; margin: -11.71px 0 0 -11.71px; }

@media (max-width: 600px) {
  .qr { display: none; }
}

/* ── Phone (iPhone / Android) ─────────────────────────────────────────── */

[data-layout="phone"] .qr { display: none; }

[data-layout="phone"] .page { padding: 0 20px 72px; }

[data-layout="phone"] .logo { height: 32px; }

[data-layout="phone"] .title { font-size: 30px; line-height: 1.15; letter-spacing: -0.025em; }

[data-platform="android"] .title { letter-spacing: -0.02em; }

[data-layout="phone"] .subtitle { margin-top: 12px; max-width: 320px; font-size: 17px; }

[data-platform="android"] .subtitle { max-width: 330px; }

[data-layout="phone"] .badge-appStore { border-radius: 12px; }
[data-layout="phone"] .badge-appStore img { height: 56px; }

[data-layout="phone"] .badge-googlePlay { width: 188px; height: 56px; border-radius: 9px; }
[data-layout="phone"] .badge-googlePlay img { height: 83.33px; margin: -13.67px 0 0 -13.67px; }

[data-badges]:not([data-badges~="appStore"]) .store-appStore { display: none; }
[data-badges]:not([data-badges~="googlePlay"]) .store-googlePlay { display: none; }

/* ── "Open in Realrun" (phones, on links that name a screen) ──────────── */

.open-in-app {
  margin-top: 16px;
  min-width: 188px;
  height: 56px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

.open-in-app[hidden] { display: none; }
