/* ===== 基础重置 ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue-dark: #1a3a6b;
  --blue-mid: #2563eb;
  --blue-light: #3b82f6;
  --blue-pale: #eff6ff;
  --orange: #f97316;
  --orange-hover: #ea580c;
  --red: #ef4444;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --footer-bg: #1e293b;
  --white: #ffffff;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
}

#ribbon-canvas {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}

#click-spark-container {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  overflow: hidden;
}

.click-spark-burst {
  position: absolute;
  transform: translate(-50%, -50%);
}

.click-spark-ray {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size);
  height: 2px;
  border-radius: 2px;
  transform-origin: left center;
  opacity: 0;
  animation: sparkRay var(--duration) ease-out forwards;
}

.click-spark-core {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 0%, #93c5fd 70%, transparent 100%);
  opacity: 0;
  animation: sparkCore var(--duration) ease-out forwards;
}

@keyframes sparkRay {
  0% {
    opacity: 1;
    transform: rotate(var(--angle)) translateX(0) scaleX(0.3);
  }
  60% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(var(--angle)) translateX(var(--radius)) scaleX(1);
  }
}

@keyframes sparkCore {
  0% {
    opacity: 1;
    transform: scale(0.4);
  }
  40% {
    opacity: 0.9;
    transform: scale(1.2);
  }
  100% {
    opacity: 0;
    transform: scale(0.2);
  }
}

@media (prefers-reduced-motion: reduce) {
  #click-spark-container {
    display: none;
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

/* ===== Hero 区域 ===== */
.hero {
  background: linear-gradient(160deg, #1e40af 0%, #2563eb 40%, #60a5fa 100%);
  padding: 80px 24px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(255,255,255,0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero-subtitle {
  font-size: clamp(0.9rem, 2.5vw, 1.05rem);
  color: rgba(255,255,255,0.88);
  margin-bottom: 40px;
  line-height: 1.8;
}

.hero-qr {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  background: var(--white);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.hero-btn {
  display: inline-block;
  background: var(--orange);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 40px;
  border-radius: 50px;
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
  box-shadow: 0 4px 16px rgba(249,115,22,0.4);
}

.hero-btn:hover {
  background: var(--orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(249,115,22,0.5);
}

/* ===== Cloud Sail Falling Text ===== */
.falling-text-section {
  position: relative;
  overflow: hidden;
  padding: 72px 0;
  background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
  border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.falling-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.falling-keyword {
  position: absolute;
  top: -10%;
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.72rem, 1.6vw, 0.88rem);
  font-weight: 600;
  color: rgba(37, 99, 235, 0.22);
  white-space: nowrap;
  animation: keywordFall linear infinite;
  user-select: none;
}

@keyframes keywordFall {
  0% {
    top: -10%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.85;
  }
  100% {
    top: 110%;
    opacity: 0;
  }
}

.falling-text-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.falling-intro {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  line-height: 2;
  color: var(--text-dark);
  text-align: center;
}

.falling-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(-48px);
}

.falling-intro.is-visible .falling-word {
  animation: wordDrop 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.falling-word--highlight {
  color: var(--blue-mid);
  font-weight: 700;
}

@keyframes wordDrop {
  0% {
    opacity: 0;
    transform: translateY(-48px);
  }
  70% {
    opacity: 1;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .falling-keyword {
    animation: none;
    display: none;
  }

  .falling-word {
    opacity: 1;
    transform: none;
  }

  .falling-intro.is-visible .falling-word {
    animation: none;
  }
}

/* ===== 通用标题 ===== */
.section-title {
  text-align: center;
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 48px;
}

.section-title .highlight {
  display: block;
  font-size: 0.85em;
  color: var(--red);
  font-weight: 700;
  margin-top: 6px;
}

/* ===== 标题跳出动画 ===== */
.pop-title-line {
  display: block;
  opacity: 0;
  transform: scale(0.4) translateY(36px);
}

.pop-title.is-visible .pop-title-line {
  animation: titlePop 0.7s cubic-bezier(0.34, 1.45, 0.64, 1) forwards;
}

.pop-title.is-visible .pop-title-line--delay {
  animation-delay: 0.18s;
}

@keyframes titlePop {
  0% {
    opacity: 0;
    transform: scale(0.4) translateY(36px);
  }
  55% {
    opacity: 1;
    transform: scale(1.08) translateY(-6px);
  }
  75% {
    transform: scale(0.96) translateY(2px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pop-title-line {
    opacity: 1;
    transform: none;
  }

  .pop-title.is-visible .pop-title-line {
    animation: none;
  }
}

/* ===== 学员案例展示 ===== */
.cases {
  padding: 80px 0;
  background: var(--white);
}

.cases-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
}

.case-card {
  display: block;
  cursor: pointer;
}

.case-image-wrap {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  box-shadow: var(--shadow);
}

.case-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* 悬停遮罩层 */
.case-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* 白点旋转圆环 */
.dots-ring {
  position: absolute;
  width: 58%;
  height: 58%;
  border-radius: 50%;
  animation: none;
  /* 用 conic-gradient 生成均匀白点 */
  background: repeating-conic-gradient(
    rgba(255, 255, 255, 0.95) 0deg 3deg,
    transparent 3deg 12deg
  );
  /* 环形遮罩，只保留外圈白点 */
  mask: radial-gradient(
    transparent 62%,
    black 63%,
    black 72%,
    transparent 73%
  );
  -webkit-mask: radial-gradient(
    transparent 62%,
    black 63%,
    black 72%,
    transparent 73%
  );
}

.dots-svg {
  display: none;
}

/* 中心链接图标 */
.link-icon {
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease 0.05s, transform 0.35s ease 0.05s;
}

.link-icon svg {
  width: 22px;
  height: 22px;
}

.case-label {
  text-align: center;
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

/* 悬停状态 */
.case-card:hover .case-overlay {
  opacity: 1;
}

.case-card:hover .case-image {
  opacity: 0.6;
}

.case-card:hover .dots-ring {
  animation: rotateRing 4s linear infinite;
}

.case-card:hover .link-icon {
  opacity: 1;
  transform: scale(1);
}

.case-card:hover .case-label {
  color: var(--blue-mid);
}

@keyframes rotateRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ===== 服务内容展示 ===== */
.services {
  padding: 60px 0 80px;
  background: var(--blue-pale);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s, transform 0.3s;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.15);
  transform: translateY(-4px);
}

.service-text {
  padding: 20px 20px 12px;
}

.service-image-wrap {
  overflow: hidden;
  margin-top: auto;
  background: linear-gradient(180deg, #eef4ff 0%, #dbeafe 100%);
}

.service-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card:hover .service-image {
  transform: scale(1.08);
}

.service-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.4;
  margin-bottom: 8px;
}

.service-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ===== 学员反馈 ===== */
.testimonials {
  padding: 80px 0;
  background: var(--white);
}

.testimonials-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}

.testimonial-card {
  background: var(--white);
  border-left: 5px solid var(--blue-mid);
  border-radius: 0 8px 8px 0;
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.testimonial-text {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.8;
  margin-bottom: 12px;
}

.testimonial-author {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: right;
}

/* ===== Footer ===== */
.footer {
  background: var(--footer-bg);
  padding: 60px 0 50px;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.logo-icon {
  width: 72px;
  height: 72px;
}

.logo-icon svg {
  width: 100%;
  height: 100%;
}

.footer-brand {
  font-size: 1.75rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.05em;
}

.footer-desc {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.9;
  max-width: 680px;
  margin: 0 auto 20px;
}

.footer-tagline {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.15em;
}

/* ===== 响应式 ===== */
@media (max-width: 900px) {
  .cases-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 60px 20px 80px;
  }

  .cases-grid,
  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cases,
  .services,
  .testimonials,
  .falling-text-section {
    padding: 60px 0;
  }

  .qr-placeholder {
    width: 150px;
    height: 150px;
  }

  .float-folder {
    right: 12px;
    bottom: 80px;
  }

  .tool-card {
    width: 88px;
    height: 118px;
  }

  .float-folder.is-open .tool-card--chatgpt {
    transform: translateX(calc(-50% - 58px)) rotate(-14deg) scale(1);
  }

  .float-folder.is-open .tool-card--canva {
    transform: translateX(-50%) translateY(-8px) scale(1);
  }

  .float-folder.is-open .tool-card--cursor {
    transform: translateX(calc(-50% + 58px)) rotate(14deg) scale(1);
  }
}

/* ===== 浮动工具文件夹 ===== */
.float-folder {
  position: fixed;
  right: 28px;
  bottom: 100px;
  z-index: 10001;
  user-select: none;
  touch-action: none;
}

.float-folder.is-dragging {
  cursor: grabbing;
}

.float-folder-btn {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: grab;
  filter: drop-shadow(0 6px 20px rgba(99, 102, 241, 0.45));
  transition: transform 0.25s ease, filter 0.25s ease;
}

.float-folder.is-dragging .float-folder-btn {
  cursor: grabbing;
}

.float-folder-btn:hover,
.float-folder.is-open .float-folder-btn {
  transform: scale(1.06);
  filter: drop-shadow(0 8px 28px rgba(99, 102, 241, 0.55));
}

.folder-icon {
  position: relative;
  width: 76px;
  height: 58px;
}

.folder-back {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background: #6366f1;
  border-radius: 0 10px 10px 10px;
}

.folder-back::before {
  content: '';
  position: absolute;
  top: -11px;
  left: 0;
  width: 38px;
  height: 13px;
  background: #6366f1;
  border-radius: 8px 8px 0 0;
}

.folder-papers {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.folder-paper {
  display: block;
  width: 100%;
  height: 7px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 5px 5px 0 0;
  transform: translateY(14px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.34, 1.3, 0.64, 1),
              opacity 0.3s ease;
}

.folder-paper:nth-child(1) { width: 90%; transition-delay: 0.03s; }
.folder-paper:nth-child(2) { width: 95%; transition-delay: 0.06s; }
.folder-paper:nth-child(3) { width: 100%; transition-delay: 0.09s; }
.folder-paper:nth-child(4) { width: 88%; transition-delay: 0.12s; }

.float-folder-btn:hover .folder-paper,
.float-folder.is-open .folder-paper {
  transform: translateY(0);
  opacity: 1;
}

.folder-front {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 34px;
  background: #818cf8;
  border-radius: 0 0 10px 10px;
  z-index: 2;
  transition: height 0.3s ease;
}

.float-folder-btn:hover .folder-front,
.float-folder.is-open .folder-front {
  height: 28px;
}

/* 卡片容器 */
.float-folder-cards {
  position: absolute;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 150px;
  pointer-events: none;
}

.float-folder.is-open .float-folder-cards {
  pointer-events: auto;
}

.tool-card {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 96px;
  height: 128px;
  border-radius: 14px;
  padding: 14px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transform: translateX(-50%) scale(0.3) translateY(40px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.34, 1.4, 0.64, 1),
              opacity 0.35s ease,
              box-shadow 0.25s ease;
  cursor: pointer;
}

.float-folder.is-open .tool-card {
  opacity: 1;
}

.float-folder.is-open .tool-card--chatgpt {
  transform: translateX(calc(-50% - 68px)) rotate(-14deg) scale(1);
  transition-delay: 0.05s;
}

.float-folder.is-open .tool-card--canva {
  transform: translateX(-50%) translateY(-12px) scale(1);
  transition-delay: 0.12s;
  z-index: 2;
}

.float-folder.is-open .tool-card--cursor {
  transform: translateX(calc(-50% + 68px)) rotate(14deg) scale(1);
  transition-delay: 0.19s;
}

.tool-card:hover {
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  z-index: 5;
}

.tool-card--chatgpt {
  background: linear-gradient(160deg, #ecfdf5 0%, #d1fae5 100%);
}

.tool-card--canva {
  background: linear-gradient(160deg, #eff6ff 0%, #e0e7ff 100%);
}

.tool-card--cursor {
  background: linear-gradient(160deg, #1e293b 0%, #0f172a 100%);
}

.tool-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #10a37f;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.tool-card-icon svg {
  width: 24px;
  height: 24px;
}

.tool-card-icon--canva {
  background: linear-gradient(135deg, #00c4cc, #7d2ae8);
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  font-style: italic;
  color: white;
  font-family: 'Inter', sans-serif;
}

.tool-card-icon--cursor {
  background: transparent;
}

.tool-card-icon--cursor svg {
  width: 32px;
  height: 32px;
}

.tool-card-name {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 3px;
}

.tool-card--chatgpt .tool-card-name { color: #065f46; }
.tool-card--canva .tool-card-name { color: #1e3a8a; }
.tool-card--cursor .tool-card-name { color: #ffffff; }

.tool-card-desc {
  font-family: 'Inter', sans-serif;
  font-size: 0.62rem;
  text-align: center;
  line-height: 1.3;
}

.tool-card--chatgpt .tool-card-desc { color: #047857; }
.tool-card--canva .tool-card-desc { color: #2563eb; }
.tool-card--cursor .tool-card-desc { color: #94a3b8; }
