/* ── 设计令牌 ───────────────────────────────────────────── */
:root{
  --bg:#0a0d14;
  --surface:#131824;
  --ink:#e9edf3;
  --muted:#8891a1;
  --accent:#5a9bfc;
  --accent-ink:#0a0d14;

  --step-small:clamp(.8125rem,.79rem + .1vw,.875rem);
  --step-body:clamp(1.0625rem,1rem + .25vw,1.1875rem);
  --step-lead:clamp(1.25rem,1.1rem + .7vw,1.625rem);
  --step-head:clamp(2rem,1.3rem + 3.2vw,4rem);
  --step-display:clamp(2.6rem,1.4rem + 7.2vw,7.5rem);

  --gutter:clamp(1rem,4vw,4.5rem);
  --section:clamp(6rem,12vw,13.75rem);

  --serif:"Erode","Songti SC","Source Han Serif SC","Noto Serif CJK SC",Georgia,"SimSun",serif;
}

*{box-sizing:border-box;}
html{background:var(--bg);}
body{
  margin:0;background:var(--bg);color:var(--ink);
  font-family:var(--serif);font-size:var(--step-body);
  line-height:1.6;letter-spacing:0;
  -webkit-font-smoothing:antialiased;
  overflow-x:hidden;
}
img{display:block;max-width:100%;}
a{color:var(--ink);text-decoration:none;}
button{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;}
code{
  font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  font-size:.92em;color:var(--ink);background:var(--surface);
  padding:.12em .38em;border-radius:3px;
}
::selection{background:var(--accent);color:var(--accent-ink);}
:focus-visible{outline:2px solid var(--accent);outline-offset:4px;}

/* 极轻的纸面颗粒，避免大块纯色显得空 */
.grain{
  position:fixed;inset:0;z-index:3;pointer-events:none;opacity:.5;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='n' opacity='.045'/%3E%3C/svg%3E");
}

/* 首屏的星点画布 */
#sky{
  position:fixed;inset:0;z-index:2;pointer-events:none;
  width:100%;height:100%;opacity:.55;
}

/* ── 顶部条 ─────────────────────────────────────────────── */
.bar{
  position:fixed;top:0;left:0;right:0;z-index:10;
  display:flex;align-items:center;justify-content:space-between;
  padding:1.1rem var(--gutter);
  background:var(--bg);
}
.bar .mark{font-size:var(--step-small);letter-spacing:.02em;}
.bar nav{display:flex;gap:clamp(1rem,2.4vw,2.25rem);}
.bar nav a{
  font-size:var(--step-small);color:var(--muted);
  transition:color .25s ease;
}
.bar nav a:hover,.bar nav a:focus-visible{color:var(--ink);}

/* ── 1 首屏 ─────────────────────────────────────────────── */
.hero{
  position:relative;min-height:100svh;padding:0 var(--gutter);
  display:flex;flex-direction:column;justify-content:flex-end;
  overflow:hidden;
}
.hero-media{position:absolute;inset:0;margin:0;overflow:hidden;}
.hero-media img{
  width:100%;height:100%;object-fit:cover;
  filter:brightness(.55) saturate(.55) contrast(.95);
  will-change:transform;
}
.hero-scrim{
  position:absolute;inset:0;
  background:rgba(10,13,20,.62);
}
.corner{
  position:absolute;z-index:2;margin:0;
  font-size:var(--step-small);color:var(--muted);letter-spacing:.06em;
}
.corner.tl{top:5.5rem;left:var(--gutter);}
.corner.tr{top:5.5rem;right:var(--gutter);}
.corner.bl{bottom:2.2rem;left:var(--gutter);}
.corner.br{bottom:2.2rem;right:var(--gutter);font-variant-numeric:tabular-nums;}

.hero-title{
  position:relative;z-index:2;margin:0 0 18svh;
  font-size:var(--step-display);font-weight:500;
  line-height:.98;letter-spacing:-.03em;
}
.hero-title span{display:block;overflow:hidden;}
.hero-title span > .w{
  display:inline-block;font-style:normal;
  transform:translateY(105%);
  animation:rise 900ms cubic-bezier(.16,.84,.28,1) forwards;
}
@keyframes rise{to{transform:translateY(0);}}

