:root {
  --bg: #0f1013;
  --bg2: #17181c;
  --card: #1d1e23;
  --line: #2c2d33;
  --text: #f2f2f5;
  --muted: #a1a1aa;
  --accent: #0a84ff;
  --accent2: #30d158;
  --radius: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); text-align: center; margin-bottom: 1.2em; }
main > section { max-width: 1180px; margin: 0 auto; padding: 72px 24px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.nav { display: flex; align-items: center; gap: 20px; }
.nav > a { color: var(--muted); font-size: 0.95rem; }
.nav > a:hover { color: var(--text); text-decoration: none; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang button {
  font: inherit; font-size: 0.8rem; font-weight: 600; padding: 4px 10px;
  background: transparent; color: var(--muted); border: 0; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* Hero */
.hero { text-align: center; padding-top: 64px; }
.hero-icon { width: 112px; height: 112px; margin: 0 auto 18px; border-radius: 26px; box-shadow: 0 12px 40px rgba(10, 132, 255, 0.25); }
.hero h1 { font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: -0.02em; }
.tagline { font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 600; margin: 0 0 10px; }
.lede { color: var(--muted); max-width: 620px; margin: 0 auto 28px; }
.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 1rem;
  border: 1px solid var(--line); color: var(--text);
}
.btn:hover { text-decoration: none; filter: brightness(1.1); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.ghost { background: var(--bg2); }
.note { color: var(--muted); font-size: 0.9rem; text-align: center; min-height: 1.4em; }
.hero-shot { margin: 40px auto 0; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }

/* Features */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature .ico { font-size: 1.6rem; display: block; margin-bottom: 10px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Screenshots: carousel */
.gallery { --ease: cubic-bezier(0.22, 1, 0.36, 1); --dir: 1; max-width: 1040px; margin: 0 auto; outline: none; }
.gallery:focus-visible { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 60%, transparent); border-radius: calc(var(--radius) + 6px); }
.g-stage {
  --px: 0; --py: 0;
  position: relative; border-radius: calc(var(--radius) + 4px); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, #1f2a3a 0%, var(--bg2) 60%);
  border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  touch-action: pan-y;
}
.g-track { position: relative; aspect-ratio: 1400 / 900; }
.g-slide {
  position: absolute; inset: 0; margin: 0; display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateX(calc(var(--dir) * 8%)) scale(0.96);
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease), visibility 0s linear 0.7s;
}
.g-slide.is-leaving { transform: translateX(calc(var(--dir) * -8%)) scale(0.96); }
.g-slide.is-active {
  opacity: 1; visibility: visible; pointer-events: auto; transform: none;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease), visibility 0s;
}
.g-open {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  padding: 18px 18px 0; border: 0; background: none; cursor: zoom-in;
}
.g-open:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; border-radius: var(--radius); }
.g-open img {
  max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain;
  border-radius: 10px; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  transform: scale(1.04) translate(calc(var(--px) * -10px), calc(var(--py) * -8px));
  transition: transform 6s linear;
}
.g-slide.is-active .g-open img { transform: scale(1) translate(calc(var(--px) * -10px), calc(var(--py) * -8px)); transition: transform 1.2s var(--ease); }
.g-slide figcaption { padding: 14px 20px 18px; text-align: center; color: var(--text); font-size: 0.98rem; min-height: 3.2em; }
.g-cap { display: inline-block; opacity: 0; transform: translateY(10px); transition: opacity 0.5s var(--ease) 0.15s, transform 0.6s var(--ease) 0.15s; }
.g-slide.is-active .g-cap { opacity: 1; transform: none; }

.g-nav {
  position: absolute; top: calc(50% - 30px); z-index: 2;
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(30, 32, 38, 0.45); backdrop-filter: blur(12px) saturate(1.4); -webkit-backdrop-filter: blur(12px) saturate(1.4);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: transform 0.25s var(--ease, ease), background 0.25s, border-color 0.25s;
}
.g-nav svg, .g-play svg, .lb-close svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.g-nav:hover { background: color-mix(in srgb, var(--accent) 70%, transparent); border-color: transparent; transform: scale(1.08); }
.g-nav:active { transform: scale(0.96); }
.g-nav:focus-visible, .g-thumb:focus-visible, .g-play:focus-visible, .lb-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.g-prev { left: 14px; }
.g-next { right: 14px; }
.g-prev:hover svg { transform: translateX(-2px); }
.g-next:hover svg { transform: translateX(2px); }
.g-nav svg { transition: transform 0.25s; }

