:root {
  color-scheme: dark;
  --background: #070a13;
  --panel: #0e1427;
  --panel-strong: #10172e;
  --rule: #25304a;
  --paper: #f8fbff;
  --muted: #aebad1;
  --accent: #5af4ea;
  --accent-pressed: #a4faf5;
  --gutter: clamp(1.125rem, 5vw, 4.5rem);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  background: var(--background);
  color: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img { display: block; max-width: 100%; }
a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 5px;
}

.skip-link {
  position: fixed;
  z-index: 2;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--background);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.site-width {
  width: min(100% - 2 * var(--gutter), 73rem);
  margin-inline: auto;
}

.site-header { border-bottom: 1px solid var(--rule); }

.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.header-inner { min-height: 4.125rem; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-size: 1.06rem;
  font-weight: 680;
  letter-spacing: -0.035em;
  white-space: nowrap;
  text-decoration: none;
}

.brand img {
  flex: none;
  image-rendering: pixelated;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.65rem, 3vw, 1.65rem);
  font-size: 0.9375rem;
  font-weight: 575;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  color: var(--muted);
  text-decoration: none;
}

.site-nav a:hover { color: var(--paper); }

.site-nav .nav-action {
  min-height: 2.75rem;
  padding-inline: 0.875rem;
  color: var(--accent);
  border: 1px solid var(--rule);
  border-radius: 999px;
}

.site-nav .nav-action:hover { border-color: var(--accent); }

.language-switch {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.875rem;
  font-weight: 650;
}

.language-switch a {
  display: grid;
  min-width: 2.25rem;
  min-height: 2.75rem;
  place-items: center;
  border-radius: 0.55rem;
  color: var(--muted);
  text-decoration: none;
}

.language-switch a:hover { color: var(--paper); }
.language-switch [aria-current] { background: var(--panel-strong); color: var(--accent); }

.hero {
  padding-block: clamp(4rem, 8vw, 7.25rem) clamp(5.75rem, 11vw, 10.5rem);
  text-align: center;
}

.hero-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 4vw, 3.65rem);
  width: min(100%, 50rem);
  margin-inline: auto;
  margin-bottom: clamp(2.25rem, 5.9vw, 4.8rem);
}

.hero-glyph {
  width: clamp(6.25rem, 16.2vw, 15rem);
  height: auto;
  flex: none;
  image-rendering: pixelated;
}

.hero-wordmark {
  width: min(64%, 33rem);
  height: auto;
}

.hero h1, .section-heading h2, .download h2 {
  font-weight: 685;
  letter-spacing: -0.072em;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.1vw, 6rem);
  line-height: 1.025;
}

.hero p, .download-version {
  max-width: 33rem;
  margin: 1.15rem auto 0;
  font-size: clamp(1.05rem, 2.05vw, 1.28rem);
  line-height: 1.55;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem clamp(0.9rem, 2.5vw, 1.9rem);
  margin-top: 1.7rem;
}

.button, .text-link {
  display: inline-flex;
  min-height: 2.85rem;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  font-weight: 625;
  line-height: 1.25;
}

.button {
  padding: 0.7rem 1.13rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--background);
  text-decoration: none;
}

.button:hover { background: var(--accent-pressed); }

.button-outline {
  border: 1px solid var(--rule);
  background: var(--background);
  color: var(--accent);
}

.button-outline:hover {
  border-color: var(--accent);
  background: var(--background);
}

.text-link {
  color: var(--accent);
  text-decoration-color: transparent;
  text-underline-offset: 0.25em;
}

.text-link:hover { text-decoration-color: currentColor; }

.features {
  padding-bottom: clamp(5rem, 10vw, 9rem);
  scroll-margin-top: 2rem;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  padding-top: clamp(2.25rem, 5.5vw, 5rem);
  margin-bottom: clamp(1.65rem, 3.8vw, 3.35rem);
  border-top: 1px solid var(--rule);
}

.section-heading h2, .download h2 {
  font-size: clamp(2.6rem, 5.45vw, 5.3rem);
  line-height: 1.02;
}

.pixel-step {
  flex: none;
  width: clamp(1.6rem, 3.6vw, 3.5rem);
  aspect-ratio: 4 / 3;
  margin-bottom: 0.35rem;
  background: var(--accent);
  clip-path: polygon(0 100%, 0 67%, 25% 67%, 25% 45%, 50% 45%, 50% 22%, 75% 22%, 75% 0, 100% 0, 100% 33%, 75% 33%, 75% 55%, 50% 55%, 50% 77%, 25% 77%, 25% 100%);
}

.feature-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  grid-auto-rows: minmax(min-content, 1fr);
  gap: 0.85rem;
}

.feature {
  min-width: 0;
  padding: clamp(1.25rem, 3.6vw, 2.75rem);
  border: 1px solid var(--rule);
  border-radius: 1.45rem;
  background: var(--panel);
}

.feature h3, .replay h3 {
  font-size: clamp(1.36rem, 2.45vw, 2.15rem);
  line-height: 1.12;
  letter-spacing: -0.048em;
  font-weight: 665;
  text-wrap: pretty;
}

.feature p, .replay p {
  margin-top: 0.6rem;
  font-size: 1rem;
  line-height: 1.58;
  color: var(--muted);
}

.feature-heatmap {
  display: grid;
  grid-row: span 2;
  justify-items: center;
  align-content: space-between;
  gap: 1.35rem;
  min-height: 24rem;
  background: var(--panel-strong);
}

.feature-heatmap div { justify-self: start; max-width: 24rem; }

