:root {
  --bg: #0E1116;
  --bg-grad: #0A0D12;
  --surface: #161A21;
  --text: #E6E9EF;
  --text-muted: #8A94A6;
  --accent: #4C8BF5;
  --accent-hover: #6BA2FF;
  --accent-contrast: #FFFFFF;
  --border: #242A33;
  --radius: 14px;
  --max-width: 1080px;
  --shot-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #FFFFFF;
    --bg-grad: #F4F6FB;
    --surface: #F7F8FB;
    --text: #0E1116;
    --text-muted: #5A6478;
    --border: #E2E6EE;
    --shot-shadow: 0 30px 80px -20px rgba(14, 17, 22, 0.18);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 800px at 50% -10%, var(--bg) 0%, var(--bg-grad) 70%);
  background-attachment: scroll;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (min-width: 768px) {
  body { background-attachment: fixed; }
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 10px 14px;
  border-radius: 0 0 10px 10px;
  text-decoration: none;
  font-weight: 600;
  z-index: 100;
  transition: top 150ms ease;
}
.skip-link:focus { top: 0; outline: none; }

.site-header {
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@media (min-width: 720px) {
  .site-header { position: sticky; top: 0; z-index: 50; }
}
.site-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand img { border-radius: 7px; }
.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: color 120ms ease, background-color 120ms ease;
}
.nav-links a:hover {
  color: var(--text);
  background: var(--surface);
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: clamp(40px, 7vw, 80px) 24px 32px;
}

.hero {
  text-align: center;
  padding-bottom: clamp(48px, 8vw, 96px);
}

.logo {
  width: clamp(72px, 10vw, 96px);
  height: auto;
  display: block;
  margin: 0 auto 20px;
  border-radius: 20px;
}

.wordmark {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

h1 {
  font-size: clamp(32px, 5.5vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 0 auto 20px;
  max-width: 18ch;
}

.sub {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--text-muted);
  max-width: 56ch;
  margin: 0 auto 36px;
}

.cta-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
  font-size: 17px;
  text-decoration: none;
  border-radius: var(--radius);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 4px 24px -8px rgba(76, 139, 245, 0.6);
}
.cta:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 28px -8px rgba(76, 139, 245, 0.7);
}
.cta:active { transform: translateY(0); }

.cta-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.cta-ghost:hover {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: none;
}

.cta-icon { flex-shrink: 0; }

.cta-disabled {
  background: color-mix(in srgb, var(--accent) 35%, var(--surface));
  box-shadow: none;
  cursor: default;
  opacity: 0.65;
}
.cta-disabled:hover {
  background: color-mix(in srgb, var(--accent) 35%, var(--surface));
  transform: none;
  box-shadow: none;
}

.badge-row {
  margin: 18px 0 0;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: 999px;
}

.meta {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-muted);
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
}
.dot { opacity: 0.7; }
.meta #meta-version:empty { display: none; }
.meta #meta-version:empty + #meta-platforms { margin-left: 0; }

.alt-platform { display: inline; position: relative; }
.alt-platform summary {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  cursor: pointer;
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
}
.alt-platform summary::-webkit-details-marker { display: none; }
.alt-platform summary:hover { color: var(--accent-hover); }
.alt-platform[open] summary { color: var(--accent-hover); }
.alt-platform summary .chevron { transition: transform 150ms ease; }
.alt-platform[open] summary .chevron { transform: rotate(180deg); }
.alt-platform ul {
  list-style: none;
  margin: 10px 0 0;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  min-width: 220px;
  max-width: calc(100vw - 32px);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
}
.alt-platform ul a {
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 4px 6px;
  border-radius: 8px;
}
.alt-platform ul a:hover { background: var(--bg); color: var(--accent); }
.alt-platform ul .alt-disabled {
  display: block;
  padding: 4px 6px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: default;
}

.noscript-fallback {
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-muted);
}
.noscript-fallback a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shot-shadow);
  overflow: hidden;
  margin: 0;
}
.frame .chrome {
  display: none;
  height: 28px;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.frame .chrome span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border);
}
html.is-mac .frame .chrome { display: flex; }
html.is-mac .frame .chrome span:nth-child(1) { background: #FF5F57; }
html.is-mac .frame .chrome span:nth-child(2) { background: #FEBC2E; }
html.is-mac .frame .chrome span:nth-child(3) { background: #28C840; }
.frame .shot-svg,
.frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
}

.shot-hero {
  position: relative;
  isolation: isolate;
  max-width: var(--max-width);
  margin: 0 auto clamp(64px, 8vw, 112px);
}
.shot-hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% 40%;
  background: radial-gradient(60% 60% at 50% 0%, rgba(76, 139, 245, 0.18), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

.feature-rows {
  display: flex;
  flex-direction: column;
  gap: clamp(64px, 8vw, 112px);
  padding-top: clamp(32px, 5vw, 64px);
  border-top: 1px solid var(--border);
}
.feature-rows .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}
@media (min-width: 900px) {
  .feature-rows .row { grid-template-columns: 1fr 1.3fr; gap: 56px; }
  .feature-rows .row:nth-child(even) .row-copy { order: 2; }
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  margin-bottom: 16px;
}
.feature-rows .row-copy h3 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}
.feature-rows .row-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 17px;
  max-width: 44ch;
  line-height: 1.55;
}
.feature-rows code,
.faq-item code {
  font-family: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  overflow-wrap: anywhere;
}

.section-title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 32px;
  line-height: 1.2;
}
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.section-header .section-title { margin: 0; }
.section-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.section-link:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }

.getting-started,
.changelog,
.faq {
  margin-top: clamp(64px, 8vw, 112px);
  padding-top: clamp(32px, 5vw, 64px);
  border-top: 1px solid var(--border);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
}
.step h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
}

.changelog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.changelog-empty {
  color: var(--text-muted);
  font-size: 15px;
  margin: 0;
}
.changelog-item {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 120ms ease, transform 120ms ease;
}
.changelog-item:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.changelog-item-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.changelog-version {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}
.changelog-date {
  font-size: 13px;
  color: var(--text-muted);
}
.changelog-preview {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: pre-wrap;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 150ms ease;
}
.faq-item[open] summary .chevron { transform: rotate(180deg); }
.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
}

.site-footer {
  margin-top: clamp(64px, 8vw, 96px);
  border-top: 1px solid var(--border);
  padding: 40px 24px 32px;
  color: var(--text-muted);
  font-size: 14px;
}
.footer-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.footer-brand img { border-radius: 6px; }
.footer-brand strong {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.footer-tagline {
  margin: 10px 0 0;
  font-size: 13px;
  max-width: 28ch;
}
.footer-col h4 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: color 120ms ease;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--max-width);
  margin: 32px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.site-footer #footer-version:empty { display: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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