/* ============================================================
   星算纪 TokenHub — 全局样式
   ============================================================ */

/* === 字体（本地托管 Space Grotesk） === */
@import url('fonts.css');

/* === 全局字体 === */
body, html {
  font-family: 'Smiley Sans', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Smiley Sans', 'Space Grotesk', sans-serif !important;
}

.tracking-tight {
  font-family: 'Space Grotesk', 'Smiley Sans', sans-serif !important;
}

/* === 花瓣浮动动画 === */
@keyframes bouquetFloat {
  0%   { transform: translateY(0); }
  50%  { transform: translateY(-1.25rem); }
  100% { transform: translateY(0); }
}

#bouquet {
  animation: bouquetFloat 5s ease-in-out infinite;
}

/* === Aura 浮动动画 === */
@keyframes soft-float-aura {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-24px); }
}

.anim-float-aura {
  animation: soft-float-aura 6s ease-in-out infinite;
  will-change: transform;
}

@supports (animation-timeline: scroll()) {
  @keyframes scroll-zoom-aura {
    0% { transform: scale(1); }
    100% { transform: scale(1.4); }
  }
  .anim-scroll-aura {
    animation: scroll-zoom-aura linear forwards;
    animation-timeline: scroll();
    will-change: transform;
  }
}

/* === 移动端汉堡菜单 === */
#mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
#mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
#mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 767px) {
  #mobile-menu-btn {
    display: flex !important;
  }

  #mobile-nav.mobile-open {
    display: flex !important;
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(16px);
    z-index: 40;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
  }

  #mobile-nav .nav-dropdown .dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    margin-top: 0.5rem !important;
  }

  #mobile-nav .nav-dropdown .dropdown-menu .glass-card {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: none;
  }
}

/* === 玻璃卡片效果 === */
.glass-card {
  background: rgba(10, 10, 12, 0.85);
  backdrop-filter: blur(20px);
}

/* === 通用工具类 === */
.reveal-line {
  overflow: hidden;
}

/* === 子页面通用样式 === */
.subpage-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 12, 0.55);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.subpage-body {
  padding-top: 5rem;
}

/* === FAQ 手风琴 === */
#faq details summary { list-style: none; }
#faq details summary::-webkit-details-marker { display: none; }
#faq details[open] summary iconify-icon { transform: rotate(180deg); }
#faq details summary iconify-icon { transition: transform 0.3s ease; }

/* ========== 📱 移动端适配 ========== */
@media (max-width: 768px) {

  /* Cinematic 滚动区缩短 */
  #cinematic { height: 320vh !important; }

  /* Hero 4图叠放在手机上缩为2图+简洁 */
  .hero-cover .grid { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .hero-cover h1 { font-size: 2.5rem !important; }
  .hero-cover .relative.h-\[36rem\] { height: 20rem !important; }

  /* 产品服务卡：图片放上面，文字放下面 */
  .fade-card.flex-col.md\\:flex-row { gap: 1.5rem !important; }
  .fade-card.flex-col.md\\:flex-row .shrink-0 { width: 100% !important; }

  /* AI gen 模型Board卡片防止溢出 */
  #noema-board .grid { grid-template-columns: repeat(2, 1fr) !important; }

  /* Manifesto 大背景文字缩小 */
  #noema-manifesto h1 { font-size: 2.5rem !important; }

  /* 通用font-sm改成base确保可读 */
  h1 { font-size: 2.5rem !important; line-height: 1.1 !important; }
  h2 { font-size: 1.75rem !important; }

  /* padding 缩小 */
  .py-24 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }

  /* 4列grid简化 */
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
  .grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }

  /* Footer 简洁 */
  footer .gap-16 { gap: 2rem !important; }

  /* letterbox / corner frames 缩小 */
  #lbTop, #lbBot { height: 0 !important; }
  [style*="border-top:1px"] { width: 0.75rem !important; height: 0.75rem !important; }

  /* Nav */
  .subpage-header { padding: 0.5rem 0 !important; }
  .subpage-body { padding-top: 4rem !important; }
  .compare-table { overflow-x: auto !important; }

  /* 产品详情页 hero */
  .subpage-hero { min-height: 40vh !important; }
  .subpage-hero h1 { font-size: 2rem !important; }

  /* 视频轮播 */
  #videoThumbs { flex-wrap: wrap !important; }
  #videoThumbs .flex-1 { min-width: 30% !important; }

  /* 联系卡片 stack */
  .contact-strip, .contact-stack, .contact-bento {
    flex-direction: column !important;
    padding: 1.5rem !important;
  }
}

