/*
 * Dub Home 参考区块：品牌评价带 + 为规模而生。
 * 仅作用于独立首页预览中的 home-testimonial / home-scale 命名空间。
 */

[data-section04-links] .home-testimonial-band {
  position: relative;
  min-height: 241px;
  margin: 0;
  overflow: hidden;
  padding: 56px 48px;
  border-top: 1px solid #e5e5e5;
  background: #fff;
  color: #171717;
}

[data-section04-links] .home-testimonial-dots {
  position: absolute;
  inset: 16px;
  background-image: radial-gradient(circle, rgba(212, 212, 212, 0.82) 1px, transparent 1.2px);
  background-position: -1px -1px;
  background-size: 12px 12px;
  pointer-events: none;
}

[data-section04-links] .home-testimonial-content {
  position: relative;
  z-index: 1;
  min-height: 128px;
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

[data-section04-links] .home-testimonial-content > p {
  min-width: 0;
  flex: 1 1 auto;
  margin: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), #000);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-family: var(--font-ui, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
  text-align: left;
  text-wrap: pretty;
}

[data-section04-links] .home-testimonial-brand {
  width: 192px;
  min-width: 192px;
  min-height: 128px;
  display: flex;
  flex: 0 0 192px;
  justify-content: flex-end;
  padding-top: 2px;
}

[data-section04-links] .home-testimonial-brand svg {
  width: 134px;
  height: 28px;
  display: block;
}

[data-section04-links] .home-testimonial-brand text {
  font-family: "Arial Narrow", "Roboto Condensed", Arial, sans-serif;
  font-size: 8.25px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.home-scale-section {
  --home-scale-accent: #2563eb;
  position: relative;
  width: 100%;
  overflow: clip;
  padding: 0 16px;
  border-bottom: 1px solid #e5e5e5;
  background: #fafafa;
  color: #171717;
  scroll-margin-top: 56px;
}

[data-section04-links] + #resources.home-scale-section {
  padding-top: 0;
}

.home-scale-grid {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 96px 0;
  border-right: 1px solid #e5e5e5;
  border-left: 1px solid #e5e5e5;
}

.home-scale-layout {
  width: min(calc(100% - 56px), 1024px);
  min-height: 566px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 304px minmax(0, 1fr);
  gap: 80px;
}

.home-scale-copy {
  min-width: 0;
  min-height: 566px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 0;
}

.home-scale-copy h2 {
  margin: 0;
  color: #171717;
  font-family: var(--font-ui, "PingFang SC", "Microsoft YaHei", sans-serif);
  font-size: 36px;
  font-weight: 500;
  line-height: 40px;
  letter-spacing: -0.025em;
}

.home-scale-copy > div > p {
  max-width: 300px;
  margin: 8px 0 0;
  color: #737373;
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  text-wrap: pretty;
}

.home-scale-metrics {
  margin: 0;
  display: grid;
  gap: 32px;
}

.home-scale-metrics div,
.home-scale-metrics dt,
.home-scale-metrics dd {
  margin: 0;
}

.home-scale-metrics dt {
  color: #737373;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.home-scale-metrics dd {
  color: var(--home-scale-accent);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  line-height: 32px;
  white-space: nowrap;
}

.home-scale-metrics dd small {
  font: inherit;
}

.home-scale-visual {
  position: relative;
  min-width: 0;
  height: 566px;
  overflow: visible;
  isolation: isolate;
}

