@font-face {
  font-family: "Space Grotesk";
  src: url("./fonts/space-grotesk-variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --color-ember-orange: #fa4616;
  --color-ember-shadow: #b62600;
  --color-carbon: #202020;
  --color-snow: #ffffff;
  --color-mist: #f9f9f9;
  --color-silver: #e1e4e8;
  --color-slate: #646464;
  --color-ash: #838383;
  --color-pearl: #bbbbbb;
  --font-ui: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --gutter: clamp(20px, 4vw, 48px);
  font-family: var(--font-ui);
  color: var(--color-carbon);
  background: var(--color-mist);
  font-synthesis: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; -webkit-text-size-adjust: 100%; }
body {
  min-width: 280px;
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; text-underline-offset: 5px; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--color-carbon); outline-offset: 5px; }
img, svg { display: block; }
img { max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: var(--color-snow); background: var(--color-carbon); }

.shell {
  width: 100%;
  max-width: 1200px;
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.site-header { position: sticky; top: 0; z-index: 10; background: var(--color-snow); }
.header-inner {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand, .footer-brand {
  display: inline-flex;
  width: fit-content;
  flex-shrink: 0;
  align-items: center;
  gap: 12px;
  color: var(--color-carbon);
  text-decoration: none;
}
.brand img, .footer-brand img {
  width: 48px;
  height: 38px;
  flex: 0 0 48px;
  object-fit: contain;
}
.brand-word {
  font-family: var(--font-display);
  font-size: 28px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
}
.primary-nav { display: flex; align-items: center; gap: clamp(24px, 3vw, 40px); }
.primary-nav a {
  position: relative;
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding-block: 8px;
  color: var(--color-slate);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}
.primary-nav a::after {
  position: absolute;
  right: 0;
  bottom: 5px;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
}
.primary-nav a.current { color: var(--color-carbon); font-weight: 700; }
.primary-nav a.current::after { opacity: 1; }
.primary-nav a:hover { color: var(--color-carbon); }
.navigation-drawer { display: contents; }
.drawer-top, .drawer-legal, .menu-backdrop { display: none; }
.menu-toggle, .menu-close {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 0;
  border-radius: 8px;
  color: var(--color-carbon);
  background: transparent;
  cursor: pointer;
}
.menu-toggle svg, .menu-close svg { width: 24px; height: 24px; }
html[data-menu-lock="true"] { overflow: hidden; }
html[data-menu-lock="true"] body { position: fixed; top: var(--menu-scroll-y, 0px); right: 0; left: 0; width: 100%; overflow: hidden; }

.hero-layout {
  display: grid;
  min-height: min(780px, calc(100svh - 88px));
  align-items: center;
  justify-items: center;
  padding-block: clamp(80px, 8vw, 120px);
}
.hero-copy { width: 100%; text-align: center; }
.hero-copy h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(29px, 8.9vw, 128px);
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.headline-line { position: relative; display: block; min-height: 1em; overflow-wrap: anywhere; }
.headline-line + .headline-line { margin-top: 0.015em; }
[data-type-text] { display: inline-block; max-width: 100%; font-variant-ligatures: none; }
[data-typing="active"] [data-type-text] { clip-path: inset(-0.16em var(--type-right, 0px) -0.16em 0); }
[data-typing="active"] [data-type-caret]::after {
  content: "";
  position: absolute;
  left: var(--type-caret-x, 0px);
  top: 50%;
  width: clamp(1.5px, 0.018em, 2px);
  height: 0.78em;
  background: currentColor;
  opacity: var(--type-caret-opacity, 1);
  transform: translateY(-50%);
  pointer-events: none;
}
.hero:lang(zh) .hero-copy h1 { letter-spacing: 0; line-height: 1.15; }
.hero:lang(zh) .headline-line + .headline-line { margin-top: 0; }
.hero-description {
  max-width: 44ch;
  margin: 32px auto 0;
  color: var(--color-slate);
  font-size: clamp(16px, 1.45vw, 20px);
  line-height: 1.5;
  letter-spacing: -0.016em;
}
.hero:lang(zh) .hero-description { max-width: 28em; letter-spacing: 0; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 64px; }
.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.01em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease;
}
.button-primary {
  color: var(--color-snow);
  background: var(--color-ember-orange);
  box-shadow: 0 3px 0 var(--color-ember-shadow);
}
.button-primary:hover { transform: translateY(-1px); }
.button-primary:active { transform: translateY(1px); }
.button-secondary { border-color: var(--color-silver); color: var(--color-carbon); background: transparent; }
.button-secondary:hover { border-color: var(--color-carbon); }

.work, .about { padding-block: 80px; }
.section-title {
  margin: 0 0 40px;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.3vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.work:lang(zh) .section-title, .about:lang(zh) .section-title { letter-spacing: 0; line-height: 1.15; }
.work .section-title, .about .section-title {
  max-width: none;
  text-align: center;
}
.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.game-card {
  min-width: 0;
  width: 100%;
  border-radius: 24px;
  background: var(--color-snow);
}
.game-placeholder { aspect-ratio: 1; }
.about-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.about .section-title { margin-bottom: 32px; }
.about-copy {
  max-width: 60ch;
  padding-top: 0;
  margin-inline: auto;
  color: var(--color-slate);
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: -0.014em;
  text-align: center;
}
.about-copy:lang(zh) { max-width: 36em; letter-spacing: 0; line-height: 1.8; }
.about-copy p { margin: 0; }
.about-copy p + p { margin-top: 24px; }

.site-footer { background: var(--color-snow); }
.footer-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  padding-block: 48px 64px;
  text-align: left;
}
.footer-identity { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer-brand { gap: 14px; }
.footer-brand img { width: 58px; height: 46px; flex-basis: 58px; }
.footer-brand .brand-word { font-size: 32px; }
.footer-meta { margin: 0; color: var(--color-slate); font-size: 12px; line-height: 1.5; letter-spacing: -0.006em; }
.footer-meta > span { display: block; }
.footer-meta p, .footer-records p { margin: 0; }
.footer-records { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 4px; }
.footer-records a { text-decoration: none; }
.footer-security-filing { display: inline-flex; align-items: center; gap: 5px; }
.footer-actions { display: flex; flex-shrink: 0; flex-direction: column; align-self: center; align-items: flex-start; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.footer-legal a, .footer-contact-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--color-slate);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.006em;
  text-decoration: none;
}
.footer-legal a:hover, .footer-contact-link:hover, .footer-records a:hover { color: var(--color-carbon); }

.legal-page { max-width: 900px; padding-top: 48px; padding-bottom: 80px; }
.back-link { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; margin-bottom: 32px; color: var(--color-slate); font-size: 14px; text-decoration: none; }
.back-link:hover { color: var(--color-carbon); }
.legal-heading {
  margin: 0 0 24px;
  font-family: var(--font-display);
  font-size: clamp(36px, 4.3vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.legal-heading:lang(zh) { letter-spacing: 0; line-height: 1.2; }
.legal-date { margin: 0 0 24px; color: var(--color-slate); font-size: 13px; line-height: 1.5; }
.legal-note { margin: 0 0 48px; color: var(--color-slate); font-size: 14px; line-height: 1.5; }
.legal-intro { color: var(--color-slate); font-size: 15px; line-height: 1.9; overflow-wrap: anywhere; }
.legal-scope { margin: 0 0 12px; color: var(--color-ember-orange); font-size: 14px; font-weight: 650; }
.legal-platform-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-block: 32px 48px; }
.legal-platform-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 28px; border: 1px solid var(--color-silver); border-radius: 24px; background: var(--color-snow); text-decoration: none; }
.legal-platform-card:hover { border-color: var(--color-ember-orange); }
.legal-platform-card strong { font-family: var(--font-display); font-size: 24px; line-height: 1.3; }
.legal-platform-card p { flex: 1; margin: 0; color: var(--color-slate); font-size: 14px; line-height: 1.8; }
.legal-platform-card > span { color: var(--color-carbon); font-size: 14px; font-weight: 600; }
.legal-platform-nav { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }
.legal-platform-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border: 1px solid var(--color-silver); border-radius: 8px; color: var(--color-slate); font-size: 14px; text-decoration: none; }
.legal-platform-nav a[aria-current="page"] { border-color: var(--color-carbon); color: var(--color-carbon); font-weight: 700; background: var(--color-snow); }
.legal-review { padding: 20px 24px; margin: 24px 0 16px; border-left: 3px solid var(--color-ember-orange); background: var(--color-snow); }
.legal-review strong { display: block; font-size: 14px; font-weight: 650; }
.legal-review p { margin: 8px 0 0; color: var(--color-slate); font-size: 14px; line-height: 1.8; }
.legal-pending { margin: 0 0 40px; padding: 16px 20px; border: 1px solid var(--color-silver); border-radius: 8px; }
.legal-pending summary { cursor: pointer; font-size: 14px; font-weight: 600; }
.legal-pending li { margin-block: 8px; color: var(--color-slate); font-size: 14px; line-height: 1.8; overflow-wrap: anywhere; }
.legal-page article > .legal-section:first-of-type { margin-top: 32px; }
.legal-table-wrap { width: 100%; margin-block: 20px; overflow-x: auto; border: 1px solid var(--color-silver); border-radius: 8px; }
.legal-table-wrap:focus-visible { outline: 2px solid var(--color-carbon); outline-offset: 4px; }
.legal-table-wrap table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 13px; line-height: 1.8; }
.legal-table-wrap th, .legal-table-wrap td { padding: 14px 16px; vertical-align: top; text-align: left; border-bottom: 1px solid var(--color-silver); overflow-wrap: anywhere; }
.legal-table-wrap th { color: var(--color-carbon); font-weight: 650; background: var(--color-snow); }
.legal-table-wrap td { color: var(--color-slate); min-width: 120px; }
.legal-table-wrap tr:last-child td { border-bottom: 0; }
.legal-section + .legal-section { margin-top: 32px; }
.legal-section h2 { display: flex; align-items: baseline; gap: 16px; margin: 0 0 16px; font-size: 20px; font-weight: 650; letter-spacing: -0.016em; line-height: 1.4; }
.legal-section h2 > span { flex-shrink: 0; color: var(--color-slate); font-size: 13px; font-weight: 500; letter-spacing: 0; line-height: 1.5; }
.legal-section p, .legal-section li { color: var(--color-slate); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.legal-section:lang(zh) p, .legal-section:lang(zh) li { letter-spacing: 0; line-height: 1.9; }
.legal-section p { margin: 0 0 16px; }
.legal-section ul, .legal-section ol { padding-left: 1.4em; margin: 16px 0; }
.legal-section a { display: inline-block; min-height: 44px; padding-block: 8px; color: var(--color-carbon); }
.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 900px) {
  .hero-layout { min-height: min(720px, calc(100svh - 88px)); padding-block: 88px; }
  .about-copy { font-size: 16px; }
}