.g-bar { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-count b { color: var(--text); }
.g-play {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--card); color: var(--text); border: 1px solid var(--line); transition: border-color 0.2s;
}
.g-play svg { width: 16px; height: 16px; }
.g-play:hover { border-color: var(--accent); }
.g-play .i-play, .g-play.paused .i-pause { display: none; }
.g-play.paused .i-play { display: block; }

.g-thumbs {
  position: relative; display: flex; gap: 10px; overflow-x: auto; padding: 4px 4px 12px; scrollbar-width: none;
  justify-content: safe center;
}
.g-thumbs::-webkit-scrollbar { display: none; }
.g-thumb {
  flex: none; width: 104px; aspect-ratio: 16 / 10; padding: 0; border-radius: 8px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg2); opacity: 0.55; transition: opacity 0.3s, transform 0.3s var(--ease, ease);
}
.g-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.g-thumb:hover { opacity: 0.9; transform: translateY(-2px); }
.g-thumb.is-active { opacity: 1; }
.g-ind {
  position: absolute; left: 0; bottom: 4px; height: 3px; width: 0; border-radius: 3px; background: var(--accent);
  box-shadow: 0 0 12px var(--accent); transition: transform 0.5s var(--ease, ease), width 0.5s var(--ease, ease);
}

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--text);
}
.lightbox::backdrop { background: rgba(5, 6, 8, 0.9); backdrop-filter: blur(6px); }
.lightbox[open] { display: flex; align-items: center; justify-content: center; animation: lb-in 0.35s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes lb-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
.lb-fig { margin: 0; max-width: calc(100vw - 140px); max-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lb-fig img { max-width: 100%; max-height: calc(100vh - 90px); width: auto; height: auto; border-radius: 10px; }
.lb-fig figcaption { color: var(--muted); text-align: center; }
.lightbox .g-nav { top: calc(50% - 23px); }
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-close { position: absolute; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(30, 32, 38, 0.6); border: 1px solid rgba(255, 255, 255, 0.18); }

@media (prefers-reduced-motion: reduce) {
  .g-slide, .g-slide.is-active, .g-cap, .g-open img, .g-slide.is-active .g-open img, .g-ind, .g-thumb, .g-nav, .g-nav svg { transition: none !important; transform: none !important; }
  .g-slide.is-active .g-cap { opacity: 1; }
  .lightbox[open] { animation: none; }
  html { scroll-behavior: auto; }
}

/* Download */
.download { text-align: center; }
.dl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; max-width: 860px; margin: 18px auto 8px; }
.dl {
  display: flex; flex-direction: column; gap: 4px; padding: 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text);
}
.dl:hover { text-decoration: none; border-color: var(--accent); }
.dl b { font-size: 1.15rem; }
.dl span { color: var(--muted); font-size: 0.9rem; }
.dl.current { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.download h3 { margin-top: 40px; }
.req { list-style: none; padding: 0; max-width: 760px; margin: 0 auto 12px; text-align: left; }
.req li { padding: 10px 14px 10px 34px; position: relative; border-bottom: 1px solid var(--line); color: var(--muted); }
.req li::before { content: "✓"; position: absolute; left: 10px; color: var(--accent2); font-weight: 700; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 24px 40px; display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: center; }
.foot .fine { flex-basis: 100%; text-align: center; color: var(--muted); font-size: 0.8rem; margin: 8px 0 0; }

@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  main > section { padding: 48px 18px; }
  .nav > a { display: none; }
  .grid, .dl-grid { grid-template-columns: 1fr; }
  .g-track { aspect-ratio: 16 / 12; }
  .g-open { padding: 10px 10px 0; }
  .g-nav { width: 38px; height: 38px; top: calc(50% - 34px); }
  .g-prev { left: 8px; }
  .g-next { right: 8px; }
  .g-slide figcaption { font-size: 0.9rem; padding: 10px 12px 14px; }
  .g-thumb { width: 76px; }
  .lb-fig { max-width: 100vw; }
  .lightbox .g-nav { top: auto; bottom: 18px; }
  .hero { padding-top: 40px; }
}
