@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Rubik:wght@300;400;500;600;700&display=swap');

:root {
  --ink: #000000;
  --paper: #ffffff;
  --rail: 76px;
  --gap: 1rem;
  --radius: 28px;
  --line: rgba(0, 0, 0, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-left: var(--rail);
  background: var(--paper);
  color: var(--ink);
  font-family: 'Rubik', 'Outfit', system-ui, -apple-system, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 17px;
  line-height: 1.72;
  overflow-x: clip;
  font-weight: 400;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.045) 1px, transparent 1px);
  background-size: 40px 40px;
}

a {
  color: var(--ink);
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', 'Rubik', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  overflow-wrap: break-word;
}

h2 {
  font-size: clamp(21px, 2.3vw, 29px);
}

h3 {
  font-size: clamp(18px, 1.8vw, 22px);
}

h2 > span,
h3 > span {
  display: inline-block;
  padding-bottom: 5px;
  border-bottom: 3px solid var(--ink);
}

p {
  margin: 0 0 1.05em;
  max-width: 66ch;
}

ul,
ol {
  padding-left: 1.3em;
}

/* 键盘跳过 */
.skip {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 90;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 16px;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.skip:focus {
  transform: translateY(0);
}

/* 左侧固定竖排栏 */
.rail {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--rail);
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0 16px;
}

.rail-brand {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: 'Outfit', 'Rubik', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: var(--paper);
  text-decoration: none;
  padding: 14px 8px;
  min-height: 44px;
}

.rail-brand:hover {
  opacity: 0.75;
}

.burger {
  width: 48px;
  min-height: 48px;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  color: var(--paper);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.burger:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #fff;
}

.burger-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--paper);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.burger.open .burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.open .burger-bar:nth-child(2) {
  transform: translateY(0) rotate(-45deg);
}

.burger-word {
  font-size: 13px;
  letter-spacing: 0.14em;
  margin-top: 2px;
}

.rail-contact {
  writing-mode: vertical-rl;
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0.22em;
  padding: 14px 6px;
  min-height: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

/* 全屏遮罩菜单 */
.veil {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--ink);
  color: var(--paper);
  opacity: 0;
  visibility: hidden;
  overflow-y: auto;
  padding: clamp(28px, 6vw, 84px) clamp(20px, 5vw, 64px) clamp(28px, 6vw, 84px)
    calc(var(--rail) + clamp(20px, 4vw, 56px));
  transition: opacity 0.34s ease, visibility 0.34s ease;
}

html.nav-open .veil {
  opacity: 1;
  visibility: visible;
}

.veil-inner {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 3fr);
  gap: clamp(24px, 4vw, 56px);
  max-width: 1120px;
  margin: 0 auto;
}

.veil-nav ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: menucount;
}

.veil-nav li {
  counter-increment: menucount;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  transition-delay: calc(var(--i, 0) * 55ms);
}

html.nav-open .veil-nav li {
  opacity: 1;
  transform: none;
}

.veil-nav a {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 20px 0;
  min-height: 44px;
  color: var(--paper);
  text-decoration: none;
  font-family: 'Outfit', 'Rubik', sans-serif;
  font-weight: 600;
  font-size: clamp(20px, 2.8vw, 30px);
  letter-spacing: 0.01em;
}

.veil-nav a::before {
  content: counter(menucount, decimal-leading-zero);
  font-family: 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  opacity: 0.6;
}

.veil-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 6px;
}

.veil-side h2 {
  font-size: 20px;
  margin-bottom: 0.8em;
}

.veil-side h2 > span {
  border-color: var(--paper);
}

.veil-host {
  font-size: 16px;
  opacity: 0.75;
  overflow-wrap: break-word;
}

/* 主体网格 */
main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: clamp(24px, 3.4vw, 56px);
  padding: clamp(22px, 4vw, 60px) clamp(20px, 4.5vw, 76px) clamp(44px, 6vw, 96px)
    clamp(20px, 3.5vw, 56px);
  max-width: 1360px;
}

article {
  min-width: 0;
}

/* Hero */
.hero {
  position: relative;
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: clamp(18px, 3vw, 34px);
}

.hero::before {
  content: '';
  display: block;
  height: 12px;
  background: var(--ink);
  transform: skewY(-1.4deg);
  margin-bottom: clamp(20px, 3.4vw, 38px);
}

.hero-eyebrow {
  font-size: 14px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin: 0 0 14px;
  padding-left: 2px;
}

