/* 产品族主页样式 - coding.casa
 * 沿用 Cyber-Logic Terminal 设计系统
 */

/* ========== Brand Header ========== */
.home-brand {
  font-size: var(--font-size-headline-md);
  letter-spacing: -0.01em;
}

/* ========== Hero Section ========== */
.home-hero {
  position: relative;
  min-height: 600px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--spacing-4xl);
  padding: var(--spacing-3xl) var(--spacing-lg);
  max-width: var(--container-max);
  margin: 0 auto;
  overflow: hidden;
}

.home-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.home-hero-tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(0, 102, 255, 0.1);
  border: 1px solid rgba(179, 197, 255, 0.3);
  border-radius: var(--radius-full);
  font-family: var(--font-code);
  font-size: var(--font-size-label-caps);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label-caps);
  margin-bottom: var(--spacing-lg);
}

[data-theme="dark"] .home-hero-tag {
  background: rgba(179, 197, 255, 0.1);
  border-color: rgba(179, 197, 255, 0.3);
}

.home-hero-title {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-family: var(--font-heading);
  font-size: 56px;
  font-weight: var(--font-weight-bold);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--color-on-surface);
  margin-bottom: var(--spacing-lg);
}

.home-hero-highlight {
  background: linear-gradient(135deg, var(--color-secondary-fixed-dim), var(--color-tertiary-container));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

[data-theme="dark"] .home-hero-highlight {
  background: linear-gradient(135deg, #00dbe7, #8447ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.home-hero-desc {
  max-width: 520px;
  font-family: var(--font-body);
  font-size: var(--font-size-body-lg);
  line-height: var(--line-height-body-lg);
  color: var(--color-on-surface-variant);
  margin-bottom: var(--spacing-xl);
}

/* Hero Stats */
.home-hero-stats {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.home-hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.home-hero-stat-value {
  font-family: var(--font-code);
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--color-secondary-fixed-dim);
  letter-spacing: -0.02em;
}

[data-theme="light"] .home-hero-stat-value {
  color: var(--color-primary);
}

.home-hero-stat-label {
  font-size: 12px;
  color: var(--color-on-surface-variant);
  white-space: nowrap;
}

.home-hero-stat-divider {
  width: 1px;
  height: 32px;
  background: var(--color-border);
}

/* ========== Hero Visual (抽象几何装饰) ========== */
.home-hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: 400px;
}

.home-hero-orb {
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(0, 219, 231, 0.12) 0%, rgba(132, 71, 255, 0.06) 40%, transparent 70%);
  position: absolute;
  animation: orbPulse 4s ease-in-out infinite;
}

[data-theme="light"] .home-hero-orb {
  background: radial-gradient(circle at 35% 35%, rgba(0, 102, 255, 0.08) 0%, rgba(99, 102, 241, 0.04) 40%, transparent 70%);
}

@keyframes orbPulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.08); opacity: 1; }
}

.home-hero-ring {
  width: 340px;
  height: 340px;
  border-radius: 50%;
  border: 1px solid rgba(0, 219, 231, 0.1);
  position: absolute;
  animation: ringRotate 20s linear infinite;
}

[data-theme="light"] .home-hero-ring {
  border-color: rgba(0, 102, 255, 0.08);
}

@keyframes ringRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.home-hero-dots {
  position: absolute;
  width: 100%;
  height: 100%;
}

.home-hero-dot {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-secondary-fixed-dim);
  opacity: 0.5;
  animation: dotFloat var(--d) ease-in-out infinite;
}

[data-theme="light"] .home-hero-dot {
  background: var(--color-primary);
}

@keyframes dotFloat {
  0%, 100% { transform: translate(0, 0); opacity: 0.3; }
  50% { transform: translate(4px, -6px); opacity: 0.8; }
}

/* ========== Products Grid ========== */
.home-products {
  padding: var(--spacing-4xl) var(--spacing-lg);
}

.home-products-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.home-products-title {
  font-family: var(--font-heading);
  font-size: var(--font-size-headline-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-on-surface);
  margin-bottom: var(--spacing-sm);
}

.home-products-sub {
  font-family: var(--font-body);
  font-size: var(--font-size-body-lg);
  color: var(--color-on-surface-variant);
}

.home-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  max-width: var(--container-max);
  margin: 0 auto;
}

/* ========== Product Card ========== */
.home-product-card {
  display: flex;
  flex-direction: column;
  padding: var(--spacing-xl);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-slow);
  border: 1px solid var(--color-border);
  border-top: 3px solid transparent;
  cursor: pointer;
  position: relative;
  min-height: 380px;
}

.home-product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 219, 231, 0.3);
}

[data-theme="dark"] .home-product-card:hover {
  box-shadow: 0 8px 32px rgba(0, 219, 231, 0.1);
}

[data-theme="light"] .home-product-card:hover {
  box-shadow: var(--shadow-lg);
}

/* 每张卡片顶部色条 */
.home-product-card:nth-child(1) { border-top-color: rgba(0, 219, 231, 0.5); }
.home-product-card:nth-child(2) { border-top-color: rgba(132, 71, 255, 0.5); }
.home-product-card:nth-child(3) { border-top-color: rgba(99, 102, 241, 0.5); }

[data-theme="light"] .home-product-card:nth-child(1) { border-top-color: rgba(0, 102, 255, 0.4); }
[data-theme="light"] .home-product-card:nth-child(2) { border-top-color: rgba(132, 71, 255, 0.4); }
[data-theme="light"] .home-product-card:nth-child(3) { border-top-color: rgba(99, 102, 241, 0.4); }

