:root {
  --ink: #12100E;
  --cream: #F2E9DC;
  --flame: #E45B32;
  --paper: #1A1714;
  --line: rgba(242, 233, 220, 0.16);
  --mute: #9C9287;
  --serif: "Libre Bodoni", "Songti SC", Georgia, serif;
  --sans: "Public Sans", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.75;
  letter-spacing: 0.005em;
  overflow-x: hidden;
}

img { max-width: 100%; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

p { margin: 0 0 1em; }

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

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.86em;
}

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

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

/* ---------- 顶栏 ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 16, 14, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 8px clamp(14px, 3vw, 34px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 1.06rem;
  letter-spacing: 0.02em;
}

.brand:hover { color: var(--flame); }

.logo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.bar-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.94rem;
}

.contact:hover {
  border-color: var(--flame);
  color: var(--flame);
}

.burger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font: inherit;
  font-size: 0.94rem;
  cursor: pointer;
}

.burger:hover {
  border-color: var(--flame);
  color: var(--flame);
}

.burger-lines {
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.burger-lines::before,
.burger-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.burger-lines::before { top: -6px; }
.burger-lines::after { top: 6px; }

.anchors {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 clamp(12px, 3vw, 34px) 8px;
  scrollbar-width: none;
}

.anchors::-webkit-scrollbar { display: none; }

.anchors a {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #D6CBBC;
  text-decoration: none;
  font-size: 0.9rem;
  white-space: nowrap;
}

.anchors a:hover {
  border-color: var(--flame);
  color: var(--cream);
}

/* ---------- 全屏菜单 ---------- */
.veil {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: clamp(22px, 6vw, 64px);
  background: #0B0908;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.32s ease, visibility 0.32s ease;
}

.veil.open {
  opacity: 1;
  visibility: visible;
}

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

.veil-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(242, 233, 220, 0.1);
  text-decoration: none;
  color: var(--cream);
  font-family: var(--serif);
  font-size: clamp(1.45rem, 5.4vw, 2.9rem);
  line-height: 1.25;
}

.veil-nav a:hover { color: var(--flame); }

.veil-nav .num {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: var(--flame);
}

.veil-host {
  margin: 0;
  color: var(--mute);
}

/* ---------- 骨架 ---------- */
.frame {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
}

main { min-width: 0; }

.rail {
  align-self: stretch;
  padding: 26px 18px;
  border-right: 1px solid var(--line);
  background: #100E0C;
}

.rail-in { position: sticky; top: 140px; }

.rail-title {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--cream);
}

.rail hr {
  width: 36px;
  height: 2px;
  margin: 12px 0 14px;
  border: 0;
  background: var(--flame);
}

.rail-kw {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-size: 1.02rem;
  color: var(--cream);
}

.rail-host { margin: 0; color: var(--mute); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.42;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
}

.hero-media {
  position: relative;
  z-index: 2;
  min-height: 52vh;
  background:
    radial-gradient(rgba(242, 233, 220, 0.18) 1px, transparent 1.4px) 0 0 / 20px 20px,
    var(--paper);
}

.hero-img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.25) contrast(1.06);
}

.hero-text {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  gap: 16px;
  padding: clamp(22px, 4.4vw, 60px);
  text-align: right;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.86rem;
  letter-spacing: 0.34em;
  color: var(--flame);
}

.hero-eyebrow::after {
  content: "";
  width: 10px;
  height: 1.1em;
  background: var(--flame);
  animation: blink 1.15s steps(2) infinite;
}

.hero-h1 {
  font-size: clamp(2.4rem, 6.4vw, 5.2rem);
  line-height: 1.02;
  text-wrap: balance;
}

.hero-h1 .ch {
  display: inline-block;
  animation: letterUp 0.9s cubic-bezier(0.16, 0.86, 0.28, 1) both;
}

.hero-sub {
  margin: 0;
  max-width: 44ch;
  font-size: 1rem;
  color: #CDC2B4;
}

@keyframes blink {
  0%, 49% { opacity: 1; }
  50%, 100% { opacity: 0; }
}

