/* ==========================================================================
   广州牛人会 Studio - 首页专用样式表 (index.html)
   首页专用类名以 hd- 开头，支持 prefers-reduced-motion
   ========================================================================== */

/* --------------------------------------------------
   排版规则：所有 h2 标题平衡换行
   -------------------------------------------------- */
h2,
.hd-section-title,
.hd-cta-title {
  text-wrap: balance;
}

/* --------------------------------------------------
   通用交互微动效
   -------------------------------------------------- */
.hd-btn-press:active {
  transform: scale(0.98);
}

.hd-arrow-hover {
  display: inline-block;
  transition: transform 0.2s ease;
}

.hd-arrow-hover-trigger:hover .hd-arrow-hover {
  transform: translateX(2px);
}

.hd-card-hover {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hd-card-hover:hover {
  border-color: var(--border-strong, var(--border));
}

/* --------------------------------------------------
   A. 首屏区块 (Hero)
   -------------------------------------------------- */
.hd-hero {
  position: relative;
  padding: 88px 0 72px;
  text-align: center;
  overflow: hidden;
  background-color: var(--bg);
}

.hd-hero-bg-grid {
  position: absolute;
  inset: 0;
  background-size: 48px 48px;
  background-image:
    linear-gradient(to right, var(--border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border) 1px, transparent 1px);
  opacity: 0.4;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 72%);
  pointer-events: none;
  z-index: 0;
}

.hd-hero-content {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px;
}

.hd-hero-logo {
  height: 72px;
  width: auto;
  margin: 0 auto 28px;
  display: block;
  user-select: none;
  transition: background-color 0.2s ease, filter 0.2s ease;
}

/* 中灰/深黑主题下 Logo 加浅色底，保证深色背景下清晰可见 */
html.theme-gray .hd-hero-logo,
html.theme-dark .hd-hero-logo {
  background-color: #F2F2F2;
  border-radius: 12px;
  padding: 8px;
  box-sizing: content-box;
}

.hd-hero-title {
  font-size: 56px;
  line-height: 1.25;
  font-family: var(--font-serif, "Noto Serif SC", "Songti SC", serif);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 22px;
  letter-spacing: -0.5px;
}

.hd-typewriter-text {
  color: var(--accent);
  display: inline;
}

.hd-typewriter-cursor {
  display: inline-block;
  width: 2.5px;
  height: 0.9em;
  vertical-align: -0.06em;
  background-color: var(--accent);
  margin-left: 3px;
  animation: hd-cursor-blink 1s steps(2, start) infinite;
}

@keyframes hd-cursor-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.hd-hero-desc {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 680px;
  margin: 0 auto 36px;
}

.hd-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* 首屏吉祥物：原版透明图，高度 200px，从首屏底边探出（露头至腹部），悬停上移 6px */
.hd-hero-mascot {
  /* 吉祥物宽度随窗口变化：右侧空间够时 145px（高 200px），不够时等比缩小，最小 80px。
     位置：宽屏时距右边 6%；变窄时最多退到中间 880px 内容区的右边界（留 8px），
     不进入内容区，也不超出屏幕右边缘（至少留 12px）。
     原图比例 600×826，高度 = 宽度 × 1.377；底部藏起约 1/3 高度 = 宽度 × 0.46 */
  --mascot-w: clamp(80px, calc(50vw - 460px), 145px);
  position: absolute;
  right: max(12px, min(6%, calc(50% - 448px - var(--mascot-w))));
  bottom: calc(var(--mascot-w) * -0.46);
  width: var(--mascot-w);
  height: auto;
  transition: transform 0.2s ease, filter 0.2s ease;
  z-index: 2;
  pointer-events: auto;
  user-select: none;
}

.hd-hero-mascot:hover {
  transform: translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
  .hd-hero-mascot:hover {
    transform: none;
  }
}

/* 中灰/深黑主题下吉祥物发光投影，保证轮廓清晰可见 */
html.theme-gray .hd-hero-mascot,
html.theme-dark .hd-hero-mascot {
  filter: drop-shadow(0 0 1px rgba(255,255,255,.6)) drop-shadow(0 0 12px rgba(255,255,255,.12));
}

/* 窗口小于 1080px 时，内容区右侧空间不足以放下吉祥物，直接隐藏 */
@media (max-width: 1079px) {
  .hd-hero-mascot {
    display: none;
  }
}

@media (max-width: 768px) {
  .hd-hero {
    padding: 56px 0 48px;
  }
  .hd-hero-logo {
    height: 56px;
    margin-bottom: 20px;
  }
  .hd-hero-title {
    font-size: 34px;
    line-height: 1.3;
  }
  .hd-hero-desc {
    font-size: 15px;
    margin-bottom: 28px;
  }
}

/* --------------------------------------------------
   B. 我们能帮你做什么区块 (Services Segment - 恢复旧版并缩小尺寸)
   -------------------------------------------------- */
.hd-services-section {
  padding: 56px 0;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}

.hd-segment-control-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

.hd-segment-control {
  display: inline-flex;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
  max-width: 100%;
  overflow-x: auto;
}