.hero-cue{
  position:absolute;z-index:2;left:50%;bottom:2.2rem;
  transform:translateX(-50%);
  font-size:var(--step-small);color:var(--muted);
  transition:color .3s ease,transform .3s ease;
}
.hero-cue:hover,.hero-cue:focus-visible{color:var(--ink);transform:translate(-50%,-4px);}

/* ── 2 intro ────────────────────────────────────────────── */
.intro{
  position:relative;
  display:grid;grid-template-columns:repeat(12,1fr);
  gap:0 var(--gutter);
  padding:var(--section) 0;
  align-items:start;
}
.intro-sticky{
  position:sticky;top:32svh;
  grid-column:2 / span 5;
  align-self:start;
}
.statement{
  margin:0;font-size:var(--step-lead);line-height:1.35;
  max-width:24ch;
}
.intro-plates{
  grid-column:8 / span 5;
  display:flex;flex-direction:column;gap:var(--section);
}
.plate{margin:0;will-change:transform;}
.plate img{
  width:100%;aspect-ratio:4/5;object-fit:cover;
  filter:brightness(.72) saturate(.6);
}
.plate figcaption{
  margin:.9rem 0 0;font-size:var(--step-small);color:var(--muted);
}

/* ── 3 笔记列表 ─────────────────────────────────────────── */
.notes{padding:var(--section) var(--gutter);}
.sec-title{
  margin:0 0 3rem;
  font-size:var(--step-head);font-weight:500;letter-spacing:-.02em;
}
.notes-grid{
  display:grid;grid-template-columns:repeat(12,1fr);
  gap:0 var(--gutter);align-items:start;
}
.notes-photo{
  grid-column:1 / span 5;
  position:sticky;top:14svh;
}
.notes-photo img{
  width:100%;aspect-ratio:4/5;object-fit:cover;
  filter:brightness(.7) saturate(.55);
  transition:opacity .3s ease;
}
.photo-cap{
  margin:.9rem 0 0;font-size:var(--step-small);color:var(--muted);
  transition:opacity .3s ease;
}
.note-list{grid-column:7 / span 6;list-style:none;margin:0;padding:0;}
.note-row{padding-block:.15rem;}
.note-row + .note-row{margin-top:.4rem;}
.note-head{
  display:flex;align-items:baseline;justify-content:space-between;
  width:100%;text-align:left;
  padding:1.15rem 0;
  transition:color .25s ease,transform .25s ease;
}
.note-name{
  font-size:clamp(1.15rem,1.5vw,1.5rem);
  color:var(--muted);font-weight:400;
  transition:color .25s ease;
}
.note-meta{font-size:var(--step-small);color:var(--muted);font-variant-numeric:tabular-nums;}
.note-row.is-active .note-name{color:var(--ink);}
.note-row.is-active .note-head{transform:translateX(.6rem);}
.note-desc{
  max-height:0;overflow:hidden;
  transition:max-height .45s cubic-bezier(.2,.7,.2,1),opacity .3s ease;
  opacity:0;
}
.note-row.is-active .note-desc{max-height:48rem;opacity:1;}
.note-desc p{
  margin:0 0 1rem;max-width:34ch;
  font-size:var(--step-body);line-height:1.62;color:var(--ink);
}
.note-desc p:last-child{margin-bottom:1.6rem;}

/* ── 4 about ────────────────────────────────────────────── */
.about{
  padding:var(--section) var(--gutter);
  display:grid;grid-template-columns:repeat(12,1fr);
  gap:0 var(--gutter);
}
.about-facts{
  grid-column:1 / span 2;
  display:flex;flex-direction:column;gap:1.6rem;
}
.about-facts p{
  margin:0;font-size:var(--step-small);line-height:1.7;color:var(--muted);
}
.about-body{grid-column:3 / span 9;}
.about-text{
  margin:0;
  font-size:clamp(1.5rem,2.5vw,2.375rem);
  line-height:1.32;letter-spacing:-.01em;font-weight:400;
}
.about-text strong{font-weight:600;color:var(--ink);}
.stamp{
  float:left;
  width:3.6em;height:3.6em;margin:.35em .5em 0 0;
}
.stamp svg{width:100%;height:100%;}
.stamp-line{fill:none;stroke:var(--accent);stroke-width:3;opacity:.85;}
.about-sub{
  margin:1.4rem 0 0;
  font-size:var(--step-body);line-height:1.6;color:var(--muted);
  max-width:46ch;
}

