/* =========================================================
   Hero — AI 建站创作画布
   首屏由左侧文案 + 右侧 "AI 建站创作画布" 组成；
   画布由半透明分层 UI mock + 流动钢笔路径 + 3D 调色板组成。
   纯 HTML/CSS/SVG 实现，无外部图片依赖。
   ========================================================= */

.hero {
  position: relative;
  padding-block: 96px 80px;
  overflow: hidden;
  background:
    radial-gradient(120% 100% at 80% 0%, rgba(0, 184, 217, 0.10) 0%, transparent 60%),
    radial-gradient(80% 60% at 20% 0%, rgba(20, 110, 245, 0.10) 0%, transparent 60%),
    linear-gradient(180deg, #F9FBFE 0%, #EEF4FA 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(11, 18, 32, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 18, 32, 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .split { gap: 64px; align-items: center; }
@media (max-width: 1023px) {
  .hero { padding-block: 64px 56px; }
  .hero .split { gap: 48px; }
}

/* 产品页首屏：在通用 .hero 基础上增高约 150px（上下各 +75px padding） */
.hero[data-section="product-hero"] {
  padding-block: 151px 115px;
}
@media (max-width: 1023px) {
  .hero[data-section="product-hero"] {
    padding-block: 119px 91px;
  }
}

/* 产品页文案区：眉题→标题、标题→导语、导语→按钮 各 +10px；导语 max-width 660px（较全站 .lede 640px 再宽 20px） */
@media (min-width: 1024px) {
  .hero[data-section="product-hero"] .split.split--6-6 {
    grid-template-columns: 7fr 5fr;
  }
}
.hero[data-section="product-hero"] .hero-eyebrow { margin-bottom: 34px; }
.hero[data-section="product-hero"] .hero-title { margin-bottom: 0; }
.hero[data-section="product-hero"] .hero-lede {
  max-width: 660px;
  margin-bottom: 42px;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  margin-bottom: 24px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.hero-eyebrow .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #146EF5, #00B8D9);
  color: #fff;
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: var(--fw-bold);
}
.hero-eyebrow .pill::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: #A7E92F;
  box-shadow: 0 0 0 3px rgba(167, 233, 47, 0.40);
}

.hero-title {
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.025em;
  color: var(--color-text-strong);
  margin: 0;
  /* CJK + Latin 混排时不在中文词中间换行，按空格 / 全角标点断行 */
  word-break: keep-all;
  overflow-wrap: break-word;
}
.hero-title .grad {
  background: linear-gradient(90deg, #146EF5 0%, #00B8D9 60%, #0B4FD8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-title .underline {
  position: relative;
  white-space: nowrap;
}
.hero-title .underline::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 10px;
  background: rgba(167, 233, 47, 0.50);
  border-radius: 4px;
  z-index: -1;
  transform: skew(-2deg);
}

.hero-lede {
  margin-top: 20px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-muted);
  margin-bottom: 32px;
  max-width: 540px;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }

/* =========================================================
   The "AI 建站创作画布"
   ========================================================= */
.canvas {
  position: relative;
  aspect-ratio: 5 / 4.5;
  perspective: 1400px;
  overflow: visible;
}
.canvas__plane {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-2xl);
  background:
    radial-gradient(140% 90% at 30% 0%, rgba(20, 110, 245, 0.08), transparent 60%),
    radial-gradient(120% 90% at 90% 100%, rgba(0, 184, 217, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.65) 100%);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 32px 80px rgba(11, 28, 64, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden;
  transform: rotateY(-3deg) rotateX(2deg);
  transform-style: preserve-3d;
}
.canvas__plane::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(11, 18, 32, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 18, 32, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, #000 40%, transparent 80%);
}

/* Connecting flowing pen path */
.canvas__path {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 4;
  shape-rendering: geometricPrecision;
  transform: rotate(-12deg);
  transform-origin: 50% 50%;
}
.canvas__path path,
.canvas__path ellipse { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.canvas__path .path-bg { stroke: rgba(20, 110, 245, 0.12); stroke-width: 8; }
.canvas__path .path-fg {
  stroke: url(#flowGrad);
  stroke-width: 3;
  stroke-dasharray: none;
  animation: none;
}
.canvas__path .path-dot {
  fill: var(--color-accent);
  filter: drop-shadow(0 4px 8px rgba(255, 122, 69, 0.40));
}
@keyframes dashflow {
  to { stroke-dashoffset: -140; }
}

/* Generic mock card on canvas */
.canvas-node {
  position: absolute;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(220, 228, 238, 0.9);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(11, 28, 64, 0.08);
  padding: 14px 16px;
  z-index: 5;
  backdrop-filter: blur(8px);
  transform: translateZ(20px);
}
.canvas-node h6 {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 6px;
  display: flex; align-items: center; gap: 6px;
}
.canvas-node h6 .lit {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-ai-lime);
  box-shadow: 0 0 0 4px rgba(167, 233, 47, 0.30);
  animation: blink 2.4s ease-in-out infinite;
}
.canvas-node p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--color-text); }