/* 未发布产品卡片 */
.home-product-card-upcoming {
  cursor: default;
  opacity: 0.75;
}

.home-product-card-upcoming:hover {
  transform: translateY(-4px);
  opacity: 0.9;
}

.home-product-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-lg);
}

.home-product-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  font-size: 28px;
}

.home-product-icon .material-symbols-outlined {
  font-size: 28px;
}

.home-product-icon-1 {
  background: rgba(0, 219, 231, 0.1);
  color: var(--color-secondary-fixed-dim);
}

.home-product-icon-2 {
  background: rgba(132, 71, 255, 0.1);
  color: var(--color-tertiary-container);
}

.home-product-icon-3 {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-tertiary);
}

[data-theme="light"] .home-product-icon-1 {
  background: rgba(0, 102, 255, 0.08);
  color: var(--color-primary);
}

[data-theme="light"] .home-product-icon-2 {
  background: rgba(132, 71, 255, 0.08);
  color: var(--color-tertiary-container);
}

[data-theme="light"] .home-product-icon-3 {
  background: rgba(99, 102, 241, 0.08);
  color: var(--color-tertiary);
}

/* 产品状态标签 */
.home-product-status {
  font-family: var(--font-code);
  font-size: 10px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.home-product-status-live {
  background: rgba(0, 219, 231, 0.1);
  color: var(--color-secondary-fixed-dim);
  border: 1px solid rgba(0, 219, 231, 0.25);
}

.home-product-status-upcoming {
  background: rgba(132, 71, 255, 0.1);
  color: var(--color-tertiary-container);
  border: 1px solid rgba(132, 71, 255, 0.25);
}

.home-product-status-dev {
  background: rgba(99, 102, 241, 0.1);
  color: var(--color-tertiary);
  border: 1px solid rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .home-product-status-live {
  background: rgba(0, 102, 255, 0.06);
  color: var(--color-primary);
  border-color: rgba(0, 102, 255, 0.2);
}

[data-theme="light"] .home-product-status-upcoming {
  background: rgba(132, 71, 255, 0.06);
  color: var(--color-tertiary-container);
  border-color: rgba(132, 71, 255, 0.2);
}

[data-theme="light"] .home-product-status-dev {
  background: rgba(99, 102, 241, 0.06);
  color: var(--color-tertiary);
  border-color: rgba(99, 102, 241, 0.2);
}

/* 产品卡片内容 */
.home-product-card-body {
  flex: 1;
  margin-bottom: var(--spacing-lg);
}

.home-product-name {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: var(--font-weight-bold);
  color: var(--color-on-surface);
  letter-spacing: -0.01em;
  margin-bottom: var(--spacing-sm);
}

.home-product-desc {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-on-surface-variant);
}

/* 产品卡片底部 */
.home-product-card-footer {
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--color-border);
}

.home-product-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-code);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary-fixed-dim);
  transition: gap var(--transition-fast);
}

[data-theme="light"] .home-product-link {
  color: var(--color-primary);
}

.home-product-card:hover .home-product-link {
  gap: 10px;
}

.home-product-link .material-symbols-outlined {
  font-size: 16px;
}

.home-product-link-disabled {
  color: var(--color-outline);
  cursor: default;
}

.home-product-card-upcoming:hover .home-product-link-disabled {
  gap: 6px;
}

/* ========== 品牌理念 (Philosophy) ========== */
.home-philosophy {
  padding: var(--spacing-4xl) var(--spacing-lg);
}

.home-philosophy-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.home-philosophy-label {
  display: inline-block;
  font-family: var(--font-code);
  font-size: 11px;
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-outline);
  margin-bottom: var(--spacing-xl);
}

.home-philosophy-quote {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: var(--font-weight-medium);
  line-height: 1.6;
  color: var(--color-on-surface);
  margin: 0 0 var(--spacing-lg) 0;
  font-style: italic;
  letter-spacing: -0.01em;
}

[data-theme="dark"] .home-philosophy-quote {
  color: var(--color-on-surface);
}

.home-philosophy-attribution {
  font-family: var(--font-code);
  font-size: 13px;
  color: var(--color-outline);
}

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    text-align: center;
  }

  .home-hero-content {
    align-items: center;
    text-align: center;
  }

  .home-hero-desc {
    max-width: 100%;
  }

  .home-hero-stats {
    justify-content: center;
  }

  .home-hero-visual {
    height: 260px;
  }

  .home-hero-orb {
    width: 200px;
    height: 200px;
  }

  .home-hero-ring {
    width: 260px;
    height: 260px;
  }

  .home-products-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
  }

  .home-product-card {
    min-height: auto;
  }
}

@media (max-width: 768px) {
  .home-hero-title {
    font-size: 40px;
  }

  .home-hero-stats {
    flex-direction: column;
    gap: var(--spacing-sm);
    align-items: center;
  }

  .home-hero-stat-divider {
    width: 24px;
    height: 1px;
  }

  .home-hero-stat {
    align-items: center;
  }

  .home-philosophy-quote {
    font-size: 20px;
  }
}

@media (max-width: 480px) {
  .home-hero {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .home-hero-title {
    font-size: 32px;
  }

  .home-hero-visual {
    height: 200px;
  }

  .home-hero-orb {
    width: 150px;
    height: 150px;
  }

  .home-hero-ring {
    width: 200px;
    height: 200px;
  }
}
