/* ── Edge AI Page ── */

/* ── Frame Scroll Hero ── */
.frame-hero {
  height: 400vh;
  position: relative;
  background: #000;
}
.frame-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
#frameCanvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 100%;
  max-height: 100%;
}
/* Section base */
.snap-section {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Hero ── */
.ai-hero {
  background: var(--black);
  color: var(--white);
  text-align: center;
  padding: 0 32px;
}
.ai-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(60,60,120,0.5) 0%, transparent 70%);
}
.ai-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.ai-hero-badge {
  display: inline-block;
  padding: 6px 20px;
  border: 1.5px solid rgba(255,255,255,0.25);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 24px;
}
.ai-hero-title {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 24px;
}
.ai-hero-title span {
  background: linear-gradient(135deg, #4fc3f7, #7c4dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-hero-desc {
  font-size: clamp(15px, 1.6vw, 20px);
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto;
}
.ai-hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: scrollPulse 2s ease-in-out infinite;
}
.ai-hero-scroll::after {
  content: '';
  width: 2px;
  height: 50px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.8), transparent);
  border-radius: 1px;
}
@keyframes scrollPulse {
  0%,100% { opacity: 0.5; transform: translateX(-50%) translateY(0); }
  50% { opacity: 1; transform: translateX(-50%) translateY(8px); }
}

