:root {
  --bg: #f0f6fb;
  --bg-soft: #e4eef7;
  --surface: #ffffff;
  --text: #1a2b3c;
  --text-muted: #5a6f84;
  --primary: #1e9be8;
  --primary-dark: #0d7bc4;
  --primary-soft: #d6effc;
  --accent: #0ea5a0;
  --line: #c9dcea;
  --shadow: 0 10px 28px rgba(30, 100, 160, 0.1);
  --radius: 14px;
  --max: 1120px;
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, #c8e8fa 0%, transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, #b8e4e0 0%, transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, #f7fbfe 40%, var(--bg-soft) 100%);
  line-height: 1.75;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--primary);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.88);
  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;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  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;
  border-radius: 2px;
  background: var(--text);
  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);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  align-items: center;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.25rem 0;
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--primary-dark);
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.hero {
  padding: 3.2rem 0 2.4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.9rem;
}

.hero h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.7rem, 3.2vw, 2.45rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.4rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.72rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 8px 18px rgba(30, 155, 232, 0.28);
}

.btn-primary:hover {
  color: #fff;
  filter: brightness(1.05);
}

.btn-ghost {
  background: var(--surface);
  color: var(--primary-dark);
  border-color: var(--line);
}

.hero-visual {
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
}

.section {
  padding: 2.6rem 0;
}

.section-alt {
  background: rgba(255, 255, 255, 0.55);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.6rem;
  max-width: 720px;
}

.section-head h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 2.4vw, 1.8rem);
  line-height: 1.35;
}

.section-head p {
  margin: 0;
  color: var(--text-muted);
}

.prose {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
}

.prose h2,
.prose h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.7rem;
  line-height: 1.4;
}

.prose h2:first-child,
.prose h3:first-child {
  margin-top: 0;
}

.prose p {
  margin: 0 0 1rem;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.45rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.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, box-shadow 0.25s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(30, 100, 160, 0.14);
}

.feature-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
  background: var(--bg-soft);
}

.feature-card .body {
  padding: 1rem 1.05rem 1.15rem;
}

.feature-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.media-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media-block img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 520px;
  object-fit: cover;
  object-position: top;
  margin-inline: auto;
}

.media-block .caption {
  padding: 0.9rem 1rem 1.05rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1rem;
  box-shadow: var(--shadow);
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.7rem;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.shot-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
}

.shot-row figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.shot-row img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}

.shot-row figcaption {
  padding: 0.55rem 0.7rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.toc {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem 1rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.toc a {
  display: block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  padding: 0.55rem 0.8rem;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 500;
}

.toc a:hover {
  background: #c5e7fa;
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.related a {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.related a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

.page-hero {
  padding: 2.2rem 0 1.2rem;
}

.page-hero h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.page-hero p {
  margin: 0;
  color: var(--text-muted);
  max-width: 680px;
}

.site-footer {
  margin-top: 2.5rem;
  background: #12324a;
  color: #d5e6f3;
  padding: 2.2rem 0 1.4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h3 {
  margin: 0 0 0.7rem;
  color: #fff;
  font-size: 1rem;
}

.site-footer p,
.site-footer a {
  color: #b7cfe0;
  font-size: 0.9rem;
}

.site-footer a:hover {
  color: #fff;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.footer-bottom {
  margin-top: 1.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #8facc0;
  text-align: center;
}

.error-page {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.error-page .code {
  font-size: clamp(3.5rem, 10vw, 5.5rem);
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  margin: 0 0 0.6rem;
  font-size: 1.5rem;
}

.error-page p {
  margin: 0 0 1.3rem;
  color: var(--text-muted);
}

@media (max-width: 960px) {
  .hero-grid,
  .two-col,
  .feature-grid,
  .steps,
  .shot-row,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .steps {
    grid-template-columns: 1fr 1fr;
  }

  .shot-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    z-index: 120;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.55rem 0.85rem 0.75rem;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
  }

  .nav a {
    padding: 0.65rem 0.35rem;
    border-bottom: 1px solid var(--line);
  }

  .nav a:last-child {
    border-bottom: none;
  }

  .nav a.active::after {
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .hero-grid,
  .two-col,
  .feature-grid,
  .steps,
  .shot-row,
  .footer-grid,
  .toc {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 1.8rem;
  }

  .prose {
    padding: 1.15rem 1rem;
  }

  .media-block img {
    max-height: 420px;
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-copy,
.feature-card,
.step,
.media-block {
  animation: riseIn 0.55s ease both;
}

.feature-card:nth-child(2) { animation-delay: 0.06s; }
.feature-card:nth-child(3) { animation-delay: 0.12s; }
.step:nth-child(2) { animation-delay: 0.05s; }
.step:nth-child(3) { animation-delay: 0.1s; }
.step:nth-child(4) { animation-delay: 0.15s; }
