@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: #101C26;
  --ink-deep: #0B141D;
  --ink-lift: #162836;
  --amber: #E3A45C;
  --amber-soft: rgba(227, 164, 92, .18);
  --amber-line: rgba(227, 164, 92, .26);
  --cream: #F3EEE7;
  --muted: rgba(243, 238, 231, .68);
  --faint: rgba(243, 238, 231, .48);
  --line: rgba(243, 238, 231, .12);
  --glass: rgba(243, 238, 231, .055);
  --r: 10px;
  --dock-h: 76px;
  --mono: "Fira Code", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-bottom: calc(var(--dock-h) + 20px);
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: "Fira Sans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.78;
  color: var(--cream);
  background:
    radial-gradient(78vw 58vh at 82% -12%, rgba(227, 164, 92, .17), transparent 62%),
    radial-gradient(66vw 52vh at 4% 46%, rgba(227, 164, 92, .09), transparent 66%),
    linear-gradient(185deg, #0C1620 0%, var(--ink) 42%, var(--ink-deep) 100%);
  background-attachment: fixed;
  overflow-wrap: break-word;
}

h1, h2, h3, h4 { margin: 0 0 .55em; line-height: 1.3; font-weight: 600; letter-spacing: .005em; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: var(--amber); text-decoration: none; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
a:hover { border-bottom-color: currentColor; }
img { display: block; max-width: 100%; height: auto; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: .3em 0; }
blockquote { margin: 1.2em 0; padding: .2em 0 .2em 1em; border-left: 3px solid var(--amber-line); color: var(--muted); }
table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 16px; }
th, td { padding: .6em .7em; border-bottom: 1px solid var(--line); text-align: left; }
code, kbd, samp { font-family: var(--mono); font-size: .92em; color: var(--amber); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.6em 0; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ---------- 首屏 ---------- */
.stage { display: block; }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 70vh;
  min-height: 70svh;
  overflow: hidden;
  padding: clamp(30px, 7vh, 74px) clamp(16px, 5vw, 56px) 0;
  perspective: 820px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1060px;
  margin-inline: auto;
}

.hero-title {
  margin: 0;
  max-width: 22ch;
  font-size: clamp(31px, 7vw, 64px);
  line-height: 1.07;
  font-weight: 600;
  letter-spacing: -.012em;
  text-shadow: 0 18px 44px rgba(5, 10, 15, .7);
}

.hero-title::after {
  content: "";
  display: block;
  width: 78px;
  height: 6px;
  margin-top: 26px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--amber), rgba(227, 164, 92, 0));
  transform: skewX(-26deg);
}

.cue {
  display: block;
  width: 12px;
  height: 12px;
  margin-top: 26px;
  border-right: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(45deg);
  opacity: .85;
}

.hero-art {
  position: relative;
  z-index: 1;
  height: clamp(160px, 36vh, 330px);
  margin: 26px calc(clamp(16px, 5vw, 56px) * -1) 0;
  overflow: hidden;
}

.layer {
  position: absolute;
  inset: -14% -4%;
  pointer-events: none;
  will-change: transform;
}

.layer-a {
  background: radial-gradient(58% 82% at 28% 104%, rgba(227, 164, 92, .34), transparent 70%);
  transform: translate3d(0, calc(var(--sy, 0) * .22px), 0);
}

.layer-b {
  background: linear-gradient(118deg, rgba(16, 28, 38, .92), rgba(16, 28, 38, .18) 56%, rgba(227, 164, 92, .16));
  transform: translate3d(0, calc(var(--sy, 0) * .44px), 0);
}

.layer-c {
  background: linear-gradient(0deg, rgba(11, 20, 29, .96), transparent 58%);
  transform: translate3d(0, calc(var(--sy, 0) * .12px), 0);
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.82) contrast(1.06);
  transform: translate3d(0, calc(var(--sy, 0) * .3px), 0) scale(1.07);
  will-change: transform;
}

.band {
  display: block;
  height: 13px;
  background: linear-gradient(90deg, var(--amber) 0%, rgba(227, 164, 92, .34) 46%, rgba(227, 164, 92, 0) 100%);
  transform: skewY(-1.6deg);
  transform-origin: left center;
}

/* ---------- 侧栏 + 正文 ---------- */
.wrap {
  display: flex;
  align-items: flex-start;
  gap: clamp(18px, 3vw, 44px);
  max-width: 1180px;
  margin-inline: auto;
  padding: clamp(26px, 4vw, 54px) clamp(16px, 5vw, 56px) 44px;
}

.rail {
  position: sticky;
  top: 20px;
  flex: 0 0 222px;
  padding: 20px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

.rail-title {
  margin: 0 0 .35em;
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--cream);
}

.rail .subtitle {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.subtitle { color: var(--muted); font-size: 16px; }

.rail-top {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--amber);
}

.flow {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.6vw, 30px);
  counter-reset: chap;
}

.flow > section {
  position: relative;
  counter-increment: chap;
  padding: clamp(22px, 3.2vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--glass);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  box-shadow: 0 30px 70px -48px rgba(0, 0, 0, .95);
  scroll-margin-top: 22px;
  transition: border-color .3s ease, box-shadow .3s ease;
}

