:root {
  --brand: #e11d48;
  --brand-dark: #be123c;
  --brand-soft: #fff1f2;
  --ink: #1c1917;
  --ink-soft: #44403c;
  --muted: #78716c;
  --line: #e7e5e4;
  --bg: #fafaf9;
  --surface: #ffffff;
  --shadow: 0 12px 40px rgba(28, 25, 23, 0.08);
  --radius: 14px;
  --max: 1120px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "ZCOOL XiaoWei", "Noto Serif SC", "Songti SC", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 10% -10%, #ffe4e6 0%, transparent 55%),
    radial-gradient(900px 400px at 100% 0%, #ffedd5 0%, transparent 45%),
    var(--bg);
  line-height: 1.75;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.15rem;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.logo span {
  letter-spacing: 0.02em;
}

.logo em {
  font-style: normal;
  color: var(--brand);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--brand-dark);
  background: var(--brand-soft);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
  display: block;
}

/* Hero */
.hero {
  padding: 56px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 700;
}

.hero-copy .lead {
  font-size: 1.08rem;
  color: var(--ink-soft);
  margin: 0 0 24px;
  max-width: 36em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand), #fb7185);
  color: #fff;
  box-shadow: 0 10px 24px rgba(225, 29, 72, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 4/3;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto -12px -12px auto;
  width: 42%;
  height: 42%;
  background: linear-gradient(135deg, #fecdd3, #fdba74);
  border-radius: 18px;
  z-index: -1;
  opacity: 0.7;
}

/* Sections */
.section {
  padding: 48px 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.6vw, 2.1rem);
  margin: 0 0 10px;
  line-height: 1.3;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  max-width: 48em;
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 30px;
  box-shadow: var(--shadow);
}

.prose h2,
.prose h3 {
  font-family: var(--display);
  line-height: 1.35;
  margin-top: 1.6em;
  margin-bottom: 0.6em;
}

.prose h2:first-child,
.prose > h2:first-of-type {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.3em;
  color: var(--ink-soft);
}

.prose li {
  margin-bottom: 0.45em;
}

.prose a {
  font-weight: 600;
}

/* Feature / gallery grids */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: #f5f5f4;
}

.feature-card .body {
  padding: 16px 18px 20px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.gallery-grid figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.gallery-grid figcaption {
  padding: 12px 14px 14px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: center;
}

.split img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  aspect-ratio: 16/11;
}

.split.reverse img {
  order: 2;
}

.split .text h3 {
  font-family: var(--display);
  font-size: 1.45rem;
  margin: 0 0 12px;
}

.split .text p {
  margin: 0 0 12px;
  color: var(--ink-soft);
}

/* TOC */
.toc {
  background: var(--brand-soft);
  border: 1px solid #fecdd3;
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 28px;
}

.toc strong {
  display: block;
  margin-bottom: 10px;
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink-soft);
}

.toc a {
  text-decoration: none;
}

.toc a:hover {
  text-decoration: underline;
}

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details p {
  margin: 10px 0 0;
  color: var(--ink-soft);
}

/* Breadcrumb / page hero */
.page-hero {
  padding: 36px 0 8px;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 8px 0 10px;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 40px 0;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 1;
  color: var(--brand);
  margin: 0;
}

.error-page h1 {
  margin: 8px 0 12px;
  font-size: 1.6rem;
}

.error-page p {
  color: var(--muted);
  margin: 0 0 22px;
}

/* Footer */
.site-footer {
  margin-top: 40px;
  border-top: 1px solid var(--line);
  background: #1c1917;
  color: #d6d3d1;
  padding: 40px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 28px;
}

.site-footer h3 {
  color: #fff;
  margin: 0 0 12px;
  font-size: 1rem;
}

.site-footer p,
.site-footer a {
  color: #a8a29e;
  font-size: 0.94rem;
}

.site-footer a:hover {
  color: #fecdd3;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copyright {
  border-top: 1px solid #292524;
  padding-top: 18px;
  font-size: 0.88rem;
  color: #78716c;
}

/* Motion */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-visual,
  .feature-card,
  .gallery-grid figure,
  .split {
    animation: rise 0.7s ease both;
  }

  .hero-visual {
    animation-delay: 0.12s;
  }

  .feature-card:nth-child(2),
  .gallery-grid figure:nth-child(2) {
    animation-delay: 0.08s;
  }

  .feature-card:nth-child(3),
  .gallery-grid figure:nth-child(3) {
    animation-delay: 0.16s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .split,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse img {
    order: 0;
  }

  .feature-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 16px;
    gap: 4px;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
  }

  .hero {
    padding-top: 28px;
  }

  .prose {
    padding: 20px 16px;
  }
}

@media (max-width: 560px) {
  .feature-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Sticky top ads */
.site-ads {
  position: sticky;
  top: 68px;
  z-index: 90;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 8px 0 6px;
}
.site-ads:empty {
  display: none;
}
#ads {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 4px 2px;
  background: transparent;
  margin: 0;
  width: min(100% - 16px, var(--max));
  margin-inline: auto;
}
#ads > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  box-sizing: border-box;
}
#ads figure {
  margin: 0;
}
#ads img {
  width: 65px;
  height: 65px;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(24,24,24,0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
  border: none;
  background: linear-gradient(135deg,#fff,#fff);
}
#ads a {
  display: inline-block;
  text-decoration: none;
  border-radius: 15px;
}
#ads img:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 10px 24px rgba(24,24,24,0.18);
}
#ads figcaption,
#ads .caption {
  height: 15px;
  font-size: 11px;
  color: #666;
  text-align: center;
  max-width: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .site-ads {
    top: 68px;
  }
}