/* Node positions */
.node-input    { top: 8%;  left: 4%;  width: 44%; transform: translateZ(40px); }
.node-canvas   { top: 22%; left: 22%; width: 60%; transform: translateZ(10px); padding: 12px; }
.node-engine   { top: 50%; left: 4%;  width: 38%; transform: translateZ(50px); }
.node-chat     { top: 60%; right: 4%; width: 44%; transform: translateZ(35px); }
.node-geo      { bottom: 6%; left: 18%; width: 52%; transform: translateZ(25px); }

/* Input node */
.node-input .needs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  margin-top: 8px;
}
.node-input .needs span {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-soft);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  color: var(--color-text);
  display: inline-flex; align-items: center; gap: 4px;
}
.node-input .needs span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-secondary);
}

/* Company CMS + AI "engine" node */
.node-engine {
  background: linear-gradient(135deg, #0F1B33 0%, #102655 100%);
  color: #fff;
  border-color: rgba(255,255,255,0.10);
  padding: 14px 16px;
}
.node-engine h6 { color: rgba(255,255,255,0.62); }
.node-engine .stack {
  display: flex; flex-direction: column; gap: 6px;
}
.node-engine .layer {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  font-size: 12px;
  color: #fff;
}
.node-engine .layer .pip {
  width: 8px; height: 8px; border-radius: 2px;
}
.node-engine .layer.l1 .pip { background: var(--color-primary); box-shadow: 0 0 8px var(--color-primary); }
.node-engine .layer.l2 .pip { background: var(--color-secondary); box-shadow: 0 0 8px var(--color-secondary); }
.node-engine .layer.l3 .pip { background: var(--color-ai-lime); box-shadow: 0 0 8px var(--color-ai-lime); }

/* Chat / AI assistant node */
.node-chat .bubble {
  display: flex; gap: 8px;
  align-items: flex-start;
  margin-top: 8px;
}
.node-chat .bubble + .bubble { margin-top: 8px; }
.node-chat .ava {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00B8D9, #146EF5);
  flex-shrink: 0;
  position: relative;
}
.node-chat .ava::before {
  content: ""; position: absolute; inset: 4px;
  border-radius: 50%; background: rgba(255,255,255,0.92);
}
.node-chat .ava::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #146EF5, #00B8D9);
}
.node-chat .ava.user { background: var(--color-text-strong); }
.node-chat .ava.user::after { background: var(--color-ai-lime); }
.node-chat .msg {
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border-soft);
  border-radius: 8px 8px 8px 2px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--color-text);
  max-width: 78%;
}
.node-chat .msg.user {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  border-radius: 8px 8px 2px 8px;
  margin-left: auto;
}
.node-chat .bubble.user { flex-direction: row-reverse; }
.node-chat .typing {
  display: inline-flex; gap: 3px; padding: 2px 0;
}
.node-chat .typing span {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--color-muted);
  animation: typingDot 1.2s ease-in-out infinite;
}
.node-chat .typing span:nth-child(2) { animation-delay: 0.15s; }
.node-chat .typing span:nth-child(3) { animation-delay: 0.30s; }
@keyframes typingDot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

/* GEO recommendation node */
.node-geo .geo-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.node-geo .geo-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
  border-radius: 6px;
  font-size: 11px;
  color: var(--color-text);
}
.node-geo .geo-item .src {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  padding: 1px 5px;
  border-radius: 3px;
}
.node-geo .geo-item .rank {
  margin-left: auto;
  display: inline-flex; align-items: center; gap: 3px;
  color: var(--color-success);
  font-weight: var(--fw-semibold);
}
.node-geo .geo-item .rank::before {
  content: "↑"; font-weight: bold; font-size: 10px;
}

