/* ============================================================
   Annolux home — standalone stylesheet (2026-08-18 redesign).
   Deliberately independent of styles.css so the home page owns
   its own type, color and spacing. Engineering-paper language:
   pixel grid, crop marks, spec strips, receipt tear line, one
   warm-orange accent, JetBrains Mono as the display face.
   ============================================================ */

@font-face {
  font-family: "Annolux Mono";
  src: url("/assets/fonts/JetBrainsMono-Variable.woff2") format("woff2-variations");
  font-display: swap; font-style: normal; font-weight: 100 800;
}
@font-face {
  font-family: "Annolux Grotesk";
  src: url("/assets/fonts/HankenGrotesk-Variable.woff2") format("woff2-variations");
  font-display: swap; font-style: normal; font-weight: 100 900;
}
@font-face {
  font-family: "Annolux Reader";
  src: url("/assets/fonts/Newsreader-Italic.woff2") format("woff2-variations");
  font-display: swap; font-style: italic; font-weight: 200 800;
}
@font-face {
  font-family: "Annolux Geist";
  src: url("/assets/fonts/Geist-Variable.woff2") format("woff2-variations");
  font-display: swap; font-style: normal; font-weight: 100 900;
}
@font-face {
  font-family: "Annolux Noto Sans SC";
  src: url("/assets/fonts/NotoSansSC-AnnoluxSubset.woff2?v=site-p1-812") format("woff2-variations");
  font-display: swap; font-style: normal; font-weight: 100 900;
  unicode-range: U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}
@font-face {
  font-family: "Annolux Noto Serif SC";
  src: url("/assets/fonts/NotoSerifSC-AnnoluxSubset.woff2?v=site-p1-812") format("woff2-variations");
  font-display: swap; font-style: normal; font-weight: 200 900;
  unicode-range: U+2E80-2EFF, U+2F00-2FDF, U+3000-303F, U+31C0-31EF, U+3400-4DBF, U+4E00-9FFF, U+F900-FAFF, U+FE30-FE4F, U+FF00-FFEF;
}

/* ---- Tokens ---- */
:root {
  --bg: #ededec;
  --surface: #ffffff;
  --ink: #17150f;
  --muted: #6f6a5f;
  --faint: #a29c90;
  --line: rgba(23, 21, 15, 0.13);
  --line-soft: rgba(23, 21, 15, 0.08);
  --accent: #e96410;
  --accent-hover: #c5520b;
  --accent-veil: rgba(233, 100, 16, 0.4);
  --code-bg: #1b1a15;
  --code-fg: #e7e3d6;
  --code-head: #b4ae9f;
  --code-str: #9ecb7d;
  --code-key: #f0a868;
  --code-punct: #7f7a6c;
  --ok: #3f9d4f;

  --mono: "Annolux Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Annolux Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --display: "Annolux Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Annolux Reader", Georgia, "Times New Roman", serif;
  --sans-zh: "Annolux Noto Sans SC", "PingFang SC", "Microsoft YaHei", var(--sans);
  --serif-zh: "Annolux Noto Serif SC", var(--sans-zh);

  color-scheme: light;
}

/* Dark is neutral grey with grey-white text — no hue at all, so the one
   orange stays the only colour on the page. Never pure black. */
html[data-theme="dark"] {
  --bg: #202020;
  --surface: #2b2b2b;
  --ink: #ededed;
  --muted: #ababab;
  --faint: #7d7d7d;
  --line: rgba(255, 255, 255, 0.16);
  --line-soft: rgba(255, 255, 255, 0.09);
  --accent: #e96410;
  --accent-hover: #ff7d2e;
  --accent-veil: rgba(233, 100, 16, 0.45);
  --surface-code: #171717;
  --code-bg: #171717;
  --code-fg: #e8e8e8;
  --code-head: #8a8a8a;
  --code-punct: #6b6b6b;
  color-scheme: dark;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="zh-CN"] body { font-family: var(--sans-zh); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1, h2, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
button { font-family: inherit; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 16px; top: 12px; }
.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; }
.mono { font-family: var(--mono); }
.container { width: 100%; max-width: 1104px; margin: 0 auto; padding: 0 24px; }