@media (max-width: 700px) {
  .header-inner { min-height: 88px; gap: 16px; }
  .menu-toggle, .menu-close { display: flex; }
  .menu-close { border-radius: 50%; background: var(--color-mist); }
  .menu-backdrop { display: block; position: fixed; z-index: 1; inset: 0; background: rgb(32 32 32 / 18%); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 280ms ease, visibility 0s 280ms; }
  .navigation-drawer { position: fixed; z-index: 2; top: 0; right: 0; display: flex; flex-direction: column; width: min(86vw, 360px); height: 100vh; height: 100dvh; padding: 24px; padding-top: max(24px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: var(--color-snow); visibility: hidden; transform: translateX(100%); transition: transform 280ms cubic-bezier(.22, 1, .36, 1), visibility 0s 280ms; }
  .site-header[data-open="true"] .menu-backdrop { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
  .site-header[data-open="true"] .navigation-drawer { visibility: visible; transform: translateX(0); transition-delay: 0s; }
  .drawer-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .drawer-top .brand-word { font-size: 25px; }
  .primary-nav { flex-direction: column; align-items: stretch; gap: 8px; padding-block: 40px; }
  .primary-nav a { width: fit-content; min-height: 60px; padding-block: 12px; color: var(--color-carbon); font-size: 28px; line-height: 1.25; }
  .primary-nav a.current, .primary-nav a:hover { color: var(--color-ember-orange); }
  .primary-nav a::after { right: auto; bottom: 6px; width: 24px; height: 2px; }
  .drawer-legal { display: flex; flex-direction: column; gap: 4px; padding-top: 24px; border-top: 1px solid var(--color-silver); margin-top: auto; }
  .drawer-legal a { display: flex; min-height: 44px; align-items: center; width: fit-content; color: var(--color-slate); font-size: 14px; text-decoration: none; }
  .drawer-legal a:hover { color: var(--color-ember-orange); }
  .hero-layout { min-height: min(680px, calc(100svh - 88px)); padding-block: 80px; }
  .hero-copy h1, .hero:lang(zh) .hero-copy h1 { font-size: clamp(29px, 8.9vw, 62px); }
  .hero-description { max-width: 33ch; margin-top: 24px; font-size: 16px; }
  .hero-actions { gap: 16px; margin-top: 52px; }
  .button { padding-inline: 20px; }
  .work, .about { padding-block: 64px; }
  .section-title { margin-bottom: 32px; font-size: 36px; }
  .featured-grid { grid-template-columns: minmax(0, 360px); justify-content: center; }
  .about-copy { max-width: 48ch; padding-top: 0; }
  .footer-layout { flex-direction: column; align-items: center; gap: 24px; padding-block: 48px; text-align: center; }
  .footer-identity { align-items: center; gap: 16px; }
  .footer-actions { flex-flow: row wrap; justify-content: center; align-items: center; max-width: 100%; column-gap: 12px; }
  .footer-legal { justify-content: center; column-gap: 12px; }
  .footer-legal a, .footer-contact-link { min-height: 44px; }
  .footer-records { align-items: center; }
  .legal-page { padding-top: 32px; padding-bottom: 64px; }
  .back-link { margin-bottom: 24px; }
  .legal-note { margin-bottom: 40px; }
  .legal-platform-grid { grid-template-columns: 1fr; }
  .legal-platform-card { padding: 24px; }
  .legal-review { padding: 16px 20px; }
}

@media (max-width: 360px) {
  .brand { gap: 8px; }
  .brand-word { font-size: 25px; }
  .hero-layout { padding-block: 72px; }
  .hero-actions { gap: 12px; }
  .button { min-height: 44px; padding-inline: 16px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-typing="active"] [data-type-text] { clip-path: none; }
  [data-typing="active"] [data-type-caret]::after { display: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
