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

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

:root {
  --red: #ff0000;
  --violet: #8b00ff;
  --ink: #261717;
  --glass: rgba(255, 255, 255, 0.12);
  --glass-soft: rgba(255, 255, 255, 0.07);
  --line: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.13);
  --txt: rgba(255, 255, 255, 0.92);
  --dim: rgba(255, 255, 255, 0.68);
  --radius: 4px;
  --dock: 88px;
  --serif: 'Noto Serif JP', 'Songti SC', 'SimSun', serif;
  --sans: 'Noto Sans JP', system-ui, -apple-system, 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

html {
  background: #150b12;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  overflow-x: hidden;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.8;
  color: var(--txt);
  letter-spacing: 0.01em;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(58vw 58vw at 10% 4%, rgba(255, 0, 0, 0.5), transparent 64%),
    radial-gradient(66vw 66vw at 92% 24%, rgba(139, 0, 255, 0.5), transparent 66%),
    radial-gradient(80vw 60vw at 46% 106%, rgba(255, 0, 0, 0.26), transparent 62%),
    linear-gradient(162deg, #1b0d0d 0%, #261717 46%, #170b16 100%);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.18) 1px, transparent 1.3px);
  background-size: 24px 24px;
  opacity: 0.42;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), #000 26%, #000);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), #000 26%, #000);
}

a {
  color: #ffd9d9;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

main > article {
  margin: 0 0 20px;
  padding: clamp(22px, 3.6vw, 44px);
  background: var(--glass-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(15px) saturate(135%);
  backdrop-filter: blur(15px) saturate(135%);
  scroll-margin-top: 24px;
  scroll-margin-bottom: calc(var(--dock) + 28px);
}

main > article h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.7vw, 1.95rem);
  line-height: 1.35;
  letter-spacing: 0.02em;
  margin: 0 0 12px;
}

main > article h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.16rem;
  margin: 26px 0 8px;
}

main > article p {
  margin: 0 0 1.05em;
  max-width: 66ch;
  color: rgba(255, 255, 255, 0.86);
}

main > article ul,
main > article ol {
  padding-left: 1.25em;
  max-width: 64ch;
}

main > article li {
  margin: 0 0 0.5em;
}

hr {
  border: 0;
  height: 1px;
  margin: 0 0 20px;
  background: linear-gradient(90deg, var(--red), var(--violet) 55%, transparent);
  opacity: 0.85;
}

/* ---------- 首屏 ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 0.82fr) minmax(180px, 216px);
  align-items: center;
  gap: clamp(16px, 2.4vw, 30px);
  min-height: calc(100svh - var(--dock) - 24px);
  padding: clamp(30px, 7vh, 76px) 0 clamp(22px, 4vh, 46px);
  background: none;
  border: 0;
  border-radius: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  scroll-margin-top: 12px;
}

.hero-copy {
  min-width: 0;
}

.deco {
  display: block;
  width: 64px;
  height: 3px;
  margin: 0 0 20px;
  background: linear-gradient(90deg, var(--red), var(--violet));
}

.hero-copy h1 {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.95rem, 5.2vw, 3.35rem);
  line-height: 1.24;
  letter-spacing: 0.03em;
  margin: 0 0 18px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.lede {
  margin: 0;
  max-width: 34ch;
  color: var(--dim);
  font-size: 1rem;
  line-height: 1.85;
}

.hero-figure {
  margin: 0;
  min-height: clamp(230px, 46vh, 440px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.09);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}

.hero-figure img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  filter: saturate(112%) contrast(104%);
}

.toc {
  align-self: center;
  padding: 16px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.toc h2 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.75);
}

.toc hr {
  margin: 0 0 8px;
  opacity: 0.6;
}

.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1px;
}

.toc a {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 8px;
  font-size: 1rem;
  color: var(--dim);
  text-decoration: none;
  border-left: 1px solid transparent;
}

.toc a:hover,
.toc a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-left-color: var(--red);
}

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

.foot {
  max-width: 1180px;
  margin: clamp(44px, 8vh, 92px) auto 0;
  padding: 34px clamp(16px, 4vw, 32px) calc(var(--dock) + 26px);
  border-top: 1px solid var(--line-soft);
}

.foot-mega {
  margin: 0 0 26px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.05rem, 11.4vw, 5.6rem);
  line-height: 1.05;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.07);
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
}

.foot-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 3vw, 28px);
}

.foot-nav dl {
  margin: 0;
}

.foot-nav dt {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.2em;
  margin: 0 0 6px;
}

.foot-nav dd {
  margin: 0;
}

.foot-nav dd a {
  display: block;
  padding: 9px 0;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.foot-nav dd a:hover {
  color: #fff;
  border-bottom-color: var(--violet);
}

.foot-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.58);
  font-size: 1rem;
}

.foot-base a {
  display: inline-block;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
}

/* ---------- 底部固定条 ---------- */

.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(30, 17, 22, 0.6);
  border-top: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}

.dock nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1px;
  flex: 1 1 0;
  min-width: 0;
}

.dock nav:first-child {
  justify-content: flex-end;
}

.dock nav:last-child {
  justify-content: flex-start;
}

.dock a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 9px;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  border-radius: var(--radius);
}

.dock a:hover,
.dock a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.dock-brand {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 0 12px;
  white-space: nowrap;
  color: #fff;
}

/* ---------- 动效 ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 0.7, 0.3, 1);
}

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

.toc.in li {
  animation: rise 0.5s ease both;
}

.toc.in li:nth-child(2) {
  animation-delay: 0.05s;
}

.toc.in li:nth-child(3) {
  animation-delay: 0.1s;
}

.toc.in li:nth-child(4) {
  animation-delay: 0.15s;
}

.toc.in li:nth-child(5) {
  animation-delay: 0.2s;
}

.toc.in li:nth-child(6) {
  animation-delay: 0.25s;
}

.toc.in li:nth-child(7) {
  animation-delay: 0.3s;
}

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

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

@media (max-width: 960px) {
  :root {
    --dock: 128px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding-top: 26px;
    gap: 16px;
  }

  .hero-figure {
    min-height: 200px;
    max-height: 42vh;
  }

  .lede {
    max-width: 46ch;
  }

  .toc {
    align-self: stretch;
  }

  .toc a {
    min-height: 42px;
  }

  .dock {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom));
  }

  .dock nav {
    flex: none;
  }

  .dock-brand {
    order: -1;
    justify-self: center;
    padding: 5px 0 7px;
    font-size: 1rem;
  }

  .dock a {
    min-height: 40px;
    padding: 0 7px;
  }
}

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

  .foot-base {
    flex-wrap: wrap;
  }
}

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

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

  .toc.in li {
    animation: none;
  }
}

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