/*
  blog-post-v2.css
  ─────────────────────────────────────────────────────────
  Loaded AFTER style.css on every blog post page.
  Overrides the legacy navy/blue palette with the v2
  zinc/cyan design system — no class name changes needed
  in the HTML files themselves.

  Design tokens
  ─────────────
  bg-base:      #09090b  (zinc-950)
  bg-raised:    #18181b  (zinc-900)
  bg-border:    #27272a  (zinc-800)
  text-primary: #f4f4f5  (zinc-100)
  text-body:    #d4d4d8  (zinc-300)
  text-muted:   #71717a  (zinc-500)
  accent:       #06b6d4  (cyan-500)
  accent-light: #22d3ee  (cyan-400)
  ─────────────────────────────────────────────────────────
*/

/* ── PAGE BASE ─────────────────────────────────────────── */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  background: #09090b !important;
  background-image: none !important;   /* remove any navy gradient */
  cursor: auto !important;             /* restore OS cursor (style.css sets cursor:none) */
  color: #d4d4d8;
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
}

/* ── TABLE MOBILE SCROLL ───────────────────────────────── */
.article-body table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

/* ── ARTICLE HERO ──────────────────────────────────────── */
.article-hero {
  position: relative;
  height: 480px;
  overflow: hidden;
  background: #18181b;
  border-bottom: 1px solid #27272a;
}

.article-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    #09090b 0%,
    rgba(9, 9, 11, 0.65) 50%,
    rgba(9, 9, 11, 0.25) 100%
  );
}

.article-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

/* ── ARTICLE TAG ───────────────────────────────────────── */
.article-tag {
  display: inline-block;
  background: #06b6d4;
  color: #09090b;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
}

/* ── ARTICLE TITLE ─────────────────────────────────────── */
.article-title {
  color: #f4f4f5;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0;
}

/* ── ARTICLE META ──────────────────────────────────────── */
.article-meta {
  color: #71717a;
  font-size: 0.8rem;
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.article-meta span {
  color: #71717a;
}

.article-meta a {
  color: #a1a1aa;
  text-decoration: none;
  transition: color 0.15s;
}

.article-meta a:hover {
  color: #06b6d4;
}

/* ── ARTICLE BODY WRAPPER ──────────────────────────────── */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  color: #d4d4d8;
  line-height: 1.8;
  font-size: 1rem;
}

/* ── HEADINGS INSIDE BODY ──────────────────────────────── */
.article-body h2 {
  color: #f4f4f5;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1rem;
  border-left: 3px solid #06b6d4;
  padding-left: 0.875rem;
  line-height: 1.3;
}