.feature-display {
  position: relative;
  width: min(100%, 25rem);
  margin: 0;
}

.feature-display img {
  width: 100%;
  height: auto;
}

.feature-compact {
  display: grid;
  grid-template-columns: minmax(3.5rem, 6rem) minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  align-items: center;
}

.feature-compact img {
  width: 100%;
  height: auto;
  border-radius: 0.45rem;
}

.replay {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 0.65rem 2rem;
  margin-top: clamp(1.7rem, 4.5vw, 3.75rem);
  padding: clamp(1.25rem, 3.6vw, 2.75rem) 0 0;
  border-top: 1px solid var(--rule);
}

.replay p { max-width: 27rem; margin-top: 0; }

.demo-promo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: clamp(4rem, 8vw, 7rem);
  padding: clamp(1.5rem, 5vw, 3.6rem);
  border: 1px solid var(--rule);
  border-radius: 1.45rem;
  background: var(--panel-strong);
}

.demo-promo h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  font-weight: 685;
  line-height: 1.06;
  letter-spacing: -0.07em;
}

.demo-promo p {
  max-width: 37rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.download {
  border-block: 1px solid var(--rule);
  background: var(--panel);
  text-align: center;
}

.download-inner { padding-block: clamp(4.2rem, 8vw, 7.65rem); }
.download-version { margin-top: 0.95rem; }

.download-platforms {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: clamp(1.75rem, 4vw, 3.1rem);
  text-align: start;
}

.download-platform {
  padding: clamp(1rem, 2.4vw, 2rem);
  border: 1px solid var(--rule);
  border-radius: 1.45rem;
  background: var(--panel-strong);
}

.download-platform h3 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.95rem;
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  font-weight: 665;
  line-height: 1.14;
  letter-spacing: -0.048em;
}

.platform-mark {
  flex: none;
  object-fit: contain;
}

.platform-mark-light { filter: brightness(0) invert(1); }

.package-list, .package-options { margin: 0; }

.package-list > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding-block: 0.55rem;
  border-top: 1px solid var(--rule);
}

.package-list dt {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}

.package-options {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}

.package-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding-inline: 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 0.65rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 650;
  text-decoration: none;
}

.package-link:hover {
  border-color: var(--accent);
  background: var(--background);
}

.package-link:focus-visible { outline-offset: 2px; }
.download-source {
  gap: 0.55rem;
  margin-top: clamp(1.4rem, 3vw, 2.1rem);
}

.footer-inner {
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding-block: 1rem;
}

.footer-inner .brand { font-size: 0.96rem; }
.site-footer small { color: var(--muted); font-size: 0.875rem; }

@media (prefers-reduced-motion: no-preference) {
  [data-scroll-motion] .hero-lockup {
    transform: translateY(calc(var(--hero-progress, 0) * 1.4rem))
      scale(calc(1 - var(--hero-progress, 0) * 0.085));
    opacity: calc(1 - var(--hero-progress, 0) * 0.25);
  }

  [data-scroll-motion] .feature-display {
    transform: translateY(calc((1 - var(--scene-progress, 1)) * 0.9rem))
      scale(calc(0.9 + var(--scene-progress, 1) * 0.1));
  }

  [data-scroll-motion] .feature-display::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #5af4ea2b, transparent 75%);
    opacity: calc(1 - var(--scene-progress, 1));
    pointer-events: none;
    content: "";
  }

  [data-scroll-motion] .demo-promo::before {
    position: absolute;
    inset: 0.3rem auto auto 1.5rem;
    width: calc(100% - 3rem);
    height: 1px;
    background: linear-gradient(90deg, var(--accent), transparent);
    transform: scaleX(var(--scene-progress, 1));
    transform-origin: left center;
    pointer-events: none;
    content: "";
  }

  [data-scroll-motion] .download-platform {
    transform: translateY(calc((1 - var(--scene-progress, 1)) * var(--platform-travel, 1rem)));
  }

  [data-scroll-motion] .download-platform:nth-child(2) { --platform-travel: 1.65rem; }
  [data-scroll-motion] .download-platform:nth-child(3) { --platform-travel: 2.3rem; }
}

@media (max-width: 48rem) {
  .download-platforms { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 45rem) {
  .feature-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .feature-heatmap { grid-row: auto; min-height: 0; }
  .feature-compact { grid-template-columns: minmax(3.75rem, 5.5rem) minmax(0, 1fr); }
  .replay { grid-template-columns: 1fr; }
}

@media (max-width: 34rem) {
  .hero-lockup { flex-direction: column; gap: 1.45rem; }
  .hero-glyph { width: clamp(6.5rem, 29vw, 9rem); }
  .hero-wordmark { width: min(90%, 19.5rem); }
  .hero h1 { max-width: 14ch; margin-inline: auto; }
  .site-nav .nav-action { padding-inline: 0.65rem; }
  .section-heading { align-items: center; }
  .demo-promo { grid-template-columns: 1fr; justify-items: start; }
}

@media (max-width: 38rem) {
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 0.65rem;
    padding-block: 0.4rem;
  }

  .header-inner > .brand { grid-column: 1 / -1; justify-self: start; }
  .site-nav { font-size: 0.875rem; }
}

@media (max-width: 23rem) {
  .brand { gap: 0.36rem; }
  .brand img { width: 1.15rem; height: 1.15rem; }
  .site-nav { gap: 0.55rem; }
  .feature-compact { grid-template-columns: 3.35rem minmax(0, 1fr); }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
