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

:root {
  --cream: #f5e6c8;
  --paper: #fbf3e2;
  --tan: #d4a574;
  --tan-deep: #b5844f;
  --ink: #262117;
  --ink-2: #4c4335;
  --line: #c9b294;
  --radius: 18px;
  --head: "Space Grotesk", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --body: "DM Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

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

body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.7;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--tan-deep);
  outline-offset: 3px;
}

[ id ] { scroll-margin-top: 92px; }

/* 胶片颗粒层 */
.grain {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: .2;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* 页头：品牌独占一行 */
.mast {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(14px, 3vw, 26px) clamp(98px, 20vw, 180px) 6px clamp(18px, 5vw, 56px);
}

.mast-brand {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .15rem 0;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.05rem);
  letter-spacing: .02em;
  text-decoration: none;
  color: var(--ink);
}

.mast-word { border-bottom: 3px solid var(--tan); line-height: 1.1; }

.mast-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--ink);
}

/* 汉堡 + 全屏遮罩菜单 */
.dock-btn {
  position: fixed;
  top: clamp(12px, 3vw, 22px);
  right: clamp(14px, 4vw, 44px);
  z-index: 85;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem .95rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--head);
  font-size: .92rem;
  letter-spacing: .12em;
  cursor: pointer;
  list-style: none;
  box-shadow: 0 8px 20px rgba(38, 33, 23, .26);
  user-select: none;
}

.dock-btn::-webkit-details-marker { display: none; }
.dock-btn::marker { content: ""; }

.dock-icon {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 10px;
}

.dock-icon::before,
.dock-icon::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transition: transform .25s ease;
}

.dock-icon::before { top: 0; }
.dock-icon::after { bottom: 0; }
.dock[open] .dock-icon::before { transform: translateY(4px) rotate(45deg); }
.dock[open] .dock-icon::after { transform: translateY(-4px) rotate(-45deg); }

.dock-panel {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  margin: 0;
  padding: clamp(72px, 15vh, 124px) clamp(22px, 8vw, 72px) 56px;
  list-style: none;
  overflow-y: auto;
  background: var(--ink);
  color: var(--cream);
  background-image: repeating-linear-gradient(0deg, rgba(245, 230, 200, .06) 0 1px, transparent 1px 4px);
}

.dock[open] .dock-panel {
  display: grid;
  align-content: start;
}

