:root {
  --paper: #1b2021;
  --text: #f3f2ec;
  --muted: #aab8b8;
  --line: #394345;
  --accent: #e4cf91;
  --accent-strong: #f1dfa9;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #222b26;
  background: #f8faf7;
  font-size: 14px;
  letter-spacing: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
a:focus-visible, button:focus-visible { outline: 2px solid #d7e6a7; outline-offset: 4px; }
img { display: block; max-width: 100%; }

.nav { background: #1b2021; border-bottom-color: #394345; }
.nav-brand img { image-rendering: pixelated; }

.hero {
  position: relative;
  height: min(700px, calc(100svh - 136px));
  min-height: 560px;
  overflow: hidden;
  isolation: isolate;
  background: #1b2021;
  color: #f3f2ec;
}
#world { position: absolute; inset: 0; z-index: 0; touch-action: pan-y; }
#world canvas { display: block; width: 100%; height: 100%; }
.hero::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(27, 32, 33, .72), rgba(27, 32, 33, .22) 38%, transparent 67%);
}
.hero-copy {
  position: absolute;
  z-index: 2;
  top: 48%;
  left: clamp(24px, 6vw, 104px);
  width: 410px;
  max-width: 38%;
  transform: translateY(-50%);
  pointer-events: none;
}
.hero-copy a { pointer-events: auto; }
.hero-copy .eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  color: #b9c9c7;
  font: 600 11px/1.5 Consolas, monospace;
}
.edition-dot { width: 7px; height: 7px; background: #e4cf91; }
.hero h1 { margin: 0; font-size: 72px; line-height: 1.05; font-weight: 680; }
.hero-line { margin: 12px 0 20px; color: #e0e4df; font-size: 26px; line-height: 1.4; }
.hero-subtitle { max-width: 340px; margin: 0; color: #aab8b8; font-size: 14px; line-height: 1.85; }
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 30px; }
.primary-link {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-width: 146px;
  padding: 13px 18px;
  border-radius: 4px;
  background: #e4cf91;
  color: #202526;
  font-size: 13px;
  font-weight: 650;
  transition: background .18s;
}
.primary-link:hover { background: #f1dfa9; }
.primary-link span, .secondary-link span { display: inline-block; transition: transform .25s ease; }
.primary-link:hover span, .secondary-link:hover span { transform: translate(3px, -2px); }
.secondary-link { display: inline-flex; align-items: center; gap: 14px; color: #d9e0dc; font-size: 13px; }
.secondary-link:hover, .section-heading > a:hover { text-decoration: underline; text-underline-offset: 5px; }

.world-controls {
  position: absolute;
  z-index: 2;
  right: clamp(24px, 6vw, 104px);
  bottom: 24px;
  left: clamp(24px, 6vw, 104px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
.scene-caption { margin-right: auto; color: #a5b4b3; font: 11px Consolas, monospace; white-space: nowrap; }
.scene-switch { position: relative; display: flex; gap: 2px; padding: 4px; border: 1px solid #445052; border-radius: 5px; background: #252d2e; }
.scene-switch::before {
  content: "";
  position: absolute;
  top: 4px;
  left: var(--indicator-x, 4px);
  width: var(--indicator-width, 45px);
  height: calc(100% - 8px);
  border-radius: 3px;
  background: #455b5b;
  transition: left .32s cubic-bezier(.2, .8, .2, 1), width .32s cubic-bezier(.2, .8, .2, 1);
}
.scene-switch button {
  position: relative;
  z-index: 1;
  min-width: 45px;
  min-height: 34px;
  padding: 6px 10px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #b5c2c0;
  font-size: 11px;
  white-space: nowrap;
}
.scene-switch button:hover { color: #f0f3ec; }
.scene-switch [aria-pressed="true"] { color: #fff; }
#motion {
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #445052;
  border-radius: 5px;
  background: #252d2e;
  color: #e0e9e7;
  font-size: 16px;
}
#motion { transition: background .2s, border-color .2s, transform .2s; }
#motion:hover { background: #344344; border-color: #80a6a5; transform: translateY(-2px); }
#world-fallback { position: absolute; inset: 25% 7% 20% 52%; display: flex; align-items: center; justify-content: center; gap: 25px; }
#world-fallback[hidden] { display: none; }
#world-fallback img { width: 72px; height: 72px; image-rendering: pixelated; }

.features-band, .projects-band { padding-inline: clamp(24px, 6vw, 104px); }
.features-band { padding-block: 70px 82px; background: #f8faf7; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; max-width: 1320px; margin: 0 auto 30px; }
.section-heading .eyebrow { margin: 0 0 8px; color: #62816c; font: 600 10px Consolas, monospace; }
.section-heading h2 { margin: 0; color: #233029; font-size: 29px; line-height: 1.25; font-weight: 650; }
.section-heading > a { padding-bottom: 3px; color: #345c42; font-size: 13px; white-space: nowrap; }
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 38px 28px; max-width: 1320px; margin: auto; }
.feature-card { display: block; position: relative; min-width: 0; padding-top: 14px; border-top: 1px solid #cbd7cd; }
.feature-card img { width: 100%; height: 220px; object-fit: cover; background: #e6ebe5; transition: filter .2s; }
.feature-card:hover img { filter: brightness(1.08) saturate(1.08); }
.feature-card div { padding: 17px 38px 0 0; }
.feature-card strong { display: block; margin-bottom: 6px; color: #25322a; font-size: 18px; font-weight: 630; }
.feature-card span { display: block; color: #617069; font-size: 13px; line-height: 1.6; }
.feature-card::after { content: "↗"; position: absolute; right: 2px; bottom: 18px; color: #456d50; font-size: 17px; transition: transform .22s; }
.feature-card:hover::after { transform: translate(3px, -3px); }

.projects-band { padding-block: 64px 74px; background: #e8eee8; }
.projects-band .section-heading { margin-bottom: 32px; }
.family { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; max-width: 1320px; margin: auto; }
.family-product { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: start; gap: 18px; padding-top: 22px; border-top: 1px solid #b9c9bc; }
.family-product > img { width: 46px; height: 46px; border-radius: 6px; image-rendering: pixelated; }
.family-product strong { display: block; color: #223029; font-size: 19px; font-weight: 650; }
.family-product span:not(.family-go) { display: block; margin-top: 4px; color: #637468; font-size: 12px; }
.family-product p { margin: 15px 0 0; color: #4c6053; font-size: 13px; line-height: 1.7; }
.family-go { padding-top: 5px; color: #315f3e; font-size: 12px; white-space: nowrap; }
.family-product:hover .family-go { text-decoration: underline; text-underline-offset: 5px; }
.family-product > img { transition: transform .25s; }
.family-product:hover > img { transform: translateY(-3px); }

.hero-copy > * { animation: hero-arrive .5s cubic-bezier(.2, .8, .2, 1) both; }
.hero-copy h1 { animation-delay: .04s; }
.hero-line { animation-delay: .08s; }
.hero-subtitle { animation-delay: .12s; }
.hero-actions { animation-delay: .16s; }
.feature-card.is-visible, .family-product.is-visible { animation: surface-arrive .55s both; }
@keyframes hero-arrive {
  from { opacity: .78; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes surface-arrive {
  from { opacity: .75; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px clamp(24px, 6vw, 104px); color: #6b796f; background: #f8faf7; font-size: 12px; }
footer .wordmark { color: #25322a; font-size: 18px; font-weight: 700; }
footer > div { display: flex; gap: 24px; }
footer a:hover { color: #315f3e; }

@media (max-width: 1100px) {
  .hero-copy { max-width: 42%; }
  .hero h1 { font-size: 59px; }
  .hero-line { font-size: 23px; }
  .feature-card img { height: 190px; }
}

@media (max-width: 760px) {
  .nav-tag { display: none; }
  .hero { height: min(720px, calc(100svh - 130px)); min-height: 0; }
  .hero::after { background: linear-gradient(180deg, rgba(27, 32, 33, .75), rgba(27, 32, 33, .43) 35%, transparent 66%); }
  .hero-copy { position: relative; top: auto; left: auto; width: auto; max-width: none; padding: 30px 24px 0; transform: none; }
  .hero-copy .eyebrow { margin-bottom: 12px; font-size: 10px; }
  .hero h1 { font-size: 46px; }
  .hero-line { margin: 7px 0 9px; font-size: 20px; }
  .hero-subtitle { max-width: 310px; font-size: 12px; line-height: 1.65; }
  .hero-actions { gap: 19px; margin-top: 18px; }
  .primary-link { min-width: 130px; padding: 11px 14px; font-size: 12px; }
  .secondary-link { gap: 9px; font-size: 12px; }
  .world-controls { right: 18px; bottom: 15px; left: 18px; gap: 8px; }
  .scene-caption { display: none; }
  .scene-switch { min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; }
  .scene-switch::-webkit-scrollbar { display: none; }
  .scene-switch button { flex: 1 0 auto; min-width: 0; padding-inline: 9px; font-size: 10px; }
  #motion { flex-basis: 42px; }
  #world-fallback { inset: 50% 10% 14%; }
  .features-band { padding-block: 48px 58px; }
  .section-heading { align-items: end; margin-bottom: 23px; }
  .section-heading h2 { font-size: 23px; }
  .section-heading > a { font-size: 11px; }
  .feature-grid { grid-template-columns: 1fr; gap: 28px; }
  .feature-card img { height: 190px; }
  .feature-card strong { font-size: 16px; }
  .projects-band { padding-block: 50px 58px; }
  .family { grid-template-columns: 1fr; gap: 28px; }
  .family-product { grid-template-columns: 46px minmax(0, 1fr); }
  .family-go { grid-column: 2; padding-top: 0; }
  footer { flex-wrap: wrap; }
}

@media (max-width: 370px) {
  .hero-copy { padding: 22px 18px 0; }
  .hero h1 { font-size: 41px; }
  .hero-subtitle { font-size: 11px; }
  .world-controls { left: 12px; right: 12px; }
  .scene-switch button { padding-inline: 7px; }
  .features-band, .projects-band { padding-inline: 18px; }
  .family-product { grid-template-columns: 40px minmax(0, 1fr); gap: 13px; }
  .family-product > img { width: 40px; height: 40px; }
  .family-go { grid-column: 2; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
