/* ═══════════════════════════════════════════════════════════════════════════
   ChipForge Theme — Additional Styles
   Extends public.css with chip-specific UI.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── ChipForge nav CTA button ─────────────────────────────────────────────── */
.cf-cta-btn {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  color: #fff !important;
  border: none;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
}
.cf-cta-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }

/* ── Chip Hero Visual ─────────────────────────────────────────────────────── */
.chip-scene {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Pulse rings */
.chip-rings {
  position: absolute;
  inset: -60px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.chip-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid var(--color-primary);
  opacity: 0;
  animation: ringPulse 3s ease-out infinite;
}
.chip-ring:nth-child(1) { width: 320px; height: 320px; animation-delay: 0s; }
.chip-ring:nth-child(2) { width: 420px; height: 420px; animation-delay: 1s; }
.chip-ring:nth-child(3) { width: 520px; height: 520px; animation-delay: 2s; }

@keyframes ringPulse {
  0%   { opacity: 0; transform: scale(0.8); }
  30%  { opacity: 0.4; }
  100% { opacity: 0; transform: scale(1.1); }
}

/* Floating chip SVG wrapper */
.chip-float {
  animation: chipFloat 4s ease-in-out infinite;
  position: relative;
  z-index: 2;
}
@keyframes chipFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}

/* The main chip SVG */
.chip-svg {
  width: 320px;
  height: 320px;
  filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.35));
}

/* Data stream labels floating around chip */
.chip-labels {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.chip-label {
  position: absolute;
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  color: var(--color-primary);
  opacity: 0.65;
  animation: labelPulse 2.5s ease-in-out infinite;
  white-space: nowrap;
}
.chip-label:nth-child(1) { top: 10%;  left: -10%; animation-delay: 0s; }
.chip-label:nth-child(2) { top: 25%;  right: -8%; animation-delay: 0.5s; }
.chip-label:nth-child(3) { bottom:20%;left: -12%; animation-delay: 1s; }
.chip-label:nth-child(4) { bottom:10%;right: -5%; animation-delay: 1.5s; }
.chip-label:nth-child(5) { top: 50%;  left: -15%; animation-delay: 0.8s; }
.chip-label:nth-child(6) { top: 60%;  right: -10%;animation-delay: 1.2s; }

@keyframes labelPulse {
  0%, 100% { opacity: 0.45; }
  50%       { opacity: 0.9; }
}

/* ── Canvas particles background ─────────────────────────────────────────── */
#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.45;
}

/* ── Glow accents ─────────────────────────────────────────────────────────── */
.glow-text {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-line {
  width: 60px; height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 2px;
  margin: 0.75rem 0 1.5rem;
}

/* ── Product / service cards ──────────────────────────────────────────────── */
.product-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.product-card:hover::before { transform: scaleX(1); }
.product-card:hover {
  border-color: var(--color-primary);
  transform: translateY(-6px);
  box-shadow: 0 20px 60px rgba(0, 212, 255, 0.12);
}

.product-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(124,58,237,0.15));
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

/* ── Page hero (internal pages) ───────────────────────────────────────────── */
.page-hero {
  padding: 9rem 0 5rem;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}
.page-hero-label {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: 0.875rem;
  display: block;
}
.page-hero h1 { margin-bottom: 1rem; }
.page-hero p  { font-size: 1.125rem; color: var(--text-secondary); max-width: 640px; }

/* ── Chip tech grid background ─────────────────────────────────────────────── */
.tech-bg {
  position: relative;
}
.tech-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.3;
  pointer-events: none;
  z-index: 0;
}
.tech-bg > * { position: relative; z-index: 1; }

/* ── Feature list ─────────────────────────────────────────────────────────── */
.feature-item {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}
.feature-item:last-child { margin-bottom: 0; }
.feature-icon-wrap {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(124,58,237,0.15));
  border: 1px solid rgba(0,212,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.feature-body h4 { margin-bottom: 0.35rem; color: var(--text-primary); }
.feature-body p  { font-size: 0.9375rem; color: var(--text-secondary); margin: 0; }

/* ── Spec table in product pages ──────────────────────────────────────────── */
.spec-section {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.spec-table tr:hover td { background: var(--surface-2); }

/* ── Stats bar ────────────────────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.stat-item {
  padding: 2rem 1.5rem;
  border-right: 1px solid var(--border);
  text-align: center;
}
.stat-item:last-child { border-right: none; }
.stat-item-value {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat-item-label { font-size: 0.875rem; color: var(--text-muted); }

/* ── Blog post hero ───────────────────────────────────────────────────────── */
.post-hero {
  padding-top: 72px;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}
.post-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}
.post-hero-content { padding: 3rem 0 2.5rem; }
.post-hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.post-hero-meta .post-cat { margin-bottom: 0; }

/* ── Related posts ────────────────────────────────────────────────────────── */
.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* ── Gallery page ─────────────────────────────────────────────────────────── */
.gallery-header {
  padding: 8rem 0 3rem;
  text-align: center;
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
}

/* ── Contact page ─────────────────────────────────────────────────────────── */
.contact-info-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.75rem;
}
.contact-info-item:last-child { margin-bottom: 0; }
.contact-info-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: rgba(0,212,255,0.1);
  border: 1px solid rgba(0,212,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
  flex-shrink: 0;
}
.contact-info-label { font-size: 0.8125rem; color: var(--text-muted); margin-bottom: 0.2rem; }
.contact-info-value { font-weight: 600; color: var(--text-primary); }
.contact-info-value a { color: inherit; transition: color 0.2s; }
.contact-info-value a:hover { color: var(--color-primary); }

@media (max-width: 768px) {
  .chip-svg { width: 240px; height: 240px; }
  .stats-bar { grid-template-columns: 1fr 1fr; }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid var(--border); border-top: 1px solid var(--border); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--border); border-right: none; }
}
