:root {
  --bg: #f7f3f0;
  --bg-deep: #1a1214;
  --surface: #ffffff;
  --ink: #1f1518;
  --muted: #6b565c;
  --brand: #b81d3a;
  --brand-deep: #8a1429;
  --accent: #e85d04;
  --line: #e8ddd8;
  --ok: #1b7f5a;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(26, 18, 20, 0.08);
  --max: 1120px;
  --font-display: "ZCOOL XiaoWei", "STKaiti", "KaiTi", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 90% 60% at 10% -10%, rgba(184, 29, 58, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(232, 93, 4, 0.1), transparent 50%),
    linear-gradient(180deg, #faf6f3 0%, var(--bg) 40%, #f3ebe7 100%);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(247, 243, 240, 0.88);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
}

.brand:hover {
  text-decoration: none;
  color: var(--brand);
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem 1.1rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  color: #fff;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(26, 18, 20, 0.25) 0%, rgba(26, 18, 20, 0.72) 55%, rgba(26, 18, 20, 0.92) 100%);
}

.hero-inner {
  padding: 4.5rem 0 3rem;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.15;
  margin: 0 0 0.75rem;
  letter-spacing: 0.06em;
}

.hero h1 {
  font-size: clamp(1.15rem, 2.4vw, 1.55rem);
  font-weight: 600;
  margin: 0 0 0.75rem;
  max-width: 36rem;
  line-height: 1.45;
}

.hero-lead {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.02rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(184, 29, 58, 0.35);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
}

.btn-solid {
  background: var(--brand);
  color: #fff;
}

.btn-solid:hover {
  background: var(--brand-deep);
  color: #fff;
}

/* Sections */
.section {
  padding: 2.4rem 0;
}

.section-head {
  margin-bottom: 1.4rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 0 0 0.45rem;
  letter-spacing: 0.03em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 46rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  align-items: start;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.feature:hover {
  transform: translateY(-4px);
}

.feature img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.feature-body {
  padding: 1rem 1.05rem 1.15rem;
}

.feature-body h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.feature-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  box-shadow: var(--shadow);
}

.panel h3 {
  margin-top: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.prose {
  font-size: 1.02rem;
  color: var(--ink);
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  margin: 2rem 0 0.8rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.prose h2:first-child {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.4rem 0 0.55rem;
}

.prose p {
  margin: 0 0 1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.toc {
  background: #fff8f5;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}

.toc strong {
  display: block;
  margin-bottom: 0.5rem;
}

.toc a {
  display: inline-block;
  margin: 0.2rem 0.7rem 0.2rem 0;
}

.download-box {
  background: linear-gradient(135deg, #1a1214 0%, #3a1a24 55%, #5c1f2e 100%);
  color: #fff;
  border-radius: calc(var(--radius) + 4px);
  padding: 1.6rem 1.5rem;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.2rem;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.download-box h2 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
}

.download-box p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.85);
}

.download-box img {
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.8rem 0 0;
  padding: 0;
  list-style: none;
}

.pill-list li {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.86rem;
}

.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.media-row figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-row figcaption {
  padding: 0.75rem 0.9rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 0.9rem;
}

.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}

.step h3 {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.page-hero {
  padding: 2.2rem 0 1rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin: 0 0 0.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 40rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.8rem;
}

.breadcrumb a {
  color: var(--muted);
}

.related {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.related h2 {
  font-size: 1.15rem;
  margin: 0 0 0.7rem;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.related-links a {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.related-links a:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin: 0 0 0.5rem;
  color: var(--brand);
}

.error-page p {
  color: var(--muted);
  margin: 0 0 1.2rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  background: var(--bg-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 2.4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.site-footer h3 {
  font-family: var(--font-display);
  color: #fff;
  margin: 0 0 0.7rem;
  font-size: 1.15rem;
}

.site-footer p,
.site-footer li {
  font-size: 0.92rem;
  line-height: 1.7;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
}

.fade-up {
  animation: fadeUp 0.7s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 960px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-2,
  .download-box,
  .footer-grid,
  .media-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
  }

  .nav.open {
    display: flex;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    z-index: 120;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }

  .nav.open a {
    padding: 0.7rem 0.35rem;
    border-bottom: 1px solid var(--line);
  }

  .nav.open a:last-child {
    border-bottom: none;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    padding: 3.2rem 0 2.2rem;
  }

  .hero {
    min-height: 62vh;
  }
}