/* ── 5 contact ──────────────────────────────────────────── */
.contact{
  position:relative;min-height:100svh;
  display:flex;align-items:flex-start;justify-content:flex-end;
  padding:clamp(2rem,6vw,4rem) var(--gutter);
  overflow:hidden;
}
.contact-bg{
  position:absolute;inset:0;width:100%;height:100%;object-fit:cover;
  filter:brightness(.5) saturate(.5);
}
.card{
  position:relative;z-index:2;width:min(380px,100%);
  background:var(--surface);padding:2rem;
  border-radius:8px;
}
.card h2{margin:0 0 .8rem;font-size:1.75rem;font-weight:500;letter-spacing:-.01em;}
.card-line{margin:0 0 1.5rem;font-size:var(--step-body);line-height:1.6;color:var(--muted);}
.card-meta{margin:0 0 1.6rem;display:flex;flex-direction:column;gap:.75rem;}
.card-meta div{display:flex;justify-content:space-between;gap:1rem;}
.card-meta dt{font-size:var(--step-small);color:var(--muted);}
.card-meta dd{
  margin:0;font-size:var(--step-small);color:var(--ink);
  font-variant-numeric:tabular-nums;text-align:right;
}
.btn{
  display:flex;align-items:center;justify-content:center;
  height:52px;background:var(--accent);color:var(--accent-ink);
  font-size:var(--step-body);font-weight:600;
  border-radius:4px;
  transition:transform .18s ease,filter .18s ease;
  will-change:transform;
}
.btn:hover,.btn:focus-visible{filter:brightness(1.08);}

/* ── footer ─────────────────────────────────────────────── */
.foot{
  min-height:100svh;padding:2.5rem var(--gutter) 2rem;
  display:flex;flex-direction:column;justify-content:space-between;
  background:var(--surface);
}
.foot-cols{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:2rem var(--gutter);
}
.foot-cols > div + div{margin-top:0;}
.foot-lead{margin:0 0 .35rem;font-size:var(--step-small);color:var(--ink);}
.foot-cols p:not(.foot-lead){margin:0;font-size:var(--step-small);line-height:1.7;color:var(--muted);}
.foot-cols a{color:var(--muted);transition:color .25s ease;}
.foot-cols a:hover,.foot-cols a:focus-visible{color:var(--ink);}
.credits{max-width:34ch;}
.wordmark{
  margin:0;
  font-size:clamp(2rem,9.2vw,9rem);font-weight:500;
  letter-spacing:-.04em;line-height:1;
  white-space:nowrap;
}
.legal{
  margin:.9rem 0 0;font-size:var(--step-small);color:var(--muted);
}

/* ── 进入动画 ───────────────────────────────────────────── */
[data-reveal]{
  opacity:0;transform:translateY(24px);
  transition:opacity .7s ease,transform .7s cubic-bezier(.2,.7,.2,1);
}
[data-reveal].is-in{opacity:1;transform:none;}
[data-reveal][data-delay="1"]{transition-delay:80ms;}
[data-reveal][data-delay="2"]{transition-delay:160ms;}

/* ── 手机 ───────────────────────────────────────────────── */
@media (max-width:820px){
  .intro{grid-template-columns:1fr;padding:var(--section) var(--gutter);gap:3rem;}
  .intro-sticky,.intro-plates{grid-column:auto;position:static;}
  .intro-plates{gap:2.5rem;}
  .notes-grid{grid-template-columns:1fr;gap:2rem;}
  .notes-photo,.note-list{grid-column:auto;}
  .notes-photo{position:static;}
  .notes-photo img{aspect-ratio:4/3;max-height:38svh;}
  .about{grid-template-columns:1fr;}
  .about-facts{grid-column:auto;flex-direction:row;flex-wrap:wrap;gap:1.2rem 2rem;}
  .about-body{grid-column:auto;}
  .about-text{font-size:1.375rem;}
  .contact{min-height:0;display:block;padding:0 0 3rem;overflow:visible;}
  .contact-bg{inset:0 0 auto 0;height:56svh;}
  .card{width:auto;margin:-9svh 16px 0;position:relative;}
  .foot-cols{grid-template-columns:1fr 1fr;}
  .hero-title{margin-bottom:24svh;}
  .corner.tr,.corner.bl{display:none;}
}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
  }
  .hero-title span > .w{transform:none;}
  #sky{display:none;}
}