.hd-segment-btn {
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.hd-segment-btn:hover {
  color: var(--text);
}

.hd-segment-btn.active {
  background-color: var(--accent);
  color: #fff;
  font-weight: 600;
}

.hd-service-card {
  max-width: 960px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 45% 55%;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background-color: var(--bg-card);
}

.hd-service-content {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  transition: opacity 0.2s ease;
}

.hd-service-title {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-serif, "Noto Serif SC", serif);
  color: var(--text);
  margin: 0 0 14px;
  line-height: 1.35;
}

.hd-service-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  margin: 0 0 20px;
}

.hd-service-arrow-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background-color: var(--text);
  color: var(--bg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.hd-service-arrow-btn:hover {
  background-color: var(--accent);
  transform: translate(2px, -2px);
}

.hd-service-mockup {
  background-color: var(--bg-subtle);
  border-left: 1px solid var(--border);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
}

.hd-service-mockup-box {
  width: 100%;
  height: 100%;
  border: 1px dashed var(--border-strong, var(--border));
  border-radius: 8px;
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  gap: 8px;
}

.hd-service-mockup-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  margin-bottom: 2px;
}

@media (max-width: 768px) {
  .hd-service-card {
    grid-template-columns: 1fr;
  }
  .hd-service-mockup {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 20px;
  }
  .hd-service-content {
    padding: 24px 20px;
  }
  .hd-service-title {
    font-size: 20px;
  }
}

/* --------------------------------------------------
   C. 每日工作台区块 (Daily Workbench - 压缩高度)
   -------------------------------------------------- */
.hd-workbench-section {
  padding: 32px 0 40px;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}

.hd-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 20px;
}

.hd-section-title {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-serif, "Noto Serif SC", "Songti SC", serif);
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.3;
}

.hd-section-subtitle {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
  margin: 0;
}

.hd-window-frame {
  max-width: 960px;
  margin: 0 auto;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.hd-window-titlebar {
  height: 38px;
  background-color: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  user-select: none;
}

.hd-window-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hd-window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--border-strong, #ccc);
}

.hd-window-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  font-family: var(--font-mono, monospace);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.hd-title-desktop {
  display: inline;
}

.hd-title-mobile {
  display: none;
}

.hd-window-spacer {
  width: 42px;
  flex-shrink: 0;
}

.hd-window-body {
  display: flex;
  min-height: 280px;
}

.hd-workbench-left {
  width: 220px;
  flex-shrink: 0;
  background-color: var(--bg-subtle);
  border-right: 1px solid var(--border);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hd-steps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hd-step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  height: 36px;
  line-height: 36px;
  color: var(--text-2);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hd-step-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hd-step-item.is-done {
  color: var(--text);
  font-weight: 500;
}

.hd-step-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  background-color: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-3);
}

.hd-step-item.is-active .hd-step-icon {
  border-color: var(--accent);
  color: var(--accent);
  animation: hd-pulse 1s infinite alternate;
}

@keyframes hd-pulse {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.1); }
}

