:root {
  --ink: #14233F;
  --navy: #1E3A6E;
  --coral: #D9734E;
  --paper: #F4F5F7;
  --soft: rgba(244, 245, 247, 0.72);
  --m: 24px;
  --sans: "Hanken Grotesk", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; }

html {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Desktop: the stage holds the left 47%, text on the right, the name across the bottom. */
body {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-columns: 47vw 1fr;
  grid-template-rows: 1fr auto;
  overflow-x: hidden;
  overflow-x: clip;
}

::selection { background: var(--coral); color: var(--ink); }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

.stage {
  grid-column: 1;
  grid-row: 1 / -1;
  position: sticky;
  top: var(--m);
  height: calc(100svh - 2 * var(--m));
  margin: var(--m) 0 var(--m) var(--m);
  overflow: hidden;
  background: var(--navy);
}
.stage canvas { display: block; }
.fallback { position: absolute; top: 50%; left: 50%; width: 32%; transform: translate(-50%, -50%); }
.gl .fallback { display: none; }

.bar { position: absolute; top: 0; right: 0; z-index: 2; padding: var(--m) var(--m) 0 0; }
.lang { display: flex; gap: 4px; }
.lang button {
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  background: none;
  color: var(--soft);
  font: 500 16px/1 var(--sans);
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.lang button:hover { color: var(--paper); }
.lang button[aria-pressed="true"] { color: var(--paper); text-decoration: underline 2px; text-underline-offset: 7px; }

.col {
  grid-column: 2;
  grid-row: 1;
  align-self: center;
  max-width: 44rem;
  padding: clamp(72px, 9svh, 96px) var(--m) clamp(16px, 4svh, 40px) clamp(40px, 6vw, 112px);
}

h1 { font-weight: 600; font-size: clamp(30px, 2.8vw, 44px); line-height: 1.08; letter-spacing: -0.025em; }
:lang(zh) h1 { letter-spacing: 0; }
.lede { margin-top: 18px; max-width: 42ch; font-size: 18px; line-height: 1.55; }
:lang(zh) .lede { line-height: 1.75; }

.count { margin-top: clamp(28px, 5svh, 56px); }
.count[hidden] { display: none; }
.count-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; }
.num { margin-left: -0.05em; font-weight: 500; font-size: clamp(56px, min(7vw, 12svh), 120px); line-height: 0.9; letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.unit { font-size: 18px; line-height: 1.3; }
.pilot { margin-top: 12px; font-size: 18px; line-height: 1.5; color: var(--soft); }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; margin-top: clamp(20px, 4svh, 36px); }
.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 22px 0 24px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--ink);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}
.cta svg { width: 16px; height: 16px; transition: transform 0.2s var(--ease); }
.cta:hover { background: #E4835E; }
.cta:hover svg { transform: translateX(3px); }
.cta:active { transform: scale(0.97); }
.addr { color: var(--soft); font-size: 16px; text-decoration: none; transition: color 0.2s var(--ease); }
.addr:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 5px; }

.wordmark {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: end;
  position: relative;
  z-index: 1;
  margin: 0 var(--m) calc(var(--m) + 0.16em) 0;
  font-weight: 600;
  font-size: clamp(96px, min(17vw, 27svh), 300px);
  line-height: 0.8;
  letter-spacing: -0.045em;
  white-space: nowrap;
  transform-origin: right bottom;
}

/* Entrance: the panel unfolds, the name settles, then the column rises part by part. */
.stage { animation: unfold 1.1s var(--ease) both; transform-origin: center bottom; }
.wordmark { animation: settle 1.4s var(--ease) 0.1s both; }
.col h1, .lede, .num, .unit, .pilot, .cta, .addr, .lang button { animation: rise 0.9s var(--ease) both; }
.col h1 { animation-delay: 0.3s; }
.lede { animation-delay: 0.38s; }
.num { animation-delay: 0.46s; }
.unit { animation-delay: 0.52s; }
.pilot { animation-delay: 0.58s; }
.cta { animation-delay: 0.66s; }
.addr { animation-delay: 0.72s; }
.lang button { animation-name: fade; animation-delay: 0.8s; }
.lang button + button { animation-delay: 0.86s; }
.lang button + button + button { animation-delay: 0.92s; }
@keyframes unfold { from { opacity: 0; scale: 1 0.96; } }
@keyframes rise { from { opacity: 0; translate: 0 24px; } }
@keyframes settle { from { opacity: 0; translate: 0 0.12em; } }
@keyframes fade { from { opacity: 0; } }

/* Signature move: the name shrinks a little as the page scrolls (phones; desktop fits one screen). */
@supports (animation-timeline: scroll()) {
  .wordmark { scale: 1; animation: settle 1.4s var(--ease) 0.1s both, shrink linear both; animation-timeline: auto, scroll(root); animation-range: normal, 0 50vh; }
  @keyframes shrink { to { scale: 0.93; } }
}

/* Narrow screens: the stage on top, the name under it, the text below. Same query as before the redesign. */
@media not all and (min-width: 860px) and (min-aspect-ratio: 21/20) {
  :root { --m: 16px; }
  body { grid-template-columns: 1fr; grid-template-rows: auto auto auto; }
  .stage { grid-row: 1; position: relative; top: 0; height: 42svh; margin: var(--m) var(--m) 0; }
  .bar { padding: calc(var(--m) + 4px) calc(var(--m) + 4px) 0 0; }
  .wordmark { grid-column: 1; grid-row: 2; justify-self: start; margin: -3vw var(--m) 0; font-size: min(20vw, 180px); transform-origin: left top; }
  .col { grid-column: 1; grid-row: 3; max-width: 40rem; padding: 24px var(--m) 56px; align-self: start; }
  h1 { font-size: clamp(30px, 5vw, 48px); }
  .lede { font-size: clamp(18px, 2.4vw, 20px); }
  .count { margin-top: 32px; }
  .actions { margin-top: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .stage, .wordmark, .col h1, .lede, .num, .unit, .pilot, .cta, .addr, .lang button { animation: none; }
  .cta, .cta svg, .addr, .lang button { transition: none; }
}
