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

:root {
  --ink: #000000;
  --paper: #ffffff;
  --hair: rgba(0, 0, 0, 0.14);
  --pad: clamp(1.25rem, 5vw, 4.5rem);
  --dock: 4.75rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
  padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}

article {
  scroll-margin-top: 2rem;
}

a {
  color: inherit;
  text-underline-offset: 0.28em;
}

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

h1,
h2,
h3,
h4 {
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.95;
  margin: 0;
}

/* ---------- 角落品牌 ---------- */
.brand {
  position: fixed;
  top: clamp(0.7rem, 2vw, 1.2rem);
  left: clamp(0.7rem, 2vw, 1.2rem);
  z-index: 60;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.brand:hover,
.brand:focus-visible {
  background: var(--ink);
  color: var(--paper);
}

.brandimg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 50;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: stretch;
  gap: 0.4rem;
  padding: 0.45rem clamp(0.75rem, 3vw, 2rem);
  padding-bottom: calc(0.45rem + env(safe-area-inset-bottom));
}

.dock nav {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.dock nav p {
  margin: 0;
  display: flex;
  align-items: stretch;
  gap: 0.1rem;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.dock nav p::-webkit-scrollbar {
  display: none;
}

.dock nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 clamp(0.45rem, 2vw, 0.9rem);
  color: var(--paper);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  position: relative;
}

.dock nav a::after {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.6rem;
  height: 2px;
  background: var(--paper);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s ease;
}

.dock nav a:hover::after,
.dock nav a:focus-visible::after {
  transform: scaleX(1);
}

.sep {
  flex: none;
  width: 1px;
  align-self: stretch;
  margin: 0.65rem 0.3rem;
  background: rgba(255, 255, 255, 0.35);
}

.contact {
  flex: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--paper);
  border-radius: 999px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.25s ease, color 0.25s ease;
}

.contact:hover,
.contact:focus-visible {
  background: var(--paper);
  color: var(--ink);
}

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(1.25rem, 3vw, 2.25rem);
  padding: clamp(5rem, 14vh, 10rem) var(--pad) clamp(5rem, 11vw, 9rem);
  background: var(--paper);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9vw), 0 100%);
}

.ghost {
  position: absolute;
  top: 9%;
  left: -2vw;
  font-size: clamp(4rem, 21vw, 15rem);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 0.82;
  color: var(--ink);
  opacity: 0.06;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 12rem);
  letter-spacing: -0.05em;
  line-height: 0.88;
  max-width: 22ch;
  overflow-wrap: break-word;
  position: relative;
}

.hero-fig {
  margin: 0;
  width: 100%;
  min-height: 20vh;
  background: var(--ink);
  border-radius: 28px;
  overflow: hidden;
}

.hero-fig img {
  width: 100%;
  height: min(38vh, 21rem);
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
}

/* ---------- 正文 ---------- */
main > article:not(.hero):not(.refs) {
  max-width: 64rem;
  margin: 0 auto;
  padding: clamp(3rem, 9vw, 8rem) var(--pad);
}

main > article:not(.hero):not(.refs) + article:not(.hero):not(.refs) {
  border-top: 1px solid var(--hair);
}

main > article:not(.hero):not(.refs) h2 {
  font-size: clamp(1.9rem, 5vw, 3.2rem);
  margin: 0;
  overflow-wrap: break-word;
}

main > article:not(.hero):not(.refs) h3 {
  font-size: clamp(1.3rem, 2.6vw, 1.75rem);
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin: 2.5rem 0 0.75rem;
}

main h2 + hr,
main h3 + hr {
  margin: 1rem 0 2rem;
  border: 0;
  height: 3px;
  width: 3.5rem;
  background: var(--ink);
}

main p {
  margin: 0 0 1.15em;
  max-width: 62ch;
}

main ul,
main ol {
  padding-left: 1.3rem;
  max-width: 62ch;
}

main li {
  margin-bottom: 0.55rem;
}

main figure {
  margin: 2rem 0;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 28px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

main figure img {
  border-radius: 0;
}

main blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.25rem;
  border-left: 5px solid var(--ink);
  font-weight: 600;
}

main table {
  width: 100%;
  border-collapse: collapse;
  font-size: 1rem;
}

main th,
main td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--hair);
}

main th {
  font-weight: 700;
  border-bottom: 2px solid var(--ink);
}

main time {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

/* ---------- 右侧aside ---------- */
.refs {
  max-width: 76rem;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 7rem) var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.side {
  border: 1px solid var(--hair);
  border-radius: 28px;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  align-self: start;
}

.side h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.6rem);
  letter-spacing: -0.03em;
  margin: 0;
}

.side hr {
  margin: 0.9rem 0 1.1rem;
  border: 0;
  height: 2px;
  width: 2.5rem;
  background: var(--ink);
}

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

.side li {
  margin: 0;
  border-top: 1px solid var(--hair);
}

.side li:first-child {
  border-top: 0;
}

.side a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  font-weight: 500;
}

.side a:hover,
.side a:focus-visible {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---------- 页脚 ---------- */
footer {
  border-top: 2px solid var(--ink);
  padding: clamp(2rem, 5vw, 3rem) var(--pad);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

footer address {
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
}

footer address span {
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color 0.25s ease;
}

footer a:hover,
footer a:focus-visible {
  border-bottom-color: var(--ink);
}

.copy {
  margin: 0;
  font-size: 1rem;
}

/* ---------- 动效 ---------- */
.js main > article {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js main > article.in {
  opacity: 1;
  transform: none;
}

/* ---------- 断点 ---------- */
@media (min-width: 60rem) {
  .refs {
    grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  }
  .refs > .side {
    grid-column: 2;
  }
}

@media (max-width: 40rem) {
  :root {
    --pad: 1.15rem;
    --dock: 4.5rem;
  }
  .hero {
    padding-bottom: 4.5rem;
    gap: 1.25rem;
  }
  .hero h1 {
    font-size: clamp(2.5rem, 12vw, 4rem);
  }
  .ghost {
    top: 7%;
    font-size: 34vw;
  }
  .contact {
    display: none;
  }
  .hero-fig img {
    height: 30vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js main > article {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .dock nav a::after,
  footer a,
  .brand,
  .contact {
    transition: none;
  }
}

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