:root {
  --bg: #ffffff;
  --fg: #16181c;
  --muted: #7c848d;
  --link: #16181c;
  --link-hover: #0a84ff;
  --border: #e3e6ea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f12;
    --fg: #e9ebee;
    --muted: #8b939c;
    --link: #e9ebee;
    --link-hover: #4c9dff;
    --border: #262b32;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(6.5rem, 19vw, 11.5rem) 1.25rem;
}

main {
  width: 100%;
  max-width: 820px;
  text-align: center;
}

/* Publisher wordmark */
.intro {
  margin-bottom: clamp(7rem, 16vw, 11rem);
}

.intro h1 {
  margin: 0;
  font-size: clamp(5.25rem, 20vw, 8.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

/* App grid */
.apps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: clamp(3.5rem, 8vw, 5rem) 2.5rem;
  justify-items: center;
}

.app {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.app-icon {
  width: 148px;
  height: 148px;
  border-radius: 33px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}

.app-icon:hover { transform: translateY(-4px); }

.app-name {
  margin: 0.9rem 0 0.15rem;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.app-sub {
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* App Store download button (tapbots-style) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1.15rem;
  border-radius: 980px;
  background: var(--fg);
  color: var(--bg);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.btn:hover { transform: translateY(-1px); opacity: 0.88; }

/* Secondary button: border only (GitHub) */
.btn-secondary {
  background: transparent;
  color: var(--link);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  opacity: 1;
  color: var(--link-hover);
  border-color: var(--link-hover);
}

/* Button stack under each app */
.app-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.app-links a {
  color: var(--link);
  text-decoration: none;
  font-weight: 600;
}

.app-links a:hover { color: var(--link-hover); }

.dot { color: var(--muted); }

.soon {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

/* Per-app social handles (only shown for apps that have them) */
.app-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
  font-size: 0.82rem;
}

.app-social a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.app-social a:hover { color: var(--link-hover); }

/* Footer credit */
.site-footer {
  margin-top: clamp(4rem, 10vw, 6rem);
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

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

/* Mobile: single column with larger icons */
@media (max-width: 520px) {
  .apps {
    grid-template-columns: 1fr;
    gap: 5.5rem;
  }

  .app-icon {
    width: 176px;
    height: 176px;
    border-radius: 39px;
  }
}
