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

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

body {
  margin: 0;
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-ivory);
  background: var(--c-ink);
  word-break: break-word;
  letter-spacing: 0.01em;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4, p, figure, blockquote {
  margin: 0;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--c-gold-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

:root {
  --c-gold-deep: #3b2d12;
  --c-gold-mid: #5c4518;
  --c-gold: #b08d3a;
  --c-gold-bright: #d9c37a;
  --c-ink: #0a0a0a;
  --c-charcoal: #1a1a1a;
  --c-crimson: #7a1518;
  --c-ivory: #f5f0e6;
  --c-gold-glow: rgba(217, 195, 122, 0.3);
  --font-display: "Playfair Display", "Songti SC", "STSong", "Times New Roman", serif;
  --font-body: "Inter", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --header-h: 72px;
  --topbar-h: 36px;
  --container-w: 1200px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.45);
  --transition: 0.3s ease;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: 24px;
}

#main-content {
  scroll-margin-top: calc(var(--header-h) + var(--topbar-h) + 10px);
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 20px;
  background: var(--c-gold-bright);
  color: var(--c-ink);
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand__crown,
.brand__text {
  color: var(--c-gold-bright);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .brand__crown,
  .brand__text {
    background-image: linear-gradient(135deg, var(--c-gold-bright) 10%, var(--c-gold) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}

.brand__crown {
  font-size: 28px;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(176, 141, 58, 0.45));
}

.brand__text {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.brand--footer .brand__crown {
  font-size: 34px;
}

.brand--footer .brand__text {
  font-size: 30px;
}

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(217, 195, 122, 0.12);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.site-header[data-scrolled] {
  background: rgba(26, 26, 26, 0.98);
  border-bottom-color: rgba(217, 195, 122, 0.22);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header {
    background: #0d0d0d;
  }
}

.site-header__top {
  background: rgba(59, 45, 18, 0.72);
  border-bottom: 1px solid rgba(217, 195, 122, 0.1);
  font-size: 13px;
  color: rgba(245, 240, 230, 0.75);
}

.site-header__top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-h);
}

.site-header__tagline {
  letter-spacing: 0.06em;
}

.site-header__quick {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-header__quick-link {
  color: var(--c-gold-bright);
  font-weight: 500;
}

.site-header__quick-link:hover {
  color: var(--c-ivory);
}

.site-header__quick-sep {
  width: 1px;
  height: 12px;
  background: rgba(217, 195, 122, 0.3);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

.site-header__progress {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: transparent;
  pointer-events: none;
}

.site-header__progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--c-gold), var(--c-gold-bright));
  box-shadow: 0 0 10px rgba(217, 195, 122, 0.6);
  transition: width 0.1s linear;
}