@keyframes tracking {
  from { transform: skewY(-.8deg) translateY(-10px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

.dock[open] .dock-panel { animation: tracking .34s ease-out both; }

.dock-panel li { list-style: none; }

.dock-panel a {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: .4rem 0;
  color: var(--cream);
  text-decoration: none;
  font-family: var(--head);
  font-weight: 600;
  font-size: clamp(1.3rem, 5.2vw, 2.15rem);
  letter-spacing: -.01em;
  border-bottom: 1px solid rgba(245, 230, 200, .16);
}

.dock-panel a:hover { color: var(--tan); }

/* 主区 */
.main { display: block; max-width: 100%; }

.stage {
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: end;
  justify-items: end;
  max-width: 100%;
  min-height: 45vh;
  padding: clamp(56px, 10vh, 104px) clamp(18px, 5vw, 56px) clamp(38px, 7vh, 76px);
  background: linear-gradient(140deg, #ecd9b6, #cfa06d 54%, #8b6742);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 5vw));
  margin-bottom: clamp(20px, 4vw, 44px);
}

.stage::before {
  content: "";
  position: absolute;
  inset: -2px;
  z-index: 2;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(38, 33, 23, .1) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply;
  animation: track 9s linear infinite;
}

@keyframes track {
  0%, 100% { transform: translateY(0) skewY(0); }
  50% { transform: translateY(1px) skewY(.28deg); }
}

.stage::after {
  content: attr(data-brand);
  position: absolute;
  left: -.08em;
  bottom: -.16em;
  z-index: 0;
  max-width: 120%;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(3.6rem, 21vw, 14rem);
  line-height: .8;
  letter-spacing: -.05em;
  white-space: nowrap;
  color: rgba(38, 33, 23, .15);
  pointer-events: none;
}

.stage-shot {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  background: radial-gradient(120% 90% at 82% 8%, rgba(255, 246, 226, .8), transparent 62%);
}

.stage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(.3) contrast(1.05) saturate(.78);
  opacity: .88;
}

.stage-copy {
  position: relative;
  z-index: 3;
  max-width: 24ch;
  text-align: right;
}

.stage-h1 {
  margin: 0;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.72rem, 6vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 rgba(255, 249, 235, .4);
}

/* 正文 + 右栏 */
.reader {
  position: relative;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 56px) clamp(38px, 7vw, 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 246px;
  gap: clamp(22px, 4vw, 54px);
  align-items: start;
  overflow: clip;
}

.leak {
  position: absolute;
  top: -4%;
  right: 0;
  z-index: 0;
  width: min(52vw, 420px);
  aspect-ratio: 1;
  margin: 0;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 42%, rgba(255, 198, 122, .5), rgba(255, 122, 92, .17) 46%, transparent 70%);
  filter: blur(14px);
  mix-blend-mode: screen;
  animation: leak 12s ease-in-out infinite alternate;
}

@keyframes leak {
  from { transform: translate3d(0, 0, 0) scale(1); opacity: .65; }
  to { transform: translate3d(-18px, 20px, 0) scale(1.12); opacity: 1; }
}

.reader-flow {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.reader-flow > section {
  padding-block: clamp(18px, 3vw, 32px);
  border-top: 1px dashed var(--line);
}

.reader-flow > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.reader-flow > section::before {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 2px;
  background: var(--tan);
  margin-bottom: 1.05rem;
}

.reader-flow h2,
.rail-h {
  margin: 0 0 .6rem;
  font-family: var(--head);
  font-weight: 600;
  font-size: clamp(1.42rem, 3.6vw, 2rem);
  line-height: 1.24;
  letter-spacing: -.02em;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.reader-flow h3 {
  margin: 1.7rem 0 .5rem;
  font-family: var(--head);
  font-weight: 600;
  font-size: clamp(1.14rem, 2.6vw, 1.38rem);
  line-height: 1.3;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.h-fill { display: inline; }

.h-mark {
  display: inline-block;
  width: .6em;
  height: .3em;
  margin-right: .45em;
  background: var(--tan);
  border-radius: 2px;
  vertical-align: baseline;
  transform: translateY(-.16em);
}

.reader-flow p {
  max-width: 64ch;
  margin: 0 0 1.05em;
  font-size: 1.05rem;
  line-height: 1.82;
  color: var(--ink-2);
}

.reader-flow strong,
.reader-flow b { color: var(--ink); }

.reader-flow a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--tan);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.reader-flow a:hover { background: var(--tan); }

.reader-flow ul,
.reader-flow ol {
  margin: 0 0 1.1em;
  padding-left: 1.2em;
  color: var(--ink-2);
}

.reader-flow li { margin: .35em 0; line-height: 1.75; }

.reader-flow blockquote {
  margin: 1.3em 0;
  padding: 1rem 1.1rem;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: inset 0 0 0 2px var(--tan);
  overflow-wrap: break-word;
}

.reader-flow blockquote p { margin: 0 0 .5em; }
.reader-flow blockquote p:last-child { margin-bottom: 0; }

.reader-flow code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .92em;
  background: var(--paper);
  padding: .1em .35em;
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.reader-flow pre {
  display: block;
  max-width: 100%;
  margin: 1.2em 0;
  padding: .9rem 1rem;
  overflow-x: auto;
  background: var(--paper);
  border-radius: var(--radius);
  font-size: .94rem;
  line-height: 1.65;
}

.reader-flow pre code { background: none; padding: 0; }

.reader-flow hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.6em 0;
}

.reader-flow img {
  max-width: 100%;
  border-radius: var(--radius);
  filter: sepia(.2) contrast(1.04) saturate(.85);
  margin: .4em 0 1.2em;
}

.reader-flow table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.2em 0;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: .98rem;
  line-height: 1.6;
}

.reader-flow th,
.reader-flow td {
  padding: .55em .7em;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.reader-flow th {
  font-family: var(--head);
  font-weight: 600;
  color: var(--ink);
  white-space: normal;
}

.reader-flow figure { max-width: 100%; margin: 1.2em 0; }

/* 右栏 */
.rail {
  position: sticky;
  top: 92px;
  align-self: start;
  z-index: 1;
  min-width: 0;
  padding: 1.05rem 1rem 1.15rem;
  background: var(--paper);
  border-radius: var(--radius);
  box-shadow: 0 10px 26px rgba(38, 33, 23, .1);
}

.rail-h {
  font-size: 1rem;
  letter-spacing: .04em;
  margin-bottom: .7rem;
}

.rail-h .h-mark {
  width: .5em;
  height: .5em;
  border-radius: 50%;
  transform: none;
  margin-right: .4em;
}

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

.rail-list li {
  counter-increment: r;
  border-bottom: 1px solid rgba(201, 178, 148, .55);
}

.rail-list li:last-child { border-bottom: 0; }

.rail-list a {
  display: flex;
  align-items: baseline;
  gap: .55rem;
  min-height: 40px;
  padding: .45rem 0;
  font-size: .92rem;
  line-height: 1.4;
  color: var(--ink-2);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.rail-list a::before {
  content: counter(r, decimal-leading-zero);
  font-family: var(--head);
  font-size: .72rem;
  letter-spacing: .06em;
  color: var(--tan-deep);
}

.rail-list a:hover { color: var(--ink); }

.to-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin-top: .95rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: .82rem;
  letter-spacing: .1em;
  text-decoration: none;
}

/* 页脚 */
.end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1.4rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 34px) clamp(18px, 5vw, 56px) clamp(28px, 5vw, 44px);
  border-top: 1px solid rgba(38, 33, 23, .22);
}

.end-brand a {
  display: inline-block;
  max-width: 100%;
  font-family: var(--head);
  font-weight: 700;
  font-size: clamp(1.8rem, 7vw, 3rem);
  line-height: 1;
  letter-spacing: -.03em;
  text-decoration: none;
  color: var(--ink);
}

.end-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .1rem .9rem;
  max-width: 100%;
}

.end-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: .86rem;
  color: var(--ink-2);
  text-decoration: none;
}

.end-nav a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--tan);
  text-decoration-thickness: 2px;
}

.end-copy {
  font-size: .8rem;
  letter-spacing: .07em;
  color: var(--ink-2);
}

/* 进场 */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity .55s ease, transform .55s cubic-bezier(.22, .7, .3, 1);
}

@media (max-width: 900px) {
  .reader { display: block; }
  .rail {
    position: static;
    margin-top: clamp(28px, 6vw, 46px);
  }
  .leak {
    width: 62vw;
    right: 0;
    top: -2%;
  }
}

@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .stage {
    min-height: 44vh;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 calc(100% - 26px));
  }
  .stage-copy { max-width: 100%; }
  .stage::after {
    max-width: 100%;
    font-size: clamp(3rem, 19vw, 6rem);
  }
  .end {
    flex-direction: column;
    align-items: flex-start;
    gap: .7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stage::before,
  .leak { animation: none; }
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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