/* Copyright (c) 2026 matoio.com. All rights reserved. */
/*
 * mato series visual system, as on the mato oscard and Mato Vox sites, for the
 * Mato Pai homepage drafts: brand colours,
 * wordmark colour rules, fonts, the light and dark themes, and the header,
 * footer, buttons, and chips every draft shares. Drafts differ in their scene,
 * motion, and layout; they do not change these tokens.
 *
 * Wordmark rule (same as Mato Vox): on light backgrounds the colours are fixed,
 * mato #EB4534, crown #009A7B, product name #161C39; on dark backgrounds the
 * three parts stay separate, mato #EB4534, crown #009A7B, product name white.
 */

@font-face {
  font-family: "Sora Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/sora-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Sora Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/sora-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Outfit Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/outfit-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Outfit Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(fonts/outfit-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "JetBrains Mono Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations");
}
/* The mato typeface: Latin letters, digits, and a few signs. Numbers and short Latin accents only; never synthesize bold. */
@font-face {
  font-family: "matoio";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(fonts/matoio-Regular.woff2) format("woff2");
}

/* Mato Pai's own faces, the ones the app ships: 庆科黄油体 for comic headings (GB2312), Bangers, Nunito, Space Grotesk. */
@font-face { font-family: "QingKe"; font-display: swap; src: url(fonts/qingke.woff2) format("woff2"); }
@font-face { font-family: "Bangers"; font-display: swap; src: url(fonts/bangers.woff2) format("woff2"); }
@font-face { font-family: "Nunito"; font-display: swap; font-weight: 200 1000; src: url(fonts/nunito.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-display: swap; font-weight: 300 700; src: url(fonts/spacegrotesk.woff2) format("woff2"); }

:root {
  --mo-tomato: #eb4534;
  --mo-leaf: #009a7b;
  --mo-navy: #161c39;

  --mo-font-cjk: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mo-font-display: "Sora Variable", var(--mo-font-cjk);
  --mo-font-ui: "Outfit Variable", var(--mo-font-cjk);
  --mo-font-mono: "JetBrains Mono Variable", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --mo-font-mato: "matoio", "Sora Variable", sans-serif;

  --mo-nav-h: 64px;
  --mo-gutter: clamp(16px, 4vw, 56px);
  --mo-maxw: 1440px;
  --mo-r-box: 20px;
  --mo-r-in: 14px;
  --mo-ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* Light theme. */
  --mo-bg: #f3efe8;
  --mo-bg-2: #ebe5da;
  --mo-sheet: #fbf9f5;
  --mo-surface: rgb(255 255 255 / 0.8);
  --mo-surface-solid: #ffffff;
  --mo-ink: #161c39;
  --mo-ink-2: #474e6e;
  --mo-ink-3: #5c6383;
  --mo-line: rgb(22 28 57 / 0.1);
  --mo-line-strong: rgb(22 28 57 / 0.2);
  --mo-accent: #cf3b2a;
  --mo-accent-hover: #b8301f;
  --mo-on-accent: #ffffff;
  --mo-leaf-ink: #00785f;
  --mo-shadow: 0 24px 60px -28px rgb(31 45 90 / 0.35), 0 4px 14px -6px rgb(31 45 90 / 0.12);
  --mo-focus: #161c39;

  --tone-mato: #eb4534;
  --tone-crown: #009a7b;
  --tone-name: #161c39;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --mo-bg: #0a0f26;
  --mo-bg-2: #070b1d;
  --mo-sheet: #0d1230;
  --mo-surface: rgb(19 24 52 / 0.74);
  --mo-surface-solid: #131834;
  --mo-ink: #eceef6;
  --mo-ink-2: #b0b6d0;
  --mo-ink-3: #9198b8;
  --mo-line: rgb(255 255 255 / 0.09);
  --mo-line-strong: rgb(255 255 255 / 0.2);
  --mo-accent: #ff6450;
  --mo-accent-hover: #ff7a68;
  --mo-on-accent: #161c39;
  --mo-leaf-ink: #2fcba4;
  --mo-shadow: 0 28px 70px -30px rgb(0 0 0 / 0.7), 0 4px 16px -8px rgb(0 0 0 / 0.4);
  --mo-focus: #eceef6;

  --tone-name: #ffffff;
  color-scheme: dark;
}

.tone-mato { fill: var(--tone-mato); }
.tone-crown { fill: var(--tone-crown); }
.tone-name { fill: var(--tone-name); transition: fill 300ms; }
.wordmark { display: block; width: 100%; height: auto; overflow: visible; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--mo-bg); overflow-x: clip; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--mo-bg);
  color: var(--mo-ink);
  font: 400 16px/1.6 var(--mo-font-ui);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
