/* ============================================================
   五类人 · 各看各的，数据互通
   图二：五行交替拆分 · 图三：浮层叠卡动效
   ============================================================ */

.ui-five-roles {
  position: relative;
  overflow: hidden;
  width: 100%;
  background:
    radial-gradient(70% 50% at 0% 10%, rgba(99, 102, 241, .05), transparent 55%),
    radial-gradient(60% 40% at 100% 90%, rgba(14, 165, 233, .05), transparent 50%),
    #fff;
}
.ui-five-roles > .container { position: relative; z-index: 1; }
.ui-five-roles .section-head { margin-bottom: 48px; max-width: 920px; }
.ui-five-roles .section-head p { max-width: 720px; }

/* ---------- 五行列表 ---------- */
.fr-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.fr-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.15fr);
  gap: 48px 56px;
  align-items: center;
}
.fr-row--reverse {
  grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 1fr);
}
.fr-row--reverse .fr-copy { order: 2; }
.fr-row--reverse .fr-visual { order: 1; }

/* 图片框拉满行高，上下边框直接相接；文案仍居中不动 */
.fr-row .fr-visual {
  align-self: stretch;
}

/* ---------- 文案侧 ---------- */
.fr-copy { min-width: 0; }
.fr-no {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.6px;
  color: #3b82f6;
  margin-bottom: 14px;
}
.fr-copy h3 {
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -.4px;
  line-height: 1.2;
  margin: 0 0 14px;
}
.fr-lead {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.75;
  color: #64748b;
  max-width: 420px;
}
.fr-bullets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fr-bullet {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: flex-start;
}
.fr-diamond {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(59, 130, 246, .28);
  flex-shrink: 0;
}
.fr-bullet strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 4px;
}
.fr-bullet span {
  display: block;
  font-size: 13.5px;
  line-height: 1.65;
  color: #94a3b8;
}

