:root {
  --ink: #111111;
  --paper: #ffffff;
  --wash: #f4f4f1;
  --line: #111111;
  --muted: #5f5f5f;
  --soft: #e9e9e3;
  --accent: #111111;
  --danger: #d53c2f;
  --frame-w: 480px;
  --frame-h: 340px;
  --sheet-w: 3840px;
  --sheet-h: 1700px;
  color: var(--ink);
  background: var(--wash);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background: var(--wash);
}

body,
button,
a {
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 2px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand,
.nav-links,
.hero-actions,
.action-buttons {
  display: flex;
  align-items: center;
}

.brand {
  flex: 0 0 auto;
  gap: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
  border: 2px solid var(--line);
  border-radius: 8px;
  filter: grayscale(1) contrast(1.15);
}

.nav-links {
  flex: 1 1 auto;
  justify-content: center;
  gap: clamp(12px, 3vw, 34px);
  color: #2b2b2b;
  font-size: 14px;
  font-weight: 750;
}

.nav-links a,
.site-footer a {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease;
}

.button.primary {
  color: var(--paper);
  background: var(--accent);
}

.button.secondary {
  color: var(--ink);
  background: var(--paper);
}

.button.disabled {
  color: #555555;
  background: #d8d8d2;
  cursor: not-allowed;
}

.button:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--line);
}

.button.disabled:hover {
  transform: none;
  box-shadow: 4px 4px 0 var(--line);
}

.button.full {
  width: 100%;
}

.language-switcher {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0;
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
}

.language-option {
  min-width: 42px;
  min-height: 38px;
  padding: 0 10px;
  color: var(--ink);
  background: var(--paper);
  border: 0;
  border-right: 2px solid var(--line);
  cursor: pointer;
  font-size: 13px;
  font-weight: 950;
}

.language-option:last-child {
  border-right: 0;
}

.language-option.is-active,
.language-option:hover {
  color: var(--paper);
  background: var(--ink);
}

.studio-page {
  background: var(--wash);
}

.studio-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: 74svh;
  overflow: hidden;
  padding: clamp(66px, 9vw, 118px) clamp(18px, 6vw, 76px);
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}

.studio-hero::before {
  position: absolute;
  inset: -8%;
  content: "";
  background-image: url("assets/villain-paper-spritesheet.png");
  background-repeat: repeat;
  background-size: 920px auto;
  opacity: 0.07;
  filter: grayscale(1) contrast(1.5);
}

.studio-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.studio-hero h1 {
  max-width: 12ch;
}

.studio-lede {
  max-width: 680px;
  margin-bottom: 28px;
  color: #252525;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 650;
  line-height: 1.7;
}

.studio-hero-note {
  position: absolute;
  right: clamp(18px, 6vw, 76px);
  bottom: 28px;
  z-index: 2;
  max-width: min(420px, calc(100% - 36px));
  padding: 12px 14px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 4px 4px 0 var(--line);
  font-size: 14px;
  font-weight: 950;
}

.studio-products {
  background: var(--wash);
}

.studio-product-card {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1fr);
  overflow: hidden;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--line);
}

.studio-product-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  background: #fbfbf8;
  border-right: 2px solid var(--line);
}

.studio-product-visual::before {
  position: absolute;
  inset: 18px;
  content: "";
  border: 2px dashed #b8b8b2;
}

.studio-product-visual .sprite-shadow {
  bottom: 58px;
}

.studio-product-sprite {
  position: relative;
  z-index: 1;
  transform: scale(0.68);
  transform-origin: center;
}

.studio-product-copy {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 18px;
  padding: clamp(24px, 4vw, 46px);
}

.studio-product-copy h3 {
  margin: 0;
  font-size: clamp(34px, 5vw, 64px);
}

.studio-product-copy p:not(.card-kicker) {
  max-width: 620px;
  margin: 0;
  color: #3f3f3f;
  font-size: 17px;
  line-height: 1.65;
}

.studio-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-product-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 950;
}

.studio-approach {
  background: var(--paper);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.studio-contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--ink);
  color: var(--paper);
}

.studio-contact .eyebrow {
  color: #d7d7d7;
}

.studio-contact h2 {
  max-width: 760px;
}

.studio-contact .button.primary {
  flex: 0 0 auto;
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
  box-shadow: 4px 4px 0 #777777;
}

.studio-contact .button.primary:hover {
  box-shadow: 2px 2px 0 #777777;
}

.hero {
  position: relative;
  min-height: 82svh;
  overflow: hidden;
  padding: clamp(64px, 9vw, 112px) clamp(18px, 6vw, 76px);
  background: var(--paper);
  border-bottom: 2px solid var(--line);
}

.hero::before {
  position: absolute;
  inset: -8%;
  content: "";
  background-image: url("assets/villain-paper-spritesheet.png");
  background-repeat: repeat;
  background-size: 960px auto;
  opacity: 0.055;
  filter: grayscale(1) contrast(1.5);
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.04;
}

