:root {
  --ink: #1F2148;
  --paper: #F5F6FA;
  --tint: #E9ECF5;
  --gold: #F6C445;
  --cinnabar: #C42F2A;
  --white: #FFFFFF;
  --muted: #4A4D6E;
  --gutter: max(16px, 4vw);
  --cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

/* Language state lives only on <html lang>; each copy pair shows one side. */
html[lang="en"] [lang="zh-CN"]:not(html),
html[lang="zh-CN"] [lang="en"]:not(html) { display: none; }

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", var(--cjk);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

html[lang="zh-CN"] body { line-height: 1.75; }

h1, h2, h3 { margin: 0; line-height: 1.1; text-wrap: balance; }
html[lang="zh-CN"] :is(h1, h2, h3) { line-height: 1.35; }

h2 {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
  font-weight: 850;
  font-stretch: 112%;
  letter-spacing: -0.01em;
  margin-bottom: 1.5rem;
}

h3 { font-size: 1.2rem; font-weight: 750; }

p { margin: 0.5rem 0 0; max-width: 62ch; text-wrap: pretty; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Header */
.site-header { background: var(--gold); }

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  padding-block: 1rem;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 800;
  font-stretch: 115%;
  font-size: 1.15rem;
  margin-right: auto;
}

.lockup b { font-family: var(--cjk); font-weight: 800; }

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  order: 3;
  width: 100%;
  font-size: 0.95rem;
}

.site-nav a {
  text-decoration: none;
  font-weight: 600;
  padding-block: 0.25rem;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover { border-bottom-color: var(--ink); }

.lang-toggle {
  font: inherit;
  font-family: var(--cjk);
  font-weight: 700;
  min-width: 3.5rem;
  padding: 0.4rem 0.9rem;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--ink);
  color: var(--gold);
  cursor: pointer;
}

.lang-toggle:hover { background: transparent; color: var(--ink); }

@media (min-width: 760px) {
  .site-nav { order: 0; width: auto; font-size: 1rem; }
}

/* Hero */
.hero {
  background: var(--gold);
  padding-block: 1.5rem 4rem;
}

.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 8.5vw, 5.25rem);
  font-weight: 900;
  font-stretch: 125%;
  letter-spacing: -0.02em;
  line-height: 1;
}

html[lang="zh-CN"] .hero h1 {
  font-size: clamp(2.2rem, 7.5vw, 4.5rem);
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.hero-sub {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  max-width: 34rem;
}

.button {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.9rem 1.6rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}

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

.hero-art {
  position: relative;
  justify-self: center;
  width: min(100%, 22rem);
  order: -1;
}

.hero-cat { display: block; width: 48%; margin-inline: auto; overflow: visible; }

.hero-hat {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: hat-drop 900ms cubic-bezier(.2, .9, .3, 1.25) 200ms both;
}

@keyframes hat-drop {
  from { transform: translateY(-140%) rotate(-18deg); opacity: 0; }
  60% { opacity: 1; }
  to { transform: none; opacity: 1; }
}

.seal {
  position: absolute;
  right: 4%;
  bottom: 4%;
  writing-mode: vertical-rl;
  font-family: var(--cjk);
  font-weight: 800;
  font-size: clamp(1rem, 3vw, 1.5rem);
  letter-spacing: 0.15em;
  color: var(--white);
  background: var(--cinnabar);
  padding: 0.6em 0.35em;
  border-radius: 6px;
  transform: rotate(4deg);
}

@media (min-width: 760px) {
  .hero { padding-block: 4rem 6rem; }
  .hero-grid { grid-template-columns: 1.5fr 1fr; }
  .hero-art { order: 0; }
  .hero-cat { width: 100%; }
}

/* Sections */
.section { padding-block: 4rem; }
.section-tint { background: var(--tint); }

.lede { font-size: 1.15rem; color: var(--muted); margin: -0.5rem 0 2rem; }

/* Services */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2rem 2.5rem;
}

.service { border-top: 3px solid var(--ink); padding-top: 1rem; }
.service p { color: var(--muted); }

.service-feature {
  border-top: 0;
  background: var(--ink);
  color: var(--white);
  border-radius: 1.25rem;
  padding: 1.75rem;
}

.service-feature h3 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  font-weight: 850;
  font-stretch: 112%;
  color: var(--gold);
}

.service-feature p { color: var(--white); font-size: 1.1rem; margin-top: 1rem; }

@media (min-width: 760px) {
  .services { grid-template-columns: repeat(3, 1fr); }
  .service-feature { grid-column: span 2; grid-row: span 2; padding: 2.5rem; }
}

/* Platforms */
.platforms { display: grid; gap: 1rem; align-items: center; }

.platform-group {
  border-radius: 1.25rem;
  padding: 1.5rem;
  background: var(--white);
  border: 2px solid var(--ink);
}

.platform-china { background: var(--cinnabar); border-color: var(--cinnabar); color: var(--white); }

.platform-group h3 { margin-bottom: 1rem; }

.badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badges li {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 2px solid currentColor;
  font-weight: 600;
}

.bridge {
  justify-self: center;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--gold);
  font-size: 1.6rem;
  font-weight: 700;
  transform: rotate(90deg);
}

@media (min-width: 760px) {
  .platforms { grid-template-columns: 1fr auto 1fr; gap: 1.25rem; align-items: stretch; }
  .bridge { align-self: center; transform: none; }
}

/* Process */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.75rem;
  counter-reset: step;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3.5rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--gold);
  font-weight: 900;
  font-stretch: 125%;
  font-size: 1.15rem;
}

.steps p { color: var(--muted); }

@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
  .steps li { padding-left: 0; padding-top: 3.5rem; }
  .steps li::after {
    content: "";
    position: absolute;
    top: 1.15rem;
    left: 3rem;
    right: -1rem;
    border-top: 2px dashed var(--ink);
  }
  .steps li:last-child::after { display: none; }
}

/* About */
.about { display: grid; gap: 1.5rem; align-items: center; }

.about-mark {
  margin: 0;
  font-family: var(--cjk);
  font-weight: 900;
  font-size: clamp(3.5rem, 12vw, 6rem);
  line-height: 1;
  color: var(--cinnabar);
}

@media (min-width: 760px) {
  .about { grid-template-columns: auto 1fr; gap: 3.5rem; }
  .about-mark { writing-mode: vertical-rl; letter-spacing: 0.08em; }
}

/* Contact */
.contact { background: var(--ink); color: var(--white); padding-block: 5rem; }
.contact .lede { color: var(--tint); }
.contact :focus-visible { outline-color: var(--gold); }

.email {
  display: inline-block;
  color: var(--gold);
  font-weight: 850;
  font-stretch: 112%;
  font-size: clamp(1.3rem, 5.5vw, 2.75rem);
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

.email:hover { color: var(--white); }

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--tint);
  border-top: 1px solid var(--muted);
  padding-block: 1.5rem;
  font-size: 0.95rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-hat { animation: none; }
}
