@font-face { font-family: "Geist"; src: url("../fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-normal-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("../fonts/InstrumentSerif-italic-400.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
/* Noto Serif SC subset to the site's own characters (tools/zh-font.mjs); Songti SC as the system fallback */
@font-face { font-family: "MM Serif SC"; src: url("../fonts/zh-serif.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+3000-303F, U+4E00-9FFF, U+FF00-FFEF; }

/* ── type system
   Two families only: Instrument Serif (display + text) and Geist Mono (labels, data, UI).
   Modular scale (≈ ×1.4): mono 11 · 13 — serif 18 · 24 · 34 · 56.
   Mono is uppercase-labelled with +0.08em tracking; serif tightens as it grows. */
:root {
  --serif: "Instrument Serif", "MM Serif SC", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, "MM Serif SC", "Songti SC", monospace;
  --m-11: 500 11px/1.45 var(--mono);
  --m-13: 500 13px/1.4 var(--mono);
  --s-18: 400 18px/1.45 var(--serif);
  --s-24: 400 24px/1.25 var(--serif);
  --s-34: 400 34px/1.15 var(--serif);
  --s-56: 400 56px/1.02 var(--serif);
  --tr-mono: 0.08em;
  --tr-24: -0.005em;
  --tr-34: -0.012em;
  --tr-56: -0.02em;

  --ink: #1c1730;
  --mute: rgba(28, 23, 48, 0.66);
  --faint: rgba(28, 23, 48, 0.18);
  --cream: #f6ecdf;
  --cmute: rgba(246, 236, 223, 0.62);
  --cfaint: rgba(246, 236, 223, 0.2);
  --accent: #f2a65a;
  --dusk: #2a2d52;
  --pad: clamp(20px, 4.2vw, 64px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--dusk); color: var(--ink); -webkit-text-size-adjust: 100%; scroll-snap-type: y mandatory; }
body { font: var(--s-18); -webkit-font-smoothing: antialiased; font-kerning: normal; hanging-punctuation: first allow-end; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; z-index: 0; }
#videos { position: fixed; width: 2px; height: 2px; left: 0; top: 0; overflow: hidden; opacity: 0; pointer-events: none; }
main { position: relative; z-index: 1; }

/* ── top bar */
.bar { position: fixed; z-index: 5; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 18px var(--pad); font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--cream); }
.bar::before { content: ""; position: absolute; z-index: -1; inset: 0 0 -28px 0; pointer-events: none; background: linear-gradient(rgba(17, 15, 28, 0.42), rgba(17, 15, 28, 0)); }
.bar nav { display: flex; gap: 22px; align-items: center; }
.bar a, .bar button { opacity: 0.86; transition: opacity 0.2s; }
.bar a:hover, .bar button:hover { opacity: 1; }
.snd { display: inline-flex; align-items: center; gap: 7px; opacity: 0.6 !important; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; }
.snd::before { content: ""; width: 6px; height: 6px; border-radius: 50%; border: 1px solid currentColor; box-sizing: border-box; transition: background 0.2s, border-color 0.2s; }
.snd[aria-pressed="true"] { opacity: 1 !important; }
.snd[aria-pressed="true"]::before { background: var(--accent); border-color: var(--accent); }
.lang span { opacity: 0.62; }
.lang span + span::before { content: "/"; margin: 0 5px; opacity: 0.6; }
html[lang="zh"] .lang [data-l="zh"], html[lang="en"] .lang [data-l="en"] { opacity: 1; }
.as { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px 7px 9px; border: 1px solid var(--cfaint); border-radius: 999px; text-transform: none; letter-spacing: 0.02em; background: rgba(21, 19, 28, 0.28); backdrop-filter: blur(6px); }
.as svg { width: 13px; height: 13px; }

/* ── hero */
.hero { height: 100vh; position: relative; scroll-snap-align: start; }
.hero .line { position: absolute; left: 0; right: 0; margin: 0 auto; max-width: 22em; text-align: center; font: italic var(--s-34); letter-spacing: var(--tr-34); color: var(--ink); opacity: 0; transition: opacity 1.2s ease; text-wrap: balance; padding: 0 var(--pad); }
.hero .line.on { opacity: 1; }
.hero .hint { position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--cmute); transition: opacity 0.4s; }

/* ── works */
.works { position: relative; height: 600vh; }
/* one gesture = one work: six snap stops the scroll cannot skip */
.snaps { position: absolute; inset: 0; pointer-events: none; }
.snaps i { display: block; height: 100vh; scroll-snap-align: start; scroll-snap-stop: always; }
.stage { position: sticky; top: 0; height: 100vh; }
.col { position: absolute; left: var(--pad); top: var(--coltop, 20vh); width: var(--colw, 30vw); color: var(--cream); opacity: 0; pointer-events: none; transition: opacity 0.8s ease; }
.col.on { opacity: 1; pointer-events: auto; }
/* cinematic scrim: dark indigo from the left edge, ends just before the film frame, feathered vertically */
.col::before, .end-l::before { content: ""; position: absolute; z-index: -1; pointer-events: none; left: calc(-1 * var(--pad)); top: calc(-1 * var(--coltop, 20vh)); width: var(--scrimw, 45vw); height: 100vh;
  background: linear-gradient(90deg, rgba(22, 20, 36, 0.62) 0%, rgba(22, 20, 36, 0.57) calc(100% - 40px), rgba(22, 20, 36, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 3%, #000 19%, #000 86%, transparent 99%); mask-image: linear-gradient(180deg, transparent 3%, #000 19%, #000 86%, transparent 99%); }
.end-l::before { top: -22vh; width: 45vw; }
.kick { display: flex; justify-content: space-between; align-items: baseline; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: rgba(246, 236, 223, 0.78); padding-bottom: 14px; border-bottom: 1px solid var(--cfaint); }
.list { list-style: none; margin: 6px 0 34px; }
.list li { display: grid; grid-template-columns: 34px 1fr auto; align-items: baseline; padding: 7px 0; cursor: pointer; color: rgba(246, 236, 223, 0.72); transition: color 0.35s; }
.list li .no, .list li .ty { font: var(--m-11); letter-spacing: var(--tr-mono); }
.list li .ti { font: var(--s-24); letter-spacing: var(--tr-24); }
.list li .ty { text-transform: uppercase; }
.list li:hover { color: rgba(246, 236, 223, 0.92); }
.list li.on { color: var(--cream); }
.list li .no { position: relative; }
.list li.on .no { color: var(--accent); }
.list li.on .no::before { content: ""; position: absolute; left: -16px; top: 50%; width: 8px; height: 1px; background: var(--accent); }
.wnav { display: inline-flex; align-items: baseline; gap: 12px; }
.wnav button { font: var(--m-13); line-height: 1; color: rgba(246, 236, 223, 0.86); padding: 2px 4px; transition: color 0.2s; }
.wnav button:hover { color: var(--accent); }
.wnav button:disabled { opacity: 0.3; cursor: default; }
.wnav .n { font-variant-numeric: tabular-nums; color: var(--cream); }
.whint { margin-top: 10px; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: rgba(246, 236, 223, 0.78); transition: opacity 0.6s; }
.whint.off { opacity: 0; }
.detail { min-height: 190px; transition: opacity 0.4s ease, transform 0.4s ease; }
.detail.out { opacity: 0; transform: translateY(6px); }
.detail .body { font: var(--s-24); letter-spacing: var(--tr-24); max-width: 20em; text-wrap: pretty; }
.detail .meta, .detail .stat { font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: rgba(246, 236, 223, 0.8); margin-top: 14px; }
.detail .stat { color: rgba(246, 236, 223, 0.86); margin-top: 6px; }
.detail .go { display: inline-block; margin-top: 18px; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; padding-bottom: 4px; border-bottom: 1px solid var(--cream); }
.detail .go:hover { color: var(--accent); border-color: var(--accent); }

/* ── views: birds on wires (bands are drawn by the flock) */
.views { position: relative; height: 100vh; scroll-snap-align: start; }
.vwrap { position: absolute; inset: 0; }
.vwrap::before { content: ""; position: absolute; z-index: -1; pointer-events: none; left: 0; top: 0; bottom: 0; width: var(--vscrimw, 22vw);
  background: linear-gradient(90deg, rgba(22, 20, 36, 0.62) 0%, rgba(22, 20, 36, 0.56) calc(100% - 56px), rgba(22, 20, 36, 0) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 12%, #000 22%, #000 84%, transparent 96%); mask-image: linear-gradient(180deg, transparent 12%, #000 22%, #000 84%, transparent 96%); }
.vwrap svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.vwrap path { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.vwrap .pole { stroke-width: 2.2; }
.vlab { position: absolute; transform: translateY(-100%); padding-bottom: 7px; display: flex; flex-direction: column; gap: 5px; color: var(--cream); }
.vlab .vn { font: var(--s-24); line-height: 1.05; letter-spacing: var(--tr-24); }
.vlab .vv { font: var(--m-11); letter-spacing: var(--tr-mono); color: rgba(246, 236, 223, 0.82); }
.vcall { position: absolute; transform: translate(0, -100%); margin-top: -6px; padding: 5px 7px 4px; border-radius: 4px; background: rgba(246, 236, 223, 0.82); font: var(--m-13); line-height: 1; letter-spacing: 0.04em; color: var(--ink); opacity: 0; transition: opacity 0.3s ease, transform 0.3s ease; pointer-events: none; white-space: nowrap; }
.vcall.on { opacity: 1; transform: translate(6px, -100%); }
.vsrc { position: absolute; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: rgba(246, 236, 223, 0.8); }

/* ── contact + name egg */
.end { height: 100vh; position: relative; scroll-snap-align: start; }
.end-l { position: absolute; left: var(--pad); top: 22vh; width: min(420px, 34vw); color: var(--cream); }
.end-l .kick { color: var(--cmute); }
.contacts { list-style: none; margin-top: 6px; }
.contacts li { display: grid; grid-template-columns: 96px 1fr; align-items: baseline; padding: 13px 0; border-bottom: 1px solid var(--cfaint); font: var(--s-24); letter-spacing: var(--tr-24); }
.contacts li span { font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: rgba(246, 236, 223, 0.8); }
/* IDs and handles are data: mono (Instrument Serif's 1 reads as l) */
.contacts li button, .contacts li a { text-align: left; font: var(--m-13); letter-spacing: 0.02em; }
.contacts li button:hover, .contacts li a:hover { color: var(--accent); }
.egg { position: absolute; left: var(--eggx, 50%); top: var(--eggy, 62vh); transform: translateX(-50%); width: min(380px, 80vw); text-align: center; }
.egg label { display: block; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: rgba(21, 19, 28, 0.84); }
.egg input { width: 100%; margin-top: 10px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--ink); background: transparent; font: var(--s-34); letter-spacing: var(--tr-34); color: var(--ink); text-align: center; outline: none; border-radius: 0; }
.egg input:focus { border-color: var(--ink); border-bottom-width: 2px; }
.egg-act { display: flex; justify-content: center; gap: 22px; margin-top: 18px; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; }
.egg-act button { padding: 9px 0; }
.egg-act button:hover { opacity: 0.7; }
.egg-act .cta { padding: 9px 14px; background: var(--ink); color: var(--cream); border-radius: 999px; }
.egg-act .cta:hover { background: #2b2638; opacity: 1; }
.toast { min-height: 18px; margin-top: 12px; font: var(--m-11); letter-spacing: 0.04em; color: var(--ink); }
.foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 22px; display: flex; justify-content: space-between; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--cmute); }
.foot a:hover { color: var(--cream); }
.hero .yours { display: none; position: absolute; left: 0; right: 0; top: 62vh; text-align: center; font: var(--m-11); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--mute); }
html.named .hero .line { display: none; }
.hero .yours a { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; margin-left: 8px; }
html.named .hero .yours { display: block; }

/* Chinese: serif without italics or negative tracking */
html[lang="zh"] .hero .line { font-style: normal; font-size: 30px; letter-spacing: 0.04em; }
html[lang="zh"] .list li .ti, html[lang="zh"] .detail .body, html[lang="zh"] .vlab .vn { letter-spacing: 0.03em; }
html[lang="zh"] .detail .body { font-size: 21px; line-height: 1.55; }

@media (max-width: 760px) {
  .bar nav a[href^="#"] { display: none; }
  .as span { display: none; }
  .as { padding: 7px; }
  .hero .line { font-size: 24px; letter-spacing: var(--tr-24); }
  .col { top: var(--coltop, 330px); bottom: auto; transform: none; width: calc(100vw - 2 * var(--pad)); }
  .col::before { top: -28px; height: calc(100% + 80px); width: 100vw; background: rgba(22, 20, 36, 0.52);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 84%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 14%, #000 84%, transparent 100%); }
  .end-l::before { top: -36px; height: calc(100% + 80px); width: 100vw; background: rgba(22, 20, 36, 0.5);
    -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 82%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 82%, transparent 100%); }
  .col .kick { padding-bottom: 10px; }
  .detail .body { font: var(--s-18); }
  .vlab { flex-direction: row; align-items: baseline; gap: 10px; }
  /* portrait: no panel over the bars; a soft halo behind each label instead */
  .vwrap::before { display: none; }
  .vlab::before, .vsrc::before { content: ""; position: absolute; z-index: -1; pointer-events: none; inset: -4px -12px 2px -12px; border-radius: 14px; background: rgba(22, 20, 36, 0.74); filter: blur(9px); }
  .vsrc::before { inset: -6px -12px; }
  .vlab .vv, .vsrc { color: rgba(246, 236, 223, 0.92); }
  .vlab .vn { font: var(--s-18); }
  .list { display: none; }
  .detail { min-height: 0; }
  .end-l { top: 12vh; width: calc(100vw - 2 * var(--pad)); }
  .contacts li { font: var(--s-18); padding: 10px 0; }
}

::selection { background: var(--accent); color: var(--ink); }

/* cursor bird (fine pointers): native cursor hidden except in text fields */
html.has-bird, html.has-bird a, html.has-bird button, html.has-bird li { cursor: none; }
html.has-bird input { cursor: text; }
#cursor-bird { position: fixed; left: 0; top: 0; z-index: 50; pointer-events: none; opacity: 0; transition: opacity .25s, filter .25s; will-change: transform; filter: drop-shadow(0 2px 3px rgba(20, 14, 30, .28)); }
#cursor-bird svg { display: block; transform-origin: 50% 40%; animation: cb-flap 1.15s ease-in-out infinite; transition: scale .25s; }
#cursor-bird.hot svg { scale: 1.22; animation-duration: .7s; }
#cursor-bird.off { opacity: 0 !important; }
@keyframes cb-flap { 0%, 100% { transform: scaleX(1) scaleY(1); } 45% { transform: scaleX(.8) scaleY(1.06); } }
@media (prefers-reduced-motion: reduce) { #cursor-bird svg { animation: none; } }
