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

:root {
  --ink: #172623;
  --ink-deep: #101b19;
  --mint: #5cc6b0;
  --sand: #d4c4a8;
  --clay: #c67b5c;
  --olive: #6b7b3c;
  --paper: #f2ece0;
  --line: rgba(212, 196, 168, 0.16);
  --line-strong: rgba(212, 196, 168, 0.3);
  --glass: rgba(242, 236, 224, 0.05);
  --glass-2: rgba(242, 236, 224, 0.02);
  --ease: cubic-bezier(0.2, 0.7, 0.3, 1);
  --mono: 'Fira Code', 'SFMono-Regular', ui-monospace, monospace;
  --sans: 'Fira Sans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1100px 700px at 6% -12%, rgba(92, 198, 176, 0.17), transparent 62%),
    radial-gradient(900px 620px at 98% 6%, rgba(198, 123, 92, 0.15), transparent 60%),
    radial-gradient(760px 700px at 46% 112%, rgba(107, 123, 60, 0.15), transparent 66%),
    var(--ink);
  color: #e6ded0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.74;
  font-weight: 400;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.26;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.3'/%3E%3C/svg%3E");
}

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

:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 3px;
}

.shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
}

/* ——— 左侧竖排药丸导航 ——— */
.rail {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100vh;
  height: 100dvh;
  padding: 22px 16px 20px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 27, 25, 0.92), rgba(23, 38, 35, 0.55));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 8px 6px;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper);
  text-decoration: none;
}

.mark {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  background: var(--mint);
  box-shadow: 4px -4px 0 0 rgba(212, 196, 168, 0.6);
  transition: transform 0.35s var(--ease);
}

.brand:hover .mark { transform: rotate(45deg); }

.rail-nav ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ded6c6;
  font-family: var(--mono);
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.22s var(--ease), background 0.22s var(--ease),
    border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.rail-nav .num {
  font-size: 12.5px;
  letter-spacing: 0.08em;
  color: var(--mint);
  opacity: 0.9;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: var(--paper);
  border-color: var(--mint);
  background: rgba(92, 198, 176, 0.14);
  transform: translateX(3px);
}

.rail-nav a.is-on {
  color: #0f1d1a;
  border-color: var(--mint);
  background: var(--mint);
}

.rail-nav a.is-on .num { color: #0f1d1a; }

.rail-cta {
  display: grid;
  place-items: center;
  margin-top: auto;
  min-height: 46px;
  padding: 13px 16px;
  border: 1px solid var(--mint);
  border-radius: 999px;
  background: var(--mint);
  color: #0f1d1a;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 16px 30px -22px rgba(92, 198, 176, 0.9);
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}

.rail-cta:hover {
  background: var(--sand);
  border-color: var(--sand);
  color: #172623;
}

.stage { min-width: 0; }

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 clamp(18px, 3vw, 44px);
}

/* ——— 首屏 ——— */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 54px);
  min-height: 100vh;
  padding: 44px 0 40px;
  overflow: hidden;
}

.ghost {
  position: absolute;
  top: 8%;
  left: -4%;
  z-index: 0;
  font-family: var(--mono);
  font-size: clamp(64px, 13vw, 168px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.05em;
  color: rgba(212, 196, 168, 0.075);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity 0.4s ease-out;
  will-change: transform;
}

.hero-media,
.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-shot {
  display: block;
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: cover;
  border: 1px solid var(--line-strong);
  filter: saturate(0.92) contrast(1.03);
  box-shadow: 0 40px 70px -46px rgba(0, 0, 0, 0.9);
}

.shot-empty {
  height: 56vh;
  max-height: 76vh;
  border: 1px dashed var(--line-strong);
  background: linear-gradient(158deg, rgba(92, 198, 176, 0.18), rgba(198, 123, 92, 0.14) 62%, rgba(107, 123, 60, 0.14));
}

.hero-copy { text-align: right; }

.hero-copy h1 {
  margin: 0 0 20px;
  font-family: var(--mono);
  font-size: clamp(2rem, 4.6vw, 3.5rem);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.012em;
  color: #f6f1e6;
  text-wrap: balance;
}

.hero-desc {
  max-width: 42ch;
  margin: 0 0 0 auto;
  padding-right: 16px;
  border-right: 2px solid rgba(92, 198, 176, 0.55);
  color: #cbc2b1;
  font-size: 17px;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ——— 正文 ——— */
.doc { padding: 18px 0 64px; }

.doc > section {
  position: relative;
  margin: 0 0 18px;
  padding: clamp(22px, 3vw, 40px);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--glass), var(--glass-2));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 30px 60px -52px rgba(0, 0, 0, 0.95);
  animation: rise 0.62s var(--ease) both;
}

