:root {
  --bg: #f5f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: #e3e3e6;
  --tag-bg: #f0f0f2;
  --radius: 18px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 8px 24px rgba(0,0,0,.05);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --card: #1c1c1e;
    --text: #f5f5f7;
    --muted: #98989d;
    --accent: #2997ff;
    --accent-hover: #4aa8ff;
    --border: #2c2c2e;
    --tag-bg: #2c2c2e;
    --shadow: 0 1px 3px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 96px 0 72px;
  background: radial-gradient(circle at 50% -20%, rgba(0,113,227,.12), transparent 60%);
}

@media (prefers-color-scheme: dark) {
  .hero { background: radial-gradient(circle at 50% -20%, rgba(41,151,255,.18), transparent 60%); }
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  margin-top: 18px;
  font-size: 1.2rem;
  color: var(--muted);
  font-weight: 400;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  padding: 24px 0 64px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,.08), 0 16px 40px rgba(0,0,0,.08);
}

.icon {
  width: 72px;
  height: 72px;
  margin-bottom: 16px;
  border-radius: 16px;
  display: block;
}

.card h2 {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.desc {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.98rem;
  flex-grow: 1;
}

.desc code {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 0.85em;
  background: var(--tag-bg);
  padding: 1px 6px;
  border-radius: 6px;
}

.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.tags li {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--tag-bg);
  padding: 4px 10px;
  border-radius: 999px;
}

.tags li.plat {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 980px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--border);
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.btn:hover { border-color: var(--accent); }

.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-appstore {
  display: inline-block;
  line-height: 0;
  transition: transform .15s ease;
}

.btn-appstore img { height: 40px; width: auto; display: block; }

.btn-appstore:hover { transform: scale(1.03); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

.fine { margin-top: 8px; font-size: 0.82rem; opacity: 0.8; }