/* Canvas mock content (the inner page being designed) */
.node-canvas {
  background: linear-gradient(180deg, #F8FAFD 0%, rgba(255,255,255,0.96) 100%);
  border-color: rgba(220, 228, 238, 0.7);
  padding: 12px 14px;
}
.node-canvas .toolbar {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 8px;
}
.node-canvas .toolbar .dot { width: 8px; height: 8px; border-radius: 50%; }
.node-canvas .toolbar .dot.r { background: #FF5F57; }
.node-canvas .toolbar .dot.y { background: #FEBC2E; }
.node-canvas .toolbar .dot.g { background: #28C840; }
.node-canvas .toolbar .url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--color-muted);
  background: var(--color-surface-soft);
  padding: 2px 8px;
  border-radius: 4px;
  flex: 1; max-width: 60%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.node-canvas .pageblock {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 6px;
}
.node-canvas .pb-bar {
  height: 8px; border-radius: 3px;
  background: var(--color-surface-soft);
}
.node-canvas .pb-bar.l { background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); }
.node-canvas .pb-bar.lime { background: linear-gradient(90deg, var(--color-ai-lime), var(--color-secondary)); width: 60%; }
.node-canvas .pb-card {
  height: 38px;
  border-radius: 6px;
  background: linear-gradient(180deg, #fff 0%, var(--color-surface-soft) 100%);
  border: 1px solid var(--color-border-soft);
  position: relative;
  overflow: hidden;
}
.node-canvas .pb-card::before {
  content: ""; position: absolute;
  left: 8px; top: 8px;
  width: 28%; height: 4px;
  background: var(--color-text-strong); border-radius: 2px;
}
.node-canvas .pb-card::after {
  content: ""; position: absolute;
  left: 8px; bottom: 8px; right: 8px;
  height: 3px; background: var(--color-border); border-radius: 2px;
}

/* 3D color palette */
.palette {
  position: absolute;
  right: -2%;
  top: 6%;
  width: 90px;
  height: 110px;
  z-index: 6;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(14deg) rotateZ(-8deg);
  animation: floatY 6s ease-in-out infinite;
}
.palette .swatch {
  position: absolute;
  width: 56px; height: 16px;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(11, 28, 64, 0.18), inset 0 1px 0 rgba(255,255,255,0.6);
}
.palette .s1 { background: #146EF5; transform: translate3d(0, 0, 24px); top: 0; left: 12px; }
.palette .s2 { background: #00B8D9; transform: translate3d(8px, 22px, 18px); top: 0; left: 12px; }
.palette .s3 { background: #FF7A45; transform: translate3d(-6px, 44px, 14px); top: 0; left: 12px; }
.palette .s4 { background: #A7E92F; transform: translate3d(12px, 66px, 10px); top: 0; left: 12px; }
.palette .s5 { background: #0B1220; transform: translate3d(-2px, 88px, 6px); top: 0; left: 12px; }

@keyframes floatY {
  0%, 100% { transform: rotateY(-18deg) rotateX(14deg) rotateZ(-8deg) translateY(0); }
  50%      { transform: rotateY(-12deg) rotateX(10deg) rotateZ(-6deg) translateY(-8px); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* Floating decorative chips */
.chip-float {
  position: absolute;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: var(--color-text);
  box-shadow: 0 8px 20px rgba(11, 28, 64, 0.10);
  z-index: 7;
  backdrop-filter: blur(8px);
}
.chip-float .glyph {
  width: 14px; height: 14px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: bold;
}
.chip-1 { top: calc(37% + 20px); left: -17%; animation: floatChip 7s ease-in-out infinite; }
.chip-1 .glyph { background: var(--color-primary); }
.chip-2 { top: 42%; right: -14%; animation: floatChip 8s ease-in-out infinite reverse; }
.chip-2 .glyph { background: var(--color-secondary); }
.chip-3 { top: calc(-6% + 20px); right: 34%; animation: floatChip 6s ease-in-out infinite; }
.chip-3 .glyph { background: var(--color-accent); }

.is-partner .chip-3 {
  top: 44%;
  right: calc(-17% + 30px);
}

.is-partner .page-hero .canvas {
  aspect-ratio: 5 / 4.25;
}

.is-partner .node-input {
  top: calc(8% + 30px);
  left: calc(4% + 30px);
}

.is-partner .node-engine {
  top: 50%;
}

.is-partner .node-chat {
  top: 58%;
  right: 5%;
}

.is-partner .node-geo {
  bottom: 4%;
  left: 18%;
}

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

/* entrance animations */
.fade-up { opacity: 0; transform: translateY(48px) scale(0.94); animation: fadeUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards; will-change: opacity, transform; }
.fade-up.d1 { animation-delay: 0.12s; }
.fade-up.d2 { animation-delay: 0.26s; }
.fade-up.d3 { animation-delay: 0.40s; }
.fade-up.d4 { animation-delay: 0.54s; }
.fade-up.d5 { animation-delay: 0.68s; }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0) scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .fade-up, .palette, .chip-float, .canvas__path .path-fg, .canvas-node, .node-chat .typing span { animation: none !important; }
  .fade-up { opacity: 1; transform: none; }
}

/* Mobile: replace the rich canvas with a simplified strip */
@media (max-width: 1023px) {
  .canvas { aspect-ratio: 5 / 4.4; max-width: 540px; margin-inline: auto; }
  .chip-1 { left: -10%; }
}
@media (max-width: 539px) {
  .canvas { aspect-ratio: 4 / 3.6; }
  .canvas-node { font-size: 11px; padding: 10px 12px; }
  .node-input    { width: 56%; }
  .node-canvas   { width: 70%; left: 18%; top: 18%; }
  .node-engine   { width: 46%; }
  .node-chat     { width: 50%; }
  .node-geo      { width: 64%; left: 12%; }
  .palette { width: 70px; height: 90px; }
  .palette .swatch { width: 44px; height: 12px; }
  .palette .s2 { transform: translate3d(6px, 18px, 18px); }
  .palette .s3 { transform: translate3d(-4px, 36px, 14px); }
  .palette .s4 { transform: translate3d(10px, 54px, 10px); }
  .palette .s5 { transform: translate3d(-2px, 72px, 6px); }
  .chip-1 { display: none; }
}
