/* Hallmark · theme: custom · idea: a muted skate poster opens into illustrated research notes and a release index · vibe: warm paper, smoky blue, scientific illustration */
/* Hallmark · pre-emit critique: the diagrams and their controls carry the research; the introductory copy stays compact. */
/* Hallmark · waive 59 · the introductory panel and research index sit close together · readers can reach the work on the huluxiaohuowa homepage without crossing an empty band */
/* Hallmark · waive 79 · the lower right of the hero contains the skate illustration below the last text baseline · the copy stays compact at the user's request */
@font-face {
  font-family: "Huowa Display";
  src: url("./assets/title.woff2") format("woff2");
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #f0eee8;
  --ink: #292d30;
  --muted: #545e61;
  --accent: #365160;
  --accent-deep: #29414f;
  --on-color: #f5f3ee;
  --rule: #b3b8b6;
  --paper-raised: #e1e7e6;
  --poster: #d5dde0;
  --poster-edge: #62757b42;
  --poster-grid: #70868f22;
  --track: #667f884c;
  --cool-wash: #e2e7e6;
  --warm-wash: #e8e3d9;
  --workflow-surface: #dfe5e5;
  --shadow: #25383e25;
  --flow-line: rgba(84, 113, 124, .16);
  --flow-point: rgba(73, 105, 117, .44);
  --clear: transparent;
  --font-body: ui-sans-serif, system-ui, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Huowa Display", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-latin: "Arial Narrow", "Helvetica Neue", system-ui, sans-serif;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --shell: 1264px;
  --gutter: clamp(20px, 5.2vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  overflow-x: clip;
  isolation: isolate;
  margin: 0;
  min-width: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--font-body);
}
.page-flow {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
.shell { width: min(var(--shell), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip-link {
  position: fixed;
  z-index: 3;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 8px 16px;
  background: var(--ink);
  color: var(--on-color);
  clip-path: inset(50%);
  pointer-events: none;
}
.skip-link:focus-visible { clip-path: none; pointer-events: auto; }

.mast { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); min-height: 78px; border-bottom: 1px solid var(--rule); }
.brand, .footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 800; white-space: nowrap; }
.brand { font-size: clamp(17px, 1.6vw, 24px); }
.mast-line { flex: 1; }
.nav { display: flex; align-items: center; gap: clamp(12px, 2.4vw, 36px); white-space: nowrap; }
.nav a { padding: 8px 0; font-weight: 650; }
.nav a:hover, .profile-link:hover, .footer a:hover { color: var(--accent); }
.languages { display: flex; gap: 2px; border: 1px solid var(--rule); border-radius: 8px; padding: 2px; }
.languages button {
  min-width: 39px;
  min-height: 32px;
  padding-inline: 4px;
  white-space: nowrap;
  background: var(--clear);
  border: 0;
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  border-radius: 5px;
}
.languages button[aria-pressed="true"] { color: var(--ink); background: var(--paper-raised); }
.languages button:hover { color: var(--ink); }
.languages button:disabled { opacity: .55; cursor: default; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: center;
  min-height: clamp(470px, 39vw, 620px);
  gap: clamp(16px, 3vw, 48px);
  padding-block: clamp(24px, 4vw, 64px);
}
.hero-copy { z-index: 1; padding-block: 32px 48px; }
.hero h1 {
  font-family: var(--font-latin);
  font-weight: 850;
  font-size: clamp(37px, 6.5vw, 100px);
  line-height: .98;
  letter-spacing: -.072em;
  width: fit-content;
  min-width: 0;
  overflow-wrap: break-word;
  margin-inline-start: .05em;
  color: var(--ink);
}
.hero h1 span {
  display: block;
  animation: title-pass 850ms var(--ease-out) both;
}
.hero-copy p {
  color: var(--muted);
  max-width: 33ch;
  margin-top: clamp(16px, 2.25vw, 32px);
  font-size: clamp(17px, 1.3vw, 21px);
  font-weight: 580;
  animation: copy-pass 660ms 240ms var(--ease-out) both;
}
.hero-links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 44px);
  margin-top: 24px;
  animation: copy-pass 660ms 320ms var(--ease-out) both;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 12px clamp(20px, 2.7vw, 40px);
  background: var(--accent);
  color: var(--on-color);
  border-radius: 8px;
  font-size: clamp(15px, 1.35vw, 18px);
  font-weight: 850;
  transition: transform 180ms var(--ease-out);
}
.primary:hover { background: var(--accent-deep); transform: translateY(-2px); }
.primary:active { transform: translateY(1px); }
.profile-link { padding-block: 8px; border-bottom: 1px solid var(--accent); font-weight: 740; }
.art {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  aspect-ratio: 1.22;
  isolation: isolate;
}
.art::before {
  content: "";
  position: absolute;
  inset: 4% 1% 4% 0;
  transform: skewY(-5deg);
  border-radius: 12px;
  background:
    linear-gradient(var(--poster-grid) 1px, var(--clear) 1px),
    linear-gradient(90deg, var(--poster-grid) 1px, var(--clear) 1px),
    var(--poster);
  background-size: 34px 34px;
  box-shadow: 0 14px 32px var(--shadow);
  z-index: -2;
  animation: poster-pass 900ms var(--ease-out) both;
}
.orbit, .character { grid-area: 1 / 1; position: relative; }
.orbit { width: 100%; height: 100%; z-index: -1; overflow: clip; }
.orbit-arc {
  position: absolute;
  top: 64%;
  left: 6%;
  width: 90%;
  height: 2px;
  background: var(--track);
  transform: translateX(-15%) rotate(-23deg);
  opacity: .65;
  animation: streak-pass 1120ms 90ms var(--ease-out) both;
  transform-origin: left center;
}
.orbit-arc:nth-child(2) { top: 78%; left: 20%; height: 3px; animation-delay: 220ms; }
.orbit-arc:nth-child(3) { top: 84%; left: 34%; width: 70%; animation-delay: 340ms; }
.motion-trace {
  position: absolute;
  inset: 15% 5% 18%;
  border: 1px solid var(--poster-edge);
  transform: skewY(-5deg);
  animation: trace-pass 1100ms 180ms var(--ease-out) both;
}
.character { width: 94%; margin-block: -6%; }
.character img { width: 100%; height: auto; filter: drop-shadow(12px 18px 16px var(--shadow)); animation: arrival 1350ms 95ms var(--ease-out) both; }
@keyframes arrival {
  0% { opacity: .28; transform: translate3d(32%, -15%, 0) rotate(26deg) scale(.9); }
  62% { opacity: 1; transform: translate3d(-2.5%, 2.4%, 0) rotate(-5deg) scale(1.025); }
  83% { transform: translate3d(.6%, -.85%, 0) rotate(1deg) scale(1); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0) scale(1); }
}
@keyframes title-pass {
  from { opacity: 0; transform: translate3d(-.26em, .18em, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes copy-pass {
  from { opacity: 0; transform: translate3d(0, 13px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes poster-pass {
  from { opacity: 0; transform: translate3d(8%, 4%, 0) skewY(2deg) scale(.96); }
  to { opacity: 1; transform: translate3d(0, 0, 0) skewY(-5deg) scale(1); }
}
@keyframes streak-pass {
  from { opacity: 0; transform: translateX(-42%) rotate(-23deg) scaleX(.92); }
  50% { opacity: .85; }
  to { opacity: .65; transform: translateX(-15%) rotate(-23deg) scaleX(1); }
}
@keyframes trace-pass {
  from { opacity: 0; transform: translateX(10%) skewY(0) scale(.94); }
  to { opacity: 1; transform: translateX(0) skewY(-5deg) scale(1); }
}

.catalog { padding-block: clamp(56px, 8vw, 112px) 32px; scroll-margin-top: 20px; }
.section-heading { display: flex; align-items: center; gap: clamp(16px, 3.7vw, 52px); }
.section-heading h2 {
  font: 900 clamp(32px, 4vw, 60px)/1.05 var(--font-display);
  white-space: normal;
  min-width: 0;
  overflow-wrap: break-word;
  letter-spacing: -.06em;
}
html:lang(en) .section-heading h2 { font-family: var(--font-latin); }
.section-heading > span { height: 1px; background: var(--rule); color: var(--ink); flex: 1; }
.apps { list-style: none; padding: 0; margin: clamp(24px, 3vw, 36px) 0 0; }
.app {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.55fr) auto;
  align-items: center;
  gap: clamp(16px, 3.2vw, 44px);
  border-top: 1px solid var(--rule);
  padding: 20px 4px;
}
.app:last-child { border-bottom: 1px solid var(--rule); }
.app.entered { animation: row-pass 580ms var(--ease-out) both; }
@keyframes row-pass {
  from { opacity: .42; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.app h3 { font-size: clamp(23px, 2.5vw, 37px); font-weight: 850; line-height: 1.15; letter-spacing: -.045em; }
.app-info p { color: var(--muted); margin-top: 4px; max-width: 46ch; }
.downloads { display: grid; gap: 4px; align-content: center; min-width: 0; }
.release {
  display: grid;
  grid-template-columns: minmax(104px, 1.2fr) minmax(55px, .62fr) minmax(86px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 8px;
  font-size: 14px;
}
.platform { font-weight: 700; }
.version, .release time { color: var(--muted); font-variant-numeric: tabular-nums; }
.release time { white-space: nowrap; }
.download-action { color: var(--ink); justify-self: end; white-space: nowrap; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule); }
.release:hover { background: var(--paper-raised); }
.release:hover .download-action { color: var(--accent); text-decoration-color: var(--accent); }
.official { display: flex; align-items: center; gap: 8px; padding: 8px 4px; font-weight: 700; white-space: nowrap; }
.official svg { width: 24px; height: 24px; stroke: var(--accent); stroke-width: 1.7; fill: none; transition: transform 180ms var(--ease-out); }
.official:hover svg { transform: translateX(4px); }
.research { padding-block: clamp(28px, 4vw, 64px) clamp(60px, 7vw, 104px); scroll-margin-top: 20px; }
.research-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(24px, 4vw, 64px);
  row-gap: 44px;
  margin-top: clamp(28px, 4vw, 52px);
}
.research-story { display: flex; flex-direction: column; min-width: 0; border-top: 2px solid var(--accent); padding-top: 16px; }
.research-story h3 { font-size: clamp(22px, 2.4vw, 36px); line-height: 1.15; letter-spacing: -.035em; }
.research-story > p { color: var(--muted); margin: 12px 0 20px; max-width: 58ch; }
.research-story .demo { margin-top: auto; }
.publication-link {
  display: inline-block;
  margin-top: 16px;
  padding-block: 8px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.publication-link:hover { color: var(--accent-deep); }
.demo { margin: 0; min-width: 0; }
.demo-stage {
  aspect-ratio: 36 / 17;
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: clip;
  background: var(--cool-wash);
}
.demo-screen .demo-stage { background: var(--warm-wash); }
.science-plate { display: block; width: 100%; height: 100%; object-fit: cover; }
.science-plate[hidden] { display: none; }
.demo.ready .science-plate:not([hidden]) { animation: plate-pass 335ms var(--ease-out) both; }
.figure-source {
  display: inline-block;
  color: var(--accent);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.demo-controls { display: none; }
.demo.ready .demo-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; margin: 12px 0 12px; }
.demo-controls button {
  display: block;
  align-self: stretch;
  min-height: 42px;
  padding: 8px 4px;
  border: 1px solid var(--clear);
  border-bottom-color: var(--rule);
  border-radius: 5px;
  background: var(--clear);
  cursor: pointer;
  font-size: clamp(12px, 1.3vw, 15px);
  font-weight: 700;
  line-height: 1.25;
  transition: color 170ms ease, background-color 170ms ease;
}
.demo-controls button:hover { background: var(--paper-raised); }
.demo-controls button[aria-pressed="true"] { background: var(--paper-raised); border-color: var(--accent); color: var(--accent); }
.demo figcaption { min-height: 3.2em; color: var(--muted); font-size: 14px; }
.demo:not(.ready) figcaption span { display: block; padding-top: 8px; }
.workflow {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 5vw, 76px);
  padding: clamp(24px, 4vw, 56px);
  background: var(--workflow-surface);
  color: var(--ink);
  border-radius: 15px;
}
.workflow-copy h2 { font-size: clamp(30px, 4.1vw, 58px); line-height: 1.05; letter-spacing: -.056em; min-width: 0; overflow-wrap: break-word; text-wrap: pretty; }
.workflow-copy p { margin-top: 16px; max-width: 38ch; }
.workflow .demo-controls button:hover, .workflow .demo-controls button[aria-pressed="true"] { background: var(--paper); }
.research-story.entered .demo-stage, .workflow.entered .demo-stage { animation: figure-pass 850ms var(--ease-out) both; }
.research-story:nth-child(2).entered .demo-stage { animation-delay: 135ms; }
[data-reveal].entered { animation: copy-pass 730ms var(--ease-out) both; }
@keyframes figure-pass {
  from { opacity: .38; transform: translate3d(0, 24px, 0) scale(.97); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes plate-pass {
  from { opacity: .64; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
.footer { display: flex; align-items: center; gap: 24px; min-height: 112px; color: var(--muted); font-size: 14px; }
.footer-brand { margin-inline-end: auto; color: var(--ink); }

@media (max-width: 940px) {
  .app { grid-template-columns: minmax(0, .9fr) minmax(0, 1.55fr) auto; gap: 16px; }
  .release { grid-template-columns: minmax(0, 1fr) 56px max-content max-content; gap: 8px; }
  .hero { min-height: 450px; }
}

@media (max-width: 710px) {
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; align-items: start; }
  .mast { min-height: 66px; gap: 12px; }
  .mast-line { min-width: 0; }
  .brand img { width: 29px; height: 29px; }
  .brand { gap: 4px; }
  .nav { gap: 12px; font-size: 14px; }
  .languages button { min-width: 32px; }
  .hero-copy { padding: 24px 0 0; }
  .hero h1 { font-size: clamp(34px, 10.7vw, 76px); }
  .hero-copy p { margin-top: 16px; }
  .hero-links { margin-top: 16px; }
  .primary { min-height: 48px; }
  .art { width: min(100%, 510px); margin: 28px auto 0; }
  .character { width: 95%; }
  .research-grid, .workflow { grid-template-columns: minmax(0, 1fr); }
  .app { grid-template-columns: minmax(0, 1fr) auto; row-gap: 12px; padding: 16px 0; }
  .app-info { grid-column: 1; }
  .official { grid-column: 2; grid-row: 1; }
  .downloads { grid-column: 1 / -1; }
  .release { grid-template-columns: minmax(0, 1fr) minmax(49px, .58fr) max-content max-content; padding-inline: 4px; }
  .footer { gap: 16px; min-height: 96px; }
}

@media (max-width: 375px) {
  :root { --gutter: 16px; }
  .mast { gap: 8px; flex-wrap: wrap; padding-block: 12px; }
  .brand { font-size: 15px; }
  .brand img { width: 24px; height: 24px; }
  .mast-line { display: none; }
  .nav { gap: 12px; margin-inline-start: auto; font-size: 12px; }
  .languages button { min-width: 26px; font-size: 12px; }
  .release { gap: 4px; padding-inline: 0; font-size: 13px; }
}

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