/* =========================================================================
   人闪咨询 · treg.io 风格复刻
   Skin 1:1 lifted from treg.io's measured computed styles:
   - no brand accent: emphasis is ink, colour is reserved for status
   - sans for reading, mono for identifiers / counts / commands / micro-labels
   - Pixel on the display watermark and Latin display numerals only
   - a card is a surface (hairline + radius), not a heavy box
   - every dark object is a command / terminal object
   ========================================================================= */

@font-face {
  font-family: "Geist Pixel";
  src: url("/assets/fonts/geist-pixel.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/assets/fonts/dmmono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/assets/fonts/dmmono-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("/assets/fonts/dmmono-400i.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f8f8f8;
  --surface: #fff;
  --panel: #f8f8f8;
  --panel2: #f0f0f0;

  --ink: #1a1a1a;
  --muted: #7c7c7c;
  --muted2: #989898;

  --line: rgba(0, 0, 0, 0.1);
  --line2: rgba(37, 37, 34, 0.2);

  --green: #118453;
  --amber: #ba6603;
  --red: #c0362f;

  --inverse: #1a1a1a;
  --inverse-ink: #fff;

  --wash: #e6ecee;

  --r: 20px;
  --rb: 12px;
  --card-radius: 32px;

  --shadow-sm: 0 2px 2px #00000008;
  --shadow-md: 0 2px 5px #00000007;
  --shadow-lg: 0 4px 18px #00000009;

  --ease: cubic-bezier(0.2, 0.72, 0.25, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --display: "Geist Pixel", "DM Mono", monospace;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --cjk: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; min-width: 0; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--ink); color: var(--surface); }

:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--ink);
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}

/* content vanishes under a white top veil; navigation rides above it */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 142px;
  z-index: 45;
  pointer-events: none;
  background: linear-gradient(to bottom, #f8f8f8 0%, #f8f8f8 34%, #f8f8f8f2 52%, #f8f8f8b8 72%, #f8f8f800 100%);
  transition: background 0.35s var(--ease);
}
/* the veil follows whatever is underneath it */
body.veil-dark::before {
  background: linear-gradient(to bottom, #000 0%, #000 34%, #000000f2 52%, #000000b8 72%, #00000000 100%);
}

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 40px; }

/* ---------------------------------------------------------------- nav */
.navwrap { position: fixed; top: 0; left: 0; right: 0; z-index: 50; }
.nav {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 40px;
  display: flex;
  align-items: center;
  gap: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.glyph {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--inverse); color: var(--inverse-ink);
  flex: none;
}
.glyph svg { width: 60%; height: 60%; display: block; fill: currentColor; }
.brand b { font-weight: 600; font-size: 15px; letter-spacing: -0.01em; font-family: var(--cjk); white-space: nowrap; }
.brand i {
  font-style: normal; font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.18em; color: var(--muted2); margin-left: 2px;
}
.nav .links { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav .links a {
  font-size: 13.5px; font-weight: 500; color: var(--muted);
  transition: color 0.16s var(--ease); cursor: pointer;
}
.nav .links a:hover { color: var(--ink); }
.nav .links a.navico { display: inline-flex; align-items: center; gap: 6px; }
.nav .links a.navico svg { width: 15px; height: 15px; display: block; }

@media (max-width: 960px) {
  .nav .links a.hidem { display: none; }
}
@media (max-width: 700px) {
  .navwrap { padding: 0; }
  .nav { padding: 14px 18px; gap: 12px; align-items: center; }
  .nav .links { gap: 14px; flex-wrap: nowrap; }
  .nav .links a { font-size: 12px; white-space: nowrap; }
  .nav .links a.navmid { display: none; }
  .brand i { display: none; }
  .wrap { padding: 0 20px; }
  body::before { height: 80px; }
}
@media (max-width: 560px) {
  .nav { padding: 12px 16px; }
  .nav .links a { display: none; }
  .nav .links { gap: 0; }
  .nav .candy.sm { padding: 9px 16px; font-size: 12px; white-space: nowrap; }
  .brand { gap: 8px; }
  .brand b { font-size: 14px; }
  .glyph { width: 26px; height: 26px; border-radius: 7px; }
}

/* ------------------------------------------------------------- buttons */
.candy {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 550;
  letter-spacing: 0.01em;
  color: var(--inverse-ink);
  background: var(--inverse);
  border: 0;
  border-radius: 999px;
  padding: 12px 26px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.24s var(--ease), transform 0.12s var(--ease-out), background 0.16s;
}
.candy:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.candy.sm { padding: 8px 18px; font-size: 12.5px; }
.candy.on-dark { background: #fff; color: #171a18; }
.candy.on-dark:hover { background: #e9e9e9; }

.ghostbtn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line2);
  border-radius: 999px; padding: 12px 24px; cursor: pointer;
  transition: border-color 0.16s var(--ease), box-shadow 0.24s var(--ease), background 0.16s;
}
.ghostbtn:hover { border-color: var(--muted); box-shadow: var(--shadow-sm); }
.ghostbtn.on-dark { background: transparent; color: #f5f7f6; border-color: rgba(255, 255, 255, 0.28); }
.ghostbtn.on-dark:hover { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.06); }
.ghostbtn svg { width: 16px; height: 16px; }

/* ------------------------------------------------------- type helpers */
.mono-label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted2);
}
.seclab {
  text-align: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted2);
}
.display {
  font-family: var(--cjk);
  font-weight: 640;
  letter-spacing: -0.035em;
  line-height: 1.14;
  color: var(--ink);
}
.display .l2 { font-weight: 500; color: var(--muted); }

