﻿:root {
  --bg: #0a0a0c;
  --bg-soft: #121218;
  --bg-card: #1a1a22;
  --text: #f2f2f5;
  --text-muted: #a0a0b0;
  --accent: #e6283a;
  --accent-hover: #ff3d4f;
  --border: #2a2a35;
  --radius: 12px;
  --max: 1120px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 16px;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.logo span {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover,
.nav a.active {
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.25rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(88vh, 720px);
  display: flex;
  align-items: flex-end;
  padding: 4rem 0 3.5rem;
  overflow: hidden;
  background:
    linear-gradient(180deg, transparent 0%, rgba(10, 10, 12, 0.35) 40%, var(--bg) 100%),
    linear-gradient(90deg, rgba(10, 10, 12, 0.85) 0%, rgba(10, 10, 12, 0.45) 50%, rgba(10, 10, 12, 0.7) 100%),
    url("/home-featured.jpg") center/cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.15;
  margin-bottom: 0.75rem;
}

.hero-brand em {
  font-style: normal;
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.75rem;
  max-width: 520px;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-soft);
}

.section-head {
  margin-bottom: 2rem;
  max-width: 720px;
}

.section-head h2 {
  font-size: clamp(1.5rem, 3vw, 1.9rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
  line-height: 1.35;
}

.section-head p {
  color: var(--text-muted);
  font-size: 1.02rem;
}

.prose {
  color: var(--text-muted);
}

.prose h2,
.prose h3 {
  color: var(--text);
  margin: 2rem 0 0.85rem;
  line-height: 1.4;
}

.prose h2 {
  font-size: 1.55rem;
}

.prose h3 {
  font-size: 1.2rem;
}

.prose p {
  margin-bottom: 1.1rem;
}

.prose ul,
.prose ol {
  margin: 0 0 1.25rem 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: rgba(230, 40, 58, 0.45);
  transform: translateY(-3px);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  max-height: 320px;
}

.feature-card .body {
  padding: 1.1rem 1.15rem 1.35rem;
}

.feature-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* Showcase */
.showcase {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 2rem;
  align-items: center;
}

.showcase.reverse {
  grid-template-columns: 1fr 1.05fr;
}

.showcase.reverse .showcase-media {
  order: 2;
}

.showcase-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.showcase-media img {
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: top;
}

.showcase-text h2 {
  font-size: clamp(1.4rem, 2.8vw, 1.8rem);
  margin-bottom: 0.85rem;
}

.showcase-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.showcase-text ul {
  color: var(--text-muted);
  margin-left: 1.2rem;
  margin-bottom: 1.25rem;
}

.showcase-text li {
  margin-bottom: 0.4rem;
}

/* Category chips */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.cat-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  transition: border-color 0.2s;
}

.cat-item:hover {
  border-color: var(--accent);
  color: var(--text);
}

.cat-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  max-height: 220px;
}

.cat-item .label {
  padding: 0.85rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.cat-item .label small {
  display: block;
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.25rem;
}

/* Gallery strip */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.gallery figure {
  margin: 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.gallery img {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top;
  max-height: 380px;
}

.gallery figcaption {
  padding: 0.75rem 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.2rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  color: var(--accent);
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* FAQ */
.faq-list {
  display: grid;
  gap: 0.85rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
}

.faq-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.faq-item p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Page hero (inner pages) */
.page-hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(ellipse at 20% 0%, rgba(230, 40, 58, 0.12), transparent 55%),
    var(--bg-soft);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  margin-bottom: 0.65rem;
}

.page-hero p {
  color: var(--text-muted);
  max-width: 640px;
}

.page-content {
  padding: 2.5rem 0 4rem;
  max-width: 800px;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--accent);
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.75rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.error-page p {
  color: var(--text-muted);
  margin-bottom: 1.75rem;
  max-width: 420px;
  margin-inline: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 3rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 0.65rem;
}

.footer-brand span {
  color: var(--accent);
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* TOC */
.toc {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 1.5rem 0 2rem;
}

.toc h2 {
  font-size: 1rem;
  margin: 0 0 0.75rem !important;
}

.toc ul {
  margin: 0 0 0 1.1rem;
}

.toc a {
  color: var(--text-muted);
}

.toc a:hover {
  color: var(--accent);
}

/* Animations */
@media (prefers-reduced-motion: no-preference) {
  .hero-content {
    animation: rise 0.7s ease-out both;
  }

  .feature-card,
  .cat-item,
  .step {
    animation: fade-up 0.55s ease-out both;
  }

  .feature-card:nth-child(2),
  .cat-item:nth-child(2),
  .step:nth-child(2) {
    animation-delay: 0.08s;
  }

  .feature-card:nth-child(3),
  .cat-item:nth-child(3),
  .step:nth-child(3) {
    animation-delay: 0.16s;
  }

  .feature-card:nth-child(4),
  .cat-item:nth-child(4),
  .step:nth-child(4) {
    animation-delay: 0.24s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .showcase,
  .showcase.reverse {
    grid-template-columns: 1fr;
  }

  .showcase.reverse .showcase-media {
    order: 0;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 12, 0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem 1.25rem;
    gap: 0;
  }

  .nav.open {
    display: flex;
  }

  .nav a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .hero {
    min-height: 72vh;
    align-items: flex-end;
    padding: 3rem 0 2.5rem;
    background:
      linear-gradient(180deg, transparent 10%, rgba(10, 10, 12, 0.55) 45%, var(--bg) 100%),
      url("/home-featured.jpg") center top / cover no-repeat;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .feature-card img {
    max-height: 420px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3rem 0;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .gallery img {
    max-height: 280px;
  }
}

@media (max-width: 480px) {
  .gallery {
    grid-template-columns: 1fr;
  }
}
