/* Cyber Pusa — base: tokens, type, primitives */

:root {
  --ink-0: #131316;          /* night */
  --ink-1: #1b1c1f;          /* raised night, matches portrait ground */
  --hair: #2c2c30;           /* hairlines */
  --hair-2: #3a3a3f;
  --mute: #8f8b83;           /* ink grey, 5.6:1 on --ink-0 */
  --paper-dim: #bdb6a8;
  --paper: #ebe5d8;          /* rice paper */
  --gold: #e8c98a;
  --gold-soft: rgba(232, 201, 138, 0.38);

  --f-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --f-body: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --f-zh: "Noto Serif SC", "Songti SC", "STSong", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: clamp(16px, 5vw, 72px);
  --measure: 34rem;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink-0);
  color: var(--paper);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink-0);
  font: 400 1.1875rem/1.75 var(--f-body);
  font-kerning: normal;
  font-feature-settings: "kern", "liga", "onum";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* rice-paper grain, very faint */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

[lang="zh-Hans"] { font-family: var(--f-zh); font-feature-settings: normal; }

img, svg { display: block; max-width: 100%; }

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--hair-2);
  text-decoration-thickness: 1px;
  text-underline-offset: .22em;
  transition: color .4s var(--ease), text-decoration-color .4s var(--ease);
}
a:hover { color: var(--gold); text-decoration-color: var(--gold-soft); }
a:focus-visible, .button:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 4px;
  border-radius: 1px;
}

::selection { background: rgba(232, 201, 138, .25); color: var(--paper); }

h1, h2, h3 { margin: 0; font-weight: 400; }
p { margin: 0; }

.mono {
  font-family: var(--f-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  font-feature-settings: normal;
}

.skip {
  position: absolute;
  left: 16px; top: -40px;
  padding: .4rem .8rem;
  background: var(--paper); color: var(--ink-0);
  font-family: var(--f-mono); font-size: .8rem;
  z-index: 200;
}
.skip:focus { top: 12px; }

/* eyebrow / section label */
.eyebrow, .label {
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
}
.label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--hair);
}
.label [lang="zh-Hans"] {
  margin-left: auto;
  letter-spacing: .3em;
  text-transform: none;
  font-size: .85rem;
  color: var(--paper-dim);
}
.label__num { color: var(--gold); letter-spacing: .1em; }

/* gold hairline seal */
.seal {
  display: inline-grid;
  place-items: center;
  width: 1.7rem; height: 1.7rem;
  border: 1px solid var(--gold-soft);
  color: var(--gold);
  font: 400 .95rem/1 var(--f-zh);
}

.link-arrow {
  font-family: var(--f-mono);
  font-size: .8rem;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--paper-dim);
  border-bottom: 1px solid var(--hair-2);
  padding-bottom: .2rem;
}
.link-arrow::after { content: " \2192"; transition: margin .4s var(--ease); }
.link-arrow:hover { border-bottom-color: var(--gold-soft); }
.link-arrow:hover::after { margin-left: .25rem; }

.button {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: .8rem;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--ink-0);
  background: var(--paper);
  padding: .85rem 1.4rem;
  transition: background .4s var(--ease);
}
.button:hover { background: var(--gold); color: var(--ink-0); }

/* top bar */
.bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem var(--gutter);
}
.bar__mark {
  display: inline-flex;
  align-items: center;
  gap: .8rem;
  text-decoration: none;
}
.bar__name {
  font: 400 1.15rem/1 var(--f-display);
  letter-spacing: .04em;
}
.bar__nav { display: flex; gap: 2rem; }
.bar__nav a {
  font-family: var(--f-mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--mute);
}
.bar__nav a:hover { color: var(--paper); }

@media (max-width: 720px) {
  .bar__nav { display: none; }
}

/* scroll reveal: only hidden when JS + motion are available */
.js.motion .reveal { opacity: 0; transform: translateY(14px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
.js.motion .hero__text > *,
.js.motion .enso__img { opacity: 0; }
