/* blog.css — shared styles for blog post bodies AND the blog index
 * listing pages. Layered on top of site.css (nav / footer / lang-switch
 * chrome). Per-page inline <style> blocks are intentionally NOT used
 * for blog content: every post and the index pages share the same
 * typography and accents, so the rules live here once.
 *
 * The blog uses a slightly different reading-typography stack from the
 * marketing pages — DM Sans for body, generous 1.75 line-height, a
 * 720px content column — because long-form prose has different
 * legibility needs than a marketing layout. The brand palette
 * (--bg, --cyan, --border) still comes from site.css :root so nav
 * and footer chrome blend seamlessly.
 */

:root {
  --blog-surface: #0a1628;
  --blog-border: rgba(56,167,230,0.18);
  --blog-text: #c8dcf0;
  --blog-text-bright: #f0f4fa;
  --blog-text-dim: #6b8aad;
  --font-blog: "DM Sans", "Plus Jakarta Sans", "Segoe UI", -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

body.blog-post,
body.blog-index {
  background: var(--bg);
  color: var(--blog-text);
  font-family: var(--font-blog);
  font-size: 18px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Fixed-nav offset: site nav is 64px-logo + 0.6rem×2 padding ≈ 84px. */
body.blog-post .blog-container,
body.blog-index .blog-container {
  max-width: 720px;
  margin: 0 auto;
  padding: 7rem 1.5rem 5rem;
}

/* ── ARTICLE HEADER ── */
.blog-meta {
  color: var(--blog-text-dim);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}
/* Breadcrumb is article-internal chrome, not prose: keep it to a single
   hover underline (text-decoration), never the prose border-bottom — the
   two stacking produced a double underline on hover. The longer
   .blog-post .blog-container prefix outranks the prose-link rule below,
   so the border-bottom is reliably suppressed here regardless of order. */
.blog-post .blog-container .blog-meta a { color: var(--cyan); text-decoration: none; border-bottom: none; }
.blog-post .blog-container .blog-meta a:hover { text-decoration: underline; border-bottom: none; }
.blog-meta .blog-meta-sep { opacity: 0.5; margin: 0 0.4rem; }

.blog-post h1 {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blog-text-bright);
  line-height: 1.2;
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

.blog-subtitle {
  font-size: 1.15rem;
  color: var(--blog-text-dim);
  margin-bottom: 3rem;
  border-left: 3px solid var(--cyan);
  padding-left: 1rem;
  line-height: 1.6;
}

/* ── ARTICLE BODY ── */
.blog-post h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blog-text-bright);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.005em;
}

.blog-post h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blog-text-bright);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.blog-post p {
  margin-bottom: 1.5rem;
}

.blog-post strong { color: var(--blog-text-bright); font-weight: 700; }

/* Cyan emphasis (used in body prose for keywords / quoted phrases) */
.blog-post em {
  color: var(--cyan);
  font-style: normal;
}

/* Prose-link underline — scoped to the article body only. Using the
   bare body class (.blog-post a) leaked this border-bottom onto every
   anchor on the page: the nav brand wordmark, the nav links, and the
   footer. Scope to .blog-container so only in-article links get it, and
   keep the .blog-post prefix so it can't reach the generated index
   pages (body.blog-index also uses .blog-container). */
.blog-post .blog-container a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid rgba(56,167,230,0.3);
  transition: border-color 0.2s;
}
.blog-post .blog-container a:hover { border-bottom-color: var(--cyan); }

/* Prose lists — scoped to the article body like the link rule above.
   The bare body class (.blog-post ul/li) leaked onto the nav and footer
   <ul>s (.nav-links, .footer-links): its margin (0 0 1.5rem 1.4rem)
   gave the nav list a 1.5rem bottom margin that pushed the link row up
   out of vertical centre. Scope to .blog-container so only article lists
   are affected; the .blog-post prefix keeps it off the index pages. */
.blog-post .blog-container ul, .blog-post .blog-container ol {
  margin: 0 0 1.5rem 1.4rem;
  padding: 0;
}
.blog-post .blog-container li { margin-bottom: 0.5rem; }
.blog-post .blog-container li::marker { color: var(--cyan); }

