/* VoxGuard Blog — shared editorial styles (index + articles)
   Replaces the per-page inline <style> blocks. Loaded after /styles.css.
   Goal: dark brand, but warm and alive for long reading — ambient color,
   softer body text, clear visual rhythm. */

::selection {
  background: rgba(99, 102, 241, 0.45);
  color: #fff;
}

/* ============================== READING PROGRESS ============================== */
#vg-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #A855F7, #818CF8, #6366F1);
  box-shadow: 0 0 10px rgba(129, 140, 248, 0.6);
  z-index: 1001;
  pointer-events: none;
}

/* ============================== SHARED PAGE CANVAS ============================== */
.post-page,
.blog-page {
  padding: 140px 0 80px;
  background:
    radial-gradient(ellipse 900px 500px at 12% 0%, rgba(168, 85, 247, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 800px 600px at 95% 18%, rgba(99, 102, 241, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse 700px 500px at 5% 70%, rgba(99, 102, 241, 0.045) 0%, transparent 60%),
    var(--vox-background);
}

.blog-page { min-height: 70vh; }

/* ============================== BLOG INDEX ============================== */
.blog-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.blog-header {
  position: relative;
  text-align: center;
  margin-bottom: 3.5rem;
  padding: 1rem 0 1.5rem;
  overflow: hidden;
  border-radius: 20px;
}

.blog-header > :not(canvas) { position: relative; z-index: 1; }

.blog-header .vox-waves {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.blog-header h1 {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.blog-header p {
  color: var(--vox-muted-foreground);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.post-card {
  position: relative;
  background: var(--vox-card);
  border: 1px solid var(--vox-border);
  border-radius: 16px;
  padding: 2rem;
  overflow: hidden;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #A855F7, #6366F1);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.post-card:hover {
  border-color: rgba(129, 140, 248, 0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 44px rgba(99, 102, 241, 0.12);
}

.post-card:hover::before { opacity: 1; }

.post-card .post-meta {
  color: var(--vox-accent);
  font-size: 0.8rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  margin-bottom: 0.6rem;
  letter-spacing: 0.04em;
}

.post-card h2 {
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}

.post-card h2 a {
  color: var(--vox-foreground);
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-card h2 a:hover { color: var(--vox-accent); }

.post-card p {
  color: var(--vox-muted-foreground);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.post-card .read-more {
  color: var(--vox-accent);
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, color 0.2s ease;
}

.post-card .read-more:hover {
  color: #fff;
  transform: translateX(3px);
}

/* ============================== ARTICLE ============================== */
.post-container {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 1.5rem;
  color: var(--vox-foreground);
}

.post-meta-top {
  display: inline-block;
  color: var(--vox-accent);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  margin-bottom: 1.4rem;
  text-transform: uppercase;
}

.post-title {
  font-size: 2.8rem;
  line-height: 1.12;
  margin-bottom: 1.4rem;
}

/* Gradient rule under the title — the article's signature mark */
.post-title::after {
  content: "";
  display: block;
  width: 76px;
  height: 4px;
  border-radius: 4px;
  margin-top: 1.2rem;
  background: linear-gradient(90deg, #A855F7, #6366F1);
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.45);
}

.post-lede {
  color: #B8C2D8;
  font-size: 1.22rem;
  line-height: 1.6;
  margin-bottom: 2.6rem;
  padding-left: 1.1rem;
  border-left: 3px solid rgba(129, 140, 248, 0.45);
}

/* Body rhythm — softer ink than stark white for long reading */
.post-container p,
.post-container ul,
.post-container ol {
  font-size: 1.08rem;
  line-height: 1.8;
  margin-bottom: 1.3rem;
  color: #C6CFDF;
}

.post-container strong { color: var(--vox-foreground); }
.post-container em { color: #D7DEEC; }

.post-container h2 {
  font-size: 1.9rem;
  margin-top: 3.2rem;
  margin-bottom: 1rem;
  line-height: 1.22;
}

/* Small gradient tick above each section heading — paces the scroll */
.post-container h2::before {
  content: "";
  display: block;
  width: 34px;
  height: 3px;
  border-radius: 3px;
  margin-bottom: 0.8rem;
  background: linear-gradient(90deg, #A855F7, #6366F1);
}

.post-container h3 {
  font-size: 1.35rem;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
  color: #E4E9F5;
}

.post-container ul,
.post-container ol { padding-left: 1.5rem; }

.post-container li { margin-bottom: 0.55rem; }

.post-container li::marker {
  color: var(--vox-accent);
  font-weight: 600;
}

.post-container a {
  color: var(--vox-accent);
  text-decoration: underline;
  text-decoration-color: rgba(129, 140, 248, 0.45);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.post-container a:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.post-container hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(129, 140, 248, 0.35), transparent);
  margin: 3rem 0;
}

/* Figures as floating cards */
.post-figure {
  margin: 2.4rem 0;
  text-align: center;
}

.post-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(58, 58, 80, 0.7);
  background: var(--vox-card);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 0 40px rgba(99, 102, 241, 0.06);
}

.post-figure.screenshot img { max-width: 320px; }
.post-figure.wide img { max-width: 100%; }

.post-figure figcaption {
  color: var(--vox-muted-foreground);
  font-size: 0.9rem;
  margin-top: 0.9rem;
}

/* CTA pill — brand gradient */
a.post-cta,
.post-container a.post-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.95rem 1.9rem;
  background: linear-gradient(120deg, #8B5CF6, #6366F1);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.35);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

a.post-cta:hover,
.post-container a.post-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 32px rgba(129, 140, 248, 0.5);
  color: #fff;
  text-decoration: none;
}

/* Sources panel */
.sources {
  position: relative;
  background: var(--vox-card);
  border: 1px solid var(--vox-border);
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin-top: 2rem;
  overflow: hidden;
}

.sources::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #A855F7, #6366F1);
  opacity: 0.6;
}

.sources h2 { margin-top: 0; font-size: 1.35rem; }
.sources h2::before { display: none; }

.sources ul {
  list-style: none;
  padding-left: 0;
  font-size: 0.95rem;
}

.sources li {
  margin-bottom: 0.6rem;
  color: var(--vox-muted-foreground);
  line-height: 1.55;
}

.sources a { word-break: break-word; }

/* Article footer */
.post-footer {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--vox-border);
}

.post-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.post-footer-links a {
  color: var(--vox-muted-foreground);
  text-decoration: none;
  font-size: 0.92rem;
  border: 1px solid var(--vox-border);
  border-radius: 999px;
  padding: 8px 16px;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.post-footer-links a:hover {
  color: var(--vox-foreground);
  border-color: rgba(129, 140, 248, 0.5);
  background: rgba(99, 102, 241, 0.08);
  text-decoration: none;
}

/* Scroll reveals (blog.js adds .bg-reveal; reduced motion skips) */
.bg-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.bg-reveal.bg-in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================== COMPONENT KIT (2026-07-14) ==============================
   Editorial components for long reads: pull-quotes, callouts, stat tiles, diagrams.
   Rule: components appear only where the content earns them — never as filler. */

/* Canvas v2 (2026-07-14 r2) — texture + top glow + contained article panel.
   The void was the problem: text floating on empty black. Three moves:
   a faint dot grid gives the canvas material, a strong glow crowns the title,
   and the article itself sits on a bordered panel like a document on a desk. */
.post-page,
.blog-page {
  background:
    radial-gradient(rgba(148, 163, 184, 0.11) 1.5px, transparent 2px) 0 0 / 28px 28px,
    radial-gradient(ellipse 1100px 480px at 50% -80px, rgba(139, 92, 246, 0.22) 0%, transparent 65%),
    radial-gradient(ellipse 800px 600px at 8% 24%, rgba(99, 102, 241, 0.09) 0%, transparent 60%),
    radial-gradient(ellipse 800px 600px at 94% 60%, rgba(168, 85, 247, 0.08) 0%, transparent 60%),
    #06060F;
}

/* The article panel — overrides the base .post-container; reading measure unchanged */
.post-container {
  max-width: 860px;
  padding: 2.6rem 3.2rem 3rem;
  background: linear-gradient(180deg, rgba(15, 15, 30, 0.92), rgba(9, 9, 20, 0.78));
  border: 1px solid #232340;
  border-radius: 24px;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.5);
}

/* Pull-quote — the section's strongest line, set off before the next block */
.pull-quote {
  position: relative;
  margin: 2.6rem 0;
  padding: 0.4rem 0 0.4rem 1.6rem;
  border: none;
}

.pull-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #A855F7, #6366F1);
  box-shadow: 0 0 14px rgba(129, 140, 248, 0.35);
}

.pull-quote p {
  font-family: 'Syne', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.45;
  color: #E9EDF8;
  margin: 0;
}

/* Callouts — three flavors, all quiet. Labeled in mono type, never emoji. */
.callout {
  display: block;
  margin: 2.2rem 0;
  padding: 1.2rem 1.4rem;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.22);
}

.callout .callout-title {
  display: block;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vox-accent);
  margin-bottom: 0.55rem;
}

.callout p { margin: 0; font-size: 1.02rem; line-height: 1.7; }

.callout ul { margin: 0; padding-left: 1.2rem; font-size: 1.02rem; }
.callout li { margin-bottom: 0.45rem; }
.callout li:last-child { margin-bottom: 0; }

.callout--limit .callout-title { color: #F4B266; }
.callout--data .callout-title { color: #C084FC; }

.callout--limit {
  background: rgba(244, 178, 102, 0.05);
  border-color: rgba(244, 178, 102, 0.25);
}

.callout--data {
  background: rgba(168, 85, 247, 0.06);
  border-color: rgba(168, 85, 247, 0.25);
}

/* Stat tiles — for our own numbers only */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2.4rem 0;
}

.stat-tile {
  background: var(--vox-card);
  border: 1px solid var(--vox-border);
  border-radius: 14px;
  padding: 1.4rem 1.2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.stat-tile::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #A855F7, #6366F1);
  opacity: 0.7;
}

.stat-tile .stat-value {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  background: linear-gradient(120deg, #C084FC, #818CF8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.15;
  margin-bottom: 0.35rem;
}

.stat-tile .stat-label {
  color: var(--vox-muted-foreground);
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Diagram figure — inline SVG mechanism diagrams */
.post-figure.diagram {
  background: var(--vox-card);
  border: 1px solid var(--vox-border);
  border-radius: 16px;
  padding: 1.6rem 1.2rem 1rem;
}

.post-figure.diagram svg {
  width: 100%;
  height: auto;
  max-width: 640px;
}

.post-figure.diagram figcaption { margin-top: 0.6rem; }

/* Notification-style screenshot (wide, not phone-framed) */
.post-figure.notification img {
  max-width: 520px;
  border-radius: 20px;
}

@media (max-width: 768px) {
  .pull-quote p { font-size: 1.2rem; }
  .stat-row { grid-template-columns: 1fr; }
  .stat-tile { padding: 1.1rem 1rem; }
  .post-container {
    margin: 0 0.6rem;
    padding: 1.6rem 1.15rem 2rem;
    border-radius: 18px;
  }
}

/* ============================== RESPONSIVE ============================== */
@media (max-width: 768px) {
  .post-page, .blog-page { padding: 110px 0 60px; }

  .blog-header h1 { font-size: 2.2rem; }
  .post-card { padding: 1.5rem; }
  .post-card h2 { font-size: 1.35rem; }

  .post-title { font-size: 2rem; }
  .post-lede { font-size: 1.08rem; }
  .post-container h2 { font-size: 1.5rem; }
  .post-container h3 { font-size: 1.2rem; }
  .post-container p, .post-container ul, .post-container ol { font-size: 1.03rem; }
  .sources { padding: 1.25rem 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  .bg-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