.site-nav {
  margin-left: auto;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav__item {
  margin: 0;
  list-style: none;
}

.site-nav__link {
  display: block;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(245, 240, 230, 0.78);
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

.site-nav__link:hover {
  color: var(--c-gold-bright);
  background: rgba(217, 195, 122, 0.08);
}

.site-nav__link[aria-current="page"] {
  color: var(--c-gold-bright);
  background: rgba(217, 195, 122, 0.1);
  box-shadow: inset 0 -2px 0 var(--c-gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  border: 1px solid rgba(217, 195, 122, 0.25);
  border-radius: 8px;
  background: rgba(217, 195, 122, 0.06);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-toggle:hover {
  border-color: var(--c-gold-bright);
  background: rgba(217, 195, 122, 0.1);
}

.nav-toggle__line {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto;
  background: var(--c-gold-bright);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.site-footer {
  background: #0a0a0a;
  color: rgba(245, 240, 230, 0.72);
  border-top: 1px solid rgba(217, 195, 122, 0.2);
  padding: 72px 0 0;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 0.8fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
}

.site-footer__statement {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(245, 240, 230, 0.55);
  max-width: 340px;
}

.site-footer__heading {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-gold-bright);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
  position: relative;
  padding-bottom: 10px;
}

.site-footer__heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: linear-gradient(90deg, var(--c-gold), transparent);
}

.site-footer__links li + li {
  margin-top: 12px;
}

.site-footer__links a {
  font-size: 14px;
  color: rgba(245, 240, 230, 0.68);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.site-footer__links a:hover {
  color: var(--c-gold-bright);
  padding-left: 6px;
}

.site-footer__contact-list li {
  display: flex;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 12px;
}

.site-footer__contact-label {
  color: var(--c-gold);
  flex-shrink: 0;
}

.site-footer__note {
  border-top: 1px solid rgba(217, 195, 122, 0.12);
  border-bottom: 1px solid rgba(217, 195, 122, 0.12);
  padding: 16px 0;
  font-size: 13px;
  color: rgba(245, 240, 230, 0.48);
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 24px;
  font-size: 13px;
  color: rgba(245, 240, 230, 0.42);
}

.site-footer__icp {
  letter-spacing: 0.03em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn--gold {
  background: linear-gradient(135deg, var(--c-gold) 0%, var(--c-gold-bright) 100%);
  color: var(--c-ink);
  box-shadow: 0 6px 20px rgba(176, 141, 58, 0.28);
}

.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(176, 141, 58, 0.4);
}

.btn--outline {
  border: 1px solid rgba(217, 195, 122, 0.45);
  color: var(--c-gold-bright);
}

.btn--outline:hover {
  background: rgba(217, 195, 122, 0.08);
  border-color: var(--c-gold-bright);
}

.glass-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(217, 195, 122, 0.16);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.glass-card:hover {
  transform: translateY(-4px);
  border-color: rgba(217, 195, 122, 0.4);
  background: rgba(255, 255, 255, 0.07);
}

.chapter {
  padding: 64px 0;
}

.chapter__number {
  display: block;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--c-gold);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.chapter__title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}

.chapter__body {
  max-width: 720px;
  color: rgba(245, 240, 230, 0.76);
}

.overline {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: 12px;
}

.toc {
  padding: 18px 24px;
  border-left: 2px solid var(--c-gold);
  background: rgba(176, 141, 58, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 32px 0;
}

.toc__link {
  display: block;
  padding: 10px 0;
  color: rgba(245, 240, 230, 0.72);
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.toc__link:hover {
  color: var(--c-gold-bright);
}

.toc__link[aria-current="true"] {
  color: var(--c-gold-bright);
  padding-left: 8px;
  font-weight: 600;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: rgba(245, 240, 230, 0.6);
  padding: 14px 0;
}

.breadcrumb a:hover {
  color: var(--c-gold-bright);
}

.breadcrumb [aria-current="page"] {
  color: var(--c-gold-bright);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  min-height: 100vh;
  overflow: hidden;
  padding: calc(var(--header-h) + var(--topbar-h) + 40px) 0 80px;
  background: var(--c-ink);
}

.hero__diagonal {
  position: absolute;
  inset: auto 0 0 auto;
  width: 46%;
  height: 92%;
  background: linear-gradient(135deg, var(--c-gold-deep), var(--c-gold-mid));
  clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__media {
  position: relative;
  z-index: 1;
}

.section {
  padding: 96px 0;
}

.section--dark {
  background: var(--c-ink);
  color: var(--c-ivory);
}

.section--light {
  background: var(--c-ivory);
  color: var(--c-charcoal);
}

.section--light .chapter__body {
  color: rgba(26, 26, 26, 0.72);
}

.section--light .chapter__number {
  color: var(--c-gold-mid);
}

.section--light .overline {
  color: var(--c-gold-mid);
}

.section--light .toc {
  background: rgba(92, 69, 24, 0.08);
  border-left-color: var(--c-gold-mid);
}

.section--light .toc__link {
  color: rgba(26, 26, 26, 0.72);
}

.section--light .toc__link:hover {
  color: var(--c-gold-mid);
}

.section--light .toc__link[aria-current="true"] {
  color: var(--c-gold-mid);
}

.section--light .glass-card {
  background: rgba(59, 45, 18, 0.04);
  border-color: rgba(59, 45, 18, 0.14);
}

.section--light .media-frame {
  border-color: rgba(59, 45, 18, 0.2);
}

.grid {
  display: grid;
  gap: 28px;
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.media-frame {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(59, 45, 18, 0.55), rgba(10, 10, 10, 0.8));
  border: 1px solid rgba(217, 195, 122, 0.2);
  border-radius: var(--radius);
}

.media-frame--landscape {
  aspect-ratio: 16 / 9;
}

.media-frame--portrait {
  aspect-ratio: 4 / 5;
}

.media-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(217, 195, 122, 0.06) 1px, transparent 1px),
    linear-gradient(180deg, rgba(217, 195, 122, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
}

.media-frame::after {
  content: "";
  position: absolute;
  inset: 14px;
  border: 1px solid rgba(217, 195, 122, 0.14);
  border-radius: calc(var(--radius) - 6px);
}

[data-top] {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-gold);
  color: var(--c-ink);
  font-size: 20px;
  line-height: 1;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease, background 0.2s ease;
}

[data-top][data-visible] {
  opacity: 1;
  visibility: visible;
  transform: none;
}

[data-top]:hover {
  background: var(--c-gold-bright);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal][data-revealed] {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  :root {
    --header-h: 64px;
  }

  .site-header__tagline {
    display: none;
  }

  .site-header__top-inner {
    justify-content: flex-end;
  }

  .nav-toggle {
    display: flex;
  }

  .site-header__bar {
    min-height: var(--header-h);
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 99;
    width: min(320px, 86vw);
    height: 100dvh;
    margin-left: 0;
    padding: calc(var(--header-h) + var(--topbar-h) + 24px) 24px 32px;
    background: rgba(10, 10, 10, 0.97);
    border-left: 1px solid rgba(217, 195, 122, 0.18);
    transform: translateX(105%);
    visibility: hidden;
    overflow-y: auto;
    transition: transform 0.35s ease, visibility 0.35s ease;
  }

  .site-nav[data-open] {
    transform: translateX(0);
    visibility: visible;
  }

  .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .site-nav__link {
    font-size: 17px;
    padding: 14px 12px;
  }

  body.nav-open {
    overflow: hidden;
  }
}

@media (max-width: 980px) {
  .site-footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 64px;
  }

  .hero__diagonal {
    width: 70%;
    height: 70%;
  }

  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container {
    padding-inline: 18px;
  }

  .site-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .site-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .brand__text {
    font-size: 22px;
  }

  .brand__crown {
    font-size: 24px;
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + var(--topbar-h) + 32px);
  }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__diagonal,
  .glass-card,
  .brand__crown,
  .brand__text {
    filter: none;
  }
}