.flow > section::before {
  content: counter(chap, decimal-leading-zero);
  position: absolute;
  top: 15px;
  right: 18px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .18em;
  color: var(--amber);
  opacity: .72;
}

.flow > section:hover {
  border-color: var(--amber-line);
  box-shadow: 0 34px 80px -46px rgba(0, 0, 0, 1);
}

.flow h2 {
  font-size: clamp(22px, 3vw, 30px);
  padding-right: 3.2em;
  letter-spacing: -.005em;
}

.flow h3 { font-size: 19px; color: var(--amber); margin-top: 1.4em; }
.flow h4 { font-size: 17px; color: var(--cream); }
.flow > section > :first-child { margin-top: 0; }

/* ---------- 页脚 ---------- */
.foot {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  margin-top: 16px;
  padding: clamp(32px, 5vw, 58px) max(clamp(16px, 5vw, 56px), calc((100vw - 1180px) / 2)) calc(var(--dock-h) + 34px);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 28, 38, .35), rgba(8, 15, 22, .94));
}

.f-brand { display: flex; align-items: center; gap: 10px; }

.f-name {
  margin: 0;
  font-family: var(--mono);
  font-size: 16px;
  letter-spacing: .1em;
  color: var(--cream);
}

.brand-mark {
  display: block;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: linear-gradient(142deg, var(--amber), rgba(227, 164, 92, .22));
}

.brand-mark img { width: 100%; height: 100%; border-radius: 7px; object-fit: cover; }

.f-nav dl { margin: 0; display: grid; }
.f-nav dt { margin: 0; }
.f-nav dd { display: none; margin: 0; }

.f-nav dt a {
  display: block;
  min-height: 42px;
  padding: 9px 0;
  font-size: 16px;
  color: var(--muted);
  border-bottom: 1px dashed rgba(243, 238, 231, .1);
  transition: color .2s, padding-left .2s;
}

.f-nav dt a:hover { color: var(--cream); padding-left: 5px; }

.f-bottom {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.copy {
  margin: 0;
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--faint);
}

.f-mini { display: flex; gap: 18px; flex-wrap: wrap; }
.f-mini a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 16px;
  color: var(--muted);
}
.f-mini a:hover { color: var(--amber); }

/* ---------- 底部固定条 ---------- */
.dock {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 10px clamp(12px, 3vw, 22px) calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--amber-line);
  background: rgba(11, 20, 29, .84);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.dock-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  padding-right: 10px;
  color: var(--cream);
  border-bottom: 0;
}

.dock-name {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: .08em;
  white-space: nowrap;
}

.dock-links {
  display: flex;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.dock-links::-webkit-scrollbar { display: none; }

.dock-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 16px;
  color: var(--muted);
  white-space: nowrap;
  border-bottom: 0;
  transition: color .2s, background-color .2s;
}

.dock-link .glyph {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  background: var(--amber);
  transform: rotate(45deg);
  opacity: .68;
  transition: opacity .2s, transform .25s;
}

.dock-link:hover, .dock-link.on { color: var(--cream); background: var(--amber-soft); }
.dock-link:hover .glyph, .dock-link.on .glyph { opacity: 1; transform: rotate(45deg) scale(1.35); }

.dock-contact {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 15px;
  border-radius: 8px;
  background: var(--amber);
  color: var(--ink);
  font-size: 16px;
  font-weight: 600;
  border-bottom: 0;
  transition: background-color .2s, transform .2s;
}
.dock-contact:hover { background: #f0b775; transform: translateY(-1px); }

/* ---------- 动效 ---------- */
.in { animation: rise .74s cubic-bezier(.22, .7, .2, 1) both; }

.flow > section:nth-child(2) { animation-delay: .05s; }
.flow > section:nth-child(3) { animation-delay: .1s; }
.flow > section:nth-child(4) { animation-delay: .15s; }
.flow > section:nth-child(5) { animation-delay: .2s; }
.flow > section:nth-child(6) { animation-delay: .25s; }
.flow > section:nth-child(7) { animation-delay: .3s; }

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

/* ---------- 窄屏 ---------- */
@media (max-width: 900px) {
  .wrap { flex-direction: column; align-items: stretch; }
  .rail { position: static; flex: 1 1 auto; }
  .foot { grid-template-columns: 1fr 1fr; }
  .f-brand { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .hero { min-height: 68vh; min-height: 68svh; }
  .foot { grid-template-columns: 1fr; }
  .f-bottom { flex-wrap: wrap; justify-content: flex-start; }
  .f-mini { gap: 16px; }
  .dock-name { display: none; }
  .dock { gap: 4px; }
  .dock-contact { padding: 0 12px; }
}

@media (max-width: 380px) {
  body { font-size: 16px; }
  .flow > section::before { display: none; }
  .flow h2 { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-delay: 0ms !important;
    transition-duration: .001ms !important;
  }
  .layer, .hero-img { transform: none !important; }
}

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