:root {
  --red: #ff0000;
  --violet: #8b00ff;
  --ink: #261717;
  --paper: #f8f0ed;
  --muted: rgba(248, 240, 237, 0.74);
  --glass: rgba(255, 255, 255, 0.075);
  --edge: rgba(255, 255, 255, 0.16);
  --radius: 28px;
  --bar: 86px;
  --wrap: 1180px;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--paper);
  background-color: #261717;
  background-image:
    radial-gradient(58vw 58vw at 84% 4%, rgba(255, 0, 0, 0.36), transparent 62%),
    radial-gradient(64vw 64vw at 6% 24%, rgba(139, 0, 255, 0.32), transparent 66%),
    radial-gradient(72vw 72vw at 52% 106%, rgba(255, 0, 0, 0.18), transparent 72%),
    linear-gradient(175deg, #2b1919 0%, #261717 45%, #1b1010 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  line-height: 1.72;
  letter-spacing: 0.01em;
  font-weight: 400;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image: radial-gradient(rgba(255, 255, 255, 0.42) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 62%, rgba(0, 0, 0, 0.8) 100%);
  mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0.35) 62%, rgba(0, 0, 0, 0.8) 100%);
}

main,
.topbar,
.rail,
.site-foot {
  position: relative;
  z-index: 1;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid #ff9a9a;
  outline-offset: 3px;
  border-radius: 10px;
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: fixed;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  width: min(var(--wrap), calc(100% - 20px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--edge);
  background: rgba(38, 23, 23, 0.52);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.brand {
  flex: 0 0 auto;
  display: inline-flex;
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--red), var(--violet));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 6px 18px rgba(255, 0, 0, 0.3);
  font-weight: 800;
  font-size: 17px;
  color: #fff;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav {
  flex: 1 1 auto;
  min-width: 0;
}

.nav ul {
  list-style: none;
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x proximity;
}

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

.nav a {
  display: block;
  padding: 12px 11px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  text-decoration: none;
  color: rgba(248, 240, 237, 0.82);
  scroll-snap-align: center;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.11);
  transform: translateY(-1px);
}

.contact {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(120deg, var(--red), var(--violet));
  box-shadow: 0 8px 24px rgba(255, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: filter 0.2s ease, transform 0.2s ease;
}

.contact:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
}

/* ---------- 主体 ---------- */

main {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 96px 18px 0;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  min-height: calc(100svh - 128px);
  padding: 10px 0 46px;
}

.hero-figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 34px 84px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mesh {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 0, 0, 0.72), transparent 56%),
    radial-gradient(circle at 76% 72%, rgba(139, 0, 255, 0.66), transparent 60%),
    #331d1d;
}

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

.eyebrow {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: #ff9b9b;
}

.hero-copy h1 {
  margin: 0.32em 0 0.5em;
  font-size: clamp(2.15rem, 5.4vw, 4.1rem);
  line-height: 1.06;
  letter-spacing: -0.032em;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

.hero-desc {
  margin: 0 0 0 auto;
  max-width: 40ch;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--muted);
}

/* ---------- 正文区块 ---------- */

main div[id] {
  scroll-margin-top: 108px;
  margin: 26px 0;
  padding: clamp(24px, 3.4vw, 46px);
  border-radius: var(--radius);
  border: 1px solid var(--edge);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(132%);
  backdrop-filter: blur(18px) saturate(132%);
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.17);
}

main div[id]:target {
  border-color: rgba(255, 0, 0, 0.55);
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 0 0 2px rgba(255, 0, 0, 0.35);
}

main h2 {
  margin: 0 0 0.6em;
  font-size: clamp(1.5rem, 3vw, 2.05rem);
  line-height: 1.22;
  letter-spacing: -0.012em;
  font-weight: 800;
  color: #fff;
}

main h2::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 15px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--red), var(--violet));
}

main h3 {
  margin: 1.35em 0 0.45em;
  font-size: 1.22rem;
  line-height: 1.4;
  font-weight: 700;
  color: #fff;
}

main p {
  max-width: 68ch;
  margin: 0 0 1.08em;
  line-height: 1.86;
  color: var(--muted);
}

main strong {
  color: #fff;
}

main a {
  color: #ff9a9a;
  text-underline-offset: 3px;
}

main a:hover {
  color: #fff;
}

main ul,
main ol {
  max-width: 64ch;
  margin: 0 0 1.2em;
  padding-left: 1.25em;
  color: var(--muted);
}

main li {
  margin-bottom: 0.5em;
  line-height: 1.8;
}

main img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 20px 0;
  border-radius: 20px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}

main figure {
  margin: 22px 0;
}

main figure img {
  margin: 0;
}

main blockquote {
  margin: 22px 0;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--red);
  color: rgba(255, 255, 255, 0.86);
}

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

main th,
main td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  text-align: left;
  vertical-align: top;
}

main th {
  color: #fff;
  font-weight: 700;
}

main div[id] > *:last-child {
  margin-bottom: 0;
}

/* ---------- 右侧浮标 ---------- */

.rail {
  position: fixed;
  right: 18px;
  bottom: 22px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: 210px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid var(--edge);
  background: rgba(38, 23, 23, 0.55);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  text-align: right;
}

.rail small {
  display: block;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: rgba(248, 240, 237, 0.62);
}

.rail h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  color: #fff;
}

.rail a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.rail a:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

/* ---------- 页脚 ---------- */

.site-foot {
  display: grid;
  grid-template-columns: 1.15fr 1.35fr 1fr;
  gap: 16px 28px;
  margin-top: 66px;
  padding: 42px clamp(18px, 4vw, 48px) 26px;
  border-top: 1px solid var(--edge);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(0, 0, 0, 0.28));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.site-foot p {
  margin: 0;
  font-size: 16px;
  line-height: 1.7;
  color: rgba(248, 240, 237, 0.72);
}

.foot-brand {
  font-size: 1.06rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
}

.site-foot a {
  display: inline-block;
  margin: 0 12px 4px 0;
  padding: 4px 0;
  min-height: 32px;
  text-decoration: none;
  color: rgba(248, 240, 237, 0.8);
  transition: color 0.2s ease;
}

.site-foot a:hover {
  color: #ff9a9a;
}

.foot-copy {
  grid-column: 1 / -1;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  text-align: center;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: rgba(248, 240, 237, 0.52);
}

/* ---------- 入场 ---------- */

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
}

html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.58s cubic-bezier(0.22, 0.72, 0.3, 1), transform 0.58s cubic-bezier(0.22, 0.72, 0.3, 1);
}

/* ---------- 断点 ---------- */

@media (max-width: 1300px) {
  .rail {
    padding: 8px;
    border-radius: 999px;
  }

  .rail small,
  .rail h2 {
    display: none;
  }
}

@media (max-width: 900px) {
  main {
    padding-top: 92px;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 26px;
    padding-bottom: 34px;
  }

  .hero-figure {
    aspect-ratio: 16 / 11;
  }

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

  .hero-desc {
    margin-left: 0;
    max-width: 52ch;
  }

  .site-foot {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 48px;
  }

  .foot-copy {
    margin-top: 6px;
  }
}

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

  .contact {
    padding: 11px 14px;
  }

  main {
    padding-left: 14px;
    padding-right: 14px;
  }

  main div[id] {
    padding: 22px 18px;
    scroll-margin-top: 96px;
  }

  .hero-copy h1 {
    letter-spacing: -0.026em;
  }
}

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

  html.js .reveal,
  html.js .reveal.is-in {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .nav a,
  .contact,
  .rail a {
    transition: none;
  }
}

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