:root {
  color-scheme: dark;
  --ink: #f5f6ef;
  --muted: #a8aea3;
  --surface: #191d19;
  --line: #303830;
  --accent: #c9fa82;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #101310; color: var(--ink); }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.bar, nav, .brand { display: flex; align-items: center; gap: 20px; }
.bar { justify-content: space-between; min-height: 78px; border-bottom: 1px solid var(--line); }
.brand { gap: 8px; font-weight: 750; font-size: 21px; }
nav, footer { font-size: 14px; }
.pill, .button { display: inline-block; border-radius: 100px; padding: 11px 17px; }
.pill { border: 1px solid var(--line); }
.button { background: var(--accent); color: #182112; font-weight: 750; padding: 15px 24px; }
.button:hover { background: #dcffad; color: #182112; }
.button span { margin-left: 12px; }
.hero { padding-block: clamp(64px, 10vw, 135px); display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.eyebrow, .demo-head, .cards article > span { color: var(--accent); font: 12px ui-monospace, monospace; letter-spacing: .13em; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(48px, 7vw, 90px); line-height: 1.06; letter-spacing: -.075em; margin-bottom: 24px; }
h1 span { color: var(--accent); }
.intro, .cards p, .download p:not(.eyebrow), .note { color: var(--muted); line-height: 1.75; }
.intro { max-width: 32ch; font-size: 17px; margin-bottom: 28px; }
.note { font-size: 12px; margin: 12px 0 0; }
.demo { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: clamp(14px, 3vw, 26px); }
.demo-head { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); letter-spacing: .05em; }
.demo-head i { display: inline-block; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.pad { margin-block: 22px; aspect-ratio: 1.65; border-radius: 17px; position: relative; overflow: hidden; border: 1px solid #647062; background: radial-gradient(ellipse at center, #354637, transparent 72%), #232b24; }
.pad::before { content: ""; position: absolute; inset: 0; background: radial-gradient(#a5b1a050 1px, transparent 1px) 0 0 / 14px 14px; }
.guide { position: absolute; display: flex; gap: 10px; top: 58%; left: 50%; transform: translate(-50%, -50%); }
.guide b { width: clamp(23px, 4vw, 39px); aspect-ratio: 1; border-radius: 50%; background: #c9fa8260; border: 1px solid var(--accent); box-shadow: 0 0 20px #c9fa8240; }
.direction { position: absolute; top: 21%; width: 100%; text-align: center; color: var(--accent); font-size: 30px; }
.pad[data-mode="tap"] .guide b:last-child, .pad:is([data-mode="brightness"], [data-mode="volume"]) .guide b:not(:first-child) { display: none; }
/* Keep the contact within the highlighted edge strip. */
.pad:is([data-mode="brightness"], [data-mode="volume"]) .guide { left: auto; right: 6px; top: 23%; transform: translateY(-50%); }
.pad:is([data-mode="brightness"], [data-mode="volume"]) .direction { display: none; }
.pad:is([data-mode="brightness"], [data-mode="volume"])::after {
  content: "";
  position: absolute;
  inset: 12% 5px 12% auto;
  width: calc(clamp(23px, 4vw, 39px) + 2px);
  border: 1px solid #c9fa8255;
  border-radius: 24px;
  background: #c9fa8210;
  pointer-events: none;
}
.pad:is([data-mode="brightness"], [data-mode="volume"]) .guide { z-index: 1; }
.pad:is([data-mode="brightness"], [data-mode="volume"]) .feedback { inset: auto 23% 38% 12%; }
.pad:is([data-mode="brightness"], [data-mode="volume"]) .feedback::before {
  content: "音量";
  font-size: 12px;
  margin-bottom: 10px;
}
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
button { cursor: pointer; font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 100px; background: #101310; padding: 8px 12px; }
button[aria-pressed="true"] { color: #182112; background: var(--accent); }
#result { color: var(--muted); margin: 15px 0 0; font-size: 14px; }
.features { border-top: 1px solid var(--line); padding-block: 60px; }
h2 { font-size: clamp(32px, 5vw, 58px); letter-spacing: -.06em; margin-bottom: 24px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.cards article { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.cards h3 { margin: 22px 0 10px; }
.cards p { margin-bottom: 0; }
.download { margin-bottom: 48px; text-align: center; border: 1px solid var(--line); border-radius: 24px; padding: 48px 16px; background: radial-gradient(ellipse at top, #283a25, var(--surface) 70%); }
.download img { margin-bottom: 12px; }
.download h2 { margin-bottom: 12px; }
.availability { display: inline-block; border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; margin: 0; }
footer.bar { border-top: 1px solid var(--line); border-bottom: 0; color: var(--muted); }
@media (max-width: 730px) {
  .hero, .cards { grid-template-columns: 1fr; }
  .hero { gap: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.feedback {
  position: absolute;
  inset: auto 12% 9%;
  display: grid;
  place-items: center;
  color: var(--accent);
}
.feedback > div { display: none; }
.pad[data-mode="swipe"] .switcher { display: flex; gap: 6px; }
.switcher span, .trigger {
  border: 1px solid #647062;
  background: #19231c;
  border-radius: 8px;
  padding: 5px 10px;
}
.switcher span:nth-child(2) { border-color: var(--accent); }
.pad[data-mode="tap"] .trigger { display: block; font-size: 13px; }
.pad:is([data-mode="brightness"], [data-mode="volume"]) .timeline {
  display: block;
  width: min(100%, 160px);
  height: 6px;
  background: #101310;
  border-radius: 8px;
}
.timeline span {
  display: block;
  width: 65%;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transform-origin: left;
}
@media (prefers-reduced-motion: no-preference) {
  .pad[data-mode="swipe"].playing .guide { animation: swipe-up 1.15s both; }
  .pad[data-mode="tap"].playing .guide { animation: tap-down .8s both; }
  .pad:is([data-mode="brightness"], [data-mode="volume"]).playing .guide { animation: swipe-edge 1.15s both; }
  .pad.playing .feedback {
    animation: show-feedback .35s .58s both;
  }
  .pad:is([data-mode="brightness"], [data-mode="volume"]).playing .feedback { animation: none; }
  .pad.playing .timeline span { animation: scrub 1.15s both; }
  .pad[data-mode="tap"].playing .guide b { animation: contact-ripple .65s .25s both; }
  .pad[data-mode="swipe"].playing .switcher span:nth-child(2) {
    animation: select-app .35s .65s both;
  }
}
@keyframes swipe-up {
  0%, 15% { transform: translate(-50%, -10%); opacity: .55; }
  65%, 100% { transform: translate(-50%, -130%); opacity: 1; }
}
@keyframes tap-down {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  40% { transform: translate(-50%, -50%) scale(.72); }
}
@keyframes swipe-edge {
  0%, 15% { top: 78%; }
  70%, 100% { top: 23%; }
}
@keyframes show-feedback {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scrub {
  0%, 15% { transform: scaleX(.3); }
  70%, 100% { transform: scaleX(1); }
}

.purchase {
  max-width: 440px;
  margin: 28px auto 0;
  padding: clamp(20px, 5vw, 32px);
  border: 1px solid #526349;
  border-radius: 20px;
  background: #151c15;
}
.purchase h3 { margin-bottom: 10px; font-size: 24px; }
.purchase .button { margin-top: 6px; }

@keyframes contact-ripple {
  0% { box-shadow: 0 0 0 0 #c9fa8270; }
  100% { box-shadow: 0 0 0 14px #c9fa8200; }
}
@keyframes select-app {
  0% { transform: scale(.94); }
  55% { transform: scale(1.13); }
  100% { transform: scale(1); }
}

.pad:is([data-mode="copy"], [data-mode="paste"]) .guide b:last-child { display: none; }
.pad[data-mode="copy"] .guide { left: 78%; }
.pad[data-mode="paste"] .guide { left: 22%; }
.pad[data-mode="copy"] .copied,
.pad[data-mode="paste"] .pasted,
.pad[data-mode="pinch"] .capture {
  display: block;
  padding: 5px 10px;
  border: 1px solid #647062;
  border-radius: 8px;
  background: #19231c;
  font-size: 13px;
}
.pad[data-mode="pinch"] .guide { display: grid; place-items: center; }
.pad[data-mode="pinch"] .guide b { grid-area: 1 / 1; transform: translate(var(--x), var(--y)); }
.pad[data-mode="pinch"] .guide b:nth-child(1) { --x: -32%; --y: -43%; --start-x: -155%; --start-y: -85%; }
.pad[data-mode="pinch"] .guide b:nth-child(2) { --x: 42%; --y: -20%; --start-x: 155%; --start-y: -60%; }
.pad[data-mode="pinch"] .guide b:nth-child(3) { --x: -10%; --y: 44%; --start-x: -20%; --start-y: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .pad:is([data-mode="copy"], [data-mode="paste"]).playing .guide b {
    animation: contact-ripple .65s .25s both;
  }
  .pad[data-mode="pinch"].playing .guide b { animation: pinch-contact .95s both; }
  .pad[data-mode="pinch"].playing::after {
    content: "";
    position: absolute;
    inset: 0;
    background: white;
    pointer-events: none;
    animation: capture-flash .35s .62s both;
  }
}
@keyframes pinch-contact {
  0%, 15% { transform: translate(var(--start-x), var(--start-y)); }
  65%, 100% { transform: translate(var(--x), var(--y)); }
}
@keyframes capture-flash {
  0%, 100% { opacity: 0; }
  20% { opacity: .36; }
}

body {
  background: radial-gradient(ellipse at 75% 0%, #273a27 0%, transparent 42rem), #101310;
}
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero .eyebrow { margin-bottom: 20px; }
.demo {
  box-shadow: 0 24px 80px #0007, inset 0 1px #ffffff10;
  background: linear-gradient(150deg, #262e26, #191d19 65%);
}
.pad { box-shadow: inset 0 2px 12px #0007, 0 1px #ffffff12; }
.feature-symbol {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 24px;
  border: 1px solid #53674d;
  border-radius: 13px;
  background: #293a26;
  color: var(--accent);
  font-size: 25px;
}
.setup {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding-block: 56px;
  border-top: 1px solid var(--line);
}
.setup p:not(.eyebrow) { color: var(--muted); line-height: 1.65; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.steps li { position: relative; padding: 15px 0 15px 52px; border-bottom: 1px solid var(--line); }
.steps li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 16px;
  color: var(--accent);
  font: 13px ui-monospace, monospace;
}
.steps p { margin: 5px 0 0; }
.download {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 24px;
  text-align: left;
  padding: clamp(24px, 6vw, 64px);
}
.purchase { width: 100%; max-width: none; margin: 0; }
@media (max-width: 730px) {
  .setup, .download { grid-template-columns: 1fr; }
  .bar, nav { gap: 10px; flex-wrap: wrap; }
}

.pad[data-mode="brightness"] .guide { left: 6px; right: auto; }
.pad[data-mode="brightness"]::after { left: 5px; right: auto; }
.pad[data-mode="brightness"] .feedback { inset-inline: 23% 12%; }
.pad[data-mode="brightness"] .feedback::before { content: "屏幕亮度"; }

html[lang="en"] h1 { font-size: clamp(44px, 6.3vw, 82px); }
html[lang="en"] .pad[data-mode="brightness"] .feedback::before { content: "Brightness"; }
html[lang="en"] .pad[data-mode="volume"] .feedback::before { content: "Volume"; }

/* Product showcase */
:root {
  --ink: #f2f1eb;
  --muted: #adb6ad;
  --surface: #171c19;
  --line: #303b33;
  --accent: #c8f594;
}
body {
  background: radial-gradient(ellipse at 74% 19rem, #283b30 0%, transparent 42rem), #101411;
}
.wrap { width: min(1180px, calc(100% - 48px)); }
header.bar { min-height: 72px; }
.hero {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(24px, 5vw, 72px);
  padding-block: clamp(56px, 9vw, 120px);
}
.hero .eyebrow {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid #425342;
  border-radius: 99px;
  background: #c8f5940b;
}
.hero h1 { text-wrap: balance; }
.hero .intro { max-width: 40ch; }
.demo {
  background: linear-gradient(145deg, #252d27, #171d19 70%);
  border-color: #465449;
  box-shadow: 0 32px 85px #0008, inset 0 1px #ffffff13;
}
.trackpad-frame {
  margin-block: 18px;
  padding: 5px;
  border: 1px solid #637168;
  border-radius: 23px;
  background: linear-gradient(155deg, #abb8ad, #4d5b52 44%, #242e28 78%, #77877c);
  box-shadow: 0 12px 24px #0006;
}
.trackpad-frame .pad {
  margin: 0;
  border-color: #18241d;
  background: radial-gradient(ellipse at 50% 45%, #34483c, #222c26 73%);
  box-shadow: inset 0 2px 12px #0008;
}
.trackpad-frame .pad::before { opacity: .6; }
.choices button { font-size: 13px; }
#result {
  padding: 12px 14px;
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0d130f;
  color: var(--ink);
}
.cards article {
  background: linear-gradient(145deg, #202b23, var(--surface) 74%);
  padding: clamp(20px, 3vw, 32px);
}
.cards h3 { line-height: 1.3; }
.setup { gap: clamp(26px, 6vw, 80px); }
.steps li::before {
  width: 34px;
  padding: 5px 0;
  text-align: center;
  border-radius: 7px;
  background: #c8f59413;
}
.purchase {
  border-color: #637e52;
  background: linear-gradient(150deg, #273727, #151d17 76%);
  box-shadow: 0 14px 36px #0003;
}
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 450px) {
  .wrap { width: calc(100% - 32px); }
  header.bar { padding-block: 12px; }
}

.guide-page { max-width: 760px; padding-block: clamp(42px, 8vw, 100px); }
.guide-page h1 { font-size: clamp(34px, 6vw, 58px); letter-spacing: -.045em; }
html[lang="en"] .guide-page h1 { font-size: clamp(34px, 6vw, 58px); }
.guide-page h2 { font-size: clamp(22px, 4vw, 32px); margin-bottom: 10px; }
.guide-page article section { margin-block: 32px; }
.guide-page article section p { color: var(--muted); line-height: 1.75; }
.guide-links { border-top: 1px solid var(--line); margin-block: 30px; padding-top: 12px; }
.guide-links li { margin-block: 10px; }
.guide-page dd { margin: 6px 0 18px; color: var(--muted); line-height: 1.65; }
.guide-page article li { margin-block: 10px; line-height: 1.65; }
.guide-page article a { color: var(--accent); text-decoration: underline; }
