/* ============================================
   收拾理官网 · 页面样式
   结构：base → header → hero → features →
         showcase → faq → footer → 动效 → 响应式
   ============================================ */

/* ---------- Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--lh-relaxed);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space-12);
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-12);
}

/* 通用按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.btn:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--color-accent-gold);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(36, 78, 61, 0.25);
}

.btn-primary:active {
  transform: translateY(0);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s var(--ease-out);
}

.site-header.is-scrolled {
  box-shadow: 0 4px 16px rgba(34, 56, 46, 0.08);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 500;
  color: var(--color-primary);
}

.site-nav {
  display: flex;
  gap: 36px;
}

.site-nav a {
  font-size: var(--fs-body);
  color: var(--color-text);
  transition: color 0.2s;
}

.site-nav a:hover {
  color: var(--color-primary);
}

.btn-header {
  padding: 11px 22px;
  font-size: var(--fs-small);
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 110px;
  overflow: hidden;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.hero-copy {
  flex: 0 0 600px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.hero-badge {
  align-self: flex-start;
  padding: 7px 16px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  font-size: var(--fs-kicker);
  font-weight: 500;
  color: var(--color-primary);
}

.hero-title {
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: var(--lh-tight);
  color: var(--color-heading);
}

.hero-title .accent {
  display: block;
  color: var(--color-primary);
}

.hero-sub {
  font-size: var(--fs-sub);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  max-width: 540px;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.btn-hero {
  padding: 16px 32px;
  font-size: var(--fs-body-lg);
}

.link-secondary {
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--color-primary);
  transition: opacity 0.2s;
}

.link-secondary:hover {
  opacity: 0.75;
}

.hero-trust {
  font-size: var(--fs-kicker);
  color: var(--color-text-muted);
}

/* Hero 右侧：手机 + 浮层 */
.hero-visual {
  position: relative;
  flex: 1;
  min-height: 680px;
}

.phone {
  position: relative;
  width: 300px;
  border-radius: 36px;
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-phone);
  overflow: hidden;
}

.hero-visual .phone {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.float-card {
  position: absolute;
  background: var(--color-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 9px;
  z-index: 2;
}

.float-card--pending {
  width: 220px;
  left: 12%;
  top: 130px;
  animation: float-sway 6s ease-in-out infinite;
}

.float-card--activity {
  width: 228px;
  right: 4%;
  bottom: 117px;
  gap: var(--space-2);
  animation: float-sway 7s ease-in-out 1s infinite;
}

.float-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
}

.float-head svg {
  flex: none;
}

.float-card--pending .float-head {
  color: #4e7a63;
}

.float-card--activity .float-head {
  color: #b08a4f;
}

.float-item {
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--color-heading);
}

.float-body {
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--color-heading);
}

.float-time {
  font-size: 11px;
  color: var(--color-text-muted);
}

.float-btn {
  align-self: flex-start;
  padding: 6px 12px;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: #fff;
}

@keyframes float-sway {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* ---------- Features ---------- */
.features {
  background: var(--color-surface);
  padding: var(--space-24) 0;
}

.section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
  margin-bottom: var(--space-14);
}

.kicker {
  font-size: var(--fs-kicker);
  font-weight: 500;
  letter-spacing: 0.35em;
  text-indent: 0.35em; /* 抵消最后一个字符的字距，保证视觉居中 */
  color: var(--color-primary);
}

.section-title {
  font-size: var(--fs-feature-title);
  font-weight: 500;
  color: var(--color-heading);
}

.section-sub {
  font-size: var(--fs-lead);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
  max-width: 720px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

.step-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(34, 56, 46, 0.08);
}

.step-num {
  font-family: var(--font-num);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--color-num);
}

.step-icon {
  width: 32px;
  height: 32px;
  color: var(--color-icon-brown);
}

.step-icon svg {
  width: 100%;
  height: 100%;
}

.step-title {
  font-size: var(--fs-card-title);
  font-weight: 500;
  color: var(--color-heading);
}

.step-desc {
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
}

/* ---------- Showcase ---------- */
.showcase {
  padding-top: var(--space-14);
}

.showcase-inner {
  display: flex;
  align-items: center;
  gap: var(--space-18);
}

.showcase .phone {
  flex: none;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-showcase);
}

.showcase-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  max-width: 560px;
}

.showcase-title {
  font-size: var(--fs-section-title);
  font-weight: 500;
  color: var(--color-heading);
}

.showcase-desc {
  font-size: var(--fs-body-lg);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
}

.showcase-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.tag {
  padding: 8px 16px;
  background: var(--color-tag-bg);
  border-radius: var(--radius-full);
  font-size: var(--fs-kicker);
  font-weight: 500;
  color: var(--color-primary);
}

