/* ============================================================
   pages.css — 页面级专属样式
   hero 变体 / 页面头 / 表单成功动画 / confetti / CTA / 杂项
   ============================================================ */

/* ============ 首页 Hero ============ */
.hero {
  position: relative;
  padding-block: var(--space-20) var(--space-24);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-16);
  align-items: center;
}
.hero__title {
  font-size: var(--text-6xl);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}
.hero__title em {
  font-style: italic;
  color: var(--color-primary);
}
.hero__lead {
  font-size: var(--text-lg);
  color: var(--color-muted-fg);
  max-width: 42ch;
  margin-bottom: var(--space-8);
}
.hero__actions { margin-bottom: var(--space-10); }
.hero__stats {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.hero__stat-num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-4xl);
  color: var(--color-secondary);
  line-height: 1;
}
.hero__stat-label {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
  margin-top: var(--space-1);
}
/* hero 视觉区 */
.hero__visual { position: relative; }
.hero__img-main {
  position: relative;
  z-index: 2;
  border-radius: var(--radius-blob-2);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  aspect-ratio: 4 / 5;
}
.hero__img-main img { width: 100%; height: 100%; object-fit: cover; }
.hero__blob-deco {
  position: absolute;
  z-index: 1;
  width: 118%;
  aspect-ratio: 1;
  top: -9%;
  left: -9%;
  background: linear-gradient(135deg, var(--primary-15), var(--secondary-10));
  border-radius: var(--radius-blob-1);
}
/* hero 浮动小徽章 */
.hero__badge-float {
  position: absolute;
  z-index: 3;
  bottom: var(--space-6);
  left: calc(-1 * var(--space-8));
  background-color: var(--color-card);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border: 1px solid var(--border-soft);
}
.hero__badge-float .icon-box { width: 2.75rem; height: 2.75rem; }
.hero__badge-float .icon-box svg { width: 1.4rem; height: 1.4rem; }

/* ============ 二级页 页头 ============ */
.page-hero {
  position: relative;
  padding-block: var(--space-16) var(--space-16);
  overflow: hidden;
}
.page-hero__inner { position: relative; z-index: 1; max-width: 52rem; }
.page-hero__breadcrumb { margin-bottom: var(--space-6); }
.page-hero__title {
  font-size: var(--text-5xl);
  line-height: 1.1;
  margin-bottom: var(--space-5);
}
.page-hero__lead {
  font-size: var(--text-lg);
  color: var(--color-muted-fg);
  max-width: 56ch;
}
/* 页头装饰 blob */
.page-hero__deco {
  position: absolute;
  top: -120px; right: -100px;
  width: 380px; height: 380px;
  background-color: var(--color-primary);
  border-radius: var(--radius-blob-1);
  opacity: 0.08;
  filter: blur(20px);
  z-index: 0;
}
.page-hero__deco--2 {
  top: auto; bottom: -160px; right: 20%;
  width: 300px; height: 300px;
  background-color: var(--color-secondary);
  opacity: 0.07;
}

/* ============ 特色/价值卡 图标区块 ============ */
.feature {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8);
  background-color: var(--color-card);
  border: 1px solid var(--border-soft);
  border-radius: 2rem 2rem 2.5rem 1.5rem;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.feature__title { font-size: var(--text-xl); }
.feature__text { color: var(--color-muted-fg); font-size: var(--text-base); }

/* 图文交错行（活动分野） */
.alt-row + .alt-row { margin-top: var(--space-20); }
.alt-row__img {
  border-radius: var(--radius-blob-3);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  aspect-ratio: 4 / 3;
}
.alt-row__img img { width: 100%; height: 100%; object-fit: cover; }

