/* ──────────────────────────────────────────────────────────────
   TurnStac – supplementary styles (layout handled by Tailwind CDN)
   ────────────────────────────────────────────────────────────── */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Ensure body uses Inter from Google Fonts */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Mobile menu transition */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}
#mobile-menu.open {
  max-height: 400px;
}
/* Mobile-menu touch targets – 48 px min tap zone */
#mobile-menu a {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  min-height: 48px;
  display: flex;
  align-items: center;
}

/* Icon sizing helpers (lucide icons injected as <svg>) */
[data-lucide] {
  display: inline-block;
  vertical-align: middle;
}

/* Group hover transitions for outcome cards */
.outcome-card:hover .outcome-icon-box {
  background-color: #2563EB;
}
.outcome-card:hover .outcome-icon-box svg {
  color: #ffffff;
  stroke: #ffffff;
}
.outcome-icon-box {
  transition: background-color 0.2s ease;
}
.outcome-icon-box svg {
  transition: color 0.2s ease, stroke 0.2s ease;
}

/* Arrow hover translation */
.arrow-shift:hover .arrow-icon {
  transform: translateX(4px);
}
.arrow-icon {
  transition: transform 0.2s ease;
}

/* Link gap transition */
.link-hover-gap {
  transition: gap 0.2s ease;
}
.link-hover-gap:hover {
  gap: 0.75rem;
}

/* Active nav link */
.nav-active {
  color: #2563EB !important;
}

/* ── Circuit network diagram animations ── */

/* ── Technology ticker scroll ── */
@keyframes ticker-scroll {
  0%   { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}
.ticker-track {
  display: inline-flex;
  gap: 2rem;
  white-space: nowrap;
  will-change: transform;
  animation: ticker-scroll var(--ticker-speed, 40s) linear infinite;
}
.ticker-track.ticker-reverse {
  animation-direction: reverse;
}
.ticker-row:hover .ticker-track {
  animation-play-state: paused;
}
.ticker-label {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.ticker-item {
  font-size: 0.875rem;
  color: #6b7280;
  flex-shrink: 0;
}
.ticker-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
  align-self: center;
}
/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* Node glow – blue pillar */
.node-glow-blue {
  animation: glow-blue 3s ease-in-out infinite;
}
@keyframes glow-blue {
  0%, 100% { box-shadow: 0 0 15px rgba(255, 255, 255, 0.1); }
  50%      { box-shadow: 0 0 30px rgba(255, 255, 255, 0.25), 0 0 60px rgba(147, 130, 255, 0.15); }
}

/* Node glow – dark pillar */
.node-glow-dark {
  animation: glow-dark 3s ease-in-out infinite;
}
@keyframes glow-dark {
  0%, 100% { box-shadow: 0 0 12px rgba(255, 255, 255, 0.05); }
  50%      { box-shadow: 0 0 25px rgba(255, 255, 255, 0.12), 0 0 50px rgba(100, 130, 255, 0.08); }
}

/* Connection line shimmer */
.circuit-line {
  animation: line-shimmer 4s ease-in-out infinite;
}
@keyframes line-shimmer {
  0%, 100% { stroke-opacity: 0.12; }
  50%      { stroke-opacity: 0.3; }
}

/* Dashed line drift */
.circuit-line-dash {
  animation: dash-drift 8s linear infinite;
}
@keyframes dash-drift {
  0%   { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 60; }
}

/* Pulse dot glow */
.circuit-pulse {
  filter: blur(1px);
}

/* ── Article body typography ── */
.article-body {
  font-size: 1.125rem;    /* 18px */
  line-height: 1.8;
  color: #374151;         /* gray-700 */
}
.article-body h2 {
  font-size: 1.875rem;    /* 30px */
  font-weight: 700;
  color: #111827;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}
.article-body h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}
.article-body p {
  margin-bottom: 1.25rem;
}
.article-body ul,
.article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}
.article-body li {
  margin-bottom: 0.5rem;
}
.article-body blockquote {
  border-left: 4px solid #2563EB;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: #f9fafb;
  border-radius: 0.5rem;
  font-style: italic;
  color: #4b5563;
}
.article-body pre {
  background: #1f2937;
  color: #e5e7eb;
  padding: 1.25rem;
  border-radius: 0.75rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}
.article-body code {
  background: #f3f4f6;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: #1f2937;
}
.article-body pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  color: inherit;
}
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}
.article-body a {
  color: #2563EB;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.article-body a:hover {
  color: #1d4ed8;
}
/* Smaller text on mobile */
@media (max-width: 640px) {
  .article-body {
    font-size: 1rem;
  }
  .article-body h2 {
    font-size: 1.5rem;
  }
  .article-body h3 {
    font-size: 1.25rem;
  }
}