/* ---------- 视觉侧容器 ---------- */
.fr-visual {
  position: relative;
  min-height: 380px;
  border-radius: 28px;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 28px;
}
.fr-visual-glow {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  pointer-events: none;
  z-index: 0;
}
.fr-tone--lavender .fr-visual-glow {
  background:
    radial-gradient(60% 70% at 70% 40%, rgba(167, 139, 250, .28), transparent 65%),
    linear-gradient(145deg, #eef2ff 0%, #f5f3ff 45%, #f8fafc 100%);
}
.fr-tone--mint .fr-visual-glow {
  background:
    radial-gradient(55% 65% at 30% 50%, rgba(52, 211, 153, .18), transparent 65%),
    linear-gradient(145deg, #ecfdf5 0%, #f0f9ff 50%, #f8fafc 100%);
}
.fr-tone--slate .fr-visual-glow {
  background:
    radial-gradient(55% 65% at 70% 40%, rgba(56, 189, 248, .2), transparent 65%),
    linear-gradient(145deg, #e2e8f0 0%, #f1f5f9 50%, #f8fafc 100%);
}
.fr-tone--peach .fr-visual-glow {
  background:
    radial-gradient(55% 65% at 30% 45%, rgba(251, 146, 60, .18), transparent 65%),
    linear-gradient(145deg, #fff7ed 0%, #fef3c7 40%, #f8fafc 100%);
}
.fr-tone--violet .fr-visual-glow {
  background:
    radial-gradient(55% 65% at 70% 40%, rgba(129, 140, 248, .22), transparent 65%),
    linear-gradient(145deg, #eef2ff 0%, #faf5ff 50%, #f8fafc 100%);
}

/* ---------- 浮层叠卡 ---------- */
.fr-stack {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  height: 340px;
  margin: 0 auto;
}
.fr-card {
  position: absolute;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, .04),
    0 18px 40px rgba(15, 23, 42, .12),
    0 0 0 1px rgba(15, 23, 42, .04);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1), box-shadow .45s ease;
}
.fr-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.fr-row:hover .fr-card--main {
  transform: translateY(-6px) scale(1.01);
  box-shadow:
    0 8px 16px rgba(15, 23, 42, .06),
    0 28px 56px rgba(15, 23, 42, .16);
}

/* phone 构图 */
.fr-stack--phone .fr-card--main {
  width: 46%;
  height: 92%;
  left: 27%;
  top: 4%;
  border-radius: 28px;
  z-index: 4;
  box-shadow:
    0 8px 20px rgba(15, 23, 42, .1),
    0 28px 60px rgba(15, 23, 42, .18);
}
.fr-stack--phone .fr-card--back {
  width: 38%;
  height: 78%;
  left: 4%;
  top: 14%;
  z-index: 2;
  transform: rotate(-8deg);
  opacity: .92;
}
.fr-stack--phone .fr-card--mini {
  width: 34%;
  height: 42%;
  right: 2%;
  top: 10%;
  z-index: 5;
  border-radius: 14px;
  transform: rotate(6deg);
}
.fr-stack--phone .fr-card--note {
  width: 36%;
  height: 34%;
  right: 6%;
  bottom: 8%;
  z-index: 3;
  border-radius: 14px;
  transform: rotate(-3deg);
}

/* screen 构图 */
.fr-stack--screen .fr-card--main {
  width: 78%;
  height: 78%;
  left: 4%;
  top: 12%;
  z-index: 3;
  border-radius: 16px;
}
.fr-stack--screen .fr-card--overlay {
  width: 42%;
  height: 48%;
  right: 0;
  top: 6%;
  z-index: 5;
  border-radius: 14px;
  transform: rotate(4deg);
}
.fr-stack--screen .fr-card--tiny {
  width: 36%;
  height: 36%;
  right: 4%;
  bottom: 4%;
  z-index: 4;
  border-radius: 14px;
  transform: rotate(-5deg);
}
.fr-stack--screen .fr-card--ghost {
  width: 28%;
  height: 28%;
  right: 8%;
  bottom: 10%;
  z-index: 2;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(8px);
  border: 1px dashed rgba(148, 163, 184, .45);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

/* placeholder 构图 */
.fr-stack--placeholder .fr-card--ph {
  width: 58%;
  height: 70%;
  left: 18%;
  top: 12%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 24px;
  background: linear-gradient(180deg, #fff, #f8fafc);
}
.fr-stack--placeholder .fr-ph-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(59, 130, 246, .1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
}
.fr-stack--placeholder .fr-ph-icon svg {
  width: 26px;
  height: 26px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fr-stack--placeholder .fr-card--ph strong {
  font-size: 16px;
  color: #0f172a;
}
.fr-stack--placeholder .fr-card--ph span {
  font-size: 13px;
  color: #94a3b8;
}
.fr-stack--placeholder .fr-card--ghost {
  width: 34%;
  height: 40%;
  right: 4%;
  top: 8%;
  z-index: 2;
  background: rgba(255, 255, 255, .75);
  border: 1px dashed rgba(148, 163, 184, .4);
  transform: rotate(7deg);
}
.fr-stack--placeholder .fr-card--ghost-sm {
  width: 28%;
  height: 30%;
  left: 2%;
  bottom: 10%;
  transform: rotate(-8deg);
}

/* ---------- 浮层标签芯片（图三效果） ---------- */
.fr-chip {
  position: absolute;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  background: #fff;
  box-shadow:
    0 8px 22px rgba(15, 23, 42, .12),
    0 0 0 1px rgba(15, 23, 42, .04);
  pointer-events: none;
}
.fr-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.fr-chip--blue { color: #1d4ed8; }
.fr-chip--blue::before { background: #3b82f6; }
.fr-chip--green { color: #047857; }
.fr-chip--green::before { background: #10b981; }
.fr-chip--sky { color: #0369a1; }
.fr-chip--sky::before { background: #0ea5e9; }
.fr-chip--coral { color: #c2410c; }
.fr-chip--coral::before { background: #f97316; }

.fr-chip.pos-1 { top: -2%; right: 0; }
.fr-chip.pos-2 { left: -2%; top: 44%; }
.fr-chip.pos-3 { right: -2%; bottom: 12%; }

.fr-stack--phone .fr-chip.pos-1 { top: -4%; right: -2%; }
.fr-stack--phone .fr-chip.pos-2 { left: -4%; bottom: 18%; top: auto; }
.fr-stack--phone .fr-chip.pos-3 { right: -6%; top: 46%; bottom: auto; }

.fr-stack--screen .fr-chip.pos-1 { top: -6%; right: 6%; }
.fr-stack--screen .fr-chip.pos-2 { left: -4%; top: 40%; }
.fr-stack--screen .fr-chip.pos-3 { right: -4%; bottom: 4%; }

.fr-stack--placeholder .fr-chip.pos-1 { top: -2%; right: -2%; }
.fr-stack--placeholder .fr-chip.pos-2 { left: -2%; top: 52%; }
.fr-stack--placeholder .fr-chip.pos-3 { right: 4%; bottom: 2%; }

/* ---------- 漂浮动效（图三层次感） ---------- */
@keyframes frBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes frBobTilt {
  0%, 100% { transform: translateY(0) rotate(var(--fr-tilt, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--fr-tilt, 0deg)); }
}
@keyframes frBobSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.fr-float-a1 { animation: frBob 4.2s ease-in-out infinite; }
.fr-float-a2 { animation: frBobTilt 5s ease-in-out infinite .4s; }
.fr-float-a3 { animation: frBobSoft 4.6s ease-in-out infinite .8s; }
.fr-float-a4 { animation: frBobTilt 5.4s ease-in-out infinite 1.1s; }

.fr-stack--phone .fr-card--back { --fr-tilt: -8deg; }
.fr-stack--phone .fr-card--mini { --fr-tilt: 6deg; }
.fr-stack--phone .fr-card--note { --fr-tilt: -3deg; }
.fr-stack--screen .fr-card--overlay { --fr-tilt: 4deg; }
.fr-stack--screen .fr-card--tiny { --fr-tilt: -5deg; }
.fr-stack--placeholder .fr-card--ghost { --fr-tilt: 7deg; }
.fr-stack--placeholder .fr-card--ghost-sm { --fr-tilt: -8deg; }

/* 卡片本身用 transform 时，动画需叠加 tilt —— 对带 tilt 的用 frBobTilt */
.fr-stack--phone .fr-card--back,
.fr-stack--phone .fr-card--mini,
.fr-stack--phone .fr-card--note,
.fr-stack--screen .fr-card--overlay,
.fr-stack--screen .fr-card--tiny,
.fr-stack--placeholder .fr-card--ghost,
.fr-stack--placeholder .fr-card--ghost-sm {
  animation-name: frBobTilt;
}

@media (prefers-reduced-motion: reduce) {
  .fr-float-a1,
  .fr-float-a2,
  .fr-float-a3,
  .fr-float-a4,
  .fr-stack--phone .fr-card--back,
  .fr-stack--phone .fr-card--mini,
  .fr-stack--phone .fr-card--note,
  .fr-stack--screen .fr-card--overlay,
  .fr-stack--screen .fr-card--tiny,
  .fr-stack--placeholder .fr-card--ghost,
  .fr-stack--placeholder .fr-card--ghost-sm {
    animation: none;
  }
}

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .fr-list { gap: 28px; }
  .fr-row,
  .fr-row--reverse {
    grid-template-columns: 1fr;
    gap: 28px;
    align-items: start;
  }
  .fr-row .fr-visual {
    align-self: stretch;
  }
  .fr-row--reverse .fr-copy,
  .fr-row--reverse .fr-visual { order: unset; }
  .fr-lead { max-width: none; }
  .fr-visual { min-height: 320px; padding: 28px 20px; }
  .fr-stack { height: 300px; max-width: 460px; }
}

@media (max-width: 640px) {
  .ui-five-roles .section-head { margin-bottom: 36px; }
  .fr-list { gap: 24px; }
  .fr-copy h3 { font-size: 26px; }
  .fr-visual {
    min-height: 280px;
    border-radius: 22px;
    padding: 22px 14px;
  }
  .fr-stack { height: 260px; }
  .fr-chip { font-size: 11px; padding: 6px 10px; }
  .fr-stack--phone .fr-card--main { width: 50%; left: 25%; }
  .fr-stack--screen .fr-card--main { width: 84%; left: 2%; }
}