.doc > section:nth-child(2) { animation-delay: 0.04s; }
.doc > section:nth-child(3) { animation-delay: 0.09s; }
.doc > section:nth-child(4) { animation-delay: 0.14s; }
.doc > section:nth-child(5) { animation-delay: 0.19s; }
.doc > section:nth-child(6) { animation-delay: 0.24s; }
.doc > section:nth-child(7) { animation-delay: 0.29s; }
.doc > section:nth-child(8) { animation-delay: 0.34s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.doc > section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 2px;
  background: linear-gradient(90deg, var(--mint), transparent);
}

.doc small {
  display: block;
  margin-bottom: 8px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--mint);
}

.doc h2 {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 600;
  line-height: 1.32;
  color: #eef8f4;
  letter-spacing: -0.008em;
}

.doc h3 {
  margin: 26px 0 10px;
  font-family: var(--mono);
  font-size: 1.14rem;
  font-weight: 600;
  color: var(--sand);
}

.doc p {
  max-width: 70ch;
  margin: 0 0 1.05em;
}

.doc p:last-child { margin-bottom: 0; }

.doc ul,
.doc ol {
  max-width: 70ch;
  margin: 0 0 1.15em;
  padding-left: 1.35em;
}

.doc li { margin: 0.42em 0; }

.doc li::marker {
  color: var(--mint);
  font-family: var(--mono);
}

.doc a {
  color: var(--mint);
  text-underline-offset: 3px;
}

.doc strong { color: #f8f3e8; }

.doc blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  border-left: 3px solid var(--clay);
  background: rgba(212, 196, 168, 0.08);
  color: #ded5c4;
}

.doc blockquote p { max-width: none; }

.doc code {
  font-family: var(--mono);
  font-size: 0.94em;
  padding: 0.08em 0.36em;
  background: rgba(212, 196, 168, 0.13);
}

.doc img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border: 1px solid var(--line-strong);
}

.doc table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 16px;
}

.doc th,
.doc td {
  padding: 9px 11px;
  border: 1px solid var(--line);
  text-align: left;
}

.doc th { background: rgba(92, 198, 176, 0.1); }

.doc hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px dashed var(--line-strong);
}

/* ——— 页脚 ——— */
footer {
  display: grid;
  gap: 15px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 28px clamp(18px, 3vw, 44px) 44px;
  border-top: 1px solid var(--line);
}

.foot-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0;
  padding: 22px clamp(16px, 2.4vw, 28px);
  border: 1px solid var(--line-strong);
  background: linear-gradient(118deg, rgba(92, 198, 176, 0.18), rgba(198, 123, 92, 0.12) 70%, rgba(107, 123, 60, 0.12));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: clamp(1.35rem, 2.8vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
  color: #f4efe3;
  letter-spacing: 0.01em;
}

.foot-cta a {
  padding: 12px 20px;
  border: 1px solid var(--sand);
  border-radius: 999px;
  color: var(--sand);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.22s var(--ease), color 0.22s var(--ease);
}

.foot-cta a:hover {
  background: var(--sand);
  color: #172623;
}

.foot-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
}

.foot-cols a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid transparent;
  color: #cfc6b5;
  text-decoration: none;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.foot-cols a:hover {
  color: var(--mint);
  border-bottom-color: var(--mint);
}

footer small {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.05em;
  color: #a49c8d;
}

/* ——— 窄屏 ——— */
@media (max-width: 880px) {
  .shell { grid-template-columns: minmax(0, 1fr); }

  .rail {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    height: auto;
    padding: 10px 14px;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(16, 27, 25, 0.94);
  }

  .brand { padding: 6px 2px; }

  .rail-cta {
    margin-top: 0;
    margin-left: auto;
    padding: 11px 16px;
    min-height: 44px;
  }

  .rail-nav {
    order: 3;
    width: 100%;
  }

  .rail-nav ul {
    display: flex;
    gap: 8px;
    padding-bottom: 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .rail-nav ul::-webkit-scrollbar { display: none; }

  .rail-nav li { flex: 0 0 auto; }

  .rail-nav a {
    padding: 10px 14px;
    white-space: nowrap;
  }

  .rail-nav a:hover { transform: none; }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    padding: 26px 0 34px;
  }

  .hero-copy { order: 1; }
  .hero-media { order: 2; }

  .ghost {
    top: 3%;
    left: -3%;
    font-size: clamp(52px, 17vw, 110px);
  }

  .hero-copy h1 { margin-bottom: 14px; }

  .hero-desc { -webkit-line-clamp: 4; }

  .hero-shot,
  .shot-empty { max-height: none; }

  .shot-empty { height: 46vh; }

  .doc { padding: 10px 0 46px; }

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

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

@media (max-width: 420px) {
  body { font-size: 16.5px; }

  .foot-cta { font-size: 1.3rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .doc > div { animation: none; }
  .ghost { transition: none; }
}

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