h1 {
  max-width: 11ch;
  margin-bottom: 22px;
  font-size: clamp(52px, 9vw, 118px);
  font-weight: 1000;
}

h2 {
  max-width: 13ch;
  margin-bottom: 0;
  font-size: clamp(34px, 5.6vw, 72px);
  font-weight: 1000;
}

h3 {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 950;
}

.hero-lede {
  max-width: 640px;
  margin-bottom: 28px;
  color: #252525;
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 650;
  line-height: 1.7;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 820px;
  margin: 0;
  border: 2px solid var(--line);
  background: var(--paper);
}

.hero-facts div {
  min-width: 0;
  padding: 15px;
  border-right: 2px solid var(--line);
}

.hero-facts div:last-child {
  border-right: 0;
}

.hero-facts dt {
  margin-bottom: 6px;
  font-weight: 950;
}

.hero-facts dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.hero-stage {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: clamp(18px, 5vw, 88px);
  bottom: auto;
  width: min(42vw, 560px);
  min-width: 360px;
  height: min(58vh, 460px);
  pointer-events: none;
  transform: translateY(-50%);
}

.sprite-shadow {
  position: absolute;
  left: 50%;
  bottom: 58px;
  width: 270px;
  height: 34px;
  background: #111111;
  border-radius: 999px;
  opacity: 0.1;
  transform: translateX(-50%) rotate(-2deg);
}

.sprite {
  width: var(--frame-w);
  height: var(--frame-h);
  background-image: url("assets/villain-paper-spritesheet.png");
  background-repeat: no-repeat;
  background-size: var(--sheet-w) var(--sheet-h);
  background-position: 0 var(--sprite-y, 0px);
  filter: grayscale(1) contrast(1.12);
  animation: spriteSteps 900ms steps(8) infinite;
}

.sprite-large {
  position: absolute;
  left: 50%;
  bottom: 82px;
  transform: translateX(-50%) scale(0.92);
  transform-origin: bottom center;
}

@keyframes spriteSteps {
  from {
    background-position: 0 var(--sprite-y, 0px);
  }
  to {
    background-position: calc(var(--sheet-w) * -1) var(--sprite-y, 0px);
  }
}

.impact-strip {
  position: absolute;
  left: 50%;
  bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 430px;
  width: min(100%, 430px);
  transform: translateX(-50%);
}

.impact-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--line);
  font-size: 13px;
  font-weight: 950;
}

.section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 6vw, 76px);
}

.section-heading {
  display: grid;
  gap: 12px;
  margin-bottom: 32px;
}

.intro-section,
.download-section {
  background: var(--wash);
}

.explain-grid,
.download-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.feature-card,
.download-card,
.demo-window,
.faq-list details {
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--line);
}

.feature-card {
  min-height: 245px;
  padding: 24px;
}

.card-kicker,
.platform {
  width: fit-content;
  margin-bottom: 18px;
  padding: 5px 9px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 950;
}

.feature-card p:not(.card-kicker),
.feature-list p,
.demo-copy p,
.download-card p,
.faq-list p,
.download-note,
.site-footer p {
  color: #3f3f3f;
  line-height: 1.65;
}