/* ============ CTA 区块 ============ */
.cta-band {
  position: relative;
  border-radius: var(--radius-2xl);
  padding: var(--space-16);
  overflow: hidden;
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: var(--color-white);
}
.cta-band__title {
  font-size: var(--text-4xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}
.cta-band__text {
  color: rgba(255,255,255,0.85);
  max-width: 48ch;
  margin: 0 auto var(--space-8);
}
.cta-band__blob {
  position: absolute;
  width: 300px; height: 300px;
  border-radius: var(--radius-blob-2);
  background-color: var(--color-secondary);
  opacity: 0.25;
  filter: blur(40px);
}
.cta-band__blob--1 { top: -80px; left: -60px; }
.cta-band__blob--2 { bottom: -100px; right: -40px; background-color: var(--color-primary-light); }

/* ============ 统计/数字条 ============ */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}
.stat-strip__item { text-align: center; }
.stat-strip__num {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-5xl);
  color: var(--color-primary);
  line-height: 1;
}
.section--moss .stat-strip__num,
.section--terracotta .stat-strip__num { color: var(--color-white); }
.stat-strip__label {
  font-size: var(--text-sm);
  color: var(--color-muted-fg);
  margin-top: var(--space-2);
}
.section--moss .stat-strip__label { color: rgba(255,255,255,0.8); }

/* ============ 组织信息 datalist 容器 ============ */
.info-card {
  background-color: var(--color-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-8) var(--space-10);
  box-shadow: var(--shadow-soft);
}

/* ============ 代表致辞 ============ */
.rep-portrait {
  border-radius: var(--radius-blob-2);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  aspect-ratio: 1;
  background-color: var(--color-muted);
}
.rep-portrait img { width: 100%; height: 100%; object-fit: cover; }
.rep-sign {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-fg);
  margin-top: var(--space-4);
}
.rep-sign small { display: block; font-size: var(--text-sm); color: var(--color-muted-fg); font-family: var(--font-body); margin-bottom: var(--space-1);}

/* ============ 案例详情 主图 ============ */
.detail-hero-img {
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-float);
  aspect-ratio: 16 / 9;
  margin-bottom: var(--space-12);
}
.detail-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* 正文排版块（详情页富文本） */
.prose { max-width: 46rem; }
.prose > * + * { margin-top: var(--space-5); }
.prose h2 { font-size: var(--text-3xl); margin-top: var(--space-12); margin-bottom: var(--space-2); }
.prose h3 { font-size: var(--text-xl); margin-top: var(--space-8); }
.prose p { color: var(--color-fg); line-height: var(--leading-relaxed); }
.prose ul { display: flex; flex-direction: column; gap: var(--space-3); padding-left: 0; }
.prose ul li {
  position: relative;
  padding-left: var(--space-8);
  color: var(--color-fg);
  line-height: var(--leading-normal);
}
.prose ul li::before {
  content: '';
  position: absolute;
  left: var(--space-2);
  top: 0.65em;
  width: 0.6rem; height: 0.6rem;
  border-radius: 50% 50% 50% 0;
  background-color: var(--color-secondary);
  transform: rotate(-45deg);
}
.prose blockquote {
  padding: var(--space-6) var(--space-8);
  border-left: 4px solid var(--color-primary);
  background-color: var(--color-muted);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  color: var(--color-fg);
}

/* 侧栏信息盒（详情页 aside） */
.detail-aside {
  position: sticky;
  top: 6rem;
  background-color: var(--color-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-soft);
}
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 20rem;
  gap: var(--space-12);
  align-items: start;
}

/* ============ 用户心声 详情引用大区 ============ */
.voice-hero {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-10);
  align-items: center;
}
.voice-hero__avatar {
  width: 260px; height: 260px;
  border-radius: 50% 50% 48% 52% / 52% 48% 52% 48%;
  overflow: hidden;
  box-shadow: var(--shadow-float);
  background-color: var(--color-muted);
}
.voice-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.voice-hero__quote {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: var(--text-3xl);
  line-height: var(--leading-snug);
  color: var(--color-fg);
}
.voice-hero__meta { margin-top: var(--space-5); color: var(--color-muted-fg); }
.voice-hero__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-fg);
}

/* 用户心声卡片（列表） */
.voice-card__top {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}
.voice-card .avatar { width: 4rem; height: 4rem; }
.voice-card__name { font-weight: 700; font-size: var(--text-base); }
.voice-card__role { font-size: var(--text-sm); color: var(--color-muted-fg); }
.voice-card__stars { color: var(--color-secondary); letter-spacing: 2px; font-size: var(--text-sm); }