:root[lang="zh"] body { line-height: 1.75; }
img, svg, video, canvas { max-width: 100%; }
a { color: inherit; }
::selection { background: var(--mo-tomato); color: #fff; }
:focus-visible { outline: 2px solid var(--mo-focus); outline-offset: 3px; border-radius: 6px; }
.mo-num { font-family: var(--mo-font-mato); font-synthesis: none; font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Buttons and chips: capsules. Primary is the accent; tomato red itself is for the wordmark, icons, and decoration. */
.mo-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px;
  font: 600 15px/1 var(--mo-font-ui); letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color 200ms, color 200ms, border-color 200ms, transform 200ms var(--mo-ease);
}
.mo-btn:active { transform: scale(0.98); }
.mo-btn-primary { background: var(--mo-accent); color: var(--mo-on-accent); }
.mo-btn-primary:hover { background: var(--mo-accent-hover); }
.mo-btn-ghost { background: transparent; color: var(--mo-ink); border-color: var(--mo-line-strong); }
.mo-btn-ghost:hover { border-color: var(--mo-ink); }
.mo-btn-lg { min-height: 54px; padding: 0 30px; font-size: 16px; }
.mo-btn svg { width: 18px; height: 18px; flex: none; }
.mo-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 16px;
  border: 1px solid var(--mo-line-strong); border-radius: 999px; background: transparent; color: var(--mo-ink-2);
  font: 500 14px/1 var(--mo-font-ui); cursor: pointer; transition: all 200ms;
}
.mo-chip[aria-pressed="true"], .mo-chip:hover { color: var(--mo-ink); border-color: var(--mo-ink); }
.mo-chip[aria-pressed="true"] { background: var(--mo-ink); color: var(--mo-bg); }

/* Header: wordmark, section links, language and theme switches, and the download button. */
.mo-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--mo-nav-h);
  display: flex; align-items: center; gap: 24px; padding: 0 var(--mo-gutter);
  transition: background-color 300ms, backdrop-filter 300ms, border-color 300ms;
  border-bottom: 1px solid transparent;
}
.mo-header[data-solid="true"] {
  background: color-mix(in srgb, var(--mo-bg) 78%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom-color: var(--mo-line);
}
.mo-header .mo-brand { display: block; width: 168px; flex: none; }
.mo-header nav { display: flex; gap: 22px; margin-left: 12px; }
.mo-header nav a { color: var(--mo-ink-2); text-decoration: none; font: 500 14px/1 var(--mo-font-ui); transition: color 200ms; }
.mo-header nav a:hover { color: var(--mo-ink); }
.mo-header .mo-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mo-icon-btn {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--mo-line-strong); background: transparent; color: var(--mo-ink); font: 600 13px/1 var(--mo-font-ui); cursor: pointer;
}
.mo-icon-btn svg { width: 18px; height: 18px; }
.mo-header .mo-btn { min-height: 40px; padding: 0 18px; font-size: 14px; }
@media (max-width: 860px) {
  .mo-header nav { display: none; }
  .mo-header .mo-brand { width: 132px; }
}

/* Footer: by mato io, legal links, filing number placeholder. No links to other mato products for now. */
.mo-footer { padding: 72px var(--mo-gutter) 40px; border-top: 1px solid var(--mo-line); color: var(--mo-ink-3); font-size: 14px; }
.mo-footer-inner { max-width: var(--mo-maxw); margin: 0 auto; display: grid; gap: 28px; }
.mo-footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.mo-footer .mo-brand { width: 156px; }
.mo-by { display: inline-flex; align-items: center; gap: 10px; color: var(--mo-ink-3); text-decoration: none; font: 500 13px/1 var(--mo-font-ui); letter-spacing: 0.04em; }
.mo-by .mo-matoio { display: block; width: 74px; }
.mo-footer-links { display: flex; flex-wrap: wrap; gap: 18px 26px; }
.mo-footer-links a { color: var(--mo-ink-2); text-decoration: none; }
.mo-footer-links a:hover { color: var(--mo-ink); }
.mo-footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* A Bot's face from the app (kit/data.js), scaled to its box. */
.mo-face { display: inline-block; flex: none; line-height: 0; }
.mo-face svg { width: 100%; height: 100%; overflow: visible; }
.mo-header .mo-brand { width: 150px; }
@media (max-width: 1100px) { .mo-header .mo-signin { display: none; } }