.home-scale-globe-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  width: 720px;
  height: 720px;
  transform: translate(-50%, -50%);
  -webkit-mask-image: linear-gradient(#000 90%, transparent 100%);
  mask-image: linear-gradient(#000 90%, transparent 100%);
}

.home-scale-globe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: grab;
  -webkit-mask-image: linear-gradient(135deg, #000 0%, transparent 70%);
  mask-image: linear-gradient(135deg, #000 0%, transparent 70%);
  touch-action: none;
  transition: opacity 1s ease;
}

.home-scale-section.is-visible .home-scale-globe {
  opacity: 1;
}

.home-scale-globe:active {
  cursor: grabbing;
}

.home-scale-events {
  position: absolute;
  right: 0;
  bottom: -96px;
  z-index: 3;
  width: 240px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding-right: 16px;
}

.home-scale-event {
  width: 240px;
  min-height: 78px;
  flex: none;
  padding: 10px;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  background: rgba(250, 250, 250, 0.94);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.025);
  color: #404040;
  transition:
    transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 300ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 300ms cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: 50% 0;
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
  backdrop-filter: blur(3px);
}

.home-scale-event.is-layout-measuring {
  transition: none !important;
}

.home-scale-event.is-entering,
.home-scale-event.home-scale-event-muted.is-entering {
  transform: translate3d(0, -18px, 0) scale(0.96);
  opacity: 0;
  filter: blur(4px);
}

.home-scale-event h3 {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #404040;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.home-scale-event h3 svg,
.home-scale-event > div svg {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  stroke-width: 1.8;
}

.home-scale-event > div {
  min-height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: #525252;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.home-scale-event > div + div {
  margin-top: 6px;
}

.home-scale-avatar {
  width: 16px;
  height: 16px;
  display: inline-grid;
  flex: 0 0 16px;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 9px;
  font-weight: 700;
}

.home-scale-event-muted {
  opacity: 0.34;
}

@media (max-width: 1023px) {
  .home-scale-layout {
    width: min(calc(100% - 32px), 960px);
    grid-template-columns: 304px minmax(0, 1fr);
    gap: 40px;
  }
}

@media (max-width: 767px) {
  [data-section04-links] .home-testimonial-band {
    min-height: 0;
    padding: 48px 32px;
  }

  [data-section04-links] .home-testimonial-content {
    min-height: 0;
    gap: 32px;
  }

  [data-section04-links] .home-testimonial-content > p {
    font-size: 20px;
    line-height: 28px;
  }

  [data-section04-links] .home-testimonial-brand {
    min-height: 96px;
  }

  .home-scale-grid {
    padding: 64px 0;
  }

  .home-scale-layout {
    width: min(calc(100% - 32px), 720px);
    min-height: 708px;
    display: flex;
    flex-direction: column-reverse;
    gap: 8px;
  }

  .home-scale-copy {
    min-height: 300px;
    align-items: center;
    padding: 0 16px;
    text-align: center;
  }

  .home-scale-copy > div > p {
    max-width: 480px;
  }

  .home-scale-metrics {
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }

  .home-scale-visual {
    height: 400px;
  }

  .home-scale-events {
    display: none;
  }
}

@media (max-width: 639px) {
  [data-section04-links] .home-testimonial-band {
    padding: 40px 24px;
  }

  [data-section04-links] .home-testimonial-content {
    flex-direction: column;
    align-items: center;
  }

  [data-section04-links] .home-testimonial-content > p {
    font-size: 18px;
    line-height: 28px;
    text-align: center;
  }

  [data-section04-links] .home-testimonial-brand {
    width: 192px;
    min-width: 144px;
    min-height: 28px;
    flex-basis: auto;
    justify-content: center;
    padding-top: 0;
  }

  .home-scale-section {
    padding: 0;
  }

  .home-scale-grid {
    padding: 56px 0;
  }

  .home-scale-layout {
    width: min(calc(100% - 32px), 520px);
    min-height: 0;
    display: block;
  }

  .home-scale-copy {
    min-height: 532px;
    padding: 18px 0;
  }

  .home-scale-copy h2 {
    font-size: 30px;
    line-height: 36px;
  }

  .home-scale-copy > div > p {
    max-width: 340px;
    font-size: 17px;
    line-height: 27px;
  }

  .home-scale-metrics {
    max-width: 300px;
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .home-scale-visual {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-scale-globe,
  .home-scale-event {
    transition: none !important;
  }
}