.blog-post code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  padding: 0.1em 0.4em;
  color: var(--cyan);
}
.blog-post pre {
  background: #02080f;
  border: 1px solid var(--blog-border);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0 2rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  line-height: 1.65;
}
.blog-post pre code {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blog-text);
}

.blog-post blockquote {
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.2rem;
  border-left: 3px solid var(--cyan);
  color: var(--blog-text);
  font-style: italic;
}

/* ── INLINE PATTERNS ── */
.callout {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-left: 3px solid var(--cyan);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 6px 6px 0;
}
.callout p:last-child { margin-bottom: 0; }

.regulation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0;
}
.regulation-card {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  padding: 1.25rem;
  border-radius: 6px;
}
.regulation-card h3 {
  color: var(--cyan);
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}
.regulation-card p {
  color: var(--blog-text-dim);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 0;
}

.divider {
  width: 60px;
  height: 2px;
  background: var(--cyan);
  opacity: 0.4;
  margin: 3rem 0;
  border: 0;
}

/* ── LEDE (large borderless intro paragraph) ──
 * Alternative to .blog-subtitle for posts that open with a big,
 * full-width standfirst rather than a bordered pull. */
.blog-lede {
  font-size: 1.25rem;
  color: var(--blog-text);
  line-height: 1.55;
  margin-bottom: 3.5rem;
  font-weight: 400;
}

/* ── LABELLED CARD LIST (stacked, left-accent) ──
 * A vertical list of cards each tagged with a small mono label —
 * used for "catalysts / forces / regulations" rundowns. */
.cards { display: grid; gap: 1rem; margin: 2rem 0 1rem; }
.card {
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
  padding: 1.5rem 1.75rem;
  transition: background 0.2s, transform 0.2s;
}
.card:hover { background: #15253d; transform: translateX(2px); }
.card-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.card p { color: var(--blog-text); margin: 0; font-size: 0.95rem; line-height: 1.6; }
.card em { color: var(--blog-text-bright); font-style: italic; }

/* ── PULL QUOTE (italic, cyan left rule) ── */
.pullquote {
  border-left: 3px solid var(--cyan);
  padding: 0.25rem 1.5rem;
  margin: 2.5rem 0;
  font-size: 1.15rem;
  font-style: italic;
  color: var(--blog-text-bright);
  line-height: 1.5;
}

/* ── TIMELINE (two-column when / what rows) ── */
.timeline {
  margin: 2.5rem 0;
  border: 1px solid var(--blog-border);
  border-radius: 4px;
  overflow: hidden;
}
.timeline-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  border-bottom: 1px solid var(--blog-border);
  transition: background 0.2s;
}
.timeline-row:last-child { border-bottom: 0; }
.timeline-row:hover { background: #15253d; }
.timeline-when {
  background: var(--blog-surface);
  padding: 1rem 1.25rem;
  border-right: 1px solid var(--blog-border);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--cyan);
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
}
.timeline-what {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--blog-text);
  line-height: 1.5;
}
.timeline-what .old {
  color: var(--blog-text-dim);
  text-decoration: line-through;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  margin-left: 0.5rem;
}

/* ── AUTHOR CARD (avatar + bio) ── */
.blog-author {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--blog-surface);
  border: 1px solid var(--blog-border);
  border-radius: 4px;
  padding: 1.5rem;
  margin-top: 2.5rem;
}
.blog-author-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), #0088cc);
  display: flex; align-items: center; justify-content: center;
  color: var(--bg); font-weight: 700; font-family: var(--font-mono);
  flex-shrink: 0;
}
.blog-author-text { font-size: 0.95rem; line-height: 1.5; }
.blog-author-name { color: var(--blog-text-bright); font-weight: 600; }
.blog-author-bio { color: var(--blog-text-dim); margin-top: 0.25rem; font-size: 0.9rem; }

/* Outbound CTA line under the author card (try the demo / LinkedIn / RSS). */
.blog-post-cta {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--blog-text-dim);
}

