:root {
  --bg: #f7f3ef;
  --bg-soft: #fffaf6;
  --surface: #ffffff;
  --ink: #1c1714;
  --muted: #6b5f57;
  --line: #e8ddd4;
  --brand: #c43d2f;
  --brand-deep: #9a2c22;
  --accent: #d97706;
  --ok: #0f766e;
  --shadow: 0 12px 40px rgba(28, 23, 20, 0.08);
  --radius: 14px;
  --max: 1120px;
  --font-display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(196, 61, 47, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(217, 119, 6, 0.07), transparent 50%),
    linear-gradient(180deg, #faf6f2 0%, var(--bg) 40%, #f3ece6 100%);
  line-height: 1.75;
  min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-deep); }
ul, ol { padding-left: 1.2em; }
li { margin: .35em 0; }

.container { width: min(100% - 2rem, var(--max)); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 250, 246, 0.88);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: .02em;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  font-size: .95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active { color: var(--brand); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0;
  cursor: pointer;
  color: var(--ink);
}

.nav-toggle-bars {
  position: relative;
  width: 20px;
  height: 14px;
  display: block;
}

.nav-toggle-bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform .25s ease, opacity .2s ease, top .25s ease;
}

.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6px; }
.nav-toggle-bars span:nth-child(3) { top: 12px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(1) {
  top: 6px;
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bars span:nth-child(3) {
  top: 6px;
  transform: rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  padding: 3.5rem 0 2.5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.brand-mark {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: .85rem;
}

.brand-mark span { color: var(--brand); }

.hero h1 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 1rem;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 36rem;
  margin-bottom: 1.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 1px solid transparent;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 24px rgba(196, 61, 47, 0.28);
}
.btn-primary:hover { background: var(--brand-deep); color: #fff; }
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { color: var(--brand); }

.hero-visual {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  animation: rise .8s ease both;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sections */
.section {
  padding: 3.25rem 0;
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 46rem;
}

.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: .55rem;
  line-height: 1.25;
}

.section-head p {
  color: var(--muted);
  font-size: 1.02rem;
}

.prose {
  color: var(--ink);
  font-size: 1.02rem;
}

.prose p { margin-bottom: 1rem; }
.prose h2, .prose h3 {
  font-family: var(--font-display);
  margin: 1.6rem 0 .7rem;
  line-height: 1.3;
}
.prose h2 { font-size: 1.55rem; }
.prose h3 { font-size: 1.25rem; }
.prose strong { color: var(--brand-deep); }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.feature-card .thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: #eee;
}

.feature-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.feature-card:hover .thumb img { transform: scale(1.04); }

.feature-card .body {
  padding: 1rem 1.1rem 1.2rem;
}

.feature-card h3 {
  font-size: 1.08rem;
  margin-bottom: .4rem;
  font-family: var(--font-display);
}

.feature-card p {
  color: var(--muted);
  font-size: .92rem;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.shot {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  animation: fade-in .7s ease both;
}

.shot img {
  width: 100%;
  aspect-ratio: 9/16;
  object-fit: cover;
  max-height: 420px;
}

.shot figcaption {
  padding: .7rem .85rem;
  font-size: .88rem;
  color: var(--muted);
}

.toc {
  background: linear-gradient(135deg, #fff 0%, #fff7f2 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin-bottom: 2rem;
}

.toc h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: .7rem;
}

.toc ol { columns: 2; gap: 2rem; }
.toc a { color: var(--ink); }
.toc a:hover { color: var(--brand); }

.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: .75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1.2em;
  color: var(--brand);
  font-weight: 700;
}
.faq details[open] summary::before { content: "–"; }
.faq details p {
  margin-top: .7rem;
  color: var(--muted);
}

.page-hero {
  padding: 2.5rem 0 1.5rem;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: .5rem;
}

.page-hero p { color: var(--muted); max-width: 40rem; }

.breadcrumb {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--brand); }

/* Footer */
.site-footer {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  background: #1c1714;
  color: #d9cfc7;
  padding: 2.5rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-footer h3 {
  font-family: var(--font-display);
  color: #fff;
  margin-bottom: .8rem;
  font-size: 1.1rem;
}

.site-footer a {
  color: #d9cfc7;
  display: block;
  margin: .35rem 0;
  font-size: .92rem;
}

.site-footer a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
  font-size: .85rem;
  color: #a8988c;
  text-align: center;
}

/* Error pages */
.error-wrap {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-wrap h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--brand);
  line-height: 1;
  margin-bottom: .5rem;
}

.error-wrap p {
  color: var(--muted);
  margin-bottom: 1.5rem;
  max-width: 28rem;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .grid-2,
  .footer-grid { grid-template-columns: 1fr; }

  .grid-3 { grid-template-columns: 1fr 1fr; }
  .shot-row { grid-template-columns: 1fr 1fr; }
  .toc ol { columns: 1; }

  .nav-toggle { display: inline-flex; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(255, 250, 246, 0.98);
    border-bottom: 1px solid var(--line);
    padding: .5rem 1rem 1rem;
  }

  .nav.open { display: flex; }
  .nav a {
    padding: .75rem .5rem;
    border-bottom: 1px solid var(--line);
  }

  .hero { padding: 2rem 0 1.5rem; }
  .section { padding: 2.25rem 0; }
}

@media (max-width: 560px) {
  .grid-3,
  .shot-row { grid-template-columns: 1fr; }
  .brand-mark { font-size: 2.1rem; }
  .shot img { max-height: none; aspect-ratio: 3/4; }
}
