/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }


html {
  background: #ffffff;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  position: relative;
  background: #ffffff;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

/* ===== BACKGROUND DRAW ===== */
.bg-draw {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

body > *:not(.bg-draw):not(.bg-draw-particles):not(.header):not(.hero-particles) {
  position: relative;
  z-index: 1;
}

.bg-draw__line {
  stroke-dasharray: var(--line-len);
  stroke-dashoffset: var(--line-len);
}

.bg-draw-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ========================================
   HEADER
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: background 0.3s ease, backdrop-filter 0.3s ease;
}

.header__logo { flex-shrink: 0; }

.header__nav {
  display: flex;
  gap: 18px;
}

.header__link {
  font-family: 'Fugaz One', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: #161616;
  text-decoration: none;
  transition: color 0.3s ease;
}

.header__link:active { opacity: 0.5; }

.header--dark .header__link {
  color: #f0f0f0;
}

.header__menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #161616;
  text-decoration: none;
}

.header--scrolled .header__nav { display: none; }
.header--scrolled .header__menu-btn { display: flex; }
.header--scrolled {
  background: rgba(255,255,255,0.50);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.header--dark .header__menu-btn {
  color: #f0f0f0;
}

/* ========================================
   HERO
   ======================================== */
.hero-particles {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 400px;
  background: linear-gradient(180deg, rgba(180, 225, 205, 0.7) 0%, rgba(180, 225, 205, 0) 100%);
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.hero-dot {
  position: absolute;
  border-radius: 50%;
  background: rgba(100, 200, 160, 0.35);
  animation: dotFloat var(--dur) ease-in-out var(--delay) infinite alternate;
}

@keyframes dotFloat {
  0% { transform: translate(0, 0); }
  100% { transform: translate(var(--dx), var(--dy)); }
}

.hero {
  position: relative;
  z-index: 2;
  padding: 92px 20px 0;
  text-align: center;
}

.hero__deco {
  display: flex;
  justify-content: center;
  margin-bottom: 8px;
}

.hero__arrow {
  opacity: 0.5;
}

.hero__title {
  display: block;
  width: 400px;
  height: auto;
  margin: 0 auto;
  padding-bottom: 0;
  -webkit-mask-image: linear-gradient(to right, #000 40%, transparent 55%);
  mask-image: linear-gradient(to right, #000 40%, transparent 55%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: heroReveal 1.6s ease-out 0.2s both, subtleFloat 3s ease-in-out 1.8s infinite;
}

.hero__subtitle {
  display: block;
  width: 192px;
  height: auto;
  margin: -25px auto 0;
  -webkit-mask-image: linear-gradient(to right, #000 40%, transparent 55%);
  mask-image: linear-gradient(to right, #000 40%, transparent 55%);
  -webkit-mask-size: 300% 100%;
  mask-size: 300% 100%;
  -webkit-mask-position: 100% 0;
  mask-position: 100% 0;
  animation: heroReveal 1.6s ease-out 0.4s both, subtleFloat 3s ease-in-out 2s infinite;
}

@keyframes subtleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes heroReveal {
  0% {
    -webkit-mask-position: 100% 0;
    mask-position: 100% 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  100% {
    -webkit-mask-position: 0% 0;
    mask-position: 0% 0;
    opacity: 1;
  }
}

/* ========================================
   CARDS - fan layout
   ======================================== */
.cards {
  position: relative;
  z-index: 5;
  height: clamp(460px, 40vw, 620px);
  margin-top: -20px;
  padding: 0 0 52px;
  overflow: visible;
}
.cards::-webkit-scrollbar { display: none; }

.cards--fan {
  isolation: isolate;
}

.fan-card {
  --x: 0px;
  --rot: 0deg;
  --lift: 0px;
  position: absolute;
  top: clamp(42px, 3.4vw, 60px);
  left: 50%;
  width: clamp(190px, 18vw, 260px);
  aspect-ratio: 318 / 498;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  cursor: pointer;
  transform:
    translateX(calc(-50% + var(--x)))
    translateY(var(--lift))
    rotate(var(--rot));
  transform-origin: center center;
  transition:
    transform 0.42s cubic-bezier(0.2, 0.9, 0.2, 1);
  will-change: transform;
}

.fan-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  transition: opacity 0.24s ease;
}

.fan-card__img--base {
  opacity: 1;
}

.fan-card.is-default-reveal .fan-card__img--reveal {
  opacity: 1;
}
.fan-card.is-default-reveal .fan-card__img--base {
  opacity: 0;
}
.fan-card.is-default-reveal.is-dimmed .fan-card__img--reveal {
  opacity: 0;
}
.fan-card.is-default-reveal.is-dimmed .fan-card__img--base {
  opacity: 1;
}

.fan-card__img--reveal {
  opacity: 0;
}
.fan-card:focus-visible .fan-card__img--base {
  opacity: 0;
}

.fan-card:hover .fan-card__img--reveal,
.fan-card:focus-visible .fan-card__img--reveal {
  opacity: 1;
}

.fan-card--shen-rui {
  --x: clamp(-640px, -44vw, -520px);
  --rot: -15deg;
  --lift: 10px;
  z-index: 1;
}

.fan-card--xun-yuan {
  --x: clamp(-390px, -25vw, -300px);
  --rot: 6deg;
  --lift: 26px;
  z-index: 2;
}

.fan-card--xia-xiaoye {
  --x: clamp(-170px, -7vw, -90px);
  --rot: -15deg;
  --lift: 0px;
  z-index: 4;
}

.fan-card--shen-nan {
  --x: clamp(90px, 7vw, 170px);
  --rot: 0deg;
  --lift: 12px;
  z-index: 3;
}

.fan-card--zhang-mingg {
  --x: clamp(300px, 25vw, 390px);
  --rot: 14deg;
  --lift: 26px;
  z-index: 2;
}

.fan-card--chen-zhiheng {
  --x: clamp(520px, 44vw, 640px);
  --rot: -10deg;
  --lift: 20px;
  z-index: 1;
}

.fan-card:hover,
.fan-card:focus-visible {
  z-index: 20;
  transform:
    translateX(calc(-50% + var(--x)))
    translateY(calc(var(--lift) - 24px))
    rotate(var(--rot))
    scale(1.08);
}

.fan-card:focus-visible {
  outline: 2px solid rgba(0, 0, 0, 0.65);
  outline-offset: 6px;
}

@media (max-width: 900px) {
  .cards {
    height: clamp(380px, 72vw, 500px);
  }

  .fan-card {
    top: clamp(36px, 6vw, 54px);
    width: clamp(155px, 28vw, 210px);
  }

  .fan-card--shen-rui { --x: -66vw; }
  .fan-card--xun-yuan { --x: -40vw; }
  .fan-card--xia-xiaoye { --x: -14vw; }
  .fan-card--shen-nan { --x: 14vw; }
  .fan-card--zhang-mingg { --x: 40vw; }
  .fan-card--chen-zhiheng { --x: 66vw; }
}

/* ===== CARD BASE ===== */
.card {
  position: relative;
  flex: 0 0 72vw;
  max-width: 300px;
  aspect-ratio: 318 / 498;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  scroll-snap-align: center;
  transition: transform 0.3s ease;
  will-change: transform;
}

.card.is-hovered {
  transform: scale(1.03);
  z-index: 100 !important;
}

.card__bg {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  z-index: 1;
}

.card__ellipse {
  position: absolute;
  width: 70%;
  height: 85%;
  z-index: 2;
  filter: blur(24px);
}

.card__glass {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  z-index: 3;
}

.card__media {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 75%;
  z-index: 4;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.card.is-hovered .card__media { opacity: 1; }

.card__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.card__mask {
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 75%;
  z-index: 5;
  opacity: 0.18;
  background: linear-gradient(180deg, #555 0%, #333 60%, transparent 85%);
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 400'%3E%3Cellipse cx='140' cy='80' rx='55' ry='65'/%3E%3Cellipse cx='140' cy='310' rx='110' ry='160'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 280 400'%3E%3Cellipse cx='140' cy='80' rx='55' ry='65'/%3E%3Cellipse cx='140' cy='310' rx='110' ry='160'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  transition: opacity 0.3s ease;
}

.card.is-hovered .card__mask { opacity: 0; }

.card .card__mask--img {
  top: 0;
  left: 0;
  width: 100%;
  height: 75%;
  transform: none;
  background: none;
  -webkit-mask-image: none;
  mask-image: none;
  -webkit-mask-size: unset;
  mask-size: unset;
  -webkit-mask-repeat: unset;
  mask-repeat: unset;
  -webkit-mask-position: unset;
  mask-position: unset;
  opacity: 1;
  overflow: hidden;
}

.card__person-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.card__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card__bottom {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%;
  height: 25%;
  border-radius: 0 0 16px 16px;
  z-index: 6;
}

.card__info {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card__name-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.card__name-en {
  font-family: 'Futura', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.3;
  color: #000;
}

.card__name-cn {
  font-weight: 500;
  font-size: 24px;
  line-height: 1.3;
  color: #000;
}

.card__tagline {
  font-weight: 200;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
  color: #000;
  margin-top: 12px;
}

/* ===== CARD VARIANTS ===== */
.card--orange .card__bg {
  background: linear-gradient(153.41deg, #FFD4B3 15.06%, rgba(255,212,179,0) 58.65%);
  border: 1px solid #FFE9D8;
  box-shadow: 20px 40px 60px -30px rgba(255,212,179,0.5);
}
.card--orange .card__ellipse {
  left: 8%; top: 10%;
  background: linear-gradient(168.1deg, rgba(255,102,0,0.2) 13.22%, rgba(255,0,0,0.2) 78.95%);
  transform: rotate(-10.32deg);
}
.card--orange .card__glass {
  background: linear-gradient(154.19deg, rgba(255,212,179,0.2) 25.7%, rgba(255,212,179,0) 114.27%);
  border: 1px solid #FFE9D8;
}
.card--orange .card__bottom {
  background: linear-gradient(90.4deg, #FFBF8F -5.44%, #FF9D65 108.98%);
  border: 1px solid #FFE9D8; border-top: none;
}

.card--yellow .card__bg {
  background: linear-gradient(147.86deg, #FFFAE6 5.51%, rgba(255,245,203,0) 109.45%);
  border: 1px solid #FCF5E1;
  box-shadow: 16px 16px 60px 8px rgba(235,221,86,0.4);
}
.card--yellow .card__ellipse {
  left: 5%; top: 10%;
  background: linear-gradient(168.1deg, rgba(255,221,0,0.2) 13.22%, rgba(255,242,0,0.2) 78.95%);
  transform: rotate(-25.32deg);
}
.card--yellow .card__glass {
  background: linear-gradient(144.15deg, #FCF3CE 6.87%, rgba(255,245,203,0) 82.98%);
  border: 1px solid #FCF5E1;
}
.card--yellow .card__bottom {
  background: linear-gradient(100.33deg, #FFDF89 -20.92%, #EEFFAA 118.44%);
  border: 1px solid #FCF5E1; border-top: none;
}

.card--green .card__bg {
  background: linear-gradient(146.06deg, #DEF7CE 9.96%, rgba(222,247,206,0) 104.27%);
  border: 1px solid #FCF5E1;
  filter: drop-shadow(10px 28px 60px rgba(125,227,137,0.4));
}
.card--green .card__ellipse {
  left: 5%; top: 10%;
  background: linear-gradient(168.1deg, rgba(0,255,89,0.2) 13.22%, rgba(0,255,187,0.2) 78.95%);
  transform: rotate(-25.32deg);
}
.card--green .card__glass {
  background: linear-gradient(146.06deg, rgba(222,247,206,0.12) 9.96%, rgba(222,247,206,0) 104.27%);
  border: 1px solid #F1FFE8;
}
.card--green .card__bottom {
  background: linear-gradient(265.53deg, #6DF9A8 6.87%, #72D431 99.43%);
  border: 1px solid #F1FFE8; border-top: none;
}

.card--cyan .card__bg {
  background: linear-gradient(149.11deg, #CEF4F7 15.6%, rgba(206,244,247,0) 84.71%);
  border: 1px solid #E9FFFD;
  box-shadow: -16px 34px 60px 12px rgba(206,244,247,0.4);
}
.card--cyan .card__ellipse {
  left: 0; top: -2%;
  background: linear-gradient(168.1deg, rgba(0,157,255,0.2) 13.22%, rgba(0,255,191,0.2) 78.95%);
  transform: rotate(-12.52deg);
}
.card--cyan .card__glass {
  background: linear-gradient(153.41deg, rgba(206,244,247,0.2) 15.06%, rgba(206,244,247,0) 58.65%);
  border: 1px solid #E9FFFD;
}
.card--cyan .card__bottom {
  background: linear-gradient(90deg, #A8F2EF 0%, #74D9E9 100%);
  border: 1px solid #E9FFFD; border-top: none;
}

.card--purple .card__bg {
  background: linear-gradient(153.41deg, #DEE4FE 15.06%, rgba(222,228,254,0) 58.65%);
  border: 1px solid #EAF0FF;
  box-shadow: -10px 36px 60px 6px rgba(184,197,255,0.4);
}
.card--purple .card__ellipse {
  left: 4%; top: 6%;
  background: linear-gradient(190.93deg, rgba(179,0,255,0.2) 2.14%, rgba(0,38,255,0.2) 86.54%);
  transform: rotate(36.69deg);
}
.card--purple .card__glass {
  background: linear-gradient(140.86deg, rgba(222,228,254,0.2) 8.07%, rgba(222,228,254,0) 90.96%);
  border: 1px solid #EAF0FF;
}
.card--purple .card__bottom {
  background: linear-gradient(116.95deg, #44A0F1 -44.66%, #8774D0 107.62%);
  border: 1px solid #EAF0FF; border-top: none;
}
.card--purple .card__name-en,
.card--purple .card__name-cn,
.card--purple .card__tagline { color: #f4f4f4; }

.card--blue .card__bg {
  background: linear-gradient(153.41deg, #B6E0FF 15.06%, rgba(182,224,255,0) 58.65%);
  border: 1px solid #D8EFFF;
  box-shadow: 0px 40px 60px 2px rgba(165,211,244,0.4);
}
.card--blue .card__ellipse {
  left: 8%; top: 8%;
  background: linear-gradient(168.1deg, rgba(0,87,255,0.2) 13.22%, rgba(0,236,255,0.2) 78.95%);
  transform: rotate(-12.52deg);
}
.card--blue .card__glass {
  background: linear-gradient(146.49deg, rgba(182,224,255,0.2) -8.1%, rgba(182,224,255,0) 104.83%);
  border: 1px solid #D8EFFF;
}
.card--blue .card__bottom {
  background: linear-gradient(75.57deg, #B6E0FF -7.24%, #3A97DC 125.87%);
  border: 1px solid #D8EFFF; border-top: none;
}

/* ========================================
   COMMUNICATION SECTION
   ======================================== */
.comm-scroll-spacer {
  height: 300vh;
  position: relative;
  background: transparent;
  clip: rect(auto, auto, auto, auto);
  clip-path: inset(0);
}


.comm {
  position: sticky;
  top: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  padding: 0 16px;
  background: transparent;
  overflow: visible;
}


.comm__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0 4px 20px;
  transform: translateY(-20px);
  position: relative;
  z-index: 1;
}

.comm__header-cn {
  height: clamp(28px, 8vw, 42px);
  width: auto;
  display: block;
  transition: opacity 1s ease, transform 1s ease;
}

.comm__header-en {
  height: 16px;
  width: auto;
  display: block;
  transition: opacity 1.2s ease, transform 1.2s ease;
}

/* --- Message rows --- */
.comm__msg {
  display: flex;
  align-items: center;
  gap: 3px;
}

.comm__msg--right { justify-content: flex-end; margin-right: -20px; }
.comm__msg--left  { justify-content: flex-start; margin-left: -20px; }

.comm__avatar {
  width: clamp(26px, 7vw, 36px);
  height: clamp(26px, 7vw, 36px);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.comm__quote-icon {
  flex-shrink: 0;
  display: block;
}

.comm__quote-icon--open {
  align-self: flex-start;
}

.comm__quote-icon--close {
  transform: scaleX(-1);
  align-self: flex-start;
}

/* --- Bubble reveal --- */
.comm .comm__msg[data-reveal-step] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.comm .comm__msg[data-reveal-step].revealed {
  opacity: 1;
}

.comm .comm__msg--right.revealed {
  transform: rotate(3deg);
}

.comm .comm__msg--left.revealed {
  transform: rotate(-2deg);
}

.comm .comm__msg[data-reveal-step].hidden {
  opacity: 0;
  transform: translateY(-20px) scale(0.95);
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, max-height 0.4s ease;
}

.comm .comm__msg[data-reveal-step] {
  max-height: 100px;
}

/* 沈楠消息组：头像常驻，气泡切换 */
.comm__msg--group {
  align-items: flex-start;
}

.comm__msg--group.revealed {
  opacity: 1 !important;
}

.comm__msg--group.hidden {
  opacity: 1 !important;
  max-height: none !important;
  transform: none !important;
  overflow: visible !important;
}

.comm__bubble-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.comm__bubble-item {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease, max-height 0.4s ease;
  max-height: 80px;
}

.comm__bubble-item.revealed {
  opacity: 1;
  transform: none;
}

.comm__bubble-item.hidden {
  opacity: 0;
  transform: translateY(-12px);
  max-height: 0;
  overflow: hidden;
}

.comm__layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.comm__role {
  flex-shrink: 0;
  padding: 0 24px;
}

.comm__figure {
  width: 22vw;
  max-width: 140px;
}

.comm__silhouette {
  width: 100%;
  height: auto;
  display: block;
}

.comm__center {
  flex: 1;
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
  position: relative;
}

.comm__scroll-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  color: #9EA7B3;
  font-size: clamp(34px, 3vw, 52px);
  font-weight: 350;
  line-height: 0.88;
  letter-spacing: 0;
  transform: translate(-50%, -35%) scale(0.5);
  transform-origin: center center;
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease;
}

.comm__scroll-hint.is-hidden {
  opacity: 0;
  transform: translate(-50%, -25%) scale(0.5);
}

.comm__scroll-hint-arrow {
  width: clamp(24px, 2vw, 34px);
  height: clamp(70px, 6vw, 92px);
  margin-top: 10px;
  color: inherit;
}

.comm__chat {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
  width: 100%;
}

.comm__btn-wrap {
  display: flex;
  justify-content: center;
}

/* ===== Pill button ===== */
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5.6px 27px;
  background: #494949;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11.2px;
  letter-spacing: 0.4em;
  color: #d0ffef;
  text-decoration: none;
}

.pill-btn:active { opacity: 0.7; }

/* ===== Chat bubbles ===== */
.bubble {
  display: inline-block;
  padding: 5px 10px;
  font-size: clamp(9px, 2.5vw, 15px);
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #000;
  border-radius: 24px 14px 3px 24px;
  max-width: 85%;
}

.bubble--right { align-self: flex-end; }
.bubble--left  { align-self: flex-start; }

.bubble--green  { background: #ACF5C2; border: 1px solid #E8FFEB; }
.bubble--purple { background: #C8D1FF; border: 1px solid #EAF0FF; }
.bubble--blue   { background: #B6E0FF; border: 1px solid #D8EFFF; }
.bubble--orange { background: #FCCDAA; border: 1px solid #FFE9D8; }

/* ========================================
   CHAT CLOUD (card + cascading bubbles)
   ======================================== */

.cloud-sections {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.cloud-sections__grid-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
}

.chat-cloud {
  position: relative;
  z-index: 1;
  padding: 0 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.chat-cloud--left {
  padding-top: 80px;
  padding-bottom: 80px;
}

.chat-cloud--left .chat-cloud__wrap {
  position: relative;
}

.chat-cloud--right {
  padding-top: 80px;
  padding-bottom: 80px;
}

.chat-cloud--right .chat-cloud__wrap {
  position: relative;
}


.chat-cloud__title {
  position: relative;
  z-index: 1;
  padding: 0;
  margin-bottom: 32px;
  text-align: center;
}
.chat-cloud--right .chat-cloud__title {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.chat-cloud__title-cn {
  display: block;
  height: clamp(28px, 8vw, 42px);
  width: auto;
  transition: opacity 1s ease, transform 1s ease;
}
.chat-cloud__title-en {
  display: block;
  width: auto;
  margin-top: 8px;
  transition: opacity 1.2s ease, transform 1.2s ease;
}
.chat-cloud__title-en--seeker {
  height: 12px;
}
.chat-cloud__title-en--recruiter {
  height: 16px;
}

.chat-cloud__wrap {
  display: flex;
  gap: 32px;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

.chat-cloud--left .chat-cloud__wrap  { flex-direction: row; }
.chat-cloud--right .chat-cloud__wrap { flex-direction: row; }

/* -- Card column -- */
.chat-cloud__card {
  flex: 0 0 280px;
}

.chat-cloud--left .chat-cloud__card,
.chat-cloud--right .chat-cloud__card {
  perspective: 800px;
}

.chat-cloud__card .card {
  width: 100%;
  max-width: none;
  flex: none;
}

.chat-cloud__card .card__info { justify-content: flex-end; padding: 10px 14px 8px; }
.chat-cloud__card .card__name-row { justify-content: flex-start; gap: 8px; }
.chat-cloud__card .card__name-en { font-size: clamp(11px, 3vw, 15px); }
.chat-cloud__card .card__name-cn { font-size: clamp(14px, 4.2vw, 20px); }
.chat-cloud__card .card__tagline { font-size: clamp(8px, 2.2vw, 11px); text-align: left; margin-top: 3px; }

/* -- Bubbles column -- */
.chat-cloud__bubbles {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
  justify-content: center;
}

.chat-cloud__bubbles--left {
  align-items: flex-end;
  text-align: right;
}

.chat-cloud__bubbles--left .cloud-bubble {
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-cloud__bubbles--right .cloud-bubble {
  border-bottom-left-radius: 0;
}

.chat-cloud__bubbles--left .cloud-bubble:nth-child(1) { --bubble-transform: rotate(10deg); }
.chat-cloud__bubbles--left .cloud-bubble:nth-child(2) { --bubble-transform: rotate(-10deg); }
.chat-cloud__bubbles--left .cloud-bubble:nth-child(3) { --bubble-transform: rotate(10deg); }
.chat-cloud__bubbles--left .cloud-bubble:nth-child(4) { --bubble-transform: rotate(-10deg); }

.chat-cloud__bubbles--right {
  align-items: flex-start;
}

.chat-cloud__bubbles--right .cloud-bubble:nth-child(1) { --bubble-transform: rotate(-10deg); }
.chat-cloud__bubbles--right .cloud-bubble:nth-child(2) { --bubble-transform: rotate(10deg); }
.chat-cloud__bubbles--right .cloud-bubble:nth-child(3) { --bubble-transform: rotate(-10deg); }
.chat-cloud__bubbles--right .cloud-bubble:nth-child(4) { --bubble-transform: rotate(10deg); }

.cloud-bubble {
  display: inline-block;
  align-self: flex-start;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #000;
  border-radius: 999px;
  line-height: 1.5;
  white-space: nowrap;
  animation: bubbleFloat 3s ease-in-out infinite;
}

.cloud-bubble:nth-child(2n)   { animation-duration: 3.4s; animation-delay: -0.5s; }
.cloud-bubble:nth-child(3n)   { animation-duration: 2.8s; animation-delay: -1.2s; }
.cloud-bubble:nth-child(4n+1) { animation-duration: 3.6s; animation-delay: -0.8s; }
.cloud-bubble:nth-child(5n+2) { animation-duration: 3.2s; animation-delay: -1.8s; }
.cloud-bubble:nth-child(6n+3) { animation-duration: 2.6s; animation-delay: -2.2s; }
.cloud-bubble:nth-child(7n)   { animation-duration: 3.8s; animation-delay: -0.3s; }
.cloud-bubble:nth-child(8n+4) { animation-duration: 3.0s; animation-delay: -1.5s; }

@keyframes bubbleFloat {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -6px; }
}

.chat-cloud--right .cloud-bubble {
  align-self: auto;
}

/* ========================================
   FEATURES INTRO CARD (behind comm content)
   ======================================== */
.feat-intro__card {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 75vw;
  max-width: 496px;
  aspect-ratio: 496 / 706;
  background: linear-gradient(180deg, #F8F8F8 0%, #F1F9FF 100%);
  border-radius: 20px;
  box-shadow: none;
  z-index: 0;
  will-change: transform, border-radius;
  transform-origin: center center;
}

/* ========================================
   FEATURES
   ======================================== */
.features {
  padding: 80px 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: transparent;
  transition: background-color 0.4s ease;
  overflow: hidden;
}

.features__cards {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 0 40px;
}

.features__marquee {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  background: #ffffff;
  padding: 5px 0;
  transition: background-color 0.4s ease;
}

.features:has(.feat-card--1:hover) .features__marquee,
.features[data-active="1"] .features__marquee {
  background-color: #659149;
}

.features:has(.feat-card--2:hover) .features__marquee,
.features[data-active="2"] .features__marquee {
  background-color: #1E2129;
}

.features:has(.feat-card--3:hover) .features__marquee,
.features[data-active="3"] .features__marquee {
  background-color: #7A8AB2;
}

.features:has(.feat-card--1:hover), .features[data-active="1"] {
  background-color: #659149;
}

.features:has(.feat-card--2:hover), .features[data-active="2"] {
  background-color: #1E2129;
}

.features:has(.feat-card--3:hover), .features[data-active="3"] {
  background-color: #7A8AB2;
}

.features__marquee--top {
  top: 0;
}

.features__marquee--bottom {
  bottom: 0;
}

.features__marquee-track {
  display: inline-flex;
  gap: 60px;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 48px;
  font-weight: 400;
  color: rgba(0, 0, 0, 0.08);
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.4s ease;
}

.features:has(.feat-card:hover) .features__marquee-track,
.features[data-active] .features__marquee-track {
  color: rgba(255, 255, 255, 0.6);
}

.features__marquee-track span {
  flex-shrink: 0;
}

.features__marquee-track--left,
.features__marquee-track--right {
  will-change: transform;
}

.feat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 280px;
  height: 360px;
  padding: 24px 20px 28px;
  position: relative;
  border-radius: 16px;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  z-index: 1;
  flex: none;
}

.features__cards:has(.feat-card--1:hover) .feat-card--2,
.features[data-active="1"] .feat-card--2 {
  transform: translateX(21px) !important;
}
.features__cards:has(.feat-card--1:hover) .feat-card--3,
.features[data-active="1"] .feat-card--3 {
  transform: translateX(21px) !important;
}
.features__cards:has(.feat-card--3:hover) .feat-card--2,
.features[data-active="3"] .feat-card--2 {
  transform: translateX(-21px) !important;
}
.features__cards:has(.feat-card--3:hover) .feat-card--1,
.features[data-active="3"] .feat-card--1 {
  transform: translateX(-21px) !important;
}
.features__cards:has(.feat-card--2:hover) .feat-card--1,
.features[data-active="2"] .feat-card--1 {
  transform: translateX(-21px) !important;
}
.features__cards:has(.feat-card--2:hover) .feat-card--3,
.features[data-active="2"] .feat-card--3 {
  transform: translateX(21px) !important;
}

.features .feat-card:hover,
.features[data-active="1"] .feat-card--1,
.features[data-active="2"] .feat-card--2,
.features[data-active="3"] .feat-card--3 {
  transform: scale(1.15) !important;
  z-index: 10;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.feat-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.feat-card__icon {
  width: 58px;
  height: 58px;
}

.feat-card__num {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  opacity: 0.5;
  position: relative;
  top: 8px;
}

.feat-card__bottom {}

.feat-title-wrap {
  position: relative;
  margin-bottom: 14px;
}

.feat-title-particles {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
}

.feat-card__title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 0;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.6s ease;
}

.feat-card__title.revealed {
  opacity: 1;
}

.feat-card__desc {
  font-size: 13px;
  line-height: 1.85;
  letter-spacing: 0.04em;
  opacity: 0.7;
}

/* --- Card 1: 浅绿 --- */
.feat-card--1 {
  background: #DEF7CE;
  color: #1a2e12;
}

/* --- Card 2: 深蓝灰 --- */
.feat-card--2 {
  background: #2c2f3a;
  color: #e8eaf0;
}

/* --- Card 3: 浅蓝紫 --- */
.feat-card--3 {
  background: #e4e8f2;
  color: #2c3650;
}

/* ===== Feature Icon Animations ===== */
.feat-icon__line {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.feat-card.in-view .feat-icon__line {
  animation: featDraw 1.8s ease-out forwards;
}

.feat-card.in-view .feat-icon__delay {
  animation: featDraw 1.8s ease-out 0.6s forwards;
}

.feat-card.in-view .feat-icon {
  animation: featIdle 3s ease-in-out 2.4s infinite;
}

@keyframes featDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes featIdle {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-5px) scale(1.08); }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.footer__grid-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.footer > *:not(.footer__grid-canvas) {
  position: relative;
  z-index: 1;
}

.footer__logo {
  margin-bottom: 20px;
}

.footer__title {
  font-family: 'Fugaz One', cursive;
  font-weight: 400;
  font-size: 42px;
  color: #161616;
  margin-bottom: 6px;
}

.footer__sub {
  font-weight: 200;
  font-size: 18px;
  letter-spacing: 0.35em;
  color: #161616;
  margin-bottom: 36px;
}

.footer__downloads {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-right: -24px;
  padding: 0 8px;
}

@keyframes btn-wiggle {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-4px) rotate(-1deg); }
  50% { transform: translateY(0) rotate(0.5deg); }
  75% { transform: translateY(-3px) rotate(-0.5deg); }
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 280px;
  padding: 14px 20px;
  border-radius: 24px 14px 3px 24px;
  font-weight: 600;
  font-size: 20px;
  letter-spacing: 0.3px;
  color: #000;
  text-decoration: none;
  animation: btn-wiggle 3s ease-in-out infinite;
}

.dl-btn:nth-child(2) {
  animation-delay: 0.5s;
}

.dl-btn[data-anim].in-view {
  transform: unset !important;
  animation: btn-wiggle 3s ease-in-out infinite;
}

.dl-btn--green  { background: #ACF5C2; border: 1px solid #E8FFEB; }
.dl-btn--purple { background: #C8D1FF; border: 1px solid #EAF0FF; }

/* ========================================
   SITE FOOTER
   ======================================== */
.site-footer {
  background: #0a0a0a;
  color: #fff;
  padding: 48px 24px 40px;
}

/* -- Top: nav + back-to-top -- */
.site-footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer__nav {
  display: flex;
  flex-direction: column;
}
.site-footer__label {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}
.site-footer__link {
  font-size: 20px;
  font-weight: 350;
  color: #fff;
  text-decoration: none;
  line-height: 2;
}

.site-footer__connect .site-footer__link {
  text-decoration: underline;
  text-decoration-thickness: 0.5px;
  text-underline-offset: 4px;
}
.site-footer__link:active {
  opacity: 0.6;
}
.site-footer__back-top {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #333;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.site-footer__back-top:active {
  background: #222;
}

/* -- Connect -- */
.site-footer__connect {
  display: flex;
  flex-direction: column;
  margin-top: 48px;
}

/* -- Bottom: copyright + brand -- */
.site-footer__bottom {
  margin-top: 64px;
  text-align: right;
}
.site-footer__copy {
  font-size: 11px;
  color: #555;
  margin: 0;
  line-height: 1.6;
  letter-spacing: 0.5px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.site-footer__brand {
  font-size: clamp(36px, 12vw, 56px);
  font-weight: 800;
  color: #fff;
  margin: 24px 0 0;
  letter-spacing: -1px;
  line-height: 1;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
[data-anim] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-anim].in-view {
  opacity: 1;
  transform: none !important;
}


.cloud-bubble[data-anim].in-view {
  transform: var(--bubble-transform) !important;
}

[data-anim="up"]    { transform: translateY(30px); }
[data-anim="down"]  { transform: translateY(-20px); }
[data-anim="left"]  { transform: translateX(-30px); }
[data-anim="right"] { transform: translateX(30px); }
[data-anim="scale"] { transform: translateY(20px) scale(0.95); }

/* cloud-bubble: nth-child transforms handle rotation now */

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card__media { display: none; }
  [data-anim] { opacity: 1; transform: none !important; }
  .feat-icon__line, .feat-icon { stroke-dashoffset: 0; animation: none !important; }
}