/* ============ 联系页 ============ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: var(--space-16);
  align-items: start;
}
.contact-info__item {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-info__item:last-child { border-bottom: none; }
.contact-info__label { font-size: var(--text-xs); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-muted-fg); margin-bottom: var(--space-1); }
.contact-info__value { font-weight: 600; color: var(--color-fg); }
.contact-info__value a:hover { color: var(--color-primary); }
.form-card {
  background-color: var(--color-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-2xl);
  padding: var(--space-10);
  box-shadow: var(--shadow-medium);
}

/* ============ 假表单：成功状态 ============ */
.form-wrapper { position: relative; }
.form-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-8) var(--space-4);
}
.form-success.is-visible {
  display: flex;
  animation: fadeSlideUp 0.6s var(--ease-organic);
}
.form-success__title { font-size: var(--text-2xl); margin: var(--space-6) 0 var(--space-2); }
.form-success__text { color: var(--color-muted-fg); max-width: 40ch; }
.form-success__mail {
  margin-top: var(--space-4);
  font-weight: 700;
  color: var(--color-primary);
}
/* SVG 打勾圆环 */
.success-check {
  width: 96px; height: 96px;
}
.success-check__circle {
  stroke: var(--color-primary);
  stroke-width: 5;
  fill: var(--primary-10);
  stroke-dasharray: 283;
  stroke-dashoffset: 283;
}
.success-check__tick {
  stroke: var(--color-primary);
  stroke-width: 6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
}
.form-success.is-visible .success-check__circle {
  animation: drawCircle 0.6s var(--ease-organic) forwards;
}
.form-success.is-visible .success-check__tick {
  animation: drawTick 0.4s ease 0.5s forwards;
}
@keyframes drawCircle { to { stroke-dashoffset: 0; } }
@keyframes drawTick   { to { stroke-dashoffset: 0; } }
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* 表单提交中态 */
.form.is-submitting { opacity: 0.6; pointer-events: none; }
.btn.is-loading { position: relative; color: transparent !important; }
.btn.is-loading::after {
  content: '';
  position: absolute;
  width: 1.15em; height: 1.15em;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ Confetti 撒花 ============ */
.confetti-piece {
  position: fixed;
  width: 10px; height: 14px;
  top: -20px;
  z-index: var(--z-overlay);
  pointer-events: none;
  opacity: 0;
  will-change: transform, opacity;
}
@keyframes confettiFall {
  0%   { opacity: 1; transform: translateY(0) rotate(0deg); }
  100% { opacity: 0; transform: translateY(105vh) rotate(720deg); }
}

/* ============ 滚动进场动画基类（animations.js 驱动） ============ */
[data-animate] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-organic), transform 0.7s var(--ease-organic);
}
[data-animate].is-inview { opacity: 1; transform: translateY(0); }
[data-animate-delay="1"] { transition-delay: 0.1s; }
[data-animate-delay="2"] { transition-delay: 0.2s; }
[data-animate-delay="3"] { transition-delay: 0.3s; }
[data-animate-delay="4"] { transition-delay: 0.4s; }

/* ============ 404 / 杂项跳转页 ============ */
.mini-hero {
  text-align: center;
  padding-block: var(--space-24);
  max-width: 44rem;
  margin-inline: auto;
}
.mini-hero__title { font-size: var(--text-5xl); margin-bottom: var(--space-4); }

/* ============ 页面级响应式 ============ */
@media (max-width: 1024px) {
  .hero__title { font-size: var(--text-5xl); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { position: static; }
  .contact-layout { grid-template-columns: 1fr; gap: var(--space-10); }
}

@media (max-width: 768px) {
  .hero { padding-block: var(--space-12) var(--space-16); }
  .hero__inner { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero__title { font-size: var(--text-4xl); }
  .hero__badge-float { left: var(--space-4); bottom: var(--space-4); }
  .page-hero__title { font-size: var(--text-4xl); }
  .voice-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: var(--space-6); }
  .voice-hero__avatar { width: 200px; height: 200px; }
  .voice-hero__quote { font-size: var(--text-2xl); }
  .stat-strip { grid-template-columns: repeat(2, 1fr); gap: var(--space-10) var(--space-6); }
  .cta-band { padding: var(--space-10) var(--space-6); }
  .cta-band__title { font-size: var(--text-3xl); }
  .form-card { padding: var(--space-6); }
  .info-card { padding: var(--space-6); }
}

@media (max-width: 560px) {
  .hero__stats { gap: var(--space-6); }
  .stat-strip { grid-template-columns: 1fr; }
  .datalist__row { grid-template-columns: 1fr; gap: var(--space-1); }
}
