:root {
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --border: #d2d2d7;
  --radius: 14px;
  --max: 1040px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113;
    --bg-alt: #1c1c1f;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --accent: #2997ff;
    --border: #333336;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand img { width: 28px; height: 28px; }
.nav { display: flex; gap: 22px; font-size: 15px; }
.nav a { color: var(--muted); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

/* Hero */
.hero { text-align: center; padding: 88px 0 72px; }
.hero img { width: 152px; height: 152px; filter: drop-shadow(0 18px 32px rgba(0, 0, 0, 0.18)); }
.hero h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1.05; letter-spacing: -0.02em; margin: 24px 0 12px; }
.hero .tagline { font-size: clamp(19px, 2.6vw, 24px); color: var(--muted); max-width: 640px; margin: 0 auto 32px; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
  font-size: 16px;
}
.button:hover { text-decoration: none; opacity: 0.88; }
.hero .meta { margin-top: 14px; font-size: 14px; color: var(--muted); }

/* Features */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-alt); }
.section h2 { font-size: clamp(28px, 4vw, 40px); text-align: center; letter-spacing: -0.01em; margin: 0 0 40px; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.section:not(.alt) .feature { background: var(--bg-alt); }
.feature .icon { font-size: 28px; line-height: 1; }
.feature h3 { margin: 12px 0 6px; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.privacy-callout { text-align: center; max-width: 680px; margin: 0 auto; }
.privacy-callout p { color: var(--muted); font-size: 19px; }

/* Legal pages */
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 80px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.01em; margin: 0 0 4px; }
.legal .updated { color: var(--muted); margin: 0 0 32px; }
.legal h2 { font-size: 22px; margin: 40px 0 8px; }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal .summary {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
}
.legal .caps { text-transform: uppercase; font-size: 15px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }

/* Screenshots */
.shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  background: #0f1624;
}
.hero-shot { max-width: 1000px; margin: 56px auto 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 32px; }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 12px; color: var(--muted); font-size: 15px; text-align: center; }
.gallery figcaption strong { color: var(--text); display: block; font-size: 17px; }

/* Documentation */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; padding-top: 48px; padding-bottom: 80px; }
.docs-nav { position: sticky; top: 80px; align-self: start; font-size: 15px; }
.docs-nav p { margin: 0 0 8px; font-weight: 600; }
.docs-nav ol { list-style: none; padding: 0; margin: 0; }
.docs-nav li { margin: 6px 0; }
.docs-nav a { color: var(--muted); }
.docs-nav a:hover { color: var(--text); text-decoration: none; }
@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
}
.docs h1 { font-size: clamp(32px, 5vw, 44px); letter-spacing: -0.01em; margin: 0 0 8px; }
.docs h2 { font-size: 26px; margin: 56px 0 12px; padding-top: 8px; border-top: 1px solid var(--border); scroll-margin-top: 72px; }
.docs h3 { font-size: 19px; margin: 28px 0 8px; }
.docs .lead { font-size: 19px; color: var(--muted); margin-top: 0; }
.docs figure { margin: 24px 0; }
.docs figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; text-align: center; }
.docs table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 15px; }
.docs th, .docs td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.docs th { color: var(--muted); font-weight: 600; }
.docs code { font-family: "SF Mono", Menlo, monospace; font-size: 0.88em; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.docs pre { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }
.docs pre code { background: none; border: 0; padding: 0; }
.note { background: var(--bg-alt); border-left: 4px solid var(--accent); border-radius: 8px; padding: 12px 16px; margin: 16px 0; }
kbd {
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.85em;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 1px 6px;
  background: var(--bg);
  white-space: nowrap;
}