/* ── Mid Sections (2 & 3) ── */
.ai-mid-section {
  padding: 100px 32px;
  background: var(--white);
}
.ai-mid-section--dark {
  background: #111;
}
.ai-mid-section--dark .ai-card-name,
.ai-mid-section--dark .ai-mid-title { color: var(--white); }
.ai-mid-section--dark .ai-card-desc { color: rgba(255,255,255,0.55); }
.ai-mid-section--dark .ai-card-label { color: #4fc3f7; }
.ai-mid-section--dark .ai-card-tags span { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); color: rgba(255,255,255,0.7); }
.ai-mid-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.ai-mid-header {
  text-align: center;
  margin-bottom: 72px;
}
.ai-mid-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 12px;
}
.ai-mid-section--dark .ai-mid-label { color: #fff; }
.ai-mid-title {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
}

/* ── Tab Switcher (DJI style with sliding indicator) ── */
.ai-tabs {
  display: inline-flex;
  margin: 40px auto 32px;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  left: 50%;
  transform: translateX(-50%);
}
.ai-tab {
  padding: 16px clamp(16px, 2.5vw, 36px);
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.3s ease;
  white-space: nowrap;
  position: relative;
}
.ai-tab:hover {
  color: rgba(255,255,255,0.7);
}
.ai-tab.active {
  color: #fff;
}
.ai-tabs-indicator {
  position: absolute;
  bottom: -1px;
  height: 2px;
  background: #fff;
  transition: left 0.4s ease, width 0.4s ease;
}

/* Tab Video */
.ai-tab-video {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  margin-bottom: 0;
  max-width: 100%;
}
.ai-tab-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}
.ai-tab-panel.active {
  opacity: 1;
  pointer-events: auto;
}
.ai-tab-panel img {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  object-fit: cover;
}
.ai-tab-panel iframe {
  width: 110%;
  height: 110%;
  border: none;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Tab Description */
.ai-tab-descs {
  text-align: center;
  max-width: 700px;
  margin: 0 auto;
  position: relative;
  min-height: 120px;
}
.ai-tab-desc {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: absolute;
  width: 100%;
  pointer-events: none;
}
.ai-tab-desc.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  pointer-events: auto;
}
.ai-mid-section--dark .ai-tab-desc p { color: #fff; }
.ai-tab-desc p {
  font-size: clamp(14px, 1.1vw, 16px);
  color: #666;
  line-height: 1.8;
}

/* ── Feature Cards ── */
.ai-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 80px;
}
.ai-card:last-child { margin-bottom: 0; }
.ai-card--reverse { grid-template-columns: 1fr 1.2fr; }
.ai-card--reverse .ai-card-video { order: 2; }
.ai-card--reverse .ai-card-info { order: 1; }
.ai-card-video {
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16/9;
  position: relative;
}
.ai-card-video iframe, .ai-card-video img {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  object-fit: cover;
}
.ai-card-info { padding: 12px 0; }
.ai-card-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #7c4dff;
  margin-bottom: 10px;
}
.ai-card-name {
  font-size: clamp(22px, 2.5vw, 34px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
  margin-bottom: 14px;
}
.ai-card-desc {
  font-size: clamp(14px, 1.1vw, 16px);
  color: #666;
  line-height: 1.8;
  margin-bottom: 20px;
}
.ai-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ai-card-tags span {
  padding: 5px 14px;
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: #555;
}

/* ── Specs Section ── */
.ai-specs {
  background: #0a0a0a;
  color: var(--white);
  text-align: center;
  padding: 100px 32px;
  min-height: auto;
}
.ai-specs-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.ai-specs-title {
  font-size: clamp(28px, 3.5vw, 48px);
  font-weight: 700;
  margin-bottom: 16px;
}
.ai-specs-desc {
  font-size: clamp(14px, 1.2vw, 17px);
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  margin-bottom: 48px;
}
.ai-specs-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.ai-spec-card {
  padding: 28px 12px;
  background: rgba(255,255,255,0.04);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.ai-spec-value {
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 800;
  margin-bottom: 6px;
  white-space: nowrap;
  background: linear-gradient(135deg, #4fc3f7, #7c4dff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ai-spec-label {
  font-size: clamp(11px, 1vw, 13px);
  color: rgba(255,255,255,0.4);
  white-space: nowrap;
}

/* ── Products Grid ── */
.ai-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
  align-items: end;
}

/* ── CTA ── */
.ai-cta-section {
  padding: 100px 32px;
  text-align: center;
  background: #f5f5f5;
}
.ai-section-4 {
  min-height: auto;
}
.ai-cta-title {
  font-size: clamp(28px, 3.5vw, 44px);
  font-weight: 700;
  color: var(--black);
  margin-bottom: 16px;
}
.ai-cta-desc {
  font-size: 16px;
  color: #888;
  margin-bottom: 36px;
}
.ai-cta-btn {
  display: inline-block;
  padding: 18px 48px;
  background: var(--black);
  color: var(--white);
  text-decoration: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  transition: transform 0.2s, opacity 0.2s;
}
.ai-cta-btn:hover {
  opacity: 0.85;
  transform: translateY(-2px);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  /* Hero */
  .ai-hero { padding: 0 20px; }
  .ai-hero-title { font-size: 36px; }
  .ai-hero-desc { font-size: 14px; }

  /* Frame scroll - reduce on mobile */
  .frame-hero { height: 200vh; }

  /* Mid sections */
  .ai-mid-section { padding: 60px 16px; }
  .ai-mid-header { margin-bottom: 40px; }

  /* Tabs - wrap on mobile */
  .ai-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    left: 0;
    transform: none;
    margin: 24px 0;
    gap: 0;
  }
  .ai-tab {
    padding: 10px 12px;
    font-size: 12px;
    flex-shrink: 0;
  }

  /* Tab video */
  .ai-tab-video {
    border-radius: 8px;
  }
  .ai-tab-panel iframe {
    width: 100%;
    height: 100%;
    transform: none;
    top: 0;
    left: 0;
    position: absolute;
  }

  /* Frame scroll on mobile */
  .frame-hero { height: 200vh; }
  #frameCanvas { transform: translate(-50%, -50%) scale(1.2); }

  /* Tab description */
  .ai-tab-descs {
    min-height: 80px;
    padding: 0 4px;
  }
  .ai-tab-desc p { font-size: 13px; line-height: 1.7; }

  /* Cards */
  .ai-card, .ai-card--reverse {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .ai-card--reverse .ai-card-video { order: 0; }
  .ai-card--reverse .ai-card-info { order: 0; }
  .ai-card { margin-bottom: 48px; }

  /* Specs */
  .ai-specs { padding: 60px 16px; }
  .ai-specs-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .ai-spec-value { font-size: 18px; }

  /* Products grid */
  .ai-products-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }

  /* CTA */
  .ai-cta-btn { padding: 14px 32px; font-size: 14px; }
}
