:root {
  --bg: #ffffff;
  --fg: #1d1d1f;
  --muted: #6e6e73;
  --card: #f5f5f7;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --ok: #1a8d3a;
  --err: #d70015;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 24px 64px -12px rgba(0, 0, 0, 0.22);
  --key-top: linear-gradient(#ffffff, #e9e9ec);
  --key-edge: #c7c7cc;
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0c;
    --fg: #f5f5f7;
    --muted: #a1a1a6;
    --card: #161618;
    --line: rgba(255, 255, 255, 0.1);
    --accent: #2b8cff;
    --accent-hover: #4a9dff;
    --ok: #32d74b;
    --err: #ff6961;
    --shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 64px -12px rgba(0, 0, 0, 0.8);
    --key-top: linear-gradient(#3a3a3e, #2a2a2d);
    --key-edge: #19191b;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 { margin: 0; text-wrap: balance; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", system-ui, sans-serif; }

h2 {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 700;
}

h3 { font-size: 19px; letter-spacing: -0.01em; font-weight: 600; }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.brand img { width: 32px; height: 32px; }
.nav-cta {
  color: var(--accent); text-decoration: none; font-size: 15px; font-weight: 500;
}
.nav-cta:hover { text-decoration: underline; }

/* Hero */
.hero { text-align: center; padding: 72px 0 0; }
.hero-icon { width: 152px; height: 152px; margin: 0 auto 12px; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.18)); }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-weight: 600; font-size: 17px; }
h1 {
  font-size: clamp(44px, 8.4vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  font-weight: 700;
}
.lede {
  margin: 20px auto 0;
  max-width: 30ch;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.35;
  color: var(--muted);
  letter-spacing: -0.01em;
}

/* Download */
.download { margin: 32px auto 0; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dl-button {
  display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 28px 0 24px;
  border-radius: 999px; background: var(--accent); color: #fff;
  font-size: 18px; font-weight: 500; text-decoration: none;
  transition: background .15s, transform .1s;
}
.dl-button:hover { background: var(--accent-hover); }
.dl-button:active { transform: scale(0.98); }
.dl-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.req { margin: 0; color: var(--muted); font-size: 14px; }

/* Screenshots */
.shot {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--card);
}
.shot img { width: 100%; }
.shot-hero { max-width: 880px; margin: 64px auto 0; }

/* How */
.how {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; padding: 120px 0 0; text-align: center;
}
.step { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.keycap {
  display: inline-grid; place-items: center;
  width: 88px; height: 88px; border-radius: 18px;
  background: var(--key-top);
  box-shadow: 0 4px 0 var(--key-edge), 0 8px 18px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  font-size: 34px; font-weight: 500; letter-spacing: -0.01em;
  animation: press 2.8s ease-in-out infinite;
}
@media (prefers-color-scheme: dark) { .keycap { box-shadow: 0 4px 0 var(--key-edge), 0 8px 18px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08); } }
@keyframes press {
  0%, 12% { transform: translateY(0); box-shadow: 0 4px 0 var(--key-edge), 0 8px 18px rgba(0, 0, 0, 0.14); }
  18%, 70% { transform: translateY(3px); box-shadow: 0 1px 0 var(--key-edge), 0 3px 8px rgba(0, 0, 0, 0.12); }
  76%, 100% { transform: translateY(0); box-shadow: 0 4px 0 var(--key-edge), 0 8px 18px rgba(0, 0, 0, 0.14); }
}
.glyph {
  display: inline-grid; place-items: center;
  width: 88px; height: 92px;
}
.glyph svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: round; }
.step:nth-child(2) .glyph path { animation: wave 2.8s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
@keyframes wave {
  0%, 15%, 72%, 100% { transform: scaleY(0.35); opacity: .45; }
  30% { transform: scaleY(1); opacity: 1; }
  45% { transform: scaleY(0.6); opacity: 1; }
  58% { transform: scaleY(0.95); opacity: 1; }
}
.step:nth-child(3) .glyph svg { stroke: var(--accent); animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.how h3 { font-size: 24px; }
.how-note { grid-column: 1 / -1; margin: 28px 0 0; color: var(--muted); }
kbd {
  font: inherit; font-size: 14px; padding: 2px 7px; border-radius: 6px;
  border: 1px solid var(--line); background: var(--card); color: var(--fg);
}

/* Features */
.features {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  padding: 120px 0 0;
}
.card { background: var(--card); border-radius: var(--radius); padding: 28px 24px 30px; }
.card .ic { width: 28px; height: 28px; margin-bottom: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.card:nth-child(1) .ic { color: #ff9f0a; }
.card:nth-child(2) .ic { color: #bf5af2; }
.card:nth-child(3) .ic { color: #30b0c7; }
.card:nth-child(4) .ic { color: var(--accent); }
.card p { margin: 8px 0 0; color: var(--muted); font-size: 16px; line-height: 1.45; }

/* Modes */
.modes { padding: 140px 0 0; text-align: center; }
.mode-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; text-align: left; }
.mode { background: var(--card); border-radius: var(--radius); padding: 24px; }
.mode-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mode p { margin: 10px 0 0; color: var(--muted); font-size: 16px; line-height: 1.4; }
.keycap.sm {
  width: 40px; height: 36px; border-radius: 9px; font-size: 16px; animation: none;
  box-shadow: 0 2px 0 var(--key-edge), 0 3px 8px rgba(0, 0, 0, 0.1);
}
.keycap.empty { background: transparent; box-shadow: none; border: 1.5px dashed var(--key-edge); }
@media (prefers-color-scheme: dark) { .keycap.empty { border-color: #48484a; } }

/* Split */
.split {
  display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: center;
  padding: 140px 0 0;
}
.split-text p { margin: 16px 0 0; color: var(--muted); font-size: 21px; }

/* Gallery */
.gallery-section { padding: 140px 0 0; overflow-x: clip; }
.gallery-section h2 { text-align: center; }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(560px, 82vw);
  gap: 24px; margin-top: 44px;
  padding: 16px max(20px, calc((100vw - 1080px) / 2)) 72px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(20px, calc((100vw - 1080px) / 2));
  scrollbar-width: none; outline: none;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery .shot { scroll-snap-align: start; }
@media (min-width: 1000px) {
  .gallery { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); width: min(1320px, 100% - 40px); margin-inline: auto; padding-inline: 0; overflow: visible; }
}

/* Join */
.join { text-align: center; padding: 100px 0 120px; }
.join img { width: 96px; height: 96px; margin: 0 auto 20px; filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.16)); }

/* Footer */
.foot {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 22px 0 40px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}

/* Tablet */
@media (max-width: 900px) {
  .features, .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 32px; text-align: center; }
}

/* Phone */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .hero { padding-top: 44px; }
  .hero-icon { width: 112px; height: 112px; }
  .shot-hero { margin-top: 44px; }
  .shot { border-radius: 10px; }
  .how { gap: 8px; padding-top: 88px; }
  .keycap { width: 68px; height: 68px; font-size: 26px; border-radius: 15px; }
  .glyph { width: 68px; height: 72px; }
  .glyph svg { width: 50px; height: 50px; }
  .how h3 { font-size: 19px; }
  .features { grid-template-columns: 1fr; padding-top: 88px; gap: 10px; }
  .card { display: grid; grid-template-columns: 28px 1fr; column-gap: 16px; padding: 18px 20px; border-radius: 18px; }
  .card .ic { grid-row: span 2; margin: 1px 0 0; }
  .card p { margin-top: 2px; font-size: 15px; }
  .modes, .split, .gallery-section { padding-top: 100px; }
  .mode-grid { grid-template-columns: 1fr; gap: 10px; margin-top: 32px; }
  .mode { padding: 16px 20px; border-radius: 18px; }
  .mode p { margin-top: 4px; font-size: 15px; }
  .join { padding: 80px 0 96px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