/* ── ARTICLE FOOTER (author bio / outbound links) ── */
.blog-footer-note {
  color: var(--blog-text-dim);
  font-size: 0.9rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--blog-border);
}
.blog-footer-note p + p { margin-top: 0.75rem; }

/* ── INDEX (LISTING) PAGE ── */
body.blog-index h1 {
  font-family: var(--font-blog);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--blog-text-bright);
  letter-spacing: -0.01em;
  margin-bottom: 0.75rem;
}
.blog-index-lede {
  font-size: 1.1rem;
  color: var(--blog-text-dim);
  margin-bottom: 0.75rem;
  max-width: 60ch;
  line-height: 1.6;
}
.blog-index-feed {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
  margin-bottom: 3rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--blog-border);
  border-radius: 3px;
  transition: background 0.25s, border-color 0.25s;
}
.blog-index-feed:hover {
  background: rgba(56,167,230,0.08);
  border-color: var(--cyan);
}

.blog-list { list-style: none; padding: 0; margin: 0; }
.blog-list-item {
  padding: 2rem 0;
  border-top: 1px solid var(--blog-border);
}
.blog-list-item:last-child { border-bottom: 1px solid var(--blog-border); }
.blog-list-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  align-items: baseline;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blog-text-dim);
  margin-bottom: 0.85rem;
}
.blog-list-meta .blog-list-date { color: var(--cyan); }
.blog-list-meta .blog-list-readtime::before { content: "·"; margin-right: 1rem; opacity: 0.5; }
.blog-list-title {
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  letter-spacing: -0.005em;
}
.blog-list-title a {
  color: var(--blog-text-bright);
  text-decoration: none;
  transition: color 0.2s;
}
.blog-list-title a:hover { color: var(--cyan); }
.blog-list-excerpt {
  color: var(--blog-text-dim);
  font-size: 1rem;
  line-height: 1.65;
  margin: 0 0 1rem;
}
.blog-list-read {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cyan);
  text-decoration: none;
  transition: gap 0.2s;
}
.blog-list-read:hover { gap: 0.7rem; }

.blog-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--blog-text-dim);
  border: 1px dashed var(--blog-border);
}

/* ── FULL NAV CHROME ──
 * The home pages (index.html / fr.html) define .nav-links / .nav-cta /
 * .nav-account-link / .nav-hamburger / .mobile-menu styles inside their
 * own inline <style> block, not in site.css. Blog pages reuse the same
 * full-nav HTML but live outside the home, so we redeclare the styling
 * here. Kept in sync with the home-page versions; if home-page nav
 * styling changes, update both. (Other top-level pages — docs, signup,
 * account, etc. — use a stripped-down nav with only brand + lang-switch
 * and don't need these rules.)
 */
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 0.875rem; font-weight: 500; letter-spacing: normal; word-spacing: 0.08em; line-height: 1.2; transition: color 0.25s; }
.nav-links a:hover { color: var(--cyan); }

.nav-hamburger {
  display: none;
  background: none; border: 1px solid var(--border);
  padding: 0.45rem; cursor: pointer;
  color: var(--cyan); line-height: 0;
}
.nav-hamburger svg { display: block; }
.mobile-menu {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 301;
  background: rgba(5,13,26,0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.2rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  text-decoration: none; color: var(--muted);
  font-family: var(--font-mono); font-size: 1rem;
  font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.25s;
}
.mobile-menu a:hover { color: var(--cyan); }
.mobile-menu-close {
  position: absolute; top: 1.2rem; right: 5vw;
  background: none; border: 1px solid var(--border);
  padding: 0.45rem; cursor: pointer;
  color: var(--cyan); line-height: 0;
}

.nav-account-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  transition: color 0.25s;
}
.nav-account-link:hover { color: var(--cyan); }

