:root {
  --paper: #f5f2ea;
  --card: #fffdf8;
  --ink: #16151a;
  --muted: #66626b;
  --line: rgba(22, 21, 26, 0.12);
  --accent: #e4572e;
  --accent-ink: #b23a17;
  --on-accent: #ffffff;
  --live: #1f8a5b;
  --beta: #a66a00;
  --soon: #5a5fc7;
  --radius: 20px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131216;
    --card: #1c1b21;
    --ink: #f3f0ea;
    --muted: #a09ba6;
    --line: rgba(243, 240, 234, 0.14);
    --accent: #ff7a50;
    --accent-ink: #ff9a78;
    --on-accent: #1a0d07;
    --live: #5fd19c;
    --beta: #f0b54a;
    --soon: #a3a7ff;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

.narrow { max-width: 720px; }

a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent-ink); }

h1, h2, h3 {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }

p { margin: 0; }

/* Header */

header.site { padding: 20px 0; }

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.brand img { width: 34px; height: 34px; display: block; }

nav.links { display: flex; gap: 20px; font-size: 0.95rem; }
nav.links a { text-decoration: none; color: var(--muted); }
nav.links a:hover { color: var(--ink); }

/* Home */

.hero { padding: 56px 0 40px; }
.hero h1 .mark { color: var(--accent); }

.lede {
  margin-top: 20px;
  max-width: 34em;
  font-size: 1.2rem;
  color: var(--muted);
}

section { padding: 36px 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head span { color: var(--muted); font-size: 0.95rem; }

.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.app {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

a.app:hover { transform: translateY(-3px); border-color: var(--accent); color: inherit; }

.app-icon {
  width: 84px;
  height: 84px;
  border-radius: 22.5%;
  display: block;
  box-shadow: 0 0 0 1px var(--line);
}

.app-icon.pixel { image-rendering: pixelated; }

.app p { color: var(--muted); font-size: 0.98rem; }
.app .kind { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.app .go { margin-top: auto; padding-top: 6px; font-weight: 650; font-size: 0.95rem; }
.app .go::after { content: " \2192"; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 4px 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.pill.live { color: var(--live); }
.pill.beta { color: var(--beta); }
.pill.soon { color: var(--soon); }

.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 20px;
}

.about div { border-top: 2px solid var(--ink); padding-top: 14px; }
.about p { color: var(--muted); margin-top: 6px; font-size: 0.98rem; }

/* App pages */

.app-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px;
  padding: 44px 0 28px;
}

.app-hero .app-icon { width: 132px; height: 132px; }
.app-hero > div { flex: 1 1 320px; min-width: 0; }
.app-hero h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); margin-top: 14px; }

.about-game { max-width: 40em; margin-bottom: 28px; }
.about-game p { margin-top: 14px; font-size: 1.1rem; color: var(--muted); }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
}

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

.card p { color: var(--muted); margin-top: 8px; font-size: 0.98rem; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.button {
  display: inline-block;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 650;
  text-decoration: none;
  border: 1.5px solid var(--ink);
}

.button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.button.primary:hover { color: var(--on-accent); filter: brightness(1.06); }
.button:hover { border-color: var(--accent); }

.note { margin-top: 14px; font-size: 0.9rem; color: var(--muted); }
.note.center { text-align: center; margin-top: 20px; }

.shots {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 40px);
}

.shots figure { margin: 0; flex: 0 1 280px; min-width: 0; }
.shots figcaption { margin-top: 12px; text-align: center; color: var(--muted); font-size: 0.9rem; }

.phone {
  border-radius: clamp(20px, 5vw, 38px);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, 0.45);
}

.phone img { display: block; width: 100%; height: auto; }

/* Text pages (privacy, support) */

.doc { padding: 40px 0 20px; }
.doc h1 { font-size: clamp(2rem, 5.5vw, 3rem); }
.doc .updated { color: var(--muted); margin-top: 10px; font-size: 0.95rem; }
.doc h2 { font-size: 1.3rem; margin-top: 34px; }
.doc p, .doc ul { margin-top: 12px; }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: 8px; }
.crumb { font-size: 0.9rem; color: var(--muted); text-decoration: none; }
.crumb::before { content: "\2190  "; }

/* Footer */

footer.site {
  margin-top: 48px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

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

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

@media (max-width: 640px) {
  .shots {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -20px;
    padding: 0 20px 26px;
  }
  .shots figure { flex: 0 0 62%; scroll-snap-align: center; }
}

@media (max-width: 520px) {
  .hero { padding-top: 32px; }
  nav.links { gap: 14px; }
  .section-head { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .app { transition: none; }
  a.app:hover { transform: none; }
}