@keyframes letterUp {
  from { opacity: 0; transform: translateY(0.55em) rotate(2deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

/* ---------- 滚动字带 ---------- */
.ribbon {
  overflow: hidden;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}

.ribbon-track {
  display: flex;
  gap: 1.4rem;
  width: max-content;
  animation: slide 34s linear infinite;
}

.ribbon-group {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 3.4vw, 2.1rem);
  white-space: nowrap;
}

.ribbon-group b {
  font-weight: 500;
  background: linear-gradient(92deg, var(--cream), var(--flame) 52%, var(--cream));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fill 8s linear infinite;
}

.ribbon-group i {
  font-style: normal;
  color: var(--flame);
}

@keyframes slide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes fill {
  from { background-position: 0 0; }
  to { background-position: -200% 0; }
}

/* ---------- 正文 ---------- */
.wrap {
  display: flex;
  justify-content: center;
  padding: 24px clamp(15px, 3vw, 38px) 48px;
}

.sheet {
  width: 100%;
  max-width: 820px;
}

.prose { display: block; }

.prose > article {
  margin: 0 0 20px;
  padding: clamp(20px, 3.4vw, 38px);
  background: var(--paper);
  border-radius: 18px;
  scroll-margin-top: 150px;
}

.prose h2 {
  margin: 0 0 0.1em;
  font-size: clamp(1.55rem, 3.1vw, 2.2rem);
  color: var(--cream);
}

.prose h2 + hr,
.prose h3 + hr { margin-top: 0.7em; }

.prose hr {
  margin: 0 0 1.2em;
  height: 1px;
  border: 0;
  background: var(--line);
}

.prose h3 {
  margin: 1.5em 0 0.5em;
  font-size: clamp(1.2rem, 2.2vw, 1.5rem);
  color: var(--flame);
}

.prose p {
  max-width: 64ch;
  color: #E5DACC;
}

.prose ul,
.prose ol {
  padding-left: 1.25em;
  color: #E5DACC;
}

.prose li { margin: 0 0 0.4em; }
.prose li::marker { color: var(--flame); }
.prose strong { color: var(--cream); }

.prose blockquote {
  margin: 1.2em 0;
  padding: 2px 0 2px 18px;
  border-left: 3px solid var(--flame);
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--cream);
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose > article > :last-child { margin-bottom: 0; }

.reveal {
  opacity: 0;
  transform: translateY(20px);
}

.reveal.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s cubic-bezier(0.2, 0.8, 0.25, 1),
    transform 0.8s cubic-bezier(0.2, 0.8, 0.25, 1);
}

/* ---------- 页脚 ---------- */
.foot {
  padding: clamp(30px, 5vw, 60px) clamp(16px, 3vw, 38px) 22px;
  border-top: 1px solid var(--line);
  background: #0C0A09;
}

.foot-top {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.5fr);
  gap: clamp(24px, 4vw, 48px);
  max-width: 1180px;
  margin: 0 auto;
}

.foot-mark {
  margin: 0 0 14px;
  font-family: var(--serif);
  font-size: 1.5rem;
}

.sub-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--flame);
}

.sub-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sub input {
  flex: 1 1 150px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #161311;
  color: var(--cream);
  font: inherit;
  font-size: 0.95rem;
}

.sub button {
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--flame);
  color: #12100E;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.sub button:hover { background: var(--cream); }

.foot-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.foot-cols dl { margin: 0; }

.foot-cols dt {
  margin-bottom: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.26em;
  color: var(--flame);
}

.foot-cols dd {
  margin: 0 0 7px;
  font-size: 0.95rem;
  color: #C4B9AB;
}

.foot-base {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1180px;
  margin: 34px auto 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--mute);
  font-size: 0.9rem;
}

.foot-base p { margin: 0; }

.totop {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--cream);
  text-decoration: none;
}

.totop:hover {
  border-color: var(--flame);
  color: var(--flame);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 860px) {
  .frame { grid-template-columns: 1fr; }

  .rail {
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .rail-in {
    position: static;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
  }

  .rail hr {
    width: 28px;
    margin: 0;
  }

  .rail-kw { margin: 0; }
  .rail-host { margin: 0; }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero-media { min-height: 44vh; }

  .hero-text {
    padding: 24px 16px 34px;
    gap: 12px;
  }

  .hero-h1 { font-size: clamp(2.1rem, 9vw, 3rem); }

  .wrap { padding: 18px 14px 40px; }

  .foot-top { grid-template-columns: 1fr; }

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

@media (max-width: 400px) {
  body { font-size: 16px; }

  .brand { font-size: 0.98rem; }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

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

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