:root {
  --ink: #12211b;
  --ink-soft: #344a41;
  --paper: #f5f7f3;
  --surface: #ffffff;
  --line: #cad5cf;
  --accent: #1c7356;
  --accent-bright: #68d0aa;
  --coral: #c65643;
  --gold: #e2b84f;
  --dark: #13231d;
  --dark-line: #385046;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  line-height: 1.7;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface);
  color: var(--ink);
  border: 2px solid var(--accent);
}
.skip-link:focus { top: 16px; }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - var(--max)) / 2));
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.22);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.62);
  color: var(--accent-bright);
  font: 700 20px/1 Georgia, serif;
}
.site-header nav,
.footer-inner nav { display: flex; align-items: center; gap: 28px; }
.site-header nav a {
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: 14px;
}
.site-header nav a:hover,
.site-header nav a:focus-visible { color: #fff; }

.hero {
  position: relative;
  min-height: 620px;
  height: min(82vh, 780px);
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
  background: #10211a url("assets/worldcraft-codex-wiki.png") center top / cover no-repeat;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 15, .78);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: min(var(--max), calc(100% - 48px));
  margin: 48px auto 0;
}
.release-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: #d4eee4;
  font-size: 13px;
  font-weight: 700;
}
.release-dot {
  width: 9px;
  height: 9px;
  background: var(--accent-bright);
  box-shadow: 0 0 0 5px rgba(104,208,170,.16);
}
.hero h1,
.section-heading h2,
.showcase-heading h2,
.notice-layout h2,
.legal-main h1 {
  font-family: "Source Han Serif SC", "Noto Serif CJK SC", "Songti SC", STSong, serif;
  letter-spacing: 0;
}
.hero h1 {
  max-width: 860px;
  margin: 0;
  font-size: 96px;
  line-height: .98;
  font-weight: 800;
}
.hero-copy {
  max-width: 680px;
  margin: 28px 0 0;
  color: rgba(255,255,255,.86);
  font-size: 21px;
  line-height: 1.75;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 750;
  text-decoration: none;
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
.button:hover { transform: translateY(-2px); }
.button:focus-visible, a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.button-primary { background: var(--accent-bright); color: #0b241a; }
.button-primary:hover { background: #83dcbb; }
.button-secondary { border-color: rgba(255,255,255,.55); color: #fff; background: rgba(9,22,17,.32); }
.button-secondary:hover { border-color: #fff; background: rgba(255,255,255,.1); }
.button-dark { background: var(--ink); color: #fff; }
.button-dark:hover { background: var(--accent); }
.button-outline { border-color: var(--ink); color: var(--ink); }
.button-outline:hover { background: var(--ink); color: #fff; }
.hero-note { margin: 18px 0 0; color: rgba(255,255,255,.62); font-size: 13px; }
.hero-next {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.72);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}
.hero-next span { margin-left: 8px; color: var(--accent-bright); }

.section-inner { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.release-band { padding: 88px 0; background: var(--surface); border-bottom: 1px solid var(--line); }
.release-layout { display: grid; grid-template-columns: .85fr 1.35fr; gap: 64px 84px; }
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-heading h2,
.showcase-heading h2,
.notice-layout h2 { margin: 0; font-size: 48px; line-height: 1.2; }
.section-heading > p:last-child { color: var(--ink-soft); margin: 22px 0 0; }
.download-list { border-top: 1px solid var(--ink); }
.download-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 30px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.download-item h3 { margin: 4px 0; font-size: 20px; }
.download-item p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.download-type { color: var(--coral); font-size: 11px; font-weight: 900; }
.release-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.release-facts div { padding: 16px 18px; border-right: 1px solid var(--line); }
.release-facts div:first-child { padding-left: 0; }
.release-facts div:last-child { border-right: 0; }
.release-facts span { display: block; color: var(--ink-soft); font-size: 11px; }
.release-facts strong, .release-facts a { font-size: 14px; font-weight: 800; }
.release-facts a { color: var(--accent); }

.product-showcase { padding: 96px 0 104px; }
.showcase-heading {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 36px;
}
.showcase-heading > p { margin: 0; color: var(--ink-soft); }
.product-frame { margin: 0; border: 1px solid var(--line); background: #0c1712; box-shadow: 0 22px 70px rgba(20,42,32,.15); }
.product-frame img { width: 100%; aspect-ratio: 36 / 23; object-fit: cover; object-position: top; }
.product-frame figcaption { padding: 11px 14px; color: #c9dbd3; font-size: 12px; }
.capability-rows { display: grid; grid-template-columns: 1fr 1fr; margin-top: 70px; border-top: 1px solid var(--ink); }
.capability-rows article {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 18px;
  padding: 28px 26px 28px 0;
  border-bottom: 1px solid var(--line);
}
.capability-rows article:nth-child(odd) { border-right: 1px solid var(--line); }
.capability-rows article:nth-child(even) { padding-left: 26px; }
.capability-rows article > span { color: var(--coral); font: 700 16px/1.5 Georgia, serif; }
.capability-rows h3 { margin: 0 0 6px; font-size: 18px; }
.capability-rows p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.notice-band { padding: 76px 0; background: var(--dark); color: #fff; }
.notice-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 90px; }
.notice-layout .section-kicker { color: var(--accent-bright); }
.notice-copy { border-top: 1px solid var(--dark-line); }
.notice-copy p { margin: 0; padding: 20px 0; color: #cadbd3; border-bottom: 1px solid var(--dark-line); }

footer { padding: 28px 0; background: #0c1712; color: #dbe8e2; }
.footer-inner { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.footer-inner > div { display: flex; flex-direction: column; }
.footer-inner span { color: #82998f; font-size: 12px; }
.footer-inner a { color: #b7c9c1; font-size: 13px; text-decoration: none; }
.footer-inner a:hover { color: #fff; }

.legal-header { position: static; background: var(--dark); }
.legal-main { width: min(820px, calc(100% - 48px)); min-height: calc(100vh - 210px); margin: 0 auto; padding: 84px 0 100px; }
.legal-main h1 { margin: 0 0 18px; font-size: 58px; line-height: 1.15; }
.legal-main h2 { margin: 44px 0 12px; font-size: 22px; }
.legal-main p, .legal-main li { color: var(--ink-soft); }
.legal-main a { color: var(--accent); }
.legal-meta { padding-bottom: 22px; border-bottom: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }

@media (max-width: 820px) {
  .site-header { height: 62px; padding-inline: 18px; }
  .site-header nav { gap: 15px; }
  .site-header nav a:nth-child(2) { display: none; }
  .brand { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .hero { min-height: 610px; height: 84vh; background-position: 42% top; }
  .hero-inner { width: calc(100% - 36px); margin-top: 38px; }
  .hero h1 { font-size: 52px; overflow-wrap: normal; word-break: normal; }
  .hero-copy { font-size: 17px; }
  .hero-actions { align-items: stretch; }
  .hero-actions .button { width: 100%; }
  .hero-note { max-width: 92%; line-height: 1.5; }
  .section-inner { width: calc(100% - 36px); }
  .release-band, .product-showcase { padding: 66px 0; }
  .section-heading h2, .showcase-heading h2, .notice-layout h2 { font-size: 34px; }
  .release-layout, .showcase-heading, .notice-layout { grid-template-columns: 1fr; gap: 34px; }
  .download-item { grid-template-columns: 1fr; gap: 18px; }
  .download-item .button { width: 100%; }
  .release-facts { grid-template-columns: 1fr 1fr; }
  .release-facts div, .release-facts div:first-child { padding: 13px 12px; border-bottom: 1px solid var(--line); }
  .release-facts div:nth-child(2) { border-right: 0; }
  .capability-rows { grid-template-columns: 1fr; margin-top: 46px; }
  .capability-rows article,
  .capability-rows article:nth-child(even) { padding: 22px 0; border-right: 0; }
  .notice-band { padding: 62px 0; }
  .legal-main h1 { font-size: 42px; }
  .footer-inner { width: calc(100% - 36px); align-items: flex-start; flex-direction: column; }
  .footer-inner nav { gap: 18px; flex-wrap: wrap; }
}

@media (min-width: 821px) and (max-width: 1100px) {
  .hero h1 { font-size: 78px; }
}

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