@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&display=swap');

:root {
  --ink: #12100F;
  --coral: #FF5A3C;
  --cream: #F5EFE6;
  --panel: #1A1614;
  --line: rgba(245, 239, 230, 0.16);
  --dim: rgba(245, 239, 230, 0.72);
  --f: "Atkinson Hyperlegible", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font: 400 17px/1.7 var(--f);
  overflow-x: hidden;
}

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

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--coral);
  color: var(--ink);
  padding: 10px 16px;
  z-index: 99;
  text-decoration: none;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- 顶部两行 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(18, 16, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brandrow {
  display: flex;
  align-items: center;
  padding: 9px clamp(16px, 5vw, 40px) 4px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  text-decoration: none;
}

.mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--coral);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1;
}

.brand-name {
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: 0.02em;
}

.menu-drawer {
  position: relative;
  border-top: 1px solid var(--line);
}

.menu-drawer summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 clamp(16px, 5vw, 40px);
  cursor: pointer;
  font-size: 1rem;
  color: var(--cream);
  letter-spacing: 0.06em;
  user-select: none;
}
.menu-drawer summary::-webkit-details-marker { display: none; }
.menu-drawer[open] summary { color: var(--coral); }

.bars {
  position: relative;
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s;
}
.bars::before,
.bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.22s ease, top 0.22s ease;
}
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.menu-drawer[open] .bars { background: transparent; }
.menu-drawer[open] .bars::before { top: 0; transform: rotate(45deg); }
.menu-drawer[open] .bars::after { top: 0; transform: rotate(-45deg); }

.menu-drawer menu {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin: 0;
  padding: 6px clamp(16px, 5vw, 40px) 18px;
  list-style: none;
  background: #100E0D;
  border-bottom: 2px solid var(--coral);
  box-shadow: 0 26px 44px -22px #000;
  columns: 2;
  column-gap: 18px;
}
.menu-drawer menu li { break-inside: avoid; }
.menu-drawer menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  font-size: 1rem;
}
.menu-drawer menu a:hover { color: var(--coral); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 46vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  text-align: right;
  padding: clamp(58px, 10vw, 96px) clamp(18px, 5vw, 48px) clamp(66px, 9vw, 96px);
  background: radial-gradient(120% 110% at 82% 0%, #2A211D 0%, #12100F 68%);
  clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}

.hero-art {
  position: absolute;
  inset: 0;
  margin: 0;
}
.hero-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
  opacity: 0.42;
  filter: grayscale(0.25) contrast(1.08);
  will-change: transform;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(192deg, rgba(18, 16, 15, 0.2), rgba(18, 16, 15, 0.95));
}

.badge {
  position: absolute;
  top: 16px;
  right: clamp(18px, 5vw, 48px);
  z-index: 3;
  background: var(--coral);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  padding: 9px 13px;
  animation: bob 4.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: min(100%, 30ch);
}

.hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.3rem, 8.6vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
  word-break: break-word;
}

.hero h1 .ch {
  display: inline-block;
  animation: rise 0.6s cubic-bezier(0.2, 0.72, 0.2, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(0.55em) rotate(5deg); }
  to { opacity: 1; transform: none; }
}

.subtitle {
  margin: 0 0 14px;
  color: var(--dim);
  font-size: 0.96rem;
  line-height: 1.6;
}

/* ---------- 主体 ---------- */
main > article { scroll-margin-top: 132px; }

.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  gap: clamp(24px, 4vw, 46px);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 62px) clamp(16px, 5vw, 40px) 72px;
}

.rail {
  position: sticky;
  top: 128px;
  align-self: start;
  border-left: 2px solid var(--coral);
  padding-left: 15px;
}
.rail h2 {
  margin: 0 0 4px;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: var(--coral);
  font-weight: 700;
}
.rail .subtitle { margin-bottom: 12px; font-size: 0.96rem; }
.rail ol { list-style: none; margin: 0; padding: 0; }
.rail a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  text-decoration: none;
  color: var(--dim);
  font-size: 1rem;
  border-bottom: 1px dashed var(--line);
  transition: color 0.18s, transform 0.18s;
}
.rail a:hover { color: var(--cream); transform: translateX(3px); }
.rail i {
  font-style: normal;
  color: var(--coral);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
}

.flow {
  max-width: 66ch;
  min-width: 0;
}

.flow > article {
  background: var(--panel);
  padding: clamp(20px, 3.4vw, 30px);
  margin-bottom: clamp(20px, 3.4vw, 28px);
  box-shadow: 0 26px 44px -34px #000, 0 0 0 1px var(--line);
}

.flow h2 {
  margin: 0 0 0.62em;
  font-size: clamp(1.45rem, 3.4vw, 2rem);
  line-height: 1.22;
  letter-spacing: -0.01em;
}
.flow h2 + p.subtitle { margin-top: -0.4em; }
.flow h3 { font-size: 1.15rem; margin: 1.4em 0 0.5em; }
.flow p { margin: 0 0 1.05em; }
.flow p:last-child { margin-bottom: 0; }
.flow a {
  color: var(--coral);
  text-underline-offset: 3px;
}
.flow ul, .flow ol { padding-left: 1.25em; margin: 0 0 1.05em; }
.flow li { margin: 0.4em 0; }
.flow blockquote {
  margin: 1.3em 0;
  padding: 4px 0 4px 16px;
  border-left: 3px solid var(--coral);
  color: var(--dim);
}
.flow figure { margin: 1.4em 0; }
.flow img { width: 100%; box-shadow: 0 22px 38px -30px #000; }
.flow table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 0.98rem;
}
.flow th, .flow td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.flow code {
  background: #0E0C0B;
  padding: 2px 6px;
  font-size: 0.94em;
}
.flow strong { color: #fff; }

/* 滚动显现 */
.js main > article:not(.hero),
.js footer > article {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.2, 0.72, 0.2, 1);
}
.js main > article.in,
.js footer > article.in {
  opacity: 1;
  transform: none;
}

/* ---------- 页脚 ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 34px clamp(16px, 5vw, 40px) 28px;
  background: #0E0C0B;
}
footer > article {
  max-width: 1120px;
  margin: 0 auto;
}

.foot-mark { overflow: hidden; }
.foot-mark p {
  margin: 0;
  font-size: clamp(2.6rem, 12.8vw, 8.4rem);
  line-height: 0.94;
  font-weight: 700;
  letter-spacing: -0.04em;
  background: linear-gradient(96deg, var(--cream) 20%, var(--coral) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 24px;
  margin-top: 14px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.foot-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  color: var(--dim);
  font-size: 0.96rem;
}
.foot-links a:hover { color: var(--coral); }

.foot-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 20px;
  padding-top: 12px;
  font-size: 0.96rem;
  color: var(--dim);
}
.foot-legal a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  text-decoration: none;
  color: var(--coral);
}

/* ---------- 窄屏 ---------- */
@media (max-width: 880px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 34px;
  }
  .rail {
    position: static;
    border-left: 0;
    border-top: 2px solid var(--coral);
    padding-left: 0;
    padding-top: 12px;
  }
  .rail ol { columns: 2; column-gap: 18px; }
  .rail a { border-bottom: 1px dashed var(--line); }
}

@media (max-width: 420px) {
  .hero { padding-top: 64px; }
  .hero-copy { max-width: 100%; }
  .badge { font-size: 0.84rem; padding: 7px 10px; }
}

/* ---------- 降低动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge { animation: none; }
  .hero h1 .ch { animation: none; }
  .js main > article,
  .js footer > article {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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