/* ============================================================
   Akriti Precision Systems — PCB Routing Machine Blog
   Design: Engineering-grade, IBM Plex Mono headlines,
           circuit-trace accents, dark precision palette
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Custom Properties ── */
:root {
  --bg: #0A0F1E;
  --bg-card: #141B2D;
  --bg-surface: #1A2236;
  --accent: #00C8FF;
  --accent-dim: rgba(0, 200, 255, 0.12);
  --amber: #FF8C42;
  --amber-dim: rgba(255, 140, 66, 0.12);
  --text-primary: #F0F6FF;
  --text-secondary: #8A9BB8;
  --text-muted: #4A5C7A;
  --border: rgba(0, 200, 255, 0.15);
  --border-soft: rgba(255, 255, 255, 0.06);

  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --font-body: 'Inter', system-ui, sans-serif;

  --radius: 6px;
  --radius-lg: 12px;
  --max-w: 780px;
}

/* ── Reset & Base ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

/* ── Reading Progress Bar ── */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  z-index: 1000;
  transition: width 0.1s linear;
}

/* ── Blog Wrapper ── */
.blog-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px 120px;
}

/* ── Blog Header ── */
.blog-header {
  text-align: center;
  margin-bottom: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border-soft);
  position: relative;
}

.blog-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.blog-eyebrow::before,
.blog-eyebrow::after {
  content: '';
  display: block;
  height: 1px;
  width: 32px;
  background: var(--accent);
  opacity: 0.5;
}

.blog-title {
  font-family: var(--font-mono);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.blog-title span {
  color: var(--accent);
}

.blog-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.blog-meta .dot {
  color: var(--border);
}

/* ── Circuit-trace Section Divider (Signature Element) ── */
.circuit-divider {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 48px 0;
  height: 20px;
  opacity: 0.4;
}

.circuit-divider::before {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent);
}

.circuit-node {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

.circuit-branch {
  width: 1px;
  height: 12px;
  background: var(--accent);
  margin: 0 12px;
  flex-shrink: 0;
  position: relative;
  top: 0;
}

.circuit-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent);
}

/* ── Prose ── */
.blog-prose p {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #C8D8F0;
  margin-bottom: 22px;
}

.blog-prose p:last-child {
  margin-bottom: 0;
}

/* ── Section Headings ── */
.blog-prose h2 {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 56px 0 20px;
  padding-left: 16px;
  border-left: 3px solid var(--accent);
  letter-spacing: -0.01em;
}

.blog-prose h3 {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent);
  margin: 36px 0 14px;
  letter-spacing: 0.03em;
}

/* ── Strong ── */
.blog-prose strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* ── Spec Callout Cards ── */
.spec-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin: 32px 0;
  position: relative;
  overflow: hidden;
}

.spec-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.spec-card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  opacity: 0.8;
}

.spec-card p {
  margin-bottom: 0 !important;
  color: #B0C4DE !important;
}

/* ── Highlight Chip (inline spec values) ── */
.spec-value {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(0, 200, 255, 0.25);
  border-radius: 4px;
  padding: 2px 10px;
  margin: 0 2px;
  letter-spacing: 0.05em;
}

/* ── Warning / Issue Callout ── */
.issue-list {
  list-style: none;
  margin: 24px 0;
}

.issue-list li {
  position: relative;
  padding: 16px 20px 16px 52px;
  margin-bottom: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  font-size: 0.97rem;
  color: #B0C4DE;
  line-height: 1.6;
}

.issue-list li::before {
  content: attr(data-label);
  position: absolute;
  left: 16px;
  top: 0px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--amber);
  background: var(--amber-dim);
  border-radius: 3px;
  padding: 2px 6px;
}

.issue-list li strong {
  display: block;
  color: var(--text-primary);
  margin-top: 15px;
  margin-bottom: 4px;
  font-size: 0.95rem;
}

/* ── Product Cards ── */
.product-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 32px 0;
}

@media (max-width: 560px) {
  .product-cards {
    grid-template-columns: 1fr;
  }
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.2s;
  display: block;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.product-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
  opacity: 0;
  transition: opacity 0.2s;
}

.product-card:hover::after {
  opacity: 1;
}

.product-card-tag {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.product-card-name {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.product-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.product-card-arrow {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

/* ── CTA Block ── */
.blog-cta {
  margin-top: 56px;
  padding: 36px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
}

.blog-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--amber));
}

.blog-cta p {
  margin-bottom: 0 !important;
  font-size: 0.97rem !important;
  color: #B0C4DE !important;
}

.blog-cta a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 200, 255, 0.3);
  transition: border-color 0.15s, color 0.15s;
}

.blog-cta a:hover {
  color: #fff;
  border-color: #fff;
}

/* ── Links in prose ── */
.blog-prose a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 200, 255, 0.3);
  transition: border-color 0.15s;
}

.blog-prose a:hover {
  border-color: var(--accent);
}

/* ── WhatsApp Float (keep functional) ── */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 999;
}

.whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.whatsapp-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-tooltip {
  position: absolute;
  right: 68px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-family: var(--font-body);
  padding: 7px 14px;
  border-radius: var(--radius);
  white-space: nowrap;
  border: 1px solid var(--border-soft);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
}

.whatsapp-pulse {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.3);
  animation: pulse 2.5s ease-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }

  70% {
    transform: scale(1.6);
    opacity: 0;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .blog-wrapper {
    padding: 48px 18px 80px;
  }

  .blog-cta {
    padding: 24px 22px;
  }

  .spec-card {
    padding: 22px 20px;
  }

  .blog-prose h2 {
    font-size: 1.15rem;
  }
}

/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}