.action-demo {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  background: var(--paper);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.demo-copy p {
  max-width: 560px;
  font-size: 17px;
}

.action-buttons {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.chip {
  min-height: 38px;
  padding: 0 12px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 900;
}

.chip.is-active,
.chip:hover {
  color: var(--paper);
  background: var(--ink);
}

.demo-stage {
  display: grid;
  place-items: center;
}

.demo-window {
  width: min(100%, 520px);
  overflow: hidden;
}

.demo-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 46px;
  padding: 0 14px;
  background: #eeeeea;
  border-bottom: 2px solid var(--line);
}

.demo-titlebar span {
  width: 14px;
  height: 14px;
  border: 2px solid var(--line);
  border-radius: 50%;
}

.demo-titlebar span:last-child {
  justify-self: end;
}

.sprite-wrap {
  display: grid;
  place-items: center;
  min-height: 410px;
  background: #fbfbf8;
}

.feature-band {
  background: var(--ink);
  color: var(--paper);
}

.feature-band .eyebrow,
.feature-band .feature-list p {
  color: #d7d7d7;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 2px solid var(--paper);
}

.feature-list div {
  min-height: 190px;
  padding: 22px;
  border-right: 2px solid var(--paper);
}

.feature-list div:last-child {
  border-right: 0;
}

.feature-list h3 {
  font-size: 20px;
}

.download-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.download-card {
  display: grid;
  align-content: space-between;
  gap: 22px;
  min-height: 280px;
  padding: 24px;
}

.download-card.is-ready {
  box-shadow: 5px 5px 0 var(--danger);
}

.download-card .platform {
  color: var(--paper);
  background: var(--ink);
}

.file-meta {
  display: grid;
  gap: 10px;
  margin: 0;
}

.file-meta div {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid #c9c9c3;
}

.file-meta dt {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.file-meta dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 750;
}

.hash {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.download-note {
  max-width: 880px;
  margin: 24px 0 0;
  padding-left: 14px;
  border-left: 4px solid var(--line);
  font-weight: 750;
}

.custom-section {
  background: var(--ink);
  color: var(--paper);
  border-top: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.custom-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 0.75fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

.custom-copy {
  display: grid;
  justify-items: start;
  gap: 18px;
}

.custom-copy .eyebrow,
.custom-copy p {
  color: #d7d7d7;
}

.custom-copy p {
  max-width: 660px;
  margin: 0;
  font-size: 17px;
  line-height: 1.65;
}

.custom-section .button.primary {
  color: var(--ink);
  background: var(--paper);
  border-color: var(--paper);
  box-shadow: 4px 4px 0 #777777;
}

.custom-section .button.primary:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #777777;
}

.custom-details {
  display: grid;
  border: 2px solid var(--paper);
}

.custom-details div {
  min-height: 92px;
  padding: 18px;
  border-bottom: 2px solid var(--paper);
}

.custom-details div:last-child {
  border-bottom: 0;
}

.custom-details span {
  display: block;
  color: #d7d7d7;
  font-size: 12px;
  font-weight: 950;
}

.custom-details strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.faq-section {
  background: var(--paper);
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 980px;
}

.faq-list details {
  padding: 0;
  box-shadow: 3px 3px 0 var(--line);
}

.faq-list summary {
  min-height: 58px;
  padding: 18px 20px;
  cursor: pointer;
  font-weight: 950;
}

.faq-list p {
  margin: 0;
  padding: 0 20px 20px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px clamp(18px, 6vw, 76px);
  background: var(--ink);
  color: var(--paper);
}

.site-footer p {
  margin: 6px 0 0;
  color: #d6d6d6;
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .hero-stage {
    top: 54%;
    right: 18px;
    width: min(38vw, 420px);
    min-width: 320px;
    height: 360px;
    opacity: 0.82;
  }

  .sprite-large {
    bottom: 70px;
    transform: translateX(-50%) scale(0.68);
  }

  .sprite-shadow {
    bottom: 52px;
    width: 220px;
  }

  .hero-facts,
  .explain-grid,
  .feature-list {
    grid-template-columns: 1fr 1fr;
  }

  .hero-facts div:nth-child(2) {
    border-right: 0;
  }

  .hero-facts div:last-child {
    grid-column: 1 / -1;
    border-top: 2px solid var(--line);
  }

  .action-demo,
  .download-grid,
  .custom-panel,
  .studio-product-card {
    grid-template-columns: 1fr;
  }

  .studio-product-visual {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .studio-contact {
    align-items: flex-start;
    flex-direction: column;
  }

  .feature-list div:nth-child(2) {
    border-right: 0;
  }

  .feature-list div:nth-child(1),
  .feature-list div:nth-child(2) {
    border-bottom: 2px solid var(--paper);
  }
}

@media (max-width: 620px) {
  .site-header {
    min-height: 58px;
  }

  .brand span {
    display: none;
  }

  .language-option {
    min-height: 38px;
    min-width: 38px;
    padding: 0 8px;
    font-size: 13px;
  }

  .hero {
    min-height: 78svh;
    padding-top: 46px;
  }

  .studio-hero {
    min-height: 76svh;
    padding-top: 46px;
  }

  .studio-hero-note {
    right: 18px;
    bottom: 16px;
  }

  .studio-product-visual {
    min-height: 260px;
  }

  .studio-product-sprite {
    transform: scale(0.52);
  }

  .hero-stage {
    top: 61%;
    right: 8px;
    bottom: auto;
    width: 260px;
    min-width: 260px;
    height: 260px;
    opacity: 0.34;
  }

  .sprite-large {
    bottom: 58px;
    transform: translateX(-50%) scale(0.48);
  }

  .sprite-shadow {
    bottom: 45px;
    width: 150px;
  }

  .impact-strip {
    bottom: 10px;
    transform: translateX(-50%) scale(0.78);
  }

  .hero-facts,
  .explain-grid,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .hero-facts div,
  .hero-facts div:nth-child(2) {
    border-right: 0;
    border-bottom: 2px solid var(--line);
  }

  .hero-facts div:last-child {
    border-top: 0;
    border-bottom: 0;
  }

  .feature-list div,
  .feature-list div:nth-child(1),
  .feature-list div:nth-child(2) {
    border-right: 0;
    border-bottom: 2px solid var(--paper);
  }

  .feature-list div:last-child {
    border-bottom: 0;
  }

  .file-meta div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .custom-details div {
    min-height: auto;
  }

  .sprite-wrap {
    min-height: 280px;
    overflow: hidden;
  }

  .demo-window {
    width: 100%;
  }

  .demo-stage .sprite {
    transform: scale(0.64);
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