/* ---------- FAQ ---------- */
.faq {
  background: var(--color-bg);
  padding: var(--space-24) 0;
}

.faq .section-header {
  margin-bottom: var(--space-12);
  gap: 14px;
}

.faq .section-title {
  font-size: var(--fs-faq-title);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5) var(--space-7);
  transition: box-shadow 0.3s var(--ease-out);
}

.faq-item:hover {
  box-shadow: 0 8px 20px rgba(34, 56, 46, 0.06);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  cursor: pointer;
  list-style: none;
  font-size: var(--fs-lead);
  font-weight: 500;
  color: var(--color-heading);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-icon {
  flex: none;
  position: relative;
  width: 16px;
  height: 16px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: #b89484;
  border-radius: 1px;
  transition: transform 0.3s var(--ease-out), background-color 0.3s;
}

.faq-icon::before {
  width: 16px;
  height: 2px;
}

.faq-icon::after {
  width: 2px;
  height: 16px;
}

.faq-item[open] .faq-icon::after {
  transform: rotate(90deg); /* 竖线放平 → 只剩横线（减号） */
}

.faq-item[open] .faq-icon::before,
.faq-item[open] .faq-icon::after {
  background: var(--color-icon-brown);
}

.faq-answer {
  margin-top: var(--space-3);
  font-size: var(--fs-body);
  line-height: var(--lh-relaxed);
  color: var(--color-text);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-primary);
  padding: var(--space-18) 0 var(--space-10);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  gap: var(--space-12);
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 320px;
}

.footer-brand .brand {
  color: var(--color-bg);
}

.footer-logo-mark {
  display: inline-flex;
}

.footer-slogan {
  font-size: var(--fs-small);
  line-height: var(--lh-relaxed);
  color: var(--color-footer-text);
  white-space: pre-line;
}

.footer-qr {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-1);
}

.footer-qr img {
  width: 92px;
  height: 92px;
  border-radius: var(--radius-md);
}

.footer-qr-caption {
  font-size: 12px;
  line-height: 1.6;
  color: var(--color-footer-text);
  white-space: pre-line;
}

.footer-links {
  display: flex;
  gap: 96px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col-title {
  font-size: var(--fs-kicker);
  font-weight: 500;
  color: var(--color-accent-gold);
}

.footer-col a {
  font-size: var(--fs-small);
  color: var(--color-footer-text);
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #fff;
}

.footer-divider {
  height: 1px;
  background: var(--color-footer-divider);
  margin: var(--space-12) 0 var(--space-5);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  flex-wrap: wrap;
  font-size: var(--fs-kicker);
  color: var(--color-footer-muted);
}

/* ---------- 入场动效 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.reveal-delay-1 {
  transition-delay: 0.1s;
}

.reveal-delay-2 {
  transition-delay: 0.2s;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .float-card--pending,
  .float-card--activity {
    animation: none;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1160px) {
  .hero-copy {
    flex-basis: 52%;
  }

  .hero-title {
    font-size: 48px;
  }

  .hero-visual {
    min-height: 600px;
  }
}

@media (max-width: 960px) {
  .hero {
    padding: 64px 0 80px;
  }

  .hero-inner {
    flex-direction: column-reverse;
    gap: var(--space-12);
  }

  .hero-copy {
    flex-basis: auto;
    align-items: center;
    text-align: center;
  }

  .hero-badge {
    align-self: center;
  }

  .hero-sub {
    max-width: 640px;
  }

  .hero-ctas {
    justify-content: center;
  }

  .hero-visual {
    width: 100%;
    min-height: 560px;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .showcase-inner {
    flex-direction: column;
    gap: var(--space-12);
  }

  .showcase-copy {
    max-width: 640px;
  }

  .site-nav {
    display: none;
  }
}

@media (max-width: 640px) {
  .container,
  .container-narrow {
    padding: 0 var(--space-5);
  }

  .hero {
    padding: 48px 0 64px;
  }

  .hero-title {
    font-size: 38px;
  }

  .hero-sub {
    font-size: var(--fs-lead);
  }

  .hero-ctas {
    flex-direction: column;
    gap: var(--space-4);
  }

  .hero-visual {
    min-height: 0;
    display: flex;
    justify-content: center;
  }

  .hero-visual .phone {
    position: static;
    transform: none;
  }

  .float-card--pending {
    left: -8px;
    top: 32px;
  }

  .float-card--activity {
    right: -8px;
    bottom: 48px;
  }

  .section-title {
    font-size: 32px;
  }

  .faq .section-title {
    font-size: 30px;
  }

  .faq-item {
    padding: var(--space-4) var(--space-5);
  }

  .showcase-title {
    font-size: var(--fs-card-title);
  }

  .footer-links {
    gap: var(--space-12);
  }

  .footer-bottom {
    flex-direction: column;
  }
}