.article-body h3 {
  color: #22d3ee;
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.article-body h4 {
  color: #a1a1aa;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── PARAGRAPHS ────────────────────────────────────────── */
.article-body p {
  color: #d4d4d8;
  margin-bottom: 1.25rem;
}

/* ── LISTS ─────────────────────────────────────────────── */
.article-body ul,
.article-body ol {
  color: #d4d4d8;
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-body ul li::marker {
  color: #06b6d4;
}

/* ── LINKS ─────────────────────────────────────────────── */
.article-body a {
  color: #06b6d4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.article-body a:hover {
  color: #22d3ee;
}

/* ── PULL QUOTE ────────────────────────────────────────── */
.pull-quote {
  background: rgba(6, 182, 212, 0.05);
  border-left: 4px solid #06b6d4;
  padding: 1.25rem 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 2rem 0;
  color: #e4e4e7;
  font-size: 1.1rem;
  font-style: italic;
  line-height: 1.65;
}

/* ── STAT ROW / STAT BOX ───────────────────────────────── */
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.stat-box {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 1.25rem;
  text-align: center;
}

.stat-num {
  color: #06b6d4;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  display: block;
}

.stat-label {
  color: #71717a;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.375rem;
  display: block;
}

/* ── MISTAKE BOX (keep red — it's semantic) ────────────── */
.mistake-box {
  background: rgba(239, 68, 68, 0.08);
  border-left: 4px solid #ef4444;
  padding: 1.25rem 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.5rem 0;
  color: #fca5a5;
}

.mistake-box strong,
.mistake-box b {
  color: #f87171;
}

/* ── FIX BOX (cyan — positive) ─────────────────────────── */
.fix-box {
  background: rgba(6, 182, 212, 0.07);
  border-left: 4px solid #06b6d4;
  padding: 1.25rem 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.5rem 0;
  color: #d4d4d8;
}

.fix-box strong,
.fix-box b {
  color: #22d3ee;
}

/* ── ARTICLE IMAGE ─────────────────────────────────────── */
.article-img {
  width: 100%;
  border-radius: 0.75rem;
  margin: 2rem 0 0.5rem;
  display: block;
  border: 1px solid #27272a;
}

.article-img-caption {
  text-align: center;
  font-size: 0.8rem;
  color: #52525b;
  margin-top: 0.5rem;   /* override style.css margin-top: -28px which pulled captions into image */
  margin-bottom: 2rem;
}

/* ── ARTICLE CTA BLOCK ─────────────────────────────────── */
.article-cta {
  background: #18181b;
  border-left: 4px solid #06b6d4;
  border-radius: 0 0.75rem 0.75rem 0;
  padding: 1.75rem 1.5rem;
  margin: 2.5rem 0;
}

.article-cta h3,
.article-cta strong {
  color: #f4f4f5;
  font-size: 1.1rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

.article-cta p {
  color: #a1a1aa;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.cta-button,
.article-cta a.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 33%, #6366f1 66%, #2dd4bf 100%);
  background-size: 200% 200%;
  animation: gradientFlow 5s ease infinite;
  color: #09090b !important;
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.65rem 1.5rem;
  border-radius: 0.375rem;
  text-decoration: none !important;
  transition: filter 0.15s;
}

.cta-button:hover,
.article-cta a.cta-button:hover {
  filter: brightness(1.1);
}

@keyframes gradientFlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ── INLINE LINK GRADIENT TEXT ──────────────────────────── */
.article-body a:not(.back-link):not(.cta-button):not([class*="cta"]) {
  background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #6366f1 100%);
  background-size: 200% 200%;
  animation: gradientFlow 4s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: underline;
  text-decoration-color: #22d3ee;
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}
.article-body a:not(.back-link):not(.cta-button):not([class*="cta"]):hover {
  text-decoration-color: #6366f1;
}

/* ── BACK LINK ─────────────────────────────────────────── */
.back-link {
  display: block;
  color: #71717a;
  font-size: 0.85rem;
  text-decoration: none;
  transition: color 0.15s;
  margin-bottom: 1.75rem;
}

.back-link:hover {
  color: #06b6d4;
}

/* ── HORIZONTAL RULE ───────────────────────────────────── */
.article-body hr {
  border: none;
  border-top: 1px solid #27272a;
  margin: 2.5rem 0;
}

/* ── CODE / PRE ────────────────────────────────────────── */
.article-body code {
  background: #18181b;
  color: #22d3ee;
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  border-radius: 0.25rem;
  border: 1px solid #27272a;
}

.article-body pre {
  background: #18181b;
  border: 1px solid #27272a;
  border-radius: 0.75rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-body pre code {
  background: none;
  border: none;
  padding: 0;
  color: #d4d4d8;
}

/* ── BLOCKQUOTE fallback ───────────────────────────────── */
.article-body blockquote {
  background: rgba(6, 182, 212, 0.05);
  border-left: 4px solid #06b6d4;
  padding: 1rem 1.5rem;
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 1.5rem 0;
  color: #a1a1aa;
  font-style: italic;
}

/* ── RESPONSIVE TWEAKS ─────────────────────────────────── */
@media (max-width: 640px) {
  .article-hero {
    height: 320px;
  }

  .article-hero-content {
    padding: 1.25rem 1rem;
  }

  .article-title {
    font-size: 1.4rem;
  }

  .article-body {
    padding: 2rem 1rem 4rem;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