/* -------------------------------------------------------------- reveal */
.rv {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
.rv.show { opacity: 1; transform: none; }
.rv-d1 { transition-delay: 0.08s; }
.rv-d2 { transition-delay: 0.16s; }
.rv-d3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}

/* -------------------------------------------------------- black bands */
.bands-dark { background: #000; color: #f7f8f7; }
.bands-dark .display { color: #f7f8f7; }

.ending {
  background: #000;
  color: #f7f8f7;
  position: relative;
  overflow: hidden;
}

.trustline {
  margin-top: 62px;
  font-family: var(--mono);
  font-size: 12.5px;
  color: #8f938f;
  display: flex;
  gap: 10px 26px;
  justify-content: center;
  flex-wrap: wrap;
  text-align: center;
}
.trustline b { color: #d5d8d5; font-weight: 500; }

/* ------------------------------------------------------------- footer */
footer {
  background: #000;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}
.foot-in {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px 64px;
  flex-wrap: wrap;
  padding: 48px 40px 150px;
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
}
.foot-brand { display: flex; flex-direction: column; gap: 12px; }
.foot-brand .brand b { color: #fff; }
.foot-brand .note { font-family: var(--mono); font-size: 12px; color: #7d817d; }
.foot-cols { display: flex; gap: 56px; flex-wrap: wrap; }
.foot-col { display: flex; flex-direction: column; gap: 9px; min-width: 118px; }
.foot-col .lab {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: #767a76; margin-bottom: 2px;
}
.foot-in a, .foot-in button {
  color: #a3a6a3; font-size: 14px; background: none; border: 0; padding: 0;
  text-align: left; cursor: pointer; transition: color 0.16s var(--ease);
}
.foot-in a:hover, .foot-in button:hover { color: #fff; }

.watermark {
  position: absolute;
  bottom: -0.28em;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--display);
  font-size: clamp(120px, 20vw, 300px);
  line-height: 1;
  color: rgba(255, 255, 255, 0.05);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.02em;
}

@media (max-width: 700px) {
  .foot-cols { gap: 30px; }
  .foot-col { min-width: 40%; }
  .foot-in { padding: 40px 20px 120px; }
  .watermark { font-size: 30vw; }
}

/* --------------------------------------------------------- scroll bar */
.progress {
  position: fixed;
  left: 0; top: 0;
  height: 2px; width: 100%;
  background: var(--ink);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 100;
  pointer-events: none;
}

/* `hidden` must beat the component display rules */
[hidden] { display: none !important; }

/* ---- nav inverts while the dark closing band sits under the veil ---- */
body.veil-dark .brand b { color: #f5f7f6; }
body.veil-dark .brand i { color: #767a76; }
body.veil-dark .glyph { background: #f5f7f6; color: #171a18; }
body.veil-dark .nav .links a { color: #9b9e9b; }
body.veil-dark .nav .links a:hover { color: #fff; }
body.veil-dark .nav .candy.sm { background: #f5f7f6; color: #171a18; box-shadow: none; }
body.veil-dark .nav .candy.sm:hover { background: #e3e3e3; }
body.veil-dark :focus-visible { box-shadow: 0 0 0 2px #000, 0 0 0 3.5px #f5f7f6; }