/* Terminal block caret — the one moving part on the page. */
@keyframes annolux-blink { 0%, 48% { opacity: 1; } 52%, 100% { opacity: 0; } }
.caret { display: inline-block; width: 8px; height: 15px; background: var(--accent); animation: annolux-blink 1.1s steps(1, end) infinite; flex-shrink: 0; }
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* ---- Header ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); }
.brand span:last-child { transform: translateY(0.5px); }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 3px; height: 17px; }
.brand-mark i { width: 3px; border-radius: 2px; background: var(--ink); display: block; }
.brand-mark i:nth-child(1) { height: 10px; }
.brand-mark i:nth-child(2) { height: 18px; }
.brand-mark i:nth-child(3) { height: 7px; }
.brand-mark i:nth-child(4) { height: 14px; background: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 26px; font-family: var(--mono); font-size: 13.5px; }
.nav-links a { color: var(--muted); }
.nav-links a:hover { color: var(--ink); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

/* Theme and language controls share one shape: a hairline pill, mono type,
   pixel icons — never unicode glyphs, which render differently per platform. */
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn svg { display: none; }
.icon-btn .theme-moon { display: block; }
html[data-theme="dark"] .icon-btn .theme-moon { display: none; }
html[data-theme="dark"] .icon-btn .theme-sun { display: block; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px;
  background: transparent; cursor: pointer;
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.02em;
  color: var(--muted);
}
.lang-toggle:hover { border-color: var(--accent); }
.lang-toggle:hover .lang-next { color: var(--accent); }
.lang-current { color: var(--ink); font-weight: 600; }
.lang-divider { color: var(--faint); }
.lang-next { color: var(--muted); }

.nav-signin { font-size: 14px; font-weight: 500; color: var(--ink); padding: 7px 15px; border: 1px solid var(--line); border-radius: 999px; }
.nav-signin:hover { color: var(--accent); border-color: var(--accent); }

.menu-btn { display: none; flex-direction: column; gap: 4px; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: transparent; cursor: pointer; }
.menu-btn span:not(.sr-only) { width: 15px; height: 1.5px; background: var(--ink); display: block; }
.mobile-nav { display: none; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 999px;
  font-size: 15px; font-weight: 500; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); color: var(--bg); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

/* ---- Hero ---- */
.hero { position: relative; padding: 52px 0 44px; }
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; }
.kicker-row { display: flex; align-items: center; gap: 14px; }
.kicker-rule { width: 26px; height: 1px; background: var(--line); display: block; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 0.3em; color: var(--faint); }
.hero-title {
  margin-top: 22px; max-width: none;
  white-space: nowrap;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(1.9rem, 4.9vw, 3.35rem); line-height: 1.06; letter-spacing: -0.02em;
}
html[lang="zh-CN"] .hero-title { font-family: var(--sans-zh); font-weight: 700; letter-spacing: -0.01em; }
.accent { color: var(--accent); font-family: inherit; font-weight: 700; font-style: normal; }
.lead { margin-top: 28px; max-width: 580px; font-size: 18px; line-height: 1.62; color: var(--muted); text-wrap: pretty; }
.lead .figure { font-family: var(--mono); font-size: 16.5px; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 34px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 30px; }
.chip { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; padding: 8px 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }

/* ---- Figure captions ---- */
.fig-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; font-size: 15px; }
.fig-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--accent); padding: 4px 9px; border: 1px solid var(--accent-veil); border-radius: 5px; }
.fig-title { font-weight: 600; color: var(--ink); }
.fig-note { color: var(--muted); }

