/*
 * 3 号板块独立预览样式。
 * 仅作用于 data-section03-story，复现 Dub 总览段落的滚动显现与场景切换节奏。
 */

[data-section03-story] {
  --section03-copy-base-shift: 0px;
  --section03-copy-shift: 0px;
  --section03-mask-start: 0%;
  --section03-mask-end: 75%;
}

[data-section03-story].section03-is-ready .story-copy {
  transform: translateY(calc(var(--section03-copy-base-shift) + var(--section03-copy-shift)));
  -webkit-mask-image: none;
  mask-image: none;
  will-change: transform;
}

[data-section03-story] .story-copy h2,
[data-section03-story] .story-copy p,
[data-section03-story] .story-copy .muted,
[data-section03-story] .story-copy .soft {
  color: #171717;
  opacity: 1;
}

[data-section03-story] .statement-copy {
  width: min(680px, calc(100% - 40px));
  justify-self: center;
  text-align: left;
}

[data-section03-story] .statement-copy h2 {
  max-width: none;
  margin: 0 0 30px;
  font-size: 32px;
  line-height: 1.26;
}

[data-section03-story] .statement-copy .statement-body {
  max-width: none;
  margin: 0;
  font-size: 24px;
  line-height: 1.5;
}

[data-section03-story] .statement-copy .statement-close {
  margin: 36px 0 0;
  font-size: 27px;
  line-height: 1.4;
}

[data-section03-story] .statement-copy .section03-trigger {
  margin: 0 5px;
}

[data-section03-story] .section03-trigger {
  --section03-glow: 23, 23, 23;
  --section03-active-rotate: 0deg;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  border: 1px solid rgba(23, 23, 23, 0.05);
  font: inherit;
  line-height: 1;
  vertical-align: baseline;
  cursor: pointer;
  isolation: isolate;
  z-index: 0;
  transform: translateY(-2px);
  transition:
    transform 300ms cubic-bezier(0.4, 0, 0.2, 1),
    filter 300ms cubic-bezier(0.4, 0, 0.2, 1),
    box-shadow 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-section03-story] .section03-trigger.orange {
  --section03-glow: 234, 88, 12;
  --section03-active-rotate: -10deg;
}

[data-section03-story] .section03-trigger.green {
  --section03-glow: 22, 163, 74;
}

[data-section03-story] .section03-trigger.violet {
  --section03-glow: 124, 58, 237;
  --section03-active-rotate: 10deg;
}

[data-section03-story] .section03-trigger::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: -1;
  width: 224px;
  height: 96px;
  pointer-events: none;
  background: radial-gradient(
    closest-side ellipse,
    rgba(var(--section03-glow), 0.2),
    rgba(var(--section03-glow), 0)
  );
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-section03-story] .section03-trigger[aria-pressed="true"] {
  transform: translateY(-6px) rotate(var(--section03-active-rotate));
  filter: drop-shadow(0 9px 12px rgba(var(--section03-glow), 0.2));
  box-shadow: 0 0 0 3px rgba(var(--section03-glow), 0.08);
}

[data-section03-story] .section03-trigger[aria-pressed="true"]::before {
  opacity: 1;
}

[data-section03-story] .section03-trigger:focus-visible {
  outline: 2px solid rgba(var(--section03-glow), 0.72);
  outline-offset: 3px;
}

[data-section03-story] .section03-visuals,
[data-section03-story] .section03-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

[data-section03-story] .section03-visuals {
  z-index: 1;
}

