@font-face {
  font-family: Fredoka;
  src: url("assets/roam-word.ttf") format("truetype");
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f8f6ee;
  --ink: #253834;
  --muted: #50666a;
  --green: #146451;
  --mint: #dbeee2;
  --line: #d9dfd2;
  --white: #fffdf7;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; color: inherit; }
button, .button, .nav-cta { transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease; }
:focus-visible { outline: 3px solid #b45b27; outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
.wrap, .masthead { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; top: 8px; left: 8px; z-index: 2; padding: 12px; background: white; transform: translateY(-160%); }
.skip:focus { transform: none; }
.masthead { display: flex; align-items: center; justify-content: space-between; min-height: 82px; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font: 600 24px Fredoka, sans-serif; }
.brand img, .download-icon { border-radius: 24%; }
nav { display: flex; gap: clamp(16px, 4vw, 42px); color: var(--muted); font-size: 14px; font-weight: 600; }
nav a:hover, .footer a:hover { color: var(--green); text-decoration: underline; }
.nav-cta, .button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 700; }
.nav-cta { background: var(--white); white-space: nowrap; }
.hero { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.2fr); align-items: center; gap: clamp(20px, 3.5vw, 48px); padding-block: clamp(40px, 5vw, 76px); }
h1 { margin: 0 0 24px; font-family: "Songti SC", "Noto Serif CJK SC", SimSun, serif; font-size: clamp(34px, 5.1vw, 67px); font-weight: 700; line-height: 1.2; letter-spacing: -.065em; }
h1 em { color: var(--green); font-style: normal; }
.hero-description, .section-top > p { max-width: 355px; color: var(--muted); line-height: 1.8; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.primary { background: var(--green); border-color: var(--green); color: white; }
.primary:hover { background: #0d4d3d; }
.quiet { background: transparent; }
.quiet:hover, .nav-cta:hover { background: var(--mint); }
.capture-flow { position: relative; isolation: isolate; width: 100%; max-width: 650px; min-width: 0; margin-inline: auto; aspect-ratio: 1.13; }
.capture-flow::before { position: absolute; z-index: -1; inset: 8% 2% 9% 8%; border-radius: 48% 46% 42% 44%; background: #e2ebda; content: ""; transform: rotate(-8deg); }
.capture-photo, .capture-result { position: absolute; padding: clamp(6px, 1vw, 12px); background: var(--white); border: 1px solid #dbded1; box-shadow: 0 14px 30px #2e392b20; }
.capture-photo { inset: 3% 19% 10% 2%; display: flex; flex-direction: column; transform: rotate(-4deg); border-radius: 10px; }
.capture-frame { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 5px; background: #b9a787; }
.capture-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 59%; }
.capture-focus { position: absolute; inset: 45% 5% 15% 39%; color: #fffbdd; filter: drop-shadow(0 1px 2px #35261d70); }
.capture-focus::before, .capture-focus::after { position: absolute; inset: 0; border: solid currentColor; content: ""; }
.capture-focus::before { border-width: 2px 0; clip-path: polygon(0 0, 14% 0, 14% 20%, 86% 20%, 86% 0, 100% 0, 100% 100%, 86% 100%, 86% 80%, 14% 80%, 14% 100%, 0 100%); }
.capture-focus::after { border-width: 0 2px; clip-path: polygon(0 0, 100% 0, 100% 17%, 0 17%, 0 83%, 100% 83%, 100% 100%, 0 100%); }
.capture-result { right: 1%; bottom: 5%; width: 39%; padding: clamp(10px, 2vw, 22px); border-radius: clamp(12px, 1.6vw, 21px); background: #fbf9e9; transform: rotate(6deg); }
.capture-result img { width: 100%; height: auto; filter: drop-shadow(0 4px 4px #54453130); }
.capture-flow figcaption { margin: 7px 4px 0; color: var(--green); font-size: clamp(11px, 1.2vw, 14px); font-weight: 700; }
.capture-result figcaption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; }
.capture-result strong { font: 600 clamp(29px, 5vw, 67px)/.95 Fredoka, sans-serif; }
.experience { background: #244437; padding-block: clamp(46px, 6vw, 84px); }
.experience .section-top { color: #f7f4e8; }
.experience .section-top p { color: #dce9da; }
.section-top { display: flex; justify-content: space-between; align-items: end; gap: 16px 30px; margin-bottom: 28px; }
h2 { margin-top: 7px; font-size: clamp(29px, 4vw, 48px); line-height: 1.2; letter-spacing: -.04em; }
.demo-shell { padding: clamp(12px, 2.35vw, 28px); background: var(--white); border-radius: 22px; box-shadow: 0 12px 28px #102d2470; }
.demo-bar, .scene-options, .objects { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.demo-bar { justify-content: space-between; margin-bottom: 15px; }
.scene-options button, .objects button, .mode, .audio-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 13px; font-weight: 650; }
button[aria-pressed="true"], .audio-button:hover { background: var(--mint); color: #124e3d; border-color: #9fc5ae; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.demo-photo { position: relative; }
.demo-photo > img { width: 100%; height: auto; border-radius: 16px; }
.pins { position: absolute; inset: 0; pointer-events: none; }
.pin { position: absolute; pointer-events: auto; transform: translate(-50%, -50%); display: grid; place-items: center; width: clamp(32px, 4vw, 45px); aspect-ratio: 1; padding: 0; border: 2px solid white; border-radius: 50%; background: #213c3ad9; color: white; box-shadow: 0 2px 12px #1117; font: 600 17px Fredoka, sans-serif; }
.pin[aria-pressed="true"] { background: #c7efae; border-color: white; color: #173f26; }
[data-scene="breakfast"] .pin:nth-child(3) { margin-left: 16px; }
.objects { margin-top: 11px; }
.demo-card { min-width: 0; display: grid; align-content: center; justify-items: start; gap: 9px; padding: clamp(15px, 3vw, 34px); border-radius: 16px; background: #eeeee0 radial-gradient(#87978c45 .75px, transparent .75px) 0 0 / 15px 15px; }
.stick { width: clamp(110px, 18vw, 195px); height: clamp(90px, 13vw, 145px); object-fit: contain; justify-self: center; filter: drop-shadow(0 5px 4px #233b3b36); animation: stick-in .24s ease-out both; }
@keyframes stick-in {
  from { opacity: .3; transform: translateY(5px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.word-title:lang(zh-CN) { font: 700 clamp(22px, 3vw, 34px)/1.2 "PingFang SC", system-ui, sans-serif; }
.word-title { font: 600 clamp(31px, 4.6vw, 59px)/.98 Fredoka, sans-serif; overflow-wrap: anywhere; }
.word-meaning, .demo-note { color: var(--muted); }
.word-meaning span { margin-left: 8px; font-size: 13px; }
.example { border-top: 1px solid #b6c5b9; padding-top: 9px; width: 100%; line-height: 1.45; }
.example [lang] { font-weight: 650; }
.example p + p { font-size: 13px; margin-top: 3px; color: var(--muted); }
.audio-controls { display: flex; gap: 7px; flex-wrap: wrap; }
.audio-button { min-height: 40px; }
.demo-note { margin-top: 13px; font-size: 13px; line-height: 1.6; }
/* The story pairs a photographed scene with the word it yields. */
.field-notes { padding-block: clamp(52px, 8vw, 116px); background: #efeddf; }
.field-layout { display: grid; grid-template-columns: minmax(0, .87fr) minmax(0, 1.13fr); align-items: center; gap: 32px clamp(30px, 7vw, 104px); }
.field-story h2 { margin: 0 0 22px; font: 700 clamp(36px, 4.3vw, 62px)/1.14 "Songti SC", "Noto Serif CJK SC", SimSun, serif; letter-spacing: -.045em; }
.field-story p { color: var(--muted); line-height: 1.85; }
.field-story p + p { margin-top: 15px; }
.field-story .field-lead { color: var(--ink); font-size: clamp(16px, 1.6vw, 20px); }
.field-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 15px; color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; }
.field-link:hover { color: #0d4d3d; }
.field-illustration { position: relative; align-self: center; padding: 0 5% 15% 0; }
.field-photo { padding: clamp(8px, 1vw, 14px); background: var(--white); border: 1px solid #d5d8c4; box-shadow: 0 16px 34px #353f291a; }
.field-photo img { width: 100%; height: auto; }
.field-photo figcaption { padding: 9px 3px 0; color: var(--muted); font-size: 12px; }
.field-stick { position: absolute; bottom: 0; right: 0; width: clamp(140px, 18vw, 228px); border: 1px solid #d3d5b8; background: #fbf9e9; padding: 8px 12px 13px; border-radius: 8px; box-shadow: 0 12px 25px #3c412c2b; transform: rotate(5deg); }
.field-stick img { width: 100%; height: auto; aspect-ratio: 1.32; object-fit: contain; }
.field-stick figcaption { display: flex; flex-direction: column; gap: 3px; color: var(--green); }
.field-stick strong { font: 600 clamp(22px, 2.65vw, 36px)/1 Fredoka, sans-serif; }
.field-stick span { font-size: 13px; }
.field-languages { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; padding-top: 22px; border-top: 1px solid #d3d6c2; }
.field-languages p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.app-preview { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); align-items: center; gap: clamp(22px, 5vw, 76px); margin-block: clamp(34px, 6vw, 72px); padding: clamp(20px, 4.8vw, 60px); border-radius: 23px; background: #eae6f0; }
.app-preview p { max-width: 350px; margin-block: 16px 22px; line-height: 1.8; color: var(--muted); }
.app-screens { display: grid; grid-template-columns: repeat(3, minmax(0, 160px)); justify-content: center; gap: clamp(10px, 2vw, 24px); }
.app-screens img { width: 100%; height: auto; border: 4px solid var(--ink); border-radius: clamp(12px, 2vw, 24px); box-shadow: 0 10px 24px #273c4130; }
.app-screens figcaption { margin-top: 10px; text-align: center; color: var(--muted); font-size: 13px; }
.download-body { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px clamp(20px, 5vw, 64px); padding: clamp(20px, 4vw, 47px); background: var(--mint); border-radius: 23px; }
.download-icon { margin-bottom: 15px; }
.download-body h2 { margin: 0 0 9px; }
.download-body p { color: var(--muted); line-height: 1.6; }
.download-code { align-self: center; justify-self: start; padding: 12px 12px 14px; background: #fff; border: 1px solid #cbded2; border-radius: 18px; }
.download-code img { width: 172px; height: auto; }
.download-code figcaption { text-align: center; color: var(--green); font-size: 13px; font-weight: 700; }
#copy-status { color: var(--green); min-height: 21px; margin-top: 6px; font-size: 13px; }
.footer { padding-block: 24px 34px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 13px; }
.footer .brand { color: var(--ink); font-size: 19px; }
@media (max-width: 820px) {
  .wrap, .masthead { width: calc(100% - 40px); }
  .hero { grid-template-columns: 1fr; gap: 25px; }
  .capture-flow { max-width: 540px; }
}
@media (max-width: 610px) {
  .wrap, .masthead { width: calc(100% - 28px); }
  .masthead { min-height: 64px; }
  .masthead nav { display: none; }
  .brand { font-size: 21px; }
  .brand img { width: 32px; height: 32px; }
  .nav-cta { padding-inline: 12px; }
  .section-top { display: grid; }
  .demo-grid, .field-layout, .app-preview { grid-template-columns: 1fr; }
  .field-languages { grid-column: auto; }
  .app-screens img { border-width: 2px; }
  .demo-card { min-height: 326px; }
  .pin { width: 28px; }
  .download-body { grid-template-columns: 1fr; }
  .download-icon { width: 52px; height: 52px; }
  .download-code { justify-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  button, .button, .nav-cta { transition: none; }
  .stick { animation: none; }
}
