:root {
  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #a1a1a6;
  --line: #e5e5ea;
  --accent: #0a84ff;
  --accent-ink: #0060d0;
  --demo-bg: #0b1220;
  --radius: 18px;
  --max: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #161617;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #6e6e73;
    --line: #2c2c2e;
    --accent-ink: #409cff;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.02em; line-height: 1.1; }
h2 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 700; }
p { margin: 0; }
section { padding: 0 20px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 12px 20px;
  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 .brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 600; font-size: 17px; }
.nav .brand img { border-radius: 8px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--ink-2); font-size: 14px; }
.nav nav a:hover { color: var(--ink); }
.button { display: inline-flex; align-items: center; background: var(--accent); color: #fff; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 14px; }
.button.small { padding: 7px 14px; }
@media (max-width: 720px) { .nav nav { display: none; } }

/* Hero */
.hero { max-width: 860px; margin: 0 auto; padding-top: 72px; padding-bottom: 40px; text-align: center; }
.hero-icon { width: 128px; height: 128px; border-radius: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.hero h1 { font-size: clamp(38px, 7vw, 72px); font-weight: 800; margin-top: 28px; letter-spacing: -0.03em; }
.lede { font-size: clamp(17px, 2.2vw, 22px); color: var(--ink-2); max-width: 640px; margin: 20px auto 0; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 32px; }
.requires { font-size: 13px; color: var(--ink-3); }
.appstore {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: var(--bg);
  border-radius: 12px; padding: 10px 18px 10px 14px;
  line-height: 1.05; text-align: left;
}
.appstore span { display: flex; flex-direction: column; font-size: 19px; font-weight: 600; }
.appstore small { font-size: 11px; font-weight: 400; opacity: .85; }
.appstore:hover { transform: translateY(-1px); }

/* Demo */
.demo-section { background: linear-gradient(180deg, var(--bg) 0, var(--bg) 120px, var(--demo-bg) 120px); padding-bottom: 64px; }
.demo {
  position: relative; max-width: 1000px; margin: 0 auto;
  aspect-ratio: 16 / 10; border-radius: var(--radius);
  overflow: hidden;
  background: #0f172a;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
}
.finder {
  position: absolute; inset: 0;
  display: grid; grid-template-rows: 44px 1fr 24px;
  background: #ffffff; color: #1d1d1f;
  outline: none;
  transition: filter .35s ease;
}
.demo.open .finder { filter: brightness(.82); }
.finder-titlebar { display: flex; align-items: center; gap: 12px; padding: 0 14px; background: #e8e8ea; border-bottom: 1px solid #d0d0d4; }
.lights { display: flex; gap: 8px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.finder-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: #4a4a4f; margin-right: 52px; }
.finder-body { display: grid; grid-template-columns: 170px 1fr; min-height: 0; }
.finder-sidebar { background: #f2f2f4; border-right: 1px solid #e0e0e4; padding: 10px 8px; font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.sb-head { font-size: 11px; color: #8e8e93; padding: 4px 8px; font-weight: 600; }
.sb-item { padding: 4px 8px; border-radius: 6px; color: #3a3a3f; }
.sb-item.active { background: #d9d9de; font-weight: 500; }
.finder-list { list-style: none; margin: 0; padding: 6px 0; overflow: auto; font-size: 13px; }
.finder-list li {
  display: grid; grid-template-columns: 26px 1fr 90px 120px; align-items: center; gap: 8px;
  padding: 4px 14px; cursor: default; color: #1d1d1f;
}
.finder-list li:nth-child(even) { background: #f7f7f9; }
.finder-list li .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finder-list li .meta { color: #8e8e93; font-size: 12px; white-space: nowrap; }
.finder-list li.selected { background: #0a84ff; color: #fff; }
.finder-list li.selected .meta { color: rgba(255,255,255,.85); }
.finder-list .icon { width: 22px; height: 22px; border-radius: 5px; display: inline-grid; place-items: center; font-size: 8.5px; font-weight: 700; color: #fff; letter-spacing: -.03em; overflow: hidden; }
.finder-status { display: flex; align-items: center; justify-content: center; font-size: 11px; color: #8e8e93; background: #f2f2f4; border-top: 1px solid #e0e0e4; }
@media (max-width: 640px) {
  .finder-body { grid-template-columns: 1fr; }
  .finder-sidebar { display: none; }
  .finder-list li { grid-template-columns: 26px 1fr; }
  .finder-list li .meta { display: none; }
}

/* Quick Look panel */
.ql {
  position: absolute; left: 8%; right: 8%; top: 7%; bottom: 7%;
  display: grid; grid-template-rows: 38px 1fr;
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,.55), 0 0 0 1px rgba(0,0,0,.2);
  transform-origin: var(--origin-x, 50%) var(--origin-y, 50%);
  transform: scale(.35); opacity: 0;
  transition: transform .32s cubic-bezier(.2,.9,.25,1.1), opacity .22s ease;
}
.ql[hidden] { display: none; }
.demo.open .ql { transform: scale(1); opacity: 1; }
.ql-titlebar { display: flex; align-items: center; gap: 10px; padding: 0 10px; background: #f0f0f2; border-bottom: 1px solid #d8d8dc; }
.ql-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: #3a3a3f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ql-close { width: 20px; height: 20px; border-radius: 50%; border: 0; background: #ff5f57; color: transparent; font-size: 0; cursor: pointer; }
.ql-tools { display: flex; gap: 4px; }
.ql-tools button { width: 28px; height: 24px; border: 1px solid #cfcfd4; background: #fff; border-radius: 6px; font-size: 16px; line-height: 1; color: #3a3a3f; cursor: pointer; }
.ql-body { overflow: auto; background: #fff; }
.ql-body img { display: block; width: 100%; height: auto; }
.ql-body img.dark { background: #1e1e1e; }

.demo-hint { text-align: center; color: rgba(255,255,255,.6); font-size: 14px; margin-top: 22px; }
.hint-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .hint-keys { display: none; } .hint-touch { display: inline; } }
.key {
  display: inline-block; padding: 2px 8px; margin: 0 2px; border-radius: 6px;
  background: rgba(255,255,255,.12); color: #fff; font-family: var(--mono); font-size: 12px;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.35);
}
.demo-hint.pulse .key:first-child { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { background: rgba(255,255,255,.12); } 50% { background: rgba(10,132,255,.9); } }

/* Features */
.features { max-width: var(--max); margin: 0 auto; padding-top: 88px; text-align: center; }
.section-lede { color: var(--ink-2); font-size: 18px; max-width: 640px; margin: 14px auto 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-top: 44px; text-align: left; }
.grid article { background: var(--bg-soft); border-radius: var(--radius); padding: 24px; }
.grid h3 { font-size: 18px; font-weight: 700; }
.grid p { color: var(--ink-2); margin-top: 8px; font-size: 15px; }

/* Showcase */
.showcase { max-width: var(--max); margin: 72px auto 0; display: grid; gap: 40px; }
.showcase figure { margin: 0; }
.showcase img { border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.18); border: 1px solid var(--line); }
.showcase figcaption { margin-top: 14px; color: var(--ink-2); font-size: 15px; }
.showcase figcaption strong { color: var(--ink); }
@media (min-width: 900px) { .showcase { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* Formats */
.formats { max-width: var(--max); margin: 0 auto; padding-top: 88px; }
.format-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px 32px; margin-top: 28px; }
.format-groups h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.format-groups p { font-family: var(--mono); font-size: 13.5px; color: var(--ink-2); margin-top: 6px; line-height: 1.7; }

/* Shortcuts */
.shortcuts { max-width: var(--max); margin: 0 auto; padding-top: 88px; }
.shortcuts .section-lede { margin-left: 0; }
.shortcuts table { border-collapse: collapse; margin-top: 28px; width: 100%; max-width: 720px; }
.shortcuts td { padding: 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; color: var(--ink-2); }
.shortcuts td:first-child { width: 170px; white-space: nowrap; color: var(--ink); }
kbd { font-family: var(--mono); font-size: 13px; background: var(--bg-soft); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 7px; }

/* Privacy strip */
.privacy-strip { margin-top: 88px; background: var(--bg-soft); padding: 64px 20px; }
.privacy-strip div { max-width: 760px; margin: 0 auto; }
.privacy-strip p { color: var(--ink-2); margin: 16px 0; font-size: 17px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; padding-top: 88px; }
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--ink-2); margin-top: 10px; font-size: 15.5px; }

/* Download */
.download { text-align: center; padding-top: 96px; padding-bottom: 96px; }
.download img { border-radius: 22px; box-shadow: 0 16px 40px rgba(0,0,0,.18); }
.download h2 { margin-top: 20px; }
.download p { color: var(--ink-2); margin: 10px 0 22px; }

footer { border-top: 1px solid var(--line); padding: 24px 20px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; font-size: 13px; color: var(--ink-3); }
footer nav { display: flex; gap: 18px; }

/* Legal pages */
.legal { max-width: 720px; margin: 0 auto; padding: 56px 20px 96px; }
.legal h1 { font-size: 40px; font-weight: 800; }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: var(--ink-2); font-size: 16px; margin-top: 12px; }
.legal .updated { color: var(--ink-3); font-size: 14px; margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ql { transition: none; }
  .demo-hint.pulse .key:first-child { animation: none; }
}