[data-section03-story] .section03-scene {
  visibility: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition:
    visibility 0s linear 500ms,
    opacity 500ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 500ms cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

[data-section03-story] .section03-scene.section03-is-active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

[data-section03-story] .section03-scene .floating-icon {
  animation: none;
}

[data-section03-story] .section03-scene[data-section03-scene-index="1"] .profile-stats::after {
  background: linear-gradient(90deg, #22c55e 0 58%, #2dd4bf 58% 82%, #f59e0b 82% 100%);
}

[data-section03-story] .section03-scene[data-section03-scene-index="1"] .portrait {
  background: linear-gradient(135deg, #22c55e, #2dd4bf);
}

[data-section03-story] .section03-scene[data-section03-scene-index="1"] .flow-shadow {
  stroke: #dcfce7;
}

[data-section03-story] .section03-scene[data-section03-scene-index="1"] .flow-blue {
  stroke: #16a34a;
}

[data-section03-story] .section03-scene[data-section03-scene-index="1"] .flow-violet {
  stroke: #2dd4bf;
}

[data-section03-story] .section03-scene[data-section03-scene-index="1"] .flow-teal {
  stroke: #f59e0b;
}

[data-section03-story] .section03-scene[data-section03-scene-index="2"] .profile-stats::after {
  background: linear-gradient(90deg, #7c3aed 0 58%, #2563eb 58% 82%, #2dd4bf 82% 100%);
}

[data-section03-story] .section03-scene[data-section03-scene-index="2"] .portrait {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
}

[data-section03-story] .section03-scene[data-section03-scene-index="2"] .flow-shadow {
  stroke: #ede9fe;
}

[data-section03-story] .section03-scene[data-section03-scene-index="2"] .flow-blue {
  stroke: #7c3aed;
}

[data-section03-story] .section03-scene[data-section03-scene-index="2"] .flow-violet {
  stroke: #2563eb;
}

[data-section03-story] .section03-scene[data-section03-scene-index="2"] .flow-teal {
  stroke: #2dd4bf;
}

@media (min-width: 640px) {
  [data-section03-story] {
    --section03-copy-base-shift: -10px;
  }
}

@media (min-width: 960px) {
  [data-section03-story] .statement-copy h2 {
    margin-bottom: 38px;
    font-size: 40px;
    line-height: 1.22;
  }

  [data-section03-story] .statement-copy .statement-body {
    font-size: 30px;
    line-height: 1.46;
  }

  [data-section03-story] .statement-copy .statement-close {
    margin-top: 40px;
    font-size: 33px;
    line-height: 1.36;
  }
}

@media (min-width: 640px) and (max-width: 959px) {
  [data-section03-story]::before {
    inset: 64px 16px;
  }

  [data-section03-story] .story-inner {
    min-height: 796px;
    padding: 160px 0 128px;
  }

  [data-section03-story] .story-copy {
    background: #fff;
    box-shadow: 0 0 0 18px #fff;
  }

  [data-section03-story] .story-copy h2 {
    margin-bottom: 34px;
    font-size: 36px;
    line-height: 1.25;
  }

  [data-section03-story] .story-copy p {
    font-size: 31px;
    line-height: 1.34;
  }

  [data-section03-story] .statement-copy .statement-body {
    font-size: 28px;
    line-height: 1.5;
  }

  [data-section03-story] .statement-copy .statement-close {
    margin-top: 36px;
    font-size: 30px;
    line-height: 1.4;
  }

  [data-section03-story] .story-copy p + p {
    margin-top: 33px;
  }

  [data-section03-story] .profile-card,
  [data-section03-story] .flow-card,
  [data-section03-story] .floating-icon {
    position: absolute;
    display: block;
    z-index: 1;
  }

  [data-section03-story] .profile-card {
    left: -70px;
    top: 303px;
    width: 192px;
    height: 328px;
    min-height: 0;
    display: grid;
    grid-template-rows: 72px minmax(0, 1fr) auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    transform: rotate(-7deg) scale(0.72);
    transform-origin: top left;
  }

  [data-section03-story] .profile-stats {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-content: start;
    align-items: start;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border-bottom: 1px solid #e5e5e5;
    color: #737373;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
  }

  [data-section03-story] .profile-stats b {
    color: #404040;
    font-size: 13px;
    font-weight: 500;
  }

  [data-section03-story] .profile-stats::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: 13px;
    left: 12px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, #60a5fa 0 58%, #a855f7 58% 82%, #2dd4bf 82% 100%);
    opacity: 0.72;
  }

  [data-section03-story] .profile-card .person {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    margin: 0;
    padding: 18px 12px;
    border-bottom: 1px solid #e5e5e5;
    background: #fff;
  }

  [data-section03-story] .profile-card .portrait {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin-right: 0;
    border: 2px solid #fff;
    background: linear-gradient(135deg, #60a5fa, #fb7185);
    color: #fff;
    font-size: 12px;
    box-shadow: 0 0 0 1px rgba(23, 23, 23, 0.08);
  }

  [data-section03-story] .profile-card .person > div {
    min-width: 0;
  }

  [data-section03-story] .profile-card .person strong,
  [data-section03-story] .profile-card .person small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  [data-section03-story] .profile-card .person strong {
    color: #171717;
    font-size: 13px;
    font-weight: 500;
    line-height: 20px;
  }

  [data-section03-story] .profile-card .person small {
    margin-top: 2px;
    color: #737373;
    font-size: 12px;
    line-height: 16px;
  }

  [data-section03-story] .profile-card dl {
    display: grid;
    grid-auto-rows: 34px;
    gap: 0;
    margin: 0;
    color: #a3a3a3;
    font-size: 12px;
    line-height: 16px;
  }

  [data-section03-story] .profile-card dl div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 12px;
  }

  [data-section03-story] .profile-card dl div + div {
    border-top: 1px solid #f5f5f5;
  }

  [data-section03-story] .profile-card dt,
  [data-section03-story] .profile-card dd {
    margin: 0;
  }

  [data-section03-story] .profile-card dt {
    font-weight: 500;
  }

  [data-section03-story] .profile-card dd {
    color: #525252;
    font-weight: 400;
  }

  [data-section03-story] .flow-card {
    right: -90px;
    top: 295px;
    width: 230px;
    height: 176px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: none;
    transform: rotate(7deg) scale(0.72);
    transform-origin: top right;
  }

  [data-section03-story] .flow-card svg {
    display: block;
    width: 100%;
    height: 126px;
    padding: 9px 7px 7px;
    overflow: hidden;
    background-color: #fff;
    background-image:
      linear-gradient(to right, transparent calc(100% - 1px), #f5f5f5 calc(100% - 1px)),
      linear-gradient(to bottom, transparent calc(100% - 1px), #fafafa calc(100% - 1px));
    background-size: 25% 100%, 100% 50%;
  }

  [data-section03-story] .flow-head {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 48px;
    border-bottom: 1px solid #e5e5e5;
  }

  [data-section03-story] .flow-head span {
    display: grid;
    align-content: center;
    gap: 3px;
    min-width: 0;
    padding: 7px 9px;
    color: #a3a3a3;
    font-size: 10px;
    font-weight: 400;
    line-height: 12px;
  }

  [data-section03-story] .flow-head span + span {
    border-left: 1px solid #f5f5f5;
  }

  [data-section03-story] .flow-head b {
    color: #404040;
    font-size: 12px;
    font-weight: 500;
    line-height: 14px;
  }

  [data-section03-story] .flow-shadow,
  [data-section03-story] .flow-blue,
  [data-section03-story] .flow-violet,
  [data-section03-story] .flow-teal {
    fill: none;
    stroke-linecap: round;
  }

  [data-section03-story] .flow-shadow {
    stroke: #dbeafe;
    stroke-width: 44;
  }

  [data-section03-story] .flow-blue {
    stroke: #2563eb;
    stroke-width: 32;
  }

  [data-section03-story] .flow-violet {
    stroke: #a855f7;
    stroke-width: 25;
  }

  [data-section03-story] .flow-teal {
    stroke: #2dd4bf;
    stroke-width: 14;
  }

  [data-section03-story] .floating-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    color: #525252;
    box-shadow: rgba(0, 0, 0, 0.045) 0 8px 22px;
  }

  [data-section03-story] .icon-left {
    left: -8px;
    top: 190px;
    transform: rotate(-12deg);
  }

  [data-section03-story] .icon-left-alt {
    left: 20px;
    top: 228px;
    transform: rotate(10deg);
  }

  [data-section03-story] .icon-right {
    right: 20px;
    top: 174px;
    transform: rotate(-10deg);
  }

  [data-section03-story] .icon-right-alt {
    right: -8px;
    top: 216px;
    transform: rotate(14deg);
  }
}

@media (max-width: 639px) {
  [data-section03-story] .statement-copy {
    width: 100%;
  }

  [data-section03-story] .section03-visuals {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-section03-story].section03-is-ready .story-copy {
    transform: translateY(var(--section03-copy-base-shift));
    -webkit-mask-image: none;
    mask-image: none;
    will-change: auto;
  }

  [data-section03-story] .section03-scene,
  [data-section03-story] .section03-trigger,
  [data-section03-story] .section03-trigger::before {
    transition: none;
  }
}
