/* =====================================================
   琛光无人机官网 | home.css
   首页专属样式
   ===================================================== */

/* =====================================================
   Hero Section
   ===================================================== */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-block: var(--s-20);
}

/* 背景网格 */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(240, 165, 0, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240, 165, 0, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* 渐变遮罩 - 底部淡出到页面背景 */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* 角落发光 */
.hero-glow-tl {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(240, 165, 0, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-glow-br {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 179, 0, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.hero > .container {
  position: relative;
  z-index: 1;
  width: 100%;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-12);
  align-items: center;
}

/* ── Hero Text ── */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}

.hero-eyebrow::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(240, 165, 0, 0.6);
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, var(--text-6xl));
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: var(--s-6);
}

.hero-desc {
  font-size: var(--text-lg);
  color: var(--text-2);
  line-height: var(--leading-loose);
  margin-bottom: var(--s-8);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: var(--s-4);
  flex-wrap: wrap;
}

.hero-actions .btn {
  font-size: var(--text-base);
  padding: 0.7em 1.8em;
}

/* ── Hero Visual ── */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image-wrap {
  position: relative;
  max-width: 500px;
  width: 100%;
}

.hero-image {
  width: 100%;
  border-radius: var(--r-2xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.hero-image-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle at center, rgba(240, 165, 0, 0.15) 0%, transparent 70%);
  border-radius: var(--r-2xl);
  z-index: 0;
  animation: heroGlow 4s ease-in-out infinite alternate;
}

@keyframes heroGlow {
  from { opacity: 0.5; transform: scale(0.95); }
  to   { opacity: 1;   transform: scale(1.05); }
}

/* ── Hero Responsive ── */
@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding-block: var(--s-16);
  }
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--s-10);
    text-align: center;
  }
  .hero-eyebrow {
    justify-content: center;
  }
  .hero-desc {
    max-width: 100%;
    margin-inline: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-visual {
    order: -1;
  }
  .hero-image-wrap {
    max-width: 340px;
  }
}

/* =====================================================
   Features Section（理念卡片）
   ===================================================== */
.features {
  background: var(--bg-2);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--s-4);
  }
}

.feature-card {
  padding: var(--s-8);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--ease);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}

.feature-card:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--accent-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: var(--s-4);
  filter: drop-shadow(0 0 8px rgba(240, 165, 0, 0.3));
}

.feature-card h3 {
  font-size: var(--text-xl);
  color: var(--text);
  margin-bottom: var(--s-3);
}

.feature-card p {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--leading-loose);
}

/* =====================================================
   Products Section
   ===================================================== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
  align-items: start;
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

/* ── 产品卡片 ── */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--ease);
}

.product-card.product-available:hover {
  border-color: var(--border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--accent-glow);
}

.product-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-2);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.05);
}

.product-status-badge {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  padding: 0.2em 0.7em;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--r-full);
  letter-spacing: 0.04em;
}

.badge-available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-soon {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ── 即将推出占位 ── */
.product-soon-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-3);
  color: var(--text-3);
}

.product-soon .product-soon-placeholder {
  background: repeating-linear-gradient(
    45deg,
    var(--bg-2) 0px,
    var(--bg-2) 10px,
    rgba(240, 165, 0, 0.02) 10px,
    rgba(240, 165, 0, 0.02) 20px
  );
}

.soon-icon {
  font-size: 2rem;
  color: var(--accent);
  opacity: 0.4;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(1); }
  50%       { opacity: 0.7; transform: scale(1.1); }
}

.product-soon-placeholder p {
  font-size: var(--text-sm);
  color: var(--text-3);
}

/* ── 产品信息区 ── */
.product-info {
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.product-series {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.product-name {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.product-brief {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--leading-normal);
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}

/* ── 更多系列占位卡 ── */
.product-teaser {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  border: 2px dashed var(--border-card);
  background: transparent;
  box-shadow: none;
}

.product-info-center {
  text-align: center;
  justify-content: center;
  align-items: center;
}

.teaser-dots {
  font-size: 2rem;
  color: var(--text-3);
  letter-spacing: 0.3em;
  display: block;
  margin-bottom: var(--s-3);
  animation: dotsFade 3s ease-in-out infinite;
}

@keyframes dotsFade {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 0.8; }
}

.teaser-text {
  font-size: var(--text-sm);
  color: var(--text-3);
  line-height: var(--leading-normal);
}

/* =====================================================
   Open Source Section
   ===================================================== */
.opensource {
  background: var(--bg-2);
}

.opensource-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-8);
  align-items: start;
}

@media (max-width: 900px) {
  .opensource-layout {
    grid-template-columns: 1fr;
  }
}

/* ── 视频嵌入 ── */
.video-embed-wrap {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--bg);
}

.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── 开源链接卡片 ── */
.opensource-links {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
}

.os-card {
  display: flex;
  gap: var(--s-4);
  padding: var(--s-5);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  transition: all var(--ease);
  text-decoration: none;
  align-items: flex-start;
}

.os-card:hover {
  border-color: var(--border);
  background: var(--bg-card-hover);
  transform: translateX(4px);
  box-shadow: var(--shadow-md), -4px 0 0 var(--accent);
}

.os-card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-lg);
  font-size: 1.25rem;
  flex-shrink: 0;
}

.oshw-icon {
  background: rgba(255, 179, 0, 0.1);
  color: var(--gold);
  border: 1px solid rgba(255, 179, 0, 0.2);
  font-size: 1.5rem;
}

.github-icon {
  background: var(--bg-2);
  color: var(--text-2);
  border: 1px solid var(--border-card);
}

.github-icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.bili-icon {
  background: rgba(251, 114, 153, 0.1);
  color: #FB7299;
  border: 1px solid rgba(251, 114, 153, 0.2);
  font-size: 1.1rem;
}

.os-card-content {
  flex: 1;
}

.os-card-content h4 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  margin-bottom: var(--s-1);
}

.os-card-content p {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--leading-normal);
  margin-bottom: var(--s-2);
}

.os-card-link {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  transition: gap var(--ease);
}

.os-card:hover .os-card-link::after {
  content: ' →';
}

/* =====================================================
   News Section
   ===================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-6);
}

@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

.news-card {
  padding: var(--s-6);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  transition: all var(--ease);
}

.news-card:hover {
  border-color: var(--border);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.news-meta {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}

.news-meta time {
  font-size: var(--text-xs);
  color: var(--text-3);
  font-family: var(--font-mono);
}

.news-tag {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid var(--border);
  padding: 1px 8px;
  border-radius: var(--r-full);
}

.news-card h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--s-3);
}

.news-card h3 a {
  color: var(--text);
  transition: color var(--ease);
}

.news-card h3 a:hover {
  color: var(--accent);
}

.news-card p {
  font-size: var(--text-sm);
  color: var(--text-2);
  line-height: var(--leading-normal);
}

/* =====================================================
   统计数字区（可选 section）
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-6);
}

@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  display: block;
  line-height: 1;
  margin-bottom: var(--s-2);
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-3);
}
