:root {
  --brand: #e85d04;
  --brand-deep: #c43c00;
  --brand-soft: #fff3e8;
  --accent: #d63384;
  --ink: #1a1a1a;
  --muted: #5c5c5c;
  --line: #e8e0d8;
  --bg: #faf7f4;
  --card: #ffffff;
  --max: 1100px;
  --radius: 12px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Noto Serif SC", "Songti SC", "SimSun", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #ffe8d6 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #ffd6e8 0%, transparent 50%),
    var(--bg);
  line-height: 1.75;
  font-size: 16px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 244, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--brand-deep);
}

.nav-toggle {
  display: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 1px;
  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 {
  padding: 2.5rem 0 2rem;
  text-align: center;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(120deg, #e85d04, #d63384);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 0 0 0.75rem;
  animation: fadeUp 0.7s ease both;
}

.hero h1 {
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  font-weight: 600;
  margin: 0 0 0.85rem;
  color: var(--ink);
  animation: fadeUp 0.7s ease 0.1s both;
}

.hero-lead {
  max-width: 42rem;
  margin: 0 auto 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  animation: fadeUp 0.7s ease 0.2s both;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  animation: fadeUp 0.7s ease 0.3s both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(120deg, #e85d04, #d63384);
  color: #fff;
  box-shadow: 0 8px 24px rgba(232, 93, 4, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  color: var(--brand-deep);
}

/* Sections */
.section {
  padding: 2.5rem 0;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  margin: 0 0 0.5rem;
  text-align: center;
}

.section-desc {
  text-align: center;
  color: var(--muted);
  max-width: 40rem;
  margin: 0 auto 1.75rem;
}

.prose {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  margin-bottom: 1.5rem;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 1.75rem 0 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
}

.prose h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.prose h3 {
  font-size: 1.1rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--brand-deep);
}

.prose p {
  margin: 0 0 1rem;
  color: #2a2a2a;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.35rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose strong {
  color: var(--ink);
}

/* Feature / category grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.shot {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shot:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.shot img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #111;
}

.shot.wide img {
  aspect-ratio: 9 / 19;
}

.shot figcaption {
  padding: 0.7rem 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.shot figcaption strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.feature-block {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.feature-block.reverse {
  grid-template-columns: 1.1fr 1fr;
}

.feature-block.reverse .feature-media {
  order: 2;
}

.feature-media img {
  border-radius: 10px;
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
  margin-inline: auto;
}

.feature-text h3 {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
}

.feature-text p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.toc {
  background: var(--brand-soft);
  border: 1px solid #f0d4bc;
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.5rem;
}

.toc h2 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  border: none;
  padding: 0;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  columns: 2;
  gap: 1.5rem;
}

.toc li {
  margin-bottom: 0.35rem;
}

.toc a {
  font-weight: 500;
}

.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.faq details p {
  margin: 0.65rem 0 0;
  color: var(--muted);
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.related a {
  background: var(--brand-soft);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--brand-deep);
  border: 1px solid #f0d4bc;
}

.related a:hover {
  background: #ffe0c8;
}

/* Legal pages */
.page-hero {
  padding: 2rem 0 1rem;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  margin: 0 0 0.5rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
}

.legal {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.6rem;
}

.legal h2:first-child {
  margin-top: 0;
}

.legal p,
.legal li {
  color: #333;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 0;
}

.error-box h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  margin: 0;
  background: linear-gradient(120deg, #e85d04, #d63384);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-box h2 {
  margin: 0.5rem 0;
}

.error-box p {
  color: var(--muted);
  max-width: 28rem;
  margin: 0 auto 1.25rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 2rem 0 1.5rem;
  margin-top: 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}

.footer-brand strong {
  display: block;
  margin-bottom: 0.25rem;
}

.footer-brand p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-col h3 {
  margin: 0 0 0.6rem;
  font-size: 0.95rem;
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.footer-col a:hover {
  color: var(--brand-deep);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-block,
  .feature-block.reverse {
    grid-template-columns: 1fr;
  }

  .feature-block.reverse .feature-media {
    order: 0;
  }

  .feature-media img {
    max-height: 420px;
    max-width: 280px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .toc ol {
    columns: 1;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% - 0.25rem);
    right: 0;
    left: auto;
    width: min(220px, calc(100vw - 2rem));
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
    z-index: 120;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
  }

  .nav a:hover,
  .nav a.active {
    background: var(--brand-soft);
  }

  .header-inner {
    flex-wrap: nowrap;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr 1fr;
  }

  .prose,
  .legal {
    padding: 1.15rem 1rem;
  }

  .hero {
    padding: 1.75rem 0 1.25rem;
  }
}

@media (max-width: 420px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .shot img {
    aspect-ratio: 3 / 4;
  }
}