.hd-step-item.is-done .hd-step-icon {
  background-color: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.hd-workbench-right {
  flex: 1;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hd-digest-header {
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.hd-digest-date {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.hd-digest-intro {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-digest-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}

.hd-digest-item {
  display: flex;
  gap: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.hd-digest-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.hd-digest-rank {
  font-family: var(--font-mono, monospace);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-3);
  line-height: 1.2;
  width: 24px;
  flex-shrink: 0;
}

.hd-digest-info {
  flex: 1;
  min-width: 0;
}

.hd-digest-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hd-digest-item-summary {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
  margin-bottom: 3px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-digest-item-meta {
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 10px;
}

.hd-digest-item-meta a {
  color: var(--accent);
  text-decoration: none;
}

.hd-digest-item-meta a:hover {
  text-decoration: underline;
}

.hd-workbench-footer {
  display: flex;
  justify-content: flex-end;
  padding-top: 6px;
}

@media (max-width: 768px) {
  .hd-window-body {
    flex-direction: column;
    height: auto;
  }
  .hd-workbench-left {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 14px;
  }
  .hd-steps-list {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 8px;
  }
  .hd-step-item {
    height: 30px;
    line-height: 30px;
    white-space: nowrap;
    background-color: var(--bg);
    border: 1px solid var(--border);
    padding: 0 10px;
    border-radius: 20px;
    opacity: 1 !important;
    transform: none !important;
  }
  .hd-workbench-right {
    padding: 16px 14px;
  }
  .hd-digest-item {
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 640px) {
  .hd-window-titlebar {
    height: 36px;
    padding: 0 12px;
    gap: 8px;
  }
  .hd-window-dots {
    gap: 5px;
    flex-shrink: 0;
  }
  .hd-window-dot {
    width: 8px;
    height: 8px;
  }
  .hd-window-title {
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .hd-title-desktop {
    display: none !important;
  }
  .hd-title-mobile {
    display: inline !important;
    white-space: nowrap;
  }
  .hd-window-spacer {
    display: none;
  }
}

/* --------------------------------------------------
   D. 连接的平台与模型区块 (Ecosystem Orbit)
   -------------------------------------------------- */
.hd-orbit-section {
  padding: 80px 0;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

.hd-orbit-stage {
  position: relative;
  width: 520px;
  height: 520px;
  margin: 30px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hd-orbit-center {
  position: absolute;
  width: 120px;
  height: 120px;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  z-index: 3;
}

.hd-orbit-center img {
  height: 48px;
  width: auto;
  margin-bottom: 6px;
}

.hd-orbit-center-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

/* 轨道圆环 */
.hd-orbit-ring {
  position: absolute;
  border: 1px dashed var(--border);
  border-radius: 50%;
  pointer-events: none;
}

.hd-orbit-ring-inner {
  width: 320px;
  height: 320px;
}

.hd-orbit-ring-outer {
  width: 480px;
  height: 480px;
}

/* 旋转容器 */
.hd-orbit-track-inner {
  position: absolute;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  animation: hd-rotate-cw 80s linear infinite;
  z-index: 2;
}

.hd-orbit-track-outer {
  position: absolute;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  animation: hd-rotate-ccw 120s linear infinite;
  z-index: 1;
}

.hd-orbit-stage:hover .hd-orbit-track-inner,
.hd-orbit-stage:hover .hd-orbit-track-outer,
.hd-orbit-stage:hover .hd-orbit-pill-inner,
.hd-orbit-stage:hover .hd-orbit-pill-outer {
  animation-play-state: paused;
}

@keyframes hd-rotate-cw {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hd-rotate-ccw {
  from { transform: rotate(0deg); }
  to { transform: rotate(-360deg); }
}

/* 标签项位置定位 */
.hd-orbit-item {
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -50px;
  margin-top: -16px;
  width: 100px;
  text-align: center;
}

/* 胶囊标签样式 */
.hd-orbit-pill {
  display: inline-block;
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  white-space: nowrap;
}

/* 文字反向旋转抵消，保持水平 */
.hd-orbit-pill-inner {
  animation: hd-rotate-ccw 80s linear infinite;
}

.hd-orbit-pill-outer {
  animation: hd-rotate-cw 120s linear infinite;
}

/* 手机端生态横向滚动条 */
.hd-orbit-mobile {
  display: none;
  flex-direction: column;
  gap: 12px;
  padding: 10px 0;
}

.hd-orbit-mobile-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.hd-orbit-mobile-row::-webkit-scrollbar {
  display: none;
}

@media (max-width: 768px) {
  .hd-orbit-stage {
    display: none;
  }
  .hd-orbit-mobile {
    display: flex;
  }
}

/* --------------------------------------------------
   E. 最新内容区块 (Latest Content)
   -------------------------------------------------- */
.hd-latest-section {
  padding: 80px 0;
  background-color: var(--bg);
  border-top: 1px solid var(--border);
}

.hd-latest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  max-width: 960px;
  margin: 0 auto;
}

.hd-latest-col {
  background-color: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
}

.hd-latest-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.hd-latest-col-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.hd-latest-more {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
}

.hd-latest-more:hover {
  color: var(--accent);
}

.hd-latest-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hd-latest-row {
  display: block;
  text-decoration: none;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.hd-latest-row:last-child {
  border-bottom: none;
}

.hd-latest-row-meta {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 4px;
}

.hd-latest-row-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 4px;
  transition: color 0.15s ease;
}

.hd-latest-row:hover .hd-latest-row-title {
  color: var(--accent);
}

.hd-latest-row-snippet {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hd-latest-placeholder {
  padding: 36px 20px;
  text-align: center;
  background-color: var(--bg-subtle);
  border: 1px dashed var(--border);
  border-radius: 8px;
  margin: 4px 0;
}

.hd-placeholder-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 6px;
}

.hd-placeholder-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .hd-latest-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------
   F. 行动区区块 (CTA Section)
   -------------------------------------------------- */
.hd-cta-section {
  padding: 120px 20px;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border);
  text-align: center;
}

.hd-cta-box {
  max-width: 720px;
  margin: 0 auto;
}

.hd-cta-title {
  font-size: 40px;
  line-height: 1.3;
  font-family: var(--font-serif, "Noto Serif SC", "Songti SC", serif);
  font-weight: 700;
  color: var(--text);
  margin: 0 0 18px;
}

.hd-cta-desc {
  font-size: 16px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0 0 36px;
}

.hd-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

@media (max-width: 768px) {
  .hd-cta-section {
    padding: 64px 20px;
  }
  .hd-cta-title {
    font-size: 28px;
  }
}

/* --------------------------------------------------
   G. 全站改版演示页脚 (Footer Demo)
   -------------------------------------------------- */
.hd-footer {
  background-color: var(--bg);
  border-top: 1px solid var(--border);
  padding: 64px 0 36px;
}

.hd-footer-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}

.hd-footer-card {
  background-color: var(--bg-subtle);
  border-radius: 10px;
  padding: 24px;
}

.hd-footer-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 14px;
}

.hd-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hd-footer-links a {
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s ease;
}

.hd-footer-links a:hover {
  color: var(--accent);
}

.hd-footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

@media (max-width: 768px) {
  .hd-footer-cards {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hd-footer-cards {
    grid-template-columns: 1fr;
  }
}
