/* Pixel Island — iOS-styled marketing site
   Design tokens follow Apple HIG: system font stack, semantic colors,
   frosted materials, 18-22px card radii, automatic dark mode. */

:root {
  color-scheme: light dark;
  --bg: #f2f2f7;               /* systemGroupedBackground */
  --bg-card: #ffffff;          /* secondarySystemGroupedBackground */
  --label: #000000;
  --secondary: #3c3c4399;      /* secondaryLabel */
  --tertiary: #3c3c434d;
  --separator: #3c3c4349;
  --tint: #007aff;             /* systemBlue */
  --hero-a: #1a0d38;
  --hero-b: #4d1a6e;
  --radius: 22px;
  --radius-s: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-card: #1c1c1e;
    --label: #ffffff;
    --secondary: #ebebf599;
    --tertiary: #ebebf54d;
    --separator: #54545899;
    --tint: #0a84ff;
  }
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--label);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Frosted nav (iOS navigation bar) ── */
nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 10px max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--separator);
}
nav .app-icon { width: 30px; height: 30px; border-radius: 7px; }
nav .title { font-weight: 700; font-size: 17px; letter-spacing: -0.2px; }
nav .links { margin-left: auto; display: flex; gap: 18px; }
nav a { color: var(--tint); text-decoration: none; font-size: 15px; }

main { max-width: 760px; margin: 0 auto; padding: 0 20px 60px; }

/* ── Hero ── */
.hero {
  margin: 24px 0 32px;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--hero-a), var(--hero-b));
  color: #fff;
  padding: 44px 28px 0;
  text-align: center;
  overflow: hidden;
}
.hero .app-icon { width: 92px; height: 92px; border-radius: 22px;
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.35); }
.hero h1 { font-size: clamp(30px, 6vw, 42px); font-weight: 800;
  letter-spacing: -0.8px; margin-top: 18px; }
.hero p.tagline { font-size: 18px; opacity: 0.85; margin: 10px auto 22px; max-width: 460px; }
.store-badge {
  display: inline-block; background: #fff; color: #000;
  border-radius: 999px; padding: 12px 26px; font-weight: 600;
  text-decoration: none; font-size: 16px; margin-bottom: 34px;
}
.hero .screens { display: flex; justify-content: center; gap: 18px; }
.hero .screens img {
  width: min(220px, 38vw);
  border-radius: 24px 24px 0 0;
  border: 6px solid rgb(255 255 255 / 0.14);
  border-bottom: none;
  display: block;
}
.hero .screens img:last-child { transform: translateY(26px); }

/* ── Feature cards (iOS inset grouped) ── */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 14px; margin: 8px 0 40px; }
.card {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 22px;
}
.card .emoji { font-size: 30px; }
.card img.gem { width: 30px; height: 30px; }
.card h3 { font-size: 17px; margin: 10px 0 4px; letter-spacing: -0.2px; }
.card p { font-size: 15px; color: var(--secondary); }

/* ── Legal / content pages ── */
.page-header { margin: 34px 0 6px; }
.page-header h1 { font-size: clamp(28px, 5vw, 36px); font-weight: 800; letter-spacing: -0.6px; }
.page-header .updated { color: var(--secondary); font-size: 14px; margin-top: 4px; }
article.sheet {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 26px 24px; margin-top: 18px;
}
article.sheet h2 { font-size: 19px; margin: 26px 0 8px; letter-spacing: -0.3px; }
article.sheet h2:first-child { margin-top: 0; }
article.sheet h3 { font-size: 16px; margin: 18px 0 6px; }
article.sheet p, article.sheet li { font-size: 15px; color: var(--secondary); }
article.sheet strong { color: var(--label); font-weight: 600; }
article.sheet ul { padding-left: 22px; margin: 8px 0; }
article.sheet li { margin: 5px 0; }
article.sheet a { color: var(--tint); text-decoration: none; }

/* ── Support ── */
.support-cta {
  background: var(--bg-card); border-radius: var(--radius);
  padding: 34px 24px; text-align: center; margin-top: 18px;
}
.support-cta .emoji { font-size: 44px; }
.support-cta h2 { margin: 12px 0 6px; font-size: 22px; }
.support-cta p { color: var(--secondary); font-size: 15px; max-width: 420px; margin: 0 auto; }
.mail-button {
  display: inline-block; margin-top: 20px;
  background: var(--tint); color: #fff; text-decoration: none;
  padding: 12px 28px; border-radius: 999px; font-weight: 600; font-size: 16px;
}

/* ── Footer ── */
footer {
  border-top: 0.5px solid var(--separator);
  padding: 28px 20px calc(28px + env(safe-area-inset-bottom));
  text-align: center; color: var(--secondary); font-size: 13px;
}
footer .links { margin-bottom: 8px; }
footer a { color: var(--secondary); text-decoration: none; margin: 0 8px; }
footer a:hover { color: var(--tint); }

@media (max-width: 540px) {
  .hero { padding: 34px 18px 0; }
  .hero .screens { gap: 10px; }
  nav .links { gap: 12px; }
  article.sheet { padding: 20px 16px; }
}