.nav-cta {
  display: inline-flex; align-items: center; gap: 0.35rem;
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(56,167,230,0.35);
  padding: 0.55rem 1.3rem 0.55rem 1.1rem;
  font-family: var(--font-mono); font-size: 0.76rem; font-weight: 500;
  text-decoration: none; letter-spacing: 0.06em;
  position: relative; overflow: hidden;
  transition: all 0.35s;
  white-space: nowrap;
}
.nav-cta::before {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(56,167,230,0.12), transparent);
  animation: blogScanLine 3.5s linear infinite;
}
.nav-cta::after {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--cyan) 50%, transparent 100%);
  opacity: 0; transition: opacity 0.35s;
}
.nav-cta:hover {
  background: rgba(56,167,230,0.08);
  border-color: var(--cyan);
  box-shadow: 0 0 22px rgba(56,167,230,0.3), inset 0 0 18px rgba(56,167,230,0.04);
  transform: translateY(-1px);
}
.nav-cta:hover::after { opacity: 1; }
@keyframes blogScanLine { 0% { left: -100%; } 100% { left: 100%; } }

/* Free-trial sticker on Sign-up CTA */
.nav-cta-wrap { position: relative; display: inline-flex; }
.nav-cta-sticker {
  position: absolute;
  top: -7px; right: -12px;
  z-index: 2;
  background: #fff;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 6px;
  border-radius: 2px;
  transform: rotate(6deg);
  box-shadow:
    0 2px 8px rgba(0,0,0,0.45),
    0 0 16px rgba(56,167,230,0.5);
  pointer-events: none;
  white-space: nowrap;
  line-height: 1;
  animation: blogCtaStickerPulse 2.6s ease-in-out infinite;
}
@keyframes blogCtaStickerPulse {
  0%, 100% { transform: rotate(6deg) scale(1); }
  50%      { transform: rotate(6deg) scale(1.06); }
}

/* ── FULL-NAV RESPONSIVE BEHAVIOR ──
   Must mirror index.html / fr.html exactly (their inline <style>). The
   home pages compact the brand wordmark + labels from 901px up, then
   collapse the full nav to the hamburger below 1200px — so the full nav
   only ever shows, in compact form, at ≥1200px. blog.css had drifted out
   of sync: it kept the site.css 2rem wordmark at every desktop width and
   only collapsed at ≤900px, so the oversized brand (≈438px vs the home
   page's ≈297px) shoved the nav rightward until "Sign in" wrapped onto a
   second line — the header misalignment. These two queries restore parity.
   If the home-page nav breakpoints change, update this block too. */
@media (min-width: 901px) {
  .nav-brand { gap: 1.5rem; }
  .nav-brand-name-top { font-size: 1.42rem; letter-spacing: 0.07em; }
  .nav-links { gap: 1.15rem; }
  .nav-links a { font-size: 0.82rem; white-space: nowrap; }
  .nav-account-link { font-size: 0.82rem; white-space: nowrap; }
  nav > .lang-switch { margin-left: 0.9rem; }
}
@media (max-width: 1199px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-cta { display: none; }
  .nav-actions .nav-cta-wrap { display: none; }
  .nav-account-link { display: none; }
  nav > .lang-switch { margin-left: 0; margin-right: 0.75rem; }
}

/* ── SKIP LINK (matches the home-page treatment) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--cyan);
  color: var(--bg);
  padding: 0.5rem 1rem;
  z-index: 999;
  font-size: 0.85rem;
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: 0.5rem; }

/* ── MOBILE ── */
@media (max-width: 600px) {
  body.blog-post,
  body.blog-index { font-size: 17px; }
  body.blog-post .blog-container,
  body.blog-index .blog-container {
    padding: 5.5rem 1.1rem 3.5rem;
  }
  .blog-post h1,
  body.blog-index h1 { font-size: 1.85rem; }
  .blog-subtitle { font-size: 1.05rem; }
  .regulation-grid { grid-template-columns: 1fr; }
  .blog-list-title { font-size: 1.25rem; }
  .blog-lede { font-size: 1.1rem; margin-bottom: 2.5rem; }
  .pullquote { font-size: 1.05rem; padding: 0.25rem 1rem; }
  .timeline-row { grid-template-columns: 1fr; }
  .timeline-when { border-right: 0; border-bottom: 1px solid var(--blog-border); }
}