/* ---- Demo panel ---- */
.demo { padding-top: 36px; }
.panel-frame { position: relative; }
.panel-frame i {
  position: absolute; width: 14px; height: 14px; display: block; border-color: var(--line); border-style: solid; border-width: 0;
}
.panel-frame i:nth-child(1) { top: -11px; left: -11px; border-top-width: 1.5px; border-left-width: 1.5px; }
.panel-frame i:nth-child(2) { top: -11px; right: -11px; border-top-width: 1.5px; border-right-width: 1.5px; }
.panel-frame i:nth-child(3) { bottom: -11px; left: -11px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.panel-frame i:nth-child(4) { bottom: -11px; right: -11px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px -34px rgba(23, 21, 15, 0.32); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); font-family: var(--mono); font-size: 12px; color: var(--muted); }
.panel-status { color: var(--ok); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 20px 0; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; border: none; cursor: pointer;
  font-family: var(--mono); font-size: 13px; font-weight: 500;
  background: transparent; color: var(--muted);
}
.tab:hover { color: var(--ink); }
.tab[aria-selected="true"] { background: var(--accent); color: #17150f; }

.tab-body { padding: 18px 20px 24px; }
.tab-body[hidden] { display: none; }
.query-row { display: flex; flex-wrap: wrap; gap: 10px; }
.query-box { display: flex; align-items: center; gap: 10px; flex-grow: 1; min-width: 240px; padding: 0 14px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); overflow: hidden; }
.query-text { font-family: var(--mono); font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.query-run { height: 46px; padding: 0 22px; border-radius: 12px; border: none; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.query-run:hover { opacity: 0.85; }

.result-card { margin-top: 16px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--bg); }
.result-meta { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.04em; color: var(--faint); }
.result-md { margin-top: 12px; font-family: var(--mono); font-size: 14.5px; font-weight: 600; color: var(--ink); }
.result-body { margin-top: 6px; font-size: 14px; line-height: 1.55; color: var(--muted); }

.hit { display: flex; gap: 16px; }
.hit-rank { flex-shrink: 0; width: 30px; height: 30px; border-radius: 3px; background: var(--ink); color: var(--bg); display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; font-weight: 600; }
.hit-copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hit-title { font-size: 15px; font-weight: 600; color: var(--ink); }
.hit-url { font-family: var(--mono); font-size: 12.5px; word-break: break-all; color: var(--accent); }

/* Icon and accent colours as classes — CSP (style-src 'self') blocks inline
   style attributes, so these must not live on the element. */
.query-box svg { color: var(--faint); }
.id-intro svg { color: var(--accent); }
.t-ok { color: var(--ok); }
.result-foot { margin-top: 14px; }

.id-intro { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--muted); }
.id-table { margin-top: 14px; padding: 4px 18px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--bg); font-family: var(--mono); font-size: 13px; }
.id-row { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.id-row:last-child { border-bottom: none; }
.id-key { width: 120px; flex-shrink: 0; color: var(--accent); }
.id-val { color: var(--ink); word-break: break-all; }

/* ---- Spec strip ---- */
.spec {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 16px;
  margin-top: 26px; padding: 13px 0;
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.1em; color: var(--faint);
}
.spec-dot { color: var(--accent-veil); }

/* ---- Proof ---- */
.proof { padding-top: 62px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }
.stat { border-top: 1px solid var(--line); padding-top: 18px; }
.stat-figure { font-family: var(--mono); font-size: 42px; font-weight: 500; line-height: 1; letter-spacing: -0.035em; color: var(--ink); }
.stat-unit { font-size: 22px; color: var(--faint); }
.stat-label { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; color: var(--accent); }
.stat-note { margin-top: 7px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.proof-note { max-width: 640px; margin: 30px auto 0; text-align: center; font-size: 13.5px; line-height: 1.65; color: var(--faint); }

/* ---- Footer ---- */
.tear { position: relative; max-width: 1104px; margin: 64px auto 0; border-top: 1.5px dashed var(--line); }
.tear-mark { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: var(--bg); padding: 0 16px; display: flex; align-items: flex-end; gap: 2.5px; height: 20px; }
.tear-mark i { width: 2.5px; border-radius: 1.5px; background: var(--line); display: block; }
.tear-mark i:nth-child(1) { height: 8px; }
.tear-mark i:nth-child(2) { height: 14px; }
.tear-mark i:nth-child(3) { height: 6px; }
.tear-mark i:nth-child(4) { height: 11px; background: var(--accent); }

.foot { padding: 44px 0 54px; }
.foot-inner { display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.foot-tag { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--accent); }
html[lang="zh-CN"] .foot-tag { font-family: var(--sans-zh); font-style: normal; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: 14px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--accent); }
.foot-copy { font-size: 13px; color: var(--faint); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-signin { display: none; }
  .mobile-nav:not([hidden]) { display: flex; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line-soft); padding-bottom: 12px; }
  .mobile-nav a { padding: 12px 0; font-size: 16px; color: var(--ink); border-bottom: 1px solid var(--line-soft); }
}
@media (max-width: 720px) {
  .hero { padding-top: 44px; }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .id-key { width: auto; }
}
/* Below this the one-line headline would overflow, so let it wrap. */
@media (max-width: 620px) {
  .hero-title { white-space: normal; font-size: clamp(1.7rem, 8vw, 2.2rem); }
}
