:root {
  --bg: #0c0c0f;
  --bg-soft: #15151b;
  --bg-card: #1a1a22;
  --line: #2a2a35;
  --text: #f2f2f5;
  --muted: #a0a0b0;
  --accent: #e63946;
  --accent-soft: #ff6b6b;
  --gold: #f0c14b;
  --max: 1120px;
  --radius: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --header-h: 64px;
  --ads-h: 0px;
  --top-offset: var(--header-h);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(230, 57, 70, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(240, 193, 75, 0.08), transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

/* Fixed top shell: header (+ ads) never participates in page scroll */
#site-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  background: #0c0c0f;
}

/* Only this pane scrolls on mobile/desktop */
#site-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  padding-top: var(--top-offset);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}

a {
  color: var(--accent-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--gold);
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header sits inside #site-top (already fixed) */
.site-header {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  width: 100%;
  z-index: 2;
  background: #0c0c0f;
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.brand span {
  background: linear-gradient(90deg, #fff, var(--accent-soft));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.3rem 0.75rem;
  border: 1px solid rgba(230, 57, 70, 0.45);
  background: rgba(230, 57, 70, 0.12);
  color: var(--accent-soft);
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.25;
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
  max-width: 36em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #c1121f);
  color: #fff;
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.08);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent-soft);
  color: var(--accent-soft);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: auto -8% -8% auto;
  width: 55%;
  height: 55%;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.35), transparent 70%);
  z-index: -1;
  filter: blur(20px);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(21, 21, 27, 0.85), transparent);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 46rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  margin-bottom: 0.65rem;
}

.section-head p {
  color: var(--muted);
}

.prose {
  color: #d8d8e2;
}

.prose h2,
.prose h3 {
  color: var(--text);
  margin: 1.75rem 0 0.75rem;
}

.prose p {
  margin-bottom: 1rem;
  text-align: justify;
}

.prose strong {
  color: #fff;
  font-weight: 600;
}

/* Cards / grids */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(230, 57, 70, 0.45);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  margin-bottom: 0.9rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

.shot-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.shot-grid figure {
  margin: 0;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.shot-grid img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  border-radius: 0;
}

.shot-grid figcaption {
  padding: 0.7rem 0.8rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.panel img {
  margin-bottom: 1rem;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 480px;
  object-fit: cover;
  object-position: top;
  margin-inline: auto;
}

.panel h3 {
  margin-bottom: 0.5rem;
}

.panel p {
  color: var(--muted);
  font-size: 0.95rem;
}

.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.steps li {
  counter-increment: step;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.1rem 1.1rem 3.4rem;
  position: relative;
  margin: 0;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1rem;
  top: 1.1rem;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.faq details {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.75rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  color: var(--accent-soft);
  margin-bottom: 0.55rem;
}

.faq p {
  color: var(--muted);
  font-size: 0.95rem;
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.25rem 0 0.5rem;
}

.toc a {
  background: var(--bg-soft);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
}

.toc a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.breadcrumb {
  padding: 1.1rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.page-hero {
  padding: 1.5rem 0 0.5rem;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 0.6rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 42rem;
}

.legal {
  padding-bottom: 3.5rem;
}

.legal h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.65rem;
  font-size: 1.2rem;
}

.legal p,
.legal li {
  color: #cfcfd8;
  margin-bottom: 0.75rem;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  background: #09090c;
  padding: 2.5rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.site-footer p,
.site-footer a {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-footer h4 {
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer li {
  margin: 0.4rem 0;
}

.copyright {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  text-align: center;
  color: #777;
  font-size: 0.85rem;
}

/* Animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy,
.hero-visual,
.feature-card,
.panel {
  animation: fadeUp 0.7s ease both;
}

.hero-visual {
  animation-delay: 0.12s;
}

.feature-card:nth-child(2) {
  animation-delay: 0.08s;
}

.feature-card:nth-child(3) {
  animation-delay: 0.16s;
}

/* Mobile */
@media (max-width: 900px) {
  .menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    background: #0c0c0f;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1rem;
    gap: 0;
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--line);
  }

  .hero-grid,
  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .shot-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    padding-top: 2rem;
  }

  .panel img {
    max-height: 420px;
  }
}

@media (max-width: 560px) {
  :root {
    --header-h: 58px;
  }

  .shot-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .shot-grid figcaption {
    font-size: 0.75rem;
    padding: 0.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
