:root {
  color-scheme: dark;
  --bg: #121412;
  --bg-deep: #0d0f0d;
  --panel: #191c19;
  --panel-2: #202420;
  --raised: #272c27;
  --line: rgba(234, 240, 232, 0.1);
  --line-soft: rgba(234, 240, 232, 0.06);
  --accent: #5ad51b;
  --text: #e7ece4;
  --secondary: #a8b0a5;
  --muted: #7e877c;
  --radius: 14px;
  --max: 1180px;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--text);
  text-decoration-color: rgba(90, 213, 27, 0.35);
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--accent); }

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg-deep);
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 14px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.site-nav {
  display: flex;
  gap: 24px;
  margin-left: auto;
}
.site-nav a {
  color: var(--secondary);
  font-size: 14px;
  font-weight: 400;
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.site-nav a:hover { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
}
.version {
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

main {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.hero {
  padding: clamp(56px, 8vw, 88px) 0 48px;
}

.hero-copy { max-width: 880px; }

.eyebrow, .kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.status-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

h1 {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(2.75rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.lead {
  max-width: 52ch;
  margin: 24px 0 0;
  color: var(--secondary);
  font-size: clamp(1rem, 1.35vw, 1.125rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.hero-meta {
  margin: 20px 0 0;
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms var(--ease), border-color 150ms var(--ease);
}
.button:hover {
  border-color: rgba(234, 240, 232, 0.2);
  background: var(--raised);
}
.button.primary {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg-deep);
}
.button.primary:hover {
  background: #f2f6ef;
  border-color: #f2f6ef;
}
.button.small { min-height: 32px; padding: 0 12px; font-size: 13px; }
.button.unavailable { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.button i { font-size: 1em; line-height: 1; margin-right: 6px; }

.download { position: relative; display: inline-flex; align-items: stretch; }
.download-main {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  padding-right: 16px;
}
.download-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-height: 44px;
  border: 1px solid var(--text);
  border-left: 1px solid rgba(14, 26, 6, 0.18);
  border-radius: 0 10px 10px 0;
  background: var(--text);
  color: var(--bg-deep);
  cursor: pointer;
  transition: background-color 150ms var(--ease);
}
.download-toggle:hover { background: #f2f6ef; }
.download-toggle i { margin: 0; font-size: 14px; }
.download.is-disabled .download-main { opacity: 0.62; cursor: pointer; }
.download-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  min-width: 310px;
  max-width: calc(100vw - 48px);
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
}
.download-menu[hidden] { display: none; }
.download-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}
.download-menu a:hover, .download-menu a:focus-visible { background: var(--raised); }
.download-menu a.detected { outline: 1px solid var(--accent); }
.download-menu a.unavailable { opacity: 0.45; cursor: not-allowed; pointer-events: none; }
.download-menu a i { color: var(--muted); }
.download-meta {
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11.5px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.hero-visual { margin-top: clamp(40px, 5vw, 64px); }

.window-frame {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-deep);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.window-bar b {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}
.window-note {
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}
.window-frame picture { display: block; }
.window-frame img { width: 100%; }

.section { padding: clamp(56px, 7vw, 80px) 0; }

.section-head {
  max-width: 760px;
  margin-bottom: 32px;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 500;
}
.section-lead {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.grid { display: grid; gap: 16px; }
.split { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.feature-list { border-top: 1px solid var(--line); }
.feature-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.feature-row h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.feature-row p {
  margin: 0;
  max-width: 66ch;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.panel {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.panel .button { margin-top: auto; align-self: flex-start; }
.panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 500;
}
.panel p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}
.panel p:last-child { margin-bottom: 0; }

code {
  padding: 1px 5px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: var(--bg-deep);
  color: var(--text);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.9em;
}

.gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.gallery figure { margin: 0; }
.gallery a.shot {
  position: relative;
  display: block;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-deep);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 150ms var(--ease), background-color 150ms var(--ease);
}
.gallery a.shot:hover,
.gallery a.shot:focus-visible {
  border-color: rgba(234, 240, 232, 0.22);
  background: var(--panel);
}
.gallery a.shot img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: 6px;
}
.gallery figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.install pre {
  margin: 0 0 16px;
  padding: 16px 18px;
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-deep);
}
.install pre code {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.8;
}
.prompt { color: var(--muted); user-select: none; }

.faq {
  max-width: 920px;
  border-top: 1px solid var(--line);
}
.faq details {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  position: relative;
  padding: 16px 28px 16px 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 14px;
}
.faq details[open] summary::after { content: "−"; }
.faq p {
  margin: 0;
  padding: 0 0 18px;
  max-width: 72ch;
  color: var(--muted);
  font-size: 14.5px;
}

.site-footer {
  width: min(var(--max), calc(100% - 48px));
  margin: 80px auto 0;
  padding: 32px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text);
  font-weight: 600;
}
.footer-brand img {
  width: 24px;
  height: 24px;
  border-radius: 6px;
}
.footer-brand b { color: var(--muted); font-weight: 400; }
.site-footer p { margin: 8px 0; }
.site-footer .fine { color: var(--muted); font-size: 12.5px; max-width: 80ch; }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}
.site-footer nav a { color: var(--secondary); font-size: 13px; text-decoration: none; }
.site-footer nav a:hover { color: var(--text); }

@media (max-width: 980px) {
  .feature-row { grid-template-columns: 180px minmax(0, 1fr); gap: 24px; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    gap: 10px;
    width: calc(100% - 32px);
  }
  .site-nav {
    order: 3;
    width: 100%;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
  }
  .header-actions { margin-left: auto; }
  main, .site-footer { width: calc(100% - 32px); }
  .hero { padding-top: 48px; }
  h1 { font-size: clamp(2.3rem, 10vw, 3rem); }
  .feature-row { grid-template-columns: 1fr; gap: 6px; padding: 18px 0; }
  .gallery { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .site-footer { margin-top: 56px; }
}

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

dialog.lightbox {
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: hidden;
}
dialog.lightbox::backdrop {
  background: rgba(8, 10, 8, 0.92);
}
dialog.lightbox[open] {
  display: grid;
  place-items: center;
  animation: lightbox-in 160ms var(--ease);
}
.lightbox-inner {
  position: relative;
  display: grid;
  place-items: center;
  width: min(96vw, 1500px);
  height: min(92vh, 1000px);
  padding: 48px 24px 24px;
}
.lightbox-inner img {
  max-width: 100%;
  max-height: calc(100% - 46px);
  width: auto;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.6);
  background: #000;
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 2;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  display: grid;
  place-items: center;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--raised);
}
.lightbox-close {
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  font-size: 22px;
}
.lightbox-prev,
.lightbox-next {
  top: 50%;
  width: 44px;
  height: 58px;
  transform: translateY(-50%);
  font-size: 24px;
}
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-caption {
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  max-width: min(780px, 80vw);
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lightbox-count {
  position: absolute;
  top: 12px;
  left: 14px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (max-width: 720px) {
  .lightbox-inner { padding: 54px 8px 50px; }
  .lightbox-prev, .lightbox-next { width: 38px; height: 48px; }
  .lightbox-caption { bottom: 4px; max-width: 88vw; }
}
html.lightbox-open { overflow: hidden; }
