:root {
  --accent: #e8762b;
  --accent-dark: #c85f1a;
  --bg: #ffffff;
  --bg-alt: #f6f4f1;
  --text: #22242a;
  --text-muted: #5c606b;
  --border: #e3e0db;
  --card: #ffffff;
  --shadow: 0 1px 3px rgba(20, 18, 14, 0.08), 0 4px 16px rgba(20, 18, 14, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17181c;
    --bg-alt: #1f2127;
    --text: #e8e8ea;
    --text-muted: #9b9ea8;
    --border: #2e3138;
    --card: #22242b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

a:hover {
  color: var(--accent-dark);
}

img {
  max-width: 100%;
}

.container {
  max-width: 60rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

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

header.site .container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

header.site img {
  width: 28px;
  height: 28px;
}

header.site .wordmark {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}

header.site nav {
  margin-left: auto;
  display: flex;
  gap: 1.1rem;
}

header.site nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

header.site nav a:hover {
  color: var(--accent);
}

/* Hero */
.hero {
  text-align: center;
  padding: 3.5rem 0 3rem;
}

.hero img.appicon {
  width: 112px;
  height: 112px;
}

.hero h1 {
  font-size: 2.6rem;
  margin: 0.8rem 0 0.3rem;
  letter-spacing: -0.02em;
}

.hero .tagline {
  font-size: 1.3rem;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.hero .sub {
  color: var(--text-muted);
  max-width: 34rem;
  margin: 0 auto 1.6rem;
}

.hero .badge img {
  height: 64px;
}

/* Sections */
section {
  padding: 2.8rem 0;
}

section.alt {
  background: var(--bg-alt);
}

h2 {
  font-size: 1.7rem;
  margin: 0 0 1.4rem;
  letter-spacing: -0.01em;
}

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}

.feature {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.feature h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* Screenshot gallery */
.gallery {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.8rem;
}

.gallery img {
  height: 340px;
  width: auto;
  max-width: none;
  flex: none;
  scroll-snap-align: center;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Gesture illustrations (converted from the app's in-session help drawables) */
.gesture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1.2rem;
  margin: 1rem 0;
}

.gesture {
  margin: 0;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.gesture svg {
  width: 130px;
  height: 104px;
}

.gesture figcaption {
  color: var(--text-muted);
  font-size: 0.92rem;
}

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

@media (max-width: 900px) {
  .gesture-grid.four {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .gesture-grid.four {
    grid-template-columns: 1fr;
  }
}

.g-hand {
  fill: var(--text);
}

.g-cuff {
  fill: var(--text-muted);
}

.g-accent {
  fill: var(--accent);
}

/* Prose pages (privacy, terms, support) */
main.prose {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 3.5rem;
}

main.prose h1 {
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.2rem;
}

main.prose .date {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0;
}

main.prose h2 {
  font-size: 1.25rem;
  margin: 1.8rem 0 0.5rem;
}

main.prose li {
  margin: 0.3rem 0;
}

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

footer.site .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.4rem;
  align-items: center;
}

footer.site nav {
  display: flex;
  gap: 1.1rem;
  margin-left: auto;
}

footer.site a {
  color: var(--text-muted);
}

footer.site a:hover {
  color: var(--accent);
}

/* 404 */
.notfound {
  text-align: center;
  padding: 5rem 1.25rem;
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.1rem;
  }

  .gallery img {
    height: 260px;
  }

  header.site nav {
    gap: 0.8rem;
  }
}
