:root {
  --brand: #ff6b2c;
  --brand-deep: #e84a1a;
  --brand-soft: #fff0e8;
  --accent: #c41e6a;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --muted: #7a7a7a;
  --line: #e8e4df;
  --bg: #fffbf8;
  --bg-alt: #f7f2ed;
  --card: #ffffff;
  --shadow: 0 12px 40px rgba(26, 26, 26, 0.08);
  --radius: 14px;
  --max: 1120px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Source Han Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(255, 107, 44, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(196, 30, 106, 0.08), transparent 50%),
    linear-gradient(180deg, #fffbf8 0%, #f7f2ed 100%);
  line-height: 1.75;
  font-size: 16px;
  padding-top: var(--header-offset, 66px);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent);
}

.container {
  width: min(100% - 32px, var(--max));
  margin-inline: auto;
}

/* Header — fixed to viewport (do not scroll away on mobile) */
.site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100%;
  max-width: 100vw;
  z-index: 9999;
  background: #fffbf8;
  border-bottom: 1px solid var(--line);
}

#ads-bar {
  width: 100%;
  background: #fffbf8;
  border-top: 1px solid var(--line);
}

/* Ads bar is injected by /ads.js inside .site-header */

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: var(--ink-soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  padding: 48px 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(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.25;
  margin: 0 0 14px;
  letter-spacing: 0.01em;
}

.hero-copy .lead {
  font-size: 1.05rem;
  color: var(--ink-soft);
  margin: 0 0 22px;
  max-width: 36em;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(255, 107, 44, 0.28);
}

.btn-primary:hover {
  color: #fff;
}

.btn-ghost {
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.hero-tags span {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 999px;
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto -8% -8% auto;
  width: 42%;
  height: 42%;
  background: radial-gradient(circle, rgba(255, 107, 44, 0.25), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Sections */
.section {
  padding: 52px 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 46rem;
  margin-bottom: 28px;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
  margin: 0 0 10px;
  line-height: 1.3;
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.prose {
  color: var(--ink-soft);
}

.prose h2,
.prose h3 {
  color: var(--ink);
  margin-top: 1.6em;
  margin-bottom: 0.6em;
  line-height: 1.35;
}

.prose h2 {
  font-size: 1.45rem;
}

.prose h3 {
  font-size: 1.18rem;
}

.prose p {
  margin: 0 0 1em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.25em;
}

.prose li {
  margin-bottom: 0.45em;
}

.prose strong {
  color: var(--ink);
}

/* Feature / gallery grids */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--card);
  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: 9 / 16;
  object-fit: cover;
  object-position: top;
  background: #111;
}

.feature-card .body {
  padding: 16px 16px 18px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.94rem;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.shot-item {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #111;
  box-shadow: var(--shadow);
}

.shot-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
}

.shot-item figcaption {
  padding: 10px 12px;
  font-size: 0.86rem;
  color: var(--ink-soft);
  background: var(--card);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}

.step .num {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.step h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* FAQ */
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

.faq details p {
  margin: 10px 0 4px;
  color: var(--ink-soft);
}

/* Page hero (inner pages) */
.page-hero {
  padding: 36px 0 10px;
}

.page-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
}

.page-hero p {
  margin: 0;
  color: var(--ink-soft);
  max-width: 42rem;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.breadcrumb a {
  color: var(--muted);
}

.content-wrap {
  padding: 24px 0 56px;
}

.content-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 28px 18px;
  box-shadow: var(--shadow);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 48px 16px;
}

.error-page .code {
  font-size: clamp(3.5rem, 10vw, 6rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

.error-page h1 {
  margin: 0 0 10px;
  font-size: 1.6rem;
}

.error-page p {
  color: var(--ink-soft);
  margin: 0 0 22px;
}

/* Footer */
.site-footer {
  background: #1c1714;
  color: #d8d0c8;
  padding: 40px 0 24px;
  margin-top: 20px;
}

.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 li {
  color: #bdb4ab;
  font-size: 0.92rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a {
  color: #e8dfd6;
}

.site-footer a:hover {
  color: #ffb08a;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  font-size: 0.85rem;
  color: #9a9188;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
}

/* TOC */
.toc {
  background: var(--brand-soft);
  border: 1px solid #ffd7c2;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 0 0 24px;
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
}

.toc ol {
  margin: 0;
  padding-left: 1.2em;
}

.toc a {
  color: var(--ink-soft);
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy,
  .hero-visual {
    animation: none;
  }

  .feature-card,
  .step,
  .shot-item {
    animation: none;
  }
}

@media (prefers-reduced-motion: no-preference) and (min-width: 901px) {
  .hero-copy,
  .hero-visual {
    animation: rise 0.7s ease both;
  }

  .hero-visual {
    animation-delay: 0.12s;
  }

  .feature-card,
  .step,
  .shot-item {
    animation: rise 0.55s ease both;
  }

  .feature-card:nth-child(2),
  .step:nth-child(2),
  .shot-item:nth-child(2) {
    animation-delay: 0.06s;
  }

  .feature-card:nth-child(3),
  .step:nth-child(3),
  .shot-item:nth-child(3) {
    animation-delay: 0.12s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 900px) {
  .hero-grid,
  .feature-grid,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .shot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .menu-toggle[aria-expanded="true"] {
    color: var(--brand-deep);
    border-color: #ffd7c2;
    background: var(--brand-soft);
  }

  .nav {
    display: none;
    position: fixed;
    left: 16px;
    right: 16px;
    top: calc(var(--header-offset, 66px) + 8px);
    z-index: 10000;
    flex-direction: column;
    align-items: stretch;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 10px;
    box-shadow: var(--shadow);
    max-height: calc(100vh - var(--header-offset, 66px) - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 12px 14px;
  }

  .hero {
    padding-top: 28px;
  }

  .content-panel {
    padding: 20px 16px 12px;
  }

  .section {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .shot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .cta-row {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
