/* 杏吧原创官网 - xingba.baby */
:root {
  --brand: #e86a28;
  --brand-dark: #c4531a;
  --brand-soft: #fff4ee;
  --ink: #1a1a1a;
  --ink-2: #3d3d3d;
  --muted: #6b6b6b;
  --line: #e8e4e0;
  --bg: #faf8f6;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(26, 26, 26, 0.08);
  --max: 1120px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "ZCOOL XiaoWei", "Noto Serif SC", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  padding-top: 64px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--brand);
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.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(--ink);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.logo img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.logo span {
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  color: var(--ink-2);
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, rgba(232, 106, 40, 0.14), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 10%, rgba(232, 106, 40, 0.08), transparent 50%),
    linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-brand {
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.85rem;
}

.hero-brand em {
  font-style: normal;
  color: var(--brand);
}

.hero h1 {
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 1rem;
  line-height: 1.45;
}

.hero-lead {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 36em;
  margin-bottom: 1.6rem;
}

.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.75rem 1.35rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.98rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 6px 18px rgba(232, 106, 40, 0.28);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.btn-ghost {
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  width: 100%;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  animation: fadeUp 0.8s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes softIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Sections */
.section {
  padding: 3.25rem 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.75rem;
  max-width: 46rem;
}

.section-head h2 {
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  margin-bottom: 0.55rem;
  line-height: 1.3;
}

.section-head p {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.feature-item:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.feature-item img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top;
  border-radius: 8px;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
}

.feature-item h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.feature-item p {
  color: var(--muted);
  font-size: 0.94rem;
}

/* Split blocks */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.split.reverse .split-media {
  order: 2;
}

.split-media img {
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  width: 100%;
}

.split-text h2 {
  font-size: clamp(1.35rem, 2.3vw, 1.7rem);
  margin-bottom: 0.75rem;
}

.split-text p {
  color: var(--ink-2);
  margin-bottom: 0.85rem;
}

.split-text .more {
  font-weight: 600;
}

/* Category mosaic */
.mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.mosaic-item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s ease;
}

.mosaic-item:hover {
  transform: translateY(-3px);
}

.mosaic-item img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: top;
}

.mosaic-item figcaption {
  padding: 0.75rem 0.85rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.mosaic-item figcaption span {
  display: block;
  font-weight: 400;
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

/* Article / SEO body */
.prose {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.75rem 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.55rem;
}

.prose p {
  margin-bottom: 0.9rem;
  color: var(--ink-2);
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.toc {
  background: var(--brand-soft);
  border: 1px solid #f5d9c8;
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
}

.toc strong {
  display: block;
  margin-bottom: 0.45rem;
}

.toc a {
  display: inline-block;
  margin-right: 0.85rem;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
}

/* Page hero (inner) */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  background: linear-gradient(180deg, #fff, var(--bg));
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 0.55rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 42rem;
}

.breadcrumb {
  font-size: 0.88rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--brand);
}

/* Legal pages */
.legal {
  padding: 2rem 0 3.5rem;
}

.legal .prose {
  max-width: 820px;
  margin: 0 auto;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c241f 100%);
  color: #fff;
  padding: 2.75rem 0;
  text-align: center;
}

.cta-band h2 {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin-bottom: 0.55rem;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 1.25rem;
}

.cta-band .btn-primary {
  box-shadow: none;
}

/* Error pages */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  text-align: center;
  padding: 3rem 0;
}

.error-page .code {
  font-family: var(--display);
  font-size: clamp(4rem, 12vw, 6.5rem);
  color: var(--brand);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.error-page h1 {
  font-size: 1.5rem;
  margin-bottom: 0.6rem;
}

.error-page p {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

/* Footer */
.site-footer {
  background: #161616;
  color: rgba(255, 255, 255, 0.72);
  padding: 2.75rem 0 1.5rem;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  font-family: var(--display);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.footer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
}

.site-footer h4 {
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.68);
}

.site-footer a:hover {
  color: #ffb08a;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.85rem;
}

/* FAQ */
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  margin-bottom: 0.65rem;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq details[open] summary {
  color: var(--brand);
  margin-bottom: 0.5rem;
}

.faq details p {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.65rem;
}

.step h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Mobile */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    inset: 64px 0 auto 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem;
    gap: 0.15rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
    box-shadow: var(--shadow);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav a {
    padding: 0.85rem 1rem;
  }

  .hero-grid,
  .split,
  .split.reverse .split-media,
  .feature-grid,
  .mosaic,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .split.reverse .split-media {
    order: 0;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .mosaic {
    grid-template-columns: 1fr 1fr;
  }

  .hero {
    padding: 2rem 0 1.75rem;
  }

  .hero-grid {
    gap: 1.5rem;
  }

  .section {
    padding: 2.25rem 0;
  }

  .prose {
    padding: 1.25rem 1rem;
  }
}

@media (max-width: 520px) {
  .mosaic {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