.hero h1 {
  font-size: clamp(34px, 6.2vw, 68px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 clamp(18px, 3vw, 32px);
  max-width: 22ch;
}

.collage {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
  margin-top: 4px;
}

.shot {
  margin: 0;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 46px -34px rgba(0, 0, 0, 0.6);
}

.shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot-0 {
  grid-column: 1 / span 7;
  aspect-ratio: 16 / 10;
}

.shot-1 {
  grid-column: 9 / span 4;
  aspect-ratio: 4 / 5;
  transform: translateY(22px);
}

.collage.solo .shot-0 {
  grid-column: 1 / span 9;
}

/* 正文区 */
article > section:not(.hero) {
  padding: clamp(26px, 4vw, 50px) 0;
  border-top: 1px solid var(--ink);
}

article > section:not(.hero) + section {
  margin-top: clamp(6px, 1vw, 14px);
}

article h2 + p,
article h3 + p {
  margin-top: 0.3em;
}

article a {
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

article blockquote {
  margin: 1.5em 0;
  padding: 0.2em 0 0.2em 20px;
  border-left: 4px solid var(--ink);
}

article figure {
  margin: 1.5em 0;
}

article time {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: 16px;
}

article th,
article td {
  border: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
}

/* 右侧栏 */
aside {
  align-self: start;
  position: sticky;
  top: 24px;
  padding: 24px 22px 26px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  min-width: 0;
}

aside h2 {
  font-size: 19px;
  margin-bottom: 0.9em;
}

aside h2 > span {
  border-bottom-width: 2px;
}

.aside-h2 {
  margin-top: 1.8em;
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}

.toc li {
  counter-increment: toc;
  border-top: 1px solid var(--line);
}

.toc a {
  display: flex;
  gap: 10px;
  align-items: baseline;
  padding: 10px 0;
  min-height: 40px;
  font-size: 16px;
  text-decoration: none;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-size: 13px;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}

.toc a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.aside-host {
  font-size: 16px;
  margin: 0;
  overflow-wrap: break-word;
}

/* 页脚 */
footer {
  position: relative;
  z-index: 1;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(34px, 5vw, 64px) clamp(20px, 4.5vw, 72px) 22px
    clamp(20px, 3.5vw, 56px);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 44px);
  max-width: 1280px;
}

footer a {
  color: var(--paper);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

footer address {
  font-style: normal;
  font-family: 'Outfit', 'Rubik', sans-serif;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 8px;
  letter-spacing: 0.01em;
}

footer address span {
  font-family: 'Rubik', system-ui, sans-serif;
  font-weight: 400;
  font-size: 14px;
  opacity: 0.68;
  overflow-wrap: break-word;
}

footer dl {
  margin: 0;
}

footer dt {
  font-size: 13px;
  letter-spacing: 0.26em;
  opacity: 0.62;
  margin-bottom: 12px;
}

footer dd {
  margin: 0;
}

footer nav a,
footer ul a {
  display: inline-block;
  padding: 9px 0;
  min-height: 40px;
  font-size: 16px;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.foot-col-end {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
}

.to-top {
  display: inline-block;
  padding: 14px 18px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 2px;
  font-size: 16px;
}

.to-top:hover {
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
}

.copy {
  max-width: 1280px;
  margin: clamp(26px, 4vw, 46px) 0 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 14px;
  opacity: 0.7;
}

/* 滚动揭示 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.68s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.68s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

/* 窄屏 */
@media (max-width: 960px) {
  :root {
    --rail: 60px;
  }

  main {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  aside {
    position: static;
  }

  .veil-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .foot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .foot-col-end {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    --rail: 56px;
  }

  body {
    font-size: 16px;
  }

  .rail {
    padding: 14px 0 12px;
  }

  .rail-brand {
    font-size: 15px;
    letter-spacing: 0.12em;
    padding: 10px 4px;
  }

  .burger {
    width: 40px;
  }

  .veil {
    padding-left: calc(var(--rail) + 18px);
    padding-right: 18px;
  }

  main {
    padding: 18px 16px 46px 18px;
  }

  .collage {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .shot-0,
  .shot-1,
  .collage.solo .shot-0 {
    grid-column: 1 / -1;
    transform: none;
    aspect-ratio: 16 / 11;
  }

  .hero {
    min-height: auto;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .foot-col-end {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .veil-nav li {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .veil {
    transition: none;
  }

  .burger-bar {
    transition: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