/* ---------- Motion (kit/motion.js) ---------- */
:root { --mo-spring: cubic-bezier(0.34, 1.56, 0.64, 1); }
/* The app's own face parts: eyes and a lean toward the pointer, a jelly poke on hover. */
.bot-avatar-follow { transform-origin: 32px 32px; transform: translate(var(--bot-follow-x, 0px), var(--bot-follow-y, 0px)) rotate(var(--bot-follow-tilt, 0deg)); transition: transform 0.25s ease-out; }
.bot-avatar-eyes { transform: translate(calc(var(--bot-eye-x, 0px) * 0.32), calc(var(--bot-eye-y, 0px) * 0.32)); transition: transform 0.25s ease-out; }
.bot-avatar-pupils { transform: translate(calc(var(--bot-eye-x, 0px) * 0.3), calc(var(--bot-eye-y, 0px) * 0.42)); transition: transform 0.25s ease-out; }
.bot-avatar-body { transform-origin: 32px 58px; }
.is-moving .mo-face:hover .bot-avatar-body, .is-moving [data-poke]:hover .bot-avatar-body { animation: mo-jelly 0.7s var(--mo-spring) 1; }
.is-moving .mo-working .bot-avatar-body { animation: mo-bounce 1.6s var(--mo-spring) infinite; }
@keyframes mo-jelly { 0% { transform: scale(1, 1); } 30% { transform: scale(1.1, 0.88); } 60% { transform: scale(0.95, 1.06); } 82% { transform: scale(1.02, 0.98); } 100% { transform: scale(1, 1); } }
@keyframes mo-bounce { 0%, 100% { transform: scale(1, 1); } 22% { transform: scale(1.08, 0.9); } 48% { transform: translateY(-3px) scale(0.94, 1.07); } 70% { transform: scale(1.03, 0.97); } }

/* Rise in on first sight. */
.is-moving [data-reveal] { opacity: 0; transform: translateY(36px); transition: opacity 0.9s var(--mo-ease), transform 0.9s var(--mo-ease); transition-delay: var(--d, 0s); }
.is-moving [data-reveal].is-in { opacity: 1; transform: none; }

/* Characters that light up as the paragraph scrolls past. */
[data-light] .ch { color: var(--mo-dim, color-mix(in srgb, currentColor 22%, transparent)); transition: color 0.25s; }
[data-light] .ch.on { color: inherit; }
[data-light] em .ch.on, [data-light] b .ch.on { color: var(--mo-accent); }
[data-light] em { font-style: normal; }

/* The header's ink pill. */
.mo-header nav { position: relative; gap: 4px; padding: 4px; border-radius: 999px; }
.mo-header nav a { position: relative; z-index: 1; padding: 9px 16px; border-radius: 999px; transition: color 0.3s; }
.mo-header nav a.is-here { color: var(--mo-on-ink, var(--mo-bg)); }
.mo-ink { position: absolute; left: 0; top: 4px; bottom: 4px; width: 0; border-radius: 999px; background: var(--mo-ink); opacity: 0; transition: transform 0.45s var(--mo-spring), width 0.45s var(--mo-spring), opacity 0.3s; }
.mo-header nav:hover a:hover { color: var(--mo-bg); }
.mo-header nav:hover a.is-here:not(:hover) { color: var(--mo-ink-2); }
/* Phones: the header keeps the wordmark, the two switches and a download icon. */
@media (max-width: 560px) {
  .mo-header { gap: 10px; }
  .mo-header .mo-brand { width: 104px; }
  .mo-header .mo-btn-primary { width: 40px; padding: 0; }
  .mo-header .mo-btn-primary span { display: none; }
}
